prohibit some photo album edit operations until we figure out how to sync them with dav
This commit is contained in:
parent
880dec5a4e
commit
1b0cb9388c
@ -107,11 +107,16 @@ function photos_post(&$a) {
|
|||||||
|
|
||||||
$newalbum = notags(trim($_REQUEST['albumname']));
|
$newalbum = notags(trim($_REQUEST['albumname']));
|
||||||
if($newalbum != $album) {
|
if($newalbum != $album) {
|
||||||
$x = photos_album_rename($page_owner_uid,$album,$newalbum);
|
|
||||||
if($x) {
|
// @fixme - syncronise with DAV or disallow completely
|
||||||
$newurl = str_replace(bin2hex($album),bin2hex($newalbum),$_SESSION['photo_return']);
|
|
||||||
goaway($a->get_baseurl() . '/' . $newurl);
|
goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
|
||||||
}
|
|
||||||
|
// $x = photos_album_rename($page_owner_uid,$album,$newalbum);
|
||||||
|
// if($x) {
|
||||||
|
// $newurl = str_replace(bin2hex($album),bin2hex($newalbum),$_SESSION['photo_return']);
|
||||||
|
// goaway($a->get_baseurl() . '/' . $newurl);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -568,10 +573,12 @@ function photos_content(&$a) {
|
|||||||
|
|
||||||
$albums = ((array_key_exists('albums', $a->data)) ? $a->data['albums'] : photos_albums_list($a->data['channel'],$a->data['observer']));
|
$albums = ((array_key_exists('albums', $a->data)) ? $a->data['albums'] : photos_albums_list($a->data['channel'],$a->data['observer']));
|
||||||
|
|
||||||
$def_album = get_pconfig($a->data['channel']['channel_id'],'system','photo_path');
|
if(! $selname) {
|
||||||
if($def_album) {
|
$def_album = get_pconfig($a->data['channel']['channel_id'],'system','photo_path');
|
||||||
$selname = filepath_macro($def_album);
|
if($def_album) {
|
||||||
$albums['album'][] = array('text' => $selname);
|
$selname = filepath_macro($def_album);
|
||||||
|
$albums['album'][] = array('text' => $selname);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl = get_markup_template('photos_upload.tpl');
|
$tpl = get_markup_template('photos_upload.tpl');
|
||||||
@ -662,17 +669,21 @@ function photos_content(&$a) {
|
|||||||
$album_e = $album;
|
$album_e = $album;
|
||||||
}
|
}
|
||||||
$albums = ((array_key_exists('albums', $a->data)) ? $a->data['albums'] : photos_albums_list($a->data['channel'],$a->data['observer']));
|
$albums = ((array_key_exists('albums', $a->data)) ? $a->data['albums'] : photos_albums_list($a->data['channel'],$a->data['observer']));
|
||||||
$edit_tpl = get_markup_template('album_edit.tpl');
|
|
||||||
$album_edit = replace_macros($edit_tpl,array(
|
// @fixme - syncronise actions with DAV
|
||||||
'$nametext' => t('Enter a new album name'),
|
|
||||||
'$name_placeholder' => t('or select an existing one (doubleclick)'),
|
// $edit_tpl = get_markup_template('album_edit.tpl');
|
||||||
'$nickname' => $a->data['channel']['channel_address'],
|
// $album_edit = replace_macros($edit_tpl,array(
|
||||||
'$album' => $album_e,
|
// '$nametext' => t('Enter a new album name'),
|
||||||
'$albums' => $albums['albums'],
|
// '$name_placeholder' => t('or select an existing one (doubleclick)'),
|
||||||
'$hexalbum' => bin2hex($album),
|
// '$nickname' => $a->data['channel']['channel_address'],
|
||||||
'$submit' => t('Submit'),
|
// '$album' => $album_e,
|
||||||
'$dropsubmit' => t('Delete Album')
|
// '$albums' => $albums['albums'],
|
||||||
));
|
// '$hexalbum' => bin2hex($album),
|
||||||
|
// '$submit' => t('Submit'),
|
||||||
|
// '$dropsubmit' => t('Delete Album')
|
||||||
|
// ));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user