diff options
author | friendica <info@friendica.com> | 2014-06-22 17:26:05 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-06-22 17:26:05 -0700 |
commit | eb31d61a269774c6552e48b98353aaa109c545ce (patch) | |
tree | 8992e8160125879dd960a0e4d6fc7cd8f7b62af8 | |
parent | 1dacfb375eac1586495c34110275e70215aeea32 (diff) | |
download | volse-hubzilla-eb31d61a269774c6552e48b98353aaa109c545ce.tar.gz volse-hubzilla-eb31d61a269774c6552e48b98353aaa109c545ce.tar.bz2 volse-hubzilla-eb31d61a269774c6552e48b98353aaa109c545ce.zip |
when an admin censors a channel, we only need to notify the directory and not all the connections.
-rw-r--r-- | include/directory.php | 19 | ||||
-rw-r--r-- | mod/admin.php | 1 |
2 files changed, 14 insertions, 6 deletions
diff --git a/include/directory.php b/include/directory.php index c51fe765f..60070f7ec 100644 --- a/include/directory.php +++ b/include/directory.php @@ -14,8 +14,14 @@ function directory_run($argv, $argc){ return; $force = false; - if(($argc > 2) && ($argv[2] === 'force')) - $force = true; + $pushall = true; + + if($argc > 2) { + if($argv[2] === 'force') + $force = true; + if($argv[2] === 'nopush') + $pushall = false; + } logger('directory update', LOGGER_DEBUG); @@ -41,9 +47,10 @@ function directory_run($argv, $argc){ intval($channel['channel_id']) ); - // Now update all the connections - proc_run('php','include/notifier.php','refresh_all',$channel['channel_id']); + if($pushall) + proc_run('php','include/notifier.php','refresh_all',$channel['channel_id']); + return; } @@ -85,8 +92,8 @@ function directory_run($argv, $argc){ } // Now update all the connections - - proc_run('php','include/notifier.php','refresh_all',$channel['channel_id']); + if($pushall) + proc_run('php','include/notifier.php','refresh_all',$channel['channel_id']); } diff --git a/mod/admin.php b/mod/admin.php index 37a147df6..464edddd4 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -794,6 +794,7 @@ function admin_page_channels_post(&$a){ intval(PAGE_CENSORED), intval( $uid ) ); + proc_run('php','include/directory.php',$uid,'nopush'); } notice( sprintf( tt("%s channel censored/uncensored", "%s channelss censored/uncensored", count($channels)), count($channels)) ); } |