git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4899 709f56b5-9817-0410-a4d7...
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_frontendedit.php
index daab5fc..2e752d3 100644 (file)
@@ -135,7 +135,7 @@ class t3lib_frontendedit {
        public function displayAdmin() {
                $content = '';
                $adminClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['admin'];
-               if ($adminClass && !$GLOBALS['BE_USER']->extAdminConfig['hide']) {
+               if ($adminClass && !$GLOBALS['BE_USER']->extAdminConfig['hide'] && $GLOBALS['TSFE']->config['config']['admPanel']) {
                        $admin = &t3lib_div::getUserObj($adminClass);
                        if (is_object($admin)) {
                                $content =  $admin->display();
@@ -435,7 +435,7 @@ class t3lib_frontendedit {
         * Basically taking in the data and commands and passes them on to the proper classes as they should be.
         *
         * @return      void
-        * @throws t3lib_exception_InvalidFrontendEditAction if TSFE_EDIT[cmd] is not a valid command
+        * @throws UnexpectedValueException if TSFE_EDIT[cmd] is not a valid command
         * @see index_ts.php
         */
        public function editAction() {
@@ -455,12 +455,10 @@ class t3lib_frontendedit {
                        if(is_callable(array($this, $cmd))) {
                                $this->$cmd($table, $uid);
                        } else {
-                               require_once(PATH_t3lib . 'exception/class.t3lib_exception_frontendedit.php');
-                               throw new t3lib_exception_frontendedit(
+                               throw new UnexpectedValueException(
                                        'The specified frontend edit command (' . $cmd . ') is not valid.',
                                        1225818120
                                );
-
                        }
                }
                        // Data: