if (strlen($description)>1000) $description = substr($description, 0, 1000);
# Execute query
$query = Database::prepare($this->database, "UPDATE ? SET description = '?' WHERE id IN (?)", array(LYCHEE_TABLE_ALBUMS, $description, $this->albumIDs));
if (strlen($description)>1000) $description = substr($description, 0, 1000);
# Set description
$query = Database::prepare($this->database, "UPDATE ? SET description = '?' WHERE id IN ('?')", array(LYCHEE_TABLE_PHOTOS, $description, $this->photoIDs));
$result = $this->database->query($query);
@ -1122,10 +1115,6 @@ class Photo extends Module {
msg=`<p>Are you sure you want to delete the album ${albumTitle} and all of the photos it contains? This action can't be undone!</p>`
msg=lychee.html`<p>Are you sure you want to delete the album '$${albumTitle}' and all of the photos it contains? This action can't be undone!</p>`
}else{
action.title='Delete Albums and Photos'
cancel.title='Keep Albums'
msg=`<p>Are you sure you want to delete all ${albumIDs.length} selected albums and all of the photos they contain? This action can't be undone!</p>`
msg=lychee.html`<p>Are you sure you want to delete all $${albumIDs.length} selected albums and all of the photos they contain? This action can't be undone!</p>`
body:`<p>Please enter a description for this album: <input class='text' name='description' type='text' maxlength='800' placeholder='Description' value='${lychee.escapeHTML(oldDescription)}'></p>`,
body:lychee.html`<p>Please enter a description for this album: <input class='text' name='description' type='text' maxlength='800' placeholder='Description' value='$${ oldDescription }'></p>`,
body:`<p>Enter a description for this photo: <input class='text' name='description' type='text' maxlength='800' placeholder='Description' value='${lychee.escapeHTML(oldDescription)}'></p>`,
body:lychee.html`<p>Enter a description for this photo: <input class='text' name='description' type='text' maxlength='800' placeholder='Description' value='$${ oldDescription }'></p>`,
if(photoIDs.length===1)msg=`<p>Enter your tags for this photo. You can add multiple tags by separating them with a comma: ${input}</p>`
elsemsg=`<p>Enter your tags for all ${photoIDs.length} selected photos. Existing tags will be overwritten. You can add multiple tags by separating them with a comma: ${input}</p>`
if(photoIDs.length===1)msg=lychee.html`<p>Enter your tags for this photo. You can add multiple tags by separating them with a comma: ${input}</p>`
elsemsg=lychee.html`<p>Enter your tags for all $${photoIDs.length} selected photos. Existing tags will be overwritten. You can add multiple tags by separating them with a comma: ${input}</p>`
body:`<p>Please enter the direct link to a photo to import it: <input class='text' name='link' type='text' placeholder='http://' value='${url}'></p>`,
body:lychee.html`<p>Please enter the direct link to a photo to import it: <input class='text' name='link' type='text' placeholder='http://' value='$${url}'></p>`,
buttons:{
action:{
title:'Import',
@ -444,7 +444,7 @@ upload.start = {
}
basicModal.show({
body:`<p>This action will import all photos, folders and sub-folders which are located in the following directory. The <b>original files will be deleted</b> after the import when possible. <input class='text' name='path' type='text' maxlength='100' placeholder='Absolute path to directory' value='${lychee.location}uploads/import/'></p>`,
body:lychee.html`<p>This action will import all photos, folders and sub-folders which are located in the following directory. The <b>original files will be deleted</b> after the import when possible. <input class='text' name='path' type='text' maxlength='100' placeholder='Absolute path to directory' value='$${lychee.location}uploads/import/'></p>`,