Followup to #10597: Fixed bad call to the admin panel within fe_edit
authorJeff Segars <jsegars@alumni.rice.edu>
Wed, 3 Jun 2009 18:22:29 +0000 (18:22 +0000)
committerJeff Segars <jsegars@alumni.rice.edu>
Wed, 3 Jun 2009 18:22:29 +0000 (18:22 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5541 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/fe_edit/view/class.tx_feedit_editpanel.php

index b19617b..d8de8dc 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-06-03  Jeff Segars  <jeff@webempoweredchurch.org.org>
+
+       * Followup to #10597: Fixed bad call to the admin panel within fe_edit
+
 2009-06-03  Ernesto Baschny  <ernst@cron-it.de>
 
        * Added feature #11107: CSC: Provides more flexible rendering for the images block in "text with image", e.g. less tags (and no DL) around "single images without caption"
index 86a7e3d..edfb102 100644 (file)
@@ -89,10 +89,8 @@ class tx_feedit_editpanel {
                        break;
                        default:
                                $panel = '';
-                               if (isset($allow['toolbar'])) {
-                                       $adminClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['admin'];
-                                       $admin = &t3lib_div::getUserObj($adminClass);
-                                       $panel .= $admin->ext_makeToolBar() . '<img src="clear.gif" width="2" height="1" alt="" title="" />';
+                               if (isset($allow['toolbar']) && ($GLOBALS['BE_USER']->adminPanel instanceof tslib_AdminPanel)) {
+                                       $panel .= $GLOBALS['BE_USER']->adminPanel->ext_makeToolBar() . '<img src="clear.gif" width="2" height="1" alt="" title="" />';
                                }
                                if (isset($allow['edit'])) {
                                        $panel .= $this->editPanelLinkWrap('<img src="' . TYPO3_mainDir . 'gfx/edit2.gif" width="11" height="12" hspace="2" border="0" title="' . $GLOBALS['BE_USER']->extGetLL('p_editRecord').'" align="top" alt="" />', $formName, 'edit', $dataArr['_LOCALIZED_UID'] ? $table . ':' . $dataArr['_LOCALIZED_UID'] : $currentRecord);