[TASK] Clean up phpDoc comments in typo3/sysext/
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 21 Jun 2012 17:04:10 +0000 (19:04 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 21 Jun 2012 18:21:37 +0000 (20:21 +0200)
Clean up phpDoc comments for the following classes:

* typo3/sysext/filelist/ext_tables.php
* typo3/sysext/filelist/mod1/conf.php
* typo3/sysext/filelist/mod1/index.php
* typo3/sysext/func/ext_tables.php
* typo3/sysext/func/mod1/conf.php
* typo3/sysext/func/mod1/index.php
* typo3/sysext/func_wizards/class.tx_funcwizards_webfunc.php
* typo3/sysext/func_wizards/ext_tables.php
* typo3/sysext/impexp/app/conf.php
* typo3/sysext/impexp/class.tx_impexp_clickmenu.php
* typo3/sysext/impexp/ext_autoload.php
* typo3/sysext/impexp/ext_tables.php
* typo3/sysext/impexp/modfunc1/class.tx_impexp_modfunc1.php
* typo3/sysext/impexp/task/class.tx_impexp_task.php

Clean up provides:

* Provide correct parameter names in phpDoc
* Provide correct data types in phpDoc
* CGLify phpDoc (remove tabs)

Change-Id: Ie0af03800d7e5592e8e8e9936f746603d238b0a5
Resolves: #38262
Releases: 6.0
Reviewed-on: http://review.typo3.org/12257
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
14 files changed:
typo3/sysext/filelist/ext_tables.php
typo3/sysext/filelist/mod1/conf.php
typo3/sysext/filelist/mod1/index.php
typo3/sysext/func/ext_tables.php
typo3/sysext/func/mod1/conf.php
typo3/sysext/func/mod1/index.php
typo3/sysext/func_wizards/class.tx_funcwizards_webfunc.php
typo3/sysext/func_wizards/ext_tables.php
typo3/sysext/impexp/app/conf.php
typo3/sysext/impexp/class.tx_impexp_clickmenu.php
typo3/sysext/impexp/ext_autoload.php
typo3/sysext/impexp/ext_tables.php
typo3/sysext/impexp/modfunc1/class.tx_impexp_modfunc1.php
typo3/sysext/impexp/task/class.tx_impexp_task.php

index f820920..cb9663b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
-if (!defined ('TYPO3_MODE')) {
-       die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
 }
 
 if (TYPO3_MODE === 'BE') {
index b6fda27..fac53f8 100644 (file)
@@ -1,10 +1,10 @@
 <?php
 
 $MLANG['default']['tabs_images']['tab'] = 'list.gif';
-$MLANG['default']['ll_ref']='LLL:EXT:lang/locallang_mod_file_list.xml';
+$MLANG['default']['ll_ref'] = 'LLL:EXT:lang/locallang_mod_file_list.xml';
 
-$MCONF['script']='_DISPATCH';
-$MCONF['access']='user,group';
-$MCONF['name']='file_list';
-$MCONF['workspaces']='online,custom';
+$MCONF['script'] = '_DISPATCH';
+$MCONF['access'] = 'user,group';
+$MCONF['name'] = 'file_list';
+$MCONF['workspaces'] = 'online,custom';
 ?>
\ No newline at end of file
index 81898dd..01ceb47 100644 (file)
@@ -29,7 +29,7 @@
  *
  * Revised for TYPO3 3.6 2/2003 by Kasper Skårhøj
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 
 $LANG->includeLLFile('EXT:lang/locallang_mod_file_list.xml');
@@ -40,18 +40,19 @@ $BE_USER->modAccess($MCONF, 1);
 /**
  * Script Class for creating the list of files in the File > Filelist module
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage core
  */
 class SC_file_list {
-       var $MCONF=array();                     // Module configuration
-       var $MOD_MENU=array();
-       var $MOD_SETTINGS=array();
-
+               // Module configuration
+       var $MCONF = array();
+       var $MOD_MENU = array();
+       var $MOD_SETTINGS = array();
 
                // Internal:
-       var $content;   // Accumulated HTML output
+               // Accumulated HTML output
+       var $content;
 
        /**
         * Document template object
@@ -61,23 +62,26 @@ class SC_file_list {
        var $doc;
 
                // Internal, static: GPvars:
-       var $id;                // "id" -> the path to list.
+               // "id" -> the path to list.
+       var $id;
        /* @var t3lib_file_Folder $folderObject */
        protected $folderObject;
        /* @var t3lib_FlashMessage $errorMessage */
        protected $errorMessage;
-       var $pointer;   // Pointer to listing
-       var $table;             // "Table"
-       var $imagemode; // Thumbnail mode.
+               // Pointer to listing
+       var $pointer;
+               // "Table"
+       var $table;
+               // Thumbnail mode.
+       var $imagemode;
        var $cmd;
        var $overwriteExistingFiles;
 
-
        /**
         * Initialize variables, file object
         * Incoming GET vars include id, pointer, table, imagemode
         *
-        * @return      void
+        * @return void
         */
        function init() {
 
@@ -93,12 +97,12 @@ class SC_file_list {
                        // Setting module name:
                $this->MCONF = $GLOBALS['MCONF'];
 
-                       // create the folder object
+                       // Create the folder object
                try {
                        if ($combinedIdentifier) {
                                $fileFactory = t3lib_div::makeInstance('t3lib_file_Factory');
                                $this->folderObject = $fileFactory->getFolderObjectFromCombinedIdentifier($combinedIdentifier);
-                                       // disallow the rendering of the processing folder (e.g. could be called manually)
+                                       // Disallow the rendering of the processing folder (e.g. could be called manually)
                                        // and all folders without any defined storage
                                if ($this->folderObject &&
                                                ($this->folderObject->getStorage()->getUid() == 0 || trim($this->folderObject->getStorage()->getProcessingFolder()->getIdentifier(), '/') == trim($this->folderObject->getIdentifier(), '/'))
@@ -106,7 +110,7 @@ class SC_file_list {
                                        $this->folderObject = NULL;
                                }
                        } else {
-                               // take the first object of the first storage
+                                       // Take the first object of the first storage
                                $fileStorages = $GLOBALS['BE_USER']->getFileStorages();
                                $fileStorage = reset($fileStorages);
                                if ($fileStorage) {
@@ -118,12 +122,11 @@ class SC_file_list {
                                }
                        }
                } catch (t3lib_file_exception_FolderDoesNotExistException $fileException) {
-                               // set folder object to null and throw a message later on
+                               // Set folder object to null and throw a message later on
                        $this->folderObject = NULL;
                        $this->errorMessage = t3lib_div::makeInstance('t3lib_FlashMessage', sprintf($GLOBALS['LANG']->getLL('folderNotFoundMessage', TRUE), htmlspecialchars($this->id)), $GLOBALS['LANG']->getLL('folderNotFoundTitle', TRUE), t3lib_FlashMessage::ERROR);
                }
 
-
                        // Configure the "menu" - which is used internally to save the values of sorting, displayThumbs etc.
                $this->menuConfig();
        }
@@ -131,7 +134,7 @@ class SC_file_list {
        /**
         * Setting the menu/session variables
         *
-        * @return      void
+        * @return void
         */
        function menuConfig() {
                        // MENU-ITEMS:
@@ -153,7 +156,7 @@ class SC_file_list {
        /**
         * Main function, creating the listing
         *
-        * @return      void
+        * @return void
         */
        function main() {
                        // Initialize the template object
@@ -164,7 +167,7 @@ class SC_file_list {
 
                        // There there was access to this file path, continue, make the list
                if ($this->folderObject) {
-                               // include the initialization for the flash uploader
+                               // Include the initialization for the flash uploader
                        if ($GLOBALS['BE_USER']->uc['enableFlashUploader']) {
 
                                $this->doc->JScodeArray['flashUploader'] = '
@@ -251,7 +254,7 @@ class SC_file_list {
                                $this->MOD_SETTINGS['clipBoard'] = FALSE;
                        }
 
-                               // if user never opened the list module, set the value for displayThumbs
+                               // If user never opened the list module, set the value for displayThumbs
                        if (!isset($this->MOD_SETTINGS['displayThumbs'])) {
                                $this->MOD_SETTINGS['displayThumbs'] = $GLOBALS['BE_USER']->uc['thumbnailsByDefault'];
                        }
@@ -263,20 +266,26 @@ class SC_file_list {
                        $this->filelist->clipObj->initializeClipboard();
 
                        $CB = t3lib_div::_GET('CB');
-                       if ($this->cmd=='setCB') $CB['el'] = $this->filelist->clipObj->cleanUpCBC(array_merge(t3lib_div::_POST('CBH'), t3lib_div::_POST('CBC')), '_FILE');
-                       if (!$this->MOD_SETTINGS['clipBoard'])  $CB['setP']='normal';
+                       if ($this->cmd == 'setCB') {
+                               $CB['el'] = $this->filelist->clipObj->cleanUpCBC(array_merge(t3lib_div::_POST('CBH'), t3lib_div::_POST('CBC')), '_FILE');
+                       }
+
+                       if (!$this->MOD_SETTINGS['clipBoard']) {
+                               $CB['setP'] = 'normal';
+                       }
                        $this->filelist->clipObj->setCmd($CB);
                        $this->filelist->clipObj->cleanCurrent();
-                       $this->filelist->clipObj->endClipboard();       // Saves
+                               // Saves
+                       $this->filelist->clipObj->endClipboard();
 
                                // If the "cmd" was to delete files from the list (clipboard thing), do that:
-                       if ($this->cmd=='delete') {
+                       if ($this->cmd == 'delete') {
                                $items = $this->filelist->clipObj->cleanUpCBC(t3lib_div::_POST('CBC'), '_FILE', 1);
                                if (count($items)) {
                                                // Make command array:
-                                       $FILE=array();
+                                       $FILE = array();
                                        foreach ($items as $v) {
-                                               $FILE['delete'][]=array('data'=>$v);
+                                               $FILE['delete'][] = array('data' => $v);
                                        }
 
                                                // Init file processing object for deleting and pass the cmd array.
@@ -332,15 +341,15 @@ class SC_file_list {
                                // Build the <body> for the module
 
                                // Create output
-                       $pageContent='';
-                       $pageContent.= '<form action="'.htmlspecialchars($this->filelist->listURL()).'" method="post" name="dblistForm">';
-                       $pageContent.= $this->filelist->HTMLcode;
-                       $pageContent.= '<input type="hidden" name="cmd" /></form>';
+                       $pageContent = '';
+                       $pageContent .= '<form action="'.htmlspecialchars($this->filelist->listURL()).'" method="post" name="dblistForm">';
+                       $pageContent .= $this->filelist->HTMLcode;
+                       $pageContent .= '<input type="hidden" name="cmd" /></form>';
 
+                               // Making listing options:
+                       if ($this->filelist->HTMLcode) {
 
-                       if ($this->filelist->HTMLcode)  {       // Making listing options:
-
-                               $pageContent.='
+                               $pageContent .= '
 
                                        <!--
                                                Listing options for extended view, clipboard and thumbnails
@@ -388,7 +397,6 @@ class SC_file_list {
                                        </div>
                                ';
 
-
                                        // Set clipboard:
                                if ($this->MOD_SETTINGS['clipBoard']) {
                                        $pageContent.=$this->filelist->clipObj->printClipboard();
@@ -422,14 +430,12 @@ class SC_file_list {
                                $content
                        );
                }
-
-
        }
 
        /**
         * Outputting the accumulated content to screen
         *
-        * @return      void
+        * @return void
         */
        function printContent() {
                echo $this->content;
@@ -438,7 +444,7 @@ class SC_file_list {
        /**
         * Create the panel of buttons for submitting the form or otherwise perform operations.
         *
-        * @return      array   all available buttons as an assoc. array
+        * @return array All available buttons as an assoc. array
         */
        function getButtons() {
                $buttons = array(
@@ -456,7 +462,7 @@ class SC_file_list {
                        // FileList Module CSH:
                $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_module', $GLOBALS['BACK_PATH'], '', TRUE);
 
-                       // upload button (only if upload to this directory is allowed)
+                       // Upload button (only if upload to this directory is allowed)
                if ($this->folderObject && $this->folderObject->getStorage()->checkUserActionPermission('upload', 'File') && $this->folderObject->checkActionPermission('write')) {
                        $buttons['upload'] = '<a href="' . $GLOBALS['BACK_PATH'] . 'file_upload.php?target=' . rawurlencode($this->folderObject->getCombinedIdentifier()) .
                                '&amp;returnUrl=' . rawurlencode($this->filelist->listURL()) . '" id="button-upload" title="' .
@@ -465,7 +471,7 @@ class SC_file_list {
                        '</a>';
                }
 
-                       // new folder button
+                       // New folder button
                if ($this->folderObject && $this->folderObject->checkActionPermission('add')) {
                        $buttons['new'] = '<a href="' . $GLOBALS['BACK_PATH'] . 'file_newfolder.php?target=' . rawurlencode($this->folderObject->getCombinedIdentifier()) .
                                '&amp;returnUrl=' . rawurlencode($this->filelist->listURL()) . '" title="' .
@@ -478,7 +484,7 @@ class SC_file_list {
        }
 }
 
-// Make instance:
+       // Make instance:
 $SOBE = t3lib_div::makeInstance('SC_file_list');
 $SOBE->init();
 $SOBE->main();
index cbe732e..bdc103e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
-if (!defined ('TYPO3_MODE')) {
-       die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
 }
 
 if (TYPO3_MODE === 'BE') {
index c5ea672..315d615 100755 (executable)
@@ -1,11 +1,11 @@
 <?php
 define('TYPO3_MOD_PATH', 'sysext/func/mod1/');
-$BACK_PATH='../../../';
+$BACK_PATH = '../../../';
 
 $MLANG['default']['tabs_images']['tab'] = 'func.gif';
-$MLANG['default']['ll_ref']='LLL:EXT:lang/locallang_mod_web_func.xml';
+$MLANG['default']['ll_ref'] = 'LLL:EXT:lang/locallang_mod_web_func.xml';
 
-$MCONF['script']='index.php';
-$MCONF['access']='user,group';
-$MCONF['name']='web_func';
+$MCONF['script'] = 'index.php';
+$MCONF['access'] ='user,group';
+$MCONF['name'] = 'web_func';
 ?>
\ No newline at end of file
index 304b466..4876c9e 100755 (executable)
  * Revised for TYPO3 3.6 November/2003 by Kasper Skårhøj
  * XHTML compliant
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 
-
 unset($MCONF);
 require('conf.php');
 require($BACK_PATH.'init.php');
@@ -43,13 +42,11 @@ $LANG->includeLLFile('EXT:lang/locallang_mod_web_func.xml');
 
 $BE_USER->modAccess($MCONF, 1);
 
-
-
 /**
  * Script Class for the Web > Functions module
  * This class creates the framework to which other extensions can connect their sub-modules
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage core
  */
@@ -66,18 +63,16 @@ class SC_mod_web_func_index extends t3lib_SCbase {
         */
        var $doc;
 
-
-
        /**
         * Initialize module header etc and call extObjContent function
         *
-        * @return      void
+        * @return void
         */
        function main() {
                global $LANG,$BACK_PATH;
 
-               // Access check...
-               // The page will show only if there is a valid page and if this page may be viewed by the user
+                       // Access check...
+                       // The page will show only if there is a valid page and if this page may be viewed by the user
                $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
                $access = is_array($this->pageinfo) ? 1 : 0;
 
@@ -92,9 +87,7 @@ class SC_mod_web_func_index extends t3lib_SCbase {
                $this->doc->backPath = $BACK_PATH;
                $this->doc->setModuleTemplate('templates/func.html');
 
-               // **************************
-               // Main
-               // **************************
+                       // Main
                if ($this->id && $access) {
                                // JavaScript
                        $this->doc->JScode = $this->doc->wrapScriptTags('
@@ -108,18 +101,16 @@ class SC_mod_web_func_index extends t3lib_SCbase {
                                if (top.fsMod) top.fsMod.recentIds["web"] = '.intval($this->id).';
                        ');
 
-
                                // Setting up the context sensitive menu:
                        $this->doc->getContextMenuCode();
 
-                       $this->doc->form='<form action="index.php" method="post"><input type="hidden" name="id" value="'.$this->id.'" />';
+                       $this->doc->form = '<form action="index.php" method="post"><input type="hidden" name="id" value="'.$this->id.'" />';
 
                        $vContent = $this->doc->getVersionSelector($this->id, 1);
                        if ($vContent) {
-                               $this->content.=$this->doc->section('', $vContent);
+                               $this->content .= $this->doc->section('', $vContent);
                        }
 
-
                        $this->extObjContent();
 
                                // Setting up the buttons and markers for docheader
@@ -154,7 +145,7 @@ class SC_mod_web_func_index extends t3lib_SCbase {
        /**
         * Print module content (from $this->content)
         *
-        * @return      void
+        * @return void
         */
        function printContent() {
                echo $this->content;
@@ -163,7 +154,7 @@ class SC_mod_web_func_index extends t3lib_SCbase {
        /**
         * Create the panel of buttons for submitting the form or otherwise perform operations.
         *
-        * @return      array   all available buttons as an assoc. array
+        * @return array All available buttons as an assoc. array
         */
        protected function getButtons() {
                global $BACK_PATH;
@@ -204,17 +195,23 @@ class SC_mod_web_func_index extends t3lib_SCbase {
        }
 }
 
-// Make instance:
+       // Make instance:
 $SOBE = t3lib_div::makeInstance('SC_mod_web_func_index');
 $SOBE->init();
 
 // Include files?
-foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
-$SOBE->checkExtObj();  // Checking for first level external objects
+foreach ($SOBE->include_once as $INC_FILE) {
+       include_once($INC_FILE);
+}
+       // Checking for first level external objects
+$SOBE->checkExtObj();
 
-// Repeat Include files! - if any files has been added by second-level extensions
-foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
-$SOBE->checkSubExtObj();       // Checking second level external objects
+       // Repeat Include files! - if any files has been added by second-level extensions
+foreach ($SOBE->include_once as $INC_FILE) {
+       include_once($INC_FILE);
+}
+       // Checking second level external objects
+$SOBE->checkSubExtObj();
 
 $SOBE->main();
 $SOBE->printContent();
index 58752c9..9761b00 100755 (executable)
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
+
 /**
  * Contains a class for the Wizard function in the Web>Info module
  *
  * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
  * XHTML compliant
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 
 /**
  * The Wizard function in the Web>Info module
  * Creates a framework for adding wizard sub-sub-modules under the Wizard function in Web>Info
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage tx_funcwizardswebfunc
  */
@@ -48,9 +49,9 @@ class tx_funcwizards_webfunc extends t3lib_extobjbase {
         * Initialize.
         * Calls parent init function and then the handleExternalFunctionValue() function from the parent class
         *
-        * @param       object          A reference to the parent (calling) object (which is probably an instance of an extension class to t3lib_SCbase)
-        * @param       array           The configuration set for this module - from global array TBE_MODULES_EXT
-        * @return      void
+        * @param object $pObj A reference to the parent (calling) object (which is probably an instance of an extension class to t3lib_SCbase)
+        * @param array $conf The configuration set for this module - from global array TBE_MODULES_EXT
+        * @return void
         * @see t3lib_extobjbase::handleExternalFunctionValue(), t3lib_extobjbase::init()
         */
        function init(&$pObj, $conf) {
@@ -64,7 +65,7 @@ class tx_funcwizards_webfunc extends t3lib_extobjbase {
        /**
         * Modifies parent objects internal MOD_MENU array, adding items this module needs.
         *
-        * @return      array           Items merged with the parent objects.
+        * @return array Items merged with the parent objects.
         * @see t3lib_extobjbase::init()
         */
        function modMenu() {
@@ -83,7 +84,7 @@ class tx_funcwizards_webfunc extends t3lib_extobjbase {
        /**
         * Creation of the main content. Calling extObjContent() to trigger content generation from the sub-sub modules
         *
-        * @return      string          The content
+        * @return string The content
         * @see t3lib_extobjbase::extObjContent()
         */
        function main() {
@@ -93,9 +94,9 @@ class tx_funcwizards_webfunc extends t3lib_extobjbase {
                $theOutput.=$this->pObj->doc->section('', '<span class="nobr">'.$menu.'</span>');
 
                $content = '';
-               $content.=$theOutput;
-               $content.=$this->pObj->doc->spacer(20);
-               $content.=$this->extObjContent();
+               $content .= $theOutput;
+               $content .= $this->pObj->doc->spacer(20);
+               $content .= $this->extObjContent();
 
                return $content;
        }
index 5e3540b..18420b2 100755 (executable)
@@ -1,5 +1,7 @@
 <?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
 if (TYPO3_MODE=='BE') {
        t3lib_extMgm::insertModuleFunction(
index 845153f..1530fae 100755 (executable)
@@ -1,7 +1,8 @@
 <?php
 define('TYPO3_MOD_PATH', 'sysext/impexp/app/');
-$BACK_PATH='../../../';
+$BACK_PATH = '../../../';
 
-$MCONF['name']='xMOD_tximpexp';        // xMOD_[modulename][optional: '_something']
+       // xMOD_[modulename][optional: '_something']
+$MCONF['name'] = 'xMOD_tximpexp';
 
 ?>
\ No newline at end of file
index f1b7073..adaed8e 100755 (executable)
  * Revised for TYPO3 3.6 December/2003 by Kasper Skårhøj
  * XHTML compliant
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 
-
-
-
-
-
-
-
-
-
-
-
 /**
  * Adding Import/Export clickmenu item
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage tx_impexp
  */
@@ -56,16 +45,17 @@ class tx_impexp_clickmenu {
        /**
         * Processing of clickmenu items
         *
-        * @param       object          Reference to parent
-        * @param       array           Menu items array to modify
-        * @param       string          Table name
-        * @param       integer         Uid of the record
-        * @return      array           Menu item array, returned after modification
-        * @todo        Skinning for icons...
+        * @param object $backRef Reference to parent
+        * @param array $menuItems Menu items array to modify
+        * @param string $table Table name
+        * @param integer $uid Uid of the record
+        * @return array Menu item array, returned after modification
+        * @todo Skinning for icons...
         */
        function main(&$backRef, $menuItems, $table, $uid) {
-               $localItems=array();
-               if (($backRef->cmLevel && t3lib_div::_GP('subname')=='moreoptions') || ($table==='pages' && $uid==0))   {       // Show import/export on second level menu OR root level.
+               $localItems = array();
+                       // Show import/export on second level menu OR root level.
+               if (($backRef->cmLevel && t3lib_div::_GP('subname') == 'moreoptions') || ($table === 'pages' && $uid == 0)) {
 
                        $LL = $this->includeLL();
 
@@ -102,7 +92,7 @@ class tx_impexp_clickmenu {
        /**
         * Include local lang file and return $LOCAL_LANG array loaded.
         *
-        * @return      array           Local lang array
+        * @return array Local lang array
         */
        function includeLL() {
                global $LANG;
index bb5bd22..38be7ec 100644 (file)
@@ -1,8 +1,5 @@
 <?php
-/*
- * Register necessary class names with autoloader
- *
- */
+       // Register necessary class names with autoloader
 $extensionPath = t3lib_extMgm::extPath('impexp');
 return array(
        'tx_impexp_task' => $extensionPath . 'task/class.tx_impexp_task.php',
index 6c39427..62be27a 100755 (executable)
@@ -1,6 +1,6 @@
 <?php
-if (!defined ('TYPO3_MODE')) {
-       die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
 }
 
 if (TYPO3_MODE == 'BE') {
@@ -18,10 +18,10 @@ if (TYPO3_MODE == 'BE') {
 
        t3lib_extMgm::addLLrefForTCAdescr('xMOD_tx_impexp', 'EXT:impexp/locallang_csh.xml');
 
-       // CSH labels for TYPO3 4.5 and greater.  These labels override the ones set above, while still falling back to the original labels if no translation is available.
+               // CSH labels for TYPO3 4.5 and greater.  These labels override the ones set above, while still falling back to the original labels if no translation is available.
        $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:impexp/locallang_csh.xml'][] = 'EXT:impexp/locallang_csh_45.xml';
 
-               // special context menu actions for the import/export module
+               // Special context menu actions for the import/export module
        $importExportActions = '
                9000 = DIVIDER
 
@@ -42,7 +42,7 @@ if (TYPO3_MODE == 'BE') {
                }
        ';
 
-               // context menu user default configuration
+               // Context menu user default configuration
        $GLOBALS['TYPO3_CONF_VARS']['BE']['defaultUserTSconfig'] .= '
                options.contextMenu.table {
                        virtual_root.items {
index 8871a85..850ee0b 100755 (executable)
 /**
  * Export Preset listing
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 
-
-
 t3lib_extMgm::isLoaded('impexp', 1);
 
 
 /**
  * Export Preset listing for the task center
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage tx_impexp
  */
@@ -47,8 +45,7 @@ class tx_impexp_modfunc1 extends mod_user_task {
        /**
         * Create preset overview for task center overview.
         *
-        * @param       object          Parent object
-        * @return      string          HTML for the task center overview listing.
+        * @return string HTML for the task center overview listing.
         */
        function overview_main() {
                global $LANG;
@@ -56,7 +53,7 @@ class tx_impexp_modfunc1 extends mod_user_task {
                $presets = $this->getPresets();
                $opt = array();
                if (is_array($presets)) {
-                       foreach($presets as $presetCfg) {
+                       foreach ($presets as $presetCfg) {
                                $title = strlen($presetCfg['title']) ? $presetCfg['title'] : '['.$presetCfg['uid'].']';
                                $opt[] = '
                                        <tr class="bgColor4">
@@ -66,7 +63,7 @@ class tx_impexp_modfunc1 extends mod_user_task {
                                                <td>'.($presetCfg['user_uid']===$GLOBALS['BE_USER']->user['uid'] ? '[Own]' : '&nbsp;').'</td>
                                        </tr>';
                        }
-                       if(sizeof($opt)>0) {
+                       if (sizeof($opt) > 0) {
                                $presets = '<table border="0" cellpadding="0" cellspacing="1" class="lrPadding">'.implode('', $opt).'</table>';
                                $presets .= '<a href="index.php?SET[function]=tx_impexp"><em>'.$LANG->getLL('link_allRecs').'</em></a>';
                        } else {
@@ -80,18 +77,16 @@ class tx_impexp_modfunc1 extends mod_user_task {
                return $config;
        }
 
-
-
        /**
         * Main Task center module
         *
-        * @return      string          HTML content.
+        * @return string HTML content.
         */
        function main() {
-                       if($id = t3lib_div::_GP('display')) {
+                       if ($id = t3lib_div::_GP('display')) {
                                return $this->urlInIframe($this->backPath.t3lib_extMgm::extRelPath('impexp').'app/index.php?tx_impexp[action]=export&preset[load]=1&preset[select]='.$id, 1);
                        } else {
-                               // Thumbnail folder and files:
+                                       // Thumbnail folder and files:
                                $tempDir = $this->userTempFolder();
                                if ($tempDir) {
                                        $thumbnails = t3lib_div::getFilesInDir($tempDir, 'png,gif,jpg', 1);
@@ -100,7 +95,7 @@ class tx_impexp_modfunc1 extends mod_user_task {
                                $clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
                                $usernames = t3lib_BEfunc::getUserNames();
 
-                               // Create preset links:
+                                       // Create preset links:
                                $presets = $this->getPresets();
                                $opt = array();
                                $opt[] = '
@@ -114,7 +109,7 @@ class tx_impexp_modfunc1 extends mod_user_task {
                                <td>Meta data:</td>
                        </tr>';
                                if (is_array($presets)) {
-                                       foreach($presets as $presetCfg) {
+                                       foreach ($presets as $presetCfg) {
                                                $configuration = unserialize($presetCfg['preset_data']);
                                                $thumbnailFile = $thumbnails[$configuration['meta']['thumbnail']];
                                                $title = strlen($presetCfg['title']) ? $presetCfg['title'] : '['.$presetCfg['uid'].']';
@@ -140,25 +135,12 @@ class tx_impexp_modfunc1 extends mod_user_task {
                        }
 
                        // Output:
-               $theOutput.= $this->pObj->doc->spacer(5);
-               $theOutput.= $this->pObj->doc->section('Export presets', $content, 0, 1);
+               $theOutput .= $this->pObj->doc->spacer(5);
+               $theOutput .= $this->pObj->doc->section('Export presets', $content, 0, 1);
 
                return $theOutput;
        }
 
-
-
-
-
-
-
-
-
-
-
-
-
-
        /*****************************
         *
         * Helper functions
@@ -168,7 +150,7 @@ class tx_impexp_modfunc1 extends mod_user_task {
        /**
         * Select presets for this user
         *
-        * @return      array           Array of preset records
+        * @return array Array of preset records
         */
        function getPresets() {
                $presets = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
@@ -185,12 +167,12 @@ class tx_impexp_modfunc1 extends mod_user_task {
        /**
         * Returns first temporary folder of the user account (from $FILEMOUNTS)
         *
-        * @return      string          Absolute path to first "_temp_" folder of the current user, otherwise blank.
+        * @return string Absolute path to first "_temp_" folder of the current user, otherwise blank.
         */
        function userTempFolder() {
                global $FILEMOUNTS;
 
-               foreach($FILEMOUNTS as $filePathInfo) {
+               foreach ($FILEMOUNTS as $filePathInfo) {
                        $tempFolder = $filePathInfo['path'].'_temp_/';
                        if (@is_dir($tempFolder)) {
                                return $tempFolder;
index d25cc82..4200f06 100644 (file)
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
 
-
 /**
  * This class provides a textarea to save personal notes
  *
- * @author             Kasper Skårhøj <kasper@typo3.com>
- * @author             Georg Ringer <typo3@ringerge.org>
- * @package            TYPO3
+ * @author Kasper Skårhøj <kasper@typo3.com>
+ * @author Georg Ringer <typo3@ringerge.org>
+ * @package TYPO3
  * @subpackage impexp
  *
  */
@@ -37,7 +36,7 @@ class tx_impexp_task implements tx_taskcenter_Task {
        /**
         * Back-reference to the calling reports module
         *
-        * @var tx_reports_Module       $taskObject
+        * @var tx_reports_Module $taskObject
         */
        protected $taskObject;
 
@@ -52,7 +51,7 @@ class tx_impexp_task implements tx_taskcenter_Task {
        /**
         * This method renders the report
         *
-        * @return      string  The status report as HTML
+        * @return string The status report as HTML
         */
        public function getTask() {
                return $this->main();
@@ -62,7 +61,7 @@ class tx_impexp_task implements tx_taskcenter_Task {
         * Render an optional additional information for the 1st view in taskcenter.
         * Empty for this task
         *
-        * @return      string          Overview as HTML
+        * @return string Overview as HTML
         */
        public function getOverview() {
                return '';
@@ -71,18 +70,18 @@ class tx_impexp_task implements tx_taskcenter_Task {
        /**
         * Main Task center module
         *
-        * @return      string          HTML content.
+        * @return string HTML content.
         */
        public function main() {
                $content = '';
                $id = intval(t3lib_div::_GP('display'));
 
-                       // if a preset is found, it is rendered using an iframe
-               if($id > 0) {
+                       // If a preset is found, it is rendered using an iframe
+               if ($id > 0) {
                        $url = $GLOBALS['BACK_PATH'] . t3lib_extMgm::extRelPath('impexp') . 'app/index.php?tx_impexp[action]=export&preset[load]=1&preset[select]=' . $id;
                        return $this->taskObject->urlInIframe($url, 1);
                } else {
-                               // header
+                               // Header
                        $content .= $this->taskObject->description(
                                $GLOBALS['LANG']->getLL('.alttitle'),
                                $GLOBALS['LANG']->getLL('.description')
@@ -102,7 +101,7 @@ class tx_impexp_task implements tx_taskcenter_Task {
                                // Create preset links:
                        $presets = $this->getPresets();
 
-                               // if any presets found
+                               // If any presets found
                        if (is_array($presets)) {
                                foreach($presets as $key => $presetCfg) {
                                        $configuration = unserialize($presetCfg['preset_data']);
@@ -112,15 +111,15 @@ class tx_impexp_task implements tx_taskcenter_Task {
 
                                        $description = array();
 
-                                               // is public?
+                                               // Is public?
                                        if ($presetCfg['public']) {
                                                $description[] = $GLOBALS['LANG']->getLL('task.public') . ': ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes');
                                        }
 
-                                               // owner
+                                               // Owner
                                        $description[] = $GLOBALS['LANG']->getLL('task.owner') . ': ' . (($presetCfg['user_uid'] === $GLOBALS['BE_USER']->user['uid']) ? $GLOBALS['LANG']->getLL('task.own') : '[' . htmlspecialchars($usernames[$presetCfg['user_uid']]['username']) . ']');
 
-                                               // page & path
+                                               // Page & path
                                        if ($configuration['pagetree']['id']) {
                                                $description[] = $GLOBALS['LANG']->getLL('task.page') . ': ' . $configuration['pagetree']['id'];
                                                $description[] = $GLOBALS['LANG']->getLL('task.path') . ': ' . htmlspecialchars(t3lib_BEfunc::getRecordPath($configuration['pagetree']['id'], $clause, 20));
@@ -146,7 +145,7 @@ class tx_impexp_task implements tx_taskcenter_Task {
                                                $description[] = '<br />' . $metaInformation;
                                        }
 
-                                               // collect all preset information
+                                               // Collect all preset information
                                        $lines[$key] = array(
                                                'icon'                          => $icon,
                                                'title'                         => $title,
@@ -156,10 +155,10 @@ class tx_impexp_task implements tx_taskcenter_Task {
 
                                }
 
-                                       // render preset list
+                                       // Render preset list
                                $content .= $this->taskObject->renderListMenu($lines);
                        } else {
-                                       // no presets found
+                                       // No presets found
                                $flashMessage = t3lib_div::makeInstance(
                                        't3lib_FlashMessage',
                                        $GLOBALS['LANG']->getLL('no-presets'),
@@ -173,11 +172,10 @@ class tx_impexp_task implements tx_taskcenter_Task {
                return $content;
        }
 
-
        /**
         * Select presets for this user
         *
-        * @return      array           Array of preset records
+        * @return array Array of preset records
         */
        protected function getPresets() {
                $presets = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
@@ -194,7 +192,7 @@ class tx_impexp_task implements tx_taskcenter_Task {
        /**
         * Returns first temporary folder of the user account (from $FILEMOUNTS)
         *
-        * @return      string          Absolute path to first "_temp_" folder of the current user, otherwise blank.
+        * @return string Absolute path to first "_temp_" folder of the current user, otherwise blank.
         */
        protected function userTempFolder() {
                foreach($GLOBALS['FILEMOUNTS'] as $filePathInfo) {