Changeset 519 for trunk/WordPress/plugin/transposh/wp/transposh_db.php
- Timestamp:
- 08/26/2010 01:57:15 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/wp/transposh_db.php
r516 r519 221 221 $translation = $GLOBALS['wpdb']->escape(html_entity_decode($translation, ENT_NOQUOTES, 'UTF-8')); 222 222 // The translation might be cached (notice the additional postfix) 223 $cached= $this->cache_fetch('R_' . $translation, $lang);224 if ($ cached !== false) {225 logger("Exit from cache: $ cached", 4);223 list($rev,$cached) = $this->cache_fetch('R_' . $translation, $lang); 224 if ($rev == 'r') { 225 logger("Exit from cache: $translation $cached", 4); 226 226 return $cached; 227 227 } … … 241 241 242 242 // we can store the result in the cache (or the fact we don't have one) 243 $this->cache_store('R_' . $translation, $lang, $original, TP_CACHE_TTL);243 $this->cache_store('R_' . $translation, $lang, array('r',$original), TP_CACHE_TTL); 244 244 245 245 logger("Exit: $translation/$original", 4); … … 400 400 401 401 // check params 402 logger("Enter " . __FILE__ . " Params: $original , $ translation, $lang, $ref", 3);402 logger("Enter " . __FILE__ . " Params: $original , $lang, $ref", 3); 403 403 if (!isset($original) || !isset($lang)) { 404 404 logger("Enter " . __FILE__ . " missing params: $original, $lang," . $ref, 0);
Note: See TracChangeset
for help on using the changeset viewer.
