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" );
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)
);
$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'),
$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';
$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.';
$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';
$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]';
$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';
<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" />
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;
}
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;
}
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;
}
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;
}