diff --git a/boot.php b/boot.php index 0dd5071685..4fc05f81a3 100644 --- a/boot.php +++ b/boot.php @@ -3,7 +3,7 @@ set_time_limit(0); define ( 'BUILD_ID', 1034 ); -define ( 'FRIENDIKA_VERSION', '2.10.0903' ); +define ( 'FRIENDIKA_VERSION', '2.10.0904' ); define ( 'DFRN_PROTOCOL_VERSION', '2.1' ); define ( 'EOL', "
\r\n" ); diff --git a/mod/photos.php b/mod/photos.php index 82060378e6..f892e2ce28 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -244,20 +244,26 @@ foreach($_FILES AS $key => $val) { return; // NOTREACHED } - if(($a->argc > 2) && ((x($_POST,'desc') !== false) || (x($_POST,'newtag') !== false))) { + if(($a->argc > 2) && ((x($_POST,'desc') !== false) || (x($_POST,'newtag') !== false)) || (x($_POST,'albname') !== false)) { - $desc = ((x($_POST,'desc')) ? notags(trim($_POST['desc'])) : ''); - $rawtags = ((x($_POST,'newtag')) ? notags(trim($_POST['newtag'])) : ''); - $item_id = ((x($_POST,'item_id')) ? intval($_POST['item_id']) : 0); + $desc = ((x($_POST,'desc')) ? notags(trim($_POST['desc'])) : ''); + $rawtags = ((x($_POST,'newtag')) ? notags(trim($_POST['newtag'])) : ''); + $item_id = ((x($_POST,'item_id')) ? intval($_POST['item_id']) : 0); + $albname = ((x($_POST,'albname')) ? notags(trim($_POST['albname'])) : ''); $resource_id = $a->argv[2]; + if(! strlen($albname)) + $albname = datetime_convert('UTC',date_default_timezone_get(),'now', 'Y'); + + $p = q("SELECT * FROM `photo` WHERE `resource-id` = '%s' AND `uid` = %d ORDER BY `scale` DESC", dbesc($resource_id), intval($page_owner_uid) ); - if((count($p)) && ($p[0]['desc'] !== $desc)) { - $r = q("UPDATE `photo` SET `desc` = '%s' WHERE `resource-id` = '%s' AND `uid` = %d", + if((count($p)) && (($p[0]['desc'] !== $desc) || ($p[0]['album'] !== $albname))) { + $r = q("UPDATE `photo` SET `desc` = '%s', `album` = '%s' WHERE `resource-id` = '%s' AND `uid` = %d", dbesc($desc), + dbesc($albname), dbesc($resource_id), intval($page_owner_uid) ); @@ -989,6 +995,8 @@ function photos_content(&$a) { $edit_tpl = load_view_file('view/photo_edit.tpl'); $o .= replace_macros($edit_tpl, array( '$id' => $ph[0]['id'], + '$album' => $ph[0]['album'], + '$newalbum' => t('New album name'), '$nickname' => $a->data['user']['nickname'], '$resource_id' => $ph[0]['resource-id'], '$capt_label' => t('Caption'), diff --git a/util/strings.php b/util/strings.php index 3b12c0e548..762c68d2bb 100644 --- a/util/strings.php +++ b/util/strings.php @@ -303,6 +303,7 @@ $a->strings['Edit photo'] = 'Edit photo'; $a->strings['View Full Size'] = 'View Full Size'; $a->strings['Tags: '] = 'Tags: '; $a->strings['[Remove any tag]'] = '[Remove any tag]'; +$a->strings['New album name'] = 'New album name'; $a->strings['Caption'] = 'Caption'; $a->strings['Add a Tag'] = 'Add a Tag'; $a->strings['Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'] = 'Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'; @@ -355,6 +356,9 @@ $a->strings['Register'] = 'Register'; $a->strings['Please login.'] = 'Please login.'; $a->strings['Registration revoked for '] = 'Registration revoked for '; $a->strings['Account approved.'] = 'Account approved.'; +$a->strings['Remove My Account'] = 'Remove My Account'; +$a->strings['This will completely remove your account. Once this has been done it is not recoverable.'] = 'This will completely remove your account. Once this has been done it is not recoverable.'; +$a->strings['Please enter your password for verification:'] = 'Please enter your password for verification:'; $a->strings['Passwords do not match. Password unchanged.'] = 'Passwords do not match. Password unchanged.'; $a->strings['Empty passwords are not allowed. Password unchanged.'] = 'Empty passwords are not allowed. Password unchanged.'; $a->strings['Password changed.'] = 'Password changed.'; diff --git a/view/de/strings.php b/view/de/strings.php index 887b43394d..f59dcf63b9 100644 --- a/view/de/strings.php +++ b/view/de/strings.php @@ -303,6 +303,7 @@ $a->strings['Edit photo'] = 'Foto bearbeiten'; $a->strings['View Full Size'] = 'Betrachte Originalgröße'; $a->strings['Tags: '] = 'Tags: '; $a->strings['[Remove any tag]'] = '[Tag entfernen]'; +$a->strings['New album name'] = 'Name des neuen Albums'; $a->strings['Caption'] = 'Titel'; $a->strings['Add a Tag'] = 'Tag hinzufügen'; $a->strings['Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'] = 'Beispiel: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'; diff --git a/view/fr/strings.php b/view/fr/strings.php index c64bba1b7a..39e15eccfa 100644 --- a/view/fr/strings.php +++ b/view/fr/strings.php @@ -293,6 +293,7 @@ $a->strings['Edit Album'] = 'Éditer l\'album'; $a->strings['View Photo'] = 'Voir la photo'; $a->strings['Photo not available'] = 'Photo indisponible'; $a->strings['Edit photo'] = 'Éditer la photo'; +$a->strings['New album name] = 'Nom du nuovel album'; $a->strings['View Full Size'] = 'Voir en taille réelle'; $a->strings['Tags: '] = 'Étiquettes: '; $a->strings['[Remove any tag]'] = '[Retirer toutes les étiquettes]'; diff --git a/view/it/strings.php b/view/it/strings.php index aa5359dbff..6ae9285add 100644 --- a/view/it/strings.php +++ b/view/it/strings.php @@ -270,6 +270,7 @@ $a->strings['Edit photo'] = 'Modifica foto'; $a->strings['View Full Size'] = 'Vedi dimensione intera'; $a->strings['Tags: '] = 'Tag: '; $a->strings['[Remove any tag]'] = '[Rimuovi tutti i tag]'; +$a->strings['New album name'] = 'Nome nuovo album'; $a->strings['Caption'] = 'Didascalia'; $a->strings['Add a Tag'] = 'Aggiungi un tag'; $a->strings['Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'] = 'Esempio: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'; diff --git a/view/photo_edit.tpl b/view/photo_edit.tpl index a40e3fef60..bf8563b3c2 100644 --- a/view/photo_edit.tpl +++ b/view/photo_edit.tpl @@ -3,6 +3,12 @@ + + + +
+ + diff --git a/view/theme/default/style.css b/view/theme/default/style.css index a60ea9db6d..61782f6e37 100644 --- a/view/theme/default/style.css +++ b/view/theme/default/style.css @@ -1798,11 +1798,11 @@ a.mail-list-link { margin-bottom: 15px; } -#photo-edit-caption-label, #photo-edit-tags-label { +#photo-edit-caption-label, #photo-edit-tags-label, #photo-edit-albumname-label { float: left; width: 150px; } -#photo-edit-caption, #photo-edit-newtag { +#photo-edit-caption, #photo-edit-newtag, #photo-edit-albumname { float: left; margin-bottom: 25px; } @@ -1813,7 +1813,7 @@ a.mail-list-link { margin-bottom: 25px; } -#photo-edit-caption-end, #photo-edit-tags-end { +#photo-edit-caption-end, #photo-edit-tags-end, #photo-edit-albumname-end { clear: both; } diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index d27a894b76..a1098f6a46 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -1673,11 +1673,11 @@ a.mail-list-link { margin-bottom: 15px; } -#photo-edit-caption-label, #photo-edit-tags-label { +#photo-edit-caption-label, #photo-edit-tags-label, #photo-edit-albumname-label { float: left; width: 150px; } -#photo-edit-caption, #photo-edit-newtag { +#photo-edit-caption, #photo-edit-newtag, #photo-edit-albumname { float: left; margin-bottom: 25px; } @@ -1688,7 +1688,7 @@ a.mail-list-link { margin-bottom: 25px; } -#photo-edit-caption-end, #photo-edit-tags-end { +#photo-edit-caption-end, #photo-edit-tags-end, #photo-edit-albumname-end { clear: both; }