Changeset 643
- Timestamp:
- 06/22/2011 08:37:01 PM (11 months ago)
- File:
-
- 1 edited
-
trunk/WordPress/plugin/transposh/core/parser.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/core/parser.php
r633 r643 133 133 /** @var array Contains reference to changable option values */ 134 134 private $otags = array(); 135 private $edit_span_created = false; 135 136 136 137 /** … … 545 546 // Use base64 encoding to make that when the page is translated (i.e. update_translation) we 546 547 // get back exactlly the same string without having the client decode/encode it in anyway. 548 $this->edit_span_created = true; 547 549 $span = '<span class ="' . SPAN_PREFIX . '" id="' . SPAN_PREFIX . $this->span_id . '" data-token="' . transposh_utils::base64_url_encode($original_text) . '" data-source="' . $source . '"'; 548 550 // if we have a source language … … 712 714 // fix urls... 713 715 foreach ($this->atags as $e) { 714 $e->href = call_user_func_array($this->url_rewrite_func, array($e->href));716 if ($e->href) $e->href = call_user_func_array($this->url_rewrite_func, array($e->href)); 715 717 } 716 718 foreach ($this->otags as $e) { 717 $e->value = call_user_func_array($this->url_rewrite_func, array($e->value));719 if ($e->value) $e->value = call_user_func_array($this->url_rewrite_func, array($e->value)); 718 720 } 719 721 … … 866 868 $this->stats->stop_timing(); 867 869 $head = $this->html->find('head', 0); 868 if ($head != null) $head->lastChild()->outertext .= $this->added_header; 870 if ($this->edit_span_created) { 871 if ($head != null) { 872 $head->lastChild()->outertext .= $this->added_header; 873 } 874 } 875 //exit; 869 876 if ($head != null) 870 877 $head->lastChild()->outertext .= "\n<meta name=\"translation-stats\" content='" . json_encode($this->stats) . "'/>";
Note: See TracChangeset
for help on using the changeset viewer.
