Project

General

Profile

Bug #25040 » 17592_v3.patch

Administrator Admin, 2011-02-17 21:54

View differences:

t3lib/class.t3lib_pagerenderer.php (revision )
/**
* Adds the ExtDirect code
*
* @param array $filterNamespaces limit the output to defined namespaces. If empty, all namespaces are generated
* @return void
*/
public function addExtDirectCode() {
public function addExtDirectCode(array $filterNamespaces = array()) {
if ($this->extDirectCodeAdded) {
return;
}
$this->extDirectCodeAdded = TRUE;
$token = '';
if (count($filterNamespaces) === 0) {
$filterNamespaces = array('TYPO3');
}
// for ExtDirect we need flash message support
$this->addJsFile(t3lib_div::resolveBackPath($this->backPath . '../t3lib/js/extjs/ux/flashmessages.js'));
// add language labels for ExtDirect
if (TYPO3_MODE === 'FE') {
$this->addInlineLanguageLabelArray(array(
'extDirect_timeoutHeader' => $GLOBALS['TSFE']->sL('LLL:EXT:lang/locallang_misc.xml:extDirect_timeoutHeader'),
'extDirect_timeoutMessage' => $GLOBALS['TSFE']->sL('LLL:EXT:lang/locallang_misc.xml:extDirect_timeoutMessage'),
));
} else {
$this->addInlineLanguageLabelArray(array(
'extDirect_timeoutHeader' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:extDirect_timeoutHeader'),
'extDirect_timeoutMessage' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:extDirect_timeoutMessage'),
));
}
$token = $api = '';
if (TYPO3_MODE === 'BE') {
$formprotection = t3lib_formprotection_Factory::get();
$token = $formprotection->generateToken('extDirect');
......
if (event.code === Ext.Direct.exceptions.TRANSPORT && !event.where) {
TYPO3.Flashmessage.display(
TYPO3.Severity.error,
TYPO3.LLL.extDirect.timeoutHeader,
TYPO3.LLL.extDirect.timeoutMessage,
TYPO3.lang.extDirect_timeoutHeader,
TYPO3.lang.extDirect_timeoutMessage,
30
);
} else {
t3lib/stddb/tables.php (revision )
'protectedSection' => 'status-overlay-includes-subpages',
);
?>
?>
typo3/sysext/workspaces/Classes/Controller/PreviewController.php (revision )
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/Controller/PreviewController.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/Controller/PreviewController.php']);
}
?>
?>
typo3/classes/class.livesearch.php (revision )
*/
protected function addJavascriptToBackend() {
$pageRenderer = $GLOBALS['TBE_TEMPLATE']->getPageRenderer();
$pageRenderer->addJsFile('ajax.php?ajaxID=ExtDirect::getAPI&namespace=TYPO3.LiveSearchActions&' . TYPO3_version, 'text/javascript', $compress = FALSE);
$this->backendReference->addJavascriptFile('js/livesearch.js');
}
typo3/sysext/em/classes/class.tx_em_extensionmanager.php (revision )
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/class.tx_em_extensionsmanager.php']);
}
?>
?>
typo3/template.php (revision )
protected function loadCshJavascript() {
$this->pageRenderer->loadExtJS();
$this->pageRenderer->addJsFile($this->backPath .'../t3lib/js/extjs/contexthelp.js');
$this->pageRenderer->addJsFile($this->backPath . 'ajax.php?ajaxID=ExtDirect::getAPI&namespace=TYPO3.CSH&' . TYPO3_version, NULL, FALSE);
$this->pageRenderer->addExtDirectCode();
}
t3lib/core_autoload.php (revision )
't3lib_spritemanager_spritebuildinghandler' => PATH_t3lib . 'spritemanager/class.t3lib_spritemanager_spritebuildinghandler.php',
't3lib_spritemanager_abstracthandler' => PATH_t3lib . 'spritemanager/class.t3lib_spritemanager_abstracthandler.php',
't3lib_extjs_extdirectdebug' => PATH_t3lib . 'extjs/class.t3lib_extjs_extdirectdebug.php',
't3lib_extjs_extdirectapi' => PATH_t3lib . 'extjs/class.t3lib_extjs_extdirectapi.php',
't3lib_tree_abstracttree' => PATH_t3lib . 'tree/class.t3lib_tree_abstracttree.php',
't3lib_tree_abstractdataprovider' => PATH_t3lib . 'tree/class.t3lib_tree_abstractdataprovider.php',
't3lib_tree_abstractstateprovider' => PATH_t3lib . 'tree/class.t3lib_tree_abstractstateprovider.php',
typo3/backend.php (revision )
foreach ($jsFiles as $jsFile) {
$this->pageRenderer->addJsFile($relativeComponentPath . 'javascript/' . $jsFile);
}
if (is_array($info['extDirectNamespaces']) && count($info['extDirectNamespaces'])) {
foreach ($info['extDirectNamespaces'] as $namespace) {
$this->pageRenderer->addJsFile(
'ajax.php?ajaxID=ExtDirect::getAPI&namespace=' . $namespace . '&' . TYPO3_version,
NULL,
FALSE
);
}
}
}
}
}
}
/**
* renders the items in the top toolbar
......
'helpDescriptionPages',
'helpDescriptionContent',
),
'extDirect' => array(
'timeoutHeader',
'timeoutMessage',
),
'viewPort' => array(
'tooltipModuleMenuSplit',
'tooltipNavigationContainerSplitDrag',
typo3/sysext/workspaces/Classes/Controller/ReviewController.php (revision )
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/Controller/ReviewController.php']);
}
?>
?>
t3lib/class.t3lib_extmgm.php (revision )
*
* @param string $module
* @param string $componentId
* @param array $extDirectNamespaces
* @return void
*/
public static function addNavigationComponent($module, $componentId, $extDirectNamespaces = array()) {
public static function addNavigationComponent($module, $componentId) {
$GLOBALS['TBE_MODULES']['_navigationComponents'][$module] = array(
'componentId' => $componentId,
'extKey' => $GLOBALS['_EXTKEY'],
'isCoreComponent' => FALSE,
'extDirectNamespaces' => $extDirectNamespaces
);
}
......
*
* @param string $module
* @param string $componentId
* @param array $extDirectNamespaces
* @return void
*/
public static function addCoreNavigationComponent($module, $componentId, $extDirectNamespaces = array()) {
self::addNavigationComponent($module, $componentId, $extDirectNamespaces);
public static function addCoreNavigationComponent($module, $componentId) {
self::addNavigationComponent($module, $componentId);
$GLOBALS['TBE_MODULES']['_navigationComponents'][$module]['isCoreComponent'] = TRUE;
}
t3lib/extjs/class.t3lib_extjs_extdirectapi.php (revision )
* @return void
*/
public function getAPI($ajaxParams, TYPO3AJAX $ajaxObj) {
$filterNamespace = t3lib_div::_GET('namespace');
// Check GET-parameter no_cache and extCache setting
$extCache = isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['extCache']) && (
$GLOBALS['TYPO3_CONF_VARS']['SYS']['extCache'] === 0 ||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['extCache'] === '0'
);
$noCache = t3lib_div::_GET('no_cache') ? TRUE : $extCache;
// look up into the cache
$cacheIdentifier = 'ExtDirectApi';
$cacheHash = md5($cacheIdentifier . $filterNamespace . t3lib_div::getIndpEnv('TYPO3_SSL') .
serialize($this->settings) . TYPO3_MODE . t3lib_div::getIndpEnv('HTTP_HOST'));
// with no_cache always generate the javascript content
$cacheContent = $noCache ? '' : t3lib_pageSelect::getHash($cacheHash);
// generate the javascript content if it wasn't found inside the cache and cache it!
if (!$cacheContent) {
$javascriptNamespaces = $this->generateAPI($filterNamespace);
if (!empty($javascriptNamespaces)) {
t3lib_pageSelect::storeHash(
$cacheHash,
serialize($javascriptNamespaces),
$cacheIdentifier
);
$ajaxObj->setContent(array());
}
}
} else {
$javascriptNamespaces = unserialize($cacheContent);
}
// enable caching
$expireDate = date('r', $GLOBALS['EXEC_TIME'] + 3600 * 24 * 30);
......
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/extjs/class.t3lib_extjs_extdirectapi.php']);
}
?>
?>
(2-2/2)