Ignore:
Timestamp:
08/26/2010 01:57:15 AM (21 months ago)
Author:
ofer
Message:

Fixes for fetch_original

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/WordPress/plugin/transposh/wp/transposh_db.php

    r516 r519  
    221221        $translation = $GLOBALS['wpdb']->escape(html_entity_decode($translation, ENT_NOQUOTES, 'UTF-8')); 
    222222        // 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); 
    226226            return $cached; 
    227227        } 
     
    241241 
    242242        // 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); 
    244244 
    245245        logger("Exit: $translation/$original", 4); 
     
    400400 
    401401        // check params 
    402         logger("Enter " . __FILE__ . " Params: $original , $translation, $lang, $ref", 3); 
     402        logger("Enter " . __FILE__ . " Params: $original , $lang, $ref", 3); 
    403403        if (!isset($original) || !isset($lang)) { 
    404404            logger("Enter " . __FILE__ . " missing params: $original, $lang," . $ref, 0); 
Note: See TracChangeset for help on using the changeset viewer.