[TASK] Document support of MySQL Strict mode
[Packages/TYPO3.CMS.git] / typo3 / sysext / opendocs / ext_tables.php
index eecd0bd..146deb5 100644 (file)
@@ -1,29 +1,7 @@
 <?php
+defined('TYPO3_MODE') or die();
 
-if (!defined('TYPO3_MODE')) {
-       die('Access denied.');
+if (TYPO3_MODE === 'BE') {
+    // Register update signal to update the number of open documents
+    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['updateSignalHook']['OpendocsController::updateNumber'] = \TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::class . '->updateNumberOfOpenDocsHook';
 }
-
-if (TYPO3_MODE == 'BE') {
-
-       $opendocsPath = t3lib_extMgm::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']['tx_opendocs::renderMenu']   = $opendocsPath.'class.tx_opendocs.php:tx_opendocs->renderAjax';
-       $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['tx_opendocs::closeDocument'] = $opendocsPath.'class.tx_opendocs.php:tx_opendocs->closeDocument';
-
-               // Register update signal to update the number of open documents
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['updateSignalHook']['tx_opendocs::updateNumber'] = $opendocsPath.'class.tx_opendocs.php:tx_opendocs->updateNumberOfOpenDocsHook';
-
-               // Register menu module if option is wanted
-       $_EXTCONF = unserialize($_EXTCONF);
-       if ($_EXTCONF['enableModule']) {
-               t3lib_extMgm::addModule('user', 'doc', 'after:ws', $opendocsPath.'mod/');
-       }
-}
-
-?>
\ No newline at end of file