[TASK] Clean up phpDoc comments in typo3/sysext/
authorWouter Wolters <typo3@wouterwolters.nl>
Sat, 16 Jun 2012 12:08:37 +0000 (14:08 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 20 Jun 2012 21:02:21 +0000 (23:02 +0200)
Clean up phpDoc comments for the following classes:

* typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc
* typo3/sysext/cms/tslib/media/scripts/gmenu_foldout.php
* typo3/sysext/cms/tslib/media/scripts/gmenu_layers.php
* typo3/sysext/cms/tslib/media/scripts/makeMenu_datedirectory.inc
* typo3/sysext/cms/tslib/media/scripts/plaintextLib.inc
* typo3/sysext/cms/tslib/media/scripts/postit.inc
* typo3/sysext/cms/tslib/media/scripts/testscript.inc
* typo3/sysext/cms/tslib/media/scripts/testscript_EXT.php
* typo3/sysext/cms/tslib/media/scripts/testscript_INT.php
* typo3/sysext/cms/tslib/media/scripts/tmenu_layers.php
* typo3/sysext/cms/tslib/media/scripts/wapversionLib.inc
* typo3/sysext/cms/tslib/media/scripts/xmenu_layers.diff
* typo3/sysext/cms/tslib/media/scripts/xmlversionLib.inc

Clean up provides:

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

Change-Id: I86f9e817865a96ea1a0744415c15d0459f6a294a
Resolves: #38113
Releases: 6.0
Reviewed-on: http://review.typo3.org/12127
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
13 files changed:
typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc
typo3/sysext/cms/tslib/media/scripts/gmenu_foldout.php
typo3/sysext/cms/tslib/media/scripts/gmenu_layers.php
typo3/sysext/cms/tslib/media/scripts/makeMenu_datedirectory.inc
typo3/sysext/cms/tslib/media/scripts/plaintextLib.inc
typo3/sysext/cms/tslib/media/scripts/postit.inc
typo3/sysext/cms/tslib/media/scripts/testscript.inc
typo3/sysext/cms/tslib/media/scripts/testscript_EXT.php
typo3/sysext/cms/tslib/media/scripts/testscript_INT.php
typo3/sysext/cms/tslib/media/scripts/tmenu_layers.php
typo3/sysext/cms/tslib/media/scripts/wapversionLib.inc
typo3/sysext/cms/tslib/media/scripts/xmenu_layers.diff [deleted file]
typo3/sysext/cms/tslib/media/scripts/xmlversionLib.inc

index 4a6f8e9..aa409f5 100755 (executable)
@@ -29,8 +29,9 @@
  *
  * Revised for TYPO3 3.6 June/2003 by Kasper Skårhøj
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
+
 /**
  * This library provides a HTML-template file based framework for Front End creating/editing/deleting records authenticated by email or fe_user login.
  * It is used in the extensions "direct_mail_subscription" and "feuser_admin" (and the deprecated(!) static template "plugin.feadmin.dmailsubscription" and "plugin.feadmin.fe_users" which are the old versions of these two extensions)
  * Generally the fe_adminLib appears to be hard to use. Personally I feel turned off by all the template-file work involved and since it is very feature rich (and for that sake pretty stable!) there are lots of things that can go wrong - you feel. Therefore I like the concept used by "t3consultancies"/"t3references" since those extensions uses the library by supplying the HTML-template code automatically.
  * Suggestions for improvement and streamlining is welcome so this powerful class could be used more and effectively.
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage tslib
  */
 class user_feAdmin     {
 
                // External, static:
-       var $recInMarkersHSC = TRUE;            // If TRUE, values from the record put into markers going out into HTML will be passed through htmlspecialchars()!
+               // If TRUE, values from the record put into markers going out into HTML will be passed through htmlspecialchars()!
+       var $recInMarkersHSC = TRUE;
 
        var $dataArr = array();
        var $failureMsg = array();
@@ -59,22 +61,29 @@ class user_feAdmin  {
        var $preview;
        var $backURL;
        var $recUid;
-       var $failure=0;         // is set if data did not have the required fields set.
-       var $error='';
-       var $saved=0;           // is set if data is saved
+               // is set if data did not have the required fields set.
+       var $failure = 0;
+       var $error = '';
+               // is set if data is saved
+       var $saved = 0;
        var $requiredArr;
        var $currentArr = array();
-       var $previewLabel='';
-       var $nc = '';           // '&no_cache=1' if you want that parameter sent.
+       var $previewLabel = '';
+               // '&no_cache=1' if you want that parameter sent.
+       var $nc = '';
        var $additionalUpdateFields='';
        var $emailMarkPrefix = 'EMAIL_TEMPLATE_';
        var $codeLength;
        var $cmdKey;
-       var $fileFunc='';       // Set to a basic_filefunc object
-       var $filesStoredInUploadFolders=array();                // This array will hold the names of files transferred to the uploads/* folder if any. If the records are NOT saved, these files should be deleted!! Currently this is not working!
+               // Set to a basic_filefunc object
+       var $fileFunc = '';
+               // This array will hold the names of files transferred to the uploads/* folder if any.
+               // If the records are NOT saved, these files should be deleted!! Currently this is not working!
+       var $filesStoredInUploadFolders = array();
 
                // Internal vars, dynamic:
-       var $unlinkTempFiles = array();                 // Is loaded with all temporary filenames used for upload which should be deleted before exit...
+               // Is loaded with all temporary filenames used for upload which should be deleted before exit...
+       var $unlinkTempFiles = array();
 
        /**
         * Main function. Called from TypoScript.
@@ -84,9 +93,9 @@ class user_feAdmin    {
         * - saves/emails if such commands are sent
         * - calls functions for display of the screen for editing/creation/deletion etc.
         *
-        * @param       string          Empty string, ignore.
-        * @param       array           TypoScript properties following the USER_INT object which uses this library
-        * @return      string          HTML content
+        * @param string Empty string, ignore.
+        * @param array TypoScript properties following the USER_INT object which uses this library
+        * @return string HTML content
         */
        function init($content, $conf) {
                $this->conf = $conf;
@@ -101,7 +110,8 @@ class user_feAdmin  {
                        // backURL is a given URL to return to when login is performed
                $this->backURL = t3lib_div::_GP('backURL');
                if (strstr($this->backURL, '"') || strstr($this->backURL, "'") || preg_match('/(javascript|vbscript):/i', $this->backURL) || stristr($this->backURL, "fromcharcode") || strstr($this->backURL, "<") || strstr($this->backURL, ">")) {
-                       $this->backURL = '';    // Clear backURL if it seems to contain XSS code - only URLs are allowed
+                               // Clear backURL if it seems to contain XSS code - only URLs are allowed
+                       $this->backURL = '';
                }
                        // Remove host from URL: Make sure that $this->backURL maps to the current site
                $this->backURL = preg_replace('|[A-Za-z]+://[^/]+|', '', $this->backURL);
@@ -109,19 +119,19 @@ class user_feAdmin        {
                $this->recUid = t3lib_div::_GP('rU');
                        // Authentication code:
                $this->authCode = t3lib_div::_GP('aC');
-                       // get table
+                       // Get table
                $this->theTable = $this->conf['table'];
-                       // link configuration
+                       // Link configuration
                $linkConf = is_array($this->conf['formurl.']) ? $this->conf['formurl.'] : array();
                        // pid
                $this->thePid = intval($this->conf['pid']) ? intval($this->conf['pid']) : $GLOBALS['TSFE']->id;
-                       //
+
                $this->codeLength = intval($this->conf['authcodeFields.']['codeLength']) ? intval($this->conf['authcodeFields.']['codeLength']) : 8;
 
                        // Setting the hardcoded lists of fields allowed for editing and creation.
                $this->fieldList=implode(',', t3lib_div::trimExplode(',', $GLOBALS['TCA'][$this->theTable]['feInterface']['fe_admin_fieldList'], 1));
 
-                       // globally substituted markers, fonts and colors.
+                       // Globally substituted markers, fonts and colors.
                $splitMark = md5(microtime());
                list($this->markerArray['###GW1B###'], $this->markerArray['###GW1E###']) = explode($splitMark, $this->cObj->stdWrap($splitMark, $this->conf['wrap1.']));
                list($this->markerArray['###GW2B###'], $this->markerArray['###GW2E###']) = explode($splitMark, $this->cObj->stdWrap($splitMark, $this->conf['wrap2.']));
@@ -129,18 +139,20 @@ class user_feAdmin        {
                $this->markerArray['###GC2###'] = $this->cObj->stdWrap($this->conf['color2'], $this->conf['color2.']);
                $this->markerArray['###GC3###'] = $this->cObj->stdWrap($this->conf['color3'], $this->conf['color3.']);
 
-               if (intval($this->conf['no_cache']) && !isset($linkConf['no_cache']))   {       // needed for backwards compatibility
+                       // needed for backwards compatibility
+               if (intval($this->conf['no_cache']) && !isset($linkConf['no_cache'])) {
                        $linkConf['no_cache'] = 1;
                }
-               if(!$linkConf['parameter']) {
+               if (!$linkConf['parameter']) {
                        $linkConf['parameter'] = $GLOBALS['TSFE']->id;
                }
-               if(!$linkConf['additionalParams'])      {       // needed for backwards compatibility
+                       // needed for backwards compatibility
+               if (!$linkConf['additionalParams']) {
                        $linkConf['additionalParams'] = $this->conf['addParams'];
                }
 
                $formURL = $this->cObj->typoLink_URL($linkConf);
-               if(!strstr($formURL, '?')) {
+               if (!strstr($formURL, '?')) {
                        $formURL .= '?';
                }
 
@@ -180,8 +192,9 @@ class user_feAdmin  {
                );
 
                        // Setting incoming data. Non-stripped
-               $fe=t3lib_div::_GP('FE');
-               $this->dataArr = $fe[$this->theTable];  // Incoming data.
+               $fe = t3lib_div::_GP('FE');
+                       // Incoming data.
+               $this->dataArr = $fe[$this->theTable];
 
                        // Checking template file and table value
                if (!$this->templateCode) {
@@ -191,13 +204,13 @@ class user_feAdmin        {
 
                if (!$this->theTable || !$this->fieldList) {
                        $content = 'Wrong table: '.$this->theTable;
-                       return $content;                // Not listed or editable table!
+                               // Not listed or editable table!
+                       return $content;
                }
 
-               // *****************
-               // If data is submitted, we take care of it here.
-               // *******************
-               if ($this->cmd=='delete' && !$this->preview && !t3lib_div::_GP('doNotSave'))    {       // Delete record if delete command is sent + the preview flag is NOT set.
+                       // If data is submitted, we take care of it here.
+                       // Delete record if delete command is sent + the preview flag is NOT set.
+               if ($this->cmd=='delete' && !$this->preview && !t3lib_div::_GP('doNotSave')) {
                        $this->deleteRecord();
                }
                        // If incoming data is seen...
@@ -210,28 +223,35 @@ class user_feAdmin        {
                                $this->dataArr = $this->userProcess('evalFunc', $this->dataArr);
                        }
 
-                               // if not preview and no failures, then set data...
-                       if (!$this->failure && !$this->preview && !t3lib_div::_GP('doNotSave')) {       // doNotSave is a global var (eg a 'Cancel' submit button) that prevents the data from being processed
+                               // If not preview and no failures, then set data...
+                               // doNotSave is a global var (eg a 'Cancel' submit button) that prevents the data from being processed
+                       if (!$this->failure && !$this->preview && !t3lib_div::_GP('doNotSave')) {
                                $this->save();
                        } else {
-                               if ($this->conf['debug'])               debug($this->failure);
+                               if ($this->conf['debug']) {
+                                       debug($this->failure);
+                               }
                        }
                } else {
-                       $this->defaultValues(); // If no incoming data, this will set the default values.
-                       $this->preview = 0;     // No preview if data is not received
+                               // If no incoming data, this will set the default values.
+                       $this->defaultValues();
+                               // No preview if data is not received
+                       $this->preview = 0;
                }
-               if ($this->failure)     {$this->preview=0;}     // No preview flag if a evaluation failure has occured
-               $this->previewLabel = $this->preview ? '_PREVIEW' : ''; // Setting preview label prefix.
-
+               if ($this->failure) {
+                               // No preview flag if a evaluation failure has occured
+                       $this->preview = 0;
+               }
+                       // Setting preview label prefix.
+               $this->previewLabel = $this->preview ? '_PREVIEW' : '';
 
-                       // *********************
                        // DISPLAY FORMS:
-                       // ***********************
                if ($this->saved) {
                                // Clear page cache
                        $this->clearCacheIfSet();
 
-                               // Displaying the page here that says, the record has been saved. You're able to include the saved values by markers.
+                               // Displaying the page here that says, the record has been saved.
+                               // You're able to include the saved values by markers.
                        switch($this->cmd) {
                                case 'delete':
                                        $key='DELETE';
@@ -249,7 +269,7 @@ class user_feAdmin  {
                        $markerArray = $this->cObj->fillInMarkerArray($this->markerArray, $this->currentArr, '', TRUE, 'FIELD_', $this->recInMarkersHSC);
                        $content = $this->cObj->substituteMarkerArray($templateCode, $markerArray);
 
-                               // email message:
+                               // Email message:
                        $this->compileMail(
                                $key.'_SAVED',
                                array($this->currentArr),
@@ -262,7 +282,8 @@ class user_feAdmin  {
                        $this->setCObjects($templateCode);
                        $content = $this->cObj->substituteMarkerArray($templateCode, $this->markerArray);
                } else {
-                               // Finally, if there has been no attempt to save. That is either preview or just displaying and empty or not correctly filled form:
+                               // Finally, if there has been no attempt to save.
+                               // That is either preview or just displaying and empty or not correctly filled form:
                        if (!$this->cmd) {
                                $this->cmd=$this->conf['defaultCmd'];
                        }
@@ -297,28 +318,6 @@ class user_feAdmin {
                return $content;
        }
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
        /*****************************************
         *
         * Data processing
@@ -331,7 +330,7 @@ class user_feAdmin  {
         * Examples of this could be to force a value to an integer, remove all non-alphanumeric characters, trimming a value, upper/lowercase it, or process it due to special types like files submitted etc.
         * Called from init() if the $this->dataArr is found to be an array
         *
-        * @return      void
+        * @return void
         * @see init()
         */
        function parseValues() {
@@ -339,7 +338,9 @@ class user_feAdmin  {
                        foreach ($this->conf['parseValues.'] as $theField => $theValue) {
                                $listOfCommands = t3lib_div::trimExplode(',', $theValue, 1);
                                foreach ($listOfCommands as $cmd) {
-                                       $cmdParts = preg_split('/\[|\]/', $cmd);        // Point is to enable parameters after each command enclosed in brackets [..]. These will be in position 1 in the array.
+                                               // Point is to enable parameters after each command enclosed in brackets [..].
+                                               // These will be in position 1 in the array.
+                                       $cmdParts = preg_split('/\[|\]/', $cmd);
                                        $theCmd=trim($cmdParts[0]);
                                        switch($theCmd) {
                                                case 'int':
@@ -373,7 +374,11 @@ class user_feAdmin {
                                                case 'files':
                                                        if ($this->cmdKey=='create' && !t3lib_div::_GP('doNotSave')) {
                                                                $this->processFiles($cmdParts, $theField);
-                                                       } else unset($this->dataArr[$theField]);        // Fields with files cannot be edited - only created.
+
+                                                       } else {
+                                                                       // Fields with files cannot be edited - only created.
+                                                               unset($this->dataArr[$theField]);
+                                                       }
                                                break;
                                                case 'setEmptyIfAbsent':
                                                        if (!isset($this->dataArr[$theField])) {
@@ -421,17 +426,17 @@ class user_feAdmin        {
         * Processing of files.
         * NOTICE: for now files can be handled only on creation of records. But a more advanced feature is that PREVIEW of files is handled.
         *
-        * @param       array           Array with cmd-parts (from parseValues()). This will for example contain information about allowed file extensions and max size of uploaded files.
-        * @param       string          The fieldname with the files.
-        * @return      void
+        * @param array $cmdParts Array with cmd-parts (from parseValues()). This will for example contain information about allowed file extensions and max size of uploaded files.
+        * @param string $theField The fieldname with the files.
+        * @return void
         * @access private
         * @see parseValues()
         */
        function processFiles($cmdParts, $theField) {
                        // First, make an array with the filename and file reference, whether the file is just uploaded or a preview
                $filesArr = array();
-
-               if (is_string($this->dataArr[$theField]))       {               // files from preview.
+                       // Files from preview.
+               if (is_string($this->dataArr[$theField])) {
                        $tmpArr = explode(',', $this->dataArr[$theField]);
                        foreach ($tmpArr as $val) {
                                $valParts = explode('|', $val);
@@ -440,7 +445,7 @@ class user_feAdmin  {
                                        'tmp_name'=>PATH_site.'typo3temp/'.$valParts[0]
                                );
                        }
-               } elseif (is_array($_FILES['FE'][$this->theTable][$theField]['name']))  {       // Files from upload
+               } elseif (is_array($_FILES['FE'][$this->theTable][$theField]['name']))        // Files from upload
                        foreach ($_FILES['FE'][$this->theTable][$theField]['name'] as $kk => $vv) {
                                if ($vv) {
                                        $tmpFile = t3lib_div::upload_to_tempfile($_FILES['FE'][$this->theTable][$theField]['tmp_name'][$kk]);
@@ -453,7 +458,7 @@ class user_feAdmin  {
                                        }
                                }
                        }
-               } elseif (is_array($_FILES['FE']['name'][$this->theTable][$theField]))  {       // Files from upload
+               } elseif (is_array($_FILES['FE']['name'][$this->theTable][$theField]))        // Files from upload
                        foreach ($_FILES['FE']['name'][$this->theTable][$theField] as $kk => $vv) {
                                if ($vv) {
                                        $tmpFile = t3lib_div::upload_to_tempfile($_FILES['FE']['tmp_name'][$this->theTable][$theField][$kk]);
@@ -469,8 +474,8 @@ class user_feAdmin  {
                }
 
                        // Then verify the files in that array; check existence, extension and size
-               $this->dataArr[$theField]='';
-               $finalFilesArr=array();
+               $this->dataArr[$theField] = '';
+               $finalFilesArr = array();
                if (count($filesArr)) {
                        $extArray = t3lib_div::trimExplode(';', strtolower($cmdParts[1]), 1);
                        $maxSize = intval($cmdParts[3]);
@@ -489,9 +494,10 @@ class user_feAdmin {
                        }
                }
                        // Copy the files in the resulting array to the proper positions based on preview/non-preview.
-               $fileNameList=array();
+               $fileNameList = array();
                foreach ($finalFilesArr as $infoArr) {
-                       if ($this->isPreview()) {               // If the form is a preview form (and data is therefore not going into the database...) do this.
+                               // If the form is a preview form (and data is therefore not going into the database...) do this.
+                       if ($this->isPreview()) {
                                $this->createFileFuncObj();
                                $fI = pathinfo($infoArr['name']);
                                $tmpFilename = $this->theTable.'_'.t3lib_div::shortmd5(uniqid($infoArr['name'])).'.'.$fI['extension'];
@@ -524,11 +530,11 @@ class user_feAdmin        {
        /**
         * Overriding values in $this->dataArr if configured for that in TypoScript ([edit/create].overrideValues)
         *
-        * @return      void
+        * @return void
         * @see init()
         */
        function overrideValues() {
-               // Addition of overriding values
+                       // Addition of overriding values
                if (is_array($this->conf[$this->cmdKey.'.']['overrideValues.'])) {
                        foreach ($this->conf[$this->cmdKey.'.']['overrideValues.'] as $theField => $theValue) {
                                $this->dataArr[$theField] = $theValue;
@@ -539,7 +545,7 @@ class user_feAdmin  {
        /**
         * Called if there is no input array in $this->dataArr. Then this function sets the default values configured in TypoScript
         *
-        * @return      void
+        * @return void
         * @see init()
         */
        function defaultValues() {
@@ -557,30 +563,32 @@ class user_feAdmin        {
         * It will populate arrays like $this->failure and $this->failureMsg with error messages (which can later be displayed in the template). Mostly it does NOT alter $this->dataArr (such parsing of values was done by parseValues())
         * Works based on configuration in TypoScript key [create/edit].evalValues
         *
-        * @return      void
+        * @return void
         * @see init(), parseValues()
         */
        function evalValues() {
-               // Check required, set failure if not ok.
-               $tempArr=array();
+                       // Check required, set failure if not ok.
+               $tempArr = array();
                foreach ($this->requiredArr as $theField) {
                        if (!trim($this->dataArr[$theField])) {
                                $tempArr[]=$theField;
                        }
                }
 
-               // Evaluate: This evaluates for more advanced things than 'required' does. But it returns the same error code, so you must let the required-message tell, if further evaluation has failed!
-               $recExist=0;
+                       // Evaluate: This evaluates for more advanced things than 'required' does. But it returns the same error code, so you must let the required-message tell, if further evaluation has failed!
+               $recExist = 0;
                if (is_array($this->conf[$this->cmdKey.'.']['evalValues.'])) {
                        switch($this->cmd) {
                                case 'edit':
-                                       if (isset($this->dataArr['pid']))       {                       // This may be tricked if the input has the pid-field set but the edit-field list does NOT allow the pid to be edited. Then the pid may be false.
+                                               // This may be tricked if the input has the pid-field set but the edit-field list does NOT
+                                               // allow the pid to be edited. Then the pid may be false.
+                                       if (isset($this->dataArr['pid'])) {
                                                $recordTestPid = intval($this->dataArr['pid']);
                                        } else {
                                                $tempRecArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $this->dataArr['uid']);
                                                $recordTestPid = intval($tempRecArr['pid']);
                                        }
-                                       $recExist=1;
+                                       $recExist = 1;
                                break;
                                default:
                                        $recordTestPid = $this->thePid ? $this->thePid : t3lib_utility_Math::convertToPositiveInteger($this->dataArr['pid']);
@@ -595,7 +603,8 @@ class user_feAdmin  {
                                        switch($theCmd) {
                                                case 'uniqueGlobal':
                                                        if ($DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable, $theField, $this->dataArr[$theField], '', '', '', '1')) {
-                                                               if (!$recExist || $DBrows[0]['uid']!=$this->dataArr['uid'])     {       // Only issue an error if the record is not existing (if new...) and if the record with the false value selected was not our self.
+                                                                       // Only issue an error if the record is not existing (if new...) and if the record with the false value selected was not our self.
+                                                               if (!$recExist || $DBrows[0]['uid']!=$this->dataArr['uid']) {
                                                                        $tempArr[]=$theField;
                                                                        $this->failureMsg[$theField][] = $this->getFailure($theField, $theCmd, 'The value existed already. Enter a new value.');
                                                                }
@@ -603,7 +612,8 @@ class user_feAdmin  {
                                                break;
                                                case 'uniqueLocal':
                                                        if ($DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable, $theField, $this->dataArr[$theField], 'AND pid IN ('.$recordTestPid.')', '', '', '1')) {
-                                                               if (!$recExist || $DBrows[0]['uid']!=$this->dataArr['uid'])     {       // Only issue an error if the record is not existing (if new...) and if the record with the false value selected was not our self.
+                                                                       // Only issue an error if the record is not existing (if new...) and if the record with the false value selected was not our self.
+                                                               if (!$recExist || $DBrows[0]['uid']!=$this->dataArr['uid']) {
                                                                        $tempArr[]=$theField;
                                                                        $this->failureMsg[$theField][] = $this->getFailure($theField, $theCmd, 'The value existed already. Enter a new value.');
                                                                }
@@ -661,7 +671,8 @@ class user_feAdmin  {
                                                                unset($hash[$theField]);
                                                                $tempArr = array_keys($hash);
                                                                unset($this->failureMsg[$theField]);
-                                                               unset($this->dataArr[$theField]);       // This should prevent the field from entering the database.
+                                                                       // This should prevent the field from entering the database.
+                                                               unset($this->dataArr[$theField]);
                                                        }
                                                break;
                                        }
@@ -670,15 +681,15 @@ class user_feAdmin        {
                        }
                }
                        // $failure will show which fields were not OK
-               $this->failure=implode(',', $tempArr);
+               $this->failure = implode(',', $tempArr);
        }
 
        /**
         * Preforms user processing of input array - triggered right after the function call to evalValues() IF TypoScript property "evalFunc" was set.
         *
-        * @param       string          Key pointing to the property in TypoScript holding the configuration for this processing (here: "evalFunc.*"). Well: at least its safe to say that "parentObj" in this array passed to the function is a reference back to this object.
-        * @param       array           The $this->dataArr passed for processing
-        * @return      array           The processed $passVar ($this->dataArr)
+        * @param string $mConfKey Key pointing to the property in TypoScript holding the configuration for this processing (here: "evalFunc.*"). Well: at least its safe to say that "parentObj" in this array passed to the function is a reference back to this object.
+        * @param array $passVar The $this->dataArr passed for processing
+        * @return array The processed $passVar ($this->dataArr)
         * @see init(), evalValues()
         */
        function userProcess($mConfKey, $passVar) {
@@ -693,10 +704,10 @@ class user_feAdmin        {
        /**
         * User processing of contnet
         *
-        * @param       string          Value of the TypoScript object triggering the processing.
-        * @param       array           Properties of the TypoScript object triggering the processing. The key "parentObj" in this array is passed to the function as a reference back to this object.
-        * @param       mixed           Input variable to process
-        * @return      mixed           Processed input variable, $passVar
+        * @param string $confVal Value of the TypoScript object triggering the processing.
+        * @param array $confArr Properties of the TypoScript object triggering the processing. The key "parentObj" in this array is passed to the function as a reference back to this object.
+        * @param mixed $passVar Input variable to process
+        * @return mixed Processed input variable, $passVar
         * @see userProcess(), save(), modifyDataArrForFormUpdate()
         */
        function userProcess_alt($confVal, $confArr, $passVar) {
@@ -708,27 +719,6 @@ class user_feAdmin {
                return $passVar;
        }
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
        /*****************************************
         *
         * Database manipulation functions
@@ -738,15 +728,17 @@ class user_feAdmin        {
        /**
         * Performs the saving of records, either edited or created.
         *
-        * @return      void
+        * @return void
         * @see init()
         */
        function save() {
                switch($this->cmd) {
                        case 'edit':
                                $theUid = $this->dataArr['uid'];
-                               $origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $theUid);          // Fetches the original record to check permissions
-                               if ($this->conf['edit'] && ($GLOBALS['TSFE']->loginUser || $this->aCAuth($origArr)))    {       // Must be logged in in order to edit  (OR be validated by email)
+                                       // Fetches the original record to check permissions
+                               $origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $theUid);
+                                       // Must be logged in in order to edit  (OR be validated by email)
+                               if ($this->conf['edit'] && ($GLOBALS['TSFE']->loginUser || $this->aCAuth($origArr))) {
                                        $newFieldList = implode(',', array_intersect(explode(',', $this->fieldList), t3lib_div::trimExplode(',', $this->conf['edit.']['fields'], 1)));
                                        if ($this->aCAuth($origArr) || $this->cObj->DBmayFEUserEdit($this->theTable, $origArr, $GLOBALS['TSFE']->fe_user->user, $this->conf['allowedGroups'], $this->conf['fe_userEditSelf'])) {
                                                $this->cObj->DBgetUpdate($this->theTable, $theUid, $this->dataArr, $newFieldList, TRUE);
@@ -764,19 +756,20 @@ class user_feAdmin        {
                                        $this->cObj->DBgetInsert($this->theTable, $this->thePid, $this->dataArr, $newFieldList, TRUE);
                                        $newId = $GLOBALS['TYPO3_DB']->sql_insert_id();
 
-                                       if ($this->theTable=='fe_users' && $this->conf['fe_userOwnSelf'])       {               // enables users, creating logins, to own them self.
-                                               $extraList='';
+                                               // enables users, creating logins, to own them self.
+                                       if ($this->theTable == 'fe_users' && $this->conf['fe_userOwnSelf']) {
+                                               $extraList = '';
                                                $dataArr = array();
                                                if ($GLOBALS['TCA'][$this->theTable]['ctrl']['fe_cruser_id'])           {
-                                                       $field=$GLOBALS['TCA'][$this->theTable]['ctrl']['fe_cruser_id'];
-                                                       $dataArr[$field]=$newId;
-                                                       $extraList.=','.$field;
+                                                       $field = $GLOBALS['TCA'][$this->theTable]['ctrl']['fe_cruser_id'];
+                                                       $dataArr[$field] = $newId;
+                                                       $extraList .= ','.$field;
                                                }
                                                if ($GLOBALS['TCA'][$this->theTable]['ctrl']['fe_crgroup_id']) {
-                                                       $field=$GLOBALS['TCA'][$this->theTable]['ctrl']['fe_crgroup_id'];
-                                                       list($dataArr[$field])=explode(',', $this->dataArr['usergroup']);
-                                                       $dataArr[$field]=intval($dataArr[$field]);
-                                                       $extraList.=','.$field;
+                                                       $field = $GLOBALS['TCA'][$this->theTable]['ctrl']['fe_crgroup_id'];
+                                                       list($dataArr[$field]) = explode(',', $this->dataArr['usergroup']);
+                                                       $dataArr[$field] = intval($dataArr[$field]);
+                                                       $extraList .= ','.$field;
                                                }
                                                if (count($dataArr)) {
                                                        $this->cObj->DBgetUpdate($this->theTable, $newId, $dataArr, $extraList, TRUE);
@@ -785,7 +778,7 @@ class user_feAdmin  {
 
                                        $this->currentArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $newId);
                                        $this->userProcess_alt($this->conf['create.']['userFunc_afterSave'], $this->conf['create.']['userFunc_afterSave.'], array('rec'=>$this->currentArr));
-                                       $this->saved=1;
+                                       $this->saved = 1;
                                }
                        break;
                }
@@ -796,17 +789,21 @@ class user_feAdmin        {
         * If the deleted flag should just be set, then it is done so. Otherwise the record truely is deleted along with any attached files.
         * Called from init() if "cmd" was set to "delete" (and some other conditions)
         *
-        * @return      string          void
+        * @return string void
         * @see init()
         */
        function deleteRecord() {
-               if ($this->conf['delete'])      {       // If deleting is enabled
+                       // If deleting is enabled
+               if ($this->conf['delete']) {
                        $origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $this->recUid);
-                       if ($GLOBALS['TSFE']->loginUser || $this->aCAuth($origArr))     {       // Must be logged in OR be authenticated by the aC code in order to delete
+                               // Must be logged in OR be authenticated by the aC code in order to delete
+                       if ($GLOBALS['TSFE']->loginUser || $this->aCAuth($origArr)) {
                                        // If the recUid selects a record.... (no check here)
                                if (is_array($origArr)) {
-                                       if ($this->aCAuth($origArr) || $this->cObj->DBmayFEUserEdit($this->theTable, $origArr, $GLOBALS['TSFE']->fe_user->user, $this->conf['allowedGroups'], $this->conf['fe_userEditSelf']))  {       // Display the form, if access granted.
-                                               if (!$GLOBALS['TCA'][$this->theTable]['ctrl']['delete'])        {       // If the record is fully deleted... then remove the image (or any file) attached.
+                                               // Display the form, if access granted.
+                                       if ($this->aCAuth($origArr) || $this->cObj->DBmayFEUserEdit($this->theTable, $origArr, $GLOBALS['TSFE']->fe_user->user, $this->conf['allowedGroups'], $this->conf['fe_userEditSelf'])) {
+                                                       // If the record is fully deleted... then remove the image (or any file) attached.
+                                               if (!$GLOBALS['TCA'][$this->theTable]['ctrl']['delete']) {
                                                        $this->deleteFilesFromRecord($this->recUid);
                                                }
                                                $this->cObj->DBgetDelete($this->theTable, $this->recUid, TRUE);
@@ -824,8 +821,8 @@ class user_feAdmin  {
         * Deletes the files attached to a record and updates the record.
         * Table/uid is $this->theTable/$uid
         *
-        * @param       integer         Uid number of the record to delete from $this->theTable
-        * @return      void
+        * @param integer $uid Uid number of the record to delete from $this->theTable
+        * @return void
         * @access private
         * @see deleteRecord()
         */
@@ -835,9 +832,9 @@ class user_feAdmin  {
 
                $GLOBALS['TSFE']->includeTCA();
                t3lib_div::loadTCA($table);
-               $iFields=array();
+               $iFields = array();
                foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $conf) {
-                       if ($conf['config']['type']=='group' && $conf['config']['internal_type']=='file') {
+                       if ($conf['config']['type'] == 'group' && $conf['config']['internal_type']=='file') {
 
                                $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table, 'uid='.intval($uid), array($field => ''));
 
@@ -851,26 +848,6 @@ class user_feAdmin {
                        }
                }
        }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 
        /*****************************************
         *
@@ -881,16 +858,19 @@ class user_feAdmin        {
        /**
         * Creates the preview display of delete actions
         *
-        * @return      string          HTML content
+        * @return string HTML content
         * @see init()
         */
        function displayDeleteScreen() {
-               if ($this->conf['delete'])      {       // If deleting is enabled
+                       // If deleting is enabled
+               if ($this->conf['delete']) {
                        $origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $this->recUid);
-                       if ($GLOBALS['TSFE']->loginUser || $this->aCAuth($origArr))     {       // Must be logged in OR be authenticated by the aC code in order to delete
+                               // Must be logged in OR be authenticated by the aC code in order to delete
+                       if ($GLOBALS['TSFE']->loginUser || $this->aCAuth($origArr)) {
                                        // If the recUid selects a record.... (no check here)
                                if (is_array($origArr)) {
-                                       if ($this->aCAuth($origArr) || $this->cObj->DBmayFEUserEdit($this->theTable, $origArr, $GLOBALS['TSFE']->fe_user->user, $this->conf['allowedGroups'], $this->conf['fe_userEditSelf']))  {       // Display the form, if access granted.
+                                               // Display the form, if access granted.
+                                       if ($this->aCAuth($origArr) || $this->cObj->DBmayFEUserEdit($this->theTable, $origArr, $GLOBALS['TSFE']->fe_user->user, $this->conf['allowedGroups'], $this->conf['fe_userEditSelf'])) {
                                                $this->markerArray['###HIDDENFIELDS###'].= '<input type="hidden" name="rU" value="'.$this->recUid.'" />';
                                                $content = $this->getPlainTemplate('###TEMPLATE_DELETE_PREVIEW###', $origArr);
                                        } else {        // Else display error, that you could not edit that particular record...
@@ -909,7 +889,7 @@ class user_feAdmin  {
        /**
         * Creates the "create" screen for records
         *
-        * @return      string          HTML content
+        * @return string HTML content
         * @see init()
         */
        function displayCreateScreen() {
@@ -928,7 +908,7 @@ class user_feAdmin  {
                        $markerArray = $this->cObj->fillInMarkerArray($this->markerArray, $this->dataArr, '', TRUE, 'FIELD_', $this->recInMarkersHSC);
                        if ($this->conf['create.']['preview'] && !$this->previewLabel)  {$markerArray['###HIDDENFIELDS###'].= '<input type="hidden" name="preview" value="1" />';}
                        $content = $this->cObj->substituteMarkerArray($templateCode, $markerArray);
-                       $content.=$this->cObj->getUpdateJS($this->modifyDataArrForFormUpdate($this->dataArr), $this->theTable.'_form', 'FE['.$this->theTable.']', $this->fieldList.$this->additionalUpdateFields);
+                       $content .= $this->cObj->getUpdateJS($this->modifyDataArrForFormUpdate($this->dataArr), $this->theTable.'_form', 'FE['.$this->theTable.']', $this->fieldList.$this->additionalUpdateFields);
                }
                return $content;
        }
@@ -936,14 +916,15 @@ class user_feAdmin        {
        /**
         * Creates the edit-screen for records
         *
-        * @return      string          HTML content
+        * @return string HTML content
         * @see init()
         */
        function displayEditScreen() {
-               if ($this->conf['edit'])        {       // If editing is enabled
+                       // If editing is enabled
+               if ($this->conf['edit']) {
                        $origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $this->dataArr['uid']?$this->dataArr['uid']:$this->recUid);
-
-                       if ($GLOBALS['TSFE']->loginUser || $this->aCAuth($origArr))     {       // Must be logged in OR be authenticated by the aC code in order to edit
+                               // Must be logged in OR be authenticated by the aC code in order to edit
+                       if ($GLOBALS['TSFE']->loginUser || $this->aCAuth($origArr)) {
                                        // If the recUid selects a record.... (no check here)
                                if (is_array($origArr)) {
                                        if ($this->aCAuth($origArr) || $this->cObj->DBmayFEUserEdit($this->theTable, $origArr, $GLOBALS['TSFE']->fe_user->user, $this->conf['allowedGroups'], $this->conf['fe_userEditSelf']))  {       // Display the form, if access granted.
@@ -956,11 +937,12 @@ class user_feAdmin        {
 
                                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $this->theTable, '1 '.$lockPid.$this->cObj->DBmayFEUserEditSelect($this->theTable, $GLOBALS['TSFE']->fe_user->user, $this->conf['allowedGroups'], $this->conf['fe_userEditSelf']).$GLOBALS['TSFE']->sys_page->deleteClause($this->theTable));
 
-                                       if ($GLOBALS['TYPO3_DB']->sql_num_rows($res))   {       // If there are menu-items ...
+                                               // If there are menu-items ...
+                                       if ($GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
                                                $templateCode = $this->getPlainTemplate('###TEMPLATE_EDITMENU###');
-                                               $out='';
+                                               $out = '';
                                                $itemCode = $this->cObj->getSubpart($templateCode, '###ITEM###');
-                                               while($menuRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+                                               while ($menuRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                                        $markerArray = $this->cObj->fillInMarkerArray(array(), $menuRow, '', TRUE, 'FIELD_', $this->recInMarkersHSC);
                                                        $markerArray = $this->setCObjects($itemCode, $menuRow, $markerArray, 'ITEM_');
                                                        $out.= $this->cObj->substituteMarkerArray($itemCode, $markerArray);
@@ -985,8 +967,8 @@ class user_feAdmin  {
         * Subfunction for displayEditScreen(); Takes a record and creates an edit form based on the template code for it.
         * This function is called if the user is editing a record and permitted to do so. Checked in displayEditScreen()
         *
-        * @param       array           The array with the record to edit
-        * @return      string          HTML content
+        * @param array $origArr The array with the record to edit
+        * @return string HTML content
         * @access private
         * @see displayEditScreen()
         */
@@ -1007,9 +989,11 @@ class user_feAdmin        {
                $markerArray = $this->cObj->fillInMarkerArray($this->markerArray, $currentArr, '', TRUE, 'FIELD_', $this->recInMarkersHSC);
 
                $markerArray['###HIDDENFIELDS###'].= '<input type="hidden" name="FE['.$this->theTable.'][uid]" value="'.$currentArr['uid'].'" />';
-               if ($this->conf['edit.']['preview'] && !$this->previewLabel)    {$markerArray['###HIDDENFIELDS###'].= '<input type="hidden" name="preview" value="1" />';}
+               if ($this->conf['edit.']['preview'] && !$this->previewLabel) {
+                       $markerArray['###HIDDENFIELDS###'].= '<input type="hidden" name="preview" value="1" />';
+               }
                $content = $this->cObj->substituteMarkerArray($templateCode, $markerArray);
-               $content.=$this->cObj->getUpdateJS($this->modifyDataArrForFormUpdate($currentArr), $this->theTable.'_form', 'FE['.$this->theTable.']', $this->fieldList.$this->additionalUpdateFields);
+               $content .= $this->cObj->getUpdateJS($this->modifyDataArrForFormUpdate($currentArr), $this->theTable.'_form', 'FE['.$this->theTable.']', $this->fieldList.$this->additionalUpdateFields);
 
                return $content;
        }
@@ -1018,7 +1002,7 @@ class user_feAdmin        {
         * Processes socalled "setfixed" commands. These are commands setting a certain field in a certain record to a certain value. Like a link you can click in an email which will unhide a record to enable something. Or likewise a link which can delete a record by a single click.
         * The idea is that only some allowed actions like this is allowed depending on the configured TypoScript.
         *
-        * @return      string          HTML content displaying the status of the action
+        * @return string HTML content displaying the status of the action
         */
        function procesSetFixed() {
                if ($this->conf['setfixed']) {
@@ -1028,7 +1012,7 @@ class user_feAdmin        {
                        $sFK = t3lib_div::_GP('sFK');
 
                        $fieldArr=array();
-                       if (is_array($fD) || $sFK=='DELETE') {
+                       if (is_array($fD) || $sFK == 'DELETE') {
                                if (is_array($fD)) {
                                        foreach ($fD as $field => $value) {
                                                $origArr[$field]=$value;
@@ -1037,7 +1021,7 @@ class user_feAdmin        {
                                }
                                $theCode = $this->setfixedHash($origArr, $origArr['_FIELDLIST']);
                                if (!strcmp($this->authCode, $theCode)) {
-                                       if ($sFK=='DELETE') {
+                                       if ($sFK == 'DELETE') {
                                                $this->cObj->DBgetDelete($this->theTable, $theUid, TRUE);
                                        } else {
                                                $newFieldList = implode(',', array_intersect(t3lib_div::trimExplode(',', $this->fieldList), t3lib_div::trimExplode(',', implode($fieldArr, ','), 1)));
@@ -1066,36 +1050,12 @@ class user_feAdmin      {
                return $content;
        }
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
        /*****************************************
         *
         * Template processing functions
         *
         *****************************************/
 
-
-
        /**
         * Remove required parts from template code string
         *       Works like this:
@@ -1104,9 +1064,9 @@ class user_feAdmin        {
         *
         *              Only fields that are found in $this->requiredArr is processed.
         *
-        * @param       string          The template HTML code
-        * @param       string          Comma list of fields which has errors (and therefore should not be removed)
-        * @return      string          The processed template HTML code
+        * @param string $templateCode The template HTML code
+        * @param string $failure Comma list of fields which has errors (and therefore should not be removed)
+        * @return string The processed template HTML code
         */
        function removeRequired($templateCode, $failure) {
                foreach ($this->requiredArr as $theField) {
@@ -1120,16 +1080,18 @@ class user_feAdmin      {
        /**
         * Returns template subpart HTML code for the key given
         *
-        * @param       string          Subpart marker to return subpart for.
-        * @param       array           Optional data record array. If set, then all fields herein will also be substituted if found as markers in the template
-        * @return      string          The subpart with all markers found in current $this->markerArray substituted.
+        * @param string $key Subpart marker to return subpart for.
+        * @param array $r Optional data record array. If set, then all fields herein will also be substituted if found as markers in the template
+        * @return string The subpart with all markers found in current $this->markerArray substituted.
         * @see tslib_cObj::fillInMarkerArray()
         */
-       function getPlainTemplate($key, $r='') {
-               if ($this->conf['debug'])       debug('getPlainTemplate(): '.$key, 1);
+       function getPlainTemplate($key, $r = '') {
+               if ($this->conf['debug']) {
+                       debug('getPlainTemplate(): ' . $key, 1);
+               }
                $templateCode = $this->cObj->getSubpart($this->templateCode, $key);
                $this->setCObjects($templateCode, is_array($r) ? $r : array());
-               return  $this->cObj->substituteMarkerArray(
+               return $this->cObj->substituteMarkerArray(
                                $templateCode,
                                is_array($r) ? $this->cObj->fillInMarkerArray($this->markerArray, $r, '', TRUE, 'FIELD_', $this->recInMarkersHSC) : $this->markerArray
                        );
@@ -1138,8 +1100,8 @@ class user_feAdmin        {
        /**
         * Modifies input array for passing on to tslib_cObj::getUpdateJS() which produces some JavaScript for form evaluation or the like.
         *
-        * @param       array           The data array
-        * @return      array           The processed input array
+        * @param array $inputArr The data array
+        * @return array The processed input array
         * @see displayCreateScreen(), displayEditForm(), tslib_cObj::getUpdateJS()
         */
        function modifyDataArrForFormUpdate($inputArr) {
@@ -1147,7 +1109,8 @@ class user_feAdmin        {
                        foreach ($this->conf[$this->cmdKey.'.']['evalValues.'] as $theField => $theValue) {
                                $listOfCommands = t3lib_div::trimExplode(',', $theValue, 1);
                                foreach ($listOfCommands as $cmd) {
-                                       $cmdParts = preg_split('/\[|\]/', $cmd);        // Point is to enable parameters after each command enclosed in brackets [..]. These will be in position 1 in the array.
+                                               // Point is to enable parameters after each command enclosed in brackets [..]. These will be in position 1 in the array.
+                                       $cmdParts = preg_split('/\[|\]/', $cmd);
                                        $theCmd = trim($cmdParts[0]);
                                        switch($theCmd) {
                                                case 'twice':
@@ -1155,7 +1118,7 @@ class user_feAdmin        {
                                                                if (!isset($inputArr[$theField.'_again'])) {
                                                                        $inputArr[$theField.'_again'] = $inputArr[$theField];
                                                                }
-                                                               $this->additionalUpdateFields.=','.$theField.'_again';
+                                                               $this->additionalUpdateFields .= ','.$theField.'_again';
                                                        }
                                                break;
                                        }
@@ -1166,7 +1129,8 @@ class user_feAdmin        {
                        foreach ($this->conf['parseValues.'] as $theField => $theValue) {
                                $listOfCommands = t3lib_div::trimExplode(',', $theValue, 1);
                                foreach ($listOfCommands as $cmd) {
-                                       $cmdParts = preg_split('/\[|\]/', $cmd);        // Point is to enable parameters after each command enclosed in brackets [..]. These will be in position 1 in the array.
+                                               // Point is to enable parameters after each command enclosed in brackets [..]. These will be in position 1 in the array.
+                                       $cmdParts = preg_split('/\[|\]/', $cmd);
                                        $theCmd = trim($cmdParts[0]);
                                        switch($theCmd) {
                                                case 'multiple':
@@ -1190,7 +1154,6 @@ class user_feAdmin        {
                        }
                }
 
-
                $inputArr = $this->userProcess_alt(
                        $this->conf['userFunc_updateArray'],
                        $this->conf['userFunc_updateArray.'],
@@ -1203,13 +1166,13 @@ class user_feAdmin      {
        /**
         * Will render TypoScript cObjects (configured in $this->conf['cObjects.']) and add their content to keys in a markerArray, either the array passed to the function or the internal one ($this->markerArray) if the input $markerArray is not set.
         *
-        * @param       string          The current template code string. Is used to check if the marker string is found and if not, the content object is not rendered!
-        * @param       array           An alternative data record array (if empty then $this->dataArr is used)
-        * @param       mixed           An alternative markerArray to fill in (instead of $this->markerArray). If you want to set the cobjects in the internal $this->markerArray, then just set this to non-array value.
-        * @param       string          Optional prefix to set for the marker strings.
-        * @return      array           The processed $markerArray (if given).
+        * @param string $templateCode The current template code string. Is used to check if the marker string is found and if not, the content object is not rendered!
+        * @param array $currentArr An alternative data record array (if empty then $this->dataArr is used)
+        * @param mixed $markerArray An alternative markerArray to fill in (instead of $this->markerArray). If you want to set the cobjects in the internal $this->markerArray, then just set this to non-array value.
+        * @param string $specialPrefix Optional prefix to set for the marker strings.
+        * @return array The processed $markerArray (if given).
         */
-       function setCObjects($templateCode, $currentArr=array(), $markerArray='', $specialPrefix='') {
+       function setCObjects($templateCode, $currentArr = array(), $markerArray = '', $specialPrefix = '') {
                if (is_array($this->conf['cObjects.'])) {
 
                        foreach ($this->conf['cObjects.'] as $theKey => $theConf) {
@@ -1240,24 +1203,6 @@ class user_feAdmin       {
                return $markerArray;
        }
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
        /*****************************************
         *
         * Emailing
@@ -1267,7 +1212,7 @@ class user_feAdmin        {
        /**
         * Sends info mail to user
         *
-        * @return      string          HTML content message
+        * @return string HTML content message
         * @see init(), compileMail(), sendMail()
         */
        function sendInfoMail() {
@@ -1275,13 +1220,13 @@ class user_feAdmin      {
                        $fetch = t3lib_div::_GP('fetch');
                        if ($fetch) {
                                        // Getting infomail config.
-                               $key= trim(t3lib_div::_GP('key'));
-                               if (is_array($this->conf['infomail.'][$key.'.']))               {
+                               $key = trim(t3lib_div::_GP('key'));
+                               if (is_array($this->conf['infomail.'][$key.'.'])) {
                                        $config = $this->conf['infomail.'][$key.'.'];
                                } else {
                                        $config = $this->conf['infomail.']['default.'];
                                }
-                               $pidLock='';
+                               $pidLock = '';
                                if (!$config['dontLockPid']) {
                                        $pidLock='AND pid IN ('.$this->thePid.') ';
                                }
@@ -1312,15 +1257,15 @@ class user_feAdmin      {
        /**
         * Compiles and sends a mail based on input values + template parts. Looks for a normal and an "-admin" template and may send both kinds of emails. See documentation in TSref.
         *
-        * @param       string          A key which together with $this->emailMarkPrefix will identify the part from the template code to use for the email.
-        * @param       array           An array of records which fields are substituted in the templates
-        * @param       mixed           Mail recipient. If string then its supposed to be an email address. If integer then its a uid of a fe_users record which is looked up and the email address from here is used for sending the mail.
-        * @param       array           Additional fields to set in the markerArray used in the substitution process
-        * @return      void
+        * @param string $key A key which together with $this->emailMarkPrefix will identify the part from the template code to use for the email.
+        * @param array $DBrows An array of records which fields are substituted in the templates
+        * @param mixed $recipient Mail recipient. If string then its supposed to be an email address. If integer then its a uid of a fe_users record which is looked up and the email address from here is used for sending the mail.
+        * @param array $setFixedConfig Additional fields to set in the markerArray used in the substitution process
+        * @return void
         */
-       function compileMail($key, $DBrows, $recipient, $setFixedConfig=array()) {
+       function compileMail($key, $DBrows, $recipient, $setFixedConfig = array()) {
                $GLOBALS['TT']->push('compileMail');
-               $mailContent='';
+               $mailContent = '';
                $key = $this->emailMarkPrefix.$key;
 
                $userContent['all'] = trim($this->cObj->getSubpart($this->templateCode, '###'.$key.'###'));
@@ -1356,15 +1301,15 @@ class user_feAdmin      {
         * Actually sends the requested mails (through $this->cObj->sendNotifyEmail or through $this->sendHTMLMail).
         * As of TYPO3 v4.3 with autoloader, a check for $GLOBALS['TSFE']->config['config']['incT3Lib_htmlmail'] has been included for backwards compatibility.
         *
-        * @param       string          Recipient email address (or list)
-        * @param       string          Possible "admin" email address. Will enable sending of admin emails if also $adminContent is provided
-        * @param       string          Content for the regular email to user
-        * @param       string          Content for the admin email to administrator
-        * @return      void
+        * @param string $recipient Recipient email address (or list)
+        * @param string $recipient Possible "admin" email address. Will enable sending of admin emails if also $adminContent is provided
+        * @param string $content Content for the regular email to user
+        * @param string $adminContent Content for the admin email to administrator
+        * @return void
         * @access private
         * @see compileMail(), sendInfoMail()
         */
-       function sendMail($recipient, $admin, $content='', $adminContent='') {
+       function sendMail($recipient, $admin, $content = '', $adminContent = '') {
                        // Admin mail:
                if ($admin && $adminContent) {
                        if (!$this->isHTMLContent($adminContent) || !$GLOBALS['TSFE']->config['config']['incT3Lib_htmlmail']) {
@@ -1408,26 +1353,28 @@ class user_feAdmin      {
        /**
         * Detects if content is HTML (looking for <html> tag as first and last in string)
         *
-        * @param       string          Content string to test
-        * @return      boolean         Returns TRUE if the content begins and ends with <html></html>-tags
+        * @param string $c Content string to test
+        * @return boolean Returns TRUE if the content begins and ends with <html></html>-tags
         */
        function isHTMLContent($c) {
                $c = trim($c);
                $first = strtolower(substr($c, 0, 6));
                $last = strtolower(substr($c, -7));
-               if ($first.$last=='<html></html>')      return 1;
+               if ($first . $last == '<html></html>') {
+                       return 1;
+               }
        }
 
        /**
         * Sending HTML email, using same parameters as tslib_cObj::sendNotifyEmail()
         *
-        * @param       string          The message content. If blank, no email is sent.
-        * @param       string          Comma list of recipient email addresses
-        * @param       string          IGNORE this parameter
-        * @param       string          "From" email address
-        * @param       string          Optional "From" name
-        * @param       string          Optional "Reply-To" header email address.
-        * @return      void
+        * @param string $content The message content. If blank, no email is sent.
+        * @param string $recipient Comma list of recipient email addresses
+        * @param string $dummy IGNORE this parameter
+        * @param string $fromEmail "From" email address
+        * @param string $fromName Optional "From" name
+        * @param string $replyTo Optional "Reply-To" header email address.
+        * @return void
         * @access private
         * @see sendMail(), tslib_cObj::sendNotifyEmail()
         */
@@ -1449,12 +1396,14 @@ class user_feAdmin      {
                        $Typo3_htmlmail->priority = 3;
 
                                // HTML
-                       $Typo3_htmlmail->theParts['html']['content'] = $content;        // Fetches the content of the page
+                               // Fetches the content of the page
+                       $Typo3_htmlmail->theParts['html']['content'] = $content;
                        $Typo3_htmlmail->theParts['html']['path'] = '';
                        $Typo3_htmlmail->extractMediaLinks();
                        $Typo3_htmlmail->extractHyperLinks();
                        $Typo3_htmlmail->fetchHTMLMedia();
-                       $Typo3_htmlmail->substMediaNamesInHTML(0);      // 0 = relative
+                               // 0 = relative
+                       $Typo3_htmlmail->substMediaNamesInHTML(0);
                        $Typo3_htmlmail->substHREFsInHTML();
                        $Typo3_htmlmail->setHTML($Typo3_htmlmail->encodeMsg($Typo3_htmlmail->theParts['html']['content']));
 
@@ -1470,43 +1419,19 @@ class user_feAdmin      {
                }
        }
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
        /*****************************************
         *
         * Various helper functions
         *
         *****************************************/
 
-
        /**
         * Returns TRUE if authentication is OK based on the "aC" code which is a GET parameter set from outside with a hash string which must match some internal hash string.
         * This allows to authenticate editing without having a fe_users login
         * Uses $this->authCode which is set in init() by "t3lib_div::_GP('aC');"
         *
-        * @param       array           The data array for which to evaluate authentication
-        * @return      boolean         TRUE if authenticated OK
+        * @param array $r The data array for which to evaluate authentication
+        * @return boolean TRUE if authenticated OK
         * @see authCode(), init()
         */
        function aCAuth($r) {
@@ -1518,24 +1443,24 @@ class user_feAdmin      {
        /**
         * Creating authentication hash string based on input record and the fields listed in TypoScript property "authcodeFields"
         *
-        * @param       array           The data record
-        * @param       string          Additional string to include in the hash
-        * @return      string          Hash string of $this->codeLength (if TypoScript "authcodeFields" was set)
+        * @param array $r The data record
+        * @param string $extra Additional string to include in the hash
+        * @return string Hash string of $this->codeLength (if TypoScript "authcodeFields" was set)
         * @see aCAuth()
         */
        function authCode($r, $extra = '') {
-               $l=$this->codeLength;
+               $l = $this->codeLength;
                if ($this->conf['authcodeFields']) {
                        $fieldArr = t3lib_div::trimExplode(',', $this->conf['authcodeFields'], 1);
-                       $value='';
+                       $value = '';
                        foreach ($fieldArr as $field) {
-                               $value.=$r[$field].'|';
+                               $value .= $r[$field].'|';
                        }
-                       $value.=$extra.'|'.$this->conf['authcodeFields.']['addKey'];
+                       $value .= $extra.'|'.$this->conf['authcodeFields.']['addKey'];
                        if ($this->conf['authcodeFields.']['addDate']) {
-                               $value.='|'.date($this->conf['authcodeFields.']['addDate']);
+                               $value .= '|'.date($this->conf['authcodeFields.']['addDate']);
                        }
-                       $value.=$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'];
+                       $value .= $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'];
                        return substr(md5($value), 0, $l);
                }
        }
@@ -1543,10 +1468,10 @@ class user_feAdmin      {
        /**
         * Adding keys to the marker array with "setfixed" GET parameters
         *
-        * @param       array           Marker-array to modify/add a key to.
-        * @param       array           TypoScript properties configuring "setfixed" for the plugin. Basically this is $this->conf['setfixed.'] passed along.
-        * @param       array           The data record
-        * @return      array           Processed $markerArray
+        * @param array $markerArray Marker-array to modify/add a key to.
+        * @param array $setfixed TypoScript properties configuring "setfixed" for the plugin. Basically this is $this->conf['setfixed.'] passed along.
+        * @param array $r The data record
+        * @return array Processed $markerArray
         * @see compileMail()
         */
        function setfixed($markerArray, $setfixed, $r) {
@@ -1554,20 +1479,20 @@ class user_feAdmin      {
                        foreach ($setfixed as $theKey => $data) {
                                if (!strcmp($theKey, 'DELETE')) {
                                        $recCopy = $r;
-                                       $string='&cmd=setfixed&sFK='.rawurlencode($theKey).'&rU='.$r['uid'];
-                                       $string.='&aC='.$this->setfixedHash($recCopy, $data['_FIELDLIST']);
+                                       $string = '&cmd=setfixed&sFK='.rawurlencode($theKey).'&rU='.$r['uid'];
+                                       $string .= '&aC='.$this->setfixedHash($recCopy, $data['_FIELDLIST']);
                                        $markerArray['###SYS_SETFIXED_DELETE###'] = $string;
                                        $markerArray['###SYS_SETFIXED_HSC_DELETE###'] = htmlspecialchars($string);
                                } elseif (strstr($theKey, '.')) {
                                        $theKey = substr($theKey, 0, -1);
                                        if (is_array($data)) {
                                                $recCopy = $r;
-                                               $string='&cmd=setfixed&sFK='.rawurlencode($theKey).'&rU='.$r['uid'];
+                                               $string = '&cmd=setfixed&sFK='.rawurlencode($theKey).'&rU='.$r['uid'];
                                                foreach ($data as $fieldName => $fieldValue) {
-                                                       $string.='&fD%5B'.$fieldName.'%5D='.rawurlencode($fieldValue);
+                                                       $string .= '&fD%5B'.$fieldName.'%5D='.rawurlencode($fieldValue);
                                                        $recCopy[$fieldName]=$fieldValue;
                                                }
-                                               $string.='&aC='.$this->setfixedHash($recCopy, $data['_FIELDLIST']);
+                                               $string .= '&aC='.$this->setfixedHash($recCopy, $data['_FIELDLIST']);
                                                $markerArray['###SYS_SETFIXED_'.$theKey.'###'] = $string;
                                                $markerArray['###SYS_SETFIXED_HSC_'.$theKey.'###'] = htmlspecialchars($string);
                                        }
@@ -1580,30 +1505,29 @@ class user_feAdmin      {
        /**
         * Creating hash string for setFixed. Much similar to authCode()
         *
-        * @param       array           The data record
-        * @param       string          List of fields to use
-        * @return      string          Hash string of $this->codeLength (if TypoScript "authcodeFields" was set)
+        * @param array $recCopy The data record
+        * @param string $fields List of fields to use
+        * @return string Hash string of $this->codeLength (if TypoScript "authcodeFields" was set)
         * @see setfixed(), authCode()
         */
-       function setfixedHash($recCopy, $fields='') {
+       function setfixedHash($recCopy, $fields = '') {
                if ($fields) {
                        $fieldArr = t3lib_div::trimExplode(',', $fields, 1);
                        foreach ($fieldArr as $k => $v) {
                                $recCopy_temp[$k]=$recCopy[$v];
                        }
                } else {
-                       $recCopy_temp=$recCopy;
+                       $recCopy_temp = $recCopy;
                }
                $encStr = implode('|', $recCopy_temp) . '|' . $this->conf['authcodeFields.']['addKey'] . '|' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'];
                $hash = substr(md5($encStr), 0, $this->codeLength);
                return $hash;
        }
 
-
        /**
         * Returns TRUE if preview display is on.
         *
-        * @return      boolean
+        * @return boolean
         */
        function isPreview() {
                return ($this->conf[$this->cmdKey.'.']['preview'] && $this->preview);
@@ -1612,7 +1536,7 @@ class user_feAdmin        {
        /**
         * Creates an instance of class "t3lib_basicFileFunctions" in $this->fileFunc (if not already done)
         *
-        * @return      void
+        * @return void
         */
        function createFileFuncObj() {
                if (!$this->fileFunc) {
@@ -1623,7 +1547,7 @@ class user_feAdmin        {
        /**
         * If TypoScript property clearCacheOfPages is set then all page ids in this value will have their cache cleared
         *
-        * @return      void
+        * @return void
         */
        function clearCacheIfSet() {
                if ($this->conf['clearCacheOfPages']) {
@@ -1635,10 +1559,10 @@ class user_feAdmin      {
        /**
         * Returns an error message for the field/command combination inputted. The error message is looked up in the TypoScript properties (evalErrors.[fieldname].[command]) and if empty then the $label value is returned
         *
-        * @param       string          Field name
-        * @param       string          Command identifier string
-        * @param       string          Alternative label, shown if no other error string was found
-        * @return      string          The error message string
+        * @param string $theField Field name
+        * @param string $theCmd Command identifier string
+        * @param string $label Alternative label, shown if no other error string was found
+        * @return string The error message string
         */
        function getFailure($theField, $theCmd, $label) {
                return isset($this->conf['evalErrors.'][$theField.'.'][$theCmd]) ? $this->conf['evalErrors.'][$theField.'.'][$theCmd] : $label;
@@ -1647,8 +1571,8 @@ class user_feAdmin        {
        /**
         * Will escape HTML-tags
         *
-        * @param       mixed           The unescaped data
-        * @return      mixed           The processed input data
+        * @param mixed $var The unescaped data
+        * @return mixed The processed input data
         */
        function escapeHTML($var) {
                if (is_array($var)) {
@@ -1666,4 +1590,4 @@ class user_feAdmin        {
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['media/scripts/fe_adminLib.inc'])) {
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['media/scripts/fe_adminLib.inc']);
 }
-?>
+?>
\ No newline at end of file
index 273e087..644c505 100755 (executable)
  * Revised for TYPO3 3.6 June/2003 by Kasper Skårhøj
  * XHTML compliant
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 
 /**
  * Class extension tslib_gmenu for the creation of DHTML foldout menus
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage tslib
  */
 class tslib_gmenu_foldout extends tslib_gmenu {
-       var $GMENU_fixKey='foldout';
+       var $GMENU_fixKey = 'foldout';
 
        var $WMarrowNO;
        var $WMarrowACT;
@@ -69,23 +49,23 @@ class tslib_gmenu_foldout extends tslib_gmenu {
        var $WMimageHTML;
        var $WMsubmenu;
        var $WMtableWrap;
-       var $WM_activeOnLoad='';
+       var $WM_activeOnLoad = '';
 
        /**
         * Initializing, setting internal variables (prefixed WM)
         *
-        * @return      void
+        * @return void
         */
        function extProc_init() {
-               $this->WMarrowNO='';
-               $this->WMarrowACT='';
-               $this->WMimagesFlag=0;
-               $this->WMimageHTML ='';
+               $this->WMarrowNO = '';
+               $this->WMarrowACT = '';
+               $this->WMimagesFlag = 0;
+               $this->WMimageHTML = '';
                if (($this->mconf['arrowNO'] || $this->mconf['arrowNO.']) && ($this->mconf['arrowACT'] || $this->mconf['arrowACT.'])) {
                        $this->WMarrowNO = $GLOBALS['TSFE']->cObj->getImgResource($this->mconf['arrowNO'], $this->mconf['arrowNO.']);
                        $this->WMarrowACT = $GLOBALS['TSFE']->cObj->getImgResource($this->mconf['arrowACT'], $this->mconf['arrowACT.']);
                        if (is_array($this->WMarrowACT) && is_array($this->WMarrowNO)) {
-                               $this->WMimagesFlag=1;
+                               $this->WMimagesFlag = 1;
                        }
                }
        }
@@ -94,16 +74,17 @@ class tslib_gmenu_foldout extends tslib_gmenu {
         * Processing before the links are created.
         * Basically this is setting an onclick handler for clicking the menu item.
         *
-        * @param       integer         Pointer to $this->menuArr[$key] where the current menu element record is found
-        * @return      void
+        * @param integer $key Pointer to $this->menuArr[$key] where the current menu element record is found
+        * @return void
         */
        function extProc_beforeLinking($key) {
-               $this->I['addATagParams']='';
+               $this->I['addATagParams'] = '';
                $this->WMsubmenu = $this->subMenu($this->I['uid'], $this->WMsubmenuObjSuffixes[$key]['sOSuffix']);
                if (trim($this->WMsubmenu)) {
-                       $this->I['addATagParams']=' onclick="GF_menu('.$key.');'.($this->mconf['dontLinkIfSubmenu'] ? ' return false;' : '').'"';
-                       if ($this->isActive($this->I['uid'], $this->getMPvar($key)) && $this->mconf['displayActiveOnLoad'])     {       // orig: && $this->WMisSub, changed 210901
-                               $this->WM_activeOnLoad='GF_menu('.$key.');';
+                       $this->I['addATagParams'] = ' onclick="GF_menu('.$key.');'.($this->mconf['dontLinkIfSubmenu'] ? ' return false;' : '').'"';
+                               // orig: && $this->WMisSub, changed 210901
+                       if ($this->isActive($this->I['uid'], $this->getMPvar($key)) && $this->mconf['displayActiveOnLoad']) {
+                               $this->WM_activeOnLoad = 'GF_menu('.$key.');';
                        }
                }
        }
@@ -111,15 +92,17 @@ class tslib_gmenu_foldout extends tslib_gmenu {
        /**
         * Processing after linking, basically setting the <div>-layers for the menu items and possibly wrapping in table, adding bullet images.
         *
-        * @param       integer         Pointer to $this->menuArr[$key] where the current menu element record is found
-        * @return      void
+        * @param integer $key Pointer to $this->menuArr[$key] where the current menu element record is found
+        * @return void
         */
        function extProc_afterLinking($key) {
                $this->WMtableWrap = $this->mconf['dontWrapInTable'] ? '' : '<table cellspacing="0" cellpadding="0" width="100%" border="0"><tr><td>|</td></tr></table>';
 
                if ($this->WMimagesFlag) {
-                       $this->WMimageHTML='<img src="'.$GLOBALS['TSFE']->absRefPrefix.$this->WMarrowNO[3].'" width="'.$this->WMarrowNO[0].'" height="'.$this->WMarrowNO[1].'" border="0" name="imgA'.$key.'"'.($this->mconf['arrowImgParams']?' '.$this->mconf['arrowImgParams']:'').' alt="" />';
-               } else {$this->WMimageHTML="";}
+                       $this->WMimageHTML = '<img src="'.$GLOBALS['TSFE']->absRefPrefix.$this->WMarrowNO[3].'" width="'.$this->WMarrowNO[0].'" height="'.$this->WMarrowNO[1].'" border="0" name="imgA'.$key.'"'.($this->mconf['arrowImgParams']?' '.$this->mconf['arrowImgParams']:'').' alt="" />';
+               } else {
+                       $this->WMimageHTML = '';
+               }
 
                if (strstr($this->I['theItem'], '###ARROW_IMAGE###')) {
                        $this->I['theItem'] = str_replace('###ARROW_IMAGE###', $this->WMimageHTML, $this->I['theItem']);
@@ -127,7 +110,7 @@ class tslib_gmenu_foldout extends tslib_gmenu {
                        $this->I['theItem'] = $this->WMimageHTML.$this->I['theItem'];
                }
 
-               $this->WMresult.= '
+               $this->WMresult .= '
 <div class="clTop" id="divTop'.($key+1).'">'.$this->tmpl->wrap($this->I['theItem'], $this->WMtableWrap).'
 <div class="clSub" id="divSub'.($key+1).'">
                '.$this->WMsubmenu.'
@@ -138,7 +121,7 @@ class tslib_gmenu_foldout extends tslib_gmenu {
        /**
         * Putting things together, in particular the JavaScript code needed for the DHTML menu.
         *
-        * @return      string          Empty string! (Since $GLOBALS['TSFE']->divSection is set with the <div>-sections used in the menu)
+        * @return string Empty string! (Since $GLOBALS['TSFE']->divSection is set with the <div>-sections used in the menu)
         */
        function extProc_finish() {
                $bHeight = t3lib_utility_Math::forceIntegerInRange(($this->mconf['bottomHeight']?$this->mconf['bottomHeight']:100), 0, 3000);
@@ -156,7 +139,7 @@ class tslib_gmenu_foldout extends tslib_gmenu {
                $GLOBALS['TSFE']->additionalHeaderData['gmenu_layer_shared']='<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath('cms').'tslib/media/scripts/jsfunc.layermenu.js"></script>';
                $GLOBALS['TSFE']->additionalHeaderData['gmenu_foldout']='<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath('cms').'tslib/media/scripts/jsfunc.foldout.js"></script>';
 
-               $GLOBALS["TSFE"]->additionalHeaderData[].= '
+               $GLOBALS["TSFE"]->additionalHeaderData[] .= '
 <style type="text/css">
        /*<![CDATA[*/
 #divCont {
index 3fcf1c7..771fd73 100644 (file)
  * Revised for TYPO3 3.6 June/2003 by Kasper Skårhøj
  * XHTML compliant
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 /**
  * Class extending tslib_gmenu for the creation of DHTML menus
  * NOTICE: The contents of this class is made so that it can be copied EXACTLY AS IS to the tmenu_layers class! See notes in class (for BEGIN/END) and also "diff.xmenu_layers.txt"
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage tslib
- * @see diff.xmenu_layers.txt
  */
 class tslib_gmenu_layers extends tslib_gmenu {
 
-// FULL DUPLICATE TO tmenu_layers BEGIN:
+       // FULL DUPLICATE TO tmenu_layers BEGIN:
 
-       var $GMENU_fixKey='layers';
-       var $divLayers=Array();
+       var $GMENU_fixKey = 'layers';
+       var $divLayers = array();
 
-       var $WMx=0;
-       var $WMy=0;
-       var $WMxyArray=array();
-       var $WMextraScript='';
-       var $WMlastKey='';
-       var $WMrestoreScript='';
-       var $WMresetSubMenus='';
-       var $WMactiveHasSubMenu='';
-       var $WMactiveKey='';
+       var $WMx = 0;
+       var $WMy = 0;
+       var $WMxyArray = array();
+       var $WMextraScript = '';
+       var $WMlastKey = '';
+       var $WMrestoreScript = '';
+       var $WMresetSubMenus = '';
+       var $WMactiveHasSubMenu = '';
+       var $WMactiveKey = '';
        var $WMtheSubMenu;
        var $WMisSub;
        var $WMhideCode;
-       var $WMonlyOnLoad=0;
-       var $WMbordersWithin=array();
-       var $WMsubIds=array();
-       var $WMtempStore=array();
-       var $WMlockPosition_addAccumulated=array();
-       var $VMmouseoverActions=array();
-       var $VMmouseoutActions=array();
+       var $WMonlyOnLoad = 0;
+       var $WMbordersWithin = array();
+       var $WMsubIds = array();
+       var $WMtempStore = array();
+       var $WMlockPosition_addAccumulated = array();
+       var $VMmouseoverActions = array();
+       var $VMmouseoutActions = array();
 
        /**
         * Creating unique menu id string plus other initialization of internal variables (all prefixed "WM")
         *
-        * @return      void
+        * @return void
         */
        function extProc_init() {
                $this->WMid = trim($this->mconf['layer_menu_id']) ? trim($this->mconf['layer_menu_id']) . 'x' : substr(md5('gl' . serialize($this->mconf)), 0, 6);
@@ -107,8 +88,8 @@ class tslib_gmenu_layers extends tslib_gmenu {
        /**
         * Processing of mouse-over features depending on whether "freezeMouseover" property is set.
         *
-        * @param       integer         Pointer to $this->menuArr[$key] where the current menu element record is found OR $this->result['RO'][$key] where the configuration for that elements RO version is found! Here it is used with the ->WMid to make unique names
-        * @return      void
+        * @param integer $key Pointer to $this->menuArr[$key] where the current menu element record is found OR $this->result['RO'][$key] where the configuration for that elements RO version is found! Here it is used with the ->WMid to make unique names
+        * @return void
         */
        function extProc_RO($key) {
                if ($this->mconf['freezeMouseover']) {
@@ -123,8 +104,8 @@ class tslib_gmenu_layers extends tslib_gmenu {
         * Processing before the links are created.
         * This means primarily creating some javaScript code for the management.
         *
-        * @param       integer         Pointer to $this->menuArr[$key] where the current menu element record is found
-        * @return      void
+        * @param integer $key Pointer to $this->menuArr[$key] where the current menu element record is found
+        * @return void
         */
        function extProc_beforeLinking($key) {
                if ($this->I['uid']) {
@@ -134,17 +115,18 @@ class tslib_gmenu_layers extends tslib_gmenu {
                        array_pop($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId']);
                        $this->WMisSub = trim($this->WMtheSubMenu) ? 1 : 0;
 
-                       if ($this->mconf['lockPosition_addSelf'])               {
-                               $this->WMy+=(strcmp($this->mconf['setFixedHeight'], '')?$this->mconf['setFixedHeight']:$this->I['val']['output_h'])+intval($this->mconf['lockPosition_adjust']);
-                               $this->WMx+=(strcmp($this->mconf['setFixedWidth'], '')?$this->mconf['setFixedWidth']:$this->I['val']['output_w'])+intval($this->mconf['lockPosition_adjust']);
+                       if ($this->mconf['lockPosition_addSelf']) {
+                               $this->WMy += (strcmp($this->mconf['setFixedHeight'], '')?$this->mconf['setFixedHeight']:$this->I['val']['output_h'])+intval($this->mconf['lockPosition_adjust']);
+                               $this->WMx += (strcmp($this->mconf['setFixedWidth'], '')?$this->mconf['setFixedWidth']:$this->I['val']['output_w'])+intval($this->mconf['lockPosition_adjust']);
                        }
 
-                       if ($this->isActive($this->I['uid'], $this->getMPvar($key)) && $this->mconf['displayActiveOnLoad'])     {       // orig: && $this->WMisSub, changed 210901
+                               // orig: && $this->WMisSub, changed 210901
+                       if ($this->isActive($this->I['uid'], $this->getMPvar($key)) && $this->mconf['displayActiveOnLoad']) {
                                $this->WMactiveHasSubMenu = $this->WMisSub;
                                $this->WMactiveKey = 'Menu'.$this->WMid.$key;
 
 
-                               $this->WMrestoreVars=trim('
+                               $this->WMrestoreVars = trim('
 GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
                                ');
                                $this->WMrestoreScript='        GL_doTop("'.$this->WMid.'",GLV_restoreMenu["'.$this->WMid.'"]);'.($this->mconf['freezeMouseover']?'
@@ -178,42 +160,42 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
        /**
         * Processing after linking, basically setting the <div>-layers for the menu items. Also some more JavaScript code is made.
         *
-        * @param       integer         Pointer to $this->menuArr[$key] where the current menu element record is found
-        * @return      void
+        * @param integer $key Pointer to $this->menuArr[$key] where the current menu element record is found
+        * @return void
         */
        function extProc_afterLinking($key) {
                if ($this->I['uid']) {
                        if (!$this->I['spacer'] && $this->WMisSub) {
-                               $exStyle=$this->mconf['layerStyle'] ? $this->mconf['layerStyle'] : 'position:absolute;visibility:hidden';
+                               $exStyle = $this->mconf['layerStyle'] ? $this->mconf['layerStyle'] : 'position:absolute;visibility:hidden';
                                if (trim($exStyle)) {
-                                       $exStyle=' '.$exStyle;
+                                       $exStyle = ' '.$exStyle;
                                }
                                $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['layerCounter']++;
                                $zIndex = 10000-$GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['layerCounter'];
                                $divStart = '<div id="Menu'.$this->WMid.$key.'" style="z-index:'.$zIndex.';'.$exStyle.'">';
                                $divStop = '</div>';
 
-                               $this->divLayers[]= $divStart.$this->WMtheSubMenu.$divStop;
+                               $this->divLayers[] = $divStart.$this->WMtheSubMenu.$divStop;
 
-                               $this->WMhideCode.='
+                               $this->WMhideCode .= '
        GL_getObjCss("Menu'.$this->WMid.$key.'").visibility = "hidden";';
                                $this->WMlastKey = 'Menu'.$this->WMid.$key;
                        }
 
-                       if (!$this->mconf['lockPosition_addSelf'])              {
+                       if (!$this->mconf['lockPosition_addSelf']) {
                                $this->WMy+=(strcmp($this->mconf['setFixedHeight'], '')?$this->mconf['setFixedHeight']:$this->I['val']['output_h'])+intval($this->mconf['lockPosition_adjust']);
                                $this->WMx+=(strcmp($this->mconf['setFixedWidth'], '')?$this->mconf['setFixedWidth']:$this->I['val']['output_w'])+intval($this->mconf['lockPosition_adjust']);
                        }
                }
-               $this->WMresult.=$this->I['theItem'];
+               $this->WMresult .= $this->I['theItem'];
        }
 
        /**
         * Wrapping the item in a <div> section if 'relativeToTriggerItem' was set
         *
-        * @param       string          The current content of the menu item, $this->I['theItem'], passed along.
-        * @param       integer         Pointer to $this->menuArr[$key] where the current menu element record is found
-        * @return      string          The modified version of $item, going back into $this->I['theItem']
+        * @param string The current content of the menu item, $this->I['theItem'], passed along.
+        * @param integer Pointer to $this->menuArr[$key] where the current menu element record is found
+        * @return string The modified version of $item, going back into $this->I['theItem']
         */
        function extProc_beforeAllWrap($item, $key) {
                if ($this->mconf['relativeToTriggerItem']) {
@@ -225,8 +207,8 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
        /**
         * Returns TRUE if different from ''  OR if intval()!=0
         *
-        * @param       string          Value to evaluate
-        * @return      boolean         TRUE if $in is different from ''  OR if intval()!=0
+        * @param string Value to evaluate
+        * @return boolean TRUE if $in is different from ''  OR if intval()!=0
         */
        function isSetIntval($in) {
                return $this->mconf['blankStrEqFalse'] ? strcmp($in, '') : intval($in);
@@ -235,7 +217,7 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
        /**
         * Putting things together, in particular the JavaScript code needed for the DHTML menu.
         *
-        * @return      mixed           Returns the value of a call to the parent function, parent::extProc_finish();
+        * @return mixed Returns the value of a call to the parent function, parent::extProc_finish();
         */
        function extProc_finish () {
                $dirL = $this->mconf['directionLeft'] ? '-GL_getObj(id).width' : '';
@@ -243,18 +225,22 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
 
                $parentLayerId = end($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId']);
 
-               $DoTop=array();
-               $GLV_menuOn=array();
-               $relCode=array();
-               $relFlag=0;
+               $DoTop = array();
+               $GLV_menuOn = array();
+               $relCode = array();
+               $relFlag = 0;
                if ($this->mconf['relativeToParentLayer'] && $parentLayerId) {
                        $relCode['X'].='GLV_curLayerX["'.$parentLayerId.'"]+';
                        $relCode['Y'].='GLV_curLayerY["'.$parentLayerId.'"]+';
-                       if ($this->mconf['relativeToParentLayer.']['addWidth'])         {       $relCode['X'].='GLV_curLayerWidth["'.$parentLayerId.'"]+';      }
-                       if ($this->mconf['relativeToParentLayer.']['addHeight'])        {       $relCode['Y'].='GLV_curLayerHeight["'.$parentLayerId.'"]+';     }
+                       if ($this->mconf['relativeToParentLayer.']['addWidth']) {
+                               $relCode['X'].='GLV_curLayerWidth["'.$parentLayerId.'"]+';
+                       }
+                       if ($this->mconf['relativeToParentLayer.']['addHeight']) {
+                               $relCode['Y'].='GLV_curLayerHeight["'.$parentLayerId.'"]+';
+                       }
                }
                if ($this->mconf['relativeToTriggerItem']) {
-                       $DoTop[]='
+                       $DoTop[] = '
                var parentObject = GL_getObj(GLV_menuXY[WMid][id][2]);
                var TI_width = parentObject.width;
                var TI_height = parentObject.height;
@@ -262,16 +248,16 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
                var TI_x = anchorObj.x;
                var TI_y = anchorObj.y;
                        ';
-                       $relCode['X'].='TI_x+';
-                       $relCode['Y'].='TI_y+';
+                       $relCode['X'] .= 'TI_x+';
+                       $relCode['Y'] .= 'TI_y+';
 
                        if ($this->mconf['relativeToTriggerItem.']['addWidth']) {       $relCode['X'].='TI_width+';     }
                        if ($this->mconf['relativeToTriggerItem.']['addHeight'])        {       $relCode['Y'].='TI_height+';    }
                        $relFlag=1;
                }
                if ($relFlag) {
-                       $DoTop[]='GLV_menuOn["'.$this->WMid.'"].left = ('.$relCode['X'].intval($this->mconf['leftOffset']).$dirL.')+"px";';
-                       $DoTop[]='GLV_menuOn["'.$this->WMid.'"].top =  ('.$relCode['Y'].intval($this->mconf['topOffset']).$dirU.')+"px";';
+                       $DoTop[] = 'GLV_menuOn["'.$this->WMid.'"].left = ('.$relCode['X'].intval($this->mconf['leftOffset']).$dirL.')+"px";';
+                       $DoTop[] = 'GLV_menuOn["'.$this->WMid.'"].top =  ('.$relCode['Y'].intval($this->mconf['topOffset']).$dirU.')+"px";';
                } else {
                                // X position (y is fixed)
                        if (!strcmp($this->mconf['lockPosition'], 'x')) {
@@ -300,13 +286,12 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
                }
 
                        // BordersWithIn:
-               $DoTop[]=$this->extCalcBorderWithin('left', $this->WMbordersWithin[0]);
-               $DoTop[]=$this->extCalcBorderWithin('top', $this->WMbordersWithin[1]);
-               $DoTop[]=$this->extCalcBorderWithin('right', $this->WMbordersWithin[2]);
-               $DoTop[]=$this->extCalcBorderWithin('bottom', $this->WMbordersWithin[3]);
-               $DoTop[]=$this->extCalcBorderWithin('left', $this->WMbordersWithin[4]);
-               $DoTop[]=$this->extCalcBorderWithin('top', $this->WMbordersWithin[5]);
-
+               $DoTop[] = $this->extCalcBorderWithin('left', $this->WMbordersWithin[0]);
+               $DoTop[] = $this->extCalcBorderWithin('top', $this->WMbordersWithin[1]);
+               $DoTop[] = $this->extCalcBorderWithin('right', $this->WMbordersWithin[2]);
+               $DoTop[] = $this->extCalcBorderWithin('bottom', $this->WMbordersWithin[3]);
+               $DoTop[] = $this->extCalcBorderWithin('left', $this->WMbordersWithin[4]);
+               $DoTop[] = $this->extCalcBorderWithin('top', $this->WMbordersWithin[5]);
 
                if ($this->mconf['freezeMouseover'] && !$this->mconf['freezeMouseover.']['alwaysKeep']) {
                        $this->WMhideCode.='
@@ -415,9 +400,9 @@ GLV_timeout_count++;
        /**
         * Creates a JavaScript line which corrects the position of the layer based on the constraints in TypoScript property 'bordersWithin'
         *
-        * @param       string          Direction to test.
-        * @param       integer         The boundary limit in the direction set by $kind. If set then a value is returned, otherwise blank.
-        * @return      string          JavaScript string for correction of the layer position (if $integer is TRUE)
+        * @param string $kind Direction to test.
+        * @param integer $integer The boundary limit in the direction set by $kind. If set then a value is returned, otherwise blank.
+        * @return string JavaScript string for correction of the layer position (if $integer is TRUE)
         * @see extProc_finish(), extProc_init()
         */
        function extCalcBorderWithin($kind, $integer) {
@@ -445,8 +430,6 @@ GLV_timeout_count++;
        }
 }
 
-// FULL DUPLICATE TO tmenu_layers END:
-
-
-$GLOBALS['TSFE']->tmpl->menuclasses.=',gmenu_layers';
+       // FULL DUPLICATE TO tmenu_layers END:
+$GLOBALS['TSFE']->tmpl->menuclasses .= ',gmenu_layers';
 ?>
\ No newline at end of file
index bf3f6e2..4e22b3b 100755 (executable)
  *
  * Revised for TYPO3 3.6 June/2003 by Kasper Skårhøj
  *
- * @author     Olaf.Schuemann@erz.be.ch
+ * @author Olaf.Schuemann@erz.be.ch
  * @see makeMenu_keywords_updated.inc
  */
-
-
-if (!is_object($this)) die ('Error: No parent object present.');
-
-
-
-
+if (!is_object($this)) {
+       die('Error: No parent object present.');
+}
 
 $day = $conf['day'];
 $name =        $conf['name'];
 $menuItemsArray = array();
 
-if ($day==-1) $day=date('w');
-if ($day==date('w')) {
+if ($day==-1) {
+       $day = date('w');
+}
+if ($day == date('w')) {
        $son = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
 } else {
        for ($i=1;;$i++) {
@@ -67,8 +65,8 @@ $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
 
 $value=$row['uid'];
 
-if ($value=='') {
-       $value=$GLOBALS['TSFE']->page['uid'];
+if ($value == '') {
+       $value = $GLOBALS['TSFE']->page['uid'];
 }
 $items = t3lib_div::intExplode(',', $value);
 foreach ($items as $id) {
index a81a26d..3f84ca5 100644 (file)
  *
  * Revised for TYPO3 3.6 June/2003 by Kasper Skårhøj
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 
 /**
  * Alternative rendering of content elements for Plain Text emails. That means text-only output. No HTML at all. Used by the Direct Mail extension.
  *
  * (And then also "lib.alt_plaintext.renderObj" is configured extensively - basically with the TypoScript options passed to this class. See the static template "plugin.alt.plaintext")
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage tslib
  */
 class user_plaintext {
        var $cObj;
-       var $conf=array();
-       var $charWidth=76;
+       var $conf = array();
+       var $charWidth = 76;
 
        /**
         * Main function, called from TypoScript
         * A content object that renders "tt_content" records. See the comment to this class for TypoScript example of how to trigger it.
         * This detects the CType of the current content element and renders it accordingly. Only wellknown types are rendered.
         *
-        * @param       string          Empty, ignore.
-        * @param       array           TypoScript properties for this content object/function call
-        * @return      string          Plain text content
+        * @param string $content Empty, ignore.
+        * @param array $conf TypoScript properties for this content object/function call
+        * @return string Plain text content
         */
        function main_plaintext($content, $conf) {
                $this->conf = $conf;
@@ -160,7 +140,8 @@ class user_plaintext {
                        break;
                }
 
-               $lines[]='';    // First break.
+                       // First break.
+               $lines[] = '';
                $content = implode(chr(10), $lines);
 
                        // User processing:
@@ -171,7 +152,7 @@ class user_plaintext {
        /**
         * Creates a menu/sitemap
         *
-        * @return      string          Content
+        * @return string Content
         */
        function getMenuSitemap() {
                $str = $this->cObj->cObjGetSingle($this->conf['menu'], $this->conf['menu.']);
@@ -182,7 +163,7 @@ class user_plaintext {
        /**
         * Creates a shortcut ("Insert Records")
         *
-        * @return      string          Content
+        * @return string Content
         */
        function getShortcut() {
                $str = $this->cObj->cObjGetSingle($this->conf['shortcut'], $this->conf['shortcut.']);
@@ -192,28 +173,28 @@ class user_plaintext {
        /**
         * Creates an HTML element (stripping tags of course)
         *
-        * @param       string          HTML content to process. If not passed along, the bodytext field is used.
-        * @return      string          Content
+        * @param string $str HTML content to process. If not passed along, the bodytext field is used.
+        * @return string Content
         */
-       function getHTML($str=array()) {
+       function getHTML($str = array()) {
                return $this->breakContent(strip_tags(preg_replace('/<br[ \/]*>/i', chr(10), $this->parseBody(is_string($str) ? $str : $this->cObj->data['bodytext']))));
        }
 
        /**
         * Creates a header (used for most elements)
         *
-        * @return      string          Content
+        * @return string Content
         * @see renderHeader()
         */
        function getHeader() {
-               // links...
+                       // links...
                return $this->renderHeader($this->cObj->data['header'], $this->cObj->data['header_layout']);
        }
 
        /**
         * Get images found in the "image" field of "tt_content"
         *
-        * @return      string          Content
+        * @return string Content
         */
        function getImages() {
                $images = $this->renderImages($this->cObj->data['image'], !$this->cObj->data['image_zoom'] ? $this->cObj->data['image_link'] : '', $this->cObj->data['imagecaption']);
@@ -223,8 +204,8 @@ class user_plaintext {
        /**
         * Parsing the bodytext field content, removing typical entities and <br /> tags.
         *
-        * @param       string          Field content from "bodytext"
-        * @return      string          Processed content
+        * @param string $str Field content from "bodytext"
+        * @return string Processed content
         */
        function parseBody($str) {
                        // First, regular parsing:
@@ -233,7 +214,7 @@ class user_plaintext {
                        // Then all a-tags:
                $aConf = array();
                $aConf['parseFunc.']['tags.']['a']='USER';
-               $aConf['parseFunc.']['tags.']['a.']['userFunc']='user_plaintext->atag_to_http';
+               $aConf['parseFunc.']['tags.']['a.']['userFunc'] = 'user_plaintext->atag_to_http';
                $aConf['parseFunc.']['tags.']['a.']['siteUrl'] = $this->siteUrl;
 
                $str = $this->cObj->stdWrap($str, $aConf);
@@ -244,16 +225,18 @@ class user_plaintext {
        /**
         * Creates a list of links to uploaded files.
         *
-        * @param       string          List of uploaded filenames from "uploads/media/" (or $upload_path)
-        * @param       string          Alternative path value
-        * @return      string          Content
+        * @param string $str List of uploaded filenames from "uploads/media/" (or $upload_path)
+        * @param string $upload_path Alternative path value
+        * @return string Content
         */
-       function renderUploads($str, $upload_path='uploads/media/') {
+       function renderUploads($str, $upload_path = 'uploads/media/') {
                $files = explode(',', $str);
-               $lines=array();
-               if ($this->conf['uploads.']['header'])  {$lines[]=$this->getString($this->conf['uploads.']['header']);}
+               $lines = array();
+               if ($this->conf['uploads.']['header']) {
+                       $lines[] = $this->getString($this->conf['uploads.']['header']);
+               }
                foreach ($files as $k => $file) {
-                       $lines[]=$this->siteUrl.$upload_path.$file;
+                       $lines[] = $this->siteUrl.$upload_path.$file;
                }
                return implode(chr(10), $lines);
        }
@@ -261,8 +244,8 @@ class user_plaintext {
        /**
         * Creates a list
         *
-        * @param       string  type of content
-        * @return      string  Content
+        * @param string $CType Type of content
+        * @return string Content
         */
        function getList($CType = 'list') {
                $str = $this->cObj->cObjGetSingle($this->conf[$CType], $this->conf[$CType . '.']);
@@ -272,17 +255,18 @@ class user_plaintext {
        /**
         * Renders a content element header, observing the layout type giving different header formattings
         *
-        * @param       string          The header string
-        * @param       integer         The layout type of the header (in the content element)
-        * @return      string          Content
+        * @param string $str The header string
+        * @param integer $type The layout type of the header (in the content element)
+        * @return string Content
         */
-       function renderHeader($str, $type=0) {
+       function renderHeader($str, $type = 0) {
                if ($str) {
                        $hConf = $this->conf['header.'];
                        $defaultType = t3lib_utility_Math::forceIntegerInRange($hConf['defaultType'], 1, 5);
                        $type=t3lib_utility_Math::forceIntegerInRange($type, 0, 6);
-                       if (!$type)     $type=$defaultType;
-                       if ($type!=6)   {       // not hidden
+                       if (!$type)     $type = $defaultType;
+                               // not hidden
+                       if ($type != 6) {
                                $tConf = $hConf[$type.'.'];
 
                                $lines=array();
@@ -300,8 +284,8 @@ class user_plaintext {
                                if ($this->cObj->data['date']) {
                                        $lines[] = $this->getString($hConf['datePrefix']) . date($hConf['date'] ? $hConf['date'] : $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $this->cObj->data['date']);
                                }
-                               $prefix='';
-                               $str=$this->getString($tConf['prefix']).$str;
+                               $prefix = '';
+                               $str = $this->getString($tConf['prefix']).$str;
                                if ($tConf['autonumber'])       $str=$this->cObj->parentRecordNumber.$str;
                                if ($this->cObj->data['header_position']=='right')      {$prefix=str_pad(' ', ($this->charWidth-strlen($str)));}
                                if ($this->cObj->data['header_position']=='center')     {$prefix=str_pad(' ', floor(($this->charWidth-strlen($str))/2));}
@@ -309,12 +293,16 @@ class user_plaintext {
                                if ($this->cObj->data['header_link'])           {$lines[] = $this->getString($hConf['linkPrefix']).$this->getLink($this->cObj->data['header_link']);}
 
                                $blanks = t3lib_utility_Math::forceIntegerInRange($tConf['postLineBlanks'], 0, 1000);
-                               if ($blanks)    {$lines[]=str_pad('', $blanks-1, chr(10));}
+                               if ($blanks) {
+                                       $lines[] = str_pad('', $blanks-1, chr(10));
+                               }
 
                                $lines=$this->pad($lines, $tConf['postLineChar'], $tConf['postLineLen']);
 
                                $blanks = t3lib_utility_Math::forceIntegerInRange($tConf['postBlanks'], 0, 1000);
-                               if ($blanks)    {$lines[]=str_pad('', $blanks-1, chr(10));}
+                               if ($blanks) {
+                                       $lines[] = str_pad('', $blanks-1, chr(10));
+                               }
                                return implode(chr(10), $lines);
                        }
                }
@@ -323,10 +311,10 @@ class user_plaintext {
        /**
         * Function used to repeat a char pattern in head lines (like if you want "********" above/below a header)
         *
-        * @param       array           Array of existing lines to which the new char-pattern should be added
-        * @param       string          The character pattern to repeat. Default is "-"
-        * @param       integer         The length of the line. $preLineChar will be repeated to fill in this length.
-        * @return      array           The input array with a new line added.
+        * @param array $lines Array of existing lines to which the new char-pattern should be added
+        * @param string $preLineChar The character pattern to repeat. Default is "-"
+        * @param integer $len The length of the line. $preLineChar will be repeated to fill in this length.
+        * @return array The input array with a new line added.
         * @see renderHeader()
         */
        function pad($lines, $preLineChar, $len) {
@@ -341,15 +329,15 @@ class user_plaintext {
        /**
         * Function used to wrap the bodytext field content (or image caption) into lines of a max length of
         *
-        * @param       string          The content to break
-        * @return      string          Processed value.
+        * @param string The content to break
+        * @return string Processed value.
         * @see main_plaintext(), breakLines()
         */
        function breakContent($str) {
                $cParts = explode(chr(10), $str);
-               $lines=array();
+               $lines = array();
                foreach ($cParts as $substrs) {
-                       $lines[]=$this->breakLines($substrs);
+                       $lines[] = $this->breakLines($substrs);
                }
                return implode(chr(10), $lines);
        }
@@ -357,8 +345,8 @@ class user_plaintext {
        /**
         * Breaks content lines into a bullet list
         *
-        * @param       string          Content string to make into a bullet list
-        * @return      string          Processed value
+        * @param string $str Content string to make into a bullet list
+        * @return string Processed value
         */
        function breakBulletlist($str) {
                $type = $this->cObj->data['layout'];
@@ -367,19 +355,21 @@ class user_plaintext {
                $tConf = $this->conf['bulletlist.'][$type.'.'];
 
                $cParts = explode(chr(10), $str);
-               $lines=array();
-               $c=0;
+               $lines = array();
+               $c = 0;
                foreach ($cParts as $substrs) {
                        $c++;
                        $bullet = $tConf['bullet'] ? $this->getString($tConf['bullet']) : ' - ';
-                       $bLen=strlen($bullet);
+                       $bLen = strlen($bullet);
                        $bullet = substr(str_replace('#', $c, $bullet), 0, $bLen);
                        $secondRow = substr($tConf['secondRow'] ? $this->getString($tConf['secondRow']) : str_pad('', strlen($bullet), ' '), 0, $bLen);
 
-                       $lines[]=$bullet . $this->breakLines($substrs, chr(10) . $secondRow, $this->charWidth-$bLen);
+                       $lines[] = $bullet . $this->breakLines($substrs, chr(10) . $secondRow, $this->charWidth-$bLen);
 
                        $blanks = t3lib_utility_Math::forceIntegerInRange($tConf['blanks'], 0, 1000);
-                       if ($blanks)    {$lines[]=str_pad('', $blanks-1, chr(10));}
+                       if ($blanks) {
+                               $lines[]=str_pad('', $blanks-1, chr(10));
+                       }
                }
                return implode(chr(10), $lines);
        }
@@ -387,14 +377,14 @@ class user_plaintext {
        /**
         * Formatting a table in plain text (based on the paradigm of lines being content rows and cells separated by "|")
         *
-        * @param       string          Content string
-        * @return      string          Processed value
+        * @param string $str Content string
+        * @return string Processed value
         */
        function breakTable($str) {
                $cParts = explode(chr(10), $str);
-               $lines=array();
+               $lines = array();
                $cols = intval($this->conf['cols']) ? intval($this->conf['cols']) : 0;
-               $c=0;
+               $c = 0;
                foreach ($cParts as $substrs) {
                        $c++;
                        if (trim($substrs)) {
@@ -409,25 +399,24 @@ class user_plaintext {
                }
                $messure = $this->traverseTable($lines);
 
+               $divChar = '-';
+               $joinChar = '+';
+               $colChar = '|';
 
-               $divChar='-';
-               $joinChar='+';
-               $colChar='|';
-
-               // Make table:
+                       // Make table:
                $outLines = array();
-               $outLines[]=$this->addDiv($messure, '', $divChar, $joinChar, $cols);
+               $outLines[] = $this->addDiv($messure, '', $divChar, $joinChar, $cols);
 
                foreach ($lines as $k => $v) {
                        $top = intval($messure[1][$k]);
-                       for ($aa=0;$aa<$top;$aa++) {
-                               $tempArr=array();
-                               for ($bb=0;$bb<$cols;$bb++) {
+                       for ($aa = 0; $aa < $top; $aa++) {
+                               $tempArr = array();
+                               for ($bb = 0; $bb < $cols; $bb++) {
                                        $tempArr[$bb]=str_pad($v[$bb][$aa], $messure[0][$bb], ' ');
                                }
                                $outLines[] = $colChar . implode($colChar, $tempArr) . $colChar;
                        }
-                       $outLines[]=$this->addDiv($messure, '', $divChar, $joinChar, $cols);
+                       $outLines[] = $this->addDiv($messure, '', $divChar, $joinChar, $cols);
                }
                return implode(chr(10), $outLines);
        }
@@ -435,12 +424,12 @@ class user_plaintext {
        /**
         * Subfunction for breakTable(): Adds a divider line between table rows.
         *
-        * @param       array           Some information about sizes
-        * @param       string          Empty string.
-        * @param       string          Character to use for the divider line, typically "-"
-        * @param       string          Join character, typically "+"
-        * @param       integer         Number of table columns
-        * @return      string          Divider line for the table
+        * @param array $messure Some information about sizes
+        * @param string $content Empty string.
+        * @param string $divChar Character to use for the divider line, typically "-"
+        * @param string $joinChar Join character, typically "+"
+        * @param integer $colsNumber of table columns
+        * @return string Divider line for the table
         * @access private
         * @see breakTable()
         */
@@ -455,8 +444,8 @@ class user_plaintext {
        /**
         * Traverses the table lines/cells and creates arrays with statistics for line numbers and lengths
         *
-        * @param       array           Array with [table rows] [table cells] [lines in cell]
-        * @return      array           Statistics (max lines/lengths)
+        * @param array $tableLines Array with [table rows] [table cells] [lines in cell]
+        * @return array Statistics (max lines/lengths)
         * @access private
         * @see breakTable()
         */
@@ -477,18 +466,20 @@ class user_plaintext {
        /**
         * Render block of images - which means creating lines with links to the images.
         *
-        * @param       string          List of image filenames (from "image" field in tt_content records)
-        * @param       string          Link value from the "image_link" field in tt_content records
-        * @param       string          Caption text
-        * @param       string          Alternative relative path for the files listed in $str
-        * @return      string          Content
+        * @param string $str List of image filenames (from "image" field in tt_content records)
+        * @param string $links Link value from the "image_link" field in tt_content records
+        * @param string $caption Caption text
+        * @param string $upload_path Alternative relative path for the files listed in $str
+        * @return string Content
         * @see getImages()
         */
        function renderImages($str, $links, $caption, $upload_path = 'uploads/pics/') {
                $images = explode(',', $str);
                $linksArr = explode(LF, $links);
-               $lines=array();
-               if ($this->conf['images.']['header'])   {$lines[]=$this->getString($this->conf['images.']['header']);}
+               $lines = array();
+               if ($this->conf['images.']['header'])   {
+                       $lines[] = $this->getString($this->conf['images.']['header']);
+               }
                foreach ($images as $k => $file) {
                        $lines[]=$this->siteUrl.$upload_path.$file;
                        if ($links && count($linksArr)>1) {
@@ -502,15 +493,15 @@ class user_plaintext {
                                if ($theLink)   {$lines[]=$this->getString($this->conf['images.']['linkPrefix']).$theLink;}
                        }
                }
-               if ($links && count($linksArr)==1) {
+               if ($links && count($linksArr) == 1) {
                        $theLink = $this->getLink($links);
                        if ($theLink)   {$lines[]=$this->getString($this->conf['images.']['linkPrefix']).$theLink;}
                }
                if ($caption) {
-                       $lines[]='';
+                       $lines[] = '';
                        $cHeader = trim($this->getString($this->conf['images.']['captionHeader']));
-                       if ($cHeader)           $lines[]=$cHeader;
-                       $lines[]=$this->breakContent($caption);
+                       if ($cHeader)           $lines[] = $cHeader;
+                       $lines[] = $this->breakContent($caption);
                }
 
                return implode(chr(10), $lines);
@@ -519,8 +510,8 @@ class user_plaintext {
        /**
         * Returns a typolink URL based on input.
         *
-        * @param       string          Parameter to typolink
-        * @return      string          The URL returned from $this->cObj->getTypoLink_URL(); - possibly it prefixed with the URL of the site if not present already
+        * @param string $ll Parameter to typolink
+        * @return string The URL returned from $this->cObj->getTypoLink_URL(); - possibly it prefixed with the URL of the site if not present already
         */
        function getLink($ll) {
                $theLink=$this->cObj->getTypoLink_URL($ll);
@@ -533,10 +524,10 @@ class user_plaintext {
        /**
         * Breaking lines into fixed length lines, using t3lib_div::breakLinesForEmail()
         *
-        * @param       string          The string to break
-        * @param       string          Line break character
-        * @param       integer         Length of lines, default is $this->charWidth
-        * @return      string          Processed string
+        * @param string $str The string to break
+        * @param string $implChar Line break character
+        * @param integer $charWidth Length of lines, default is $this->charWidth
+        * @return string Processed string
         * @see t3lib_div::breakLinesForEmail()
         */
        function breakLines($str, $implChar = "\n", $charWidth = 0) {
@@ -547,8 +538,8 @@ class user_plaintext {
         * Explodes a string with "|" and if the second part is found it will return this, otherwise the first part.
         * Used for many TypoScript properties used in this class since they need preceeding whitespace to be preserved.
         *
-        * @param       string          Input string
-        * @return      string          Output string
+        * @param string $str Input string
+        * @return string Output string
         * @access private
         */
        function getString($str) {
@@ -559,9 +550,9 @@ class user_plaintext {
        /**
         * Calls a user function for processing of data
         *
-        * @param       string          TypoScript property name, pointing to the definition of the user function to call (from the TypoScript array internally in this class). This array is passed to the user function. Notice that "parentObj" property is a reference to this class ($this)
-        * @param       mixed           Variable to process
-        * @return      mixed           The processed $passVar as returned by the function call
+        * @param string $mConfKey TypoScript property name, pointing to the definition of the user function to call (from the TypoScript array internally in this class). This array is passed to the user function. Notice that "parentObj" property is a reference to this class ($this)
+        * @param mixed $passVar Variable to process
+        * @return mixed The processed $passVar as returned by the function call
         */
        function userProcess($mConfKey, $passVar) {
                if ($this->conf[$mConfKey]) {
@@ -576,9 +567,9 @@ class user_plaintext {
         * Function used by TypoScript "parseFunc" to process links in the bodytext.
         * Extracts the link and shows it in plain text in a parathesis next to the link text. If link was relative the site URL was prepended.
         *
-        * @param       string          Empty, ignore.
-        * @param       array           TypoScript parameters
-        * @return      string          Processed output.
+        * @param string $content Empty, ignore.
+        * @param array $conf TypoScript parameters
+        * @return string Processed output.
         * @see parseBody()
         */
        function atag_to_http($content, $conf) {
@@ -596,9 +587,9 @@ class user_plaintext {
        /**
         * User function (called from TypoScript) for generating a bullet list (used in parsefunc)
         *
-        * @param       string          Empty, ignore.
-        * @param       array           TypoScript parameters
-        * @return      string          Processed output.
+        * @param string $content Empty, ignore.
+        * @param array $conf TypoScript parameters
+        * @return string Processed output.
         */
        function typolist($content, $conf) {
                $this->conf = $this->cObj->mergeTSRef($conf, 'bulletlist');
@@ -611,9 +602,9 @@ class user_plaintext {
        /**
         * User function (called from TypoScript) for generating a typo header tag (used in parsefunc)
         *
-        * @param       string          Empty, ignore.
-        * @param       array           TypoScript parameters
-        * @return      string          Processed output.
+        * @param string $content Empty, ignore.
+        * @param array $conf TypoScript parameters
+        * @return string Processed output.
         */
        function typohead($content, $conf) {
                $this->conf = $this->cObj->mergeTSRef($conf, 'header');
@@ -622,7 +613,7 @@ class user_plaintext {
                $str = trim($this->cObj->getCurrentVal());
                $this->cObj->data['header_layout'] = $this->cObj->parameters['type'];
                $this->cObj->data['header_position'] = $this->cObj->parameters['align'];
-               $this->cObj->data['header']=$str;
+               $this->cObj->data['header'] = $str;
 
                return $this->getHeader();
        }
@@ -630,21 +621,18 @@ class user_plaintext {
        /**
         * User function (called from TypoScript) for generating a code listing (used in parsefunc)
         *
-        * @param       string          Empty, ignore.
-        * @param       array           TypoScript parameters
-        * @return      string          Processed output.
+        * @param string $content Empty, ignore.
+        * @param array $conf TypoScript parameters
+        * @return string Processed output.
         */
        function typocode($content, $conf) {
                        // Nothing is really done here...
                $this->conf = $conf;
-               $this->siteUrl=$conf['siteUrl'];
+               $this->siteUrl = $conf['siteUrl'];
                return $this->cObj->getCurrentVal();
        }
 }
 
-
-
-
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['media/scripts/plaintextLib.inc'])) {
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['media/scripts/plaintextLib.inc']);
 }
index 8a38fe1..23e7a3e 100755 (executable)
@@ -24,6 +24,7 @@
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
+
 /**
  * postit.inc
  *
  * Revised for TYPO3 3.6 June/2003 by Kasper Skårhøj
  * XHTML compliant
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 
-
-
-if (!is_object($this)) die ('Error: No parent object present.');
-
-
-
-
-
+if (!is_object($this)) {
+       die('Error: No parent object present.');
+}
 
 /***************************************************************
 TypoScript config:
@@ -107,14 +103,9 @@ tt_content.splash.20 {
 
 ****************************************************************/
 
-
-
-
-
 $data = $this->stdWrap($conf['data'], $conf['data.']);
 $cols = intval($conf['cols']) ? intval($conf['cols']) : 3;
 
-
 $lines = explode(chr(10), $data);
 $imageArr = array();
 foreach ($lines as $key => $content) {
@@ -144,15 +135,15 @@ if (is_array($imageArr)) {
                $res = '';
                $rows = ceil(count($imageArr)/$cols);
 
-               for ($a=0;$a<$rows;$a++) {
+               for ($a = 0; $a < $rows; $a++) {
                        $res.='<tr>';
-                       for ($b=0;$b<$cols;$b++) {
+                       for ($b = 0; $b < $cols; $b++) {
                                $res.='<td>'.$imageArr[(($a*$cols)+$b)].'</td>';
                        }
-                       $res.='</tr>';
+                       $res .= '</tr>';
                }
 
-               $content='<table border="0" cellspacing="0" cellpadding="0">'.$res.'</table>';
+               $content = '<table border="0" cellspacing="0" cellpadding="0">'.$res.'</table>';
        } else {
                $content .= implode($imageArr, '');
        }
index e612740..6d2e8ca 100755 (executable)
@@ -1,13 +1,12 @@
 <?php
-// This is a test-script which may be included by the cObject PHP_SCRIPT in TypoScript
-// All output must go to $content.
-// This line will make sure that the page is NOT cached!! You may NOT set the value to FALSE as some other code may have set it to TRUE on purpose and this must be respected.
-// $GLOBALS['TSFE']->set_no_cache();
-
-if (!is_object($this)) die ('Error: No parent object present.');
-
-
-
-$content='This is a testscript';
+       // This is a test-script which may be included by the cObject PHP_SCRIPT in TypoScript
+       // All output must go to $content.
+       // This line will make sure that the page is NOT cached!! You may NOT set the value to FALSE as some other code may have set it to TRUE on purpose and this must be respected.
+       // $GLOBALS['TSFE']->set_no_cache();
+if (!is_object($this)) {
+       die('Error: No parent object present.');
+}
+
+$content = 'This is a testscript';
 
 ?>
\ No newline at end of file
index 3accefe..f421774 100755 (executable)
@@ -1,16 +1,15 @@
 <?php
 
-if (!is_object($TSFE)) die ('Error: No parent object present.');
-
-
-
+if (!is_object($TSFE)) {
+       die('Error: No parent object present.');
+}
 
 /**
  * Printing current time dynamically
  *
- * @param      string          Content (ignore)
- * @param      array           TypoScript configuration passed
- * @return     string          Current time wrapped in <font> tags with red color
+ * @param string $content Content (ignore)
+ * @param array $conf TypoScript configuration passed
+ * @return string Current time wrapped in <font> tags with red color
  */
 function user_printTimeExt($content, $conf) {
        return '<font color="red">Dynamic time: '.date('H:i:s').'</font><br />';
@@ -33,9 +32,6 @@ You can get the content of the record, that included this script in $REC:<br />
 The configuration for the script is in the array, $CONF:<br />
 <br />
 
-
-
-
 <?php
 debug($CONF);
 
@@ -49,7 +45,6 @@ These are global variables!
 <br />
 Good luck....
 
-
 BTW: The time:
 <?php if ($CONF['showTime'])   {echo user_printTimeExt('', '');} ?>
 <br />
index cc194b9..4f09993 100755 (executable)
@@ -1,11 +1,10 @@
 <?php
 
-if (!is_object($this)) die ('Error: No parent object present.');
+if (!is_object($this)) {
+       die('Error: No parent object present.');
+}
 
-
-
-
-$content.='
+$content .= '
 This is output from an internal script!
 <br />
 Works like ordinary include-scripts.
index eb581a3..593f347 100644 (file)
  * Revised for TYPO3 3.6 June/2003 by Kasper Skårhøj
  * XHTML compliant
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 /**
  * Class extending tslib_tmenu for the creation of text based DHTML menus
  * NOTICE: The contents of this class is copied EXACTLY AS IS from gmenu_layers class! See notes in class (for BEGIN/END) and also 'diff.xmenu_layers.txt'
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage tslib
- * @see diff.xmenu_layers.txt
  */
 class tslib_tmenu_layers extends tslib_tmenu {
 
-// FULL DUPLICATE FROM gmenu_layers BEGIN:
+       // FULL DUPLICATE FROM gmenu_layers BEGIN:
 
-       var $GMENU_fixKey='layers';
-       var $divLayers=Array();
+       var $GMENU_fixKey = 'layers';
+       var $divLayers = array();
 
-       var $WMx=0;
-       var $WMy=0;
-       var $WMxyArray=array();
-       var $WMextraScript='';
-       var $WMlastKey='';
-       var $WMrestoreScript='';
-       var $WMresetSubMenus='';
-       var $WMactiveHasSubMenu='';
-       var $WMactiveKey='';
+       var $WMx = 0;
+       var $WMy = 0;
+       var $WMxyArray = array();
+       var $WMextraScript = '';
+       var $WMlastKey = '';
+       var $WMrestoreScript = '';
+       var $WMresetSubMenus = '';
+       var $WMactiveHasSubMenu = '';
+       var $WMactiveKey = '';
        var $WMtheSubMenu;
        var $WMisSub;
        var $WMhideCode;
-       var $WMonlyOnLoad=0;
-       var $WMbordersWithin=array();
-       var $WMsubIds=array();
-       var $WMtempStore=array();
-       var $WMlockPosition_addAccumulated=array();
-       var $VMmouseoverActions=array();
-       var $VMmouseoutActions=array();
+       var $WMonlyOnLoad = 0;
+       var $WMbordersWithin = array();
+       var $WMsubIds = array();
+       var $WMtempStore = array();
+       var $WMlockPosition_addAccumulated = array();
+       var $VMmouseoverActions = array();
+       var $VMmouseoutActions = array();
 
        /**
         * Creating unique menu id string plus other initialization of internal variables (all prefixed "WM")
         *
-        * @return      void
+        * @return void
         */
        function extProc_init() {
                $this->WMid = trim($this->mconf['layer_menu_id']) ? trim($this->mconf['layer_menu_id']) . 'x' : substr(md5('gl' . serialize($this->mconf)), 0, 6);
@@ -107,8 +88,8 @@ class tslib_tmenu_layers extends tslib_tmenu {
        /**
         * Processing of mouse-over features depending on whether "freezeMouseover" property is set.
         *
-        * @param       integer         Pointer to $this->menuArr[$key] where the current menu element record is found OR $this->result['RO'][$key] where the configuration for that elements RO version is found! Here it is used with the ->WMid to make unique names
-        * @return      void
+        * @param integer $key Pointer to $this->menuArr[$key] where the current menu element record is found OR $this->result['RO'][$key] where the configuration for that elements RO version is found! Here it is used with the ->WMid to make unique names
+        * @return void
         */
        function extProc_RO($key) {
                if ($this->mconf['freezeMouseover']) {
@@ -123,8 +104,8 @@ class tslib_tmenu_layers extends tslib_tmenu {
         * Processing before the links are created.
         * This means primarily creating some javaScript code for the management.
         *
-        * @param       integer         Pointer to $this->menuArr[$key] where the current menu element record is found
-        * @return      void
+        * @param integer $key Pointer to $this->menuArr[$key] where the current menu element record is found
+        * @return void
         */
        function extProc_beforeLinking($key) {
                if ($this->I['uid']) {
@@ -178,15 +159,15 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
        /**
         * Processing after linking, basically setting the <div>-layers for the menu items. Also some more JavaScript code is made.
         *
-        * @param       integer         Pointer to $this->menuArr[$key] where the current menu element record is found
-        * @return      void
+        * @param integer $key Pointer to $this->menuArr[$key] where the current menu element record is found
+        * @return void
         */
        function extProc_afterLinking($key) {
                if ($this->I['uid']) {
                        if (!$this->I['spacer'] && $this->WMisSub) {
                                $exStyle=$this->mconf['layerStyle'] ? $this->mconf['layerStyle'] : 'position:absolute;visibility:hidden';
                                if (trim($exStyle)) {
-                                       $exStyle=' '.$exStyle;
+                                       $exStyle = ' '.$exStyle;
                                }
                                $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['layerCounter']++;
                                $zIndex = 10000-$GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['layerCounter'];
@@ -211,9 +192,9 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
        /**
         * Wrapping the item in a <div> section if 'relativeToTriggerItem' was set
         *
-        * @param       string          The current content of the menu item, $this->I['theItem'], passed along.
-        * @param       integer         Pointer to $this->menuArr[$key] where the current menu element record is found
-        * @return      string          The modified version of $item, going back into $this->I['theItem']
+        * @param string $item The current content of the menu item, $this->I['theItem'], passed along.
+        * @param integer $key Pointer to $this->menuArr[$key] where the current menu element record is found
+        * @return string The modified version of $item, going back into $this->I['theItem']
         */
        function extProc_beforeAllWrap($item, $key) {
                if ($this->mconf['relativeToTriggerItem']) {
@@ -225,8 +206,8 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
        /**
         * Returns TRUE if different from ''  OR if intval()!=0
         *
-        * @param       string          Value to evaluate
-        * @return      boolean         TRUE if $in is different from ''  OR if intval()!=0
+        * @param string $in Value to evaluate
+        * @return boolean TRUE if $in is different from ''  OR if intval()!=0
         */
        function isSetIntval($in) {
                return $this->mconf['blankStrEqFalse'] ? strcmp($in, '') : intval($in);
@@ -235,7 +216,7 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
        /**
         * Putting things together, in particular the JavaScript code needed for the DHTML menu.
         *
-        * @return      mixed           Returns the value of a call to the parent function, parent::extProc_finish();
+        * @return mixed Returns the value of a call to the parent function, parent::extProc_finish();
         */
        function extProc_finish () {
                $dirL = $this->mconf['directionLeft'] ? '-GL_getObj(id).width' : '';
@@ -243,18 +224,22 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
 
                $parentLayerId = end($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId']);
 
-               $DoTop=array();
-               $GLV_menuOn=array();
-               $relCode=array();
-               $relFlag=0;
+               $DoTop = array();
+               $GLV_menuOn = array();
+               $relCode = array();
+               $relFlag = 0;
                if ($this->mconf['relativeToParentLayer'] && $parentLayerId) {
                        $relCode['X'].='GLV_curLayerX["'.$parentLayerId.'"]+';
                        $relCode['Y'].='GLV_curLayerY["'.$parentLayerId.'"]+';
-                       if ($this->mconf['relativeToParentLayer.']['addWidth'])         {       $relCode['X'].='GLV_curLayerWidth["'.$parentLayerId.'"]+';      }
-                       if ($this->mconf['relativeToParentLayer.']['addHeight'])        {       $relCode['Y'].='GLV_curLayerHeight["'.$parentLayerId.'"]+';     }
+                       if ($this->mconf['relativeToParentLayer.']['addWidth']) {
+                               $relCode['X'].='GLV_curLayerWidth["'.$parentLayerId.'"]+';
+                       }
+                       if ($this->mconf['relativeToParentLayer.']['addHeight']) {
+                               $relCode['Y'].='GLV_curLayerHeight["'.$parentLayerId.'"]+';
+                       }
                }
                if ($this->mconf['relativeToTriggerItem']) {
-                       $DoTop[]='
+                       $DoTop[] = '
                var parentObject = GL_getObj(GLV_menuXY[WMid][id][2]);
                var TI_width = parentObject.width;
                var TI_height = parentObject.height;
@@ -265,13 +250,17 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
                        $relCode['X'].='TI_x+';
                        $relCode['Y'].='TI_y+';
 
-                       if ($this->mconf['relativeToTriggerItem.']['addWidth']) {       $relCode['X'].='TI_width+';     }
-                       if ($this->mconf['relativeToTriggerItem.']['addHeight'])        {       $relCode['Y'].='TI_height+';    }
-                       $relFlag=1;
+                       if ($this->mconf['relativeToTriggerItem.']['addWidth']) {
+                               $relCode['X'].='TI_width+';
+                       }
+                       if ($this->mconf['relativeToTriggerItem.']['addHeight']) {
+                               $relCode['Y'].='TI_height+';
+                       }
+                       $relFlag = 1;
                }
                if ($relFlag) {
-                       $DoTop[]='GLV_menuOn["'.$this->WMid.'"].left = ('.$relCode['X'].intval($this->mconf['leftOffset']).$dirL.')+"px";';
-                       $DoTop[]='GLV_menuOn["'.$this->WMid.'"].top =  ('.$relCode['Y'].intval($this->mconf['topOffset']).$dirU.')+"px";';
+                       $DoTop[] = 'GLV_menuOn["'.$this->WMid.'"].left = ('.$relCode['X'].intval($this->mconf['leftOffset']).$dirL.')+"px";';
+                       $DoTop[] = 'GLV_menuOn["'.$this->WMid.'"].top =  ('.$relCode['Y'].intval($this->mconf['topOffset']).$dirU.')+"px";';
                } else {
                                // X position (y is fixed)
                        if (!strcmp($this->mconf['lockPosition'], 'x')) {
@@ -300,12 +289,12 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
                }
 
                        // BordersWithIn:
-               $DoTop[]=$this->extCalcBorderWithin('left', $this->WMbordersWithin[0]);
-               $DoTop[]=$this->extCalcBorderWithin('top', $this->WMbordersWithin[1]);
-               $DoTop[]=$this->extCalcBorderWithin('right', $this->WMbordersWithin[2]);
-               $DoTop[]=$this->extCalcBorderWithin('bottom', $this->WMbordersWithin[3]);
-               $DoTop[]=$this->extCalcBorderWithin('left', $this->WMbordersWithin[4]);
-               $DoTop[]=$this->extCalcBorderWithin('top', $this->WMbordersWithin[5]);
+               $DoTop[] = $this->extCalcBorderWithin('left', $this->WMbordersWithin[0]);
+               $DoTop[] = $this->extCalcBorderWithin('top', $this->WMbordersWithin[1]);
+               $DoTop[] = $this->extCalcBorderWithin('right', $this->WMbordersWithin[2]);
+               $DoTop[] = $this->extCalcBorderWithin('bottom', $this->WMbordersWithin[3]);
+               $DoTop[] = $this->extCalcBorderWithin('left', $this->WMbordersWithin[4]);
+               $DoTop[] = $this->extCalcBorderWithin('top', $this->WMbordersWithin[5]);
 
 
                if ($this->mconf['freezeMouseover'] && !$this->mconf['freezeMouseover.']['alwaysKeep']) {
@@ -313,7 +302,7 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
 GL'.$this->WMid.'_out("");';
                }
 
-               $TEST='';
+               $TEST = '';
                if (count($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid'])) {
                        foreach ($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid'] as $mIdStr) {
                                $this->WMhideCode.='
@@ -401,8 +390,8 @@ GLV_timeout_count++;
 ';
                $GLOBALS['TSFE']->JSeventFuncCalls['onload']['GL_initLayers()']= 'GL_initLayers();';
                $GLOBALS['TSFE']->JSeventFuncCalls['onload'][$this->WMid]=      'GL_restoreMenu("'.$this->WMid.'");';
-               // Should be called BEFORE any of the 'local' getMouse functions!
-               // is put inside in a try catch block to avoid JS errors in IE
+                       // Should be called BEFORE any of the 'local' getMouse functions!
+                       // is put inside in a try catch block to avoid JS errors in IE
                $GLOBALS['TSFE']->JSeventFuncCalls['onmousemove']['GL_getMouse(e)']= 'try{GL_getMouse(e);}catch(ex){};';
                $GLOBALS['TSFE']->JSeventFuncCalls['onmousemove'][$this->WMid]= 'try{GL'.$this->WMid.'_getMouse(e);}catch(ex){};';
                $GLOBALS['TSFE']->JSeventFuncCalls['onmouseup'][$this->WMid]= 'GL_mouseUp(\''.$this->WMid.'\',e);';
@@ -415,9 +404,9 @@ GLV_timeout_count++;
        /**
         * Creates a JavaScript line which corrects the position of the layer based on the constraints in TypoScript property 'bordersWithin'
         *
-        * @param       string          Direction to test.
-        * @param       integer         The boundary limit in the direction set by $kind. If set then a value is returned, otherwise blank.
-        * @return      string          JavaScript string for correction of the layer position (if $integer is TRUE)
+        * @param string $kind Direction to test.
+        * @param integer $integer The boundary limit in the direction set by $kind. If set then a value is returned, otherwise blank.
+        * @return string JavaScript string for correction of the layer position (if $integer is TRUE)
         * @see extProc_finish(), extProc_init()
         */
        function extCalcBorderWithin($kind, $integer) {
@@ -445,8 +434,6 @@ GLV_timeout_count++;
        }
 }
 
-// FULL DUPLICATE FROM gmenu_layers END:
-
-
-$GLOBALS['TSFE']->tmpl->menuclasses.=',tmenu_layers';
+       // FULL DUPLICATE FROM gmenu_layers END:
+$GLOBALS['TSFE']->tmpl->menuclasses .= ',tmenu_layers';
 ?>
\ No newline at end of file
index 4fbf9fd..2f99d62 100755 (executable)
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
+
 /**
  * Contains class for creating WAP pages for TYPO3
  *
  * Revised for TYPO3 3.6 June/2003 by Kasper Skårhøj
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
+
 /**
  * Class that creates the current page and content element records as an WML structure using the library "t3lib_xml"
  * It is demonstrated in use in the testsite package on page "59"
  *
  * @package TYPO3
  * @subpackage tslib
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 class user_wapversion {
-       var $cObj;              // The backReference to the mother cObj object set at call time
+               // The backReference to the mother cObj object set at call time
+       var $cObj;
 
-       var $idx=0;
+       var $idx = 0;
 
        /**
         * Main function, called from TypoScript
         *
-        * @param       string          Empty, ignore.
-        * @param       array           TypoScript properties for this content object/function call
-        * @return      string          WML content
+        * @param string $content Empty, ignore.
+        * @param array $conf TypoScript properties for this content object/function call
+        * @return string WML content
         */
        function main_wapversion($content, $conf) {
                $GLOBALS['TSFE']->set_no_cache();
@@ -102,7 +105,7 @@ class user_wapversion {
                $pageRec = $GLOBALS['TSFE']->page;
                if ($GLOBALS['TSFE']->idParts[1]) {
                                // Creating content card:
-                       $xmlObj->newLevel('card',1,array(
+                       $xmlObj->newLevel('card', 1, array(
                                'id' => 'content',
                                'title' => ($conf['preTitle']?$conf['preTitle'].': ':'').$pageRec['title']
                        ));
@@ -110,7 +113,7 @@ class user_wapversion {
                        $cParts = $this->contentAll();
                        $pointer = t3lib_utility_Math::forceIntegerInRange($GLOBALS['TSFE']->idParts[1], 1, 10000);
 
-                       $msg='';
+                       $msg = '';
                        if ($pointer - 1)       {
                                $msg .= $this->navLink(htmlspecialchars($conf['navLabels.']['prev']), $pointer - 1) . ' ';
                        }
@@ -118,7 +121,7 @@ class user_wapversion {
                        if ($pointer < count($cParts)) {
                                $msg .= $this->navLink(htmlspecialchars($conf['navLabels.']['next']), $pointer + 1) . ' ';
                        }
-                       $msg.= '['.$pointer.'/'.count($cParts).']<br/>';
+                       $msg .= '['.$pointer.'/'.count($cParts).']<br/>';
 
                        $xmlObj->lines[] = $this->paragraph($msg);
                        $xmlObj->lines[] = $this->paragraph($cParts[$pointer-1]);
@@ -127,7 +130,7 @@ class user_wapversion {
                        $xmlObj->newLevel('card', 0);
                } else {
                                // Creating menu card:
-                       $xmlObj->newLevel('card',1,array(
+                       $xmlObj->newLevel('card', 1, array(
                                'id' => 'menu',
                                'title' => ($conf['preTitle']?$conf['preTitle'].': ':'').$pageRec['title']
                        ));
@@ -140,13 +143,12 @@ class user_wapversion {
                        // Footer
                $xmlObj->renderFooter();
                return $xmlObj->getResult();
-
        }
 
        /**
         * Getting abstract of the first content elements header and bodytext for the menu
         *
-        * @return      string          WML string
+        * @return string WML string
         */
        function contentAbstract() {
                $res = $this->getContentResult('tt_content');
@@ -161,22 +163,22 @@ class user_wapversion {
         * Returns all page content, but in an array where the content is divided into chunks or a max length (for WAP clients with limited memory capabilities)
         * Content is then displayed using the pointer value found in $GLOBALS['TSFE']->idParts[1], see main_wapversion()
         *
-        * @param       integer         Max length of each content chunk
-        * @return      array           Array with the page content divided into chucks WML code (default length equals $chunkLgd; 850)
+        * @param integer $chunkLgd Max length of each content chunk
+        * @return array Array with the page content divided into chucks WML code (default length equals $chunkLgd; 850)
         * @see main_wapversion()
         */
-       function contentAll($chunkLgd=850) {
+       function contentAll($chunkLgd = 850) {
                $res = $this->getContentResult('tt_content');
-               $overlap=5;
-               $idx=0;
-               $out=array();
-               while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+               $overlap = 5;
+               $idx = 0;
+               $out = array();
+               while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                // Header:
                        $get = '<br/>'.$this->cHeader($row['header']).'<br/>';
                        if (strlen($out[$idx].$get)>$chunkLgd) {
                                $idx++;
                        }
-                       $out[$idx].=$get;
+                       $out[$idx] .= $get;
 
                        switch($row['CType']) {
                                case 'text':
@@ -202,11 +204,11 @@ class user_wapversion {
                        $diff = $chunkLgd - strlen($out[$idx]);
 
                        if ($diff>strlen($get)) {
-                               $out[$idx].=$get;
+                               $out[$idx] .= $get;
                        } else {
                                $out[$idx] .= $this->cBodytext($bodyText, 0, $diff + $overlap) . '<br/>';
 
-                               $safe=0;
+                               $safe = 0;
                                do {
                                        $idx++;
                                        $out[$idx] .= $this->cBodytext($bodyText, $diff + ($safe * $chunkLgd) - $overlap, $chunkLgd + $overlap) . '<br/>';
@@ -221,8 +223,8 @@ class user_wapversion {
        /**
         * Formats the header for a content element
         *
-        * @param       string          Header value to format
-        * @return      string          Returns the formatted version, stripped from tags and htmlspecialchar()'ed
+        * @param string $str Header value to format
+        * @return string Returns the formatted version, stripped from tags and htmlspecialchar()'ed
         * @see contentAll()
         */
        function cHeader($str) {
@@ -233,10 +235,10 @@ class user_wapversion {
        /**
         * Formats the bodytext for a content element
         *
-        * @param       string          The bodytext content
-        * @param       integer         Position where to start in the bodytext stream. If larger than zero a prefix, "...", is prepended.
-        * @param       integer         Max length
-        * @return      string          Prepared content
+        * @param string $str The bodytext content
+        * @param integer $start Position where to start in the bodytext stream. If larger than zero a prefix, "...", is prepended.
+        * @param integer $max Max length
+        * @return string Prepared content
         * @see contentAll()
         */
        function cBodytext($str, $start = 0, $max = 0) {
@@ -249,8 +251,8 @@ class user_wapversion {
        /**
         * Local version of ml2br(). Replaces linebreaks with <br/> tags.
         *
-        * @param       string          The input string to process
-        * @return      string          The processed value returned.
+        * @param string $str The input string to process
+        * @return string The processed value returned.
         */
        function nl2br($str) {
                return str_replace(chr(10), '<br/>', $str);
@@ -260,8 +262,8 @@ class user_wapversion {
         * Selects all records from $table having the current page id as PID (records belonging to that page)
         * Used to select content elements from "tt_content"
         *
-        * @param       string          A tablename found in $GLOBALS['TCA']
-        * @return      pointer         A database resource pointer
+        * @param string $table A tablename found in $GLOBALS['TCA']
+        * @return pointer A database resource pointer
         */
        function getContentResult($table) {
                if ($GLOBALS['TCA'][$table]) {
@@ -276,8 +278,8 @@ class user_wapversion {
        /**
         * Simulates bold type - basically setting it in uppercase
         *
-        * @param       string          The string for format in "bold" (uppercase)
-        * @return      string          Processed output.
+        * @param string $str The string for format in "bold" (uppercase)
+        * @return string Processed output.
         */
        function bold($str) {
                return strtoupper($str);
@@ -286,29 +288,29 @@ class user_wapversion {
        /**
         * Wraps a string in <p>...</p> tags
         *
-        * @param       string          The input string
-        * @return      string          The wrapped string
+        * @param string $str The input string
+        * @return string The wrapped string
         */
        function paragraph($str) {
-               return '<p>'.$str.'</p>';
+               return '<p>' . $str . '</p>';
        }
 
        /**
         * Adds a linebreak character to the end of $str
         *
-        * @param       string          The string/line
-        * @return      string          The input string with '<br/>' prepended
+        * @param string $str The string/line
+        * @return string The input string with '<br/>' prepended
         */
        function line($str) {
-               return $str.'<br/>';
+               return $str . '<br/>';
        }
 
        /**
         * Creates a navigation link to the next part of the page content!
         *
-        * @param       string          The link text
-        * @param       integer         The pointer value
-        * @return      string          The input string, linked with the pointer value to the current page.
+        * @param string $str The link text
+        * @param integer $pointer The pointer value
+        * @return string The input string, linked with the pointer value to the current page.
         */
        function navLink($str, $pointer) {
                return '<a href="'.htmlspecialchars('?id='.$GLOBALS['TSFE']->id.','.$pointer.'.'.$GLOBALS['TSFE']->type).'">'.$str.'</a>';
@@ -317,8 +319,8 @@ class user_wapversion {
        /**
         * Creates a menu for the current pagelevel. Navigation is both a path-menu (rootline) and a menu of current page subpages.
         *
-        * @param       string          Indentation prefix string per menu item.
-        * @return      string          A paragraph with the menu items inside.
+        * @param string $indent Indentation prefix string per menu item.
+        * @return string A paragraph with the menu items inside.
         */
        function menuCurrentLevel($indent) {
                $rL = $GLOBALS['TSFE']->config['rootLine'];
@@ -329,8 +331,8 @@ class user_wapversion {
                        $preSign = count($rL)-1 > $level ? '-' : '>';
                        $menuItem = htmlspecialchars($preSign.' '.$data['title']);
                        $menuItem = $this->link($preSpace . $menuItem, $data['uid']);
-                       $out[]=$indent.$this->line($menuItem);
-                       $preSpace.='..';
+                       $out[] = $indent.$this->line($menuItem);
+                       $preSpace .= '..';
                }
                        // Current page menu:
                $menu = $this->cleanMenuArray($GLOBALS['TSFE']->sys_page->getMenu($GLOBALS['TSFE']->id));
@@ -338,7 +340,7 @@ class user_wapversion {
                        $preSign = count($this->cleanMenuArray($GLOBALS['TSFE']->sys_page->getMenu($data['uid']))) ? '+' : '*';
                        $menuItem = htmlspecialchars($preSign.' '.$data['title']);
                        $menuItem = $this->link($preSpace . $menuItem, $data['uid']);
-                       $out[]=$indent.$this->line($menuItem);
+                       $out[] = $indent.$this->line($menuItem);
                }
                return $this->paragraph(implode(chr(10), $out));
        }
@@ -347,10 +349,10 @@ class user_wapversion {
         * Creates a link around the input string to another page/deck
         * Used to create menus
         *
-        * @param       string          The string to be wrapped in <a> tags
-        * @param       integer         The page id to link to
-        * @param       string          The deck name, if any
-        * @return      string          String wrapped in <a> tags
+        * @param string $str The string to be wrapped in <a> tags
+        * @param integer $id The page id to link to
+        * @param string $deck The deck name, if any
+        * @return string String wrapped in <a> tags
         * @see menuCurrentLevel()
         */
        function link($str, $id, $deck = '') {
@@ -367,22 +369,21 @@ class user_wapversion {
         * Cleaning up the menu array returned from sys_page->getMenu().
         * Removing pages having "not in menu" set.
         *
-        * @param       array           Menu item array
-        * @return      array           New menu item array with "not in menu" elements removed.
+        * @param array $menu Menu item array
+        * @return array New menu item array with "not in menu" elements removed.
         */
        function cleanMenuArray($menu) {
                reset($menu);
                $newMenu=array();
-               while(list(, $data) = each($menu)) {
+               while (list(, $data) = each($menu)) {
                        if (!$data['nav_hide']) {
-                               $newMenu[]=$data;
+                               $newMenu[] = $data;
                        }
                }
                return $newMenu;
        }
 }
 
-
 // AND HERE just some debugging content: Basically a valid WML deck.
 
                /*
@@ -424,12 +425,8 @@ switch($id) {
 }
 */
 
-
-
-
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['media/scripts/wapversionLib.inc'])) {
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['media/scripts/wapversionLib.inc']);
 }
 
-
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/cms/tslib/media/scripts/xmenu_layers.diff b/typo3/sysext/cms/tslib/media/scripts/xmenu_layers.diff
deleted file mode 100755 (executable)
index e1c5716..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-# The files gmenu_layers and tmenu_layers should be exactly the same except
-# these differences:
---- gmenu_layers.php   2006-07-04 19:44:39.000000000 +0200
-+++ tmenu_layers.php   2006-07-04 19:44:39.000000000 +0200
-@@ -25,5 +25,5 @@
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
- /**
-- * Contains the GMENU_LAYERS extension class, tslib_gmenu_layers
-+ * Contains the TMENU_LAYERS extension class, tslib_tmenu_layers
-  *
-@@ -38,7 +38,7 @@
-  *
-  *
-  *
-- *   84: class tslib_gmenu_layers extends tslib_gmenu
-+ *   84: class tslib_tmenu_layers extends tslib_tmenu
-  *  116:     function extProc_init()
-  *  134:     function extProc_RO($key)
-  *  150:     function extProc_beforeLinking($key)
-@@ -72,8 +72,8 @@
- /**
-- * Class extending tslib_gmenu for the creation of DHTML menus
-- * NOTICE: The contents of this class is made so that it can be copied EXACTLY AS IS to the tmenu_layers class! See notes in class (for BEGIN/END) and also "diff.xmenu_layers.txt"
-+ * Class extending tslib_tmenu for the creation of text based DHTML menus
-+ * NOTICE: The contents of this class is copied EXACTLY AS IS from gmenu_layers class! See notes in class (for BEGIN/END) and also 'diff.xmenu_layers.txt'
-  *
-  * @author    Kasper Skaarhoj <kasperYYYY@typo3.com>
-  * @package TYPO3
-@@ -81,9 +81,9 @@
-  * @link http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=385&cHash=648519dd66
-  * @see diff.xmenu_layers.txt
-  */
--class tslib_gmenu_layers extends tslib_gmenu {
-+class tslib_tmenu_layers extends tslib_tmenu {
--// FULL DUPLICATE TO tmenu_layers BEGIN:
-+// FULL DUPLICATE FROM gmenu_layers BEGIN:
-       var $GMENU_fixKey='layers';
-       var $divLayers=Array();
-@@ -460,13 +460,13 @@
-       }
- }
--// FULL DUPLICATE TO tmenu_layers END:
-+// FULL DUPLICATE FROM gmenu_layers END:
--$GLOBALS['TSFE']->tmpl->menuclasses.=',gmenu_layers';
-+$GLOBALS['TSFE']->tmpl->menuclasses.=',tmenu_layers';
--if (defined('TYPO3_MODE') && $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['media/scripts/gmenu_layers.php'])     {
--      include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['media/scripts/gmenu_layers.php']);
-+if (defined('TYPO3_MODE') && $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['media/scripts/tmenu_layers.php'])     {
-+      include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['media/scripts/tmenu_layers.php']);
- }
- ?>
index 0f6420d..98ee721 100644 (file)
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
+
 /**
  * Example class showing how one could make XML export of page content elements in TYPO3
  *
  * Revised for TYPO3 3.6 June/2003 by Kasper Skårhøj
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
+
 /**
  * Class that creates the current page and content element records as an XML structure using the library "t3lib_xml"
  * It is demonstrated in use in the testsite package on page "59"
  *
  * @package TYPO3
  * @subpackage tslib
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 class user_xmlversion {
-       var $cObj;              // The backReference to the mother cObj object set at call time
+               // The backReference to the mother cObj object set at call time
+       var $cObj;
 
 
        /**
         * Main function, called from TypoScript
         *
-        * @param       string          Empty, ignore.
-        * @param       array           TypoScript properties for this content object/function call
-        * @return      string          XML content
+        * @param string $content Empty, ignore.
+        * @param array $conf TypoScript properties for this content object/function call
+        * @return string XML content
         */
        function main_xmlversion($content, $conf) {
                $xmlObj = t3lib_div::makeInstance('t3lib_xml', 'typo3_page');
-               $xmlObj->XMLdebug=0;
+               $xmlObj->XMLdebug = 0;
                $xmlObj->setRecFields('pages', 'doktype,title,alias,hidden,starttime,endtime,fe_group,url,target,no_cache,shortcut,keywords,description,abstract,author,author_email,newUntil,lastUpdated,cache_timeout');
                $xmlObj->setRecFields('tt_content', 'CType,header,header_link,bodytext,image,imagewidth,imageorient,media,records,colPos,starttime,endtime,fe_group');
 
@@ -95,8 +98,8 @@ class user_xmlversion {
        /**
         * Selects all records from $table having the current page id as PID (records belonging to that page)
         *
-        * @param       string          A tablename found in $GLOBALS['TCA']
-        * @return      pointer         A database resource pointer
+        * @param string $table A tablename found in $GLOBALS['TCA']
+        * @return pointer A database resource pointer
         */
        function getContentResult($table) {
                if ($GLOBALS['TCA'][$table]) {
@@ -109,8 +112,6 @@ class user_xmlversion {
        }
 }
 
-
-
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['media/scripts/xmlversionLib.inc'])) {
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['media/scripts/xmlversionLib.inc']);
 }