[BUGFIX] Add stdWrap for excludeUidList for HMENU.
[Packages/TYPO3.CMS.git] / typo3 / sysext / cms / tslib / publish.php
index e0376a8..d821384 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -30,7 +30,7 @@
  * Is included from index_ts.php
  * $Id$
  *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
+ * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage tslib
  */
@@ -58,13 +58,13 @@ if (!is_object($TSFE))      {die('You cannot execute this file directly. It\'s meant
        // Storing the TSFE object
 $temp_publish_TSFE = $TSFE;
 $TT->push('Publishing','');
-$temp_publish_pages = explode(',', $BE_USER->frontendEdit->getExtPublishList());
+$temp_publish_pages = explode(',', $BE_USER->adminPanel->getExtPublishList());
 $temp_publish_imagesTotal = array();
 $temp_publish_array = array(); // Collects the rendered pages.
 
-while(list(,$temp_publish_id)=each($temp_publish_pages))       {
+foreach ($temp_publish_pages as $temp_publish_id) {
        $TT->push('Page '.$temp_publish_id,'');
-//debug($temp_publish_id,1);
+//debug($temp_publish_id);
                $TSFE = t3lib_div::makeInstance('tslib_fe', $TYPO3_CONF_VARS, $temp_publish_id, 0);
 
                $TSFE->initFEuser();
@@ -81,12 +81,10 @@ while(list(,$temp_publish_id)=each($temp_publish_pages))    {
                                if ($temp_theScript)    {
                                        include($temp_theScript);
                                } else {
-                                       require_once (PATH_tslib.'class.tslib_pagegen.php');            // Just formal, this is already included from index_ts.php
                                        include(PATH_tslib.'pagegen.php');
                                }
                                $TSFE->generatePage_postProcessing();
                } elseif ($TSFE->isINTincScript())      {
-                       require_once (PATH_tslib.'class.tslib_pagegen.php');    // Just formal, this is already included from index_ts.php
                        include(PATH_tslib.'pagegen.php');
                }
 
@@ -122,12 +120,11 @@ while(list(,$temp_publish_id)=each($temp_publish_pages))  {
 $publishDir = $TYPO3_CONF_VARS['FE']['publish_dir'];
 if ($publishDir && @is_dir($publishDir))       {
        $publishDir = rtrim($publishDir, '/').'/';
-       debug('Publishing in: '.$publishDir,1);
-       reset($temp_publish_array);
-       while(list($key,$val)=each($temp_publish_array))        {
+       debug('Publishing in: '.$publishDir, 'Publish');
+       foreach ($temp_publish_array as $key => $val) {
                $file = $publishDir.$key;
                t3lib_div::writeFile($file,$val[2]);
-               debug('Writing: '.$file,1);
+               debug('Writing: '.$file, 'Publish');
        }
 //     debug($temp_publish_array);
 } else {