Changeset 533
- Timestamp:
- 09/02/2010 12:38:57 AM (17 months ago)
- Location:
- trunk/WordPress/plugin/transposh
- Files:
-
- 2 edited
-
transposh.php (modified) (4 diffs)
-
wp/transposh_db.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/transposh.php
r529 r533 134 134 add_action('comment_post', array(&$this, 'add_comment_meta_settings'), 1); 135 135 // comment_moderation_text - future filter TODO 136 137 136 // full post wrapping (should happen late) 138 137 add_filter('the_content', array(&$this, 'post_content_wrap'), 9999); … … 217 216 logger('Translation completed in ' . ($end_time - $start_time) . ' seconds', 1); 218 217 } 219 218 220 219 return $buffer; 221 220 } … … 433 432 434 433 // attempt to remove old files 435 @unlink($this->transposh_plugin_dir.'widgets/tpw_default.php');436 @unlink($this->transposh_plugin_dir.'core/globals.php');434 @unlink($this->transposh_plugin_dir . 'widgets/tpw_default.php'); 435 @unlink($this->transposh_plugin_dir . 'core/globals.php'); 437 436 438 437 logger("plugin_activate exit: " . dirname(__FILE__)); … … 619 618 $use_params = FALSE; 620 619 logger("got: $href", 5); 620 // fix what might be messed up 621 $href = str_replace(array(TP_GTXT_BRK, TP_GTXT_IBRK, TP_GTXT_BRK_CLOSER, TP_GTXT_IBRK_CLOSER), '', $href); 621 622 622 623 // Ignore urls not from this site -
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.
