Changeset 533 for trunk/WordPress/plugin/transposh/wp/transposh_db.php
- Timestamp:
- 09/02/2010 12:38:57 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/wp/transposh_db.php
r519 r533 76 76 } 77 77 logger("Cache fetched: $original => $cached", 4); 78 if ($cached !== null) $cached = explode('_', $cached, 2); 78 if ($cached !== null && $cached !== false) 79 $cached = explode('_', $cached, 2); 79 80 return $cached; 80 81 } … … 164 165 $this->translations[$row['original']] = array($row['source'], stripslashes($row['translated'])); 165 166 } 166 logger('prefetched: ' .count($this->translations), 5);167 logger('prefetched: ' . count($this->translations), 5); 167 168 } 168 169 … … 221 222 $translation = $GLOBALS['wpdb']->escape(html_entity_decode($translation, ENT_NOQUOTES, 'UTF-8')); 222 223 // The translation might be cached (notice the additional postfix) 223 list($rev, $cached) = $this->cache_fetch('R_' . $translation, $lang);224 list($rev, $cached) = $this->cache_fetch('R_' . $translation, $lang); 224 225 if ($rev == 'r') { 225 226 logger("Exit from cache: $translation $cached", 4); … … 241 242 242 243 // we can store the result in the cache (or the fact we don't have one) 243 $this->cache_store('R_' . $translation, $lang, array('r', $original), TP_CACHE_TTL);244 $this->cache_store('R_' . $translation, $lang, array('r', $original), TP_CACHE_TTL); 244 245 245 246 logger("Exit: $translation/$original", 4);
Note: See TracChangeset
for help on using the changeset viewer.
