Project

General

Profile

Feature #46017 » patch_4.5.23_4.5.23_changed.diff

Frank Frewer, 2013-03-04 14:32

View differences:

typo3_src-4.5.23_changed/t3lib/js/extjs/components/pagetree/javascript/app.js 2013-03-04 09:47:28.000000000 +0100
app: this
}).hide();
var languageTree = new TYPO3.Components.PageTree.LanguageTree({
id: this.id + '-languageTree',
deletionDropZoneId: this.id + '-deletionDropZone',
ddGroup: this.id,
stateful: true,
stateId: 'Pagetree' + TYPO3.Components.PageTree.Configuration.temporaryMountPoint,
stateEvents: [],
autoScroll: true,
autoHeight: false,
plugins: new Ext.ux.state.TreePanel(),
commandProvider: TYPO3.Components.PageTree.Actions,
contextMenuProvider: TYPO3.Components.PageTree.ContextMenuDataProvider,
treeDataProvider: TYPO3.Components.PageTree.DataProvider,
app: this
});
var topPanel = new TYPO3.Components.PageTree.TopPanel({
dataProvider: TYPO3.Components.PageTree.DataProvider,
filteringTree: filteringTree,
languageTree: languageTree,
ddGroup: this.id,
tree: tree,
app: this
......
id: this.id + '-treeContainer',
region: 'center',
layout: 'fit',
items: [tree, filteringTree]
items: [tree, filteringTree,languageTree]
},
deletionDropZone
]
typo3_src-4.5.23_changed/t3lib/js/extjs/components/pagetree/javascript/filteringtree.js 2013-03-03 21:02:01.000000000 +0100
searchWord: '',
/**
* language ID
*
* @type {Integer}
*/
language: 0,
/**
* Tree loader implementation for the filtering tree
*
* @return {void}
......
if (!node.ownerTree.searchWord || node.ownerTree.searchWord === '') {
return false;
}
node.attributes.nodeData.language = node.ownerTree.language;
treeLoader.baseParams.nodeId = node.id;
treeLoader.baseParams.searchWord = node.ownerTree.searchWord;
treeLoader.baseParams.attributes = node.attributes.nodeData;
typo3_src-4.5.23_changed/t3lib/js/extjs/components/pagetree/javascript/languagetree.js 2013-03-03 21:03:07.000000000 +0100
/***************************************************************
* Copyright notice
*
* (c) 2010-2011 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.
* A copy is found in the textfile GPL.txt and important notices to the license
* from the author is found in LICENSE.txt distributed with these scripts.
*
*
* 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!
***************************************************************/
Ext.namespace('TYPO3.Components.PageTree');
/**
* @class TYPO3.Components.PageTree.LanguageTree
*
* Language Tree
*
* @namespace TYPO3.Components.PageTree
* @extends TYPO3.Components.PageTree.Tree
* @author Stefan Galinski <stefan.galinski@gmail.com>
*/
TYPO3.Components.PageTree.LanguageTree = Ext.extend(TYPO3.Components.PageTree.Tree, {
/**
* language ID
*
* @type {Integer}
*/
language: 0,
/**
* Tree loader implementation for the filtering tree
*
* @return {void}
*/
addTreeLoader: function() {
this.loader = new Ext.tree.TreeLoader({
directFn: this.treeDataProvider.getLanguageTree,
paramOrder: 'nodeId,attributes,language',
nodeParameter: 'nodeId',
baseAttrs: {
uiProvider: this.uiProvider
},
listeners: {
beforeload: function(treeLoader, node) {
if (!node.ownerTree.language || node.ownerTree.language === '') {
return false;
}
treeLoader.baseParams.nodeId = node.id;
treeLoader.baseParams.language = node.ownerTree.language;
treeLoader.baseParams.attributes = node.attributes.nodeData;
}
}
});
}
});
// XTYPE Registration
Ext.reg('TYPO3.Components.PageTree.LanguageTree', TYPO3.Components.PageTree.LanguageTree);
typo3_src-4.5.23_changed/t3lib/js/extjs/components/pagetree/javascript/loadorder.txt 2013-02-27 12:14:46.000000000 +0100
treeeditor.js
tree.js
filteringtree.js
languagetree.js
nodeui.js
deletiondropzone.js
toppanel.js
typo3_src-4.5.23_changed/t3lib/js/extjs/components/pagetree/javascript/toppanel.js 2013-03-04 09:54:01.000000000 +0100
filteringTree: null,
/**
* Language Tree
*
* @cfg {TYPO3.Components.PageTree.LanguageTree}
*/
languageTree: null,
/**
* Page Tree
*
* @cfg {TYPO3.Components.PageTree.Tree}
......
*/
app: null,
languages: null,
/**
* Initializes the component
*
......
}
this.getTopToolbar().addItem({xtype: 'tbfill'});
if (!TYPO3.Components.PageTree.Configuration.hideLanguageSelection
|| TYPO3.Components.PageTree.Configuration.hideLanguageSelection === '0'
) {
this.addLanguageSelection();
}
this.addRefreshTreeFeature();
},
......
this.filteringTree.searchWord = searchWord;
if (this.filteringTree.searchWord === '') {
this.app.activeTree = this.tree;
if (this.filteringTree.language == '0' || !this.languageTree) {
this.app.activeTree = this.tree;
} else {
this.app.activeTree = this.languageTree
}
textField.setHideTrigger(true);
this.filteringTree.hide();
this.tree.show().refreshTree(function() {
textField.focus(false, 500);
}, this);
if (this.filteringTree.language == '0' || !this.languageTree) {
this.tree.show().refreshTree(function() {
textField.focus(false, 500);
}, this);
} else {
this.languageTree.show().refreshTree(function() {
textField.focus(false, 500);
}, this);
}
if (this.filteringIndicator) {
this.app.removeIndicator(this.filteringIndicator);
......
});
this.addButton(topPanelButton);
},
/**
* Adds a combobox to the toolbar for language selection
*
* @return {void}
*/
addLanguageSelection: function() {
var topPanelLanguageSelection = new Ext.form.ComboBox({
id: this.id + '-combo-language',
cls: this.id + '-combo',
fieldLabel: 'Language',
hiddenName: 'language',
store: new Ext.data.SimpleStore({
fields: ['lid', 'languageLabel'],
data: []
}),
displayField: 'languageLabel',
valueField:'lid',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:TYPO3.Components.PageTree.LLL.comboLanguage,
selectOnFocus:true,
languageTree: this.languageTree,
listeners: {
select: {
scope: this,
fn: function(field, value, index) {
var selectedLanguage = field.getValue();
this.filteringTree.language = selectedLanguage;
if (selectedLanguage == 0) {
if (this.filteringIndicator) {
this.app.ownerCt.getEl().mask('', 'x-mask-loading-message');
this.app.ownerCt.getEl().addClass('t3-mask-loading');
this.filteringTree.show().refreshTree(function() {
if (selectedNode) {
this.app.select(selectedNode.attributes.nodeData.id, false);
}
this.app.ownerCt.getEl().unmask();
}, this);
} else {
this.app.activeTree = this.tree;
this.languageTree.hide();
this.tree.show().refreshTree(function() {
//textField.focus(false, 500);
}, this);
}
} else {
if (this.filteringIndicator) {
this.app.ownerCt.getEl().mask('', 'x-mask-loading-message');
this.app.ownerCt.getEl().addClass('t3-mask-loading');
this.filteringTree.show().refreshTree(function() {
if (selectedNode) {
this.app.select(selectedNode.attributes.nodeData.id, false);
}
this.app.ownerCt.getEl().unmask();
}, this);
} else {
this.tree.hide();
this.languageTree.language = selectedLanguage;
var selectedNode = this.app.getSelected();
this.app.activeTree = this.languageTree;
this.app.ownerCt.getEl().mask('', 'x-mask-loading-message');
this.app.ownerCt.getEl().addClass('t3-mask-loading');
this.languageTree.show().refreshTree(function() {
if (selectedNode) {
this.app.select(selectedNode.attributes.nodeData.id, false);
}
//textField.focus();
this.app.ownerCt.getEl().unmask();
}, this);
}
}
}
}
}
}).hide();
this.dataProvider.getLanguages(function(response) {
languages = Ext.util.JSON.decode(response, true);
languages.each(function(record)
{
topPanelLanguageSelection.store.add(new Ext.data.Record(record));
}, this);
if (languages.length > 1) {
topPanelLanguageSelection.show();
}
}, this);
this.getTopToolbar().addItem(topPanelLanguageSelection);
}
});
typo3_src-4.5.23_changed/t3lib/tree/pagetree/class.t3lib_tree_pagetree_commands.php 2013-03-04 11:09:41.000000000 +0100
* @return void
*/
public static function updateNodeLabel(t3lib_tree_pagetree_Node $node, $updatedLabel) {
$data['pages'][$node->getWorkspaceId()][$node->getTextSourceField()] = $updatedLabel;
self::processTceCmdAndDataMap(array(), $data);
preg_match('/\[.*\]/', $updatedLabel, $matches);
$newPageLanguageOverlay = array();
if ($node->getLanguage() == 0 || !empty($matches)) {
if (!empty($matches)) {
$updatedLabel = substr($updatedLabel, 1, strlen($updatedLabel)-2);
}
$data['pages'][$node->getWorkspaceId()][$node->getTextSourceField()] = $updatedLabel;
} else {
$pageSelect = t3lib_div::makeInstance('t3lib_pageSelect');
$pageLanguageOverlay = $pageSelect->getPageOverlay($node->getWorkspaceId(), $node->getLanguage());
if ($pageLanguageOverlay['_PAGES_OVERLAY'] !== true) {
$newPageLanguageOverlay = array (
'pid' => $node->getWorkspaceId(),
'language' => $node->getLanguage()
);
$data['pages_language_overlay'][$node->getWorkspaceId()][$node->getTextSourceField()] = $updatedLabel;
} else {
$data['pages_language_overlay'][$pageLanguageOverlay['_PAGES_OVERLAY_UID']][$node->getTextSourceField()] = $updatedLabel;
}
}
self::processTceCmdAndDataMap(array(), $data, $newPageLanguageOverlay);
}
/**
......
*
* @param array $cmd
* @param array $data
* @param array $newPageLanguageOverlay
* @throws RuntimeException if an error happened while the TCE processing
* @return array
*/
protected static function processTceCmdAndDataMap(array $cmd, array $data = array()) {
protected static function processTceCmdAndDataMap(array $cmd, array $data = array(), array $newPageLanguageOverlay = array()) {
/** @var $tce t3lib_TCEmain */
$tce = t3lib_div::makeInstance('t3lib_TCEmain');
$tce->stripslashes_values = 0;
$tce->start($data, $cmd);
$tce->copyTree = t3lib_div::intInRange($GLOBALS['BE_USER']->uc['copyLevels'], 0, 100);
if (count($cmd)) {
$tce->process_cmdmap();
$returnValues = $tce->copyMappingArray_merged;
} elseif (count($data)) {
$tce->process_datamap();
$returnValues = $tce->substNEWwithIDs;
}
if (!empty($newPageLanguageOverlay)) {
$newPageLanguageOverlay['uid'] = $tce->localize('pages', $newPageLanguageOverlay['pid'], $newPageLanguageOverlay['language']);
$data['pages_language_overlay'][$newPageLanguageOverlay['uid']] = $data['pages_language_overlay'][$newPageLanguageOverlay['pid']];
unset($data['pages_language_overlay'][$newPageLanguageOverlay['pid']]);
$tce2 = t3lib_div::makeInstance('t3lib_TCEmain');
$tce2->stripslashes_values = 0;
$tce2->start($data, $cmd);
$tce2->copyTree = t3lib_div::intInRange($GLOBALS['BE_USER']->uc['copyLevels'], 0, 100);
$tce2->process_datamap();
$returnValues = $tce2->substNEWwithIDs;
} else {
$tce->copyTree = t3lib_div::intInRange($GLOBALS['BE_USER']->uc['copyLevels'], 0, 100);
if (count($cmd)) {
$tce->process_cmdmap();
$returnValues = $tce->copyMappingArray_merged;
} elseif (count($data)) {
$tce->process_datamap();
$returnValues = $tce->substNEWwithIDs;
}
}
// check errors
if (count($tce->errorLog)) {
throw new RuntimeException(implode(chr(10), $tce->errorLog), 1333754629);
}
if (count($tce2->errorLog)) {
throw new RuntimeException(implode(chr(10), $tce2->errorLog), 1362391795);
}
return $returnValues;
}
......
* Creates a node with the given record information's
*
* @param array $record
* @param int $mountPoint
* @param int $language
* @return t3lib_tree_pagetree_Node
*/
public static function getNewNode($record, $mountPoint = 0) {
public static function getNewNode($record, $mountPoint = 0, $language = 0) {
$useNavTitle = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showNavTitle');
$addIdAsPrefix = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showPageIdWithTitle');
$addDomainName = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showDomainNameWithTitle');
......
$subNode->setId($record['uid']);
$subNode->setMountPoint($mountPoint);
$subNode->setWorkspaceId(($record['_ORIG_uid'] ? $record['_ORIG_uid'] : $record['uid']));
$subNode->setLanguage($record['language']);
$field = 'title';
$text = $record['title'];
......
$text = $record['nav_title'];
}
$qtipLanguage = '';
if (($language > 0 || $record['language'] > 0) && $record['uid'] > 0) {
$pageSelect = t3lib_div::makeInstance('t3lib_pageSelect');
$page = $pageSelect->getPage($record['uid']);
$pageLanguageOverlay = $pageSelect->getPageOverlay($record['uid'], $language);
if ($pageLanguageOverlay['title'] != '') {
$text = $pageLanguageOverlay['title'];
}
if ( $record['language'] > 0) {
$qtipLanguage = '<br />' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:tree.StandardLanguagePageTitle', TRUE) . $page['title'];
}
if (substr($record['title'], 0, 1) == '[' && substr($record['title'], -1) == ']') {
$qtipLanguage = '<br />' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:tree.NoAlternativePageTitle', TRUE);
}
}
if (trim($text) === '') {
$visibleText = '[' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.no_title', TRUE) . ']';
} else {
......
$qtip = str_replace(' - ', '<br />', htmlspecialchars(
t3lib_BEfunc::titleAttribForPages($record, '', FALSE))
);
$qtip .= $qtipLanguage;
$prefix = '';
$lockInfo = t3lib_BEfunc::isRecordLocked('pages', $record['uid']);
typo3_src-4.5.23_changed/t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataprovider.php 2013-03-04 11:22:03.000000000 +0100
* @param t3lib_tree_Node $node
* @param int $mountPoint
* @param int $level internally used variable as a recursion limiter
* @param int $language the language ID for the page titles
* @return t3lib_tree_NodeCollection
*/
public function getNodes(t3lib_tree_Node $node, $mountPoint = 0, $level = 0) {
public function getNodes(t3lib_tree_Node $node, $mountPoint = 0, $level = 0, $language = 0) {
/** @var $nodeCollection t3lib_tree_pagetree_NodeCollection */
$nodeCollection = t3lib_div::makeInstance('t3lib_tree_pagetree_NodeCollection');
......
continue;
}
if ($language > 0) {
$pageSelect = t3lib_div::makeInstance('t3lib_pageSelect');
$pageLanguageOverlay = $pageSelect->getPageOverlay($subpage['uid'], $language);
if ($pageLanguageOverlay['title'] != '') {
$subpage['title'] = $pageLanguageOverlay['title'];
} else {
$subpage['title'] = "[".$subpage['title']."]";
}
}
$subpage['language'] = $language;
$subNode = t3lib_tree_pagetree_Commands::getNewNode($subpage, $mountPoint);
$subNode->setIsMountPoint($isMountPoint);
if ($this->nodeCounter < $this->nodeLimit) {
$childNodes = $this->getNodes($subNode, $mountPoint, $level + 1);
$childNodes = $this->getNodes($subNode, $mountPoint, $level + 1, $language);
$subNode->setChildNodes($childNodes);
$this->nodeCounter += $childNodes->count();
} else {
......
$nodeCollection->append($subNode);
}
return $nodeCollection;
}
......
* @param t3lib_tree_Node $node
* @param string $searchFilter
* @param int $mountPoint
* @param int $language
* @return void
*/
public function getFilteredNodes(t3lib_tree_Node $node, $searchFilter, $mountPoint = 0) {
public function getFilteredNodes(t3lib_tree_Node $node, $searchFilter, $mountPoint = 0, $language = 0) {
/** @var $nodeCollection t3lib_tree_pagetree_NodeCollection */
$nodeCollection = t3lib_div::makeInstance('t3lib_tree_pagetree_NodeCollection');
$records = $this->getSubpages(-1, $searchFilter);
$language = intval($language);
$records = $this->getSubpages(-1, $searchFilter, $language);
if (!is_array($records) || !count($records)) {
return $nodeCollection;
} elseif (count($records) > 500) {
......
}
$rootlineElement = t3lib_tree_pagetree_Commands::getNodeRecord($rootlineElement['uid']);
if ($language > 0) {
$pageSelect = t3lib_div::makeInstance('t3lib_pageSelect');
$pageLanguageOverlay = $pageSelect->getPageOverlay($rootlineElement['uid'], $language);
if ($pageLanguageOverlay['title'] != '') {
$rootlineElement['title'] = $pageLanguageOverlay['title'];
} else {
$rootlineElement['title'] = "[".$rootlineElement['title']."]";
}
}
$rootlineElement['language'] = $language;
$ident = intval($rootlineElement['sorting']) . intval($rootlineElement['uid']);
if ($reference && $reference->offsetExists($ident)) {
/** @var $refNode t3lib_tree_pagetree_Node */
......
$refNode->setChildNodes($reference);
}
} else {
$refNode = t3lib_tree_pagetree_Commands::getNewNode($rootlineElement, $mountPoint);
$refNode = t3lib_tree_pagetree_Commands::getNewNode($rootlineElement, $mountPoint, $language);
$replacement = '<span class="typo3-pagetree-filteringTree-highlight">$1</span>';
if ($isNumericSearchFilter && intval($rootlineElement['uid']) === intval($searchFilter)) {
$text = str_replace('$1', $refNode->getText(), $replacement);
......
$childCollection = t3lib_div::makeInstance('t3lib_tree_pagetree_NodeCollection');
if (($i +1) >= $amountOfRootlineElements) {
$childNodes = $this->getNodes($refNode, $mountPoint);
$childNodes = $this->getNodes($refNode, $mountPoint, '', $language);
foreach ($childNodes as $childNode) {
/** @var $childNode t3lib_tree_pagetree_Node */
$childRecord = $childNode->getRecord();
......
* Note: If you add the search filter parameter, the nodes will be filtered by this string.
*
* @param string $searchFilter
* @param int $language
* @return array
*/
public function getTreeMounts($searchFilter = '') {
public function getTreeMounts($searchFilter = '', $language = 0) {
/** @var $nodeCollection t3lib_tree_pagetree_NodeCollection */
$nodeCollection = t3lib_div::makeInstance('t3lib_tree_pagetree_NodeCollection');
$isTemporaryMountPoint = FALSE;
$language = intval($language);
$mountPoints = intval($GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint']);
if (!$mountPoints) {
$mountPoints = array_map('intval', $GLOBALS['BE_USER']->returnWebmounts());
......
'uid' => 0,
'title' => $sitename,
);
$subNode = t3lib_tree_pagetree_Commands::getNewNode($record);
$subNode = t3lib_tree_pagetree_Commands::getNewNode($record, 0, $language);
$subNode->setLabelIsEditable(FALSE);
$subNode->setType('pages_root');
} else {
......
continue;
}
$record = t3lib_BEfunc::getRecordWSOL('pages', $mountPoint, '*', '', TRUE);
$record = t3lib_BEfunc::getRecordWSOL('pages', $mountPoint, '*', 0, TRUE);
if (!$record) {
continue;
}
$subNode = t3lib_tree_pagetree_Commands::getNewNode($record, $mountPoint);
$subNode = t3lib_tree_pagetree_Commands::getNewNode($record, $mountPoint, $language);
if ($showRootlineAboveMounts && !$isTemporaryMountPoint) {
$rootline = t3lib_tree_pagetree_Commands::getMountPointPath($record['uid']);
$subNode->setReadableRootline($rootline);
......
$subNode->setDraggable(FALSE);
if ($searchFilter === '') {
$childNodes = $this->getNodes($subNode, $mountPoint);
$childNodes = $this->getNodes($subNode, $mountPoint, 0, $language);
} else {
$childNodes = $this->getFilteredNodes($subNode, $searchFilter, $mountPoint);
$childNodes = $this->getFilteredNodes($subNode, $searchFilter, $mountPoint, $language);
$subNode->setExpanded(TRUE);
}
......
}
/**
* Returns the where clause for fetching pages_language_overlay
*
* @param string $searchFilter
* @param int $language
* @return string
*/
protected function getWhereClausePagesLanguageOverlay($searchFilter = '', $language = 0) {
$where = 'pages.uid=pages_language_overlay.pid AND pages_language_overlay.sys_language_uid=' . intval($language) . ' AND ';
$where .= $GLOBALS['BE_USER']->getPagePermsClause(1) .
t3lib_BEfunc::deleteClause('pages') .
t3lib_BEfunc::versioningPlaceholderClause('pages');
if ($searchFilter !== '') {
if (is_numeric($searchFilter) && $searchFilter > 0) {
$seachWhere .= 'pages.uid = ' . intval($searchFilter) . ' OR ';
}
$searchFilter = $GLOBALS['TYPO3_DB']->fullQuoteStr('%' . $searchFilter . '%', 'pages_language_overlay');
$seachWhere .= 'pages_language_overlay.title LIKE ' . $searchFilter;
$where .= ' AND (' . $seachWhere . ')';
}
return $where;
}
/**
* Returns all sub-pages of a given id
*
* @param int $id
* @param string $searchFilter
* @param int $language
* @return array
*/
protected function getSubpages($id, $searchFilter = '') {
$where = $this->getWhereClause($id, $searchFilter);
$subpages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'uid', 'pages', $where, '', 'sorting', '', 'uid'
);
protected function getSubpages($id, $searchFilter = '', $language = 0) {
if ($searchFilter !== '' && $language > 0) {
$where = $this->getWhereClausePagesLanguageOverlay($searchFilter, $language);
$subpages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'pages.uid AS uid', 'pages,pages_language_overlay', $where, '', 'sorting', '', 'uid'
);
} else {
$where = $this->getWhereClause($id, $searchFilter);
$subpages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'uid', 'pages', $where, '', 'sorting', '', 'uid'
);
}
return $subpages;
}
typo3_src-4.5.23_changed/t3lib/tree/pagetree/class.t3lib_tree_pagetree_node.php 2013-03-04 11:24:30.000000000 +0100
}
/**
* Sets the language
*
* @param int $language
* @return void
*/
public function setLanguage($language) {
$this->language = $language;
}
/**
* Returns the language
*
* @return int
*/
public function getLanguage() {
return $this->language;
}
/**
* Checks if the user may create pages below the given page
*
* @return void
......
$arrayRepresentation['nodeData']['workspaceId'] = $this->getWorkspaceId();
$arrayRepresentation['nodeData']['isMountPoint'] = $this->isMountPoint();
$arrayRepresentation['nodeData']['serializeClassName'] = get_class($this);
$arrayRepresentation['nodeData']['language'] = $this->getLanguage();
return $arrayRepresentation;
}
......
$this->setMountPoint($data['mountPoint']);
$this->setReadableRootline($data['readableRootline']);
$this->setIsMountPoint($data['isMountPoint']);
$this->setLanguage($data['language']);
}
}
typo3_src-4.5.23_changed/t3lib/tree/pagetree/extdirect/class.t3lib_tree_pagetree_extdirect_tree.php 2013-03-04 11:28:43.000000000 +0100
$this->initDataProvider();
if ($nodeId === 'root') {
$nodeCollection = $this->dataProvider->getTreeMounts($searchFilter);
$nodeCollection = $this->dataProvider->getTreeMounts($searchFilter, $nodeData->language);
} else {
$nodeCollection = $this->dataProvider->getFilteredNodes($node, $searchFilter, $node->getMountPoint());
$nodeCollection = $this->dataProvider->getFilteredNodes($node, $searchFilter, $node->getMountPoint(), $nodeData->language);
}
return $nodeCollection->toArray();
}
/**
* Fetches the next tree level with titles in choosen language
*
* @param int $nodeId
* @param stdClass $nodeData
* @param int $language
* @return array
*/
public function getLanguageTree($nodeId, $nodeData, $language = 0) {
$language = intval($language);
$this->initDataProvider();
/** @var $node t3lib_tree_pagetree_Node */
$node = t3lib_div::makeInstance('t3lib_tree_pagetree_Node', (array) $nodeData);
if ($nodeId === 'root') {
$nodeCollection = $this->dataProvider->getTreeMounts('', $language);
} else {
$nodeCollection = $this->dataProvider->getNodes($node, 0, 0, $language);
}
return $nodeCollection->toArray();
......
'dropZoneElementRemoved' => $GLOBALS['LANG']->sL($file . 'tree.dropZoneElementRemoved', TRUE),
'dropZoneElementRestored' => $GLOBALS['LANG']->sL($file . 'tree.dropZoneElementRestored', TRUE),
'searchTermInfo' => $GLOBALS['LANG']->sL($file . 'tree.searchTermInfo', TRUE),
'comboLanguage' => $GLOBALS['LANG']->sL($file . 'tree.comboLanguage', TRUE),
'temporaryMountPointIndicatorInfo' => $GLOBALS['LANG']->sl($file . 'labels.temporaryDBmount', TRUE),
'deleteDialogTitle' => $GLOBALS['LANG']->sL('LLL:EXT:cms/layout/locallang.xml:deleteItem', TRUE),
'deleteDialogMessage' => $GLOBALS['LANG']->sL('LLL:EXT:cms/layout/locallang.xml:deleteWarning', TRUE),
......
'Configuration' => array(
'hideFilter' => $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.hideFilter'),
'hideLanguageSelection' => $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.hideLanguageSelection'),
'displayDeleteConfirmation' => $GLOBALS['BE_USER']->jsConfirmation(4),
'canDeleteRecursivly' => $GLOBALS['BE_USER']->uc['recursiveDelete'] == TRUE,
'disableIconLinkToContextmenu' => $GLOBALS['BE_USER']->getTSConfigVal(
......
return $configuration;
}
/**
* Returns the json encoded list of system languages (id and title)
*
*
* @return string
*/
public function getLanguages() {
// in v6.0
// $backendUtility = t3lib_div::makeInstance('BackendUtility');
// $languages = $backendUtility->getSystemLanguages();
// There is no way to get only active system languages via t3lib_BEfunc::getSystemLanguages
// TODO ??
$languages = t3lib_BEfunc::getSystemLanguages();
$systemLanguages = array();
foreach ($languages as $language) {
$systemLanguages[] = array('lid' => $language[1],
'languageLabel' => $language[0]);
}
return json_encode($systemLanguages);
}
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/tree/pagetree/extdirect/class.t3lib_tree_pagetree_extdirect_tree.php'])) {
typo3_src-4.5.23_changed/typo3/sysext/lang/locallang_core.xml 2013-03-04 00:55:36.000000000 +0100
<label index="tree.buttonNewNode">Create new pages</label>
<label index="tree.buttonFilter">Filter tree</label>
<label index="tree.searchTermInfo">Enter search term</label>
<label index="tree.comboLanguage">Choose language</label>
<label index="tree.StandardLanguagePageTitle">Standard title: </label>
<label index="tree.NoAlternativePageTitle">No alternative page title defined. Double click on title to edit and delete square brackets to create one</label>
<label index="warning.install_password">The Install Tool is still using the default password &quot;joh316&quot;. Update this within the %sAbout section%s of the Install Tool.</label>
<label index="warning.backend_admin">The default backend user "admin" with password &quot;password&quot; is still present. %sEdit this account%s, either deleting it completely or changing the username and password.</label>
<label index="warning.file_deny_pattern">The value of fileDenyPattern is not set to its default:%s If TYPO3 is running on Apache, a customized value might enable backend or frontend users to execute malicious php scripts.</label>
(1-1/9)