Bug #18108 » remove_doktypes_pages.diff
typo3/sysext/cms/ext_tables.php (working copy) | ||
---|---|---|
'4' => array(
|
||
'icon' => 'pages_shortcut.gif'
|
||
),
|
||
'5' => array(
|
||
'icon' => 'pages_notinmenu.gif'
|
||
),
|
||
'6' => array(
|
||
'type' => 'web',
|
||
'icon' => 'be_users_section.gif',
|
||
... | ... | |
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,
|
||
... | ... | |
));
|
||
// for useage of compat modus with version 3.8
|
||
// pagetype 2 (advanced) and 5 (not in menu) are added to TCA again
|
||
if (!t3lib_div::compat_version('4.2')) {
|
||
|
||
|
||
// revert doktype settings
|
||
$PAGES_TYPES = t3lib_div::array_merge(array(
|
||
'5' => array(
|
||
'icon' => 'pages_notinmenu.gif'
|
||
)
|
||
),$PAGES_TYPES);
|
||
|
||
// 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'),
|
||
)
|
||
);
|
||
|
||
|
||
$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,
|
||
');
|
||
|
||
$TCA['pages']['types'][2] = array(
|
||
// advanced
|
||
'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/install_old/ext_localconf.php (working copy) | ||
---|---|---|
<?php
|
||
if (!defined ('TYPO3_MODE')) die ('Access denied.');
|
||
// remove pagetype "not in menu""
|
||
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 "advanced"
|
||
require_once(t3lib_extMgm::extPath('install_old').'updates/class.tx_coreupdates_mergeadvanced.php');
|
||
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['megeadvanced_doctype_conversion'] = 'tx_coreupdates_mergeadvanced';
|
||
?>
|
||
?>
|
typo3/sysext/install_old/updates/class.tx_coreupdates_mergeadvanced.php (revision 0) | ||
---|---|---|
<?php
|
||
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 2008 Steffen Kamper <info@sk-typo3.de>
|
||
* 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!
|
||
***************************************************************/
|
||
/**
|
||
* Contains the update class for merging advanced and normal pagetype.
|
||
*
|
||
* @author Steffen Kamper <info@sk-typo3.de>
|
||
*/
|
||
class tx_coreupdates_mergeadvanced {
|
||
var $versionNumber; // version number coming from t3lib_div::int_from_ver()
|
||
/**
|
||
* parent object
|
||
*
|
||
* @var tx_install
|
||
*/
|
||
var $pObj;
|
||
var $userInput; // user input
|
||
public function checkForUpdate(&$description) {
|
||
$description = 'Removes advanced pagetype (doktype2). Normal page (doktype 1) now has same features so advanced is no more needed.';
|
||
if ($this->versionNumber >= 4002000) {
|
||
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid','pages','doktype=2');
|
||
if($GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
|
||
return 1;
|
||
}
|
||
}
|
||
return 0;
|
||
}
|
||
/**
|
||
* [Describe function...]
|
||
*
|
||
* @param [type] $$dbQueries: ...
|
||
* @param [type] $customMessages: ...
|
||
* @return [type] ...
|
||
*/
|
||
public function performUpdate(&$dbQueries, &$customMessages) {
|
||
if($this->versionNumber >= 4002000) {
|
||
$updateArray = array(
|
||
'doktype' => 1,
|
||
);
|
||
$res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('pages', 'doktype=2', $updateArray);
|
||
$dbQueries[] = str_replace(chr(10), ' ', $GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);
|
||
if ($GLOBALS['TYPO3_DB']->sql_error()) {
|
||
return 0; // something went wrong
|
||
}
|
||
return 1;
|
||
}
|
||
}
|
||
}
|
||
?>
|
typo3/sysext/install_old/updates/class.tx_coreupdates_notinmenu.php (working copy) | ||
---|---|---|
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 1999-2006 Sebastian Kurfuerst (sebastian@garbage-group.de)
|
||
* (c) 2008 Steffen Kamper <info@sk-typo3.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 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) {
|
||
public 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) {
|
||
if ($this->versionNumber >= 4002000) {
|
||
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid','pages','doktype=5');
|
||
if($GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
|
||
return 1;
|
||
... | ... | |
* @param [type] $customMessages: ...
|
||
* @return [type] ...
|
||
*/
|
||
function performUpdate(&$dbQueries, &$customMessages) {
|
||
if($this->versionNumber >= 3009000) {
|
||
public function performUpdate(&$dbQueries, &$customMessages) {
|
||
if($this->versionNumber >= 4002000) {
|
||
$updateArray = array(
|
||
'doktype' => 1,
|
||
'nav_hide' => 1
|
||
... | ... | |
}
|
||
}
|
||
}
|
||
?>
|
||
?>
|