Project

General

Profile

Bug #18108 » 0007370_v4.patch

Administrator Admin, 2008-02-05 15:41

View differences:

t3lib/class.t3lib_iconworks.php (Arbeitskopie)
// First, find the icon file name. This can depend on configuration in TCA, field values and more:
if ($table=='pages') {
// @TODO: RFC #7370: doktype 2&5 are deprecated since TYPO3 4.2-beta1
if ($row['nav_hide'] && ($row['doktype']==1||$row['doktype']==2)) $row['doktype']=5; // Workaround to change the icon if "Hide in menu" was set
if (!$iconfile = $PAGES_TYPES[$row['doktype']]['icon']) {
typo3/class.webpagetree.php (Arbeitskopie)
$crazyRecursionLimiter--;
// Not in menu:
// @TODO: RFC #7370: doktype 2&5 are deprecated since TYPO3 4.2-beta1
if ($this->ext_separateNotinmenuPages && (t3lib_div::inList('5,6',$row['doktype']) || $row['doktype']>=200 || $row['nav_hide'])) {
$outOfMenuPages[] = $row;
$outOfMenuPagesTextIndex[] = ($row['doktype']>=200 ? 'zzz'.$row['doktype'].'_' : '').$row['title'];
typo3/sysext/cms/ext_tables.php (Arbeitskopie)
1,
0,
array(
array('LLL:EXT:cms/locallang_tca.xml:pages.doktype.I.0', '2', 'i/pages.gif'),
array('LLL:EXT:cms/locallang_tca.xml:pages.doktype.I.3', '5', 'i/pages_notinmenu.gif'),
array('LLL:EXT:cms/locallang_tca.xml:pages.doktype.I.4', '6', 'i/be_users_section.gif'),
array('LLL:EXT:cms/locallang_tca.xml:pages.doktype.div.link', '--div--'),
array('LLL:EXT:cms/locallang_tca.xml:pages.doktype.I.2', '4', 'i/pages_shortcut.gif'),
......
// Totally overriding all type-settings:
$TCA['pages']['types'] = array (
// standard
// normal
'1' => array('showitem' =>
'doktype;;2;button;1-1-1, hidden, nav_hide, title;;3;;2-2-2, subtitle,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access,
starttime, endtime, fe_group, extendToSubpages,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.options,
TSconfig;;6;nowrap;4-4-4, storage_pid;;7, l18n_cfg,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,
'),
// advanced
'2' => array('showitem' =>
'doktype;;2;button;1-1-1, hidden, nav_hide, title;;3;;2-2-2, subtitle, nav_title,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.metadata,
abstract;;5;;3-3-3, keywords, description,
......
));
// if the compat version is less than 4.2, pagetype 2 ("Advanced")
// and pagetype 5 ("Not in menu") are added to TCA.
if (!t3lib_div::compat_version('4.2')) {
// Merging in CMS doktypes
array_splice(
$TCA['pages']['columns']['doktype']['config']['items'],
2,
0,
array(
array('LLL:EXT:cms/locallang_tca.xml:pages.doktype.I.0', '2', 'i/pages.gif'),
array('LLL:EXT:cms/locallang_tca.xml:pages.doktype.I.3', '5', 'i/pages_notinmenu.gif'),
)
);
// setting the doktype 1 ("Standard") to show less fields
$TCA['pages']['types'][1] = array(
// standard
'showitem' =>
'doktype;;2;button;1-1-1, hidden, nav_hide, title;;3;;2-2-2, subtitle,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access,
starttime, endtime, fe_group, extendToSubpages,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.options,
TSconfig;;6;nowrap;4-4-4, storage_pid;;7, l18n_cfg,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,
');
// adding doktype 2 ("Advanced")
$TCA['pages']['types'][2] = array(
'showitem' =>
'doktype;;2;button;1-1-1, hidden, nav_hide, title;;3;;2-2-2, subtitle, nav_title,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.metadata,
abstract;;5;;3-3-3, keywords, description,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.files,
media,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access,
starttime, endtime, fe_login_mode, fe_group, extendToSubpages,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.options,
TSconfig;;6;nowrap;6-6-6, storage_pid;;7, l18n_cfg, module, content_from_pid,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,
');
}
// ******************************************************************
// This is the standard TypoScript content table, tt_content
// ******************************************************************
......
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tbl_cms.php'
)
);
?>
typo3/sysext/cms/tslib/class.tslib_menu.php (Arbeitskopie)
var $menuNumber = 1; // tells you which menu-number this is. This is important when getting data from the setup
var $entryLevel = 0; // 0 = rootFolder
var $spacerIDList = '199'; // The doktype-number that defines a spacer
// @TODO: RFC #7370: doktype 2&5 are deprecated since TYPO3 4.2-beta1
var $doktypeExcludeList = '5,6'; // doktypes that define which should not be included in a menu
var $alwaysActivePIDlist=array();
var $imgNamePrefix = 'img';
......
}
if($this->conf['includeNotInMenu']) {
$exclDoktypeArr = t3lib_div::trimExplode(',',$this->doktypeExcludeList,1);
// @TODO: RFC #7370: doktype 2&5 are deprecated since TYPO3 4.2-beta1
$exclDoktypeArr = t3lib_div::removeArrayEntryByValue($exclDoktypeArr,'5');
$this->doktypeExcludeList = implode(',',$exclDoktypeArr);
}
typo3/sysext/install_old/mod/class.tx_install.php (Arbeitskopie)
require_once (PATH_t3lib.'class.t3lib_install.php');
require_once (PATH_t3lib.'class.t3lib_stdgraphic.php');
// include update classes
require_once(t3lib_extMgm::extPath('install_old').'updates/class.tx_coreupdates_compatversion.php');
require_once(t3lib_extMgm::extPath('install_old').'updates/class.tx_coreupdates_notinmenu.php');
require_once(t3lib_extMgm::extPath('install_old').'updates/class.tx_coreupdates_mergeadvanced.php');
/**
* Install Tool module
*
typo3/sysext/install_old/updates/class.tx_coreupdates_notinmenu.php (Arbeitskopie)
/***************************************************************
* Copyright notice
*
* (c) 1999-2006 Sebastian Kurfuerst (sebastian@garbage-group.de)
* (c) 1999-2006 Sebastian Kurfuerst <sebastian@garbage-group.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
......
/**
* Contains the update class for not in menu pages. Used by the update wizard in the install tool.
*
* @author Sebastian Kurfuerst <sebastian@garbage-group.de
* @author Sebastian Kurfuerst <sebastian@garbage-group.de>
* @author Steffen Kamper <info@sk-typo3.de>
*/
class tx_coreupdates_notinmenu {
var $versionNumber; // version number coming from t3lib_div::int_from_ver()
......
var $pObj;
var $userInput; // user input
function checkForUpdate(&$description) {
$description = 'Removes the doctype "Not in menu" which is deprecated and sets the successing page flag "Not in menu" instead.';
if ($this->versionNumber >= 3009000) {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid','pages','doktype=5');
if($GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
return 1;
/**
* Checks if an update is needed
*
* @param string &$description: The description for the update
* @return boolean whether an update is needed (true) or not (false)
*/
public function checkForUpdate(&$description) {
$result = false;
$description = 'Removes the deprecated pages doktype "Not in menu". It sets the successing flag "Not in menu" for the corresponding pages instead.';
if ($this->versionNumber >= 4002000) {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'doktype=5', '', '', '1');
if($GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
$result = true;
}
$GLOBALS['TYPO3_DB']->sql_free_result($res);
}
return 0;
return $result;
}
/**
* [Describe function...]
* Performs the database update. Changes the doktype from 5 ("not in menu") to 1 (standard) and sets the "nav_hide" flag to 1
*
* @param [type] $$dbQueries: ...
* @param [type] $customMessages: ...
* @return [type] ...
* @param array &$dbQueries: queries done in this update
* @param mixed &$customMessages: custom messages
* @return boolean whether it worked (true) or not (false)
*/
function performUpdate(&$dbQueries, &$customMessages) {
if($this->versionNumber >= 3009000) {
public function performUpdate(&$dbQueries, &$customMessages) {
$result = false;
if($this->versionNumber >= 4002000) {
$updateArray = array(
'doktype' => 1,
'nav_hide' => 1
......
$res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('pages', 'doktype=5', $updateArray);
$dbQueries[] = str_replace(chr(10), ' ', $GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);
if ($GLOBALS['TYPO3_DB']->sql_error()) {
return 0; // something went wrong
if ($GLOBALS['TYPO3_DB']->sql_error()) {
$customMessages = 'SQL-ERROR: ' . htmlspecialchars($GLOBALS['TYPO3_DB']->sql_error());
} else {
$result = true;
}
return 1;
}
return $result;
}
}
?>
?>
typo3/sysext/install_old/updates/class.tx_coreupdates_compatversion.php (Arbeitskopie)
$content = '<strong>You updated from an older version of TYPO3</strong>:<br />
<label for="'.$inputPrefix.'[version]">Select the version where you have upgraded from:</label> <select name="'.$inputPrefix.'[version]" id="'.$inputPrefix.'[version]">';
$versions = array(
'3.8' => '<= 3.8'
'3.8' => '<= 3.8',
'4.1' => '<= 4.1',
);
foreach ($versions as $singleVersion => $caption) {
$content .= '<option value="'.$singleVersion.'">'.$caption.'</option>';
typo3/sysext/install_old/ext_localconf.php (Arbeitskopie)
<?php
if (!defined ('TYPO3_MODE')) die ('Access denied.');
require_once(t3lib_extMgm::extPath('install_old').'updates/class.tx_coreupdates_compatversion.php');
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['changeCompatibilityVersion'] = 'tx_coreupdates_compatversion';
// not used yet
//require_once(t3lib_extMgm::extPath('install').'updates/class.tx_coreupdates_notinmenu.php');
//$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['notInMenu_doctype_conversion'] = 'tx_coreupdates_notinmenu';
?>
// remove pagetype "not in menu" since TYPO3 4.2
// as there is an option in every pagetype
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['removeNotInMenuDoktypeConversion'] = 'tx_coreupdates_notinmenu';
// remove pagetype "advanced" since TYPO3 4.2
// this is merged with doctype "standard" with tab view to edit
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['mergeAdvancedDoktypeConversion'] = 'tx_coreupdates_mergeadvanced';
?>
typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php (Arbeitskopie)
if ($this->conf['show.']['L1sections']) {
$firstLevelMenu = $this->getMenu($this->wholeSiteIdList);
while(list($kk,$mR) = each($firstLevelMenu)) {
// @TODO: RFC #7370: doktype 2&5 are deprecated since TYPO3 4.2-beta1
if ($mR['doktype']!=5) {
$this->optValues['sections']['rl1_'.$mR['uid']] = trim($this->pi_getLL('opt_RL1').' '.$mR['title']);
if ($this->conf['show.']['L2sections']) {
$secondLevelMenu = $this->getMenu($mR['uid']);
while(list($kk2,$mR2) = each($secondLevelMenu)) {
if ($mR['doktype']!=5) {
// @TODO: RFC #7370: doktype 2&5 are deprecated since TYPO3 4.2-beta1
if ($mR2['doktype']!=5) {
$this->optValues['sections']['rl2_'.$mR2['uid']] = trim($this->pi_getLL('opt_RL2').' '.$mR2['title']);
} else unset($secondLevelMenu[$kk2]);
}
......
while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$output[$row['uid']] = $GLOBALS['TSFE']->sys_page->getPageOverlay($row);
}
$GLOBALS['TYPO3_DB']->sql_free_result($res);
return $output;
} else {
return $GLOBALS['TSFE']->sys_page->getMenu($id);
(2-2/2)