From 110ef6201e0a3731967a662afed1606b7077d0b0 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sat, 16 Jan 2016 14:00:22 -0800 Subject: add $deliver flag to item_store() and item_store_update() [default true]. If false, do not send any notifications or process tag_deliver. This should avoid any network activity from happening as the result of a channel (actually item) import. Other minor fixes in the handling of the $allow_exec flag and further protecting CSS passed to widgets from rogue code and XSS. --- mod/import_items.php | 6 ------ 1 file changed, 6 deletions(-) (limited to 'mod/import_items.php') diff --git a/mod/import_items.php b/mod/import_items.php index 6b97939c9..f369ad780 100644 --- a/mod/import_items.php +++ b/mod/import_items.php @@ -86,14 +86,11 @@ function import_items_post(&$a) { $channel = $a->get_channel(); - $saved_notification_flags = notifications_off($channel['channel_id']); if(array_key_exists('item',$data) && $data['item']) { import_items($channel,$data['item']); } - notifications_on($channel['channel_id'],$saved_notification_flags); - if(array_key_exists('item_id',$data) && $data['item_id']) { import_item_ids($channel,$data['item_id']); } @@ -107,9 +104,6 @@ function import_items_post(&$a) { function import_items_content(&$a) { - - - if(! local_channel()) { notice( t('Permission denied') . EOL); return login(); -- cgit v1.2.3 From 9abd95fad3784a10fc48bc40f9b8a75d7d74edda Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 31 Mar 2016 16:06:03 -0700 Subject: static App --- mod/import_items.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/import_items.php') diff --git a/mod/import_items.php b/mod/import_items.php index f369ad780..df3afb3ea 100644 --- a/mod/import_items.php +++ b/mod/import_items.php @@ -84,7 +84,7 @@ function import_items_post(&$a) { } } - $channel = $a->get_channel(); + $channel = App::get_channel(); if(array_key_exists('item',$data) && $data['item']) { -- cgit v1.2.3