Created function File->setTitle(str)

This commit is contained in:
Mikael Nordfeldth 2016-07-23 21:00:57 +02:00
parent 1b3d583418
commit d84bf83419

View File

@ -693,6 +693,13 @@ class File extends Managed_DataObject
return $title ?: null; return $title ?: null;
} }
public function setTitle($title)
{
$orig = clone($this);
$this->title = mb_strlen($title) > 0 ? $title : null;
return $this->update($orig);
}
static public function hashurl($url) static public function hashurl($url)
{ {
if (empty($url)) { if (empty($url)) {