Follow-up to #12381: Scheduler: BLOB database fields may not be NOT NULL
[Packages/TYPO3.CMS.git] / typo3 / alt_db_navframe.php
old mode 100755 (executable)
new mode 100644 (file)
index 0407b01..1edf306
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -150,7 +150,7 @@ class SC_alt_db_navframe {
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $BACK_PATH;
                $this->doc->setModuleTemplate('templates/alt_db_navframe.html');
-               $this->doc->docType  = 'xhtml_trans';
+               $this->doc->showFlashMessages = FALSE;
 
                        // get HTML-Template
 
@@ -158,7 +158,7 @@ class SC_alt_db_navframe {
                        // Adding javascript code for AJAX (prototype), drag&drop and the pagetree as well as the click menu code
                $this->doc->getDragDropCode('pages');
                $this->doc->getContextMenuCode();
-               $this->doc->loadJavascriptLib('contrib/scriptaculous/scriptaculous.js?load=effects');
+               $this->doc->getPageRenderer()->loadScriptaculous('effects');
 
                $this->doc->JScode .= $this->doc->wrapScriptTags(
                ($this->currentSubScript?'top.currentSubScript=unescape("'.rawurlencode($this->currentSubScript).'");':'').'
@@ -167,11 +167,19 @@ class SC_alt_db_navframe {
 
                // Function, loading the list frame from navigation tree:
                function jumpTo(id, linkObj, highlightID, bank) { //
-                       var theUrl = top.TS.PATH_typo3 + top.currentSubScript + "?id=" + id;
+                       var theUrl = top.TS.PATH_typo3 + top.currentSubScript ;
+                       if (theUrl.indexOf("?") != -1) {
+                               theUrl += "&id=" + id
+                       } else {
+                               theUrl += "?id=" + id
+                       }
                        top.fsMod.currentBank = bank;
 
-                       if (top.condensedMode) top.content.location.href = theUrl;
-                       else                   parent.list_frame.location.href=theUrl;
+                       if (top.condensedMode) {
+                               top.content.location.href = theUrl;
+                       } else {
+                               parent.list_frame.location.href=theUrl;
+                       }
 
                        '.($this->doHighlight ? 'Tree.highlightActiveItem("web", highlightID + "_" + bank);' : '').'
                        '.(!$GLOBALS['CLIENT']['FORMSTYLE'] ? '' : 'if (linkObj) linkObj.blur(); ').'
@@ -206,7 +214,7 @@ class SC_alt_db_navframe {
                <img'.t3lib_iconWorks::skinImg('','gfx/icon_note.gif','width="18" height="16"').' align="top" alt="" />'.
                '<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('setTempDBmount' => 0))).'">'.
                $LANG->sl('LLL:EXT:lang/locallang_core.xml:labels.temporaryDBmount',1).
-               '</a><br/>
+               '</a><br />
                '.$LANG->sl('LLL:EXT:lang/locallang_core.xml:labels.path',1).': <span title="'.htmlspecialchars($this->active_tempMountPoint['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->active_tempMountPoint['_thePath'],-50)).'</span>
        </div>
                        ';
@@ -224,7 +232,9 @@ class SC_alt_db_navframe {
                        // Setting up the buttons and markers for docheader
                $docHeaderButtons = $this->getButtons();
                $markers = array(
-                       'IMG_RESET'     => '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/close_gray.gif', ' width="16" height="16"').' id="treeFilterReset" alt="Reset Filter" />',
+                       'IMG_RESET'     => '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/close_gray.gif', ' width="16" height="16"') .
+                       ' id="treeFilterReset" alt="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.resetFilter') . '" ' .
+                       'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.resetFilter') . '" />',
                        'WORKSPACEINFO' => $this->getWorkspaceInfo(),
                        'CONTENT'       => $this->content
                );
@@ -265,14 +275,14 @@ class SC_alt_db_navframe {
                );
 
                        // New Page
-               $onclickNewPageWizard = 'top.content.list_frame.location.href=top.TS.PATH_typo3+\'db_new.php?pagesOnly=1&id=\'+Tree.pageID;"';
+               $onclickNewPageWizard = 'top.content.list_frame.location.href=top.TS.PATH_typo3+\'db_new.php?pagesOnly=1&amp;id=\'+Tree.pageID;';
                $buttons['new_page'] = '<a href="#" onclick="' . $onclickNewPageWizard . '"><img' . t3lib_iconWorks::skinImg('', 'gfx/new_page.gif') . ' title="' . $LANG->sL('LLL:EXT:cms/layout/locallang.xml:newPage', 1) . '" alt="" /></a>';
 
                        // Refresh
                $buttons['refresh'] = '<a href="' . htmlspecialchars(t3lib_div::getIndpEnv('REQUEST_URI')) . '"><img' . t3lib_iconWorks::skinImg('', 'gfx/refresh_n.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.refresh', 1) . '" alt="" /></a>';
 
                        // CSH
-               $buttons['csh'] = str_replace('typo3-csh-inline','typo3-csh-inline show-right',t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'pagetree', $GLOBALS['BACK_PATH']));
+               $buttons['csh'] = str_replace('typo3-csh-inline','typo3-csh-inline show-right',t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'pagetree', $GLOBALS['BACK_PATH'], '', TRUE));
 
                return $buttons;
        }
@@ -373,10 +383,10 @@ class SC_alt_db_navframe {
         * Called by typo3/ajax.php
         *
         * @param       array           $params: additional parameters (not used here)
-        * @param       TYPO3AJAX       &$ajaxObj: reference of the TYPO3AJAX object of this request
+        * @param       TYPO3AJAX       $ajaxObj: The TYPO3AJAX object of this request
         * @return      void
         */
-       public function ajaxExpandCollapse($params, &$ajaxObj) {
+       public function ajaxExpandCollapse($params, $ajaxObj) {
                global $LANG;
 
                $this->init();
@@ -390,7 +400,7 @@ class SC_alt_db_navframe {
 }
 
 
-// Include extension?
+
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_db_navframe.php'])      {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_db_navframe.php']);
 }