*/
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';
}
// -------------------------------------------------------------------
# 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]))
{
// -------------------------------------------------------------------
# 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]))
{
$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;
*/
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"]);
}
// Iterate backtrace
$calls = array();
- foreach ($backtrace AS $i => $call)
+ foreach ($backtrace as $i => $call)
{
if (!isset($call['file']))
{
if (isset($call['args']))
{
$args = array();
- foreach ($call['args'] AS $arg)
+ foreach ($call['args'] as $arg)
{
if (is_array($arg))
{