[BUGFIX] Warning in list module
[Packages/TYPO3.CMS.git] / typo3 / alt_shortcut.php
index c925e8b..f7dff88 100644 (file)
@@ -736,11 +736,13 @@ class SC_alt_shortcut {
                }
 
                        // Add custom workspaces (selecting all, filtering by BE_USER check):
-               $workspaces = $TYPO3_DB->exec_SELECTgetRows('uid,title,adminusers,members,reviewers','sys_workspace','pid=0'.t3lib_BEfunc::deleteClause('sys_workspace'),'','title');
-               if (count($workspaces)) {
-                       foreach ($workspaces as $rec)   {
-                               if ($BE_USER->checkWorkspace($rec))     {
-                                       $options[$rec['uid']] = $rec['uid'].': '.$rec['title'];
+               if (t3lib_extMgm::isLoaded('workspaces')) {
+                       $workspaces = $TYPO3_DB->exec_SELECTgetRows('uid,title,adminusers,members,reviewers','sys_workspace','pid=0'.t3lib_BEfunc::deleteClause('sys_workspace'),'','title');
+                       if (count($workspaces)) {
+                               foreach ($workspaces as $rec)   {
+                                       if ($BE_USER->checkWorkspace($rec))     {
+                                               $options[$rec['uid']] = $rec['uid'].': '.$rec['title'];
+                                       }
                                }
                        }
                }