more spaces + curly braces + converted multiple single-line comments to one mult-line comment

Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2017-04-08 18:51:29 +02:00
parent a4d60b65f1
commit 8191bcc402
No known key found for this signature in database
GPG Key ID: B72F8185C6C7BD78
1 changed files with 18 additions and 19 deletions

View File

@ -4,7 +4,7 @@ use \Friendica\Core\Config;
function cron_run(&$argv, &$argc){ function cron_run(&$argv, &$argc){
global $a; global $a;
require_once('include/datetime.php'); require_once 'include/datetime.php';
// Poll contacts with specific parameters // Poll contacts with specific parameters
if ($argc > 1) { if ($argc > 1) {
@ -157,7 +157,7 @@ function cron_poll_contacts($argc, $argv) {
dbesc(NETWORK_MAIL2) dbesc(NETWORK_MAIL2)
); );
if (!count($contacts)) { if (!dbm::is_result($contacts)) {
return; return;
} }
@ -184,25 +184,24 @@ function cron_poll_contacts($argc, $argv) {
} }
if ($contact['subhub'] AND in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS))) { if ($contact['subhub'] AND in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS))) {
// We should be getting everything via a hub. But just to be sure, let's check once a day. /*
// (You can make this more or less frequent if desired by setting 'pushpoll_frequency' appropriately) * We should be getting everything via a hub. But just to be sure, let's check once a day.
// This also lets us update our subscription to the hub, and add or replace hubs in case it * (You can make this more or less frequent if desired by setting 'pushpoll_frequency' appropriately)
// changed. We will only update hubs once a day, regardless of 'pushpoll_frequency'. * This also lets us update our subscription to the hub, and add or replace hubs in case it
* changed. We will only update hubs once a day, regardless of 'pushpoll_frequency'.
*/
$poll_interval = get_config('system', 'pushpoll_frequency'); $poll_interval = get_config('system', 'pushpoll_frequency');
$contact['priority'] = (($poll_interval !== false) ? intval($poll_interval) : 3); $contact['priority'] = (($poll_interval !== false) ? intval($poll_interval) : 3);
} }
if ($contact['priority'] AND !$force) { if ($contact['priority'] AND !$force) {
$update = false; $update = false;
$t = $contact['last-update']; $t = $contact['last-update'];
/** /*
* Based on $contact['priority'], should we poll this site now? Or later? * Based on $contact['priority'], should we poll this site now? Or later?
*/ */
switch ($contact['priority']) { switch ($contact['priority']) {
case 5: case 5:
if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 month")) { if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 month")) {