Index: tests/t3lib/t3lib_pageselectTest.php
===================================================================
--- tests/t3lib/t3lib_pageselectTest.php	(Revision 9287)
+++ tests/t3lib/t3lib_pageselectTest.php	(Arbeitskopie)
@@ -124,7 +124,7 @@
 	public function getExtUrlForDokType2ReturnsFalse() {
 		$this->assertEquals(
 			FALSE,
-			$this->pageSelectObject->getExtURL(array('doktype' => 2))
+			$this->pageSelectObject->getExtURL(array('doktype' => t3lib_pageSelect::DOKTYPE_ADVANCED))
 		);
 	}
 
@@ -136,7 +136,7 @@
 			'http://www.example.com',
 			$this->pageSelectObject->getExtURL(
 				array(
-					'doktype' => 3,
+					'doktype' => t3lib_pageSelect::DOKTYPE_LINK,
 					'urltype' => 1,
 					'url' => 'www.example.com',
 				)
@@ -152,7 +152,7 @@
 			t3lib_div::getIndpEnv('TYPO3_SITE_URL') . 'hello/world/',
 			$this->pageSelectObject->getExtURL(
 				array(
-					'doktype' => 3,
+					'doktype' => t3lib_pageSelect::DOKTYPE_LINK,
 					'urltype' => 0,
 					'url' => 'hello/world/',
 				)
Index: t3lib/stddb/tables.php
===================================================================
--- t3lib/stddb/tables.php	(Revision 9287)
+++ t3lib/stddb/tables.php	(Arbeitskopie)
@@ -58,26 +58,26 @@
  * NOTE: usage of 'icon' is deprecated since TYPO3 4.4, use t3lib_SpriteManager::addTcaTypeIcon() instead
  */
 $PAGES_TYPES = array(
-	'3' => array(
+	(string)t3lib_pageSelect::DOKTYPE_LINK => array(
 	),
-	'4' => array(
+	(string)t3lib_pageSelect::DOKTYPE_SHORTCUT => array(
 	),
-	'5' => array(
+	(string)t3lib_pageSelect::DOKTYPE_HIDE_IN_MENU => array(
 	),
-	'6' => array(
+	(string)t3lib_pageSelect::DOKTYPE_BE_USER_SECTION  => array(
 		'type' => 'web',
 		'allowedTables' => '*'
 	),
-	'7' => array(
+	(string)t3lib_pageSelect::DOKTYPE_MOUNTPOINT => array(
 	),
-	'199' => array(		// TypoScript: Limit is 200. When the doktype is 200 or above, the page WILL NOT be regarded as a 'page' by TypoScript. Rather is it a system-type page
+	(string)t3lib_pageSelect::DOKTYPE_SPACER => array(		// TypoScript: Limit is 200. When the doktype is 200 or above, the page WILL NOT be regarded as a 'page' by TypoScript. Rather is it a system-type page
 		'type' => 'sys',
 	),
-	'254' => array(		//  Doktype 254 is a 'sysFolder' - a general purpose storage folder for whatever you like. In CMS context it's NOT a viewable page. Can contain any element.
+	(string)t3lib_pageSelect::DOKTYPE_SYSFOLDER => array(		//  Doktype 254 is a 'sysFolder' - a general purpose storage folder for whatever you like. In CMS context it's NOT a viewable page. Can contain any element.
 		'type' => 'sys',
 		'allowedTables' => '*'
 	),
-	'255' => array(		// Doktype 255 is a recycle-bin.
+	(string)t3lib_pageSelect::DOKTYPE_RECYCLER => array(		// Doktype 255 is a recycle-bin.
 		'type' => 'sys',
 		'allowedTables' => '*'
 	),
Index: t3lib/stddb/tbl_pages.php
===================================================================
--- t3lib/stddb/tbl_pages.php	(Revision 9287)
+++ t3lib/stddb/tbl_pages.php	(Arbeitskopie)
@@ -23,12 +23,12 @@
 					),
 					array(
 						'LLL:EXT:lang/locallang_tca.php:doktype.I.0',
-						'1',
+						(string)t3lib_pageSelect::DOKTYPE_DEFAULT,
 						'i/pages.gif',
 					),
 					array(
 						'LLL:EXT:cms/locallang_tca.xml:pages.doktype.I.4',
-						'6',
+						(string)t3lib_pageSelect::DOKTYPE_BE_USER_SECTION,
 						'i/be_users_section.gif',
 					),
 					array(
@@ -37,17 +37,17 @@
 					),
 					array(
 						'LLL:EXT:cms/locallang_tca.xml:pages.doktype.I.2',
-						'4',
+						(string)t3lib_pageSelect::DOKTYPE_SHORTCUT,
 						'i/pages_shortcut.gif',
 					),
 					array(
 						'LLL:EXT:cms/locallang_tca.xml:pages.doktype.I.5',
-						'7',
+						(string)t3lib_pageSelect::DOKTYPE_MOUNTPOINT,
 						'i/pages_mountpoint.gif',
 					),
 					array(
 						'LLL:EXT:cms/locallang_tca.xml:pages.doktype.I.8',
-						'3',
+						(string)t3lib_pageSelect::DOKTYPE_LINK,
 						'i/pages_link.gif',
 					),
 					array(
@@ -56,21 +56,21 @@
 					),
 					array(
 						'LLL:EXT:lang/locallang_tca.php:doktype.I.1',
-						'254',
+						(string)t3lib_pageSelect::DOKTYPE_SYSFOLDER,
 						'i/sysf.gif',
 					),
 					array(
 						'LLL:EXT:lang/locallang_tca.php:doktype.I.2',
-						'255',
+						(string)t3lib_pageSelect::DOKTYPE_RECYCLER,
 						'i/recycler.gif',
 					),
 					array(
 						'LLL:EXT:cms/locallang_tca.xml:pages.doktype.I.7',
-						'199',
+						(string)t3lib_pageSelect::DOKTYPE_SPACER,
 						'i/spacer_icon.gif',
 					),
 				),
-				'default' => '1',
+				'default' => (string)t3lib_pageSelect::DOKTYPE_DEFAULT,
 				'iconsInOptionTags' => 1,
 				'noIconsBelowSelect' => 1,
 			),
Index: t3lib/class.t3lib_iconworks.php
===================================================================
--- t3lib/class.t3lib_iconworks.php	(Revision 9287)
+++ t3lib/class.t3lib_iconworks.php	(Arbeitskopie)
@@ -200,7 +200,9 @@
 			// 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 ($row['nav_hide'] && ($row['doktype'] == t3lib_pageSelect::DOKTYPE_DEFAULT || $row['doktype'] == t3lib_pageSelect::DOKTYPE_ADVANCED)) {
+				$row['doktype'] = t3lib_pageSelect::DOKTYPE_HIDE_IN_MENU;
+			}	// Workaround to change the icon if "Hide in menu" was set
 
 			if (!$iconfile = $PAGES_TYPES[$row['doktype']]['icon']) {
 				$iconfile = $PAGES_TYPES['default']['icon'];
Index: t3lib/class.t3lib_tstemplate.php
===================================================================
--- t3lib/class.t3lib_tstemplate.php	(Revision 9287)
+++ t3lib/class.t3lib_tstemplate.php	(Arbeitskopie)
@@ -1620,7 +1620,8 @@
 			$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
 						'uid,pid,doktype,mount_pid,mount_pid_ol',
 						'pages',
-						'pid='.intval($id).' AND deleted=0 AND doktype!=255 AND doktype!=6'	// 255 = Garbage bin, 6 = Backend User Section
+						'pid='.intval($id).' AND deleted=0 AND doktype!=' . t3lib_pageSelect::DOKTYPE_RECYCLER .
+							' AND doktype!=' . t3lib_pageSelect::DOKTYPE_BE_USER_SECTION
 					);
 			while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))	{
 
Index: t3lib/class.t3lib_befunc.php
===================================================================
--- t3lib/class.t3lib_befunc.php	(Revision 9287)
+++ t3lib/class.t3lib_befunc.php	(Arbeitskopie)
@@ -1875,9 +1875,9 @@
 			break;
 		}
 
-		if ($row['doktype']=='3') {
+		if ($row['doktype'] == t3lib_pageSelect::DOKTYPE_LINK) {
 			$parts[] = $LANG->sL($TCA['pages']['columns']['url']['label']).' '.$row['url'];
-		} elseif ($row['doktype']=='4') {
+		} elseif ($row['doktype'] == t3lib_pageSelect::DOKTYPE_SHORTCUT) {
 			if ($perms_clause) {
 				$label = self::getRecordPath(intval($row['shortcut']), $perms_clause, 20);
 			} else {
@@ -1889,7 +1889,7 @@
 							$LANG->sL(self::getLabelFromItemlist('pages', 'shortcut_mode', $row['shortcut_mode']));
 			}
 			$parts[] = $LANG->sL($TCA['pages']['columns']['shortcut']['label']).' '.$label;
-		} elseif ($row['doktype']=='7') {
+		} elseif ($row['doktype'] == t3lib_pageSelect::DOKTYPE_MOUNTPOINT) {
 			if ($perms_clause) {
 				$label = self::getRecordPath(intval($row['mount_pid']), $perms_clause, 20);
 			} else {
Index: t3lib/class.t3lib_page.php
===================================================================
--- t3lib/class.t3lib_page.php	(Revision 9287)
+++ t3lib/class.t3lib_page.php	(Arbeitskopie)
@@ -130,6 +130,21 @@
 	protected $cache_getMountPointInfo = array();
 
 	/**
+	 * Named constants for "magic numbers" of the field doktype
+	 */
+	const DOKTYPE_DEFAULT = 1;
+	const DOKTYPE_ADVANCED = 2; // @deprecated since TYPO3 4.2
+	const DOKTYPE_LINK = 3;
+	const DOKTYPE_SHORTCUT = 4;
+	const DOKTYPE_HIDE_IN_MENU = 5;  // @deprecated since TYPO3 4.2
+	const DOKTYPE_BE_USER_SECTION = 6;
+	const DOKTYPE_MOUNTPOINT = 7;
+	const DOKTYPE_SPACER = 199;
+	const DOKTYPE_SYSFOLDER = 254;
+	const DOKTYPE_RECYCLER = 255;
+
+
+	/**
 	 * Named constants for "magic numbers" of the field shortcut_mode
 	 */
 	const SHORTCUT_MODE_NONE = 0;
@@ -523,7 +538,7 @@
 				}
 
 					// if shortcut, look up if the target exists and is currently visible
-				if ($row['doktype'] == 4 && ($row['shortcut'] || $row['shortcut_mode']) && $checkShortcuts)	{
+				if ($row['doktype'] == t3lib_pageSelect::DOKTYPE_SHORTCUT && ($row['shortcut'] || $row['shortcut_mode']) && $checkShortcuts) {
 					if ($row['shortcut_mode'] == self::SHORTCUT_MODE_NONE) {
 							// no shortcut_mode set, so target is directly set in $row['shortcut']
 						$searchField = 'uid';
@@ -549,7 +564,7 @@
 					if (!$count) {
 						unset($row);
 					}
-				} elseif ($row['doktype'] == 4 && $checkShortcuts)	{
+				} elseif ($row['doktype'] == t3lib_pageSelect::DOKTYPE_SHORTCUT && $checkShortcuts) {
 						// Neither shortcut target nor mode is set. Remove the page from the menu.
 					unset($row);
 				}
@@ -665,7 +680,7 @@
 
 				if (is_array($row))	{
 						// Mount Point page types are allowed ONLY a) if they are the outermost record in rootline and b) if the overlay flag is not set:
-					if ($GLOBALS['TYPO3_CONF_VARS']['FE']['enable_mount_pids'] && $row['doktype']==7 && !$ignoreMPerrors)	{
+					if ($GLOBALS['TYPO3_CONF_VARS']['FE']['enable_mount_pids'] && $row['doktype'] == t3lib_pageSelect::DOKTYPE_MOUNTPOINT && !$ignoreMPerrors) {
 						$mount_info = $this->getMountPointInfo($row['uid'], $row);
 						if ($loopCheck>0 || $mount_info['overlay'])	{
 							$this->error_getRootLine = 'Illegal Mount Point found in rootline';
@@ -782,7 +797,7 @@
 	 * @see tslib_fe::setExternalJumpUrl()
 	 */
 	function getExtURL($pagerow,$disable=0)	{
-		if ($pagerow['doktype']==3 && !$disable)	{
+		if ($pagerow['doktype'] == t3lib_pageSelect::DOKTYPE_LINK && !$disable) {
 			$redirectTo = $this->urltypes[$pagerow['urltype']].$pagerow['url'];
 
 				// If relative path, prefix Site URL:
@@ -829,7 +844,7 @@
 
 				// Look for mount pid value plus other required circumstances:
 			$mount_pid = intval($pageRec['mount_pid']);
-			if (is_array($pageRec) && $pageRec['doktype']==7 && $mount_pid>0 && !in_array($mount_pid, $prevMountPids))	{
+			if (is_array($pageRec) && $pageRec['doktype']== t3lib_pageSelect::DOKTYPE_MOUNTPOINT && $mount_pid > 0 && !in_array($mount_pid, $prevMountPids)) {
 
 					// Get the mount point record (to verify its general existence):
 				$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,pid,doktype,mount_pid,mount_pid_ol,t3ver_state', 'pages', 'uid='.$mount_pid.' AND pages.deleted=0 AND pages.doktype!=255');
Index: typo3/class.webpagetree.php
===================================================================
--- typo3/class.webpagetree.php	(Revision 9287)
+++ typo3/class.webpagetree.php	(Arbeitskopie)
@@ -423,7 +423,9 @@
 
 				// 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']))	{
+			if ($this->ext_separateNotinmenuPages &&
+				($row['doktype'] == t3lib_pageSelect::DOKTYPE_HIDE_IN_MENU || $row['doktype'] == t3lib_pageSelect::DOKTYPE_BE_USER_SECTION ||
+					$row['doktype'] >= 200 || $row['nav_hide'])) {
 				$outOfMenuPages[] = $row;
 				$outOfMenuPagesTextIndex[] = ($row['doktype']>=200 ? 'zzz'.$row['doktype'].'_' : '').$row['title'];
 			} else {
Index: typo3/class.browse_links.php
===================================================================
--- typo3/class.browse_links.php	(Revision 9287)
+++ typo3/class.browse_links.php	(Arbeitskopie)
@@ -253,7 +253,7 @@
 
 		$this->init();
 
-		$this->clause = ' AND doktype!=255'.$this->clause;
+		$this->clause = ' AND doktype!=' . t3lib_pageSelect::DOKTYPE_RECYCLER . $this->clause;
 	}
 
 	/**
Index: typo3/class.db_list_extra.inc
===================================================================
--- typo3/class.db_list_extra.inc	(Revision 9287)
+++ typo3/class.db_list_extra.inc	(Arbeitskopie)
@@ -186,8 +186,8 @@
 			if (isset($GLOBALS['SOBE']->modTSconfig['properties']['noViewWithDokTypes'])) {
 				$noViewDokTypes = t3lib_div::trimExplode(',', $GLOBALS['SOBE']->modTSconfig['properties']['noViewWithDokTypes'], true);
 			} else {
-					//default exclusion: doktype 254, 255
-				$noViewDokTypes = array('254', '255');
+					//default exclusion: doktype 254 (sysfolder), 255 (recycler)
+				$noViewDokTypes = array(t3lib_pageSelect::DOKTYPE_SYSFOLDER, t3lib_pageSelect::DOKTYPE_RECYCLER);
 			}
 
 			if (!in_array($this->pageRow['doktype'], $noViewDokTypes)) {
Index: typo3/sysext/statictemplates/media/scripts/wapversionLib.inc
===================================================================
--- typo3/sysext/statictemplates/media/scripts/wapversionLib.inc	(Revision 9287)
+++ typo3/sysext/statictemplates/media/scripts/wapversionLib.inc	(Arbeitskopie)
@@ -392,7 +392,7 @@
 	function cleanMenuArray($menu)	{
 		$newMenu=array();
 		foreach ($menu as $data) {
-			if ($data['doktype']!=5 && !$data['nav_hide'])	{
+			if ($data['doktype'] != t3lib_pageSelect::DOKTYPE_HIDE_IN_MENU && !$data['nav_hide']) {
 				$newMenu[]=$data;
 			}
 		}
Index: typo3/sysext/cms/tbl_cms.php
===================================================================
--- typo3/sysext/cms/tbl_cms.php	(Revision 9287)
+++ typo3/sysext/cms/tbl_cms.php	(Arbeitskopie)
@@ -717,25 +717,25 @@
 	),
 	'types' => array(
 			// Standard
-		'1'   => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2, subtitle, nav_title,                                                                                              --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.metadata, --palette--;LLL:EXT:lang/locallang_general.xml:LGL.author;5;;3-3-3, abstract, keywords, description, --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.files, media;;;;4-4-4, --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime'),
+		(string)t3lib_pageSelect::DOKTYPE_DEFAULT => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2, subtitle, nav_title,                                                                                              --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.metadata, --palette--;LLL:EXT:lang/locallang_general.xml:LGL.author;5;;3-3-3, abstract, keywords, description, --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.files, media;;;;4-4-4, --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime'),
 
 			// External URL - URL and URL type can be different for the translated page
-		'3'   => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2, subtitle,            --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.url, url;;;;3-3-3, urltype,                                                                                                                                                                                 --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.files, media;;;;4-4-4, --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime'),
+		(string)t3lib_pageSelect::DOKTYPE_LINK => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2, subtitle,            --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.url, url;;;;3-3-3, urltype,                                                                                                                                                                                 --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.files, media;;;;4-4-4, --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime'),
 
 			// Shortcut - shortcut and shortcut mode can be different for the translated page
-		'4'   => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2, subtitle,            --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.shortcut, shortcut;;;;3-3-3, shortcut_mode,                                                                                                                                                                 --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.files, media;;;;4-4-4, --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime'),
+		(string)t3lib_pageSelect::DOKTYPE_SHORTCUT => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2, subtitle,            --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.shortcut, shortcut;;;;3-3-3, shortcut_mode,                                                                                                                                                                 --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.files, media;;;;4-4-4, --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime'),
 
 			// Mount Point - mount point options can _NOT_ be different for the translated page
-		'7'   => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2, subtitle, nav_title,                                                                                                                                                                                                                                                              --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.files, media;;;;4-4-4, --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime'),
+		(string)t3lib_pageSelect::DOKTYPE_MOUNTPOINT => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2, subtitle, nav_title,                                                                                                                                                                                                                                                              --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.files, media;;;;4-4-4, --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime'),
 
 			// Separator
-		'199' => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2'),
+		(string)t3lib_pageSelect::DOKTYPE_SPACER => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2'),
 
 			// Sysfolder
-		'254' => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;LLL:EXT:lang/locallang_general.xml:LGL.title;;;2-2-2'),
+		(string)t3lib_pageSelect::DOKTYPE_SYSFOLDER => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;LLL:EXT:lang/locallang_general.xml:LGL.title;;;2-2-2'),
 
 			// Recycler
-		'255' => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2')
+		(string)t3lib_pageSelect::DOKTYPE_RECYCLER => array('showitem' => 'doktype;;;;1-1-1, hidden, sys_language_uid, title;;;;2-2-2')
 	),
 	'palettes' => array(
 		'5' => array('showitem' => 'author,author_email', 'canNotCollapse' => true)
Index: typo3/sysext/cms/tslib/media/scripts/wapversionLib.inc
===================================================================
--- typo3/sysext/cms/tslib/media/scripts/wapversionLib.inc	(Revision 9287)
+++ typo3/sysext/cms/tslib/media/scripts/wapversionLib.inc	(Arbeitskopie)
@@ -393,7 +393,7 @@
 		reset($menu);
 		$newMenu=array();
 		while(list(,$data)=each($menu))	{
-			if ($data['doktype']!=5 && !$data['nav_hide'])	{
+			if ($data['doktype'] != t3lib_pageSelect::DOKTYPE_HIDE_IN_MENU && !$data['nav_hide']) {
 				$newMenu[]=$data;
 			}
 		}
Index: typo3/sysext/cms/tslib/class.tslib_fe.php
===================================================================
--- typo3/sysext/cms/tslib/class.tslib_fe.php	(Revision 9287)
+++ typo3/sysext/cms/tslib/class.tslib_fe.php	(Arbeitskopie)
@@ -1055,7 +1055,7 @@
 		}
 
 			// Spacer is not accessible in frontend
-		if ($this->page['doktype'] == 199)	{
+		if ($this->page['doktype'] == t3lib_pageSelect::DOKTYPE_SPACER) {
 			if ($this->TYPO3_CONF_VARS['FE']['pageNotFound_handling'])	{
 				$this->pageNotFoundAndExit('The requested page does not exist!');
 			} else {
@@ -1067,7 +1067,7 @@
 		}
 
 			// Is the ID a link to another page??
-		if ($this->page['doktype']==4)	{
+		if ($this->page['doktype'] == t3lib_pageSelect::DOKTYPE_SHORTCUT) {
 			$this->MP = '';		// We need to clear MP if the page is a shortcut. Reason is if the short cut goes to another page, then we LEAVE the rootline which the MP expects.
 
 				// saving the page so that we can check later - when we know
@@ -1143,7 +1143,7 @@
 		switch($mode)	{
 			case 1:
 			case 2:
-				$pageArray = $this->sys_page->getMenu($idArray[0]?$idArray[0]:$thisUid,'*','sorting','AND pages.doktype<199 AND pages.doktype!=6');
+				$pageArray = $this->sys_page->getMenu(($idArray[0] ? $idArray[0] : $thisUid), '*', 'sorting', 'AND pages.doktype<199 AND pages.doktype!=' . t3lib_pageSelect::DOKTYPE_BE_USER_SECTION);
 				$pO = 0;
 				if ($mode==2 && count($pageArray))	{	// random
 					$randval = intval(rand(0,count($pageArray)-1));
@@ -1168,7 +1168,7 @@
 		}
 
 			// Check if short cut page was a shortcut itself, if so look up recursively:
-		if ($page['doktype']==4)	{
+		if ($page['doktype'] == t3lib_pageSelect::DOKTYPE_SHORTCUT) {
 			if (!in_array($page['uid'],$pageLog) && $itera>0)	{
 				$pageLog[] = $page['uid'];
 				$page = $this->getPageShortcut($page['shortcut'],$page['shortcut_mode'],$page['uid'],$itera-1,$pageLog);
@@ -1200,7 +1200,7 @@
 				$this->pageAccessFailureHistory['sub_section'][] = $this->rootLine[$a];
 				$removeTheRestFlag=1;
 			}
-			if ($this->rootLine[$a]['doktype']==6)	{
+			if ($this->rootLine[$a]['doktype'] == t3lib_pageSelect::DOKTYPE_BE_USER_SECTION) {
 				if ($this->beUserLogin)	{	// If there is a backend user logged in, check if he has read access to the page:
 					$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'uid='.intval($this->id).' AND '.$GLOBALS['BE_USER']->getPagePermsClause(1));	// versionOL()?
 					list($isPage) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
Index: typo3/sysext/cms/tslib/class.tslib_menu.php
===================================================================
--- typo3/sysext/cms/tslib/class.tslib_menu.php	(Revision 9287)
+++ typo3/sysext/cms/tslib/class.tslib_menu.php	(Arbeitskopie)
@@ -1253,7 +1253,7 @@
 		}
 
 			// Override URL if using "External URL" as doktype with a valid e-mail address:
-		if ($this->menuArr[$key]['doktype'] == 3 && $this->menuArr[$key]['urltype'] == 3 && t3lib_div::validEmail($this->menuArr[$key]['url'])) {
+		if ($this->menuArr[$key]['doktype'] == t3lib_pageSelect::DOKTYPE_LINK && $this->menuArr[$key]['urltype'] == 3 && t3lib_div::validEmail($this->menuArr[$key]['url'])) {
 				// Create mailto-link using tslib_cObj::typolink (concerning spamProtectEmailAddresses):
 			$LD['totalURL'] = $this->parent_cObj->typoLink_URL(array('parameter' => $this->menuArr[$key]['url']));
 			$LD['target'] = '';
Index: typo3/sysext/cms/tslib/class.tslib_content.php
===================================================================
--- typo3/sysext/cms/tslib/class.tslib_content.php	(Revision 9287)
+++ typo3/sysext/cms/tslib/class.tslib_content.php	(Arbeitskopie)
@@ -5497,10 +5497,10 @@
 								// If we link across domains and page is free type shortcut, we must resolve the shortcut first!
 								// If we do not do it, TYPO3 will fail to (1) link proper page in RealURL/CoolURI because
 								// they return relative links and (2) show proper page if no RealURL/CoolURI exists when link is clicked
-							if ($enableLinksAcrossDomains && $page['doktype'] == 4 && $page['shortcut_mode'] == 0) {
+							if ($enableLinksAcrossDomains && $page['doktype'] == t3lib_pageSelect::DOKTYPE_SHORTCUT && $page['shortcut_mode'] == t3lib_pageSelect::SHORTCUT_MODE_NONE) {
 								$page2 = $page; // Save in case of broken destination or endless loop
 								$maxLoopCount = 20; // Same as in RealURL, seems enough
-								while ($maxLoopCount && is_array($page) && $page['doktype'] == 4 && $page['shortcut_mode'] == 0) {
+								while ($maxLoopCount && is_array($page) && $page['doktype'] == t3lib_pageSelect::DOKTYPE_SHORTCUT && $page['shortcut_mode'] == t3lib_pageSelect::SHORTCUT_MODE_NONE) {
 									$page = $GLOBALS['TSFE']->sys_page->getPage($page['shortcut'], $disableGroupAccessCheck);
 									$maxLoopCount--;
 								}
@@ -6949,7 +6949,7 @@
 				while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
 					$GLOBALS['TSFE']->sys_page->versionOL('pages', $row);
 
-					if ($row['doktype'] == 255 || $row['doktype'] == 6 || $row['t3ver_state'] > 0) {
+					if ($row['doktype'] == t3lib_pageSelect::DOKTYPE_RECYCLER || $row['doktype'] == t3lib_pageSelect::DOKTYPE_BE_USER_SECTION || $row['t3ver_state'] > 0) {
 							// Doing this after the overlay to make sure changes
 							// in the overlay are respected.
 							// However, we do not process pages below of and
@@ -6977,7 +6977,7 @@
 
 						$GLOBALS['TSFE']->sys_page->versionOL('pages', $row);
 
-						if ($row['doktype'] == 255 || $row['doktype'] == 6 || $row['t3ver_state'] > 0) {
+						if ($row['doktype'] == t3lib_pageSelect::DOKTYPE_RECYCLER || $row['doktype'] == t3lib_pageSelect::DOKTYPE_BE_USER_SECTION || $row['t3ver_state'] > 0) {
 								// Doing this after the overlay to make sure
 								// changes in the overlay are respected.
 
Index: typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php
===================================================================
--- typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php	(Revision 9287)
+++ typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php	(Arbeitskopie)
@@ -346,13 +346,13 @@
 			$firstLevelMenu = $this->getMenu($this->wholeSiteIdList);
 			foreach ($firstLevelMenu as $kk => $mR) {
 					// @TODO: RFC #7370: doktype 2&5 are deprecated since TYPO3 4.2-beta1
-				if ($mR['doktype']!=5 && !$mR['nav_hide']) {
+				if ($mR['doktype'] != t3lib_pageSelect::DOKTYPE_HIDE_IN_MENU && !$mR['nav_hide']) {
 					$this->optValues['sections']['rl1_'.$mR['uid']] = trim($this->pi_getLL('opt_RL1').' '.$mR['title']);
 					if ($this->conf['show.']['L2sections'])	{
 						$secondLevelMenu = $this->getMenu($mR['uid']);
 						foreach ($secondLevelMenu as $kk2 => $mR2) {
 								// @TODO: RFC #7370: doktype 2&5 are deprecated since TYPO3 4.2-beta1
-							if ($mR2['doktype']!=5 && !$mR2['nav_hide']) {
+							if ($mR2['doktype'] != t3lib_pageSelect::DOKTYPE_HIDE_IN_MENU && !$mR2['nav_hide']) {
 								$this->optValues['sections']['rl2_'.$mR2['uid']] = trim($this->pi_getLL('opt_RL2').' '.$mR2['title']);
 							} else unset($secondLevelMenu[$kk2]);
 						}
