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.29 and 1.30

version 1.29, 2006/09/13 14:48:12 version 1.30, 2006/09/20 15:02:07
Line 17 
Line 17 
  * http://platon.sk/projects/Metafox/   * http://platon.sk/projects/Metafox/
  */   */
   
 /* $Platon: Metafox/db.inc.php,v 1.28 2006-08-06 17:21:26 nepto Exp $ */  /* $Platon: Metafox/db.inc.php,v 1.29 2006-09-13 14:48:12 nepto Exp $ */
   
 /*  /*
  * updates: 23/5/2001, 29/7/2001, 11/10/2001, 2/11/2001, 11/1/2002, 23/7/2002   * updates: 23/5/2001, 29/7/2001, 11/10/2001, 2/11/2001, 11/1/2002, 23/7/2002
Line 1451  function ezin_cache_clear($cache_id = 'X
Line 1451  function ezin_cache_clear($cache_id = 'X
                 if (count($cache_id) <= 0) {                  if (count($cache_id) <= 0) {
                         $delete_all = true;                          $delete_all = true;
                 } else {                  } else {
                         $cache_id_list = '';                          $cache_id_list = array();
                         foreach ($cache_id as $id) {                          foreach ($cache_id as $id) {
                                 if ($id == 'Sglobal') {                                  if ($id == 'Sglobal') {
                                         $delete_gs = true;                                          $delete_gs = true;
                                         continue;                                          continue;
                                 }                                  }
                                 $cache_id_list .= ",'".addslashes(trim($id))."'";                                  $cache_id_list[] = "id LIKE '".addslashes(trim($id))."%'";
                         }                          }
                         $cache_id_list = substr($cache_id_list, 1);                          $query = sprintf('DELETE FROM %s WHERE %s',
                         $query = sprintf('DELETE FROM %s WHERE id IN (%s)',                                          $ezin_sys['db']['tables']['cache'],
                                         $ezin_sys['db']['tables']['cache'], $cache_id_list);                                          join(' OR ', $cache_id_list));
                 }                  }
         } else {          } else {
                 if (strlen($cache_id) <= 0) {                  if (strlen($cache_id) <= 0) {
Line 1470  function ezin_cache_clear($cache_id = 'X
Line 1470  function ezin_cache_clear($cache_id = 'X
                         $delete_gs  = true;                          $delete_gs  = true;
                 } else {                  } else {
                         $cache_id = addslashes(trim($cache_id));                          $cache_id = addslashes(trim($cache_id));
                         $query = sprintf('DELETE FROM %s WHERE id = "%s"',                          $query = sprintf('DELETE FROM %s WHERE id LIKE "%s%%"',
                                         $ezin_sys['db']['tables']['cache'], $cache_id);                                          $ezin_sys['db']['tables']['cache'], $cache_id);
                 }                  }
         }          }
         if ($delete_all) {          if ($delete_all) {
                 $query = 'DELETE FROM '.$ezin_sys['db']['tables']['cache'];                  $query = 'DELETE FROM '.$ezin_sys['db']['tables']['cache'];
         } else if ($delete_gs) {          } else if ($delete_gs) {
                 $query2 = 'SELECT id FROM '.$ezin_sys['db']['tables']['sections'].' WHERE type = "global"';                  $query2 = sprintf('SELECT id FROM %s WHERE type = "global"', $ezin_sys['db']['tables']['sections']);
                 $result = @mysql_query($query2, $ezin_db_handle)                  $result = @mysql_query($query2, $ezin_db_handle)
                         or ezin_db_error('ezin_cache_clear() [1]');                          or ezin_db_error('ezin_cache_clear() [1]');
                 $global_sections = array();                  $global_sections = array();

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

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