forked from Cavemanon/cavepaintings
Merge branch 'image2post'
This commit is contained in:
@ -396,7 +396,7 @@ class Image
|
||||
SET owner_id=:owner_id
|
||||
WHERE id=:id
|
||||
", ["owner_id"=>$owner->id, "id"=>$this->id]);
|
||||
log_info("core_image", "Owner for Image #{$this->id} set to {$owner->name}");
|
||||
log_info("core_image", "Owner for Post #{$this->id} set to {$owner->name}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -648,7 +648,7 @@ class Image
|
||||
}
|
||||
if ($new_source != $old_source) {
|
||||
$database->execute("UPDATE images SET source=:source WHERE id=:id", ["source"=>$new_source, "id"=>$this->id]);
|
||||
log_info("core_image", "Source for Image #{$this->id} set to: $new_source (was $old_source)");
|
||||
log_info("core_image", "Source for Post #{$this->id} set to: $new_source (was $old_source)");
|
||||
}
|
||||
}
|
||||
|
||||
@ -665,7 +665,7 @@ class Image
|
||||
global $database;
|
||||
if ($locked !== $this->locked) {
|
||||
$database->execute("UPDATE images SET locked=:yn WHERE id=:id", ["yn"=>$locked, "id"=>$this->id]);
|
||||
log_info("core_image", "Setting Image #{$this->id} lock to: $locked");
|
||||
log_info("core_image", "Setting Post #{$this->id} lock to: $locked");
|
||||
}
|
||||
}
|
||||
|
||||
@ -782,7 +782,7 @@ class Image
|
||||
);
|
||||
}
|
||||
|
||||
log_info("core_image", "Tags for Image #{$this->id} set to: ".Tag::implode($tags));
|
||||
log_info("core_image", "Tags for Post #{$this->id} set to: ".Tag::implode($tags));
|
||||
$cache->delete("image-{$this->id}-tags");
|
||||
}
|
||||
}
|
||||
@ -795,7 +795,7 @@ class Image
|
||||
global $database;
|
||||
$this->delete_tags_from_image();
|
||||
$database->execute("DELETE FROM images WHERE id=:id", ["id"=>$this->id]);
|
||||
log_info("core_image", 'Deleted Image #'.$this->id.' ('.$this->hash.')');
|
||||
log_info("core_image", 'Deleted Post #'.$this->id.' ('.$this->hash.')');
|
||||
|
||||
unlink($this->get_image_filename());
|
||||
unlink($this->get_thumb_filename());
|
||||
@ -807,7 +807,7 @@ class Image
|
||||
*/
|
||||
public function remove_image_only(): void
|
||||
{
|
||||
log_info("core_image", 'Removed Image File ('.$this->hash.')');
|
||||
log_info("core_image", 'Removed Post File ('.$this->hash.')');
|
||||
@unlink($this->get_image_filename());
|
||||
@unlink($this->get_thumb_filename());
|
||||
}
|
||||
|
Reference in New Issue
Block a user