CC-2993: Playlist Builder: add "View on SoundCloud" option on the menu

- fixed
- extra fix: handles the case when username or password is empty
This commit is contained in:
James 2011-10-22 11:34:04 -04:00
parent 8b2a23b88a
commit f160ded6bc
10 changed files with 125 additions and 24 deletions

View file

@ -378,6 +378,12 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
protected $soundcloud_error_msg;
/**
* The value for the soundcloud_link_to_file field.
* @var string
*/
protected $soundcloud_link_to_file;
/**
* @var CcSubjs
*/
@ -1069,6 +1075,16 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->soundcloud_error_msg;
}
/**
* Get the [soundcloud_link_to_file] column value.
*
* @return string
*/
public function getDbSoundcloudLinkToFile()
{
return $this->soundcloud_link_to_file;
}
/**
* Set the value of [id] column.
*
@ -2295,6 +2311,26 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this;
} // setDbSoundcloudErrorMsg()
/**
* Set the value of [soundcloud_link_to_file] column.
*
* @param string $v new value
* @return CcFiles The current object (for fluent API support)
*/
public function setDbSoundcloudLinkToFile($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->soundcloud_link_to_file !== $v) {
$this->soundcloud_link_to_file = $v;
$this->modifiedColumns[] = CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE;
}
return $this;
} // setDbSoundcloudLinkToFile()
/**
* Indicates whether the columns in this object are only set to default values.
*
@ -2409,6 +2445,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->soundcloud_id = ($row[$startcol + 55] !== null) ? (int) $row[$startcol + 55] : null;
$this->soundcloud_error_code = ($row[$startcol + 56] !== null) ? (int) $row[$startcol + 56] : null;
$this->soundcloud_error_msg = ($row[$startcol + 57] !== null) ? (string) $row[$startcol + 57] : null;
$this->soundcloud_link_to_file = ($row[$startcol + 58] !== null) ? (string) $row[$startcol + 58] : null;
$this->resetModified();
$this->setNew(false);
@ -2417,7 +2454,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->ensureConsistency();
}
return $startcol + 58; // 58 = CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 59; // 59 = CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating CcFiles object", $e);
@ -2989,6 +3026,9 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
case 57:
return $this->getDbSoundcloudErrorMsg();
break;
case 58:
return $this->getDbSoundcloudLinkToFile();
break;
default:
return null;
break;
@ -3071,6 +3111,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$keys[55] => $this->getDbSoundcloudId(),
$keys[56] => $this->getDbSoundcloudErrorCode(),
$keys[57] => $this->getDbSoundcloudErrorMsg(),
$keys[58] => $this->getDbSoundcloudLinkToFile(),
);
if ($includeForeignObjects) {
if (null !== $this->aCcSubjs) {
@ -3284,6 +3325,9 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
case 57:
$this->setDbSoundcloudErrorMsg($value);
break;
case 58:
$this->setDbSoundcloudLinkToFile($value);
break;
} // switch()
}
@ -3366,6 +3410,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
if (array_key_exists($keys[55], $arr)) $this->setDbSoundcloudId($arr[$keys[55]]);
if (array_key_exists($keys[56], $arr)) $this->setDbSoundcloudErrorCode($arr[$keys[56]]);
if (array_key_exists($keys[57], $arr)) $this->setDbSoundcloudErrorMsg($arr[$keys[57]]);
if (array_key_exists($keys[58], $arr)) $this->setDbSoundcloudLinkToFile($arr[$keys[58]]);
}
/**
@ -3435,6 +3480,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ID)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ID, $this->soundcloud_id);
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ERROR_CODE)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ERROR_CODE, $this->soundcloud_error_code);
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ERROR_MSG)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ERROR_MSG, $this->soundcloud_error_msg);
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE)) $criteria->add(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE, $this->soundcloud_link_to_file);
return $criteria;
}
@ -3553,6 +3599,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$copyObj->setDbSoundcloudId($this->soundcloud_id);
$copyObj->setDbSoundcloudErrorCode($this->soundcloud_error_code);
$copyObj->setDbSoundcloudErrorMsg($this->soundcloud_error_msg);
$copyObj->setDbSoundcloudLinkToFile($this->soundcloud_link_to_file);
if ($deepCopy) {
// important: temporarily setNew(false) because this affects the behavior of
@ -4210,6 +4257,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->soundcloud_id = null;
$this->soundcloud_error_code = null;
$this->soundcloud_error_msg = null;
$this->soundcloud_link_to_file = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->clearAllReferences();