Project

General

Profile

Feature #23574 » 15754_v4.diff

Administrator Admin, 2010-09-21 18:44

View differences:

t3lib/class.t3lib_pagerenderer.php (Arbeitskopie)
if (TYPO3ViewportInstance !== null) {
TYPO3ViewportInstance.DebugConsole.addTab(message, header, group);
} else if (typeof console === "object") {
console.log(message);
} else {
document.write(message);
}
};
Ext.Direct.on("exception", function(event) {
extDirectDebug(
"<p>" + event.message + "<\/p>" +
"<p style=\"margin-top: 20px;\">" +
var backtrace = "";
if (event.where) {
backtrace = "<p style=\"margin-top: 20px;\">" +
"<strong>Backtrace:<\/strong><br \/>" +
event.where.replace(/#/g, "<br \/>#") +
"<\/p>",
"<\/p>";
}
extDirectDebug(
"<p>" + event.message + "<\/p>" + backtrace,
event.method,
"ExtDirect - Exception"
);
t3lib/extjs/class.t3lib_extjs_extdirectapi.php (Arbeitskopie)
// look up into the cache
$cacheIdentifier = 'ExtDirectApi';
$cacheHash = md5($cacheIdentifier . $filterNamespace . serialize($this->settings));
$cacheHash = md5($cacheIdentifier . $filterNamespace .
serialize($this->settings) . TYPO3_MODE);
// with no_cache always generate the javascript content
$cacheContent = $noCache ? '' : t3lib_pageSelect::getHash($cacheHash);
......
if (!isset($javascriptNamespaces[$javascriptNamespace])) {
$javascriptNamespaces[$javascriptNamespace] = array(
'url' => t3lib_div::locationHeaderUrl('ajax.php?ajaxID=ExtDirect::route&namespace=') . rawurlencode($javascriptNamespace),
'url' => $this->getRoutingUrl($javascriptNamespace),
'type' => 'remoting',
'actions' => array(),
'namespace' => $javascriptNamespace
......
return $javascriptNamespaces;
}
/**
* Returns the convenient path for the routing Urls based on the TYPO3 mode.
*
* @param string $namespace
* @return string
*/
public function getRoutingUrl($namespace) {
$url = '';
if (TYPO3_MODE === 'FE') {
$url = t3lib_div::locationHeaderUrl('?eID=ExtDirect&action=route&namespace=');
} else {
$url = t3lib_div::locationHeaderUrl('ajax.php?ajaxID=ExtDirect::route&namespace=');
}
$url .= rawurlencode($namespace);
return $url;
}
}
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_extjs_extdirectapi.php']) {
typo3/sysext/cms/tslib/extdirecteid.php (Revision 0)
<?php
/***************************************************************
* Copyright notice
*
* (c) 2010 Stefan Galinski <stefan.galinski@gmail.com>
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
if (!defined('PATH_typo3conf')) {
die('Could not access this script directly!');
}
$extDirectEidInstance = t3lib_div::makeInstance('tslib_ExtDirectEid');
if ($extDirectEidInstance->actionIsAllowed()) {
$extDirectEidInstance->routeAction();
$extDirectEidInstance->render();
}
?>
typo3/sysext/cms/tslib/class.tslib_extdirecteid.php (Revision 0)
<?php
/***************************************************************
* Copyright notice
*
* (c) 2010 Stefan Galinski <stefan.galinski@gmail.com>
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
require_once(PATH_site . 'typo3/classes/class.typo3ajax.php');
/**
* eID controller for ExtDirect
*
* @author Stefan Galinski <stefan.galinski@gmail.com>
* @package TYPO3
*/
class tslib_ExtDirectEid {
/**
* Ajax Instance
*
* @property TYPO3AJAX
* @var TYPO3AJAX
*/
protected $ajaxObjext = NULL;
/**
* Routes the given eID action to the related ExtDirect method with the necessary
* ajax object.
*
* @return void
*/
public function routeAction() {
$GLOBALS['LANG'] = t3lib_div::makeInstance('language');
$GLOBALS['LANG']->init();
tslib_eidtools::connectDB();
$ajaxID = t3lib_div::_GP('action');
$ajaxScript = $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['ExtDirect::' . $ajaxID];
$this->ajaxObject = t3lib_div::makeInstance('TYPO3AJAX', 'ExtDirect::' . $ajaxID);
$parameters = array();
t3lib_div::callUserFunction($ajaxScript, $parameters, $this->ajaxObject, FALSE, TRUE);
}
/**
* Returns true if the associated action in _GET is allowed.
*
* @return boolean
*/
public function actionIsAllowed() {
if (!in_array(t3lib_div::_GP('action'), array('route', 'getAPI'))) {
return FALSE;
}
return TRUE;
}
/**
* Renders/Echoes the ajax output
*
* @return void
*/
public function render() {
$this->ajaxObject->render();
}
}
?>
typo3/sysext/cms/ext_autoload.php (Arbeitskopie)
'fe_loaddbgroup' => PATH_tslib . 'class.tslib_pagegen.php',
'tslib_pibase' => PATH_tslib . 'class.tslib_pibase.php',
'tslib_search' => PATH_tslib . 'class.tslib_search.php',
'tslib_extdirecteid' => PATH_tslib . 'class.tslib_extdirecteid.php',
'sc_tslib_showpic' => PATH_tslib . 'showpic.php',
'tx_cms_mediaitems' => PATH_tslib . 'hooks/class.tx_cms_mediaitems.php',
'tx_cms_treelistcacheupdate' => PATH_tslib . 'hooks/class.tx_cms_treelistcacheupdate.php',
(5-5/6)