Changing our coding standards slightly:
[isso.git] / Functions.php
index 89d1c22e3a27be3d0e53fb817a99f77361354752..8fb154ccb847f48c813e2f636d20be3e8052321e 100644 (file)
@@ -197,7 +197,7 @@ class BSFunctions
        */
        public static function download_file($file, $name, $exit = true)
        {
-               if (self::is_browser('ie') OR self::is_browser('opera') OR self::is_browser('safari'))
+               if (self::is_browser('ie') || self::is_browser('opera') || self::is_browser('safari'))
                {
                        $mime = 'application/octetstream';
                }
@@ -284,7 +284,7 @@ class BSFunctions
                // -------------------------------------------------------------------
                # Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.1; .NET CLR 1.0.2914)
                # Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
-               if (preg_match('#msie ([0-9\.]+)#', $useragent, $matches) !== false AND !isset($browser['opera']))
+               if (preg_match('#msie ([0-9\.]+)#', $useragent, $matches) !== false && !isset($browser['opera']))
                {
                        if (isset($matches[1]))
                        {
@@ -322,7 +322,7 @@ class BSFunctions
                // -------------------------------------------------------------------
                # Mozilla/5.001 (windows; U; NT4.0; en-us) Gecko/25250101
                # Mozilla/5.001 (Macintosh; N; PPC; ja) Gecko/25250101 MegaCorpBrowser/1.0 (MegaCorp, Inc.)
-               if (preg_match('#gecko/([0-9]+)#', $useragent, $matches) !== false AND !isset($browser['safari']))
+               if (preg_match('#gecko/([0-9]+)#', $useragent, $matches) !== false && !isset($browser['safari']))
                {
                        if (isset($matches[1]))
                        {
@@ -556,15 +556,15 @@ class BSFunctions
                $path = self::fetch_source_path($path);
                
                $dir = new DirectoryIterator($path);
-               foreach ($dir AS $file)
+               foreach ($dir as $file)
                {
                        $name = $file->getFilename();
-                       if (($file->isDot() OR $name[0] == '.') AND $ignoreDot)
+                       if (($file->isDot() || $name[0] == '.') && $ignoreDot)
                        {
                                continue;
                        }
                        
-                       if ($file->isDir() AND $recurse)
+                       if ($file->isDir() && $recurse)
                        {
                                $filelist = array_merge($filelist, self::_help_scan_directory($path . $name, $recurse, $ignoreDot, $pathAdd . BSFunctions::fetch_source_path(str_replace($path, '', $file->getPathname()))));
                                continue;
@@ -604,13 +604,13 @@ class BSFunctions
        */
        public static function array_strip_empty($array)
        {
-               foreach ($array AS $key => $value)
+               foreach ($array as $key => $value)
                {
                        if (is_array($array["$key"]))
                        {
                                $array["$key"] = self::array_strip_empty($array["$key"]);
                        }
-                       else if (empty($value) OR is_null($value))
+                       else if (empty($value) || is_null($value))
                        {
                                unset($array["$key"]);
                        }
@@ -642,7 +642,7 @@ class BSFunctions
 
                // Iterate backtrace
                $calls = array();
-               foreach ($backtrace AS $i => $call)
+               foreach ($backtrace as $i => $call)
                {
                        if (!isset($call['file']))
                        {
@@ -659,7 +659,7 @@ class BSFunctions
                        if (isset($call['args']))
                        {
                                $args = array();
-                               foreach ($call['args'] AS $arg)
+                               foreach ($call['args'] as $arg)
                                {
                                        if (is_array($arg))
                                        {