X-Git-Url: http://git.dj3c1t.com/index.cgi?a=blobdiff_plain;f=app%2Fdata%2Fmodules%2Fsql%2Fsml_data_sources_cache_db.php;h=9b972a737809c5aec202261fd197b79a2c702db8;hb=0b1ecd8b7536944d54d74ffc836982de3654d98b;hp=2497e5892a4da1bdf52df1f41cdab206759b2abf;hpb=3647c6bed06b3a1e3e014ef5a21074e7a6192899;p=mw_sourceml diff --git a/app/data/modules/sql/sml_data_sources_cache_db.php b/app/data/modules/sql/sml_data_sources_cache_db.php index 2497e58..9b972a7 100644 --- a/app/data/modules/sql/sml_data_sources_cache_db.php +++ b/app/data/modules/sql/sml_data_sources_cache_db.php @@ -2,7 +2,7 @@ class sml_data_sources_cache_db extends mw_data{ - function source_cache_db(){ + public function source_cache_db(){ $sgbd = $this->sgbd(); $cache = array(); try{ @@ -11,11 +11,13 @@ while($v_rst = $sgbd->fetch_assoc($rst)) $cache[$v_rst["id"]] = $v_rst; $sgbd->free_result($rst); } - catch(Exception $e) { $cache = false; } + catch(Exception $e){ + $cache = false; + } return $cache; } - function source_cache_infos_db($url){ + public function source_cache_infos_db($url){ $sgbd = $this->sgbd(); $cache_infos = array(); try{ @@ -24,11 +26,13 @@ if($v_rst = $sgbd->fetch_assoc($rst)) $cache_infos = $v_rst; $sgbd->free_result($rst); } - catch(Exception $e) { $cache_infos = false; } + catch(Exception $e){ + $cache_infos = false; + } return $cache_infos; } - function add_source_cache_db($url, $cache_index){ + public function add_source_cache_db($url, $cache_index){ $sgbd = $this->sgbd(); try{ $sql = @@ -39,21 +43,23 @@ .")"; $sgbd->query($sql); } - catch(Exception $e) { return false; } + catch(Exception $e){ + return false; + } return true; } - function del_source_cache_db($id_cache_data){ + public function del_source_cache_db($id_cache_data){ $env = $this->env(); $sgbd = $this->sgbd(); try{ $sql = "DELETE FROM #--sml_source_cache WHERE id=".$this->eq($id_cache_data); $sgbd->query($sql); } - catch(Exception $e) { return false; } + catch(Exception $e){ + return false; + } return true; } } - -?> \ No newline at end of file