forked from Cavemanon/cavepaintings
Added a database upgrade that adds a tag_id,image_id index to image_tags, and lengthens the filename field to 255 characters. 64 was ridiculous.
Also added a substr to the filename for the merge code so it won't error when it's a long name
This commit is contained in:
@ -224,7 +224,7 @@ class ImageIO extends Extension
|
||||
:hash, :ext, :width, :height, now(), :source
|
||||
)",
|
||||
[
|
||||
"owner_id"=>$user->id, "owner_ip"=>$_SERVER['REMOTE_ADDR'], "filename"=>substr($image->filename, 0, 60), "filesize"=>$image->filesize,
|
||||
"owner_id" => $user->id, "owner_ip" => $_SERVER['REMOTE_ADDR'], "filename" => substr($image->filename, 0, 255), "filesize" => $image->filesize,
|
||||
"hash"=>$image->hash, "ext"=>strtolower($image->ext), "width"=>$image->width, "height"=>$image->height, "source"=>$image->source
|
||||
]
|
||||
);
|
||||
@ -342,7 +342,7 @@ class ImageIO extends Extension
|
||||
id = :id
|
||||
",
|
||||
[
|
||||
"filename"=>$image->filename, "filesize"=>$image->filesize, "hash"=>$image->hash,
|
||||
"filename" => substr($image->filename, 0, 255), "filesize"=>$image->filesize, "hash"=>$image->hash,
|
||||
"ext"=>strtolower($image->ext), "width"=>$image->width, "height"=>$image->height, "source"=>$image->source,
|
||||
"id"=>$id
|
||||
]
|
||||
|
Reference in New Issue
Block a user