aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-03 15:13:38 -0800
committerFriendika <info@friendika.com>2011-02-03 15:13:38 -0800
commite2c8bedfe57501f0ac15b09c053f603ea99344d6 (patch)
treed3076c3374007b68cedca6ff0d2d369adbc1eeea
parent01cd7cc9f2d811889cebcd410000b03742ded176 (diff)
downloadvolse-hubzilla-e2c8bedfe57501f0ac15b09c053f603ea99344d6.tar.gz
volse-hubzilla-e2c8bedfe57501f0ac15b09c053f603ea99344d6.tar.bz2
volse-hubzilla-e2c8bedfe57501f0ac15b09c053f603ea99344d6.zip
allow changing album name in photo edit page
-rw-r--r--boot.php2
-rw-r--r--mod/photos.php20
-rw-r--r--util/strings.php4
-rw-r--r--view/de/strings.php1
-rw-r--r--view/fr/strings.php1
-rw-r--r--view/it/strings.php1
-rw-r--r--view/photo_edit.tpl6
-rw-r--r--view/theme/default/style.css6
-rw-r--r--view/theme/duepuntozero/style.css6
9 files changed, 34 insertions, 13 deletions
diff --git a/boot.php b/boot.php
index 0dd507168..4fc05f81a 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', "<br />\r\n" );
diff --git a/mod/photos.php b/mod/photos.php
index 82060378e..f892e2ce2 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 3b12c0e54..762c68d2b 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 887b43394..f59dcf63b 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 c64bba1b7..39e15eccf 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 aa5359dbf..6ae9285ad 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 a40e3fef6..bf8563b3c 100644
--- a/view/photo_edit.tpl
+++ b/view/photo_edit.tpl
@@ -3,6 +3,12 @@
<input type="hidden" name="item_id" value="$item_id" />
+ <label id="photo-edit-albumname-label" for="photo-edit-albumname">$newalbum</label>
+ <input id="photo-edit-albumname" type="text" size="32" name="albname" value="$album" />
+
+ <div id="photo-edit-albumname-end"></div>
+
+
<label id="photo-edit-caption-label" for="photo-edit-caption">$capt_label</label>
<input id="photo-edit-caption" type="text" size="84" name="desc" value="$caption" />
diff --git a/view/theme/default/style.css b/view/theme/default/style.css
index a60ea9db6..61782f6e3 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 d27a894b7..a1098f6a4 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;
}