]> git.mxchange.org Git - friendica.git/commitdiff
Replace lowercase operators
authorHypolite Petovan <mrpetovan@gmail.com>
Fri, 9 Jun 2017 01:03:44 +0000 (21:03 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Fri, 9 Jun 2017 01:03:44 +0000 (21:03 -0400)
24 files changed:
boot.php
include/NotificationsManager.php
include/api.php
include/auth_ejabberd.php
include/bbcode.php
include/dbstructure.php
include/delivery.php
include/discover_poco.php
include/email.php
include/enotify.php
include/html2bbcode.php
include/html2plain.php
include/items.php
include/message.php
include/msgclean.php
include/notifier.php
include/onepoll.php
include/photos.php
include/quoteconvert.php
include/xml.php
mod/settings.php
util/php2po.php
util/typo.php
view/theme/vier/theme.php

index 6fd7c30372db4e68d55ebaafedb700242f145060..5417e0fa23646708d77ac1a252f2470fc1593bb6 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1424,10 +1424,10 @@ function clear_cache($basepath = "", $path = "") {
                if ($dh = opendir($path)) {
                        while (($file = readdir($dh)) !== false) {
                                $fullpath = $path . "/" . $file;
-                               if ((filetype($fullpath) == "dir") and ($file != ".") and ($file != "..")) {
+                               if ((filetype($fullpath) == "dir") && ($file != ".") && ($file != "..")) {
                                        clear_cache($basepath, $fullpath);
                                }
-                               if ((filetype($fullpath) == "file") and (filectime($fullpath) < (time() - $cachetime))) {
+                               if ((filetype($fullpath) == "file") && (filectime($fullpath) < (time() - $cachetime))) {
                                        unlink($fullpath);
                                }
                        }
index ad0ede6dbe4a970728ea4da98c581f948fa0f8ee..57c315c9d741954b671aff04560cadbc52202e63 100644 (file)
@@ -512,7 +512,7 @@ class NotificationsManager {
                $myurl = substr($myurl,strpos($myurl,'://')+3);
                $myurl = str_replace(array('www.','.'),array('','\\.'),$myurl);
                $diasp_url = str_replace('/profile/','/u/',$myurl);
-               $sql_extra = sprintf(" AND ( `item`.`author-link` regexp '%s' or `item`.`tag` regexp '%s' or `item`.`tag` regexp '%s' ) ",
+               $sql_extra = sprintf(" AND ( `item`.`author-link` regexp '%s' OR `item`.`tag` regexp '%s' OR `item`.`tag` regexp '%s' ) ",
                        dbesc($myurl . '$'),
                        dbesc($myurl . '\\]'),
                        dbesc($diasp_url . '\\]')
@@ -829,11 +829,11 @@ class NotificationsManager {
        }
 
        /**
-        * @brief Check for missing contact data and try to fetch the data from 
+        * @brief Check for missing contact data and try to fetch the data from
         *     from other sources
-        * 
+        *
         * @param array $arr The input array with the intro data
-        * 
+        *
         * @return array The array with the intro data
         */
        private function getMissingIntroData($arr) {
index bc40e420b074faab07b841a42d8dddbf3efabd38..16ff0f4a05d56a1977c44f3d4e56bf72eb350d4f 100644 (file)
@@ -2178,7 +2178,7 @@ $called_api = null;
                                `contact`.`id` AS `cid`
                                FROM `item`, `contact`
                                WHERE `item`.`uid` = %d
-                               AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
+                               AND `item`.`visible` = 1 AND `item`.`moderated` = 0 AND `item`.`deleted` = 0
                                AND `item`.`starred` = 1
                                AND `contact`.`id` = `item`.`contact-id`
                                AND (NOT `contact`.`blocked` OR `contact`.`pending`)
@@ -2263,13 +2263,13 @@ $called_api = null;
 
                $statustitle = trim($item['title']);
 
-               if (($statustitle != '') and (strpos($statusbody, $statustitle) !== false)) {
+               if (($statustitle != '') && (strpos($statusbody, $statustitle) !== false)) {
                        $statustext = trim($statusbody);
                } else {
                        $statustext = trim($statustitle."\n\n".$statusbody);
                }
 
-               if (($item["network"] == NETWORK_FEED) and (strlen($statustext)> 1000)) {
+               if (($item["network"] == NETWORK_FEED) && (strlen($statustext)> 1000)) {
                        $statustext = substr($statustext, 0, 1000)."... \n".$item["plink"];
                }
 
@@ -3982,7 +3982,7 @@ $called_api = null;
        }
 
        function prepare_photo_data($type, $scale, $photo_id) {
-               $scale_sql = ($scale === false ? "" : sprintf("and scale=%d", intval($scale)));
+               $scale_sql = ($scale === false ? "" : sprintf("AND scale=%d", intval($scale)));
                $data_sql = ($scale === false ? "" : "data, ");
 
                // added allow_cid, allow_gid, deny_cid, deny_gid to output as string like stored in database
index 9211c5baf091b782119b5da50382ad3e8f7a16b6..490ea0d1cb8e44982100690be9a92d229d456abb 100755 (executable)
@@ -89,7 +89,7 @@ class exAuth {
 
                // Open the logfile if the logfile name is defined
                if ($this->sLogFile != '')
-                       $this->rLogFile = fopen($this->sLogFile, "a") or die("Error opening log file: ". $this->sLogFile);
+                       $this->rLogFile = fopen($this->sLogFile, "a") || die("Error opening log file: ". $this->sLogFile);
 
                $this->writeLog("[exAuth] start");
 
index 2b2d7fc93770ad6b17a480f24fe830fc2ad5e72e..0c4e12c9ad49e6e9fc44faf7fa68656f25682a67 100644 (file)
@@ -147,7 +147,7 @@ function cleancss($input) {
        for ($i = 0; $i < strlen($input); $i++) {
                $char = substr($input, $i, 1);
 
-               if (($char >= "a") and ($char <= "z")) {
+               if (($char >= "a") && ($char <= "z")) {
                        $cleaned .= $char;
                }
 
@@ -1126,7 +1126,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
        // Check for [spoiler] text
        // handle nested quotes
        $endlessloop = 0;
-       while ((strpos($Text, "[/spoiler]") !== false) and (strpos($Text, "[spoiler]") !== false) and (++$endlessloop < 20)) {
+       while ((strpos($Text, "[/spoiler]") !== false) && (strpos($Text, "[spoiler]") !== false) && (++$endlessloop < 20)) {
                $Text = preg_replace("/\[spoiler\](.*?)\[\/spoiler\]/ism", "$SpoilerLayout", $Text);
        }
 
@@ -1136,7 +1136,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
 
        // handle nested quotes
        $endlessloop = 0;
-       while ((strpos($Text, "[/spoiler]")!== false)  and (strpos($Text, "[spoiler=") !== false) and (++$endlessloop < 20)) {
+       while ((strpos($Text, "[/spoiler]")!== false)  && (strpos($Text, "[spoiler=") !== false) && (++$endlessloop < 20)) {
                $Text = preg_replace("/\[spoiler=[\"\']*(.*?)[\"\']*\](.*?)\[\/spoiler\]/ism",
                                     "<br /><strong class=".'"spoiler"'.">" . $t_wrote . "</strong><blockquote class=".'"spoiler"'.">$2</blockquote>",
                                     $Text);
@@ -1148,7 +1148,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
        // Check for [quote] text
        // handle nested quotes
        $endlessloop = 0;
-       while ((strpos($Text, "[/quote]") !== false) and (strpos($Text, "[quote]") !== false) and (++$endlessloop < 20)) {
+       while ((strpos($Text, "[/quote]") !== false) && (strpos($Text, "[quote]") !== false) && (++$endlessloop < 20)) {
                $Text = preg_replace("/\[quote\](.*?)\[\/quote\]/ism", "$QuoteLayout", $Text);
        }
 
@@ -1158,7 +1158,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
 
        // handle nested quotes
        $endlessloop = 0;
-       while ((strpos($Text, "[/quote]")!== false)  and (strpos($Text, "[quote=") !== false) and (++$endlessloop < 20)) {
+       while ((strpos($Text, "[/quote]")!== false)  && (strpos($Text, "[quote=") !== false) && (++$endlessloop < 20)) {
                $Text = preg_replace("/\[quote=[\"\']*(.*?)[\"\']*\](.*?)\[\/quote\]/ism",
                                     "<br /><strong class=".'"author"'.">" . $t_wrote . "</strong><blockquote>$2</blockquote>",
                                     $Text);
index b53befbf29fb1d8f935209d67f335be1ea1efdcf..8ab9bf9d583155d9da2fc15d55b2a08e08bdb75e 100644 (file)
@@ -530,7 +530,7 @@ function db_create_table($name, $fields, $verbose, $action, $indexes=null) {
        $primary_keys = array();
        foreach ($fields AS $fieldname => $field) {
                $sql_rows[] = "`".dbesc($fieldname)."` ".db_field_command($field);
-               if (x($field,'primary') and $field['primary']!='') {
+               if (x($field,'primary') && $field['primary']!='') {
                        $primary_keys[] = $fieldname;
                }
        }
index 9e6d8ffe61a284066ee13f90f0f1e577e4aa869e..05fba7985cd9bc41a90c21185569b7faa034da3c 100644 (file)
@@ -91,7 +91,7 @@ function delivery_run(&$argv, &$argc){
                        $uid = $item_id;
                } else {
                        // find ancestors
-                       $r = q("SELECT * FROM `item` WHERE `id` = %d and visible = 1 and moderated = 0 LIMIT 1",
+                       $r = q("SELECT * FROM `item` WHERE `id` = %d AND visible = 1 AND moderated = 0 LIMIT 1",
                                intval($item_id)
                        );
 
@@ -105,7 +105,7 @@ function delivery_run(&$argv, &$argc){
                        $updated = $r[0]['edited'];
 
                        $items = q("SELECT `item`.*, `sign`.`signed_text`,`sign`.`signature`,`sign`.`signer`
-                               FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d and visible = 1 and moderated = 0 ORDER BY `id` ASC",
+                               FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d AND visible = 1 AND moderated = 0 ORDER BY `id` ASC",
                                intval($parent_id)
                        );
 
@@ -453,7 +453,7 @@ function delivery_run(&$argv, &$argc){
                                                $headers .= "References: <".iri2msgid($it["parent-uri"]).">";
 
                                                // If Threading is enabled, write down the correct parent
-                                               if (($it["thr-parent"] != "") and ($it["thr-parent"] != $it["parent-uri"]))
+                                               if (($it["thr-parent"] != "") && ($it["thr-parent"] != $it["parent-uri"]))
                                                        $headers .= " <".iri2msgid($it["thr-parent"]).">";
                                                $headers .= "\n";
 
index 11794c32d7d4e901d80a3a64cbeed4fbc38e933e..6bb296c9c1592f14b95d008f299a8ccb8f60df4a 100644 (file)
@@ -83,10 +83,10 @@ function discover_poco_run(&$argv, &$argc) {
                update_suggestions();
        } elseif (($mode == 2) && get_config('system','poco_completion')) {
                discover_users();
-       } elseif (($mode == 1) && ($search != "") and get_config('system','poco_local_search')) {
+       } elseif (($mode == 1) && ($search != "") && get_config('system','poco_local_search')) {
                discover_directory($search);
                gs_search_user($search);
-       } elseif (($mode == 0) && ($search == "") and (get_config('system','poco_discovery') > 0)) {
+       } elseif (($mode == 0) && ($search == "") && (get_config('system','poco_discovery') > 0)) {
                // Query Friendica and Hubzilla servers for their users
                poco_discover();
 
index b8d99433e1e070b0c44514c18022d4f745fab072..78e98a830c3dec87e1c2d9e5fc81dd2b59da11cd 100644 (file)
@@ -152,7 +152,7 @@ function email_get_part($mbox,$uid,$p,$partno, $subtype) {
        if ($p->parameters)
                foreach ($p->parameters as $x)
                        $params[strtolower($x->attribute)] = $x->value;
-       if (isset($p->dparameters) and $p->dparameters)
+       if (isset($p->dparameters) && $p->dparameters)
                foreach ($p->dparameters as $x)
                        $params[strtolower($x->attribute)] = $x->value;
 
@@ -160,7 +160,7 @@ function email_get_part($mbox,$uid,$p,$partno, $subtype) {
        // Any part with a filename is an attachment,
        // so an attached text file (type 0) is not mistaken as the message.
 
-       if ((isset($params['filename']) and $params['filename']) || (isset($params['name']) and $params['name'])) {
+       if ((isset($params['filename']) && $params['filename']) || (isset($params['name']) && $params['name'])) {
                // filename may be given as 'Filename' or 'Name' or both
                $filename = ($params['filename'])? $params['filename'] : $params['name'];
                // filename may be encoded, so see imap_mime_header_decode()
@@ -191,7 +191,7 @@ function email_get_part($mbox,$uid,$p,$partno, $subtype) {
 //     }
 
        // SUBPART RECURSION
-       if (isset($p->parts) and $p->parts) {
+       if (isset($p->parts) && $p->parts) {
                $x = "";
                foreach ($p->parts as $partno0=>$p2) {
                        $x .=  email_get_part($mbox,$uid,$p2,$partno . '.' . ($partno0+1), $subtype);  // 1.2, 1.2.1, etc.
index d0fcbeef105ca79cb9c13701e1db9ae7c2882732..39665d14d4c994ca267127ef135b1e5962e03393 100644 (file)
@@ -115,7 +115,7 @@ function notification($params) {
                        dbesc($params['link']),
                        intval($params['uid'])
                );
-               if ($p and count($p)) {
+               if ($p && count($p)) {
                        pop_lang();
                        return;
                }
index 1deab951958ac3a6750ac956a2289af6be3581e5..435f6b77c1198aee5db6d753010581fbc86a65a0 100644 (file)
@@ -44,7 +44,7 @@ function node2bbcodesub(&$doc, $oldnode, $attributes, $startbb, $endbb)
 
                        if (strpos('*'.$startbb, '$1') > 0) {
 
-                               if ($replace and (@$attr[$attribute] != '')) {
+                               if ($replace && (@$attr[$attribute] != '')) {
 
                                        $startbb = preg_replace($value, $startbb, $attr[$attribute], -1, $count);
 
index da308a5c692919ea3eff2e3506e508fb2005b1be..72185de3b5c9bea9eaf1c53f8371c23ba87f0aba 100644 (file)
@@ -23,7 +23,7 @@ function breaklines($line, $level, $wraplength = 75)
                if ($pos == 0)
                        $pos = strpos($line, ' ');
 
-               if (($pos > 0) and strlen($line) > $wraplen) {
+               if (($pos > 0) && strlen($line) > $wraplen) {
                        $newline = trim(substr($line, 0, $pos));
                        if ($level > 0)
                                $newline = str_repeat(">", $level).' '.$newline;
@@ -32,7 +32,7 @@ function breaklines($line, $level, $wraplength = 75)
                        $line = substr($line, $pos+1);
                }
 
-       } while ((strlen($line) > $wraplen) and !($oldline == $line));
+       } while ((strlen($line) > $wraplen) && !($oldline == $line));
 
        if ($level > 0)
                $line = str_repeat(">", $level).' '.$line;
@@ -70,7 +70,7 @@ function quotelevel($message, $wraplength = 75)
                        $line = substr($line, 0, $pos).substr($line, $pos+8);
                }
 
-               if (!$startquote or ($line != ''))
+               if (!$startquote || ($line != ''))
                        $newlines[] = breaklines($line, $currlevel, $wraplength);
        }
        return(implode($newlines, "\n"));
@@ -92,13 +92,13 @@ function collecturls($message) {
                        if (strpos($treffer[1], $listitem) !== false)
                                $ignore = true;
 
-               if ((strpos($treffer[1], "//twitter.com/") !== false) and (strpos($treffer[1], "/status/") !== false))
+               if ((strpos($treffer[1], "//twitter.com/") !== false) && (strpos($treffer[1], "/status/") !== false))
                                $ignore = false;
 
-               if ((strpos($treffer[1], "//plus.google.com/") !== false) and (strpos($treffer[1], "/posts") !== false))
+               if ((strpos($treffer[1], "//plus.google.com/") !== false) && (strpos($treffer[1], "/posts") !== false))
                                $ignore = false;
 
-               if ((strpos($treffer[1], "//plus.google.com/") !== false) and (strpos($treffer[1], "/photos") !== false))
+               if ((strpos($treffer[1], "//plus.google.com/") !== false) && (strpos($treffer[1], "/photos") !== false))
                                $ignore = false;
 
                if (!$ignore)
index 234c001942204d3c4217257cbbb0d2fad09cb68a..eb307639098d6148419e70a1ca9e23d89e6af694 100644 (file)
@@ -143,7 +143,7 @@ function title_is_body($title, $body) {
                $body = substr($body, 0, strlen($title));
        }
 
-       if (($title != $body) and (substr($title, -3) == "...")) {
+       if (($title != $body) && (substr($title, -3) == "...")) {
                $pos = strrpos($title, "...");
                if ($pos > 0) {
                        $title = substr($title, 0, $pos);
@@ -1282,7 +1282,7 @@ function get_item_id($guid, $uid = 0) {
        // Does the given user have this item?
        if ($uid) {
                $r = q("SELECT `item`.`id`, `user`.`nickname` FROM `item` INNER JOIN `user` ON `user`.`uid` = `item`.`uid`
-                       WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0
+                       WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 AND `item`.`moderated` = 0
                                AND `item`.`guid` = '%s' AND `item`.`uid` = %d", dbesc($guid), intval($uid));
                if (dbm::is_result($r)) {
                        $id = $r[0]["id"];
@@ -1293,7 +1293,7 @@ function get_item_id($guid, $uid = 0) {
        // Or is it anywhere on the server?
        if ($nick == "") {
                $r = q("SELECT `item`.`id`, `user`.`nickname` FROM `item` INNER JOIN `user` ON `user`.`uid` = `item`.`uid`
-                       WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0
+                       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
index 7a62af8c93bc34eb94ac9c37b986ad211e2514e5..0c1ffff7cfaeec71ca374195f2d47af37e3b6216 100644 (file)
@@ -108,7 +108,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
        );
 
 
-       $r = q("SELECT * FROM `mail` WHERE `uri` = '%s' and `uid` = %d LIMIT 1",
+       $r = q("SELECT * FROM `mail` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
                dbesc($uri),
                intval(local_user())
        );
index 9e8ebed790ef23ef274a41528a93078c6cdb6165..4abbafb71b8ea2b55b1cb401df0d9e7aaaa94052 100644 (file)
@@ -124,7 +124,7 @@ function removesig($message)
 
        // Sollte sich der Signaturtrenner innerhalb eines Quotes befinden
        // wird keine Signaturtrennung ausgefuehrt
-       if (($sigpos < $quotepos) and ($sigpos != 0))
+       if (($sigpos < $quotepos) && ($sigpos != 0))
                return(array('body' => $message, 'sig' => ''));
 
        /// @TODO Regexp umstellen, so dass auf 1 oder kein Leerzeichen
@@ -135,7 +135,7 @@ function removesig($message)
 
        preg_match($pattern, $message, $result);
 
-       if (($result[1] != '') and ($result[2] != '')) {
+       if (($result[1] != '') && ($result[2] != '')) {
                $cleaned = trim($result[1])."\n";
                $sig = trim($result[2]);
                //      '[hr][size=x-small][color=darkblue]'.trim($result[2]).'[/color][/size]';
@@ -157,8 +157,8 @@ function removelinebreak($message)
        foreach ($arrbody as $i => $line) {
                $currquotelevel = 0;
                $currline = $line;
-               while ((strlen($currline)>0) and ((substr($currline, 0, 1) == '>')
-                       or (substr($currline, 0, 1) == ' '))) {
+               while ((strlen($currline)>0) && ((substr($currline, 0, 1) == '>')
+                       || (substr($currline, 0, 1) == ' '))) {
                        if (substr($currline, 0, 1) == '>')
                                $currquotelevel++;
 
@@ -167,8 +167,8 @@ function removelinebreak($message)
 
                $quotelevel = 0;
                $nextline = trim($arrbody[$i+1]);
-               while ((strlen($nextline)>0) and ((substr($nextline, 0, 1) == '>')
-                       or (substr($nextline, 0, 1) == ' '))) {
+               while ((strlen($nextline)>0) && ((substr($nextline, 0, 1) == '>')
+                       || (substr($nextline, 0, 1) == ' '))) {
                        if (substr($nextline, 0, 1) == '>')
                                $quotelevel++;
 
@@ -178,21 +178,21 @@ function removelinebreak($message)
                $len = strlen($line);
                $firstword = strpos($nextline.' ', ' ');
 
-               $specialchars = ((substr(trim($nextline), 0, 1) == '-') or
-                               (substr(trim($nextline), 0, 1) == '=') or
-                               (substr(trim($nextline), 0, 1) == '*') or
-                               (substr(trim($nextline), 0, 1) == '·') or
-                               (substr(trim($nextline), 0, 4) == '[url') or
-                               (substr(trim($nextline), 0, 5) == '[size') or
-                               (substr(trim($nextline), 0, 7) == 'http://') or
+               $specialchars = ((substr(trim($nextline), 0, 1) == '-') ||
+                               (substr(trim($nextline), 0, 1) == '=') ||
+                               (substr(trim($nextline), 0, 1) == '*') ||
+                               (substr(trim($nextline), 0, 1) == '·') ||
+                               (substr(trim($nextline), 0, 4) == '[url') ||
+                               (substr(trim($nextline), 0, 5) == '[size') ||
+                               (substr(trim($nextline), 0, 7) == 'http://') ||
                                (substr(trim($nextline), 0, 8) == 'https://'));
 
                if (!$specialchars)
-                       $specialchars = ((substr(rtrim($line), -1) == '-') or
-                                       (substr(rtrim($line), -1) == '=') or
-                                       (substr(rtrim($line), -1) == '*') or
-                                       (substr(rtrim($line), -1) == '·') or
-                                       (substr(rtrim($line), -6) == '[/url]') or
+                       $specialchars = ((substr(rtrim($line), -1) == '-') ||
+                                       (substr(rtrim($line), -1) == '=') ||
+                                       (substr(rtrim($line), -1) == '*') ||
+                                       (substr(rtrim($line), -1) == '·') ||
+                                       (substr(rtrim($line), -6) == '[/url]') ||
                                        (substr(rtrim($line), -7) == '[/size]'));
 
                //if ($specialchars)
@@ -202,8 +202,8 @@ function removelinebreak($message)
                        if (substr($lines[$lineno], -1) != ' ')
                        $lines[$lineno] .= ' ';
 
-                       while ((strlen($line)>0) and ((substr($line, 0, 1) == '>')
-                       or (substr($line, 0, 1) == ' '))) {
+                       while ((strlen($line)>0) && ((substr($line, 0, 1) == '>')
+                       || (substr($line, 0, 1) == ' '))) {
 
                                $line = ltrim(substr($line, 1));
                        }
@@ -213,10 +213,10 @@ function removelinebreak($message)
                //      $lines[$lineno] = $quotelevel.'-'.$len.'-'.$firstword.'-';
 
                $lines[$lineno] .= $line;
-               //if ((($len + $firstword < 68) and (substr($line, -1, 1) != ' '))
-               //      or ($quotelevel != $currquotelevel) or $specialchars)
+               //if ((($len + $firstword < 68) && (substr($line, -1, 1) != ' '))
+               //      || ($quotelevel != $currquotelevel) || $specialchars)
                if (((substr($line, -1, 1) != ' '))
-                       or ($quotelevel != $currquotelevel))
+                       || ($quotelevel != $currquotelevel))
                        $lineno++;
        }
        return(implode("\n", $lines));
index 94124fee1f226d818e6dadfef04b50c990a0cef1..7f6318182f63f673fd6606e22a8bfe5fd6aaa776 100644 (file)
@@ -163,7 +163,7 @@ function notifier_run(&$argv, &$argc){
                $recipients_relocate = q("SELECT * FROM contact WHERE uid = %d  AND self = 0 AND network = '%s'" , intval($uid), NETWORK_DFRN);
        } else {
                // find ancestors
-               $r = q("SELECT * FROM `item` WHERE `id` = %d and visible = 1 and moderated = 0 LIMIT 1",
+               $r = q("SELECT * FROM `item` WHERE `id` = %d AND visible = 1 AND moderated = 0 LIMIT 1",
                        intval($item_id)
                );
 
@@ -177,7 +177,7 @@ function notifier_run(&$argv, &$argc){
                $updated = $r[0]['edited'];
 
                $items = q("SELECT `item`.*, `sign`.`signed_text`,`sign`.`signature`,`sign`.`signer`
-                       FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d and visible = 1 and moderated = 0 ORDER BY `id` ASC",
+                       FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d AND visible = 1 AND moderated = 0 ORDER BY `id` ASC",
                        intval($parent_id)
                );
 
index bcb9d09be2bb244d00ef80169d76599983292d42..28afca28a5ab3a0e21c40497eb986c0ba5068a2a 100644 (file)
@@ -69,8 +69,8 @@ function onepoll_run(&$argv, &$argc){
 
        // load current friends if possible.
        if (($contact['poco'] != "") && ($contact['success_update'] > $contact['failure_update'])) {
-               $r = q("SELECT count(*) as total from glink
-                       where `cid` = %d and updated > UTC_TIMESTAMP() - INTERVAL 1 DAY",
+               $r = q("SELECT count(*) AS total FROM glink
+                       WHERE `cid` = %d AND updated > UTC_TIMESTAMP() - INTERVAL 1 DAY",
                        intval($contact['id'])
                );
                if (dbm::is_result($r)) {
@@ -467,15 +467,15 @@ function onepoll_run(&$argv, &$argc){
                                                $datarray['created'] = datetime_convert('UTC','UTC',$meta->date);
 
                                                // Is it a reply?
-                                               $reply = ((substr(strtolower($datarray['title']), 0, 3) == "re:") or
-                                                       (substr(strtolower($datarray['title']), 0, 3) == "re-") or
+                                               $reply = ((substr(strtolower($datarray['title']), 0, 3) == "re:") ||
+                                                       (substr(strtolower($datarray['title']), 0, 3) == "re-") ||
                                                        ($raw_refs != ""));
 
                                                // Remove Reply-signs in the subject
                                                $datarray['title'] = RemoveReply($datarray['title']);
 
                                                // If it seems to be a reply but a header couldn't be found take the last message with matching subject
-                                               if (!x($datarray,'parent-uri') and $reply) {
+                                               if (!x($datarray,'parent-uri') && $reply) {
                                                        $r = q("SELECT `uri` , `parent-uri` FROM `item` WHERE `title` = \"%s\" AND `uid` = %d AND `network` = '%s' ORDER BY `created` DESC LIMIT 1",
                                                                dbesc(protect_sprintf($datarray['title'])),
                                                                intval($importer_uid),
index a1faffc2592954ca544e3a74064814880e4a6bf7..6e0002bd472405b858fd7e3e16c75c409abcc295 100644 (file)
@@ -12,7 +12,7 @@ function getGps($exifCoord, $hemi) {
        $minutes = count($exifCoord) > 1 ? gps2Num($exifCoord[1]) : 0;
        $seconds = count($exifCoord) > 2 ? gps2Num($exifCoord[2]) : 0;
 
-       $flip = ($hemi == 'W' or $hemi == 'S') ? -1 : 1;
+       $flip = ($hemi == 'W' || $hemi == 'S') ? -1 : 1;
 
        return floatval($flip * ($degrees + ($minutes / 60) + ($seconds / 3600)));
 }
index 33e8843b0b5c69d2fba23073052a0ccb727f6081..71a15350c5f3f803f2ed53f7896c160656cd5bf6 100644 (file)
@@ -10,7 +10,7 @@ function convertquote($body, $reply)
                $quoteline = $arrbody[$i];
 
                while ((strlen($quoteline)>0) and ((substr($quoteline, 0, 1) == '>')
-                       or (substr($quoteline, 0, 1) == ' '))) {
+                       || (substr($quoteline, 0, 1) == ' '))) {
                        if (substr($quoteline, 0, 1) == '>')
                                $quotelevel++;
 
index a9f4679b48302ab8aabfc74e79e827a300d57d87..c184b5099ed758a30c961cc20e5438489f3aa8b1 100644 (file)
@@ -323,7 +323,7 @@ class xml {
 
                        if ($type == "open") {   // The starting of the tag '<tag>'
                                $parent[$level-1] = &$current;
-                               if (!is_array($current) or (!in_array($tag, array_keys($current)))) { // Insert New tag
+                               if (!is_array($current) || (!in_array($tag, array_keys($current)))) { // Insert New tag
                                        $current[$tag] = $result;
                                        if ($attributes_data) {
                                                $current[$tag. '_attr'] = $attributes_data;
index 6793d86a9cde65ca40a74d7354776f911567468c..e4ac9f04596671517fde7ca6e5ba94a6ec209a2c 100644 (file)
@@ -949,7 +949,7 @@ function settings_content(App $a) {
                                $is_experimental = file_exists('view/theme/' . $th . '/experimental');
                                $unsupported = file_exists('view/theme/' . $th . '/unsupported');
                                $is_mobile = file_exists('view/theme/' . $th . '/mobile');
-                               if (!$is_experimental or ($is_experimental && (get_config('experimentals','exp_themes')==1 or get_config('experimentals','exp_themes')===false))){
+                               if (!$is_experimental || ($is_experimental && (get_config('experimentals','exp_themes')==1 || get_config('experimentals','exp_themes')===false))){
                                        $theme_name = (($is_experimental) ?  sprintf("%s - \x28Experimental\x29", $f) : $f);
                                        if ($is_mobile) {
                                                $mobile_themes[$f]=$theme_name;
index e07f718004b54d428314bac83b02af563b276c59..35bdc94317ed8f00e782f667e01cbb0b2d0b89ae 100644 (file)
@@ -93,7 +93,7 @@ print "\nLoading base message.po...";
 // load base messages.po and extract msgids
 $base_msgids = array();
 $norm_base_msgids = array();
-$base_f = file("util/messages.po") or die("No base messages.po\n");
+$base_f = file("util/messages.po") || die("No base messages.po\n");
 $_f = 0; $_mid = ""; $_mids = array();
 foreach( $base_f as $l) {
        $l = trim($l);
index 1b84181db35d863acfddab73eac749a57a26a78f..d837bcefc981cb7f257504417fa7c98a572b0dfd 100755 (executable)
@@ -27,7 +27,7 @@ $Iterator = new RecursiveDirectoryIterator('src');
 foreach (new RecursiveIteratorIterator($Iterator) as $file) {
        if (substr($file, -4) === '.php') {
                passthru("$phpath -l $file", $ret);
-               $ret === 0 or die();
+               $ret === 0 || die();
        }
 }
 
@@ -35,21 +35,21 @@ echo "Directory: mod\n";
 $files = glob('mod/*.php');
 foreach ($files as $file) {
        passthru("$phpath -l $file", $ret);
-       $ret === 0 or die();
+       $ret === 0 || die();
 }
 
 echo "Directory: include\n";
 $files = glob('include/*.php');
 foreach ($files as $file) {
        passthru("$phpath -l $file", $ret);
-       $ret === 0 or die();
+       $ret === 0 || die();
 }
 
 echo "Directory: object\n";
 $files = glob('object/*.php');
 foreach ($files as $file) {
        passthru("$phpath -l $file", $ret);
-       $ret === 0 or die();
+       $ret === 0 || die();
 }
 
 echo "Directory: addon\n";
@@ -60,7 +60,7 @@ foreach ($dirs as $dir) {
        $files = glob($dir . '/' . $addon . '.php');
        foreach ($files as $file) {
                passthru("$phpath -l $file", $ret);
-               $ret === 0 or die();
+               $ret === 0 || die();
        }
 }
 
@@ -68,10 +68,10 @@ echo "String files\n";
 
 echo 'util/strings.php' . "\n";
 passthru("$phpath -l util/strings.php", $ret);
-$ret === 0 or die();
+$ret === 0 || die();
 
 $files = glob('view/lang/*/strings.php');
 foreach ($files as $file) {
        passthru("$phpath -l $file", $ret);
-       $ret === 0 or die();
+       $ret === 0 || die();
 }
index eaee46e92842a7c614e1f511e70d26709b42b808..298f0df57f51083d835251e4feb1ea877b0c0551 100644 (file)
@@ -21,7 +21,7 @@ function vier_init(App $a) {
 
        set_template_engine($a, 'smarty3');
 
-       if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()) {
+       if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] || $a->argv[0] === "network" && local_user()) {
                vier_community_info();
 
                $a->page['htmlhead'] .= "<link rel='stylesheet' type='text/css' href='view/theme/vier/wide.css' media='screen and (min-width: 1300px)'/>\n";