*** empty log message ***
authorKasper Skårhøj <kasper@typo3.org>
Fri, 19 Dec 2003 22:51:48 +0000 (22:51 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Fri, 19 Dec 2003 22:51:48 +0000 (22:51 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@93 709f56b5-9817-0410-a4d7-c38de5d9e867

16 files changed:
TODO.txt
t3lib/class.t3lib_div.php
t3lib/class.t3lib_stdgraphic.php
t3lib/class.t3lib_tsfebeuserauth.php
t3lib/stddb/tables.php
t3lib/thumbs.php
typo3/alt_clickmenu.php
typo3/browse_links.php
typo3/mod/web/func/index.php
typo3/mod/web/info/index.php
typo3/mod/web/perm/index.php
typo3/stylesheet.css
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/index_ts.php
typo3/sysext/lang/locallang_browse_links.php

index fc113d1..19a1054 100755 (executable)
--- a/TODO.txt
+++ b/TODO.txt
@@ -3,15 +3,6 @@ TODO LIST
 *****************
 
 General:
-- BUG: (Not) using "rawurlencode" in links (breaks when spaces/special chars are in either dirname or filename):
-  - cImage... (see Rene Fritz report)
-  - RTE images break
-  - RTE drag'n'drop WORKS!
-  - RTE links break.
-  - thumbnails display break.
-  - attachment of records break.
-  - CHECK: header links in content elements?
-
 - CHECK: What is the number of supported page levels? 20 or 100?
 - CHECK: possible XSS problem with alt_mod_frameset.php taking parameters for scripts to display in frames.
 - Option: Turn of "onBlur" in backend (Message-ID: <001801c2a28c$bb020c70$963afea9@bla8kdvxpl8glk>)
index 144b0c0..3926cc8 100755 (executable)
@@ -1060,7 +1060,18 @@ class t3lib_div {
        function rawUrlEncodeJS($str)   {
                return str_replace('%20',' ',rawurlencode($str));
        }
-
+       
+       /**
+        * rawurlencode which preserves "/" chars
+        * Usefull when filepaths should keep the "/" chars, but have all other special chars encoded.
+        * 
+        * @param       string          Input string
+        * @return      string          Output string
+        */
+       function rawUrlEncodeFP($str)   {
+               return str_replace('%2F','/',rawurlencode($str));
+       }
+       
        /**
         * Checking syntax of input email address
         * 
index ae070bf..aff6968 100644 (file)
@@ -2060,7 +2060,7 @@ class t3lib_stdGraphic    {
         * Wrapping the input filename in double-quotes
         * 
         * @param       string          Input filename
-        * @return      string          The outpute wrapped in ""
+        * @return      string          The output wrapped in "" (if there are spaces in the filepath)
         * @access private
         */
        function wrapFileName($inputName)       {
index 2577479..6f1e3b2 100755 (executable)
@@ -145,6 +145,7 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
         * @see index_ts.php
         */
        function extPrintFeAdminDialog()        {
+
                if ($this->uc['TSFE_adminConfig']['display_top'])       {
                        if ($this->extAdmModuleEnabled('preview'))      $out.= $this->extGetCategory_preview();
                        if ($this->extAdmModuleEnabled('cache'))        $out.= $this->extGetCategory_cache();
@@ -331,6 +332,7 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
        function extGetCategory_edit($out='')   {
                $out.=$this->extGetHead('edit');
                if ($this->uc['TSFE_adminConfig']['display_edit'])      {
+
                                // If another page module was specified, replace the default Page module with the new one
                        $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
                        $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
@@ -667,12 +669,22 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
                        }
                        
                                // regular check:
-                       if ($this->uc['TSFE_adminConfig']['display_top'] && $this->uc['TSFE_adminConfig']['display_'.$pre])     {       // See if the menu is expanded!
+                       if ($this->extIsAdmMenuOpen($pre))      {       // See if the menu is expanded!
                                return $retVal;
                        }
                }
        }
 
+       /**
+        * Returns true if admin panel module is open
+        * 
+        * @param       string          Module key
+        * @return      boolean         True, if the admin panel is open for the specified admin panel module key.
+        */
+       function extIsAdmMenuOpen($pre) {
+               return $this->uc['TSFE_adminConfig']['display_top'] && $this->uc['TSFE_adminConfig']['display_'.$pre];
+       }
+
 
 
 
index 8390d17..d301a40 100755 (executable)
@@ -124,7 +124,7 @@ $LANG_GENERAL_LABELS = array(
  * NOTE: The (default) icon for a table is defined 1) as a giffile named 'gfx/i/[tablename].gif' or 2) as the value of [table][ctrl][iconfile]
  * NOTE: [table][ctrl][rootLevel] goes NOT for pages. Apart from that if rootLevel is true, records can ONLY be created on rootLevel. If it's false records can ONLY be created OUTSIDE rootLevel
  */ 
- $TCA = array();
+$TCA = array();
 
 /**
  * Table "pages": 
index 49dfb3e..e94c7ad 100755 (executable)
@@ -201,17 +201,17 @@ class SC_t3lib_thumbs {
                        if ($TYPO3_CONF_VARS['GFX']['im'])      {
                                        // If thumbnail does not exist, we generate it
                                if (!@file_exists($this->output))       {
-                                       if (strstr($this->input,' ') || strstr($this->output,' '))      {
+/*                                     if (strstr($this->input,' ') || strstr($this->output,' '))      {
                                                $this->errorGif('Spaces in','filepath',$this->input);
                                        }
-                                               // 16 colors for small (56) thumbs, 64 for bigger and all for jpegs
+*/                                             // 16 colors for small (56) thumbs, 64 for bigger and all for jpegs
                                        if ($outext=='jpg')     {
                                                $colors = '';
                                        } else {
                                                $colors = ($sizeMax>56)?'-colors 64':'-colors 16';
                                        }
                                        $cmd = ($TYPO3_CONF_VARS['GFX']['im_path_lzw'] ? $TYPO3_CONF_VARS['GFX']['im_path_lzw'] : $TYPO3_CONF_VARS['GFX']['im_path']).
-                                                               'convert -sample '.$this->size.' '.$colors.' '.$this->input.'[0] '.$this->output;
+                                                               'convert -sample '.$this->size.' '.$colors.' '.$this->wrapFileName($this->input.'[0]').' '.$this->wrapFileName($this->output);
 
                //                      echo $cmd;
                                        exec($cmd);
@@ -352,6 +352,20 @@ class SC_t3lib_thumbs {
                imagedestroy($im);
                exit;
        }
+
+       /**
+        * Wrapping the input filename in double-quotes
+        * 
+        * @param       string          Input filename
+        * @return      string          The output wrapped in "" (if there are spaces in the filepath)
+        * @access private
+        */
+       function wrapFileName($inputName)       {
+               if (strstr($inputName,' '))     {
+                       $inputName='"'.$inputName.'"';
+               }
+               return $inputName;
+       }
 }
 
 // Include extension class?
index 7659782..0624c12 100755 (executable)
@@ -128,6 +128,7 @@ class clickMenu {
 
                // Internal, static:
        var $backPath='';                       // Backpath for scripts/images.
+       var $PH_backPath='###BACK_PATH###';             // BackPath place holder: We need different backPath set whether the clickmenu is written back to a frame which is not in typo3/ dir or if the clickmenu is shown in the top frame (no backpath)
        var $listFrame=0;                       // If set, the calling document should be in the listframe of a frameset.
        var $isDBmenu=0;                        // If set, the menu is about database records, not files. (set if part 2 [1] of the item-var is NOT blank)
        var $alwaysContentFrame=0;      // If true, the "content" frame is always used for reference (when condensed mode is enabled)
@@ -174,16 +175,19 @@ class clickMenu {
                if (!$this->cmLevel)    {
                                // Make 1st level clickmenu:
                        if ($this->isDBmenu)    {
-                               return $this->printDBClickMenu($this->iParts[0],$this->iParts[1]);
+                               $CMcontent = $this->printDBClickMenu($this->iParts[0],$this->iParts[1]);
                        } else {
-                               return $this->printFileClickMenu($this->iParts[0]);
+                               $CMcontent = $this->printFileClickMenu($this->iParts[0]);
                        }
                } else {
                                // Make 2nd level clickmenu (only for DBmenus)
                        if ($this->isDBmenu)    {
-                               return $this->printNewDBLevel($this->iParts[0],$this->iParts[1]);
+                               $CMcontent = $this->printNewDBLevel($this->iParts[0],$this->iParts[1]);
                        }
                }
+               
+                       // Return clickmenu conten:
+               return $CMcontent;
        }
 
        /**
@@ -294,8 +298,8 @@ class clickMenu {
                        // Return the printed elements:
                return $this->printItems($menuItems,
                        $root?
-                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/_icon_website.gif','width="18" height="16"').' class="absmiddle" alt="" />'.htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']):
-                       t3lib_iconWorks::getIconImage($table,$this->rec,$this->backPath,' class="absmiddle" title="'.htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($this->rec,$table)).'"').t3lib_BEfunc::getRecordTitle($table,$this->rec,1)
+                       '<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/i/_icon_website.gif','width="18" height="16"').' class="absmiddle" alt="" />'.htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']):
+                       t3lib_iconWorks::getIconImage($table,$this->rec,$this->PH_backPath,' class="absmiddle" title="'.htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($this->rec,$table)).'"').t3lib_BEfunc::getRecordTitle($table,$this->rec,1)
                );
        }
 
@@ -332,8 +336,8 @@ class clickMenu {
                if (!is_array($menuItems))      $menuItems=array();
                return $this->printItems($menuItems,
                        $root?
-                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/_icon_website.gif','width="18" height="16"').' class="absmiddle" alt="" />'.htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']):
-                       t3lib_iconWorks::getIconImage($table,$this->rec,$this->backPath,' class="absmiddle" title="'.htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($this->rec,$table)).'"').t3lib_BEfunc::getRecordTitle($table,$this->rec,1)
+                       '<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/i/_icon_website.gif','width="18" height="16"').' class="absmiddle" alt="" />'.htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']):
+                       t3lib_iconWorks::getIconImage($table,$this->rec,$this->PH_backPath,' class="absmiddle" title="'.htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($this->rec,$table)).'"').t3lib_BEfunc::getRecordTitle($table,$this->rec,1)
                );
        }
 
@@ -397,7 +401,7 @@ class clickMenu {
                }       
                return $this->linkItem(
                        $this->label($type),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/clip_'.$type.($isSel==$type?'_h':'').'.gif','width="12" height="12"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/clip_'.$type.($isSel==$type?'_h':'').'.gif','width="12" height="12"').' alt="" />'),
                        "top.loadTopMenu('".$this->clipObj->selUrlDB($table,$uid,($type=='copy'?1:0),($isSel==$type))."');return false;"
                );
        }
@@ -422,7 +426,7 @@ class clickMenu {
                
                return $this->linkItem(
                        $this->label('paste'.$type),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/clip_paste'.$type.'.gif','width="12" height="12"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/clip_paste'.$type.'.gif','width="12" height="12"').' alt="" />'),
                        $editOnClick.'return false;'
                );
        }
@@ -438,7 +442,7 @@ class clickMenu {
        function DB_info($table,$uid)   {
                return $this->linkItem(
                        $this->label('info'),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom2.gif','width="12" height="12"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/zoom2.gif','width="12" height="12"').' alt="" />'),
                        "top.launchView('".$table."', '".$uid."'); return hideCM();"                    
                );
        }
@@ -455,7 +459,7 @@ class clickMenu {
                $url = 'show_rechis.php?element='.rawurlencode($table.':'.$uid);
                return $this->linkItem(
                        $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_history')),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/history2.gif','width="13" height="12"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/history2.gif','width="13" height="12"').' alt="" />'),
                        $this->urlRefForCM($url,'returnUrl'),
                        0
                );
@@ -474,7 +478,7 @@ class clickMenu {
                $url = 'mod/web/perm/index.php?id='.$uid.($rec['perms_userid']==$GLOBALS['BE_USER']->user['uid']||$GLOBALS['BE_USER']->isAdmin()?'&return_id='.$uid.'&edit=1':'');
                return $this->linkItem(
                        $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_perms')),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/perm.gif','width="7" height="12"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/perm.gif','width="7" height="12"').' alt="" />'),
                        $this->urlRefForCM($url),
                        0
                );
@@ -493,7 +497,7 @@ class clickMenu {
                $url = t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR').'db_list.php?table='.($table=='pages'?'':$table).'&id='.($table=='pages'?$uid:$rec['pid']);
                return $this->linkItem(
                        $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_db_list')),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/list.gif','width="11" height="11"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/list.gif','width="11" height="11"').' alt="" />'),
                        "top.nextLoadModuleUrl='".$url."';top.goToModule('web_list',1);",
                        0
                );
@@ -514,7 +518,7 @@ class clickMenu {
                                
                return $this->linkItem(
                        $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_moveWizard'.($table=='pages'?'_page':''))),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/move_'.($table=='pages'?'page':'record').'.gif','width="11" height="12"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/move_'.($table=='pages'?'page':'record').'.gif','width="11" height="12"').' alt="" />'),
                        $this->urlRefForCM($url,'returnUrl'),
                        0
                );
@@ -533,7 +537,7 @@ class clickMenu {
                $url = ($table=='pages' || !t3lib_extMgm::isLoaded('cms')) ? 'db_new.php?id='.$uid.'&pagesOnly=1' : 'sysext/cms/layout/db_new_content_el.php?id='.$rec['pid'].'&sys_language_uid='.intval($rec['sys_language_uid']);
                return $this->linkItem(
                        $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_newWizard')),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_'.($table=='pages'?'page':'record').'.gif','width="'.($table=='pages'?'13':'16').'" height="12"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/new_'.($table=='pages'?'page':'record').'.gif','width="'.($table=='pages'?'13':'16').'" height="12"').' alt="" />'),
                        $this->urlRefForCM($url,'returnUrl'),
                        0
                );
@@ -552,7 +556,7 @@ class clickMenu {
                $url = 'alt_doc.php?edit['.$table.']['.$uid.']=edit'.$addParam;
                return $this->linkItem(
                        $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_editAccess')),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/editaccess.gif','width="12" height="12"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/editaccess.gif','width="12" height="12"').' alt="" />'),
                        $this->urlRefForCM($url,'returnUrl'),
                        1       // no top frame CM!
                );
@@ -569,7 +573,7 @@ class clickMenu {
                $url = 'alt_doc.php?edit[pages]['.$uid.']=edit';
                return $this->linkItem(
                        $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_editPageHeader')),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/edit2.gif','width="11" height="12"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/edit2.gif','width="11" height="12"').' alt="" />'),
                        $this->urlRefForCM($url,'returnUrl'),
                        1       // no top frame CM!
                );
@@ -592,13 +596,13 @@ class clickMenu {
                $editOnClick='';
                $loc='top.content'.($this->listFrame && !$this->alwaysContentFrame ?'.list_frame':'');
                $addParam='';
-               $theIcon = t3lib_iconWorks::skinImg($this->backPath,'gfx/edit2.gif','width="11" height="12"');
+               $theIcon = t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/edit2.gif','width="11" height="12"');
                if (
                                $this->iParts[0]=='pages' && 
                                $this->iParts[1] && 
                                $BE_USER->check('modules', $pageModule)
                        )       {
-                       $theIcon = t3lib_iconWorks::skinImg($this->backPath,'gfx/edit_page.gif','width="12" height="12"');
+                       $theIcon = t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/edit_page.gif','width="12" height="12"');
                        $this->editPageIconSet=1;
                        if ($BE_USER->uc['classicPageEditMode'] || !t3lib_extMgm::isLoaded('cms'))      {
                                $addParam='&editRegularContentFromId='.intval($this->iParts[1]);
@@ -630,13 +634,13 @@ class clickMenu {
                $loc='top.content'.(!$this->alwaysContentFrame?'.list_frame':'');
                $editOnClick='if('.$loc.'){'.$loc.".document.location=top.TS.PATH_typo3+'".
                        ($this->listFrame?
-                               $this->backPath."alt_doc.php?returnUrl='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'&edit[".$table."][-".$uid."]=new'":
-                               $this->backPath.'db_new.php?id='.intval($uid)."'").
+                               "alt_doc.php?returnUrl='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'&edit[".$table."][-".$uid."]=new'":
+                               'db_new.php?id='.intval($uid)."'").
                        ';}';
                        
                return $this->linkItem(
                        $this->label('new'),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_'.($table=='pages'&&$this->listFrame?'page':'el').'.gif','width="'.($table=='pages'?'13':'11').'" height="12"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/new_'.($table=='pages'&&$this->listFrame?'page':'el').'.gif','width="'.($table=='pages'?'13':'11').'" height="12"').' alt="" />'),
                        $editOnClick.'return hideCM();'
                );
        }
@@ -659,7 +663,7 @@ class clickMenu {
 
                return $this->linkItem(
                        $this->label(($rec[$hideField]?'un':'').'hide'),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_'.($rec[$hideField]?'un':'').'hide.gif','width="11" height="10"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/button_'.($rec[$hideField]?'un':'').'hide.gif','width="11" height="10"').' alt="" />'),
                        $editOnClick.'return false;',
                        1
                );
@@ -682,7 +686,7 @@ class clickMenu {
 
                return $this->linkItem(
                        $this->label('delete'),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/garbage.gif','width="11" height="12"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/garbage.gif','width="11" height="12"').' alt="" />'),
                        $editOnClick.'return false;'
                );
        }
@@ -698,8 +702,8 @@ class clickMenu {
        function DB_view($id,$anchor='')        {
                return $this->linkItem(
                        $this->label('view'),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom.gif','width="12" height="12"').' alt="" />'),
-                       t3lib_BEfunc::viewOnClick($id,$this->backPath,t3lib_BEfunc::BEgetRootLine($id),$anchor).'return hideCM();'
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/zoom.gif','width="12" height="12"').' alt="" />'),
+                       t3lib_BEfunc::viewOnClick($id,$this->PH_backPath,t3lib_BEfunc::BEgetRootLine($id),$anchor).'return hideCM();'
                );
        }
 
@@ -731,7 +735,7 @@ class clickMenu {
                        $fI = pathinfo($path);
                        $icon = is_dir($path) ? 'folder.gif' : t3lib_BEfunc::getFileIcon(strtolower($fI['extension']));
                        $size=' ('.t3lib_div::formatSize(filesize($path)).'bytes)';
-                       $icon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/fileicons/'.$icon,'width="18" height="16"').' class="absmiddle" title="'.htmlspecialchars($fI['basename'].$size).'" alt="" />';
+                       $icon = '<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/fileicons/'.$icon,'width="18" height="16"').' class="absmiddle" title="'.htmlspecialchars($fI['basename'].$size).'" alt="" />';
 
                                // edit
                        if (!in_array('edit',$this->disabledItems) && is_file($path) && t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['SYS']['textfile_ext'],$fI['extension'])) $menuItems['edit']=$this->FILE_launch($path,'file_edit.php','edit','edit_file.gif');
@@ -808,7 +812,7 @@ class clickMenu {
                
                return $this->linkItem(
                        $this->label($type),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/'.$image,'width="12" height="12"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/'.$image,'width="12" height="12"').' alt="" />'),
                        $editOnClick.'return hideCM();'
                );
        }
@@ -829,7 +833,7 @@ class clickMenu {
                }       
                return $this->linkItem(
                        $this->label($type),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/clip_'.$type.($isSel==$type?'_h':'').'.gif','width="12" height="12"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/clip_'.$type.($isSel==$type?'_h':'').'.gif','width="12" height="12"').' alt="" />'),
                        "top.loadTopMenu('".$this->clipObj->selUrlFile($path,($type=='copy'?1:0),($isSel==$type))."');return false;"
                );
        }
@@ -849,7 +853,7 @@ class clickMenu {
                
                return $this->linkItem(
                        $this->label('delete'),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/garbage.gif','width="11" height="12"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/garbage.gif','width="11" height="12"').' alt="" />'),
                        $editOnClick.'return false;'
                );
        }
@@ -872,7 +876,7 @@ class clickMenu {
                
                return $this->linkItem(
                        $this->label('pasteinto'),
-                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/clip_pasteinto.gif','width="12" height="12"').' alt="" />'),
+                       $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/clip_pasteinto.gif','width="12" height="12"').' alt="" />'),
                        $editOnClick.'return false;'
                );
        }
@@ -919,18 +923,21 @@ class clickMenu {
                                                        <!-- Items: -->
                                                <td class="c-item">'.
                                                        implode('</td>
-                                               <td><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/acm_spacer2.gif','width="8" height="12"').' alt="" /></td>
+                                               <td><img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/acm_spacer2.gif','width="8" height="12"').' alt="" /></td>
                                                <td class="c-item">',$this->menuItemsForTopFrame($menuItems)).
                                                '</td>
                                                
                                                        <!-- Close button: -->
-                                               <td class="c-closebutton"><a href="#" onclick="hideCM();return false;"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/close_12h.gif','width="11" height="12"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.close',1).'" alt="" /></a></td>
+                                               <td class="c-closebutton"><a href="#" onclick="hideCM();return false;"><img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/close_12h.gif','width="11" height="12"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.close',1).'" alt="" /></a></td>
                                                
                                                        <!-- The item of the clickmenu: -->
                                                <td class="c-itemicon">'.$item.'</td>
                                        </tr>
                                </table>
                        ';
+               
+                               // Set remaining BACK_PATH to blank (if any)
+                       $out = str_replace($this->PH_backPath,'',$out);
                }
                        // Adding JS part:
                $out.=$this->printLayerJScode($menuItems);
@@ -960,6 +967,9 @@ class clickMenu {
                                // Wrap the inner table in another table to create outer border:
                        $CMtable = $this->wrapColorTableCM($CMtable);
                                
+                               // Set back path place holder to real back path
+                       $CMtable = str_replace($this->PH_backPath,$this->backPath,$CMtable);
+
                                // Create JavaScript section:
                        $script=$GLOBALS['TBE_TEMPLATE']->wrapScriptTags('
                        
@@ -1168,7 +1178,7 @@ class SC_alt_clickmenu {
                } else {
                        $this->backPath = $BACK_PATH;
                }
-
+               
                        // Setting internal array of classes for extending the clickmenu:
                $this->extClassArray = $GLOBALS['TBE_MODULES_EXT']['xMOD_alt_clickmenu']['extendCMclasses'];
 
@@ -1264,12 +1274,6 @@ class SC_alt_clickmenu {
                $clickMenu->extClassArray = $this->extClassArray;
                $clickMenu->dontDisplayTopFrameCM = $this->dontDisplayTopFrameCM;
                $clickMenu->backPath = $this->backPath;
-               
-                       // Takes the backPath as a parameter BUT since we are worried about someone forging a backPath (XSS security hole) we will check with sent md5 hash:
-               $inputBP = explode('|',$this->backPath);
-               if (count($inputBP)==2 && $inputBP[1]==md5($inputBP[0].'|'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) {
-                       $clickMenu->backPath = $inputBP[0];
-               }
 
                        // Start page 
                $this->content.=$this->doc->startPage('Context Sensitive Menu');
index 841545f..2f24cc8 100755 (executable)
@@ -1593,7 +1593,7 @@ class SC_browse_links {
                        $titleLen=intval($GLOBALS['BE_USER']->uc['titleLen']);  
                        $picon='<img'.t3lib_iconWorks::skinImg('','gfx/i/_icon_webfolders.gif','width="18" height="16"').' alt="" />';
                        $picon.=htmlspecialchars(t3lib_div::fixed_lgd(basename($expandFolder),$titleLen));
-                       $picon='<a href="#" onclick="return link_folder(\''.substr($expandFolder,strlen(PATH_site)).'\');">'.$picon.'</a>';
+                       $picon='<a href="#" onclick="return link_folder(\''.t3lib_div::rawUrlEncodeFP(substr($expandFolder,strlen(PATH_site))).'\');">'.$picon.'</a>';
                        $out.=$picon.'<br />';
                        
                                // Get files from the folder:
@@ -1601,26 +1601,33 @@ class SC_browse_links {
                        $c=0;
                        $cc=count($files);
 
-                       foreach($files as $filepath)    {
-                               $c++;
-                               $fI=pathinfo($filepath);
-
-                                       // File icon:
-                               $icon = t3lib_BEfunc::getFileIcon(strtolower($fI['extension']));
-                               
-                                       // If the listed file turns out to be the CURRENT file, then show blinking arrow:
-                               if ($this->curUrlInfo['act']=="file" && $cmpPath==$filepath)    {
-                                       $arrCol='<img'.t3lib_iconWorks::skinImg('','gfx/blinkarrow_left.gif','width="5" height="9"').' class="c-blinkArrowL" alt="" />';
-                               } else {
-                                       $arrCol='';
+                       if (is_array($files))   {
+                               foreach($files as $filepath)    {
+                                       $c++;
+                                       $fI=pathinfo($filepath);
+       
+                                               // File icon:
+                                       $icon = t3lib_BEfunc::getFileIcon(strtolower($fI['extension']));
+                                       
+                                               // If the listed file turns out to be the CURRENT file, then show blinking arrow:
+                                       if ($this->curUrlInfo['act']=="file" && $cmpPath==$filepath)    {
+                                               $arrCol='<img'.t3lib_iconWorks::skinImg('','gfx/blinkarrow_left.gif','width="5" height="9"').' class="c-blinkArrowL" alt="" />';
+                                       } else {
+                                               $arrCol='';
+                                       }
+                                       
+                                               // Get size and icon:
+                                       $size=' ('.t3lib_div::formatSize(filesize($filepath)).'bytes)';
+                                       $icon = '<img'.t3lib_iconWorks::skinImg('','gfx/fileicons/'.$icon.'','width="18" height="16"').' title="'.htmlspecialchars($fI['basename'].$size).'" alt="" />';
+                                       
+                                               // Put it all together for the file element:
+                                       $out.='<img'.t3lib_iconWorks::skinImg('','gfx/ol/join'.($c==$cc?'bottom':'').'.gif','width="18" height="16"').' alt="" />'.
+                                                       $arrCol.
+                                                       '<a href="#" onclick="return link_folder(\''.t3lib_div::rawUrlEncodeFP(substr($filepath,strlen(PATH_site))).'\');">'.
+                                                       $icon.
+                                                       htmlspecialchars(t3lib_div::fixed_lgd(basename($filepath),$titleLen)).
+                                                       '</a><br />';
                                }
-                               
-                                       // Get size and icon:
-                               $size=' ('.t3lib_div::formatSize(filesize($filepath)).'bytes)';
-                               $icon = '<img'.t3lib_iconWorks::skinImg('','gfx/fileicons/'.$icon.'','width="18" height="16"').' title="'.htmlspecialchars($fI['basename'].$size).'" alt="" />';
-                               
-                                       // Put it all together for the file element:
-                               $out.='<img'.t3lib_iconWorks::skinImg('','gfx/ol/join'.($c==$cc?'bottom':'').'.gif','width="18" height="16"').' alt="" />'.$arrCol.'<a href="#" onclick="return link_folder(\''.substr($filepath,strlen(PATH_site)).'\');">'.$icon.htmlspecialchars(t3lib_div::fixed_lgd(basename($filepath),$titleLen)).'</a><br />';
                        }
                }
                return $out;
@@ -1667,9 +1674,6 @@ class SC_browse_links {
                                foreach($files as $filepath)    {
                                        $fI=pathinfo($filepath);
                                        
-                                               // URL of image:
-                                       $iurl = $this->siteURL.substr($filepath,strlen(PATH_site));
-                                       
                                                // Thumbnail/size generation:
                                        if (t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],$fI['extension']) && !$noThumbs)      {
                                                $imgInfo = $imgObj->getImageDimensions($filepath);
@@ -1686,8 +1690,13 @@ class SC_browse_links {
                                        $icon = '<img'.t3lib_iconWorks::skinImg('','gfx/fileicons/'.$ficon,'width="18" height="16"').' title="'.htmlspecialchars($fI['basename'].$size).'" class="absmiddle" alt="" />';
                
                                                // Create links for adding the file:
-                                       $ATag = "<a href=\"#\" onclick=\"return insertElement('','".t3lib_div::shortMD5($filepath)."', 'file', '".rawurlencode($fI['basename'])."', unescape('".rawurlencode($filepath)."'), '".$fI['extension']."', '".$ficon."');\">";
-                                       $ATag_alt = substr($ATag,0,-4).",'',1);\">";
+                                       if (strstr($filepath,',') || strstr($filepath,'|'))     {       // In case an invalid character is in the filepath, display error message:
+                                               $eMsg = $LANG->JScharCode(sprintf($LANG->getLL('invalidChar'),', |'));
+                                               $ATag = $ATag_alt = "<a href=\"#\" onclick=\"alert(".$eMsg.");return false;\">";
+                                       } else {        // If filename is OK, just add it:
+                                               $ATag = "<a href=\"#\" onclick=\"return insertElement('','".t3lib_div::shortMD5($filepath)."', 'file', '".rawurlencode($fI['basename'])."', unescape('".rawurlencode($filepath)."'), '".$fI['extension']."', '".$ficon."');\">";
+                                               $ATag_alt = substr($ATag,0,-4).",'',1);\">";
+                                       }
                                        $ATag_e='</a>';
                
                                                // Create link to showing details about the file in a window:
@@ -1783,8 +1792,8 @@ class SC_browse_links {
                                                $fI=pathinfo($filepath);
                                                
                                                        // URL of image:
-                                               $iurl = $this->siteURL.substr($filepath,strlen(PATH_site));
-                                               
+                                               $iurl = $this->siteURL.t3lib_div::rawurlencodeFP(substr($filepath,strlen(PATH_site)));
+
                                                        // Show only web-images
                                                if (t3lib_div::inList('gif,jpeg,jpg,png',$fI['extension']))     {
                                                        $imgInfo = @getimagesize($filepath);
@@ -1818,7 +1827,9 @@ class SC_browse_links {
                                                                <tr class="bgColor4">
                                                                        <td nowrap="nowrap">'.$filenameAndIcon.'&nbsp;</td>
                                                                        <td nowrap="nowrap">'.
-                                                                       ($imgInfo[0]!=$IW ? '<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('noLimit'=>'1'))).'"><img'.t3lib_iconWorks::skinImg('','gfx/icon_warning2.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->getLL('clickToRedrawFullSize',1).'" alt="" /></a>':'').
+                                                                       ($imgInfo[0]!=$IW ? '<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('noLimit'=>'1'))).'">'.
+                                                                                                               '<img'.t3lib_iconWorks::skinImg('','gfx/icon_warning2.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->getLL('clickToRedrawFullSize',1).'" alt="" />'.
+                                                                                                               '</a>':'').
                                                                        $pDim.'&nbsp;</td>
                                                                </tr>';
                                                        
@@ -1910,7 +1921,7 @@ class SC_browse_links {
                        <h3 class="bgColor5">'.htmlspecialchars($str).'</h3>
                        ';
        }
-
+        
        /**
         * Displays a message box with the input message
         * 
@@ -1948,7 +1959,7 @@ class SC_browse_links {
                        -->
                        <table border="0" cellpadding="0" cellspacing="0" class="bgColor5" id="typo3-curUrl">
                                <tr>
-                                       <td>'.$GLOBALS['LANG']->getLL('currentLink',1).': '.htmlspecialchars($str).'</td>
+                                       <td>'.$GLOBALS['LANG']->getLL('currentLink',1).': '.htmlspecialchars(rawurldecode($str)).'</td>
                                </tr>
                        </table>';
        }
@@ -1975,8 +1986,8 @@ class SC_browse_links {
                                $info['act']='spec';
                        } elseif (t3lib_div::isFirstPartOfStr($href,$siteUrl))  {       // If URL is on the current frontend website:
                                $rel = substr($href,strlen($siteUrl));
-                               if (@file_exists(PATH_site.$rel))       {       // URL is a file, which exists:
-                                       $info['value']=$rel;
+                               if (@file_exists(PATH_site.rawurldecode($rel))) {       // URL is a file, which exists:
+                                       $info['value']=rawurldecode($rel);
                                        $info['act']='file';
                                } else {        // URL is a page (id parameter)
                                        $uP=parse_url($rel);
index 5378b7f..d18f6ca 100755 (executable)
@@ -110,6 +110,12 @@ class SC_mod_web_func_index extends t3lib_SCbase {
                        ');
 
 
+                               // Setting up the context sensitive menu:
+                       $CMparts=$this->doc->getContextMenuCode();
+                       $this->doc->bodyTagAdditions = $CMparts[1];
+                       $this->doc->JScode.=$CMparts[0];
+                       $this->doc->postCode.= $CMparts[2];
+
                        $this->doc->form='<form action="index.php" method="post"><input type="hidden" name="id" value="'.$this->id.'">';
 
                        $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path').': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);
index 945ebd9..95084b6 100755 (executable)
@@ -119,6 +119,12 @@ class SC_mod_web_info_index extends t3lib_SCbase {
                        ');
                
 
+                               // Setting up the context sensitive menu:
+                       $CMparts=$this->doc->getContextMenuCode();
+                       $this->doc->bodyTagAdditions = $CMparts[1];
+                       $this->doc->JScode.=$CMparts[0];
+                       $this->doc->postCode.= $CMparts[2];
+
                        $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path',1).': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);
                
                                // Draw the header.
index dfb35ff..f3b95f3 100755 (executable)
@@ -165,6 +165,12 @@ class SC_mod_web_perm_index {
                        }
                ');
 
+                       // Setting up the context sensitive menu:
+               $CMparts=$this->doc->getContextMenuCode();
+               $this->doc->bodyTagAdditions = $CMparts[1];
+               $this->doc->JScode.=$CMparts[0];
+               $this->doc->postCode.= $CMparts[2];
+
                        // Set up menus:                
                $this->menuConfig();
        }
index 20b9123..c24a564 100755 (executable)
@@ -113,7 +113,7 @@ IMG {
 
  /* Set default values for bodytags: */
 BODY { 
-       margin: 2px 0px 0px 2px; 
+       margin: 2px 0px 0px 4px; 
        background-color: #F7F3EF;
 }
 
@@ -215,7 +215,9 @@ TABLE#typo3-msgBox TR TD { padding: 10px 50px 10px 50px; }
 
 /* Palette display for TCEforms (top frame, alt_palette.php) */
 BODY#typo3-alt-palette-php { background-image: url(gfx/alt_topmenu_back_full.gif); margin-top: 8px; margin-left: 6px; }
-TABLE#typo3-TCEforms-palette TD {white-space: nowrap; vertical-align: middle;}
+TABLE#typo3-TCEforms-palette TD {white-space: nowrap; vertical-align: top;}
+TABLE#typo3-TCEforms-palette TR TD.c-label { padding-top: 3px; }
+TABLE#typo3-TCEforms-palette TR TD.c-close { padding-top: 3px; }
 
 /* Context Sensitive Help window (view_help.php) */
 DIV.typo3-view-help { margin-top: 6px; margin-left: 3px; width:95%; }
@@ -295,12 +297,11 @@ BODY#typo3-file-edit-php DIV#c-submit, BODY#typo3-file-edit-php DIV#c-edit {
 }
 
 /* Web > Page */
-TABLE.typo3-page-columnsMode TABLE.typo3-page-ceHeader { width: 100%; }
-TABLE.typo3-page-columnsMode TABLE.typo3-page-ceHeader IMG { vertical-align: middle; }
+TABLE.typo3-page-ceHeader { width: 100%; }
+TABLE.typo3-page-ceHeader IMG { vertical-align: middle; }
 TABLE.typo3-page-columnsMode IMG.c-divider { margin: 10px 0px 5px 0px;}
 
 /* Web > List */
-BODY#typo3-db-list-php { margin-left: 4px; }
 TABLE.typo3-dblist IMG { vertical-align: middle; }
 TABLE.typo3-dblist TR TD { padding-left: 1px; padding-right: 6px; }
 TABLE.typo3-dblist TR TD.c-headLineTable { background-color: #cccccc; height: 16px; }
@@ -317,7 +318,6 @@ INPUT.smallCheckboxes { vertical-align: middle; margin: 0 0 0 0; padding: 0 0 0
 DIV#typo3-listOptions { margin: 10px 0px 10px 0px; }
 
 /* File > List */
-BODY#typo3-file-list-php { margin-left: 4px; }
 TABLE#typo3-filelist IMG { vertical-align: middle; }
 TABLE#typo3-filelist TR TD { padding-left: 1px; padding-right: 6px; }
 TABLE#typo3-filelist TR TD.c-headLine  { background-color: #cccccc; font-weight: bold; height: 16px; }
index ddfa686..4b3fdbb 100755 (executable)
@@ -2329,7 +2329,7 @@ class tslib_cObj {
                        $info[3] = t3lib_div::png_to_gif_by_imagemagick($info[3]);
                        $GLOBALS['TSFE']->imagesOnPage[]=$info[3];              // This array is used to collect the image-refs on the page...
                        $alttext = strip_tags($this->stdWrap($conf['alttext'],$conf['alttext.']));
-                       $theValue = '<img src="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.$info[3]).'" width="'.$info[0].'" height="'.$info[1].'"  border="'.intval($conf['border']).'"'.($conf['params']?' '.$conf['params']:'').($alttext?' alt="'.htmlspecialchars($alttext).'"':' alt=""').' />';
+                       $theValue = '<img src="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.t3lib_div::rawUrlEncodeFP($info[3])).'" width="'.$info[0].'" height="'.$info[1].'"  border="'.intval($conf['border']).'"'.($conf['params']?' '.$conf['params']:'').($alttext?' alt="'.htmlspecialchars($alttext).'"':' alt=""').' />';
                        if ($conf['linkWrap'])  {
                                $theValue = $this->linkWrap($theValue,$conf['linkWrap']);
                        } elseif ($conf['imageLinkWrap']) {
@@ -4497,7 +4497,9 @@ class tslib_cObj {
                                // Internal target:
                        $target = isset($conf['target']) ? $conf['target'] : $GLOBALS['TSFE']->intTarget;
                        if ($conf['target.'])   {$target=$this->stdWrap($target, $conf['target.']);}
-                       if(strstr($link_param,'@'))     {               // mailadr
+                       
+                               // Detecting kind of link:
+                       if(strstr($link_param,'@'))     {               // If it's a mail address:
                                $link_param = eregi_replace('^mailto:','',$link_param);
                                if ($linktxt=='') $linktxt = $link_param;
                                if (!$GLOBALS['TSFE']->config['config']['jumpurl_enable'] || $GLOBALS['TSFE']->config['config']['jumpurl_mailto_disable'])      {
@@ -4518,7 +4520,7 @@ class tslib_cObj {
                                $urlChar=intval(strpos($link_param, '.'));
 
                                        // Detects if a file is found in site-root (or is a 'virtual' simulateStaticDocument file!) and if so it will be treated like a normal file.
-                               list($rootFileDat) = explode('?',$link_param);
+                               list($rootFileDat) = explode('?',rawurldecode($link_param));
                                $rFD_fI = pathinfo($rootFileDat);
                                if (trim($rootFileDat) && !strstr($link_param,'/') && (@is_file(PATH_site.$rootFileDat) || t3lib_div::inList('php,html,htm',strtolower($rFD_fI['extension'])))) {       
                                        $isLocalFile=1;
@@ -4541,8 +4543,8 @@ class tslib_cObj {
                                        $finalTagParts['TYPE']='url';
                                } elseif ($fileChar || $isLocalFile)    {       // file (internal)
                                        $splitLinkParam = explode('?',$link_param);
-                                       if (@file_exists($splitLinkParam[0]) || $isLocalFile)   {
-                                               if ($linktxt=='') $linktxt = $link_param;
+                                       if (@file_exists(rawurldecode($splitLinkParam[0])) || $isLocalFile)     {
+                                               if ($linktxt=='') $linktxt = rawurldecode($link_param);
                                                if ($GLOBALS['TSFE']->config['config']['jumpurl_enable'])       {
                                                        $this->lastTypoLinkUrl = $GLOBALS['TSFE']->absRefPrefix.$GLOBALS['TSFE']->config['mainScript'].$initP.'&jumpurl='.rawurlencode($link_param).$GLOBALS['TSFE']->getMethodUrlIdToken;
                                                } else {
index 5ae22c0..c6b0222 100755 (executable)
         * @see getCompressedTCarray()
         */
        function includeTCA($TCAloaded=1)       {
-               global $TCA, $PAGES_TYPES, $LANG_GENERAL_LABELS;
-               
+               global $TCA, $PAGES_TYPES, $LANG_GENERAL_LABELS, $TBE_MODULES;
                if (!$this->TCAloaded)  {
                        $TCA = Array();
                        include (TYPO3_tables_script ? PATH_typo3conf.TYPO3_tables_script : PATH_t3lib.'stddb/tables.php');
index 2d37540..0521031 100755 (executable)
@@ -203,14 +203,14 @@ if ($HTTP_COOKIE_VARS['be_typo_user']) {          // If the backend cookie is set, we pr
                                        $BE_USER->ext_forcePreview=1;
                                }
        
-                               if ($BE_USER->extAdmModuleEnabled('edit'))      {
+                                       // Include classes for editing IF editing module in Admin Panel is open (it is assumed that $TSFE->displayEditIcons is set only if the Edit module is open in the Admin Panel)
+                               if ($BE_USER->extAdmModuleEnabled('edit') && $BE_USER->extIsAdmMenuOpen('edit'))        {
+                                       $TSFE->includeTCA();
                                        if ($BE_USER->extIsEditAction())        {
-                                               $TSFE->includeTCA();
                                                require_once (PATH_t3lib.'class.t3lib_tcemain.php');
                                                $BE_USER->extEditAction();
                                        }
                                        if ($BE_USER->extIsFormShown()) {
-                                               $TSFE->includeTCA();
                                                require_once(PATH_t3lib.'class.t3lib_tceforms.php');
                                                require_once(PATH_t3lib.'class.t3lib_iconworks.php');
                                                require_once(PATH_t3lib.'class.t3lib_loaddbgroup.php');
index 34bf521..49dd757 100755 (executable)
@@ -29,6 +29,7 @@ $LOCAL_LANG = Array (
                'findDragDrop' => 'Find your image, then click on the image and drag it into the editor in the main window!',
                'noWebFolder' => 'You cannot drag images from this folder (yellow) because it is internal on the server.',
                'currentLink' => 'Current Link',
+               'invalidChar' => 'ERROR: Invalid character found in file path (%s). Cannot add the file!',
        ),
        'dk' => Array (
                'removeLink' => 'Fjern link',