fantu
2008-12-23 043a0a320744d0f5f4214898210edd8a907b8030
replace function deprecated in php 5.3
5 files modified
16 ■■■■ changed files
interface/lib/classes/tpl_cache.inc.php 2 ●●● patch | view | raw | blame | history
server/lib/classes/file.inc.php 4 ●●●● patch | view | raw | blame | history
server/lib/classes/tpl.inc.php 2 ●●● patch | view | raw | blame | history
server/lib/classes/tpl_cache.inc.php 4 ●●●● patch | view | raw | blame | history
server/mods-available/monitor_core_module.inc.php 4 ●●●● patch | view | raw | blame | history
interface/lib/classes/tpl_cache.inc.php
@@ -161,7 +161,7 @@
        $filepath = dirname($file);
        if (is_dir($filepath)) return true;
        $dirs = split('[\\/]', $filepath);
        $dirs = preg_split('/[\\/]/', $filepath);
        $currpath;
        foreach ($dirs as $dir) {
            $currpath .= $dir .'/';
server/lib/classes/file.inc.php
@@ -300,13 +300,13 @@
           return $passed;
       }
       if (is_string($exts)) {
           if (eregi("\.". $exts ."$", $filename)) {
           if (preg_match("/\.". $exts ."$/i", $filename)) {
                           $passed = TRUE;
               return $passed;
           }
       } else if (is_array($exts)) {
           foreach ($exts as $theExt) {
               if (eregi("\.". $theExt ."$", $filename)) {
               if (preg_match("/\.". $theExt ."$/i", $filename)) {
                   $passed = TRUE;
                   return $passed;
               }
server/lib/classes/tpl.inc.php
@@ -1193,7 +1193,7 @@
            switch (strtolower($this->OPTIONS['UNKNOWNS'])) {
                case 'comment':
                    $comment = addcslashes('<!-- unknown variable '.ereg_replace('<!--|-->', '', $wholetag).'//-->', '"');
                    $comment = addcslashes('<!-- unknown variable '.preg_replace('/<!--|-->/', '', $wholetag).'//-->', '"');
                    $retstr .= ' else { print("'.$comment.'"); $this->_setUnknown("'.$varname.'"); }';
                    return $retstr;
                break;
server/lib/classes/tpl_cache.inc.php
@@ -82,7 +82,7 @@
     * @return boolean
     */
    function setCacheExtension($str = null) {
        if ($str == null || !ereg('^[a-z0-9]+$', strtolower($str))) return false;
        if ($str == null || !preg_match('/^[a-z0-9]+$/', strtolower($str))) return false;
        $this->OPTIONS['CACHE_EXTENSION'] = strtolower($str);
        return true;
    }
@@ -161,7 +161,7 @@
        $filepath = dirname($file);
        if (is_dir($filepath)) return true;
        $dirs = split('[\\/]', $filepath);
        $dirs = preg_split('/[\\/]/', $filepath);
        $currpath;
        foreach ($dirs as $dir) {
            $currpath .= $dir .'/';
server/mods-available/monitor_core_module.inc.php
@@ -262,7 +262,7 @@
        $memInfo = explode("\n", $miData);
        foreach($memInfo as $line){
            $part = split(":", $line);
            $part = preg_split("/:/", $line);
            $key = trim($part[0]);
            $tmp = explode(" ", trim($part[1]));
            $value = 0;
@@ -312,7 +312,7 @@
        $cpuInfo = explode("\n", $cpuData);
        foreach($cpuInfo as $line){
            $part = split(":", $line);
            $part = preg_split("/:/", $line);
            $key = trim($part[0]);
            $value = trim($part[1]);
            $data[$key] = $value;