Changed the inclusion of ->include_once arrays to be done on one line with foreach
authorKasper Skårhøj <kasper@typo3.org>
Mon, 15 Dec 2003 10:28:39 +0000 (10:28 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Mon, 15 Dec 2003 10:28:39 +0000 (10:28 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@62 709f56b5-9817-0410-a4d7-c38de5d9e867

15 files changed:
t3lib/class.t3lib_extobjbase.php
t3lib/class.t3lib_scbase.php
typo3/alt_clickmenu.php
typo3/db_list.php
typo3/mod/web/func/index.php
typo3/mod/web/info/index.php
typo3/show_item.php
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/cms/layout/db_new_content_el.php
typo3/tce_db.php
typo3/tce_file.php
typo3/template.php
typo3/wizard_add.php
typo3/wizard_forms.php
typo3/wizard_table.php

index b80ca5a..05be302 100755 (executable)
  *     $SOBE->init();
  *     
  *     // Include files?
- *     reset($SOBE->include_once);     
- *     while(list(,$INC_FILE)=each($SOBE->include_once))       {include_once($INC_FILE);}
+ *     foreach($SOBE->include_once as $INC_FILE)       include_once($INC_FILE);
  *     $SOBE->checkExtObj();   // Checking for first level external objects
  *     
  *     // Repeat Include files! - if any files has been added by second-level extensions
- *     reset($SOBE->include_once);     
- *     while(list(,$INC_FILE)=each($SOBE->include_once))       {include_once($INC_FILE);}
+ *     foreach($SOBE->include_once as $INC_FILE)       include_once($INC_FILE);
  *     $SOBE->checkSubExtObj();        // Checking second level external objects
  *     
  *     $SOBE->main();
index 02aeb9f..39866e2 100644 (file)
  *             $SOBE->init();
  *             
  *               // AFTER INIT THE INTERNAL ARRAY ->include_once MAY HOLD FILENAMES TO INCLUDE
- *             reset($SOBE->include_once);     
- *             while(list(,$INC_FILE)=each($SOBE->include_once))       {include_once($INC_FILE);}
+ *             foreach($SOBE->include_once as $INC_FILE)       include_once($INC_FILE);
  *             
  *               // THEN WE WILL CHECK IF THERE IS A 'SUBMODULE' REGISTERED TO BE INITIALIZED AS WELL:
  *             $SOBE->checkExtObj();
index 3865098..0c77d4e 100755 (executable)
@@ -1131,10 +1131,9 @@ class SC_alt_clickmenu {
                // Internal:
        var $content='';                                // Content accumulation
        var $doc;                                               // Template object 
-       var $includeOnce=array();               // Files to include_once() - set in init() function
+       var $include_once=array();              // Files to include_once() - set in init() function
        var $extClassArray=array();             // Internal array of classes for extending the clickmenu
        var $dontDisplayTopFrameCM=0;   // If set, then the clickmenu will NOT display in the top frame.
-       var $backPath='';
 
        /**
         * Constructor function for script class.
@@ -1152,8 +1151,8 @@ class SC_alt_clickmenu {
                $this->MCONF['name']='xMOD_alt_clickmenu.php';
 
                        // 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('|',t3lib_div::GPvar('backPath'));
-               if (count($inputBP)==2 && $inputBP[1]==md5($inputBP[0].'|'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) {
+               $inputBP = explode('|',$this->backPath);
+               if (count($inputBP)==2 && $inputBP[1]==t3lib_div::shortMD5($inputBP[0].'|'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) {
                        $this->backPath = $inputBP[0];
                } else {
                        $this->backPath = $BACK_PATH;
@@ -1298,8 +1297,7 @@ $SOBE = t3lib_div::makeInstance('SC_alt_clickmenu');
 $SOBE->init();
 
 // Include files?
-reset($SOBE->includeOnce);     
-while(list(,$INC_FILE)=each($SOBE->includeOnce))       {include_once($INC_FILE);}
+foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
 
 $SOBE->main();
 $SOBE->printContent();
index cf15798..8f0a699 100755 (executable)
@@ -425,8 +425,7 @@ $SOBE = t3lib_div::makeInstance('SC_db_list');
 $SOBE->init();
 
 // Include files?
-reset($SOBE->include_once);    
-while(list(,$INC_FILE)=each($SOBE->include_once))      {include_once($INC_FILE);}
+foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
 
 $SOBE->clearCache();
 $SOBE->main();
index 421915f..5378b7f 100755 (executable)
@@ -183,13 +183,11 @@ $SOBE = t3lib_div::makeInstance('SC_mod_web_func_index');
 $SOBE->init();
 
 // Include files?
-reset($SOBE->include_once);    
-while(list(,$INC_FILE)=each($SOBE->include_once))      {include_once($INC_FILE);}
+foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
 $SOBE->checkExtObj();  // Checking for first level external objects
 
 // Repeat Include files! - if any files has been added by second-level extensions
-reset($SOBE->include_once);    
-while(list(,$INC_FILE)=each($SOBE->include_once))      {include_once($INC_FILE);}
+foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
 $SOBE->checkSubExtObj();       // Checking second level external objects
 
 $SOBE->main();
index ea1d8d7..945ebd9 100755 (executable)
@@ -188,13 +188,11 @@ $SOBE = t3lib_div::makeInstance('SC_mod_web_info_index');
 $SOBE->init();
 
 // Include files?
-reset($SOBE->include_once);    
-while(list(,$INC_FILE)=each($SOBE->include_once))      {include_once($INC_FILE);}
+foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
 $SOBE->checkExtObj();  // Checking for first level external objects
 
 // Repeat Include files! - if any files has been added by second-level extensions
-reset($SOBE->include_once);    
-while(list(,$INC_FILE)=each($SOBE->include_once))      {include_once($INC_FILE);}
+foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
 $SOBE->checkSubExtObj();       // Checking second level external objects
 
 $SOBE->main();
index 59cc1dd..d5148fc 100755 (executable)
@@ -373,8 +373,7 @@ $SOBE = t3lib_div::makeInstance('SC_show_item');
 $SOBE->init();
 
 // Include files?
-reset($SOBE->include_once);    
-while(list(,$INC_FILE)=each($SOBE->include_once))      {include_once($INC_FILE);}
+foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
 
 $SOBE->main();
 $SOBE->printContent();
index 71e462d..69bfb3e 100755 (executable)
@@ -1192,8 +1192,7 @@ $SOBE = t3lib_div::makeInstance('SC_db_layout');
 $SOBE->init();
 
 // Include files?
-reset($SOBE->include_once);    
-while(list(,$INC_FILE)=each($SOBE->include_once))      {include_once($INC_FILE);}
+foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
 
 $SOBE->clearCache();
 $SOBE->main();
index 024c79a..dd64ef5 100644 (file)
@@ -526,8 +526,7 @@ $SOBE = t3lib_div::makeInstance('SC_db_new_content_el');
 $SOBE->init();
 
 // Include files?
-reset($SOBE->include_once);    
-while(list(,$INC_FILE)=each($SOBE->include_once))      {include_once($INC_FILE);}
+foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
 
 $SOBE->main();
 $SOBE->printContent();
index 7ad0f41..81297b3 100644 (file)
@@ -241,8 +241,7 @@ $SOBE = t3lib_div::makeInstance('SC_tce_db');
 $SOBE->init();
 
 // Include files?
-reset($SOBE->include_once);    
-while(list(,$INC_FILE)=each($SOBE->include_once))      {include_once($INC_FILE);}
+foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
 
 $SOBE->initClipboard();
 $SOBE->main();
index abdd1dd..4aa843c 100755 (executable)
@@ -178,8 +178,7 @@ $SOBE = t3lib_div::makeInstance('SC_tce_file');
 $SOBE->init();
 
 // Include files?
-reset($SOBE->include_once);    
-while(list(,$INC_FILE)=each($SOBE->include_once))      {include_once($INC_FILE);}
+foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
 
 $SOBE->initClipboard();
 $SOBE->main();
index 6b155a2..ced9b79 100755 (executable)
@@ -277,7 +277,7 @@ class template {
         * @return      string          The link-wrapped input string.
         */
        function wrapClickMenuOnIcon($str,$table,$uid='',$listFr=1)     {
-               $backPath = '&backPath='.rawurlencode($this->backPath).'|'.md5($this->backPath.'|'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']);
+               $backPath = '&backPath='.rawurlencode($this->backPath).'|'.t3lib_div::shortMD5($this->backPath.'|'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']);
                $onClick = 'top.loadTopMenu(\''.$this->backPath.'alt_clickmenu.php?item='.rawurlencode($table.'|'.$uid.'|'.$listFr).$backPath.'\');'.$this->thisBlur().'return false;';
                return '<a href="#" onclick="'.htmlspecialchars($onClick).'">'.$str.'</a>';
        }
@@ -584,7 +584,7 @@ class template {
                $generator = $this->generator();
                
                        // For debugging: If this outputs "QuirksMode"/"BackCompat" (IE) the browser runs in quirks-mode. Otherwise the value is "CSS1Compat"
-               $this->JScodeArray[]='alert(document.compatMode);';
+#              $this->JScodeArray[]='alert(document.compatMode);';
                
                        // Send HTTP header for selected charset. Added by Robert Lemke 23.10.2003
                header ('Content-Type:text/html;charset='.$this->charset);
index 38512ce..6e6b8e0 100755 (executable)
@@ -221,8 +221,7 @@ $SOBE = t3lib_div::makeInstance('SC_wizard_add');
 $SOBE->init();
 
 // Include files?
-reset($SOBE->include_once);    
-while(list(,$INC_FILE)=each($SOBE->include_once))      {include_once($INC_FILE);}
+foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
 
 $SOBE->main();
 $SOBE->printContent();
index 64a300f..0b98d2b 100755 (executable)
@@ -917,8 +917,7 @@ $SOBE = t3lib_div::makeInstance('SC_wizard_forms');
 $SOBE->init();
 
 // Include files?
-reset($SOBE->include_once);    
-while(list(,$INC_FILE)=each($SOBE->include_once))      {include_once($INC_FILE);}
+foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
 
 $SOBE->main();
 $SOBE->printContent();
index 3aabe0a..59cafba 100755 (executable)
@@ -623,8 +623,7 @@ $SOBE = t3lib_div::makeInstance('SC_wizard_table');
 $SOBE->init();
 
 // Include files?
-reset($SOBE->include_once);    
-while(list(,$INC_FILE)=each($SOBE->include_once))      {include_once($INC_FILE);}
+foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
 
 $SOBE->main();
 $SOBE->printContent();