Index: branches/RC/core/units/languages/languages_event_handler.php =================================================================== diff -u -N -r10098 -r10577 --- branches/RC/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 10098) +++ branches/RC/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 10577) @@ -16,6 +16,7 @@ 'OnImportProgress' => Array('self' => 'advanced:import'), 'OnExportLanguage' => Array('self' => 'advanced:export'), 'OnExportProgress' => Array('self' => 'advanced:export'), + 'OnReflectMultiLingualFields' => Array ('self' => 'view'), 'OnItemBuild' => Array('self' => true), ); @@ -30,6 +31,10 @@ */ function OnReflectMultiLingualFields(&$event) { + if ($this->Application->GetVar('ajax') == 'yes') { + $event->status = erSTOP; + } + $ml_helper =& $this->Application->recallObject('kMultiLanguageHelper'); /* @var $ml_helper kMultiLanguageHelper */ Index: branches/RC/core/units/admin/admin_events_handler.php =================================================================== diff -u -N -r10455 -r10577 --- branches/RC/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 10455) +++ branches/RC/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 10577) @@ -39,23 +39,40 @@ return parent::CheckPermission($event); } + /** + * Enter description here... + * + * @param kEvent $event + */ function OnResetModRwCache(&$event) { + if ($this->Application->GetVar('ajax') == 'yes') { + $event->status = erSTOP; + } $this->Conn->Query('DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName LIKE "mod_rw%"'); } function OnResetCMSMenuCache(&$event) { + if ($this->Application->GetVar('ajax') == 'yes') { + $event->status = erSTOP; + } $this->Conn->Query('DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName = "cms_menu"'); } function OnResetSections(&$event) { + if ($this->Application->GetVar('ajax') == 'yes') { + $event->status = erSTOP; + } $this->Conn->Query('DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName = "sections_parsed"'); } function OnResetConfigsCache(&$event) { + if ($this->Application->GetVar('ajax') == 'yes') { + $event->status = erSTOP; + } $this->Conn->Query('DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName = "config_files" OR VarName = "configs_parsed" OR VarName = "sections_parsed"'); } @@ -206,6 +223,10 @@ */ function OnRebuildThemes(&$event) { + if ($this->Application->GetVar('ajax') == 'yes') { + $event->status = erSTOP; + } + $themes_helper =& $this->Application->recallObject('ThemesHelper'); /* @var $themes_helper kThemesHelper */ Index: branches/RC/core/kernel/utility/debugger/debugger.js =================================================================== diff -u -N -r9389 -r10577 --- branches/RC/core/kernel/utility/debugger/debugger.js (.../debugger.js) (revision 9389) +++ branches/RC/core/kernel/utility/debugger/debugger.js (.../debugger.js) (revision 10577) @@ -28,7 +28,8 @@ } } } - req.open('GET', p_url, true); + var $ajax_mark = (p_url.indexOf('?') ? '&' : '?') + 'ajax=yes'; + req.open('GET', p_url + $ajax_mark, true); req.setRequestHeader('If-Modified-Since', 'Sat, 1 Jan 2000 00:00:00 GMT'); req.send(null); var toId = window.setTimeout( function() {if (p_busyReq) req.abort();}, DebugReq.timeout ); @@ -217,6 +218,11 @@ } Debugger.prototype.successCallback = function(p_req, p_pass, p_object) { + if (p_pass == 'resetCache') { + alert('Requested action performed.'); + return ; + } + var contents = p_req.responseText; contents = contents.split(p_object.RowSeparator); @@ -355,6 +361,18 @@ } } +Debugger.prototype.resetCache = function ($event_source) { + var $events = document.getElementById($event_source); + var $event = $events.options[$events.selectedIndex].value; + + if (!$event) { + alert('Please select action to perform first!'); + } + else if (confirm('Really perform "' + $events.options[$events.selectedIndex].innerHTML + '"?')) { + DebugReq.makeRequest(this.EventURL + '&' + $event, this.busyRequest, '', this.successCallback, this.errorCallback, 'resetCache', this); + } +} + Debugger.prototype.mouseCoords = function(ev) { if(ev.pageX || ev.pageY){ Index: branches/RC/core/kernel/utility/debugger.php =================================================================== diff -u -N -r10459 -r10577 --- branches/RC/core/kernel/utility/debugger.php (.../debugger.php) (revision 10459) +++ branches/RC/core/kernel/utility/debugger.php (.../debugger.php) (revision 10577) @@ -459,8 +459,8 @@ default: // number or string - if (mb_strlen($array) > 200) { - $array = mb_substr($array, 0, 50).' ...'; + if (strlen($array) > 200) { + $array = substr($array, 0, 50).' ...'; } return $array."\n"; break; @@ -490,8 +490,8 @@ case 'integer': case 'double': case 'string': - if (mb_strlen($array[$key]) > 200) { - $array[$key] = mb_substr($array[$key], 0, 50).' ...'; + if (strlen($array[$key]) > 200) { + $array[$key] = substr($array[$key], 0, 50).' ...'; } $output .= $tabsign.'['.$key.'] = '.$array[$key]."\n"; break; @@ -624,7 +624,7 @@ function isGecko() { // we need isset because we may run scripts from shell with no user_agent at all - return isset($_SERVER['HTTP_USER_AGENT']) && mb_strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), 'firefox') !== false; + return isset($_SERVER['HTTP_USER_AGENT']) && strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'firefox') !== false; } /** @@ -752,10 +752,17 @@ $this->appendHTML('ScriptName: '.$this->getFileLink($script, 1, basename($script)).' ('.dirname($script).')'); if (isset($_REQUEST['ajax']) && $_REQUEST['ajax'] == 'yes') { - $this->appendHTML('RequestURI: '.$_SERVER['REQUEST_URI'].' (QS Length:'.mb_strlen($_SERVER['QUERY_STRING']).')'); + $this->appendHTML('RequestURI: '.$_SERVER['REQUEST_URI'].' (QS Length:'.strlen($_SERVER['QUERY_STRING']).')'); } - $this->appendHTML('DomViewer:  '); + $tools_html = ' + + + + +
' . $this->_getDomViewerHTML() . '' . $this->_getToolsHTML() . '
'; + $this->appendHTML($tools_html); + ob_start(); ?> @@ -1081,7 +1088,9 @@ return ''; } + $application =& kApplication::Instance(); $dbg_path = str_replace(FULL_PATH, '', $this->tempFolder); + ob_start(); // the