From 0ce9aa02a2f30da908e0984971cf5f6398786b26 Mon Sep 17 00:00:00 2001
From: Shish <shish@shishnet.org>
Date: Thu, 8 Mar 2012 01:27:59 +0000
Subject: [PATCH] 'false' == true. Convert the first param from DB value to
 real bool, and also use triple equals

---
 core/imageboard.pack.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/imageboard.pack.php b/core/imageboard.pack.php
index c9ad7633..5ec46ef4 100644
--- a/core/imageboard.pack.php
+++ b/core/imageboard.pack.php
@@ -419,7 +419,7 @@ class Image {
 		$sln = $database->engine->scoreql_to_sql('SCORE_BOOL_'.$ln);
 		$sln = str_replace("'", "", $sln);
 		$sln = str_replace('"', "", $sln);
-		if($sln != $this->locked) {
+		if(undb_bool($sln) !== $this->locked) {
 			$database->execute("UPDATE images SET locked=:yn WHERE id=:id", array("yn"=>$sln, "id"=>$this->id));
 			log_info("core-image", "Setting Image #{$this->id} lock to: $ln");
 		}