if (gpluspost_nextscripts()) {
/*
// To-Do: Option to check the credentials if requested
- if (($username != "") AND ($password != "")) {
+ if (($username != "") && ($password != "")) {
require_once("addon/gpluspost/postToGooglePlus.php");
$loginError = doConnectToGooglePlus2($username, $password);
if ($loginError)
return;
// if post comes from Google+ don't send it back
- if (!get_pconfig($b["uid"],'gpluspost','no_loop_prevention') and (($b['app'] == "Google+") OR ($b["extid"] == NETWORK_GPLUS)))
+ if (!get_pconfig($b["uid"],'gpluspost','no_loop_prevention') && (($b['app'] == "Google+") || ($b["extid"] == NETWORK_GPLUS)))
return;
if (!gpluspost_nextscripts()) {
logger('gpluspost_queue: run');
- $r = q("SELECT `user`.* FROM `user` LEFT JOIN `contact` on `contact`.`uid` = `user`.`uid`
+ $r = q("SELECT `user`.* FROM `user` LEFT JOIN `contact` on `contact`.`uid` = `user`.`uid`
WHERE `contact`.`self` = 1 AND `contact`.`id` = %d LIMIT 1",
intval($x['cid'])
);
foreach ($items AS $item)
gpluspost_feeditem($item, $uid);
} else {
- $items = q("SELECT `id` FROM `item` FORCE INDEX (`received`) WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `item`.`wall` = 1 AND `item`.`id` = `item`.`parent` ORDER BY `received` DESC LIMIT 10");
+ $items = q("SELECT `id` FROM `item` WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `item`.`wall` = 1 AND `item`.`id` = `item`.`parent` ORDER BY `received` DESC LIMIT 10");
foreach ($items AS $item)
gpluspost_feeditem($item["id"], $uid);
}
else if ($image != "")
$msglink = $image;
- if (($msglink == "") AND $skipwithoutlink)
+ if (($msglink == "") && $skipwithoutlink)
continue;
else if ($msglink == "")
$msglink = $item["plink"];