[TASK] Remove usage of property $new_unique_uid 18/21818/3
authorGeorg Ringer <georg.ringer@gmail.com>
Tue, 2 Jul 2013 17:52:10 +0000 (19:52 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 13 Dec 2014 14:14:49 +0000 (15:14 +0100)
The property $this->new_unique_uid in PageLayoutController
is never used. Some very strange and dead code can be
just removed.

Resolves: #49608
Releases: master
Change-Id: If4857d412baf21942d5c5a650922dfc8668689ee
Reviewed-on: http://review.typo3.org/21818
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/func/Classes/Controller/PageFunctionsController.php
typo3/sysext/info/Classes/Controller/InfoModuleController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php
typo3/sysext/version/Classes/Controller/VersionModuleController.php

index 8b0d468..b381e67 100644 (file)
@@ -100,14 +100,6 @@ class PageLayoutController {
        public $edit_record;
 
        /**
-        * QuickEdit: If set, this variable tells quick edit that the last edited record had
-        * this value as UID and we should look up the new, real uid value in sys_log.
-        *
-        * @var string
-        */
-       public $new_unique_uid;
-
-       /**
         * Page select perms clause
         *
         * @var string
@@ -265,7 +257,6 @@ class PageLayoutController {
                $this->clear_cache = GeneralUtility::_GP('clear_cache');
                $this->popView = GeneralUtility::_GP('popView');
                $this->edit_record = GeneralUtility::_GP('edit_record');
-               $this->new_unique_uid = GeneralUtility::_GP('new_unique_uid');
                $this->search_field = GeneralUtility::_GP('search_field');
                $this->search_levels = GeneralUtility::_GP('search_levels');
                $this->showLimit = GeneralUtility::_GP('showLimit');
@@ -666,14 +657,6 @@ class PageLayoutController {
                        $url = $GLOBALS['BACK_PATH'] . 'alt_doc.php?edit[tt_content][' . implode(',', $idListA) . ']=edit&returnUrl=' . rawurlencode($this->local_linkThisScript(array('edit_record' => '')));
                        \TYPO3\CMS\Core\Utility\HttpUtility::redirect($url);
                }
-               // If the former record edited was the creation of a NEW record, this will look up the created records uid:
-               if ($this->new_unique_uid) {
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_log', 'userid=' . (int)$GLOBALS['BE_USER']->user['uid'] . ' AND NEWid=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->new_unique_uid, 'sys_log'));
-                       $sys_log_row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
-                       if (is_array($sys_log_row)) {
-                               $edit_record = $sys_log_row['tablename'] . ':' . $sys_log_row['recuid'];
-                       }
-               }
                // Creating the selector box, allowing the user to select which element to edit:
                $opt = array();
                $is_selected = 0;
@@ -742,7 +725,6 @@ class PageLayoutController {
                $R_URL_parts = parse_url(GeneralUtility::getIndpEnv('REQUEST_URI'));
                $R_URL_getvars = GeneralUtility::_GET();
                unset($R_URL_getvars['popView']);
-               unset($R_URL_getvars['new_unique_uid']);
                $R_URL_getvars['edit_record'] = $edit_record;
                $this->R_URI = $R_URL_parts['path'] . '?' . GeneralUtility::implodeArrayForUrl('', $R_URL_getvars);
                // Setting close url/return url for exiting this script:
@@ -821,7 +803,7 @@ class PageLayoutController {
                                        <input type="hidden" name="_serialNumber" value="' . md5(microtime()) . '" />
                                        <input type="hidden" name="_disableRTE" value="' . $tceforms->disableRTE . '" />
                                        <input type="hidden" name="edit_record" value="' . $edit_record . '" />
-                                       <input type="hidden" name="redirect" value="' . htmlspecialchars(($uidVal == 'new' ? ExtensionManagementUtility::extRelPath('cms') . 'layout/db_layout.php?id=' . $this->id . '&new_unique_uid=' . $new_unique_uid . '&returnUrl=' . rawurlencode($this->returnUrl) : $this->R_URI)) . '" />
+                                       <input type="hidden" name="redirect" value="' . htmlspecialchars(($uidVal == 'new' ? ExtensionManagementUtility::extRelPath('cms') . 'layout/db_layout.php?id=' . $this->id . '&returnUrl=' . rawurlencode($this->returnUrl) : $this->R_URI)) . '" />
                                        ' . \TYPO3\CMS\Backend\Form\FormEngine::getHiddenTokenField('tceAction');
                                // Add JavaScript as needed around the form:
                                $theCode = $tceforms->printNeededJSFunctions_top() . $theCode . $tceforms->printNeededJSFunctions();
@@ -1103,7 +1085,7 @@ class PageLayoutController {
                $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], $GLOBALS['BACK_PATH'], BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
                // Shortcut
                if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
-                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
                }
                // Cache
                if (!$this->modTSconfig['properties']['disableAdvanced']) {
@@ -1234,14 +1216,13 @@ class PageLayoutController {
 
        /**
         * Returns URL to the current script.
-        * In particular the "popView" and "new_unique_uid" Get vars are unset.
+        * In particular the "popView" get var is unset.
         *
         * @param array $params Parameters array, merged with global GET vars.
         * @return string URL
         */
        public function local_linkThisScript($params) {
                $params['popView'] = '';
-               $params['new_unique_uid'] = '';
                return GeneralUtility::linkThisScript($params);
        }
 
index f2f6eea..1ad5917 100644 (file)
@@ -145,7 +145,7 @@ class PageFunctionsController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                                . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-view') . '</a>';
                        // Shortcut
                        if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
-                               $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->moduleName);
+                               $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->moduleName);
                        }
                }
                return $buttons;
index 99cfe60..7a4f612 100644 (file)
@@ -172,8 +172,10 @@ class InfoModuleController extends BaseScriptClass {
                // Shortcut
                if ($this->backendUser->mayMakeShortcut()) {
                        $buttons['shortcut'] = $this->doc->makeShortcutIcon(
-                               'id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit',
-                               implode(',', array_keys($this->MOD_MENU)), $this->moduleName);
+                               'id, edit_record, pointer, search_field, search_levels, showLimit',
+                               implode(',', array_keys($this->MOD_MENU)),
+                               $this->moduleName
+                       );
                }
                return $buttons;
        }
index ae5fcf8..842503b 100644 (file)
@@ -294,7 +294,7 @@ class TypoScriptTemplateModuleController extends \TYPO3\CMS\Backend\Module\BaseS
                        }
                        // Shortcut
                        if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
-                               $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
+                               $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
                        }
                } else {
                        // Shortcut
index adf8af8..2daa395 100644 (file)
@@ -253,7 +253,7 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                        $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], $GLOBALS['BACK_PATH'], BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
                        // Shortcut
                        if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
-                               $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
+                               $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
                        }
                        // If access to Web>List for user, then link to that module.
                        $buttons['record_list'] = BackendUtility::getListViewLink(array(