diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-03-25 11:21:24 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-03-25 11:21:24 +0200 |
commit | c98776923a3aed4a0a17ca1412787de3b718eba9 (patch) | |
tree | e0057208e1a1f039b556d9aa47d7c72fe5ab0786 /Zotlabs | |
parent | 9f9b9dfd82fa518961b11387e3a6c3e048280acc (diff) | |
parent | bb4f9eecbe88c5d6ead654cefefcd3c57f23c1fe (diff) | |
download | volse-hubzilla-c98776923a3aed4a0a17ca1412787de3b718eba9.tar.gz volse-hubzilla-c98776923a3aed4a0a17ca1412787de3b718eba9.tar.bz2 volse-hubzilla-c98776923a3aed4a0a17ca1412787de3b718eba9.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Apps.php | 7 | ||||
-rw-r--r-- | Zotlabs/Module/Appman.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Moderate.php | 17 |
3 files changed, 14 insertions, 11 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index f91dc8e49..24cb4a626 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -785,6 +785,7 @@ class Apps { dbesc($darray['app_plugin']), intval($darray['app_deleted']) ); + if($r) { $ret['success'] = true; $ret['app_id'] = $darray['app_id']; @@ -871,6 +872,12 @@ class Apps { dbesc($darray['app_id']), intval($darray['app_channel']) ); + + // if updating an embed app, don't mess with any existing categories. + + if(array_key_exists('embed',$arr) && intval($arr['embed'])) + return $ret; + if($x) { q("delete from term where otype = %d and oid = %d", intval(TERM_OBJ_APP), diff --git a/Zotlabs/Module/Appman.php b/Zotlabs/Module/Appman.php index 64d4628ae..3ebafafa4 100644 --- a/Zotlabs/Module/Appman.php +++ b/Zotlabs/Module/Appman.php @@ -25,6 +25,7 @@ class Appman extends \Zotlabs\Web\Controller { 'photo' => escape_tags($_REQUEST['photo']), 'version' => escape_tags($_REQUEST['version']), 'price' => escape_tags($_REQUEST['price']), + 'page' => escape_tags($_REQUEST['page']), 'requires' => escape_tags($_REQUEST['requires']), 'system' => intval($_REQUEST['system']), 'plugin' => escape_tags($_REQUEST['plugin']), diff --git a/Zotlabs/Module/Moderate.php b/Zotlabs/Module/Moderate.php index b4709f3bd..10c8ab8f2 100644 --- a/Zotlabs/Module/Moderate.php +++ b/Zotlabs/Module/Moderate.php @@ -47,24 +47,17 @@ class Moderate extends \Zotlabs\Web\Controller { ); if($r) { + $item = $r[0]; + if($action === 'approve') { q("update item set item_blocked = 0 where uid = %d and id = %d", intval(local_channel()), intval($post_id) ); - // update the parent's commented timestamp + $item['item_blocked'] = 0; - $z = q("select max(created) as commented from item where parent_mid = '%s' and uid = %d and item_delayed = 0 ", - dbesc($r[0]['parent_mid']), - intval(local_channel()) - ); - - q("UPDATE item set commented = '%s', changed = '%s' WHERE id = %d", - dbesc(($z) ? $z[0]['commented'] : (datetime_convert())), - dbesc(datetime_convert()), - intval($r[0]['parent']) - ); + item_update_parent_commented($item); notice( t('Comment approved') . EOL); } @@ -72,6 +65,8 @@ class Moderate extends \Zotlabs\Web\Controller { drop_item($post_id,false); notice( t('Comment deleted') . EOL); } + + // refetch the item after changes have been made $r = q("select * from item where id = %d", intval($post_id) |