From a6dbe3b7f26ef1466c56d751cfe0d92b4844353a Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 10 Mar 2012 18:53:42 +0000 Subject: [PATCH] Image::locked should always be a boolean --- core/imageboard.pack.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/imageboard.pack.php b/core/imageboard.pack.php index 5ec46ef4..f7e27121 100644 --- a/core/imageboard.pack.php +++ b/core/imageboard.pack.php @@ -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";