Image::locked should always be a boolean
This commit is contained in:
parent
82414b279d
commit
a6dbe3b7f2
1 changed files with 3 additions and 1 deletions
|
@ -56,6 +56,7 @@ class Image {
|
||||||
$this->$name = $value; // hax
|
$this->$name = $value; // hax
|
||||||
}
|
}
|
||||||
$this->posted_timestamp = strtotime($this->posted); // pray
|
$this->posted_timestamp = strtotime($this->posted); // pray
|
||||||
|
$this->locked = undb_bool($this->locked);
|
||||||
|
|
||||||
assert(is_numeric($this->id));
|
assert(is_numeric($this->id));
|
||||||
assert(is_numeric($this->height));
|
assert(is_numeric($this->height));
|
||||||
|
@ -411,8 +412,9 @@ class Image {
|
||||||
* @retval bool
|
* @retval bool
|
||||||
*/
|
*/
|
||||||
public function is_locked() {
|
public function is_locked() {
|
||||||
return ($this->locked === true || $this->locked == "Y" || $this->locked == "t");
|
return $this->locked;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function set_locked($tf) {
|
public function set_locked($tf) {
|
||||||
global $database;
|
global $database;
|
||||||
$ln = $tf ? "Y" : "N";
|
$ln = $tf ? "Y" : "N";
|
||||||
|
|
Reference in a new issue