forked from Cavemanon/cavepaintings
Move image uploader info into the image info editor, make it editable
This commit is contained in:
@@ -236,6 +236,17 @@ class Image {
|
||||
return User::by_id($this->owner_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the image's owner
|
||||
*/
|
||||
public function set_owner(User $owner) {
|
||||
global $database;
|
||||
if($owner->id != $this->owner_id) {
|
||||
$database->execute("UPDATE images SET owner_id=:owner_id WHERE id=:id", array("owner_id"=>$owner->id, "id"=>$this->id));
|
||||
log_info("core-image", "Owner for Image #{$this->id} set to: ".$owner->username);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get this image's tags as an array
|
||||
*/
|
||||
|
Reference in New Issue
Block a user