aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-10-27 16:20:59 -0700
committerfriendica <info@friendica.com>2014-10-27 16:20:59 -0700
commit1b53d1c1d32072c71451cfd1a49b89ecfcd8b615 (patch)
treee3b4b241db991403bc8b057f29f88729ad163c47 /mod
parent583b445bc02c988e808742b16196e0d80391b3cc (diff)
parentd192bcad65852bb9225a368d1bf42b8918ae6022 (diff)
downloadvolse-hubzilla-1b53d1c1d32072c71451cfd1a49b89ecfcd8b615.tar.gz
volse-hubzilla-1b53d1c1d32072c71451cfd1a49b89ecfcd8b615.tar.bz2
volse-hubzilla-1b53d1c1d32072c71451cfd1a49b89ecfcd8b615.zip
Merge https://github.com/friendica/red into pending_merge
Diffstat (limited to 'mod')
-rw-r--r--mod/photos.php48
1 files changed, 21 insertions, 27 deletions
diff --git a/mod/photos.php b/mod/photos.php
index cc0a963de..26a2bf50b 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -661,33 +661,25 @@ function photos_content(&$a) {
intval($a->pager['itemspage'])
);
- if($cmd === 'edit') {
- if(($album !== t('Profile Photos')) && ($album !== 'Profile Photos') && ($album !== 'Contact Photos') && ($album !== t('Contact Photos'))) {
- if($can_post) {
- if($a->get_template_engine() === 'internal') {
- $album_e = template_escape($album);
- }
- else {
- $album_e = $album;
- }
-
- $edit_tpl = get_markup_template('album_edit.tpl');
- $o .= replace_macros($edit_tpl,array(
- '$nametext' => t('New album name: '),
- '$nickname' => $a->data['channel']['channel_address'],
- '$album' => $album_e,
- '$hexalbum' => bin2hex($album),
- '$submit' => t('Submit'),
- '$dropsubmit' => t('Delete Album')
- ));
+ //edit album name
+ $album_edit = null;
+ if(($album !== t('Profile Photos')) && ($album !== 'Profile Photos') && ($album !== 'Contact Photos') && ($album !== t('Contact Photos'))) {
+ if($can_post) {
+ if($a->get_template_engine() === 'internal') {
+ $album_e = template_escape($album);
}
- }
- }
- else {
- if(($album !== t('Profile Photos')) && ($album !== 'Profile Photos') && ($album !== 'Contact Photos') && ($album !== t('Contact Photos'))) {
- if($can_post) {
- $edit = array(t('Edit Album'), $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex($album) . '/edit');
- }
+ else {
+ $album_e = $album;
+ }
+ $edit_tpl = get_markup_template('album_edit.tpl');
+ $album_edit = replace_macros($edit_tpl,array(
+ '$nametext' => t('New album name: '),
+ '$nickname' => $a->data['channel']['channel_address'],
+ '$album' => $album_e,
+ '$hexalbum' => bin2hex($album),
+ '$submit' => t('Submit'),
+ '$dropsubmit' => t('Delete Album')
+ ));
}
}
@@ -727,6 +719,7 @@ function photos_content(&$a) {
'desc'=> $desc_e,
'ext' => $ext,
'hash'=> $rr['resource_id'],
+ 'unknown' => t('Unknown')
);
}
}
@@ -749,10 +742,11 @@ function photos_content(&$a) {
$o .= replace_macros($tpl, array(
'$photos' => $photos,
'$album' => $album,
+ '$album_edit' => array(t('Edit Album'), $album_edit),
'$can_post' => $can_post,
'$upload' => array(t('Upload'), $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/upload/' . bin2hex($album)),
'$order' => $order,
- '$edit' => $edit
+
));
}