Index: trunk/core/kernel/languages/phrases_cache.php
===================================================================
diff -u -N -r4880 -r4940
--- trunk/core/kernel/languages/phrases_cache.php (.../phrases_cache.php) (revision 4880)
+++ trunk/core/kernel/languages/phrases_cache.php (.../phrases_cache.php) (revision 4940)
@@ -105,8 +105,22 @@
$label = strtoupper($label);
if(isset($this->Phrases[$label])) {
$translated_label = $this->Phrases[$label];
- if (defined('DEBUG_MODE') && DEBUG_MODE && constOn('DBG_PHRASES_HIGHLIGHT') && !$this->Application->IsAdmin()) {
- $translated_label = ''.$translated_label.' '.$original_label.'';
+ // debug mode is checked directly to improve performance
+ if (defined('DEBUG_MODE') && DEBUG_MODE && constOn('DBG_PHRASES_HIGHLIGHT')) {
+ if (!$this->Application->isDebugMode()) return $translated_label;
+
+ if ($this->Application->IsAdmin()) {
+ $sql = 'SELECT Module
+ FROM '.TABLE_PREFIX.'Phrase
+ WHERE (LanguageId = '.$this->LanguageId.') AND (Phrase = '.$this->Conn->qstr($label).')';
+ $this->Application->Debugger->appendHTML('Phrase: '.$label.'; Module: '.$this->Conn->GetOne($sql).'');
+// $translated_label = $translated_label.' [m: '.$this->Conn->GetOne($sql).'; l: '.$label.']';
+ }
+ else {
+ // highlight text created via translated phrase (used to detect if text on screen is phrase or not)
+ $translated_label = ''.$translated_label.' '.$original_label.'';
+ }
+
}
return $translated_label;
}