aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authormarijus <mario@mariovavti.com>2014-10-31 20:25:43 +0100
committermarijus <mario@mariovavti.com>2014-10-31 20:25:43 +0100
commit5d151b988605bc5aedbef65b687a43dedbc574e9 (patch)
treed8b16f708c5a11ac143f38c40e24b29aa5d8a448 /mod/photos.php
parent5d1bb1b6854b4601eedaa9d39a40832b29d434e5 (diff)
downloadvolse-hubzilla-5d151b988605bc5aedbef65b687a43dedbc574e9.tar.gz
volse-hubzilla-5d151b988605bc5aedbef65b687a43dedbc574e9.tar.bz2
volse-hubzilla-5d151b988605bc5aedbef65b687a43dedbc574e9.zip
do not reload page for photo upload
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php20
1 files changed, 8 insertions, 12 deletions
diff --git a/mod/photos.php b/mod/photos.php
index a0f11860d..d1f2b4993 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -476,11 +476,9 @@ function photos_content(&$a) {
if(argc() > 3) {
$datatype = argv(2);
$datum = argv(3);
- }
- elseif((argc() > 2) && (argv(2) === 'upload'))
- $datatype = 'upload';
- else
+ } else {
$datatype = 'summary';
+ }
if(argc() > 4)
$cmd = argv(4);
@@ -528,11 +526,7 @@ function photos_content(&$a) {
* Display upload form
*/
- if($datatype === 'upload') {
- if(! ($can_post)) {
- notice( t('Permission denied.'));
- return;
- }
+ if( $can_post) {
$uploader = '';
@@ -575,7 +569,7 @@ function photos_content(&$a) {
$albums = ((array_key_exists('albums', $a->data)) ? $a->data['albums'] : photos_albums_list($a->data['channel'],$a->data['observer']));
$tpl = get_markup_template('photos_upload.tpl');
- $o .= replace_macros($tpl,array(
+ $upload_form = replace_macros($tpl,array(
'$pagename' => t('Upload Photos'),
'$sessid' => session_id(),
'$usage' => $usage_message,
@@ -594,7 +588,6 @@ function photos_content(&$a) {
));
- return $o;
}
/*
@@ -725,7 +718,8 @@ function photos_content(&$a) {
'$can_post' => $can_post,
'$upload' => array(t('Upload'), $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/upload/' . bin2hex($album)),
'$order' => $order,
-
+ '$upload_form' => $upload_form,
+ '$usage' => $usage_message
));
}
@@ -1234,6 +1228,8 @@ function photos_content(&$a) {
'$can_post' => $can_post,
'$upload' => array(t('Upload'), $a->get_baseurl().'/photos/'.$a->data['channel']['channel_address'].'/upload'),
'$photos' => $photos,
+ '$upload_form' => $upload_form,
+ '$usage' => $usage_message
));
}