*** empty log message ***
authorKasper Skårhøj <kasper@typo3.org>
Sat, 27 Mar 2004 17:51:36 +0000 (17:51 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Sat, 27 Mar 2004 17:51:36 +0000 (17:51 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@157 709f56b5-9817-0410-a4d7-c38de5d9e867

12 files changed:
t3lib/class.t3lib_beuserauth.php
t3lib/class.t3lib_clipboard.php
t3lib/class.t3lib_parsehtml_proc.php
t3lib/class.t3lib_tceforms.php
t3lib/class.t3lib_tcemain.php
t3lib/class.t3lib_userauthgroup.php
t3lib/config_default.php
typo3/alt_doc.php
typo3/alt_mod_frameset.php
typo3/class.alt_menu_functions.inc
typo3/sysext/cms/tbl_tt_content.php
typo3/tce_db.php

index 54eb5b2..8b46c5b 100644 (file)
@@ -111,9 +111,10 @@ class t3lib_beUserAuth extends t3lib_userAuthGroup {
        var $uc;
 
                // User Config Default values:
+               // The array may contain other fields for configuration. For this, see "setup" extension and "TSConfig" document (User TSconfig, "setup.[xxx]....")
                /*
                        Reserved keys for other storage of session data:
-                       moduleData              
+                       moduleData
                        moduleSessionID
                */
        var $uc_default = Array (
@@ -125,8 +126,6 @@ class t3lib_beUserAuth extends t3lib_userAuthGroup {
                'condensedMode' => 0,
                'noMenuMode' => 0,
                'startInTaskCenter' => 0,
-               'localFrameEdit' => 0,
-               'dontEditInPageModule' => 0,
                'hideSubmoduleIcons' => 0,
                'helpText' => 1,
                'titleLen' => 30,
@@ -337,4 +336,4 @@ class t3lib_beUserAuth extends t3lib_userAuthGroup {
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_beuserauth.php'])       {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_beuserauth.php']);
 }
-?>
\ No newline at end of file
+?>
index 925f81f..7922a58 100755 (executable)
@@ -900,4 +900,4 @@ class t3lib_clipboard {
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_clipboard.php'])        {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_clipboard.php']);
 }
-?>
\ No newline at end of file
+?>
index dd4c46b..ea13215 100755 (executable)
@@ -39,7 +39,7 @@
  *
  *
  *
- *  102: class t3lib_parsehtml_proc extends t3lib_parsehtml 
+ *  102: class t3lib_parsehtml_proc extends t3lib_parsehtml
  *  137:     function init($elRef='',$recPid=0)
  *  149:     function setRelPath($path)
  *  173:     function evalWriteFile($pArr,$currentRecord)      
@@ -174,7 +174,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
 
                        // Write file configuration:
                if (is_array($pArr))    {
-                       if ($GLOBALS['TYPO3_CONF_VARS']['BE']['staticFileEditPath'] 
+                       if ($GLOBALS['TYPO3_CONF_VARS']['BE']['staticFileEditPath']
                                && substr($GLOBALS['TYPO3_CONF_VARS']['BE']['staticFileEditPath'],-1)=='/' 
                                && @is_dir(PATH_site.$GLOBALS['TYPO3_CONF_VARS']['BE']['staticFileEditPath']))  {
                                
@@ -204,7 +204,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
 
        
        
-       
+
        
        
        
@@ -231,7 +231,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
        function RTE_transform($value,$specConf,$direction='rte',$thisConfig=array())   {
 
                        // Init:
-               $this->procOptions=$thisConfig['proc.'];
+               $this->procOptions = $thisConfig['proc.'];
                $this->preserveTags = strtoupper(implode(',',t3lib_div::trimExplode(',',$this->procOptions['preserveTags'])));
 
                        // Get parameters for rte_transformation:
@@ -879,10 +879,10 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                        if ($k%2)       {       // Inside one of the blocks:
                        
                                        // Init:
-                               $tag=$this->getFirstTag($v);
-                               $tagName=strtolower($this->getFirstTagName($v));
-                               $attribArray=$this->get_tag_attributes_classic($tag);
-                               
+                               $tag = $this->getFirstTag($v);
+                               $tagName = strtolower($this->getFirstTagName($v));
+                               $attribArray = $this->get_tag_attributes_classic($tag);
+
                                        // Based on tagname, we do transformations:
                                switch($tagName)        {
                                        case 'blockquote':      // Keep blockquotes:
@@ -895,8 +895,8 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                                        $tListContent = $this->removeFirstAndLastTag($blockSplit[$k]);
                                                        $tListContent = ereg_replace('^[ ]*'.chr(10),'',$tListContent);
                                                        $tListContent = ereg_replace(chr(10).'[ ]*$','',$tListContent);
-                                                       $lines=explode(chr(10),$tListContent);
-                                                       $typ= $attribArray['type']==1?'ol':'ul';
+                                                       $lines = explode(chr(10),$tListContent);
+                                                       $typ = $attribArray['type']==1 ? 'ol' : 'ul';
                                                        $blockSplit[$k] = '<'.$typ.'>'.chr(10).
                                                                                                '<li>'.implode('</li>'.chr(10).'<li>',$lines).'</li>'.
                                                                                                '</'.$typ.'>';
@@ -904,8 +904,8 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                        break;
                                        case 'typohead':        // Transform typohead into Hx tags.
                                                if (!isset($this->procOptions['typohead']) || $this->procOptions['typohead'])   {
-                                                       $tC=$this->removeFirstAndLastTag($blockSplit[$k]);
-                                                       $typ=t3lib_div::intInRange($attribArray['type'],0,6);
+                                                       $tC = $this->removeFirstAndLastTag($blockSplit[$k]);
+                                                       $typ = t3lib_div::intInRange($attribArray['type'],0,6);
                                                        if (!$typ)      $typ=6;
                                                        $align = $attribArray['align']?' align="'.$attribArray['align'].'"': '';
                                                        $class = $attribArray['class']?' class="'.$attribArray['class'].'"': '';
@@ -915,18 +915,18 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                                }
                                        break;
                                }
-                               $blockSplit[$k+1]=ereg_replace('^[ ]*'.chr(10),'',$blockSplit[$k+1]);   // Removing linebreak if typohead
+                               $blockSplit[$k+1] = ereg_replace('^[ ]*'.chr(10),'',$blockSplit[$k+1]); // Removing linebreak if typohead
                        } else {        // NON-block:
                                $nextFTN = $this->getFirstTagName($blockSplit[$k+1]);
                                $singleLineBreak = $blockSplit[$k]==chr(10);
                                if (t3lib_div::inList('TABLE,BLOCKQUOTE,TYPOLIST,TYPOHEAD,'.$this->headListTags,$nextFTN))      {       // Removing linebreak if typolist/typohead
-                                       $blockSplit[$k]=ereg_replace(chr(10).'[ ]*$','',$blockSplit[$k]);
+                                       $blockSplit[$k] = ereg_replace(chr(10).'[ ]*$','',$blockSplit[$k]);
                                }
                                        // If $blockSplit[$k] is blank then unset the line. UNLESS the line happend to be a single line break.
                                if (!strcmp($blockSplit[$k],'') && !$singleLineBreak)   {
-                                       unset($blockSplit[$k]); 
+                                       unset($blockSplit[$k]);
                                } else {
-                                       $blockSplit[$k]=$this->setDivTags($blockSplit[$k],($this->procOptions['useDIVasParagraphTagForRTE']?'div':'p'));
+                                       $blockSplit[$k] = $this->setDivTags($blockSplit[$k],($this->procOptions['useDIVasParagraphTagForRTE']?'div':'p'));
                                }
                        }
                }
index 12c18ec..a4eb00c 100755 (executable)
 class t3lib_TCEforms   {
 
                // variables not commented yet.... (do so...)
-       var $helpTextFontTag='<font color="#333333">';
-       var $palFieldArr=array();
-       var $disableWizards=0;
-       var $isPalettedoc=0;
-       var $paletteMargin=1;
+       var $helpTextFontTag = '<font color="#333333">';
+       var $palFieldArr = array();
+       var $disableWizards = 0;
+       var $isPalettedoc = 0;
+       var $paletteMargin = 1;
        var $defStyle = ''; // 'font-family:Verdana;font-size:10px;';
-       var $cachedTSconfig=array();
-       var $cachedTSconfig_fieldLevel=array();
-       var $transformedRow=array();
-       var $extJSCODE='';
+       var $cachedTSconfig = array();
+       var $cachedTSconfig_fieldLevel = array();
+       var $transformedRow = array();
+       var $extJSCODE = '';
        var $printNeededJS = array();
        var $hiddenFieldAccum=array();
        var $TBE_EDITOR_fieldChanged_func='';
@@ -222,6 +222,7 @@ class t3lib_TCEforms        {
        var $clientInfo=array();                                        // Loaded with info about the browser when class is instantiated.
        var $RTEenabled=0;                                                      // True, if RTE is possible for the current user (based on result from BE_USER->isRTE())
        var $RTEenabled_notReasons='';                          // If $this->RTEenabled was false, you can find the reasons listed in this array which is filled with reasons why the RTE could not be loaded)
+       var $RTEcounter = 0;                                            // Counter that is incremented before an RTE is created. Can be used for unique ids etc.
                
        var $colorScheme;                                                       // Contains current color scheme
        var $defColorScheme;                                            // Contains the default color scheme
@@ -247,6 +248,7 @@ class t3lib_TCEforms        {
        var $savedSchemes=array();                                      // Color scheme buffer.
 
                // Internal, registers for user defined functions etc.
+       var $additionalCode_pre = array();                      // Additional HTML code, printed before the form.
        var $additionalJS_pre = array();                        // Additional JavaScript, printed before the form
        var $additionalJS_post = array();                       // Additional JavaScript printed after the form
        var $additionalJS_submit = array();                     // Additional JavaScript executed on submit; If you set "OK" variable it will raise an error about RTEs not being loaded and offer to block further submission.
@@ -913,6 +915,7 @@ class t3lib_TCEforms        {
 
                                        if (!$thisConfig['disabled'])   {
                                                if (!$this->disableRTE) {
+                                                       $this->RTEcounter++;
 
                                                                // Find alternative relative path for RTE images/links:
                                                        $eFile = t3lib_parsehtml_proc::evalWriteFile($specConf['static_write'], $row);
@@ -3079,6 +3082,18 @@ class t3lib_TCEforms     {
         * @return      string          A <script></script> section with JavaScript.
         */
        function JStop()        {
+
+               $out = '';
+
+                       // Additional top HTML:
+               if (count($this->additionalCode_pre))   {
+                       $out.= implode('
+
+                               // NEXT:
+                       ',$this->additionalCode_pre);
+               }
+
+                       // Additional top JavaScript
                if (count($this->additionalJS_pre))     {
                        $out.='
 
@@ -3099,9 +3114,11 @@ class t3lib_TCEforms     {
                </script>
                        ';
                }
+
+                       // Return result:
                return $out;
        }
-       
+
        /**
         * JavaScript code used for input-field evaluation.
         *
index bd6c4d2..d59bad0 100755 (executable)
@@ -40,7 +40,7 @@
  *  190: class t3lib_TCEmain   
  *  275:     function start($data,$cmd,$altUserObject='')      
  *  308:     function setMirror($mirror)       
- *  333:     function setDefaultsFromUserTS($userTS)   
+ *  333:     function setDefaultsFromUserTS($userTS)
  *  357:     function process_uploads($postFiles)      
  *  387:     function process_uploads_traverseArray(&$outputArr,$inputArr,$keyToSet)   
  *
@@ -333,9 +333,8 @@ class t3lib_TCEmain {
        function setDefaultsFromUserTS($userTS) {
                global $TCA;
                if (is_array($userTS))  {
-                       reset($userTS);
-                       while(list($k,$v)=each($userTS))        {
-                               $k=substr($k,0,-1);
+                       foreach($userTS as $k => $v)    {
+                               $k = substr($k,0,-1);
                                if ($k && is_array($v) && isset($TCA[$k]))      {
                                        if (is_array($this->defaultValues[$k])) {
                                                $this->defaultValues[$k] = array_merge($this->defaultValues[$k],$v);
index ae895b1..b301680 100755 (executable)
@@ -542,8 +542,7 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
                        if ($this->isAdmin())   {
                                $this->TSdataArray[]=$this->addTScomment('"admin" user presets:').'
                                        admPanel.enable.all = 1
-                                       setup.default.deleteCmdInClipboard = 1
-                                       options.shortcutFrame=1
+                                       options.shortcutFrame = 1
                                ';
                                if (t3lib_extMgm::isLoaded('tt_news'))  {
                                        $this->TSdataArray[]='
index 4a55fea..dc4920b 100755 (executable)
@@ -123,7 +123,6 @@ $TYPO3_CONF_VARS = Array(
 //                     'everybody' => ''                                               // default in tce_main is ''. If this is set (uncomment), this value is used instead.
                ),
                'defaultUC' => array (                                  // Override default settings for BE-users. See class.t3lib_beuserauth.php, array $uc_default
-//                     'openDirectly' => '0'
                ),
                        // The control of fileextensions goes in two catagories. Webspace and Ftpspace. Webspace is folders accessible from a webbrowser (below TYPO3_DOCUMENT_ROOT) and ftpspace is everything else.
                        // The control is done like this: If an extension matches 'allow' then the check returns true. If not and an extension matches 'deny' then the check return false. If no match at all, returns true.
index b522079..d514471 100755 (executable)
@@ -49,7 +49,7 @@
  *  481:     function printContent()   
  *
  *              SECTION: Sub-content functions, rendering specific parts of the module content.
- *  516:     function makeEditForm()   
+ *  516:     function makeEditForm()
  *  680:     function makeButtonPanel()        
  *  759:     function makeDocSel()     
  *  798:     function makeCmenu()      
@@ -619,30 +619,30 @@ class SC_alt_doc {
 
                                                                                // Setting variables in TCEforms object:
                                                                        $this->tceforms->hiddenFieldList = '';
-                                                                       $this->tceforms->globalShowHelp = $this->disHelp?0:1;
+                                                                       $this->tceforms->globalShowHelp = $this->disHelp ? 0 : 1;
                                                                        if (is_array($this->overrideVals[$table]))      {
-                                                                               $this->tceforms->hiddenFieldListArr=array_keys($this->overrideVals[$table]);
+                                                                               $this->tceforms->hiddenFieldListArr = array_keys($this->overrideVals[$table]);
                                                                        }
 
                                                                                // Create form for the record (either specific list of fields or the whole record):
-                                                                       $panel='';
+                                                                       $panel = '';
                                                                        if ($this->columnsOnly) {
-                                                                               $panel.=$this->tceforms->getListedFields($table,$rec,$this->columnsOnly);
+                                                                               $panel.= $this->tceforms->getListedFields($table,$rec,$this->columnsOnly);
                                                                        } else {
-                                                                               $panel.=$this->tceforms->getMainFields($table,$rec);
+                                                                               $panel.= $this->tceforms->getMainFields($table,$rec);
                                                                        }
-                                                                       $panel=$this->tceforms->wrapTotal($panel,$rec,$table);
-               
+                                                                       $panel = $this->tceforms->wrapTotal($panel,$rec,$table);
+
                                                                                // Setting the pid value for new records:
                                                                        if ($cmd=='new')        {
-                                                                               $panel.='<input type="hidden" name="data['.$table.']['.$rec['uid'].'][pid]" value="'.$rec['pid'].'" />';
+                                                                               $panel.= '<input type="hidden" name="data['.$table.']['.$rec['uid'].'][pid]" value="'.$rec['pid'].'" />';
                                                                                $this->newC++;
                                                                        }
-                                                                       
+
                                                                                // Display "is-locked" message:
-                                                                       if ($lockInfo=t3lib_BEfunc::isRecordLocked($table,$rec['uid'])) {
-                                                                               $lockIcon='
-                                                                               
+                                                                       if ($lockInfo = t3lib_BEfunc::isRecordLocked($table,$rec['uid']))       {
+                                                                               $lockIcon = '
+
                                                                                        <!--
                                                                                                Warning box:
                                                                                        -->
@@ -653,10 +653,10 @@ class SC_alt_doc {
                                                                                                </tr>
                                                                                        </table>
                                                                                ';
-                                                                       } else $lockIcon='';
-       
+                                                                       } else $lockIcon = '';
+
                                                                                // Combine it all:
-                                                                       $editForm.=$lockIcon.$panel;
+                                                                       $editForm.= $lockIcon.$panel;
                                                                }
                                                                
                                                                $thePrevUid = $rec['uid'];
index e094202..269daa4 100755 (executable)
@@ -103,7 +103,7 @@ class SC_alt_mod_frameset {
                        $width = $BE_USER->uc['navFrameWidth'];
                        $width = intval($width)?intval($width):($TBE_STYLES['dims']['navFrameWidth'] ? intval($TBE_STYLES['dims']['navFrameWidth']) : $this->defaultWidth);
                }
-               
+
                        // Navigation frame URL:
                $script = t3lib_div::_GP('script');
                $nav = t3lib_div::_GP('nav');
@@ -172,4 +172,4 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_m
 $SOBE = t3lib_div::makeInstance('SC_alt_mod_frameset');
 $SOBE->main();
 $SOBE->printContent();
-?>
\ No newline at end of file
+?>
index 7478d77..4844d72 100755 (executable)
@@ -485,4 +485,4 @@ class alt_menu_functions {
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.alt_menu_functions.inc'])     {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.alt_menu_functions.inc']);
 }
-?>
\ No newline at end of file
+?>
index f81882f..65600bd 100755 (executable)
@@ -559,7 +559,7 @@ $TCA['tt_content'] = Array (
                        )
                ),
                'imagecaption_position' => Array (
-                       'exclude' => 1, 
+                       'exclude' => 1,
                        'label' => 'LLL:EXT:cms/locallang_ttc.php:imagecaption_position',
                        'config' => Array (
                                'type' => 'select',
index 29eb6a9..696bdda 100644 (file)
@@ -119,7 +119,7 @@ class SC_tce_db {
                $this->CB = t3lib_div::_GP('CB');
                $this->vC = t3lib_div::_GP('vC');
                $this->uPT = t3lib_div::_GP('uPT');
-               
+
                        // Creating TCEmain object
                $this->tce = t3lib_div::makeInstance('t3lib_TCEmain');
                $this->tce->stripslashes_values=0;