diff --git a/assets/js/modules/album.js b/assets/js/modules/album.js index 4e41375..b61efc6 100644 --- a/assets/js/modules/album.js +++ b/assets/js/modules/album.js @@ -117,7 +117,7 @@ album = { }], ["Cancel", function() {}] ]; - modal.show("New Album", "Please enter a title for this album: ", buttons); + modal.show("New Album", "Please enter a title for this album: ", buttons); }, @@ -232,8 +232,8 @@ album = { ["Cancel", function() {}] ]; - if (albumIDs.length===1) modal.show("Set Title", "Please enter a new title for this album: ", buttons); - else modal.show("Set Titles", "Please enter a title for all " + albumIDs.length + " selected album: ", buttons); + if (albumIDs.length===1) modal.show("Set Title", "Please enter a new title for this album: ", buttons); + else modal.show("Set Titles", "Please enter a title for all " + albumIDs.length + " selected album: ", buttons); }, @@ -249,7 +249,7 @@ album = { description = $(".message input.text").val(); - if (description.length<800) { + if (description.length<801) { if (visible.album()) { album.json.description = description; @@ -268,7 +268,7 @@ album = { }], ["Cancel", function() {}] ]; - modal.show("Set Description", "Please enter a description for this album: ", buttons); + modal.show("Set Description", "Please enter a description for this album: ", buttons); }, diff --git a/assets/js/modules/photo.js b/assets/js/modules/photo.js index 8673f38..ab4351d 100644 --- a/assets/js/modules/photo.js +++ b/assets/js/modules/photo.js @@ -171,8 +171,8 @@ photo = { ["Cancel", function() {}] ]; - if (photoIDs.length===1) modal.show("Set Title", "Please enter a new title for this photo: ", buttons); - else modal.show("Set Titles", "Please enter a title for all " + photoIDs.length + " selected photos: ", buttons); + if (photoIDs.length===1) modal.show("Set Title", "Please enter a new title for this photo: ", buttons); + else modal.show("Set Titles", "Please enter a title for all " + photoIDs.length + " selected photos: ", buttons); }, @@ -299,7 +299,7 @@ photo = { }], ["Cancel", function() {}] ]; - modal.show("Set Description", "Please enter a description for this photo: ", buttons); + modal.show("Set Description", "Please enter a description for this photo: ", buttons); }, @@ -322,7 +322,7 @@ photo = { }], ["Cancel", function() {}] ]; - modal.show("Set Tags", "Please enter your tags for this photo. You can add multiple tags by separating them with a comma: ", buttons); + modal.show("Set Tags", "Please enter your tags for this photo. You can add multiple tags by separating them with a comma: ", buttons); }, diff --git a/php/modules/album.php b/php/modules/album.php index f4cff60..57d3240 100755 --- a/php/modules/album.php +++ b/php/modules/album.php @@ -13,7 +13,7 @@ function addAlbum($title) { global $database; - if (strlen($title)<1||strlen($title)>30) return false; + if (strlen($title)<1||strlen($title)>50) return false; $sysdate = date("d.m.Y"); $result = $database->query("INSERT INTO lychee_albums (title, sysdate) VALUES ('$title', '$sysdate');"); @@ -193,7 +193,7 @@ function setAlbumTitle($albumIDs, $title) { global $database; - if (strlen($title)<1||strlen($title)>30) return false; + if (strlen($title)<1||strlen($title)>50) return false; $result = $database->query("UPDATE lychee_albums SET title = '$title' WHERE id IN ($albumIDs);"); if (!$result) return false; @@ -206,7 +206,7 @@ function setAlbumDescription($albumID, $description) { global $database; $description = htmlentities($description); - if (strlen($description)>800) return false; + if (strlen($description)>1000) return false; $result = $database->query("UPDATE lychee_albums SET description = '$description' WHERE id = '$albumID';"); if (!$result) return false; diff --git a/php/modules/photo.php b/php/modules/photo.php index 40f4d2a..566c98b 100755 --- a/php/modules/photo.php +++ b/php/modules/photo.php @@ -108,7 +108,7 @@ function setPhotoTitle($photoIDs, $title) { global $database; - if (strlen($title)>30) return false; + if (strlen($title)>50) return false; $result = $database->query("UPDATE lychee_photos SET title = '$title' WHERE id IN ($photoIDs);"); if (!$result) return false; @@ -121,7 +121,7 @@ function setPhotoDescription($photoID, $description) { global $database; $description = htmlentities($description); - if (strlen($description)>800) return false; + if (strlen($description)>1000) return false; $result = $database->query("UPDATE lychee_photos SET description = '$description' WHERE id = '$photoID';"); if (!$result) return false; diff --git a/php/modules/tags.php b/php/modules/tags.php index d5887ed..129225e 100644 --- a/php/modules/tags.php +++ b/php/modules/tags.php @@ -27,6 +27,8 @@ function setTags($photoIDs, $tags) { // Parse tags $tags = preg_replace('/(\ ,\ )|(\ ,)|(,\ )|(,{1,}\ {0,})|(,$|^,)/', ',', $tags); $tags = preg_replace('/,$|^,/', ',', $tags); + + if (strlen($tags)>1000) return false; $result = $database->query("UPDATE lychee_photos SET tags = '$tags' WHERE id IN ($photoIDs);");