aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-10-24 21:44:25 +0200
committerMario Vavti <mario@mariovavti.com>2015-10-24 21:44:25 +0200
commitab8b4d5c3669543a6166390d433569656692f9b8 (patch)
tree3c6f2606d3830ec7692c430fa270c56eb24f9675 /mod/photos.php
parent3432771150c03c72d468e5840177b769812a9758 (diff)
downloadvolse-hubzilla-ab8b4d5c3669543a6166390d433569656692f9b8.tar.gz
volse-hubzilla-ab8b4d5c3669543a6166390d433569656692f9b8.tar.bz2
volse-hubzilla-ab8b4d5c3669543a6166390d433569656692f9b8.zip
another try to avoid dubble photo deletion. allow to set a photo caption and simple status body (if create status post is enabled) on upload
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/mod/photos.php b/mod/photos.php
index 7cd972d8d..33a895fdf 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -183,14 +183,14 @@ function photos_post(&$a) {
);
if($r) {
-
+/*
q("DELETE FROM `photo` WHERE `uid` = %d AND `resource_id` = '%s'",
intval($page_owner_uid),
dbesc($r[0]['resource_id'])
);
-
+*/
attach_delete($page_owner_uid, $r[0]['resource_id'], 1 );
-
+/*
$i = q("SELECT * FROM `item` WHERE `resource_id` = '%s' AND resource_type = 'photo' and `uid` = %d LIMIT 1",
dbesc($r[0]['resource_id']),
intval($page_owner_uid)
@@ -199,6 +199,7 @@ function photos_post(&$a) {
drop_item($i[0]['id'],true,DROPITEM_PHASE1);
$url = $a->get_baseurl();
}
+*/
}
goaway($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . $_SESSION['album_return']);
@@ -622,7 +623,9 @@ function photos_content(&$a) {
'$nickname' => $a->data['channel']['channel_address'],
'$newalbum_label' => t('Enter an album name'),
'$newalbum_placeholder' => t('or select an existing album (doubleclick)'),
- '$visible' => array('visible', t('Create a status post for this upload'), 0, '', array(t('No'), t('Yes'))),
+ '$visible' => array('visible', t('Create a status post for this upload'), 0,'', array(t('No'), t('Yes')), 'onclick="showHideBodyTextarea();"'),
+ '$caption' => array('description', t('Caption (optional):')),
+ '$body' => array('body', t('Description (optional):'),'', 'Description will only appear in the status post'),
'$albums' => $albums['albums'],
'$selname' => $selname,
'$permissions' => t('Permissions'),