CC-1939 Ability to edit name & description of a playlist, display the description somewhere

now can edit title/description of a playlist without leaving the main playlist builder screen
This commit is contained in:
Naomi 2011-05-17 17:30:17 -04:00 committed by martin
parent a48f467de7
commit d4a4c4be2a
7 changed files with 344 additions and 96 deletions

View file

@ -201,6 +201,30 @@ class Playlist {
return $pl->getDbName();
}
public function setDescription($p_description)
{
$pl = CcPlaylistQuery::create()->findPK($this->id);
if($pl === NULL)
return FALSE;
$pl->setDbDescription($p_description);
$pl->setDbMtime(new DateTime("now"));
$pl->save();
//$this->name = $p_newname;
return TRUE;
}
public function getDescription()
{
$pl = CcPlaylistQuery::create()->findPK($this->id);
if ($pl === NULL)
return FALSE;
return $pl->getDbDescription();
}
/**
* Set state of virtual playlist
*