cvs: smarty /docs/en/programmers/advanced-features section-template-cache-handler-func.xml

[email protected] ("Peter 'Mash' Morgan") Fri, 17 Feb 2006 22:19:14 -0000
Newsgroups php.smarty.cvs
Message-ID <cvspete_morgan1140214754@cvsserver>
pete_morgan		Fri Feb 17 22:19:14 2006 UTC

  Modified files:              
    /smarty/docs/en/programmers/advanced-features	
                                                 	section-template-cache-handler-func.xml 
  Log:
  minor tweaks
  
http://cvs.php.net/viewcvs.cgi/smarty/docs/en/programmers/advanced-features/section-template-cache-handler-func.xml?r1=1.3&r2=1.4&diff_format=u
Index: smarty/docs/en/programmers/advanced-features/section-template-cache-handler-func.xml
diff -u smarty/docs/en/programmers/advanced-features/section-template-cache-handler-func.xml:1.3 smarty/docs/en/programmers/advanced-features/section-template-cache-handler-func.xml:1.4
--- smarty/docs/en/programmers/advanced-features/section-template-cache-handler-func.xml:1.3	Fri Oct 29 10:00:55 2004
+++ smarty/docs/en/programmers/advanced-features/section-template-cache-handler-func.xml	Fri Feb 17 22:19:14 2006
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
   <sect1 id="section.template.cache.handler.func">
    <title>Cache Handler Function</title>
    <para>
@@ -67,7 +67,7 @@
 	$CacheID = md5($tpl_file.$cache_id.$compile_id);
 	
 	if(! $link = mysql_pconnect($db_host, $db_user, $db_pass)) {
-		$smarty_obj->_trigger_error_msg("cache_handler: could not connect to database");
+		$smarty_obj->_trigger_error_msg('cache_handler: could not connect to database');
 		return false;
 	}
 	mysql_select_db($db_name);
@@ -77,14 +77,14 @@
 			// read cache from database
 			$results = mysql_query("select CacheContents from CACHE_PAGES where CacheID='$CacheID'");
 			if(!$results) {
-				$smarty_obj->_trigger_error_msg("cache_handler: query failed.");			
+				$smarty_obj->_trigger_error_msg('cache_handler: query failed.');			
 			}
 			$row = mysql_fetch_array($results,MYSQL_ASSOC);
 			
-			if($use_gzip && function_exists("gzuncompress")) {
-				$cache_content = gzuncompress($row["CacheContents"]);
+			if($use_gzip && function_exists('gzuncompress')) {
+				$cache_content = gzuncompress($row['CacheContents']);
 			} else {
-				$cache_content = $row["CacheContents"];
+				$cache_content = $row['CacheContents'];
 			}
 			$return = $results;
 			break;
@@ -102,7 +102,7 @@
 							'".addslashes($contents)."')
 						");
 			if(!$results) {
-				$smarty_obj->_trigger_error_msg("cache_handler: query failed.");			
+				$smarty_obj->_trigger_error_msg('cache_handler: query failed.');			
 			}
 			$return = $results;
 			break;
@@ -110,12 +110,12 @@
 			// clear cache info
 			if(empty($cache_id) && empty($compile_id) && empty($tpl_file)) {
 				// clear them all
-				$results = mysql_query("delete from CACHE_PAGES");			
+				$results = mysql_query('delete from CACHE_PAGES');			
 			} else {
 				$results = mysql_query("delete from CACHE_PAGES where CacheID='$CacheID'");			
 			}
 			if(!$results) {
-				$smarty_obj->_trigger_error_msg("cache_handler: query failed.");			
+				$smarty_obj->_trigger_error_msg('cache_handler: query failed.');			
 			}
 			$return = $results;
 			break;