Image::locked should always be a boolean

This commit is contained in:
Shish 2012-03-10 18:53:42 +00:00
parent 82414b279d
commit a6dbe3b7f2

View file

@ -56,6 +56,7 @@ class Image {
$this->$name = $value; // hax
}
$this->posted_timestamp = strtotime($this->posted); // pray
$this->locked = undb_bool($this->locked);
assert(is_numeric($this->id));
assert(is_numeric($this->height));
@ -411,8 +412,9 @@ class Image {
* @retval bool
*/
public function is_locked() {
return ($this->locked === true || $this->locked == "Y" || $this->locked == "t");
return $this->locked;
}
public function set_locked($tf) {
global $database;
$ln = $tf ? "Y" : "N";