From 7049b3bf4d30c5a7388d62c6ab1b5c2d18b6d14d Mon Sep 17 00:00:00 2001 From: Daku Date: Fri, 20 Jan 2012 23:04:28 +0000 Subject: [PATCH] rating/source/locked now log info when set --- contrib/rating/main.php | 1 + core/imageboard.pack.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/contrib/rating/main.php b/contrib/rating/main.php index f456fdf3..31db9a56 100644 --- a/contrib/rating/main.php +++ b/contrib/rating/main.php @@ -208,6 +208,7 @@ class Ratings implements Extension { private function set_rating($image_id, $rating) { global $database; $database->Execute("UPDATE images SET rating=? WHERE id=?", array($rating, $image_id)); + log_info("core-image", "Rating for Image #{$image_id} set to: ".$this->theme->rating_to_name($rating)); } } add_event_listener(new Ratings()); diff --git a/core/imageboard.pack.php b/core/imageboard.pack.php index 70e0d9fb..31ff6340 100644 --- a/core/imageboard.pack.php +++ b/core/imageboard.pack.php @@ -372,6 +372,7 @@ class Image { global $database; if(empty($source)) $source = null; $database->execute("UPDATE images SET source=:source WHERE id=:id", array("source"=>$source, "id"=>$this->id)); + log_info("core-image", "Source for Image #{$this->id} set to: ".$source); } @@ -385,6 +386,7 @@ class Image { $sln = str_replace("'", "", $sln); $sln = str_replace('"', "", $sln); $database->execute("UPDATE images SET locked=:yn WHERE id=:id", array("yn"=>$sln, "id"=>$this->id)); + log_info("core-image", "Locked status of Image #{$this->id} set to: ".$sln); } /**