aboutsummaryrefslogtreecommitdiffstats
path: root/mod/import.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-10-08 15:15:20 -0700
committerfriendica <info@friendica.com>2014-10-08 15:15:20 -0700
commitbca4d540e06151e074022e9cd8e129198585023b (patch)
treec22c1ff6efcbd90538e5bcc2b2fc1de5454b681a /mod/import.php
parent202039d3895462b6dced82024c4d351a84c15ecd (diff)
downloadvolse-hubzilla-bca4d540e06151e074022e9cd8e129198585023b.tar.gz
volse-hubzilla-bca4d540e06151e074022e9cd8e129198585023b.tar.bz2
volse-hubzilla-bca4d540e06151e074022e9cd8e129198585023b.zip
disable email notifications when bulk importing content.
Diffstat (limited to 'mod/import.php')
-rw-r--r--mod/import.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/mod/import.php b/mod/import.php
index e5a22a26e..3cf114d66 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -378,7 +378,10 @@ function import_post(&$a) {
}
}
+ $saved_notification_flags = notifications_off($channel['channel_id']);
+
if($import_posts && array_key_exists('item',$data) && $data['item']) {
+
foreach($data['item'] as $i) {
$item = get_item_elements($i);
@@ -404,6 +407,8 @@ function import_post(&$a) {
}
+ notifications_on($channel['channel_id'],$saved_notification_flags);
+
if(array_key_exists('item_id',$data) && $data['item_id']) {
foreach($data['item_id'] as $i) {
$r = q("select id from item where mid = '%s' and uid = %d limit 1",