Replace AND and OR in PHP conditions by && and ||
This commit is contained in:
parent
bee6ad5916
commit
9c0d2c31e8
83 changed files with 596 additions and 596 deletions
|
@ -99,7 +99,7 @@ function notification($params) {
|
|||
intval($parent_id),
|
||||
intval($params['uid'])
|
||||
);
|
||||
if ($p AND count($p) AND ($p[0]["ignored"])) {
|
||||
if ($p && count($p) && ($p[0]["ignored"])) {
|
||||
logger("Thread ".$parent_id." will be ignored", LOGGER_DEBUG);
|
||||
return;
|
||||
}
|
||||
|
@ -515,7 +515,7 @@ function notification($params) {
|
|||
|
||||
logger('sending notification email');
|
||||
|
||||
if (isset($params['parent']) AND (intval($params['parent']) != 0)) {
|
||||
if (isset($params['parent']) && (intval($params['parent']) != 0)) {
|
||||
$id_for_parent = $params['parent']."@".$hostname;
|
||||
|
||||
// Is this the first email notification for this parent item and user?
|
||||
|
@ -676,7 +676,7 @@ function check_item_notification($itemid, $uid, $defaulttype = "") {
|
|||
// Check for invalid profile urls. 13 should be the shortest possible profile length:
|
||||
// http://a.bc/d
|
||||
// Additionally check for invalid urls that would return the normalised value "http:"
|
||||
if ((strlen($profile) >= 13) AND (normalise_link($profile) != "http:")) {
|
||||
if ((strlen($profile) >= 13) && (normalise_link($profile) != "http:")) {
|
||||
if (!in_array($profile, $profiles2))
|
||||
$profiles2[] = $profile;
|
||||
|
||||
|
@ -760,11 +760,11 @@ function check_item_notification($itemid, $uid, $defaulttype = "") {
|
|||
$tagged = false;
|
||||
|
||||
foreach ($profiles AS $profile) {
|
||||
if (strpos($item[0]["tag"], "=".$profile."]") OR strpos($item[0]["body"], "=".$profile."]"))
|
||||
if (strpos($item[0]["tag"], "=".$profile."]") || strpos($item[0]["body"], "=".$profile."]"))
|
||||
$tagged = true;
|
||||
}
|
||||
|
||||
if ($item[0]["mention"] OR $tagged OR ($defaulttype == NOTIFY_TAGSELF)) {
|
||||
if ($item[0]["mention"] || $tagged || ($defaulttype == NOTIFY_TAGSELF)) {
|
||||
$params["type"] = NOTIFY_TAGSELF;
|
||||
$params["verb"] = ACTIVITY_TAG;
|
||||
}
|
||||
|
@ -776,7 +776,7 @@ function check_item_notification($itemid, $uid, $defaulttype = "") {
|
|||
LIMIT 1",
|
||||
intval($item[0]["parent"]), intval($uid));
|
||||
|
||||
if ($parent AND !isset($params["type"])) {
|
||||
if ($parent && !isset($params["type"])) {
|
||||
$params["type"] = NOTIFY_COMMENT;
|
||||
$params["verb"] = ACTIVITY_POST;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue