Fixed bug #14952: Opendocs Module relies on taskcenter_recent causing fatal error...
authorSusanne Moog <typo3@susannemoog.de>
Sun, 8 Aug 2010 09:17:53 +0000 (09:17 +0000)
committerSusanne Moog <typo3@susannemoog.de>
Sun, 8 Aug 2010 09:17:53 +0000 (09:17 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8521 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/alt_doc_nodoc.php

index 9684e09..9b42e21 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-08-08  Susanne Moog  <typo3@susanne-moog.de>
+
+       * Fixed bug #14952: Opendocs Module relies on taskcenter_recent causing fatal error with new taskcenter (thanks to Georg Ringer and Philipp Gampe)
+
 2010-08-07  Christian Kuhn  <lolli@schwarzbu.ch>
 
        * Fixed bug #15386: [Caching framework] Remove needless constant in cache manager
index b6ffa8a..b06328f 100644 (file)
@@ -53,12 +53,7 @@ require('init.php');
 require('template.php');
 $LANG->includeLLFile('EXT:lang/locallang_alt_doc.xml');
 
-
-if (t3lib_extMgm::isLoaded('taskcenter') && t3lib_extMgm::isLoaded('taskcenter_recent'))       {
-       require_once(t3lib_extMgm::extPath('taskcenter').'task/class.mod_user_task.php');
-       require_once(t3lib_extMgm::extPath('taskcenter_recent').'class.tx_taskcenterrecent.php');
-}
-
+require_once(t3lib_extMgm::extPath('opendocs') . 'class.tx_opendocs.php');
 
 
 /**
@@ -101,6 +96,21 @@ class SC_alt_doc_nodoc {
                $this->doc->bodyTagMargins['y']=5;
                $this->doc->backPath = $BACK_PATH;
 
+                       // Add JS
+               $this->doc->JScode = $this->doc->wrapScriptTags('
+               function jump(url, modName, mainModName) {
+                               // clear information about which entry in nav. tree that might have been highlighted.
+                       top.fsMod.navFrameHighlightedID = [];
+
+                       if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav) {
+                               top.content.nav_frame.refresh_nav();
+                       }
+
+                       top.nextLoadModuleUrl = url;
+                       top.goToModule(modName);
+               }
+               ');
+
                        // Start the page:
                $this->content='';
                $this->content.=$this->doc->startPage('TYPO3 Edit Document');
@@ -156,15 +166,9 @@ class SC_alt_doc_nodoc {
                        $msg[]='<p>'.sprintf($LANG->getLL('noDocuments_msg2',1),implode(' ',$msg_2)).'</p><br />';
                }
 
-                       // If the task center is loaded and the module of recent documents is, then display the list of the most recently edited documents:
-               if ($BE_USER->check('modules','user_task') && t3lib_extMgm::isLoaded('taskcenter_recent'))      {
-                       $modObj = t3lib_div::makeInstance('tx_taskcenterrecent');
-                       $modObj->backPath = $BACK_PATH;
-                       $modObj->BE_USER = $BE_USER;
-                       $modObj->perms_clause = $BE_USER->getPagePermsClause(1);
-
-                       $msg[]='<p>'.$LANG->getLL('noDocuments_msg3',1).'</p><br />'.$modObj->_renderRecent();
-               }
+                       // Display the list of the most recently edited documents:
+               $modObj = t3lib_div::makeInstance('tx_opendocs');
+               $msg[] = '<p>' . $GLOBALS['LANG']->getLL('noDocuments_msg3', TRUE) . '</p><br />' . $modObj->renderMenu();
 
                        // Adding the content:
                $this->content.=$this->doc->section($LANG->getLL('noDocuments'),implode(' ',$msg),0,1);