Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, November 12, 2026

Diff for Metafox/db.inc.php between version 1.21 and 1.22

version 1.21, 2006/07/08 19:34:00 version 1.22, 2006/07/08 22:22:10
Line 1347  function ezin_get_config() /* {{{ */
Line 1347  function ezin_get_config() /* {{{ */
         global $ezin_sys;          global $ezin_sys;
         global $ezin_db_handle;          global $ezin_db_handle;
   
         // Cache retrieval          // Config retrieval from cache
         $query = sprintf('SELECT * FROM %s WHERE id = "config"',          $content = ezin_cache_load_content('config');
                         $ezin_sys['db']['tables']['cache']);          if (isset($content)) {
         $result = @mysql_query($query, $ezin_db_handle)                  $array = @unserialize($content);
                 or ezin_db_error('ezin_get_config() [1]');  
         $row = @mysql_fetch_array($result, MYSQL_ASSOC);  
         @mysql_free_result($result);  
         if (isset($row['content'])) {  
                 $array = unserialize($row['content']);  
                 if (is_array($array) && count($array) > 0) {                  if (is_array($array) && count($array) > 0) {
                         return $array;                          return $array;
                   } else {
                           // for case that stored content was corrupted
                           ezin_cache_clear('config');
                 }                  }
         }          }
   
Line 1380  function ezin_get_config() /* {{{ */
Line 1378  function ezin_get_config() /* {{{ */
                 ezin_db_error('configuration not initialized');                  ezin_db_error('configuration not initialized');
         }          }
   
         // Config storage          // Config storage in cache
         $query = sprintf('INSERT INTO %s (id, timestamp, content)'          ezin_cache_save('config', serialize($array));
                         .' VALUES ("config", UNIX_TIMESTAMP(SYSDATE()), "%s")',  
                         $ezin_sys['db']['tables']['cache'], addslashes(serialize($array)));  
         @mysql_query($query, $ezin_db_handle)  
                 or ezin_db_error('ezin_get_config() [3]');  
   
         return $array;          return $array;
 } /* }}} */  } /* }}} */

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top