[TASK] Cleanup ext:opendocs 72/21772/2
authorWouter Wolters <typo3@wouterwolters.nl>
Mon, 1 Jul 2013 15:50:50 +0000 (17:50 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 1 Jul 2013 18:14:03 +0000 (20:14 +0200)
* Remove old file from before namespacing
* Fix imagepath in CSS
* Strict comparison for TYPO3_MODE check

Change-Id: I5d6242f4032d83627284f793e9e79ee13d6de8ae
Resolves: #49550
Releases: 6.2
Reviewed-on: https://review.typo3.org/21772
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/opendocs/Classes/Controller/OpendocsController.php
typo3/sysext/opendocs/Resources/Public/Css/opendocs.css
typo3/sysext/opendocs/class.tx_opendocs.php [deleted file]
typo3/sysext/opendocs/ext_tables.php
typo3/sysext/opendocs/registerToolbarItem.php

index 9e81bdf..b024251 100644 (file)
@@ -54,6 +54,7 @@ class OpendocsController implements \TYPO3\CMS\Backend\Toolbar\ToolbarItemHookIn
         * @param \TYPO3\CMS\Backend\Controller\BackendController TYPO3 backend object reference
         */
        public function __construct(\TYPO3\CMS\Backend\Controller\BackendController &$backendReference = NULL) {
+               $GLOBALS['LANG']->includeLLFile('EXT:opendocs/locallang_opendocs.xml');
                $this->backendReference = $backendReference;
                $this->loadDocsFromUserSession();
        }
index 641cfc1..d45ac80 100644 (file)
@@ -68,7 +68,7 @@ Description : styles the Open Documents toolbar item
 
 #tx-opendocs-menu .toolbar-item-menu .list tr.opendoc.first-row td,
 #tx-opendocs-menu .toolbar-item-menu .list tr.recentdoc.first-row td {
-       background-image: url('../../../../../gfx/shortcutgroups-bg.png');
+       background-image: url('../../../../../../gfx/shortcutgroups-bg.png');
        background-repeat: repeat-x;
        padding-top: 4px;
 }
diff --git a/typo3/sysext/opendocs/class.tx_opendocs.php b/typo3/sysext/opendocs/class.tx_opendocs.php
deleted file mode 100644 (file)
index 87bbff6..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2008-2013 Benjamin Mack <mack@xnos.org>
- *  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!
- ***************************************************************/
-// Load the language file
-$GLOBALS['LANG']->includeLLFile('EXT:opendocs/locallang_opendocs.xml');
-/*
- * @deprecated since 6.0, the classname tx_opendocs and this file is obsolete
- * and will be removed with 6.2. The class was renamed and is now located at:
- * typo3/sysext/opendocs/Classes/Controller/OpendocsController.php
- */
-require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('opendocs') . 'Classes/Controller/OpendocsController.php';
-?>
\ No newline at end of file
index 913b439..1a678bf 100644 (file)
@@ -2,14 +2,14 @@
 if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
-if (TYPO3_MODE == 'BE') {
+if (TYPO3_MODE === 'BE') {
        $opendocsPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('opendocs');
        // Register toolbar item
        $GLOBALS['TYPO3_CONF_VARS']['typo3/backend.php']['additionalBackendItems'][] = $opendocsPath . 'registerToolbarItem.php';
        // Register AJAX calls
-       $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['OpendocsController::renderMenu'] = $opendocsPath . 'class.tx_opendocs.php:TYPO3\\CMS\\Opendocs\\Controller\\OpendocsController->renderAjax';
-       $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['OpendocsController::closeDocument'] = $opendocsPath . 'class.tx_opendocs.php:TYPO3\\CMS\\Opendocs\\Controller\\OpendocsController->closeDocument';
+       $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['OpendocsController::renderMenu'] = 'TYPO3\\CMS\\Opendocs\\Controller\\OpendocsController->renderAjax';
+       $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['OpendocsController::closeDocument'] = 'TYPO3\\CMS\\Opendocs\\Controller\\OpendocsController->closeDocument';
        // Register update signal to update the number of open documents
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['updateSignalHook']['OpendocsController::updateNumber'] = $opendocsPath . 'class.tx_opendocs.php:TYPO3\\CMS\\Opendocs\\Controller\\OpendocsController->updateNumberOfOpenDocsHook';
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['updateSignalHook']['OpendocsController::updateNumber'] = 'TYPO3\\CMS\\Opendocs\\Controller\\OpendocsController->updateNumberOfOpenDocsHook';
 }
 ?>
\ No newline at end of file
index b515273..2eb88ed 100644 (file)
@@ -2,10 +2,7 @@
 if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
-if (TYPO3_MODE == 'BE') {
-       // First include the class file
-       include_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('opendocs') . 'class.tx_opendocs.php';
-
+if (TYPO3_MODE === 'BE') {
        // Now register the class as toolbar item
        $GLOBALS['TYPO3backend']->addToolbarItem('opendocs', 'TYPO3\\CMS\\Opendocs\\Controller\\OpendocsController');
 }