when an admin censors a channel, we only need to notify the directory and not all the connections.

This commit is contained in:
friendica 2014-06-22 17:26:05 -07:00
parent 1dacfb375e
commit eb31d61a26
2 changed files with 14 additions and 6 deletions

View File

@ -14,8 +14,14 @@ function directory_run($argv, $argc){
return;
$force = false;
if(($argc > 2) && ($argv[2] === 'force'))
$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
if($pushall)
proc_run('php','include/notifier.php','refresh_all',$channel['channel_id']);
return;
}
@ -85,7 +92,7 @@ function directory_run($argv, $argc){
}
// Now update all the connections
if($pushall)
proc_run('php','include/notifier.php','refresh_all',$channel['channel_id']);
}

View File

@ -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)) );
}