Added $Id$ keywords, cleaned up comment tags
authorKasper Skårhøj <kasper@typo3.org>
Sun, 26 Oct 2003 17:07:44 +0000 (17:07 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Sun, 26 Oct 2003 17:07:44 +0000 (17:07 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@48 709f56b5-9817-0410-a4d7-c38de5d9e867

228 files changed:
misc/superadmin.php
t3lib/class.gzip_encode.php
t3lib/class.t3lib_admin.php
t3lib/class.t3lib_arraybrowser.php
t3lib/class.t3lib_basicfilefunc.php
t3lib/class.t3lib_bedisplaylog.php
t3lib/class.t3lib_befunc.php
t3lib/class.t3lib_beuserauth.php
t3lib/class.t3lib_browsetree.php
t3lib/class.t3lib_clipboard.php
t3lib/class.t3lib_cs.php
t3lib/class.t3lib_diff.php
t3lib/class.t3lib_div.php
t3lib/class.t3lib_dmailer.php
t3lib/class.t3lib_exec.php
t3lib/class.t3lib_extfilefunc.php
t3lib/class.t3lib_extmgm.php
t3lib/class.t3lib_extobjbase.php
t3lib/class.t3lib_foldertree.php
t3lib/class.t3lib_formmail.php
t3lib/class.t3lib_fullsearch.php
t3lib/class.t3lib_htmlmail.php
t3lib/class.t3lib_iconworks.php
t3lib/class.t3lib_install.php
t3lib/class.t3lib_loaddbgroup.php
t3lib/class.t3lib_loadmodules.php
t3lib/class.t3lib_matchcondition.php
t3lib/class.t3lib_modsettings.php
t3lib/class.t3lib_page.php
t3lib/class.t3lib_pagetree.php
t3lib/class.t3lib_parsehtml.php
t3lib/class.t3lib_parsehtml_proc.php
t3lib/class.t3lib_positionmap.php
t3lib/class.t3lib_querygenerator.php
t3lib/class.t3lib_readmail.php
t3lib/class.t3lib_recordlist.php
t3lib/class.t3lib_scbase.php
t3lib/class.t3lib_stdgraphic.php
t3lib/class.t3lib_superadmin.php
t3lib/class.t3lib_svbase.php
t3lib/class.t3lib_tceforms.php
t3lib/class.t3lib_tcemain.php
t3lib/class.t3lib_timetrack.php
t3lib/class.t3lib_transferdata.php
t3lib/class.t3lib_treeview.php
t3lib/class.t3lib_tsfebeuserauth.php
t3lib/class.t3lib_tsparser.php
t3lib/class.t3lib_tsparser_ext.php
t3lib/class.t3lib_tsstyleconfig.php
t3lib/class.t3lib_tstemplate.php
t3lib/class.t3lib_userauth.php
t3lib/class.t3lib_userauthgroup.php
t3lib/class.t3lib_xml.php
t3lib/config_default.php
t3lib/jsfunc.evalfield.js
t3lib/jsfunc.menu.js
t3lib/jsfunc.updateform.js
t3lib/jsfunc.validateform.js
t3lib/stddb/load_ext_tables.php
t3lib/stddb/tables.php
t3lib/stddb/tables.sql
t3lib/stddb/tbl_be.php
t3lib/thumbs.php
typo3/alt_clickmenu.php
typo3/alt_db_navframe.php
typo3/alt_doc.php
typo3/alt_doc_nodoc.php
typo3/alt_file_navframe.php
typo3/alt_intro.php
typo3/alt_main.php
typo3/alt_menu.php
typo3/alt_menu_sel.php
typo3/alt_mod_frameset.php
typo3/alt_palette.php
typo3/alt_shortcut.php
typo3/alt_toplogo.php
typo3/alt_topmenu_dummy.php
typo3/browse_links.php
typo3/browser.php
typo3/class.alt_menu_functions.inc
typo3/class.db_list.inc
typo3/class.db_list_extra.inc
typo3/class.file_list.inc
typo3/class.show_rechis.inc
typo3/db_list.php
typo3/db_new.php
typo3/dev/dump_template_tables.php
typo3/dev/phpinfo.php
typo3/dummy.php
typo3/file_edit.php
typo3/file_list.php
typo3/file_newfolder.php
typo3/file_rename.php
typo3/file_upload.php
typo3/index.php
typo3/index_re.php
typo3/init.php
typo3/install/index.php
typo3/listframe_loader.php
typo3/login_frameset.php
typo3/logout.php
typo3/move_el.php
typo3/show_item.php
typo3/show_rechis.php
typo3/sysext/cms/doc/TODO.txt
typo3/sysext/cms/ext_emconf.php
typo3/sysext/cms/ext_localconf.php
typo3/sysext/cms/ext_tables.php
typo3/sysext/cms/ext_tables.sql
typo3/sysext/cms/ext_tables_static+adt.sql
typo3/sysext/cms/layout/locallang.php
typo3/sysext/cms/layout/locallang_mod.php
typo3/sysext/cms/locallang_csh_weblayout.php
typo3/sysext/cms/locallang_tca.php
typo3/sysext/cms/locallang_ttc.php
typo3/sysext/cms/tbl_cms.php
typo3/sysext/cms/tbl_tt_content.php
typo3/sysext/cms/tslib/README.txt
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_fetce.php
typo3/sysext/cms/tslib/class.tslib_feuserauth.php
typo3/sysext/cms/tslib/class.tslib_gifbuilder.php
typo3/sysext/cms/tslib/class.tslib_menu.php
typo3/sysext/cms/tslib/class.tslib_pagegen.php
typo3/sysext/cms/tslib/class.tslib_pibase.php
typo3/sysext/cms/tslib/class.tslib_search.php
typo3/sysext/cms/tslib/index_ts.php
typo3/sysext/cms/tslib/media/scripts/defaultstylesheet.css
typo3/sysext/cms/tslib/media/scripts/example_callfunction.php
typo3/sysext/cms/tslib/media/scripts/example_itemArrayProcFunc.php
typo3/sysext/cms/tslib/media/scripts/example_keepRollover.php
typo3/sysext/cms/tslib/media/scripts/example_languageMenu.php
typo3/sysext/cms/tslib/media/scripts/example_typolinkpop.php
typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc
typo3/sysext/cms/tslib/media/scripts/freesite_dummy_page_menu.php
typo3/sysext/cms/tslib/media/scripts/gmenu_foldout.php
typo3/sysext/cms/tslib/media/scripts/gmenu_layers.php
typo3/sysext/cms/tslib/media/scripts/jsfunc.foldout.js
typo3/sysext/cms/tslib/media/scripts/jsfunc.layermenu.js
typo3/sysext/cms/tslib/media/scripts/makeMenu_datedirectory.inc
typo3/sysext/cms/tslib/media/scripts/makeMenu_keywords_updated.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/xmlversionLib.inc
typo3/sysext/cms/tslib/pagegen.php
typo3/sysext/cms/tslib/publish.php
typo3/sysext/cms/tslib/showpic.php
typo3/sysext/cms/web_info/class.tx_cms_webinfo.php
typo3/sysext/cms/web_info/locallang.php
typo3/sysext/lang/ext_emconf.php
typo3/sysext/lang/lang.php
typo3/sysext/lang/locallang_alt_doc.php
typo3/sysext/lang/locallang_alt_intro.php
typo3/sysext/lang/locallang_browse_links.php
typo3/sysext/lang/locallang_core.bg.php
typo3/sysext/lang/locallang_core.br.php
typo3/sysext/lang/locallang_core.ch.php
typo3/sysext/lang/locallang_core.cz.php
typo3/sysext/lang/locallang_core.de.php
typo3/sysext/lang/locallang_core.dk.php
typo3/sysext/lang/locallang_core.es.php
typo3/sysext/lang/locallang_core.et.php
typo3/sysext/lang/locallang_core.eu.php
typo3/sysext/lang/locallang_core.fi.php
typo3/sysext/lang/locallang_core.fr.php
typo3/sysext/lang/locallang_core.gl.php
typo3/sysext/lang/locallang_core.gr.php
typo3/sysext/lang/locallang_core.hk.php
typo3/sysext/lang/locallang_core.hr.php
typo3/sysext/lang/locallang_core.hu.php
typo3/sysext/lang/locallang_core.is.php
typo3/sysext/lang/locallang_core.it.php
typo3/sysext/lang/locallang_core.lt.php
typo3/sysext/lang/locallang_core.nl.php
typo3/sysext/lang/locallang_core.no.php
typo3/sysext/lang/locallang_core.php
typo3/sysext/lang/locallang_core.pl.php
typo3/sysext/lang/locallang_core.pt.php
typo3/sysext/lang/locallang_core.ro.php
typo3/sysext/lang/locallang_core.ru.php
typo3/sysext/lang/locallang_core.se.php
typo3/sysext/lang/locallang_core.si.php
typo3/sysext/lang/locallang_core.sk.php
typo3/sysext/lang/locallang_core.th.php
typo3/sysext/lang/locallang_core.tr.php
typo3/sysext/lang/locallang_csh_be_groups.php
typo3/sysext/lang/locallang_csh_be_users.php
typo3/sysext/lang/locallang_csh_em.php
typo3/sysext/lang/locallang_csh_pages.php
typo3/sysext/lang/locallang_csh_sysfilem.php
typo3/sysext/lang/locallang_general.php
typo3/sysext/lang/locallang_misc.php
typo3/sysext/lang/locallang_mod_doc.php
typo3/sysext/lang/locallang_mod_file.php
typo3/sysext/lang/locallang_mod_file_list.php
typo3/sysext/lang/locallang_mod_help.php
typo3/sysext/lang/locallang_mod_help_about.php
typo3/sysext/lang/locallang_mod_tools.php
typo3/sysext/lang/locallang_mod_tools_em.php
typo3/sysext/lang/locallang_mod_user.php
typo3/sysext/lang/locallang_mod_web.php
typo3/sysext/lang/locallang_mod_web_func.php
typo3/sysext/lang/locallang_mod_web_info.php
typo3/sysext/lang/locallang_mod_web_list.php
typo3/sysext/lang/locallang_mod_web_perm.php
typo3/sysext/lang/locallang_show_rechis.php
typo3/sysext/lang/locallang_tca.php
typo3/sysext/lang/locallang_tsfe.php
typo3/sysext/lang/locallang_view_help.php
typo3/sysext/lang/locallang_wizards.php
typo3/tce_db.php
typo3/tce_file.php
typo3/template.php
typo3/view_help.php
typo3/wizard_add.php
typo3/wizard_colorpicker.php
typo3/wizard_edit.php
typo3/wizard_forms.php
typo3/wizard_list.php
typo3/wizard_rte.php
typo3/wizard_table.php
typo3/wizard_tsconfig.php

index 718270d..3ac387e 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the Typo3 project. The Typo3 project is
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
 /**
- * Super admin configuration and main script
+ * Super admin configuration and main script (sample)
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * $Id$ 
+ *
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  */
-
 /*
-WHAT IS IT:
-This script is intended to provide administrator information and 
-relevant links to multiple Typo3 sites on a webserver.
-LOCATION:
-This script must be located in a directory with the Typo3 source available in typo3_src/
-The script includes the class t3lib/class.t3lib_superadmin.php
-IMPORTANT: 
-This script MUST be secured as it reads out password information an provides direct login links to sites! 
-It's recommended to use the script over a secure connection and to use the strongest webserver http-based authentication, you can.
-Furthermore it's adviced to out-comment the 'die'-line below when you're not using the script.
-
-CONFIGURATION:
-The point is that you configure one or more directories (parent directories) on the webserver to the script.
-The script expects these directories (parents) to contain other directories (childs) exclusively with Typo3 sites in + any number of directories names 'typo3_src*' which will be ignored.
-Every Typo3 site (child) in these parent directories will get listed in the interface. 
-
-For each "parent directory" you enter information like this:
-
-$parentDirs[] = array(
-       "dir"=> "/www/htdocs/typo3/32/", 
-       "url" => "http://192.168.1.4/typo3/32/"
-);
-
-"dir" is the absolute path of the parent directory where the sites are located in subdirs
-"url" is the web-accessible url of the parent directory.
-
-
+ * WHAT IS IT:
+ * This script is intended to provide administrator information and 
+ * relevant links to multiple Typo3 sites on a webserver.
+ *  
+ * LOCATION:
+ * This script must be located in a directory with the Typo3 source available in typo3_src/
+ * The script includes the class t3lib/class.t3lib_superadmin.php
+ *  
+ * IMPORTANT: 
+ * This script MUST be secured as it reads out password information an provides direct login links to sites! 
+ * It's recommended to use the script over a secure connection and to use the strongest webserver http-based authentication, you can.
+ * Furthermore it's adviced to out-comment the 'die'-line below when you're not using the script.
+ * 
+ * CONFIGURATION:
+ * The point is that you configure one or more directories (parent directories) on the webserver to the script.
+ * The script expects these directories (parents) to contain other directories (childs) exclusively with Typo3 sites in + any number of directories names 'typo3_src*' which will be ignored.
+ * Every Typo3 site (child) in these parent directories will get listed in the interface. 
+ * 
+ * For each 'parent directory' you enter information like this:
+ * 
+ * $parentDirs[] = array(
+ *     'dir'=> '/www/htdocs/typo3/32/', 
+ *     'url' => 'http://192.168.1.4/typo3/32/'
+ * );
+ * 
+ * 'dir' is the absolute path of the parent directory where the sites are located in subdirs
+ * 'url' is the web-accessible url of the parent directory.
  */
 
-
 // *****************
 // Security:
 // *****************
-die("Script secured by a die() function. Comment the line if you want to use the script!");
+die('Script secured by a die() function. Comment the line if you want to use the script!');
 
 
 // *****************
 // Including:
 // *****************
-require_once ("./typo3_src/t3lib/class.t3lib_superadmin.php");
+require_once ('./typo3_src/t3lib/class.t3lib_superadmin.php');
+
 
 // *****************
 // Configuration:
@@ -82,12 +80,12 @@ require_once ("./typo3_src/t3lib/class.t3lib_superadmin.php");
 // *****************
 $parentDirs = array();
 $parentDirs[] = array(
-       "dir"=> "/www/htdocs/typo3/commercial_sites/"
-       "url" => "http://123.234.43.212/typo3/commercial_sites/"
+       'dir'=> '/www/htdocs/typo3/commercial_sites/'
+       'url' => 'http://123.234.43.212/typo3/commercial_sites/'
 );
 $parentDirs[] = array(
-       "dir"=> "/www/htdocs/typo3/nonprofit_sites/"
-       "url" => "http://123.234.43.212/typo3/nonprofit_sites/"
+       'dir'=> '/www/htdocs/typo3/nonprofit_sites/'
+       'url' => 'http://123.234.43.212/typo3/nonprofit_sites/'
 );
 
 
@@ -95,9 +93,7 @@ $parentDirs[] = array(
 // *****************
 // Start
 // *****************
-$superadmin = t3lib_div::makeInstance("t3lib_superadmin");
+$superadmin = t3lib_div::makeInstance('t3lib_superadmin');
 $superadmin->init($parentDirs);
 $superadmin->defaultSet();
-
-
 ?>
\ No newline at end of file
index 116f4c7..3b175ff 100755 (executable)
@@ -175,12 +175,12 @@ class gzip_encode {
 
        $gzdata = "\x1f\x8b\x08\x00\x00\x00\x00\x00"; // gzip header
 
-               // By Kasper Skårhøj, start
+               // By Kasper Skaarhoj, start
        if ($outputCompressedSizes)     {
                $contents.=chr(10)."<!-- Compressed, level ".$level.", original size was ".strlen($contents)." bytes. New size is ".strlen(gzcompress($contents, $level))." bytes -->";
                $size = strlen($contents);      // Must set again!
        }
-               // By Kasper Skårhøj, end
+               // By Kasper Skaarhoj, end
 
        $size = strlen($contents);
        $crc = crc32($contents);
index fb77525..9f90858 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
 /** 
  * Contains a class for evaluation of database integrity according to $TCA
  *
- * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
+ * $Id$
+ * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
  * XHTML compliant
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage t3lib
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  *
  *
  *
- *   89: class t3lib_admin 
- *  115:     function genTree($theID, $depthData)      
- *  149:     function lostRecords($pid_list)   
- *  178:     function fixLostRecord($table,$uid)       
- *  196:     function countRecords($pid_list)  
- *  226:     function getGroupFields($mode)    
- *  260:     function getFileFields($uploadfolder)     
- *  283:     function getDBFields($theSearchTable)     
- *  311:     function selectNonEmptyRecordsWithFkeys($fkey_arrays)     
- *  386:     function testFileRefs ()  
- *  437:     function testDBRefs($theArray)    
- *  476:     function whereIsRecordReferenced($searchTable,$id)        
- *  510:     function whereIsFileReferenced($uploadfolder,$filename)   
+ *   90: class t3lib_admin 
+ *  116:     function genTree($theID, $depthData)      
+ *  150:     function lostRecords($pid_list)   
+ *  179:     function fixLostRecord($table,$uid)       
+ *  197:     function countRecords($pid_list)  
+ *  227:     function getGroupFields($mode)    
+ *  261:     function getFileFields($uploadfolder)     
+ *  284:     function getDBFields($theSearchTable)     
+ *  312:     function selectNonEmptyRecordsWithFkeys($fkey_arrays)     
+ *  387:     function testFileRefs ()  
+ *  438:     function testDBRefs($theArray)    
+ *  477:     function whereIsRecordReferenced($searchTable,$id)        
+ *  511:     function whereIsFileReferenced($uploadfolder,$filename)   
  *
  * TOTAL FUNCTIONS: 12
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -84,7 +83,9 @@
  * 
  * @todo       Need to really extend this class when the tcemain library has been updated and the whole API is better defined. There are some known bugs in this library. Further it would be nice with a facility to not only analyze but also clean up!
  * @see SC_mod_tools_dbint_index::func_relations(), SC_mod_tools_dbint_index::func_records()
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage t3lib
  */
 class t3lib_admin {
        var $genTree_includeDeleted = 1;        // if set, genTree() includes deleted pages. This is default.
index f80071b..9de8252 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
 /** 
  * Class for displaying an array as a tree
  *
- * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
+ * $Id$
+ * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
  * XHTML compliant
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage t3lib
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  *
  *
  *
- *   74: class t3lib_arrayBrowser      
- *   90:     function tree($arr, $depth_in, $depthData)        
- *  153:     function getSearchKeys($keyArr, $depth_in, $searchString, $keyArray)              
- *  185:     function fixed_lgd($string,$chars)        
- *  202:     function depthKeys($arr,$settings)        
+ *   75: class t3lib_arrayBrowser      
+ *   91:     function tree($arr, $depth_in, $depthData)        
+ *  154:     function getSearchKeys($keyArr, $depth_in, $searchString, $keyArray)              
+ *  186:     function fixed_lgd($string,$chars)        
+ *  203:     function depthKeys($arr,$settings)        
  *
  * TOTAL FUNCTIONS: 4
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -68,7 +67,9 @@
  * Class for displaying an array as a tree
  * See the extension 'lowlevel' /config (Backend module 'Tools > Configuration')
  * 
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage t3lib
  * @see SC_mod_tools_config_index::main()
  */
 class t3lib_arrayBrowser       {
index e957529..55d9a08 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
 /** 
  * Contains class with basic file management functions
  *
- * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
+ * $Id$
+ * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage t3lib
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  *
  *
  *
- *   79: class t3lib_basicFileFunctions        
+ *   80: class t3lib_basicFileFunctions        
  *
  *              SECTION: Checking functions
- *  131:     function init($mounts, $f_ext)    
- *  148:     function getTotalFileInfo($wholePath)     
- *  168:     function is_allowed($iconkey,$type)       
- *  193:     function checkIfFullAccess($theDest)      
- *  207:     function is_webpath($path)        
- *  227:     function checkIfAllowed($ext, $theDest, $filename='')     
- *  237:     function checkFileNameLen($fileName)      
- *  247:     function is_directory($theDir)    
- *  264:     function isPathValid($theFile)    
- *  279:     function getUniqueName($theFile, $theDest, $dontCheckForUnique=0) 
- *  322:     function checkPathAgainstMounts($thePath) 
- *  340:     function blindPath($thePath)      
- *  356:     function findTempFolder() 
+ *  132:     function init($mounts, $f_ext)    
+ *  149:     function getTotalFileInfo($wholePath)     
+ *  169:     function is_allowed($iconkey,$type)       
+ *  194:     function checkIfFullAccess($theDest)      
+ *  208:     function is_webpath($path)        
+ *  228:     function checkIfAllowed($ext, $theDest, $filename='')     
+ *  238:     function checkFileNameLen($fileName)      
+ *  248:     function is_directory($theDir)    
+ *  265:     function isPathValid($theFile)    
+ *  280:     function getUniqueName($theFile, $theDest, $dontCheckForUnique=0) 
+ *  323:     function checkPathAgainstMounts($thePath) 
+ *  341:     function blindPath($thePath)      
+ *  357:     function findTempFolder() 
  *
  *              SECTION: Cleaning functions
- *  385:     function cleanDirectoryName($theDir)      
- *  395:     function rmDoubleSlash($string)   
- *  405:     function slashPath($path) 
- *  418:     function cleanFileName($fileName) 
- *  429:     function formatSize($sizeInBytes) 
+ *  386:     function cleanDirectoryName($theDir)      
+ *  396:     function rmDoubleSlash($string)   
+ *  406:     function slashPath($path) 
+ *  419:     function cleanFileName($fileName) 
+ *  430:     function formatSize($sizeInBytes) 
  *
  * TOTAL FUNCTIONS: 18
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -73,7 +72,9 @@
 /**
  * Contains functions for management, validation etc of files in TYPO3, using the concepts of web- and ftp-space. Please see the comment for the init() function
  * 
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage t3lib
  * @see t3lib_basicFileFunctions::init()
  */
 class t3lib_basicFileFunctions {
index 9771220..8f75d00 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
 /** 
  * Contains class for display of backend log
  *
- * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
+ * $Id$
+ * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
  * XHTML compliant
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage t3lib
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  *
  *
  *
- *   80: class t3lib_BEDisplayLog 
- *   99:     function initArray()      
- *  116:     function getTimeLabel($code)      
- *  131:     function getUserLabel($code)      
- *  145:     function getTypeLabel($code)      
- *  159:     function getActionLabel($code)    
- *  177:     function getDetails($code,$text,$data,$sys_log_uid=0)     
- *  210:     function reset()  
- *  224:     function getErrorFormatting($sign)        
- *  234:     function formatDetailsForList($row)       
- *  251:     function stripPath($inArr)        
+ *   81: class t3lib_BEDisplayLog 
+ *  100:     function initArray()      
+ *  117:     function getTimeLabel($code)      
+ *  132:     function getUserLabel($code)      
+ *  146:     function getTypeLabel($code)      
+ *  160:     function getActionLabel($code)    
+ *  178:     function getDetails($code,$text,$data,$sys_log_uid=0)     
+ *  211:     function reset()  
+ *  225:     function getErrorFormatting($sign)        
+ *  235:     function formatDetailsForList($row)       
+ *  252:     function stripPath($inArr)        
  *
  * TOTAL FUNCTIONS: 10
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -74,7 +73,9 @@
  * This class holds some functions used to display the sys_log table-content.
  * Used in the status-scripts and the log-module.
  * 
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage t3lib
  * @see tx_belog_webinfo, SC_mod_tools_log_index
  */
 class t3lib_BEDisplayLog {
index 16c5748..dcc25a8 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
  * Eg. to get a page-record 51 do this: 't3lib_BEfunc::getRecord('pages',51)'
  *
  * $Id$
- *
  * Usage counts are based on search 22/2 2003 through whole backend source of typo3/
- * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
+ * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
  * XHTML compliant
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage t3lib
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  *
  *
  *
- *  157: class t3lib_BEfunc    
+ *  158: class t3lib_BEfunc    
  *
  *              SECTION: SQL-related, selecting records, searching
- *  178:     function deleteClause($table)     
- *  202:     function getRecord($table,$uid,$fields='*',$where='')     
- *  227:     function getRecordRaw($table,$where='',$fields='*')       
- *  248:     function getRecordsByField($theTable,$theField,$theValue,$endClause='')   
- *  271:     function searchQuery($searchWords,$fields)        
- *  293:     function listQuery($field,$value) 
- *  308:     function splitTable_Uid($str)     
- *  324:     function getSQLselectableList ($in_list,$tablename,$default_tablename)    
- *  353:     function BEenableFields($table,$inv=0)    
- *  397:     function mm_query($select,$local_table,$mm_table,$foreign_table,$endClause='')    
- *  414:     function DBcompileInsert($table,$fields_values,$slash=1)  
- *  433:     function DBcompileUpdate($table,$where,$fields_values,$slash=1)   
+ *  179:     function deleteClause($table)     
+ *  203:     function getRecord($table,$uid,$fields='*',$where='')     
+ *  228:     function getRecordRaw($table,$where='',$fields='*')       
+ *  249:     function getRecordsByField($theTable,$theField,$theValue,$endClause='')   
+ *  272:     function searchQuery($searchWords,$fields)        
+ *  294:     function listQuery($field,$value) 
+ *  309:     function splitTable_Uid($str)     
+ *  325:     function getSQLselectableList ($in_list,$tablename,$default_tablename)    
+ *  354:     function BEenableFields($table,$inv=0)    
+ *  398:     function mm_query($select,$local_table,$mm_table,$foreign_table,$endClause='')    
+ *  415:     function DBcompileInsert($table,$fields_values,$slash=1)  
+ *  434:     function DBcompileUpdate($table,$where,$fields_values,$slash=1)   
  *
  *              SECTION: Page tree, TCA related
- *  472:     function BEgetRootLine ($uid,$clause='')  
- *  519:     function getRecordPath ($uid,$clause,$titleLimit) 
- *  546:     function getExcludeFields()       
- *  579:     function readPageAccess($id,$perms_clause)        
- *  609:     function getTCAtypes($table,$rec,$useFieldNameAsKey=0)    
- *  655:     function getTCAtypeValue($table,$rec)     
- *  678:     function getSpecConfParts($str)   
- *  703:     function getSpecConfParametersFromArray($pArr)    
- *  728:     function getFlexFormDS($conf,$row,$table) 
+ *  473:     function BEgetRootLine ($uid,$clause='')  
+ *  520:     function getRecordPath($uid,$clause,$titleLimit)  
+ *  547:     function getExcludeFields()       
+ *  580:     function readPageAccess($id,$perms_clause)        
+ *  610:     function getTCAtypes($table,$rec,$useFieldNameAsKey=0)    
+ *  656:     function getTCAtypeValue($table,$rec)     
+ *  679:     function getSpecConfParts($str)   
+ *  704:     function getSpecConfParametersFromArray($pArr)    
+ *  729:     function getFlexFormDS($conf,$row,$table) 
  *
  *              SECTION: Caching related
- *  832:     function storeHash($hash,$data,$ident)    
- *  848:     function getHash($hash,$expTime)  
+ *  833:     function storeHash($hash,$data,$ident)    
+ *  849:     function getHash($hash,$expTime)  
  *
  *              SECTION: TypoScript related
- *  885:     function getPagesTSconfig($id,$rootLine='',$returnPartArray=0)    
- *  936:     function updatePagesTSconfig($id,$pageTS,$TSconfPrefix,$impParams='')     
- *  991:     function implodeTSParams($p,$k='')        
+ *  886:     function getPagesTSconfig($id,$rootLine='',$returnPartArray=0)    
+ *  937:     function updatePagesTSconfig($id,$pageTS,$TSconfPrefix,$impParams='')     
+ *  992:     function implodeTSParams($p,$k='')        
  *
  *              SECTION: Users / Groups related
- * 1029:     function getUserNames($fields='username,usergroup,usergroup_cached_list,uid',$where='')   
- * 1049:     function getGroupNames($fields='title,uid',$where='')     
- * 1068:     function getListGroupNames($fields='title,uid')   
- * 1088:     function blindUserNames($usernames,$groupArray,$excludeBlindedFlag=0)     
- * 1122:     function blindGroupNames($groups,$groupArray,$excludeBlindedFlag=0)       
+ * 1030:     function getUserNames($fields='username,usergroup,usergroup_cached_list,uid',$where='')   
+ * 1050:     function getGroupNames($fields='title,uid',$where='')     
+ * 1069:     function getListGroupNames($fields='title,uid')   
+ * 1089:     function blindUserNames($usernames,$groupArray,$excludeBlindedFlag=0)     
+ * 1123:     function blindGroupNames($groups,$groupArray,$excludeBlindedFlag=0)       
  *
  *              SECTION: Output related
- * 1166:     function daysUntil($tstamp)       
- * 1179:     function date($tstamp)    
- * 1191:     function datetime($value) 
- * 1204:     function time($value)     
- * 1221:     function calcAge ($seconds,$labels)       
- * 1248:     function dateTimeAge($tstamp,$prefix=1,$date='')  
- * 1267:     function titleAttrib($content='',$hsc=0)  
- * 1279:     function titleAltAttrib($content) 
- * 1304:     function thumbCode($row,$table,$field,$backPath,$thumbScript='',$uploaddir='',$abs=0,$tparams='',$size='')        
- * 1373:     function getThumbNail($thumbScript,$theFile,$tparams='',$size='') 
- * 1391:     function titleAttribForPages ($row,$perms_clause='',$includeAttrib=1)     
- * 1446:     function getRecordIconAltText($row,$table='pages')        
- * 1481:     function getLabelFromItemlist($table,$col,$key)   
- * 1508:     function getItemLabel($table,$col,$printAllWrap='')       
- * 1534:     function getRecordTitle($table,$row,$prep=0)      
- * 1570:     function getProcessedValue($table,$col,$value,$fixed_lgd_chars=0,$defaultPassthrough=0)   
- * 1665:     function getProcessedValueExtra($table,$fN,$fV,$fixed_lgd_chars=0)        
- * 1690:     function getFileIcon($ext)        
- * 1705:     function getCommonSelectFields($table,$prefix)    
- * 1732:     function makeConfigForm($configArray,$defaults,$dataPrefix)       
+ * 1167:     function daysUntil($tstamp)       
+ * 1180:     function date($tstamp)    
+ * 1192:     function datetime($value) 
+ * 1205:     function time($value)     
+ * 1222:     function calcAge ($seconds,$labels)       
+ * 1249:     function dateTimeAge($tstamp,$prefix=1,$date='')  
+ * 1268:     function titleAttrib($content='',$hsc=0)  
+ * 1280:     function titleAltAttrib($content) 
+ * 1305:     function thumbCode($row,$table,$field,$backPath,$thumbScript='',$uploaddir='',$abs=0,$tparams='',$size='')        
+ * 1374:     function getThumbNail($thumbScript,$theFile,$tparams='',$size='') 
+ * 1392:     function titleAttribForPages ($row,$perms_clause='',$includeAttrib=1)     
+ * 1447:     function getRecordIconAltText($row,$table='pages')        
+ * 1482:     function getLabelFromItemlist($table,$col,$key)   
+ * 1509:     function getItemLabel($table,$col,$printAllWrap='')       
+ * 1535:     function getRecordTitle($table,$row,$prep=0)      
+ * 1571:     function getProcessedValue($table,$col,$value,$fixed_lgd_chars=0,$defaultPassthrough=0)   
+ * 1666:     function getProcessedValueExtra($table,$fN,$fV,$fixed_lgd_chars=0)        
+ * 1691:     function getFileIcon($ext)        
+ * 1706:     function getCommonSelectFields($table,$prefix)    
+ * 1733:     function makeConfigForm($configArray,$defaults,$dataPrefix)       
  *
  *              SECTION: Backend Modules API functions
- * 1809:     function helpTextIcon($table,$field,$BACK_PATH,$force=0)  
- * 1831:     function helpText($table,$field,$BACK_PATH)       
- * 1852:     function editOnClick($params,$backPath='',$requestUri='') 
- * 1869:     function viewOnClick($id,$backPath='',$rootLine='',$anchor='',$altUrl='') 
- * 1896:     function getModTSconfig($id,$TSref)       
- * 1918:     function getFuncMenu($id,$elementName,$currentValue,$menuItems,$script='',$addparams='')  
- * 1948:     function getFuncCheck($id,$elementName,$currentValue,$script='',$addparams='',$tagParams='')      
- * 1969:     function getFuncInput($id,$elementName,$currentValue,$size=10,$script="",$addparams="")   
- * 1986:     function unsetMenuItems($modTSconfig,$itemArray,$TSref)   
- * 2010:     function getSetUpdateSignal($set='')      
- * 2060:     function getModuleData($MOD_MENU, $CHANGED_SETTINGS, $modName, $type='', $dontValidateList='', $setDefaultList='')        
+ * 1810:     function helpTextIcon($table,$field,$BACK_PATH,$force=0)  
+ * 1832:     function helpText($table,$field,$BACK_PATH)       
+ * 1853:     function editOnClick($params,$backPath='',$requestUri='') 
+ * 1870:     function viewOnClick($id,$backPath='',$rootLine='',$anchor='',$altUrl='') 
+ * 1897:     function getModTSconfig($id,$TSref)       
+ * 1919:     function getFuncMenu($id,$elementName,$currentValue,$menuItems,$script='',$addparams='')  
+ * 1949:     function getFuncCheck($id,$elementName,$currentValue,$script='',$addparams='',$tagParams='')      
+ * 1970:     function getFuncInput($id,$elementName,$currentValue,$size=10,$script="",$addparams="")   
+ * 1987:     function unsetMenuItems($modTSconfig,$itemArray,$TSref)   
+ * 2011:     function getSetUpdateSignal($set='')      
+ * 2061:     function getModuleData($MOD_MENU, $CHANGED_SETTINGS, $modName, $type='', $dontValidateList='', $setDefaultList='')        
  *
  *              SECTION: Core
- * 2137:     function lockRecords($table='',$uid=0,$pid=0)     
- * 2168:     function isRecordLocked($table,$uid)      
- * 2207:     function foreign_table_where_query($fieldValue,$field='',$TSconfig=array(),$prefix='')    
- * 2260:     function getTCEFORM_TSconfig($table,$row) 
- * 2308:     function getTSconfig_pidValue($table,$uid,$pid)   
- * 2337:     function getPidForModTSconfig($table,$uid,$pid)   
- * 2354:     function getTSCpid($table,$uid,$pid)      
- * 2371:     function firstDomainRecord($rootLine)     
- * 2394:     function getDomainStartPage($domain, $path='')    
- * 2427:     function RTEsetup($RTEprop,$table,$field,$type='')        
- * 2448:     function isModuleSetInTBE_MODULES($modName)       
+ * 2138:     function lockRecords($table='',$uid=0,$pid=0)     
+ * 2169:     function isRecordLocked($table,$uid)      
+ * 2208:     function foreign_table_where_query($fieldValue,$field='',$TSconfig=array(),$prefix='')    
+ * 2261:     function getTCEFORM_TSconfig($table,$row) 
+ * 2309:     function getTSconfig_pidValue($table,$uid,$pid)   
+ * 2338:     function getPidForModTSconfig($table,$uid,$pid)   
+ * 2355:     function getTSCpid($table,$uid,$pid)      
+ * 2372:     function firstDomainRecord($rootLine)     
+ * 2395:     function getDomainStartPage($domain, $path='')    
+ * 2428:     function RTEsetup($RTEprop,$table,$field,$type='')        
+ * 2449:     function isModuleSetInTBE_MODULES($modName)       
  *
  *              SECTION: Miscellaneous
- * 2498:     function typo3PrintError ($header,$text,$js='',$head=1)   
- * 2545:     function getPathType_web_nonweb($path)    
- * 2558:     function ADMCMD_previewCmds($pageinfo)    
- * 2581:     function processParams($params)   
- * 2608:     function getListOfBackendModules($name,$perms_clause,$backPath='',$script='index.php')    
+ * 2499:     function typo3PrintError ($header,$text,$js='',$head=1)   
+ * 2546:     function getPathType_web_nonweb($path)    
+ * 2559:     function ADMCMD_previewCmds($pageinfo)    
+ * 2582:     function processParams($params)   
+ * 2609:     function getListOfBackendModules($name,$perms_clause,$backPath='',$script='index.php')    
  *
  * TOTAL FUNCTIONS: 78
  * (This index is automatically created/updated by the extension "extdeveval")
  * Standard functions available for the TYPO3 backend.
  * Don't instantiate - call functions with "t3lib_BEfunc::" prefixed the function name.
  * 
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage t3lib
  */
 class t3lib_BEfunc     {
 
index e690eae..6057a42 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
  * Contains class for TYPO3 backend user authentication
  *
  * $Id$
+ * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
  *
- * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
- *
- * @author     Kasper Skårhøj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage t3lib
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @internal
  */
 /**
  *
  *
  *
- *   74: class t3lib_beUserAuth extends t3lib_userAuthGroup 
- *  148:     function trackBeUser($flag)       
- *  161:     function checkLockToIP()  
- *  181:     function backendCheckLogin()      
- *  206:     function backendSetUC()   
- *  241:     function overrideUC()     
- *  251:     function resetUC()        
- *  264:     function emailAtLogin()   
- *  316:     function veriCode()       
+ *   75: class t3lib_beUserAuth extends t3lib_userAuthGroup 
+ *  149:     function trackBeUser($flag)       
+ *  162:     function checkLockToIP()  
+ *  182:     function backendCheckLogin()      
+ *  207:     function backendSetUC()   
+ *  242:     function overrideUC()     
+ *  252:     function resetUC()        
+ *  265:     function emailAtLogin()   
+ *  317:     function veriCode()       
  *
  * TOTAL FUNCTIONS: 8
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -71,7 +68,9 @@
  * t3lib_userauthgroup contains most of the functions used for checking permissions, authenticating users, setting up the user etc. This class is most interesting in terms of an API for user from outside.
  * This class contains the configuration of the database fields used plus some functions for the authentication process of backend users.
  * 
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage t3lib
  */
 class t3lib_beUserAuth extends t3lib_userAuthGroup {
        var $session_table = 'be_sessions';             // Table to use for session data.
index a53ccd1..8495936 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
 /** 
- * generate a page-tree. OBS: remember $clause
+ * Generate a page-tree. OBS: remember $clause
  *
  * $Id$
+ * Revised for TYPO3 3.6 August/2003 by Kasper Skaarhoj
+ * Maintained by René Fritz
  *
- * Revised for TYPO3 3.6 August/2003 by Kasper Skårhøj
- *
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @coauthor   René Fritz <r.fritz@colorcube.de>
- * Maintained by René Fritz
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  *
  *
  *
- *   70: class t3lib_browseTree extends t3lib_treeView 
- *   78:     function init($clause='') 
- *  104:     function getTitleAttrib(&$row) 
+ *   74: class t3lib_browseTree extends t3lib_treeView 
+ *   82:     function init($clause='') 
+ *  108:     function getTitleAttrib(&$row) 
  *
  * TOTAL FUNCTIONS: 2
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -66,7 +65,7 @@ require_once (PATH_t3lib.'class.t3lib_treeview.php');
 /**
  * Extension class for the t3lib_treeView class, specially made for browsing pages
  * 
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @coauthor   René Fritz <r.fritz@colorcube.de>
  * @see class t3lib_treeView
  * @package TYPO3
@@ -111,7 +110,6 @@ class t3lib_browseTree extends t3lib_treeView {
        }
 }
 
-
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_browsetree.php'])       {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_browsetree.php']);
 }
index 8e601c3..c30f3d2 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
  * Contains class for TYPO3 clipboard for records and files
  *
  * $Id$
- *
- * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
+ * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
  * XHTML compliant
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage t3lib
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  *
  *
  *
- *   89: class t3lib_clipboard 
- *  125:     function initializeClipboard()    
- *  154:     function lockToNormal()   
- *  171:     function setCmd($cmd)     
- *  218:     function setCurrentPad($padIdent) 
- *  233:     function endClipboard()   
- *  246:     function cleanUpCBC($CBarr,$table,$removeDeselected=0)    
- *  264:     function isElements()     
- *  273:     function printClipboard() 
- *  351:     function printContentFromTab($pad)        
- *  422:     function padTitleWrap($str,$pad)  
- *  439:     function linkItemText($str,$rec,$table='')        
- *  464:     function isSelected($table,$uid)  
- *  478:     function getSelectedRecord($table='',$uid='')     
- *  501:     function selUrlDB($table,$uid,$copy=0,$deselect=0,$baseArray=array())     
- *  517:     function selUrlFile($path,$copy=0,$deselect=0,$baseArray=array()) 
- *  534:     function pasteUrl($table,$uid,$setRedirect=1)     
- *  551:     function deleteUrl($setRedirect=1,$file=0)        
- *  568:     function editUrl()        
- *  589:     function removeUrl($table,$uid)   
- *  599:     function cleanCurrent()   
- *  626:     function elFromTable($matchTable='',$pad='')      
- *  658:     function confirmMsg($table,$rec,$type,$clElements)        
- *  700:     function removeElement($el)       
- *  712:     function saveClipboard()  
- *  722:     function currentMode()    
- *  733:     function clLabel($key,$Akey='labels')     
+ *   90: class t3lib_clipboard 
+ *  126:     function initializeClipboard()    
+ *  155:     function lockToNormal()   
+ *  172:     function setCmd($cmd)     
+ *  219:     function setCurrentPad($padIdent) 
+ *  234:     function endClipboard()   
+ *  247:     function cleanUpCBC($CBarr,$table,$removeDeselected=0)    
+ *  265:     function isElements()     
+ *  274:     function printClipboard() 
+ *  352:     function printContentFromTab($pad)        
+ *  423:     function padTitleWrap($str,$pad)  
+ *  440:     function linkItemText($str,$rec,$table='')        
+ *  465:     function isSelected($table,$uid)  
+ *  479:     function getSelectedRecord($table='',$uid='')     
+ *  502:     function selUrlDB($table,$uid,$copy=0,$deselect=0,$baseArray=array())     
+ *  518:     function selUrlFile($path,$copy=0,$deselect=0,$baseArray=array()) 
+ *  535:     function pasteUrl($table,$uid,$setRedirect=1)     
+ *  552:     function deleteUrl($setRedirect=1,$file=0)        
+ *  569:     function editUrl()        
+ *  590:     function removeUrl($table,$uid)   
+ *  600:     function cleanCurrent()   
+ *  627:     function elFromTable($matchTable='',$pad='')      
+ *  659:     function confirmMsg($table,$rec,$type,$clElements)        
+ *  702:     function removeElement($el)       
+ *  714:     function saveClipboard()  
+ *  724:     function currentMode()    
+ *  735:     function clLabel($key,$Akey='labels')     
  *
  *              SECTION: FOR USE IN tce_db.php:
- *  774:     function makePasteCmdArray($ref,$CMD)     
- *  803:     function makeDeleteCmdArray($CMD) 
+ *  776:     function makePasteCmdArray($ref,$CMD)     
+ *  805:     function makeDeleteCmdArray($CMD) 
  *
  *              SECTION: FOR USE IN tce_file.php:
- *  846:     function makePasteCmdArray_file($ref,$FILE)       
- *  868:     function makeDeleteCmdArray_file($FILE)   
+ *  848:     function makePasteCmdArray_file($ref,$FILE)       
+ *  870:     function makeDeleteCmdArray_file($FILE)   
  *
  * TOTAL FUNCTIONS: 30
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -86,7 +83,9 @@
 /**
  * TYPO3 clipboard for records and files
  * 
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage t3lib
  */
 class t3lib_clipboard {
        var $numberTabs = 3;
index 04a07ed..abda00d 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the Typo3 project. The Typo3 project is 
@@ -26,7 +26,7 @@
  *
  * $Id$
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @author     Martin Kutschker <martin.t.kutschker@blackbox.net>
  */
 /**
  *
  *
  *
- *  102: class t3lib_cs 
- *  194:     function parse_charset($charset)  
- *  211:     function conv($str,$fromCS,$toCS,$useEntityForNoChar=0)   
- *  245:     function utf8_encode($str,$charset)       
- *  286:     function utf8_decode($str,$charset,$useEntityForNoChar=0) 
- *  341:     function utf8_to_entities($str)   
- *  374:     function entities_to_utf8($str,$alsoStdHtmlEnt=0) 
- *  405:     function utf8_to_numberarray($str,$convEntities=0,$retChar=0)     
- *  446:     function initCharset($charset)    
- *  517:     function UnumberToChar($cbyte)    
- *  561:     function utf8CharToUnumber($str,$hex=0)   
- *  590:     function utf8_strtrunc($str,$len) 
- *  612:     function utf_strlen($str) 
- *  625:     function utf_substr($str,$start,$len=0)   
- *  639:     function utf_strpos($haystack,$needle,$offset=0)  
- *  652:     function utf_strrpos($haystack,$needle,$offset=0) 
+ *  104: class t3lib_cs 
+ *  196:     function parse_charset($charset)  
+ *  213:     function conv($str,$fromCS,$toCS,$useEntityForNoChar=0)   
+ *  247:     function utf8_encode($str,$charset)       
+ *  288:     function utf8_decode($str,$charset,$useEntityForNoChar=0) 
+ *  336:     function utf8_to_entities($str)   
+ *  369:     function entities_to_utf8($str,$alsoStdHtmlEnt=0) 
+ *  400:     function utf8_to_numberarray($str,$convEntities=0,$retChar=0)     
+ *  441:     function initCharset($charset)    
+ *  512:     function UnumberToChar($cbyte)    
+ *  556:     function utf8CharToUnumber($str,$hex=0)   
+ *  585:     function utf8_strtrunc($str,$len) 
+ *  624:     function utf_strlen($str) 
+ *  637:     function utf_substr($str,$start,$len=0)   
+ *  651:     function utf_strpos($haystack,$needle,$offset=0)  
+ *  664:     function utf_strrpos($haystack,$needle,$offset=0) 
  *
  * TOTAL FUNCTIONS: 15
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -96,7 +96,7 @@
 /**
  * Class for conversion between charsets.
  * 
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @author     Martin Kutschker <martin.t.kutschker@blackbox.net>
  * @package TYPO3
  * @subpackage t3lib
@@ -597,6 +597,23 @@ class t3lib_cs {
                return substr($str,$len);
        }
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
        // a few stubs of possibly useful functions, which may be impmeneted in PHP
 
        /**
index d57c1e4..c46d411 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
 /** 
- * This class has functions which generates a difference output of a content string
+ * Contains class which has functions that generates a difference output of a content string
  *
  * $Id$
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage t3lib
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ */
+/**
+ * [CLASS/FUNCTION INDEX of SCRIPT]
+ *
+ *
+ *
+ *   65: class t3lib_diff 
+ *   74:     function getDiff($str1,$str2)     
+ *   99:     function explodeStringIntoWords($str)     
+ *  119:     function tagSpace($str,$rev=0)    
+ *  134:     function makeDiffDisplay($str1,$str2)     
+ *  206:     function addClearBuffer($clearBuffer,$last=0)     
+ *
+ * TOTAL FUNCTIONS: 5
+ * (This index is automatically created/updated by the extension "extdeveval")
+ *
  */
 
 
+
+
+
+
+
+/**
+ * This class has functions which generates a difference output of a content string
+ * Currently works only with LINUX/UNIX
+ * 
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage t3lib
+ */
 class t3lib_diff {
        var $stripTags = 0;
        var $clearBufferIdx=0;
        
+       /**
+        * @param       [type]          $str1: ...
+        * @param       [type]          $str2: ...
+        * @return      [type]          ...
+        */
        function getDiff($str1,$str2)   {
-               if (TYPO3_OS!="WIN")    {
+               if (TYPO3_OS!='WIN')    {
                                // Create file 1 and write string
-                       $file1 = tempnam("","");
+                       $file1 = tempnam('','');
                        t3lib_div::writeFile($file1,$str1);
                                // Create file 2 and write string
-                       $file2 = tempnam("","");
+                       $file2 = tempnam('','');
                        t3lib_div::writeFile($file2,$str2);
                                // Perform diff.
-                       $cmd = $GLOBALS["TYPO3_CONF_VARS"]["BE"]["diff_path"]." ".$file1." ".$file2;
+                       $cmd = $GLOBALS['TYPO3_CONF_VARS']['BE']['diff_path'].' '.$file1.' '.$file2;
                        exec($cmd,$res);
        
                        unlink($file1);
@@ -57,25 +89,48 @@ class t3lib_diff {
                        return $res;
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $str: ...
+        * @return      [type]          ...
+        */
        function explodeStringIntoWords($str)   {
                $strArr = t3lib_div::trimExplode(chr(10),$str);
                $outArray=array();
                reset($strArr);
                while(list(,$lineOfWords)=each($strArr))        {
-                       $allWords = t3lib_div::trimExplode(" ",$lineOfWords,1);
+                       $allWords = t3lib_div::trimExplode(' ',$lineOfWords,1);
                        $outArray = array_merge($outArray,$allWords);
-                       $outArray[]="";
-                       $outArray[]="";
+                       $outArray[]='';
+                       $outArray[]='';
                }
                return $outArray;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $str: ...
+        * @param       [type]          $rev: ...
+        * @return      [type]          ...
+        */
        function tagSpace($str,$rev=0)  {
                if ($rev)       {
-                       return str_replace(" &lt;","&lt;",str_replace("&gt; ","&gt;",$str));
+                       return str_replace(' &lt;','&lt;',str_replace('&gt; ','&gt;',$str));
                } else {
-                       return str_replace("<"," <",str_replace(">","> ",$str));
+                       return str_replace('<',' <',str_replace('>','> ',$str));
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $str1: ...
+        * @param       [type]          $str2: ...
+        * @return      [type]          ...
+        */
        function makeDiffDisplay($str1,$str2)   {
                if ($this->stripTags)   {
                        $str1 = strip_tags($str1);
@@ -86,10 +141,9 @@ class t3lib_diff {
                }
                $str1Lines = $this->explodeStringIntoWords($str1);
                $str2Lines = $this->explodeStringIntoWords($str2);
-//             debug($str1Lines);
-//             debug($str2Lines);
+
                $diffRes = $this->getDiff(implode(chr(10),$str1Lines).chr(10),implode(chr(10),$str2Lines).chr(10));
-//debug($diffRes);
+
                if (is_array($diffRes)) {
                        reset($diffRes);
                        $c=0;
@@ -97,66 +151,68 @@ class t3lib_diff {
                        while(list(,$lValue)=each($diffRes))    {
                                if (intval($lValue))    {
                                        $c=intval($lValue);
-                                       $diffResArray[$c]["changeInfo"]=$lValue;
+                                       $diffResArray[$c]['changeInfo']=$lValue;
                                }
-                               if (substr($lValue,0,1)=="<")   {
-                                       $diffResArray[$c]["old"][]=substr($lValue,2);
+                               if (substr($lValue,0,1)=='<')   {
+                                       $diffResArray[$c]['old'][]=substr($lValue,2);
                                }
-                               if (substr($lValue,0,1)==">")   {
-                                       $diffResArray[$c]["new"][]=substr($lValue,2);
+                               if (substr($lValue,0,1)=='>')   {
+                                       $diffResArray[$c]['new'][]=substr($lValue,2);
                                }
                        }
-//                     debug($str1Lines);
-//                     debug($str2Lines);
-//                     debug($diffResArray);
                        
-                       $outString="";
-                       $clearBuffer="";
+                       $outString='';
+                       $clearBuffer='';
                        for ($a=-1;$a<count($str1Lines);$a++)   {
                                if (is_array($diffResArray[$a+1]))      {
-                                       if (strstr($diffResArray[$a+1]["changeInfo"],"a"))      {       // a=Add, c=change, d=delete: If a, then the content is Added after the entry and we must insert the line content as well.
-                                               $clearBuffer.=htmlspecialchars($str1Lines[$a])." ";
+                                       if (strstr($diffResArray[$a+1]['changeInfo'],'a'))      {       // a=Add, c=change, d=delete: If a, then the content is Added after the entry and we must insert the line content as well.
+                                               $clearBuffer.=htmlspecialchars($str1Lines[$a]).' ';
                                        }
 
                                        $outString.=$this->addClearBuffer($clearBuffer);
-                                       $clearBuffer="";
-                                       if (is_array($diffResArray[$a+1]["old"]))       {
-                                               $outString.='<font color=red>'.htmlspecialchars(implode(" ",$diffResArray[$a+1]["old"])).'</font> ';
+                                       $clearBuffer='';
+                                       if (is_array($diffResArray[$a+1]['old']))       {
+                                               $outString.='<font color="red">'.htmlspecialchars(implode(' ',$diffResArray[$a+1]['old'])).'</font> ';
                                        }
-                                       if (is_array($diffResArray[$a+1]["new"]))       {
-                                               $outString.='<font color=green>'.htmlspecialchars(implode(" ",$diffResArray[$a+1]["new"])).'</font> ';
+                                       if (is_array($diffResArray[$a+1]['new']))       {
+                                               $outString.='<font color="green">'.htmlspecialchars(implode(' ',$diffResArray[$a+1]['new'])).'</font> ';
                                        }
-                                       $chInfParts = explode(",",$diffResArray[$a+1]["changeInfo"]);
+                                       $chInfParts = explode(',',$diffResArray[$a+1]['changeInfo']);
                                        if (!strcmp($chInfParts[0],$a+1))       {
                                                $newLine = intval($chInfParts[1])-1;
                                                if ($newLine>$a)        $a=$newLine;    // Security that $a is not set lower than current for some reason...
                                        }
                                } else {
-                                       $clearBuffer.=htmlspecialchars($str1Lines[$a])." ";
+                                       $clearBuffer.=htmlspecialchars($str1Lines[$a]).' ';
                                }
                        }
                        $outString.=$this->addClearBuffer($clearBuffer,1);
                        
-                       $outString = str_replace("  ",chr(10),$outString);
+                       $outString = str_replace('  ',chr(10),$outString);
                        if (!$this->stripTags)  {
                                $outString = $this->tagSpace($outString,1);
                        }
                        return $outString;
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $clearBuffer: ...
+        * @param       [type]          $last: ...
+        * @return      [type]          ...
+        */
        function addClearBuffer($clearBuffer,$last=0)   {
                if (strlen($clearBuffer)>200)   {
-                       $clearBuffer=($this->clearBufferIdx?t3lib_div::fixed_lgd($clearBuffer,70):"")."[".strlen($clearBuffer)."]".(!$last?t3lib_div::fixed_lgd_pre($clearBuffer,70):"");
+                       $clearBuffer=($this->clearBufferIdx?t3lib_div::fixed_lgd($clearBuffer,70):'').'['.strlen($clearBuffer).']'.(!$last?t3lib_div::fixed_lgd_pre($clearBuffer,70):'');
                }
                $this->clearBufferIdx++;
                return $clearBuffer;
        }
 }
 
-
-
-if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["t3lib/class.t3lib_diff.php"])     {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["t3lib/class.t3lib_diff.php"]);
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_diff.php'])     {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_diff.php']);
 }
-
 ?>
\ No newline at end of file
index 96cd9e3..8457bb7 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
 ***************************************************************/
 /**
  * Contains the reknown class "t3lib_div" with general purpose functions
+ *
  * $Id$
- * 
- * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
+ * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
  * XHTML compliant
  * Usage counts are based on search 22/2 2003 through whole source including tslib/
  * 
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  *
  *
  *
- *  192: class t3lib_div 
+ *  194: class t3lib_div 
  *
  *              SECTION: BASIC FUNCTIONS
- *  214:     function milliseconds()   
- *  228:     function setGPvars($list,$strip=0)        
- *  246:     function GPvar($var,$strip=0)     
- *  262:     function GParrayMerged($var)      
- *  278:     function clientInfo($useragent='')        
+ *  216:     function milliseconds()   
+ *  230:     function setGPvars($list,$strip=0)        
+ *  248:     function GPvar($var,$strip=0)     
+ *  264:     function GParrayMerged($var)      
+ *  280:     function clientInfo($useragent='')        
  *
  *              SECTION: IMAGE FUNCTIONS
- *  365:     function gif_compress($theFile, $type)    
- *  393:     function png_to_gif_by_imagemagick($theFile)      
- *  417:     function read_png_gif($theFile,$output_png=0)     
+ *  367:     function gif_compress($theFile, $type)    
+ *  395:     function png_to_gif_by_imagemagick($theFile)      
+ *  419:     function read_png_gif($theFile,$output_png=0)     
  *
  *              SECTION: STRING FUNCTIONS
- *  466:     function fixed_lgd($string,$chars,$preStr='...')  
- *  488:     function fixed_lgd_pre($string,$chars)    
- *  502:     function breakTextForEmail($str,$implChar="\n",$charWidth=76)     
- *  522:     function breakLinesForEmail($str,$implChar="\n",$charWidth=76)
- *  558:     function cmpIP($baseIP, $list)    
- *  589:     function inList($in_list,$item)   
- *  602:     function rmFromList($element,$list)       
- *  621:     function intInRange($theInt,$min,$max=2000000000,$zeroValue=0)    
- *  638:     function intval_positive($theInt) 
- *  652:     function int_from_ver($verNumberStr)      
- *  665:     function md5int($str)     
- *  677:     function uniqueList($in_list)     
- *  690:     function split_fileref($fileref)  
- *  727:     function dirname($path)   
- *  744:     function modifyHTMLColor($color,$R,$G,$B) 
- *  765:     function modifyHTMLColorAll($color,$all)  
- *  777:     function rm_endcomma($string)     
- *  790:     function danish_strtoupper($string)       
- *  804:     function convUmlauts($str)        
- *  819:     function shortMD5($input, $len=10)        
- *  831:     function testInt($var)    
- *  844:     function isFirstPartOfStr($str,$partStr)  
- *  860:     function formatSize($sizeInBytes) 
- *  882:     function convertMicrotime($microtime)     
- *  896:     function splitCalc($string,$operators)    
- *  918:     function calcPriority($string)    
- *  958:     function calcParenthesis($string) 
- *  985:     function htmlspecialchars_decode($value)  
- *  999:     function deHSCentities($str)      
- * 1012:     function slashJS($string,$extended=0,$char="'")   
- * 1026:     function rawUrlEncodeJS($str)     
- * 1038:     function validEmail($email)       
- * 1053:     function formatForTextarea($content)      
+ *  468:     function fixed_lgd($string,$chars,$preStr='...')  
+ *  490:     function fixed_lgd_pre($string,$chars)    
+ *  504:     function breakTextForEmail($str,$implChar="\n",$charWidth=76)     
+ *  524:     function breakLinesForEmail($str,$implChar="\n",$charWidth=76)    
+ *  560:     function cmpIP($baseIP, $list)    
+ *  591:     function inList($in_list,$item)   
+ *  604:     function rmFromList($element,$list)       
+ *  623:     function intInRange($theInt,$min,$max=2000000000,$zeroValue=0)    
+ *  640:     function intval_positive($theInt) 
+ *  654:     function int_from_ver($verNumberStr)      
+ *  667:     function md5int($str)     
+ *  679:     function uniqueList($in_list)     
+ *  692:     function split_fileref($fileref)  
+ *  729:     function dirname($path)   
+ *  746:     function modifyHTMLColor($color,$R,$G,$B) 
+ *  767:     function modifyHTMLColorAll($color,$all)  
+ *  779:     function rm_endcomma($string)     
+ *  792:     function danish_strtoupper($string)       
+ *  806:     function convUmlauts($str)        
+ *  821:     function shortMD5($input, $len=10)        
+ *  833:     function testInt($var)    
+ *  846:     function isFirstPartOfStr($str,$partStr)  
+ *  862:     function formatSize($sizeInBytes) 
+ *  884:     function convertMicrotime($microtime)     
+ *  898:     function splitCalc($string,$operators)    
+ *  920:     function calcPriority($string)    
+ *  960:     function calcParenthesis($string) 
+ *  987:     function htmlspecialchars_decode($value)  
+ * 1001:     function deHSCentities($str)      
+ * 1014:     function slashJS($string,$extended=0,$char="'")   
+ * 1028:     function rawUrlEncodeJS($str)     
+ * 1040:     function validEmail($email)       
+ * 1055:     function formatForTextarea($content)      
  *
  *              SECTION: ARRAY FUNCTIONS
- * 1085:     function inArray($in_array,$item) 
- * 1103:     function intExplode($delim, $string)      
- * 1123:     function revExplode($delim, $string, $count=0)    
- * 1144:     function trimExplode($delim, $string, $onlyNonEmptyValues=0)      
- * 1169:     function uniqueArray($valueArray) 
- * 1192:     function removeArrayEntryByValue($array,$cmpValue)        
- * 1221:     function implodeArrayForUrl($name,$theArray,$str='',$skipBlank=0,$rawurlencodeParamName=0)        
- * 1249:     function compileSelectedGetVarsFromArray($varList,$getArray,$GPvarAlt=1)  
- * 1273:     function addSlashesOnArray(&$theArray)    
- * 1298:     function stripSlashesOnArray(&$theArray)  
- * 1321:     function slashArray($arr,$cmd)    
- * 1338:     function array_merge_recursive_overrule ($arr0,$arr1,$notAddKeys=0) 
- * 1368:     function array_merge($arr1,$arr2) 
- * 1382:     function csvValues($row,$delim=',',$quote='"')    
+ * 1087:     function inArray($in_array,$item) 
+ * 1105:     function intExplode($delim, $string)      
+ * 1125:     function revExplode($delim, $string, $count=0)    
+ * 1146:     function trimExplode($delim, $string, $onlyNonEmptyValues=0)      
+ * 1171:     function uniqueArray($valueArray) 
+ * 1194:     function removeArrayEntryByValue($array,$cmpValue)        
+ * 1223:     function implodeArrayForUrl($name,$theArray,$str='',$skipBlank=0,$rawurlencodeParamName=0)        
+ * 1251:     function compileSelectedGetVarsFromArray($varList,$getArray,$GPvarAlt=1)  
+ * 1275:     function addSlashesOnArray(&$theArray)    
+ * 1300:     function stripSlashesOnArray(&$theArray)  
+ * 1323:     function slashArray($arr,$cmd)    
+ * 1340:     function array_merge_recursive_overrule ($arr0,$arr1,$notAddKeys=0) 
+ * 1370:     function array_merge($arr1,$arr2) 
+ * 1384:     function csvValues($row,$delim=',',$quote='"')    
  *
  *              SECTION: HTML/XML PROCESSING
- * 1425:     function get_tag_attributes($tag) 
- * 1463:     function split_tag_attributes($tag)       
- * 1497:     function implodeParams($arr,$xhtmlSafe=0) 
- * 1522:     function xml2tree($string,$depth=999) 
- * 1605:     function array2xml($array,$NSprefix='',$level=0,$docTag='phparray',$spaceInd=0)   
- * 1663:     function xml2array($string,$NSprefix='') 
- * 1722:     function xmlRecompileFromStructValArray($vals)    
- * 1765:     function xmlGetHeaderAttribs($xmlData)    
+ * 1427:     function get_tag_attributes($tag) 
+ * 1465:     function split_tag_attributes($tag)       
+ * 1499:     function implodeParams($arr,$xhtmlSafe=0) 
+ * 1527:     function wrapJS($string, $linebreak=TRUE) 
+ * 1556:     function xml2tree($string,$depth=999) 
+ * 1639:     function array2xml($array,$NSprefix='',$level=0,$docTag='phparray',$spaceInd=0)   
+ * 1697:     function xml2array($string,$NSprefix='') 
+ * 1756:     function xmlRecompileFromStructValArray($vals)    
+ * 1799:     function xmlGetHeaderAttribs($xmlData)    
  *
  *              SECTION: FILES FUNCTIONS
- * 1797:     function getURL($url)     
- * 1840:     function writeFile($file,$content)        
- * 1858:     function get_dirs($path)  
- * 1884:     function getFilesInDir($path,$extensionList='',$prependPath=0,$order='')  
- * 1929:     function getAllFilesAndFoldersInPath($fileArr,$path,$extList='',$regDirs=0,$recursivityLevels=99) 
- * 1951:     function removePrefixPathFromList($fileArr,$prefixToRemove)       
- * 1970:     function upload_copy_move($source,$destination)   
- * 1988:     function fixWindowsFilePath($theFile)     
- * 1998:     function resolveBackPath($pathStr)        
- * 2026:     function locationHeaderUrl($path) 
+ * 1831:     function getURL($url)     
+ * 1874:     function writeFile($file,$content)        
+ * 1892:     function get_dirs($path)  
+ * 1918:     function getFilesInDir($path,$extensionList='',$prependPath=0,$order='')  
+ * 1963:     function getAllFilesAndFoldersInPath($fileArr,$path,$extList='',$regDirs=0,$recursivityLevels=99) 
+ * 1985:     function removePrefixPathFromList($fileArr,$prefixToRemove)       
+ * 2004:     function upload_copy_move($source,$destination)   
+ * 2022:     function fixWindowsFilePath($theFile)     
+ * 2032:     function resolveBackPath($pathStr)        
+ * 2060:     function locationHeaderUrl($path) 
  *
  *              SECTION: DEBUG helper FUNCTIONS
- * 2066:     function debug_ordvalue($string,$characters=100)  
- * 2083:     function view_array($array_in)    
- * 2110:     function print_array($array_in)   
- * 2126:     function debug($var="",$brOrHeader=0)     
+ * 2100:     function debug_ordvalue($string,$characters=100)  
+ * 2117:     function view_array($array_in)    
+ * 2144:     function print_array($array_in)   
+ * 2160:     function debug($var="",$brOrHeader=0)     
  *
  *              SECTION: SYSTEM INFORMATION
- * 2191:     function getThisUrl()     
- * 2208:     function linkThisScript($getParams=array())       
- * 2230:     function linkThisUrl($url,$getParams=array())     
- * 2250:     function getIndpEnv($getEnvName)  
+ * 2229:     function getThisUrl()     
+ * 2246:     function linkThisScript($getParams=array())       
+ * 2268:     function linkThisUrl($url,$getParams=array())     
+ * 2288:     function getIndpEnv($getEnvName)  
  *
  *              SECTION: TYPO3 SPECIFIC FUNCTIONS
- * 2464:     function getFileAbsFileName($filename,$onlyRelative=1,$relToTYPO3_mainDir=0)      
- * 2499:     function validPathStr($theFile)   
- * 2511:     function isAbsPath($path) 
- * 2523:     function isAllowedAbsPath($path)  
- * 2541:     function verifyFilenameAgainstDenyPattern($filename)      
- * 2558:     function stdAuthCode($uid_or_record,$fields='')   
- * 2592:     function loadTCA($table)  
- * 2611:     function resolveSheetDefInDS($dataStructArray,$sheet='sDEF')      
- * 2639:     function resolveAllSheetsInDS($dataStructArray)   
- * 2667:     function callUserFunction($funcName,&$params,&$ref,$checkPrefix='user_',$silent=0)        
- * 2707:     function makeInstance($className) 
- * 2725:     function makeInstanceService($serviceType, $serviceSubType='', $excludeServiceKeys='')    
- * 2758:     function makeInstanceClassName($className)        
- * 2778:     function plainMailEncoded($email,$subject,$message,$headers='',$enc='',$charset='ISO-8859-1',$dontEncodeSubject=0)        
- * 2825:     function quoted_printable($string,$maxlen=76)     
- * 2867:     function substUrlsInPlainText($message,$urlmode='76',$index_script_url='')        
- * 2902:     function makeRedirectUrl($inUrl,$l=0,$index_script_url='')        
- * 2925:     function freetypeDpiComp($font_size)      
+ * 2502:     function getFileAbsFileName($filename,$onlyRelative=1,$relToTYPO3_mainDir=0)      
+ * 2537:     function validPathStr($theFile)   
+ * 2549:     function isAbsPath($path) 
+ * 2561:     function isAllowedAbsPath($path)  
+ * 2579:     function verifyFilenameAgainstDenyPattern($filename)      
+ * 2596:     function stdAuthCode($uid_or_record,$fields='')   
+ * 2630:     function loadTCA($table)  
+ * 2649:     function resolveSheetDefInDS($dataStructArray,$sheet='sDEF')      
+ * 2677:     function resolveAllSheetsInDS($dataStructArray)   
+ * 2706:     function callUserFunction($funcName,&$params,&$ref,$checkPrefix='user_',$silent=0)        
+ * 2746:     function makeInstance($className) 
+ * 2764:     function makeInstanceService($serviceType, $serviceSubType='', $excludeServiceKeys='')    
+ * 2799:     function makeInstanceClassName($className)        
+ * 2819:     function plainMailEncoded($email,$subject,$message,$headers='',$enc='',$charset='ISO-8859-1',$dontEncodeSubject=0)        
+ * 2866:     function quoted_printable($string,$maxlen=76)     
+ * 2908:     function substUrlsInPlainText($message,$urlmode='76',$index_script_url='')        
+ * 2943:     function makeRedirectUrl($inUrl,$l=0,$index_script_url='')        
+ * 2966:     function freetypeDpiComp($font_size)      
  *
- * TOTAL FUNCTIONS: 99
+ * TOTAL FUNCTIONS: 100
  * (This index is automatically created/updated by the extension "extdeveval")
  *
  */
  * So: Don't instantiate - call functions with "t3lib_div::" prefixed the function name.
  * So use t3lib_div::[method-name] to refer to the functions, eg. 't3lib_div::milliseconds()'
  * 
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @package TYPO3
  * @subpackage t3lib
- * @author     Kasper Skårhøj <kasper@typo3.com>
  */
 class t3lib_div {
 
@@ -1516,10 +1517,10 @@ class t3lib_div {
         * Wraps JavaScript code XHTML ready with <script>-tags
         * Automatic re-identing of the JS code is done by using the first line as ident reference.
         * This is nice for identing JS code with PHP code on the same level.
-        *
-        * @param    string     JavaScript code
-        * @param       boolean         Wrap script element in linebreaks? Default is TRUE.
-        * @return    string    The wrapped JS code, ready to put into a XHTML page
+        * 
+        * @param       string          JavaScript code
+        * @param       boolean         Wrap script element in linebreaks? Default is TRUE.
+        * @return      string          The wrapped JS code, ready to put into a XHTML page
         * @author      Ingmar Schlecht <ingmars@web.de>
         * @author      René Fritz <r.fritz@colorcube.de>
         */
index 6e3048b..9a25dac 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
+/** 
+ * Class, doing the sending of Direct-mails, eg. through a cron-job
+ * Belongs to/See "direct_mail" extension.
+ *
+ * $Id$
+ *
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ */
+/**
+ * [CLASS/FUNCTION INDEX of SCRIPT]
+ *
+ *
+ *
+ *   86: class t3lib_dmailer extends t3lib_htmlmail 
+ *   97:     function dmailer_prepare($row)    
+ *  145:     function dmailer_sendAdvanced($recipRow,$tableNameChar)   
+ *  217:     function dmailer_sendSimple($addressList) 
+ *  239:     function dmailer_getBoundaryParts($cArray,$userCategories)        
+ *  261:     function dmailer_masssend($query_info,$table,$mid)        
+ *  298:     function dmailer_masssend_list($query_info,$mid)  
+ *  360:     function shipOfMail($mid,$recipRow,$tKey) 
+ *  378:     function convertFields($recipRow) 
+ *  393:     function dmailer_setBeginEnd($mid,$key)   
+ *  418:     function dmailer_howManySendMails($mid,$rtbl='')  
+ *  434:     function dmailer_isSend($mid,$rid,$rtbl)  
+ *  447:     function dmailer_getSentMails($mid,$rtbl) 
+ *  467:     function dmailer_addToMailLog($mid,$rid,$size,$parsetime,$html)   
+ *  479:     function runcron()        
+ *
+ * TOTAL FUNCTIONS: 14
+ * (This index is automatically created/updated by the extension "extdeveval")
+ *
+ */
 
 
-/*
-
-SETTING UP a cron job on a UNIX box for distribution:
-
-Write at the shell:
-
-crontab -e
-
-
-Then enter this line follow by a line-break:
-
-* * * * * /www/[path-to-your-typo3-site]/typo3/mod/web/dmail/dmailerd.phpcron
-
-Every minute the cronjob checks if there are mails in the queue. 
-If there are mails, 100 is sent at a time per job.
 
+/**
+ *
+ * SETTING UP a cron job on a UNIX box for distribution:
+ * 
+ * Write at the shell:
+ * 
+ * crontab -e
+ * 
+ * 
+ * Then enter this line follow by a line-break:
+ * 
+ * * * * * /www/[path-to-your-typo3-site]/typo3/mod/web/dmail/dmailerd.phpcron
+ * 
+ * Every minute the cronjob checks if there are mails in the queue. 
+ * If there are mails, 100 is sent at a time per job.
+ */
+/**
+ * Class, doing the sending of Direct-mails, eg. through a cron-job
+ * 
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @package TYPO3
  * @subpackage t3lib
-
-*/
-
-
-
+ */
 class t3lib_dmailer extends t3lib_htmlmail {
        var $sendPerCycle =50;
        var $logArray =array();
@@ -56,125 +90,137 @@ class t3lib_dmailer extends t3lib_htmlmail {
        var $flag_html = 0;
        var $flag_plain = 0;
 
-       
-       function dmailer_prepare($row)  {       // , $params
-#debug($row);
-               $sys_dmail_uid = $row["uid"];
+       /**
+        * @param       [type]          $row: ...
+        * @return      [type]          ...
+        */
+       function dmailer_prepare($row)  {
+               $sys_dmail_uid = $row['uid'];
                $this->useBase64();
-               $this->theParts = unserialize($row["mailContent"]);
-               $this->messageid = $this->theParts["messageid"];
-               $this->subject = $row["subject"];
-               $this->from_email = $row["from_email"];
-               $this->from_name = ($row["from_name"]) ? $row["from_name"] : '';
-               $this->replyto_email = ($row["replyto_email"]) ? $row["replyto_email"] : '';
-               $this->replyto_name = ($row["replyto_name"]) ? $row["replyto_name"] : '';
-               $this->organisation = ($row["organisation"]) ? $row["organisation"] : '';
-               $this->priority = t3lib_div::intInRange($row["priority"],1,5);
-               $this->mailer = "TYPO3 Direct Mail module";
+               $this->theParts = unserialize($row['mailContent']);
+               $this->messageid = $this->theParts['messageid'];
+               $this->subject = $row['subject'];
+               $this->from_email = $row['from_email'];
+               $this->from_name = ($row['from_name']) ? $row['from_name'] : '';
+               $this->replyto_email = ($row['replyto_email']) ? $row['replyto_email'] : '';
+               $this->replyto_name = ($row['replyto_name']) ? $row['replyto_name'] : '';
+               $this->organisation = ($row['organisation']) ? $row['organisation'] : '';
+               $this->priority = t3lib_div::intInRange($row['priority'],1,5);
+               $this->mailer = 'TYPO3 Direct Mail module';
 
-               $this->dmailer["sectionBoundary"] = "<!--DMAILER_SECTION_BOUNDARY";
-               $this->dmailer["html_content"] = base64_decode($this->theParts["html"]["content"]);
-               $this->dmailer["plain_content"] = base64_decode($this->theParts["plain"]["content"]);
-               $this->dmailer["messageID"] = $this->messageid;
-               $this->dmailer["sys_dmail_uid"] = $sys_dmail_uid;
-               $this->dmailer["sys_dmail_rec"] = $row;
-//             $this->dmailer["params"] = $params;
+               $this->dmailer['sectionBoundary'] = '<!--DMAILER_SECTION_BOUNDARY';
+               $this->dmailer['html_content'] = base64_decode($this->theParts['html']['content']);
+               $this->dmailer['plain_content'] = base64_decode($this->theParts['plain']['content']);
+               $this->dmailer['messageID'] = $this->messageid;
+               $this->dmailer['sys_dmail_uid'] = $sys_dmail_uid;
+               $this->dmailer['sys_dmail_rec'] = $row;
        
-               $this->dmailer["boundaryParts_html"] = explode($this->dmailer["sectionBoundary"], "_END-->".$this->dmailer["html_content"]);
-               while(list($bKey,$bContent)=each($this->dmailer["boundaryParts_html"])) {
-                       $this->dmailer["boundaryParts_html"][$bKey] = explode("-->",$bContent,2);
+               $this->dmailer['boundaryParts_html'] = explode($this->dmailer['sectionBoundary'], '_END-->'.$this->dmailer['html_content']);
+               while(list($bKey,$bContent)=each($this->dmailer['boundaryParts_html'])) {
+                       $this->dmailer['boundaryParts_html'][$bKey] = explode('-->',$bContent,2);
                                // Now, analyzing which media files are used in this part of the mail:
-                       $mediaParts = explode("cid:part",$this->dmailer["boundaryParts_html"][$bKey][1]);
+                       $mediaParts = explode('cid:part',$this->dmailer['boundaryParts_html'][$bKey][1]);
                        reset($mediaParts);
                        next($mediaParts);
                        while(list(,$part)=each($mediaParts))   {
-                               $this->dmailer["boundaryParts_html"][$bKey]["mediaList"].=",".strtok($part,".");
+                               $this->dmailer['boundaryParts_html'][$bKey]['mediaList'].=','.strtok($part,'.');
                        }
                }
-               $this->dmailer["boundaryParts_plain"] = explode($this->dmailer["sectionBoundary"], "_END-->".$this->dmailer["plain_content"]);
-               while(list($bKey,$bContent)=each($this->dmailer["boundaryParts_plain"]))        {
-                       $this->dmailer["boundaryParts_plain"][$bKey] = explode("-->",$bContent,2);
+               $this->dmailer['boundaryParts_plain'] = explode($this->dmailer['sectionBoundary'], '_END-->'.$this->dmailer['plain_content']);
+               while(list($bKey,$bContent)=each($this->dmailer['boundaryParts_plain']))        {
+                       $this->dmailer['boundaryParts_plain'][$bKey] = explode('-->',$bContent,2);
                }
                
-               $this->flag_html = $this->theParts["html"]["content"] ? 1 : 0;
-               $this->flag_plain = $this->theParts["plain"]["content"] ? 1 : 0;
+               $this->flag_html = $this->theParts['html']['content'] ? 1 : 0;
+               $this->flag_plain = $this->theParts['plain']['content'] ? 1 : 0;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $recipRow: ...
+        * @param       [type]          $tableNameChar: ...
+        * @return      [type]          ...
+        */
        function dmailer_sendAdvanced($recipRow,$tableNameChar) {
                $returnCode=0;
-               if ($recipRow["email"]) {
-                       $midRidId = "MID".$this->dmailer["sys_dmail_uid"]."_".$tableNameChar.$recipRow["uid"];
-                       $uniqMsgId = md5(microtime())."_".$midRidId;
-                       $rowFieldsArray = explode(",", "uid,name,title,email,phone,www,address,company,city,zip,country,fax,firstname");
-                       $uppercaseFieldsArray = explode(",", "name,firstname");
-                       $authCode = t3lib_div::stdAuthCode($recipRow["uid"]);
-                       $this->mediaList="";
-                       if ($this->flag_html && $recipRow["module_sys_dmail_html"])             {
-                               $tempContent_HTML = $this->dmailer_getBoundaryParts($this->dmailer["boundaryParts_html"],$recipRow["module_sys_dmail_category"]);
+               if ($recipRow['email']) {
+                       $midRidId = 'MID'.$this->dmailer['sys_dmail_uid'].'_'.$tableNameChar.$recipRow['uid'];
+                       $uniqMsgId = md5(microtime()).'_'.$midRidId;
+                       $rowFieldsArray = explode(',', 'uid,name,title,email,phone,www,address,company,city,zip,country,fax,firstname');
+                       $uppercaseFieldsArray = explode(',', 'name,firstname');
+                       $authCode = t3lib_div::stdAuthCode($recipRow['uid']);
+                       $this->mediaList='';
+                       if ($this->flag_html && $recipRow['module_sys_dmail_html'])             {
+                               $tempContent_HTML = $this->dmailer_getBoundaryParts($this->dmailer['boundaryParts_html'],$recipRow['module_sys_dmail_category']);
                                reset($rowFieldsArray);
                                while(list(,$substField)=each($rowFieldsArray)) {
-                                       $tempContent_HTML = str_replace("###USER_".$substField."###", $recipRow[$substField], $tempContent_HTML);
+                                       $tempContent_HTML = str_replace('###USER_'.$substField.'###', $recipRow[$substField], $tempContent_HTML);
                                }
                                reset($uppercaseFieldsArray);
                                while(list(,$substField)=each($uppercaseFieldsArray))   {
-                                       $tempContent_HTML = str_replace("###USER_".strtoupper($substField)."###", strtoupper($recipRow[$substField]), $tempContent_HTML);
+                                       $tempContent_HTML = str_replace('###USER_'.strtoupper($substField).'###', strtoupper($recipRow[$substField]), $tempContent_HTML);
                                }
-                               $tempContent_HTML = str_replace("###SYS_TABLE_NAME###", $tableNameChar, $tempContent_HTML);     // Put in the tablename of the userinformation
-                               $tempContent_HTML = str_replace("###SYS_MAIL_ID###", $this->dmailer["sys_dmail_uid"], $tempContent_HTML);       // Put in the uid of the mail-record
-                               $tempContent_HTML = str_replace("###SYS_AUTHCODE###", $authCode, $tempContent_HTML);
-                               $tempContent_HTML = str_replace($this->dmailer["messageID"], $uniqMsgId, $tempContent_HTML);    // Put in the unique message id in HTML-code
-                               $this->theParts["html"]["content"] = $this->encodeMsg($tempContent_HTML);
+                               $tempContent_HTML = str_replace('###SYS_TABLE_NAME###', $tableNameChar, $tempContent_HTML);     // Put in the tablename of the userinformation
+                               $tempContent_HTML = str_replace('###SYS_MAIL_ID###', $this->dmailer['sys_dmail_uid'], $tempContent_HTML);       // Put in the uid of the mail-record
+                               $tempContent_HTML = str_replace('###SYS_AUTHCODE###', $authCode, $tempContent_HTML);
+                               $tempContent_HTML = str_replace($this->dmailer['messageID'], $uniqMsgId, $tempContent_HTML);    // Put in the unique message id in HTML-code
+                               $this->theParts['html']['content'] = $this->encodeMsg($tempContent_HTML);
                                $returnCode|=1;
-                       } else $this->theParts["html"]["content"] = "";
+                       } else $this->theParts['html']['content'] = '';
        
                                // Plain
                        if ($this->flag_plain)          {
-                               $tempContent_Plain = $this->dmailer_getBoundaryParts($this->dmailer["boundaryParts_plain"],$recipRow["module_sys_dmail_category"]);
+                               $tempContent_Plain = $this->dmailer_getBoundaryParts($this->dmailer['boundaryParts_plain'],$recipRow['module_sys_dmail_category']);
                                reset($rowFieldsArray);
                                while(list(,$substField)=each($rowFieldsArray)) {
-                                       $tempContent_Plain = str_replace("###USER_".$substField."###", $recipRow[$substField], $tempContent_Plain);
+                                       $tempContent_Plain = str_replace('###USER_'.$substField.'###', $recipRow[$substField], $tempContent_Plain);
                                }
                                reset($uppercaseFieldsArray);
                                while(list(,$substField)=each($uppercaseFieldsArray))   {
-                                       $tempContent_Plain = str_replace("###USER_".strtoupper($substField)."###", strtoupper($recipRow[$substField]), $tempContent_Plain);
+                                       $tempContent_Plain = str_replace('###USER_'.strtoupper($substField).'###', strtoupper($recipRow[$substField]), $tempContent_Plain);
                                }
-                               $tempContent_Plain = str_replace("###SYS_TABLE_NAME###", $tableNameChar, $tempContent_Plain);   // Put in the tablename of the userinformation
-                               $tempContent_Plain = str_replace("###SYS_MAIL_ID###", $this->dmailer["sys_dmail_uid"], $tempContent_Plain);     // Put in the uid of the mail-record
-                               $tempContent_Plain = str_replace("###SYS_AUTHCODE###", $authCode, $tempContent_Plain);
+                               $tempContent_Plain = str_replace('###SYS_TABLE_NAME###', $tableNameChar, $tempContent_Plain);   // Put in the tablename of the userinformation
+                               $tempContent_Plain = str_replace('###SYS_MAIL_ID###', $this->dmailer['sys_dmail_uid'], $tempContent_Plain);     // Put in the uid of the mail-record
+                               $tempContent_Plain = str_replace('###SYS_AUTHCODE###', $authCode, $tempContent_Plain);
                                
-                               if (trim($this->dmailer["sys_dmail_rec"]["long_link_rdct_url"]))        {
-                                       $tempContent_Plain = t3lib_div::substUrlsInPlainText($tempContent_Plain,$this->dmailer["sys_dmail_rec"]["long_link_mode"]?"all":"76",trim($this->dmailer["sys_dmail_rec"]["long_link_rdct_url"]));
+                               if (trim($this->dmailer['sys_dmail_rec']['long_link_rdct_url']))        {
+                                       $tempContent_Plain = t3lib_div::substUrlsInPlainText($tempContent_Plain,$this->dmailer['sys_dmail_rec']['long_link_mode']?'all':'76',trim($this->dmailer['sys_dmail_rec']['long_link_rdct_url']));
                                }
 
-                               $this->theParts["plain"]["content"] = $this->encodeMsg($tempContent_Plain);
+                               $this->theParts['plain']['content'] = $this->encodeMsg($tempContent_Plain);
                                $returnCode|=2;
-                       } else $this->theParts["plain"]["content"] = "";
+                       } else $this->theParts['plain']['content'] = '';
 
-//                     debug($this->theParts);
-//                     debug($this->theParts);
                                // Set content
                        $this->messageid = $uniqMsgId;
-                       $this->Xid = $midRidId."-".md5($midRidId);
-                       $this->returnPath = str_replace("###XID###",$midRidId,$this->dmailer["sys_dmail_rec"]["return_path"]);
+                       $this->Xid = $midRidId.'-'.md5($midRidId);
+                       $this->returnPath = str_replace('###XID###',$midRidId,$this->dmailer['sys_dmail_rec']['return_path']);
                        
                        $this->part=0;
-//                     debug($this->mediaList);
                        $this->setHeaders();
                        $this->setContent();
-                       $this->setRecipient($recipRow["email"]);
+                       $this->setRecipient($recipRow['email']);
                        
-                       $this->message = str_replace($this->dmailer["messageID"], $uniqMsgId, $this->message);  // Put in the unique message id in whole message body
-       //              $this->preview();
+                       $this->message = str_replace($this->dmailer['messageID'], $uniqMsgId, $this->message);  // Put in the unique message id in whole message body
                        $this->sendtheMail();
                }
                return $returnCode;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $addressList: ...
+        * @return      [type]          ...
+        */
        function dmailer_sendSimple($addressList)       {
-               if ($this->theParts["html"]["content"])         {
-                       $this->theParts["html"]["content"] = $this->encodeMsg($this->dmailer_getBoundaryParts($this->dmailer["boundaryParts_html"],-1));
-               } else $this->theParts["html"]["content"] = "";
-               if ($this->theParts["plain"]["content"])                {
-                       $this->theParts["plain"]["content"] = $this->encodeMsg($this->dmailer_getBoundaryParts($this->dmailer["boundaryParts_plain"],-1));
-               } else $this->theParts["plain"]["content"] = "";
+               if ($this->theParts['html']['content'])         {
+                       $this->theParts['html']['content'] = $this->encodeMsg($this->dmailer_getBoundaryParts($this->dmailer['boundaryParts_html'],-1));
+               } else $this->theParts['html']['content'] = '';
+               if ($this->theParts['plain']['content'])                {
+                       $this->theParts['plain']['content'] = $this->encodeMsg($this->dmailer_getBoundaryParts($this->dmailer['boundaryParts_plain'],-1));
+               } else $this->theParts['plain']['content'] = '';
                
                $this->setHeaders();
                $this->setContent();
@@ -182,26 +228,43 @@ class t3lib_dmailer extends t3lib_htmlmail {
                $this->sendtheMail();
                return true;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $cArray: ...
+        * @param       [type]          $userCategories: ...
+        * @return      [type]          ...
+        */
        function dmailer_getBoundaryParts($cArray,$userCategories)      {
                $userCategories = intval($userCategories);
                reset($cArray);
-               $returnVal="";
+               $returnVal='';
                while(list(,$cP)=each($cArray)) {
                        $key=substr($cP[0],1);
-                       if ($key=="END" || !$key || $userCategories<0 || (intval($key) & $userCategories)>0)    {
+                       if ($key=='END' || !$key || $userCategories<0 || (intval($key) & $userCategories)>0)    {
                                $returnVal.=$cP[1];
-                               $this->mediaList.=$cP["mediaList"];
+                               $this->mediaList.=$cP['mediaList'];
                        }
                }
                return $returnVal;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $query_info: ...
+        * @param       [type]          $table: ...
+        * @param       [type]          $mid: ...
+        * @return      [type]          ...
+        */
        function dmailer_masssend($query_info,$table,$mid)      {
-               $enableFields["tt_address"]="NOT tt_address.deleted AND NOT tt_address.hidden";
-               $enableFields["fe_users"]="NOT fe_users.deleted AND NOT fe_users.disable";
+               $enableFields['tt_address']='NOT tt_address.deleted AND NOT tt_address.hidden';
+               $enableFields['fe_users']='NOT fe_users.deleted AND NOT fe_users.disable';
                $tKey = substr($table,0,1);
                $begin=intval($this->dmailer_howManySendMails($mid,$tKey));
                if ($query_info[$table])        {
-                       $query="SELECT $table.* FROM $table WHERE ".$enableFields[$table]." AND (".$query_info[$table].") ORDER BY tstamp DESC LIMIT ".intval($begin).",".$this->sendPerCycle; // This way, we select newest edited records first. So if any record is added or changed in between, it'll end on top and do no harm
+                       $query='SELECT '.$table.'.* FROM $table WHERE '.$enableFields[$table].' AND ('.$query_info[$table].') ORDER BY tstamp DESC LIMIT '.intval($begin).','.$this->sendPerCycle; // This way, we select newest edited records first. So if any record is added or changed in between, it'll end on top and do no harm
                        $res=mysql(TYPO3_db,$query);
                        if (mysql_error())      {
                                die (mysql_error());
@@ -209,59 +272,66 @@ class t3lib_dmailer extends t3lib_htmlmail {
                        $numRows=mysql_num_rows($res);
                        $cc=0;
                        while($recipRow=mysql_fetch_assoc($res))        {
-                               if (!$this->dmailer_isSend($mid,$recipRow["uid"],$tKey))        {
+                               if (!$this->dmailer_isSend($mid,$recipRow['uid'],$tKey))        {
                                        $pt = t3lib_div::milliseconds();
-                                       if ($recipRow["telephone"])     $recipRow["phone"] = $recipRow["telephone"];    // Compensation for the fact that fe_users has the field, "telephone" instead of "phone"
-                                       $recipRow["firstname"]=strtok(trim($recipRow["name"])," ");
+                                       if ($recipRow['telephone'])     $recipRow['phone'] = $recipRow['telephone'];    // Compensation for the fact that fe_users has the field, 'telephone' instead of 'phone'
+                                       $recipRow['firstname']=strtok(trim($recipRow['name']),' ');
 
                                        $rC = $this->dmailer_sendAdvanced($recipRow,$tKey);
-                                       $this->dmailer_addToMailLog($mid,$tKey."_".$recipRow["uid"],strlen($this->message),t3lib_div::milliseconds()-$pt,$rC);
+                                       $this->dmailer_addToMailLog($mid,$tKey.'_'.$recipRow['uid'],strlen($this->message),t3lib_div::milliseconds()-$pt,$rC);
                                }
                                $cc++;
                        }
-                       $this->logArray[]="Sending ".$cc." mails to table ".$table;
+                       $this->logArray[]='Sending '.$cc.' mails to table '.$table;
                        if ($numRows < $this->sendPerCycle)     return true;
                }
                return false;
-       }       
+       }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $query_info: ...
+        * @param       [type]          $mid: ...
+        * @return      [type]          ...
+        */
        function dmailer_masssend_list($query_info,$mid)        {
-               $enableFields["tt_address"]="NOT tt_address.deleted AND NOT tt_address.hidden";
-               $enableFields["fe_users"]="NOT fe_users.deleted AND NOT fe_users.disable";
+               $enableFields['tt_address']='NOT tt_address.deleted AND NOT tt_address.hidden';
+               $enableFields['fe_users']='NOT fe_users.deleted AND NOT fe_users.disable';
 
-//             $begin=intval($this->dmailer_howManySendMails($mid));
                $c=0;
                $returnVal=true;
-               if (is_array($query_info["id_lists"]))  {
-                       reset($query_info["id_lists"]);
-                       while(list($table,$listArr)=each($query_info["id_lists"]))      {
+               if (is_array($query_info['id_lists']))  {
+                       reset($query_info['id_lists']);
+                       while(list($table,$listArr)=each($query_info['id_lists']))      {
                                if (is_array($listArr)) {
                                        $ct=0;
                                                // FInd tKey
-                                       if ($table=="tt_address" || $table=="fe_users") {
+                                       if ($table=='tt_address' || $table=='fe_users') {
                                                $tKey = substr($table,0,1);
-                                       } elseif ($table=="PLAINLIST")  {
-                                               $tKey="P";
-                                       } else {$tKey="u";}
+                                       } elseif ($table=='PLAINLIST')  {
+                                               $tKey='P';
+                                       } else {$tKey='u';}
 
                                                // Send mails
                                        $sendIds=$this->dmailer_getSentMails($mid,$tKey);
-                                       if ($table=="PLAINLIST")        {
-                                               $sendIdsArr=explode(",",$sendIds);
+                                       if ($table=='PLAINLIST')        {
+                                               $sendIdsArr=explode(',',$sendIds);
                                                reset($listArr);
                                                while(list($kval,$recipRow)=each($listArr))     {
                                                        $kval++;
                                                        if (!in_array($kval,$sendIdsArr))       {
                                                                if ($c>=$this->sendPerCycle)    {$returnVal = false; break;}            // We are NOT finished!
-                                                               $recipRow["uid"]=$kval;
+                                                               $recipRow['uid']=$kval;
                                                                $this->shipOfMail($mid,$recipRow,$tKey);
                                                                $ct++;
                                                                $c++;
                                                        }
                                                }
                                        } else {
-                                               $idList = implode(",",$listArr);
+                                               $idList = implode(',',$listArr);
                                                if ($idList)    {
-                                                       $query="SELECT $table.* FROM $table WHERE uid IN (".$idList.") AND uid NOT IN (".($sendIds?$sendIds:0).") AND ".($enableFields[$table]?$enableFields[$table]:"1=1")." LIMIT ".($this->sendPerCycle+1);
+                                                       $query='SELECT '.$table.'.* FROM $table WHERE uid IN ('.$idList.') AND uid NOT IN ('.($sendIds?$sendIds:0).') AND '.($enableFields[$table]?$enableFields[$table]:'1=1').' LIMIT '.($this->sendPerCycle+1);
                                                        $res=mysql(TYPO3_db,$query);
                                                        if (mysql_error())      {die (mysql_error());}
                                                        while($recipRow=mysql_fetch_assoc($res))        {
@@ -272,110 +342,174 @@ class t3lib_dmailer extends t3lib_htmlmail {
                                                        }
                                                }
                                        }
-                                       $this->logArray[]="Sending ".$ct." mails to table ".$table;
+                                       $this->logArray[]='Sending '.$ct.' mails to table '.$table;
                                }
                        }
                }
                return $returnVal;
-       }       
+       }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $mid: ...
+        * @param       [type]          $recipRow: ...
+        * @param       [type]          $tKey: ...
+        * @return      [type]          ...
+        */
        function shipOfMail($mid,$recipRow,$tKey)       {
-               if (!$this->dmailer_isSend($mid,$recipRow["uid"],$tKey))        {
+               if (!$this->dmailer_isSend($mid,$recipRow['uid'],$tKey))        {
                        $pt = t3lib_div::milliseconds();
                        $recipRow=$this->convertFields($recipRow);
                        
-//                     debug("->".$recipRow["uid"],1);
-//                     $recipRow["email"]="kasper@typo3.com";
+//                     debug('->'.$recipRow['uid'],1);
+//                     $recipRow['email']='kasper@typo3.com';
                        $rC=$this->dmailer_sendAdvanced($recipRow,$tKey);
-                       $this->dmailer_addToMailLog($mid,$tKey."_".$recipRow["uid"],strlen($this->message),t3lib_div::milliseconds()-$pt,$rC);
+                       $this->dmailer_addToMailLog($mid,$tKey.'_'.$recipRow['uid'],strlen($this->message),t3lib_div::milliseconds()-$pt,$rC);
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $recipRow: ...
+        * @return      [type]          ...
+        */
        function convertFields($recipRow)       {
-               if ($recipRow["telephone"])     $recipRow["phone"] = $recipRow["telephone"];    // Compensation for the fact that fe_users has the field, "telephone" instead of "phone"
-               $recipRow["firstname"]=trim(strtok(trim($recipRow["name"])," "));
-               if (strlen($recipRow["firstname"])<2 || ereg("[^[:alnum:]]$",$recipRow["firstname"]))           $recipRow["firstname"]=$recipRow["name"];               // Firstname must be more that 1 character
-               if (!trim($recipRow["firstname"]))      $recipRow["firstname"]=$recipRow["email"];
+               if ($recipRow['telephone'])     $recipRow['phone'] = $recipRow['telephone'];    // Compensation for the fact that fe_users has the field, 'telephone' instead of 'phone'
+               $recipRow['firstname']=trim(strtok(trim($recipRow['name']),' '));
+               if (strlen($recipRow['firstname'])<2 || ereg('[^[:alnum:]]$',$recipRow['firstname']))           $recipRow['firstname']=$recipRow['name'];               // Firstname must be more that 1 character
+               if (!trim($recipRow['firstname']))      $recipRow['firstname']=$recipRow['email'];
                return  $recipRow;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $mid: ...
+        * @param       [type]          $key: ...
+        * @return      [type]          ...
+        */
        function dmailer_setBeginEnd($mid,$key) {
-               $query="UPDATE sys_dmail SET scheduled_".$key."=".time()." WHERE uid=".intval($mid);
+               $query='UPDATE sys_dmail SET scheduled_'.$key.'='.time().' WHERE uid='.intval($mid);
                $res=mysql(TYPO3_db,$query);
                echo mysql_error();
                switch($key)    {
-                       case "begin":
-                               $subject="DMAILER mid:".$mid." JOB BEGIN";
-                               $message=": ".date("d-m-y h:i:s");
+                       case 'begin':
+                               $subject='DMAILER mid:'.$mid.' JOB BEGIN';
+                               $message=': '.date('d-m-y h:i:s');
                        break;
-                       case "end":
-                               $subject="DMAILER mid:".$mid." JOB END";
-                               $message=": ".date("d-m-y h:i:s");
+                       case 'end':
+                               $subject='DMAILER mid:'.$mid.' JOB END';
+                               $message=': '.date('d-m-y h:i:s');
                        break;
                }
-               $this->logArray[]=$subject.": ".$message;
+               $this->logArray[]=$subject.': '.$message;
                mail($this->from_email, $subject, $message);
        }
-       function dmailer_howManySendMails($mid,$rtbl="")        {
-               $tblClause = $rtbl ? " AND rtbl='".$rtbl."'" : "";
-               $query="SELECT count(*) FROM sys_dmail_maillog WHERE mid=".$mid." AND response_type=0".$tblClause;
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $mid: ...
+        * @param       [type]          $rtbl: ...
+        * @return      [type]          ...
+        */
+       function dmailer_howManySendMails($mid,$rtbl='')        {
+               $tblClause = $rtbl ? ' AND rtbl="'.$rtbl.'"' : '';
+               $query='SELECT count(*) FROM sys_dmail_maillog WHERE mid='.$mid.' AND response_type=0'.$tblClause;
                $res=mysql(TYPO3_db,$query);
                $row= mysql_fetch_row($res);
                return $row[0];
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $mid: ...
+        * @param       [type]          $rid: ...
+        * @param       [type]          $rtbl: ...
+        * @return      [type]          ...
+        */
        function dmailer_isSend($mid,$rid,$rtbl)        {
-               $query="SELECT uid FROM sys_dmail_maillog WHERE rid=".intval($rid)." AND rtbl='".$rtbl."' AND mid=".intval($mid)." AND response_type=0";
+               $query='SELECT uid FROM sys_dmail_maillog WHERE rid='.intval($rid).' AND rtbl="'.$rtbl.'" AND mid='.intval($mid).' AND response_type=0';
                $res=mysql(TYPO3_db,$query);
                return mysql_num_rows($res);
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $mid: ...
+        * @param       [type]          $rtbl: ...
+        * @return      [type]          ...
+        */
        function dmailer_getSentMails($mid,$rtbl)       {
-               $query="SELECT rid FROM sys_dmail_maillog WHERE mid=".$mid." AND rtbl='".$rtbl."' AND response_type=0";
+               $query='SELECT rid FROM sys_dmail_maillog WHERE mid='.$mid.' AND rtbl="'.$rtbl.'" AND response_type=0';
                $res=mysql(TYPO3_db,$query);
-//             echo mysql_error();
                $list=array();
                while($row=mysql_fetch_assoc($res))     {
-                       $list[]=$row["rid"];
+                       $list[]=$row['rid'];
                }
-               return implode(",",$list);
+               return implode(',',$list);
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $mid: ...
+        * @param       [type]          $rid: ...
+        * @param       [type]          $size: ...
+        * @param       [type]          $parsetime: ...
+        * @param       [type]          $html: ...
+        * @return      [type]          ...
+        */
        function dmailer_addToMailLog($mid,$rid,$size,$parsetime,$html) {
-               $temp_recip=explode("_",$rid);
-               $temp_query="INSERT INTO sys_dmail_maillog (mid,rtbl,rid,tstamp,url,size,parsetime,html_sent) VALUES ('".intval($mid)."','".addslashes($temp_recip[0])."','".intval($temp_recip[1])."','".time()."','','".$size."','".$parsetime."',".intval($html).")";
+               $temp_recip=explode('_',$rid);
+               $temp_query="INSERT INTO sys_dmail_maillog (mid,rtbl,rid,tstamp,url,size,parsetime,html_sent) VALUES ('".intval($mid)."','".addslashes($temp_recip[0])."','".intval($temp_recip[1])."','".time()."','','".$size."','".$parsetime."',".intval($html).')';
                $temp_res = mysql(TYPO3_db,$temp_query);
                echo mysql_error();
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function runcron()      {
                $pt = t3lib_div::milliseconds();
 
-               $query="SELECT * FROM sys_dmail WHERE scheduled!=0 AND scheduled<".time()." AND scheduled_end=0 ORDER BY scheduled";
+               $query='SELECT * FROM sys_dmail WHERE scheduled!=0 AND scheduled<'.time().' AND scheduled_end=0 ORDER BY scheduled';
                $res=mysql(TYPO3_db,$query);
                if (mysql_error())      {
                        die (mysql_error());
                }
-               $this->logArray[]="Invoked at ".date("h:i:s d-m-Y");
+               $this->logArray[]='Invoked at '.date('h:i:s d-m-Y');
                
                if ($row=mysql_fetch_assoc($res))       {
-                       $this->logArray[]="sys_dmail record ".$row["uid"].", '".$row["subject"]."' processed...";
+                       $this->logArray[]='sys_dmail record '.$row['uid'].", '".$row['subject']."' processed...";
                        $this->dmailer_prepare($row);
-                       $query_info=unserialize($row["query_info"]);
-                       if (!$row["scheduled_begin"])   {$this->dmailer_setBeginEnd($row["uid"],"begin");}
+                       $query_info=unserialize($row['query_info']);
+                       if (!$row['scheduled_begin'])   {$this->dmailer_setBeginEnd($row['uid'],'begin');}
 /*
-                       $finished = $this->dmailer_masssend($query_info,"tt_address",$row["uid"]);
+                       $finished = $this->dmailer_masssend($query_info,'tt_address',$row['uid']);
                        if ($finished)  {
-                               $finished = $this->dmailer_masssend($query_info,"fe_users",$row["uid"]);
+                               $finished = $this->dmailer_masssend($query_info,'fe_users',$row['uid']);
                        }*/
-                       $finished = $this->dmailer_masssend_list($query_info,$row["uid"]);
+                       $finished = $this->dmailer_masssend_list($query_info,$row['uid']);
                        
-                       if ($finished)  {$this->dmailer_setBeginEnd($row["uid"],"end");}
+                       if ($finished)  {$this->dmailer_setBeginEnd($row['uid'],'end');}
                } else {
-                       $this->logArray[]="Nothing to do.";
+                       $this->logArray[]='Nothing to do.';
                }
 
                $parsetime=t3lib_div::milliseconds()-$pt;
-               $this->logArray[]="Ending, parsetime: ".$parsetime." ms";;
+               $this->logArray[]='Ending, parsetime: '.$parsetime.' ms';;
        }
 }
 
 
-if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["t3lib/class.t3lib_dmailer.php"])  {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["t3lib/class.t3lib_dmailer.php"]);
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_dmailer.php'])  {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_dmailer.php']);
 }
-
 ?>
\ No newline at end of file
index af3a26b..b9a7bf5 100755 (executable)
 /**
  * t3lib_exec find executables (programs) on unix and windows without knowing where they are
  *
+ * $Id$
+ *
  * @author     René Fritz <r.fritz@colorcube.de>
- * @package TYPO3
- * @subpackage t3lib
+ */
+/**
+ * [CLASS/FUNCTION INDEX of SCRIPT]
+ *
+ *
+ *
+ *   81: class t3lib_exec 
+ *   91:     function checkCommand($cmd, $handler='')  
+ *  162:     function getCommand($cmd, $handler='', $handlerOpt='')    
+ *  191:     function addPaths($paths) 
+ *  201:     function _getPaths()      
+ *  269:     function _init()  
+ *  285:     function _initPaths($paths='')    
+ *  340:     function _getOS() 
+ *  351:     function _fixPath($path)  
+ *
+ * TOTAL FUNCTIONS: 8
+ * (This index is automatically created/updated by the extension "extdeveval")
+ *
  */
 
 
+
+
+
 /**
  * returns exec command for a program
  * or false
- *
+ * 
  * This class is meant to be used without instance:
  * $cmd = t3lib_exec::getCommand ('awstats','perl');
- *
+ * 
  * The data of this class is hold in a global variable. Doing it this way the setup is cached.
  * That means if a program is found once it don't have to be searched again.
- *
+ * 
  * user functions:
- *
+ * 
  * addPaths() could be used to extend the search paths
  * getCommand() get a command string
  * checkCommand() returns true if a command is available
- *
+ * 
  * Search paths that are included:
  * $TYPO3_CONF_VARS['GFX']['im_path_lzw'] or $TYPO3_CONF_VARS['GFX']['im_path']
  * $TYPO3_CONF_VARS['SYS']['binPath']
  * $GLOBALS['_SERVER']['PATH']
  * '/usr/bin/,/usr/local/bin/' on Unix
- *
+ * 
  * @author     René Fritz <r.fritz@colorcube.de>
+ * @package TYPO3
+ * @subpackage t3lib
  */
 class t3lib_exec {
 
-
-
        /**
         * checks if a command is valid or not
         * updates global vars
-        *
-        * @param       string  the command that should be executed. eg: "convert"
-        * @param       string  executer for the command. eg: "perl"
-        * @return      boolean false if cmd is not found, or -1 if the handler is not found
+        * 
+        * @param       string          the command that should be executed. eg: "convert"
+        * @param       string          executer for the command. eg: "perl"
+        * @return      boolean         false if cmd is not found, or -1 if the handler is not found
         */
        function checkCommand($cmd, $handler='')        {
 
@@ -129,15 +151,13 @@ class t3lib_exec {
                return false;
        }
        
-
        /**
         * returns a command string for exec(), system()
-        *
-        *
-        * @param       string  the command that should be executed. eg: "convert"
-        * @param       string  handler (executor) for the command. eg: "perl"
-        * @param       string  options for the handler, like '-w' for "perl"
-        * @return      mixed returns command string, or false if cmd is not found, or -1 if the handler is not found
+        * 
+        * @param       string          the command that should be executed. eg: "convert"
+        * @param       string          handler (executor) for the command. eg: "perl"
+        * @param       string          options for the handler, like '-w' for "perl"
+        * @return      mixed           returns command string, or false if cmd is not found, or -1 if the handler is not found
         */
        function getCommand($cmd, $handler='', $handlerOpt='')  {
 
@@ -162,26 +182,20 @@ class t3lib_exec {
                return $handler.$cmd;
        }
 
-
-
-
        /**
         * Extend the preset paths. This way an extension can install an axecutable and provide the path to t3lib_exec.
-        *
-        * @param       string  comma seperated list of extra paths where a command should be searched. Relative paths (without leading "/") are prepend with site root path (PATH_site).
+        * 
+        * @param       string          comma seperated list of extra paths where a command should be searched. Relative paths (without leading "/") are prepend with site root path (PATH_site).
+        * @return      [type]          ...
         */
        function addPaths($paths)       {
                t3lib_exec::_initPaths($paths);
        }
 
-
-
-
-
-
-
        /**
         * set the search paths from different sources
+        * 
+        * @return      [type]          ...
         * @internal
         */
        function _getPaths()    {
@@ -246,9 +260,10 @@ class t3lib_exec {
                return $pathsArr;
        }
 
-
        /**
         * init
+        * 
+        * @return      [type]          ...
         * @internal
         */
        function _init()        {
@@ -260,12 +275,12 @@ class t3lib_exec {
                }
        }
 
-
        /**
         * init and extend the preset paths with own
-        *
+        * 
+        * @param       string          comma seperated list of extra paths where a command should be searched. Relative paths (without leading "/") are prepend with site root path (PATH_site).
+        * @return      [type]          ...
         * @internal
-        * @param       string  comma seperated list of extra paths where a command should be searched. Relative paths (without leading "/") are prepend with site root path (PATH_site).
         */
        function _initPaths($paths='')  {
                $doCeck=false;
@@ -316,36 +331,31 @@ class t3lib_exec {
                }
        }
 
-
        /**
         * returns on which OS we're runing
-        *
-        * @return      string  the OS type: "UNIX" or "WIN"
+        * 
+        * @return      string          the OS type: "UNIX" or "WIN"
         * @internal
         */
        function _getOS()       {
-               return stristr(PHP_OS,'win')&&!stristr(PHP_OS,'darwin')?"WIN":"UNIX";
+               return stristr(PHP_OS,'win')&&!stristr(PHP_OS,'darwin')?'WIN':'UNIX';
        }
 
        /**
         * set a path to the right format
+        * 
+        * @param       string          path
+        * @return      string          path
         * @internal
-        * @param       string  path
-        * @return      string  path
         */
        function _fixPath($path)        {
                return str_replace ('//',"/",$path.'/');
        }
-
 }
 
-
-// Include extension?
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_exec.php'])     {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_exec.php']);
 }
-
-
 ?>
 
 
index 73b3f5f..29cabe7 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
-/** 
+/**
  * extending class to class t3lib_basicFileFunctions
+ * 
+ * $Id$
+ * 
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ */
+/**
+ * [CLASS/FUNCTION INDEX of SCRIPT]
  *
+ *
+ *
+ *  122: class t3lib_extFileFunctions extends t3lib_basicFileFunctions 
+ *  156:     function start($data)     
+ *  182:     function init_actionPerms($setup) 
+ *  215:     function mapData($inputArray)             
+ *  224:     function processData()    
+ *  276:     function findRecycler($theFile)   
+ *
+ *              SECTION: File operation functions
+ *  318:     function func_upload($cmds)       
+ *  359:     function func_copy($cmds) 
+ *  449:     function func_move($cmds) 
+ *  540:     function func_delete($cmds)       
+ *  606:     function func_rename($cmds)       
+ *  654:     function func_newfolder($cmds)    
+ *  687:     function func_unzip($cmds)        
+ *  722:     function func_newfile($cmds)      
+ *  760:     function func_edit($cmds) 
+ *  809:     function writeLog($action,$error,$details_nr,$details,$data)      
+ *
+ * TOTAL FUNCTIONS: 15
+ * (This index is automatically created/updated by the extension "extdeveval")
+ *
+ */
 
 
-COMMENT:
-
-see basicFileFunctions
-see tce_file.php for SYNTAX!!!
-
-This class contains functions primarily used by tce_file.php (Typo Core Engine for filemanipulation)
-Functions include copying, moving, deleting, uploading and so on...
-
-
-
-
-
-Important internal variables:
-
-$filemounts            (see basicFileFunctions)
-$f_ext         (see basicFileFunctions)
-       ... All fileoperations must be within the filemount-paths. Further the fileextension MUST validate true with the f_ext array
-
-$actionPerms   :       This array is self-explaning (look in the class below). It grants access to the functions. This could be set from outside in order to enabled functions to users. see also the function init_actionPerms() which takes input directly from the user-record
-$maxCopyFileSize = 10000;      // max copy size for files
-$maxMoveFileSize = 10000;      // max move size for files
-$maxUploadFileSize = 10000;    // max upload size for files. Remember that PHP has an inner limit often set to 2 MB
-
-$recyclerFN='_recycler_'               :       This is regarded to be the recycler folder
-
-
-
-The unzip-function allows unzip only if the destination path has it's f_ext[]['allow'] set to '*'!!
-You are allowed to copy/move folders within the same 'space' (web/ftp).
-You are allowed to copy/move folders between spaces (web/ftp) IF the destination has it's f_ext[]['allow'] set to '*'!
-
 
 
 
-Advice:
-You should always exclude php-files from the webspace. This will keep people from uploading, copy/moving and renaming files to the php3/php-extension.
-You should never mount a ftp_space 'below' the webspace so that it reaches into the webspace. This is because if somebody unzips a zip-file in the ftp-space so that it reaches out into the webspace this will be a violation of the safety
-Eg. THIS IS A BAD IDEA: you have an ftp-space that is '/www/' and a web-space that is '/www/htdocs/'
 
 
 
@@ -74,16 +72,53 @@ Eg. THIS IS A BAD IDEA: you have an ftp-space that is '/www/' and a web-space th
 
 
 
-Dependencies:
-t3lib_div
-t3lib_basicfilefunctions
+/**
+ * COMMENT:
+ * 
+ * see basicFileFunctions
+ * see tce_file.php for SYNTAX!
+ * 
+ * This class contains functions primarily used by tce_file.php (Typo Core Engine for filemanipulation)
+ * Functions include copying, moving, deleting, uploading and so on...
+ * 
+ * Important internal variables:
+ * 
+ * $filemounts         (see basicFileFunctions)
+ * $f_ext      (see basicFileFunctions)
+ *     ... All fileoperations must be within the filemount-paths. Further the fileextension MUST validate true with the f_ext array
+ * 
+ * $actionPerms        :       This array is self-explaning (look in the class below). It grants access to the functions. This could be set from outside in order to enabled functions to users. see also the function init_actionPerms() which takes input directly from the user-record
+ * $maxCopyFileSize = 10000;   // max copy size for files
+ * $maxMoveFileSize = 10000;   // max move size for files
+ * $maxUploadFileSize = 10000; // max upload size for files. Remember that PHP has an inner limit often set to 2 MB
+ * 
+ * $recyclerFN='_recycler_'            :       This is regarded to be the recycler folder
+ * 
+ * The unzip-function allows unzip only if the destination path has it's f_ext[]['allow'] set to '*'!!
+ * You are allowed to copy/move folders within the same 'space' (web/ftp).
+ * You are allowed to copy/move folders between spaces (web/ftp) IF the destination has it's f_ext[]['allow'] set to '*'!
+ * 
+ * 
+ * Advice:
+ * You should always exclude php-files from the webspace. This will keep people from uploading, copy/moving and renaming files to the php3/php-extension.
+ * You should never mount a ftp_space 'below' the webspace so that it reaches into the webspace. This is because if somebody unzips a zip-file in the ftp-space so that it reaches out into the webspace this will be a violation of the safety
+ * Eg. THIS IS A BAD IDEA: you have an ftp-space that is '/www/' and a web-space that is '/www/htdocs/'
+ * 
+ * 
+ * 
+ * Dependencies:
+ * t3lib_div
+ * t3lib_basicfilefunctions
+ */
 
- *
- * @author     Kasper Skårhøj <kasper@typo3.com>
+/**
+ * Contains functions for performing file operations like copying, pasting, uploading, moving, deleting etc. through the TCE
+ * Extending class to class t3lib_basicFileFunctions.
+ * 
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @package TYPO3
  * @subpackage t3lib
  */
-
 class t3lib_extFileFunctions extends t3lib_basicFileFunctions  {
        var $maxCopyFileSize = 10000;           // kb
        var $maxMoveFileSize = 10000;           // kb
@@ -115,7 +150,8 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
        
                
        /**
-        * 
+        * @param       [type]          $data: ...
+        * @return      [type]          ...
         */
        function start($data)   {
                if (TYPO3_OS=='WIN' || $GLOBALS['TYPO3_CONF_VARS']['BE']['disable_exec_function'])      {
@@ -139,6 +175,9 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
        /**
         * Sets up permission to perform file/directory operations. 
         * See below or the be_user-table for the significanse of the various bits in $setup ($BE_USER->user['fileoper_perms'])
+        * 
+        * @param       [type]          $setup: ...
+        * @return      [type]          ...
         */
        function init_actionPerms($setup)       {
                if (($setup&1)==1)      {               // Files: Upload,Copy,Move,Delete,Rename
@@ -169,6 +208,9 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
 
        /**
         * If PHP4 then we just set the incoming data to the arrays as PHP4 submits multidimensional arrays
+        * 
+        * @param       [type]          $inputArray: ...
+        * @return      [type]          ...
         */
        function mapData($inputArray)           {
                if (is_array($inputArray)) {
@@ -177,7 +219,7 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
        }
 
        /**
-        * 
+        * @return      [type]          ...
         */
        function processData()  {
                if (!$this->isInit) return false;
@@ -227,6 +269,9 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
         * Goes back in the path and checks in each directory if a folder named $this->recyclerFN (usually '_recycler_') is present.
         * Returns the path (without trailing slash) of the closest recycle-folder if found. Else false.
         * If a folder in the tree happens to be a _recycler_-folder (which means that we're deleting something inside a _recycler_-folder) this is ignored
+        * 
+        * @param       [type]          $theFile: ...
+        * @return      [type]          ...
         */
        function findRecycler($theFile) {
                if ($this->isPathValid($theFile))       {
@@ -255,15 +300,20 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions     {
 
        
 
-// *************************************
-// File operation functions
-// *************************************
+       /*************************************
+        *
+        * File operation functions
+        *
+        **************************************/
 
        /**
         * Upload of files (action=1)
         * $cmds['data'] is the ID-number (points to the global var that holds the filename-ref  ($GLOBALS['HTTP_POST_FILES']['upload_'.$id]['name'])
         * $cmds['target'] is the target directory
         * Returns the new filename upon success
+        * 
+        * @param       [type]          $cmds: ...
+        * @return      [type]          ...
         */
        function func_upload($cmds)     {
                if (!$this->isInit) return false;
@@ -302,6 +352,9 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
         * $cmds['target'] is the path where to copy to
         * $cmds['altName'] (boolean): If set, another filename is found in case the target already exists
         * Returns the new filename upon success
+        * 
+        * @param       [type]          $cmds: ...
+        * @return      [type]          ...
         */
        function func_copy($cmds)       {
                if (!$this->isInit) return false;
@@ -389,6 +442,9 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
         * $cmds['target'] is the path where to move to
         * $cmds['altName'] (boolean): If set, another filename is found in case the target already exists
         * Returns the new filename upon success
+        * 
+        * @param       [type]          $cmds: ...
+        * @return      [type]          ...
         */
        function func_move($cmds)       {
                if (!$this->isInit) return false;
@@ -477,6 +533,9 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
         * Deleting files and folders (action=4)
         * $cmds['data'] is the the file/folder to delete
         * Returns true upon success
+        * 
+        * @param       [type]          $cmds: ...
+        * @return      [type]          ...
         */
        function func_delete($cmds)     {
                if (!$this->isInit) return false;
@@ -540,6 +599,9 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
         * $cmds['data'] is the new name
         * $cmds['target'] is the target (file or dir)
         * Returns the new filename upon success
+        * 
+        * @param       [type]          $cmds: ...
+        * @return      [type]          ...
         */
        function func_rename($cmds)     {
                if (!$this->isInit) return false;
@@ -585,6 +647,9 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
         * $cmds['data'] is the foldername
         * $cmds['target'] is the path where to create it
         * Returns the new foldername upon success
+        * 
+        * @param       [type]          $cmds: ...
+        * @return      [type]          ...
         */
        function func_newfolder($cmds)  {
                if (!$this->isInit) return false;
@@ -615,6 +680,9 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
         * $cmds['data'] is the zip-file
         * $cmds['target'] is the target directory. If not set we'll default to the same directory as the file is in
         * If target is not supplied the target will be the current directory
+        * 
+        * @param       [type]          $cmds: ...
+        * @return      [type]          ...
         */
        function func_unzip($cmds)      {
                if (!$this->isInit || $this->dont_use_exec_commands) return false;
@@ -647,6 +715,9 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
         * $cmds['data'] is the new filename
         * $cmds['target'] is the path where to create it
         * Returns the new filename upon success
+        * 
+        * @param       [type]          $cmds: ...
+        * @return      [type]          ...
         */
        function func_newfile($cmds)    {
                $extList = $GLOBALS['TYPO3_CONF_VARS']['SYS']['textfile_ext'];
@@ -682,6 +753,9 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
         * Editing textfiles or foldes (action=9)
         * $cmds['data'] is the new content
         * $cmds['target'] is the target (file or dir)
+        * 
+        * @param       [type]          $cmds: ...
+        * @return      [type]          ...
         */
        function func_edit($cmds)       {
                if (!$this->isInit) return false;
@@ -710,13 +784,26 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions     {
 
        /**
         * Logging actions
-        * 
+        *       
+        * Log messages:
+        * [action]-[details_nr.]
+        * 
+        * REMEMBER to UPDATE the real messages set in tools/log/localconf_log.php
+        * 
+        * 9-1: File saved to '%s', bytes: %s, MD5: %s   
+        * 
         * $action:             The action number. See the functions in the class for a hint. Eg. edit is '9', upload is '1' ...
         * $error:              The severity: 0 = message, 1 = error, 2 = System Error, 3 = security notice (admin)
         * $details_nr: This number is unique for every combination of $type and $action. This is the error-message number, which can later be used to translate error messages.
         * $details:    This is the default, raw error message in english
         * $data:               Array with special information that may go into $details by '%s' marks / sprintf() when the log is shown
         * 
+        * @param       [type]          $action: ...
+        * @param       [type]          $error: ...
+        * @param       [type]          $details_nr: ...
+        * @param       [type]          $details: ...
+        * @param       [type]          $data: ...
+        * @return      [type]          ...
         * @see class.t3lib_userauthgroup.php
         */
        function writeLog($action,$error,$details_nr,$details,$data)    {
@@ -725,20 +812,7 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions      {
        }
 }
 
-
-/*
-Log messages:
-[action]-[details_nr.]
-
-REMEMBER to UPDATE the real messages set in tools/log/localconf_log.php
-
-9-1:   File saved to '%s', bytes: %s, MD5: %s 
-
-*/
-
-
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_extfilefunc.php'])      {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_extfilefunc.php']);
 }
-
 ?>
\ No newline at end of file
index 7a0686f..83d1e4a 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
 /**
  * Contains a class with Extension Management functions
  *
- * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
+ * $Id$
+ * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage t3lib
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  *
  *
  *
- *  111: class t3lib_extMgm 
+ *  113: class t3lib_extMgm 
  *
  *              SECTION: PATHS and other evaluation
- *  127:     function isLoaded($key,$exitOnError=0)    
- *  142:     function extPath($key,$script='') 
- *  156:     function extRelPath($key) 
- *  170:     function siteRelPath($key)        
- *  181:     function getCN($key)      
+ *  129:     function isLoaded($key,$exitOnError=0)    
+ *  144:     function extPath($key,$script='') 
+ *  158:     function extRelPath($key) 
+ *  172:     function siteRelPath($key)        
+ *  183:     function getCN($key)      
  *
  *              SECTION: Adding BACKEND features
- *  213:     function addTCAcolumns($table,$columnArray,$addTofeInterface=0)   
- *  235:     function addToAllTCAtypes($table,$str,$specificTypesList='')      
- *  253:     function allowTableOnStandardPages($table)        
- *  269:     function addModule($main,$sub='',$position='',$path='')   
- *  330:     function insertModuleFunction($modname,$className,$classPath,$title,$MM_key='function')   
- *  347:     function addPageTSConfig($content)        
- *  360:     function addUserTSConfig($content)        
- *  373:     function addLLrefForTCAdescr($tca_descr_key,$file_ref)    
+ *  215:     function addTCAcolumns($table,$columnArray,$addTofeInterface=0)   
+ *  237:     function addToAllTCAtypes($table,$str,$specificTypesList='')      
+ *  255:     function allowTableOnStandardPages($table)        
+ *  271:     function addModule($main,$sub='',$position='',$path='')   
+ *  332:     function insertModuleFunction($modname,$className,$classPath,$title,$MM_key='function')   
+ *  349:     function addPageTSConfig($content)        
+ *  362:     function addUserTSConfig($content)        
+ *  375:     function addLLrefForTCAdescr($tca_descr_key,$file_ref)    
  *
  *              SECTION: Adding SERVICES features
- *  416:     function addService($extKey, $serviceType, $serviceKey, $info)    
- *  483:     function findService($serviceType, $serviceSubType='', $excludeServiceKeys='') 
- *  528:     function deactivateService($serviceType, $serviceKey) 
+ *  418:     function addService($extKey, $serviceType, $serviceKey, $info)    
+ *  485:     function findService($serviceType, $serviceSubType='', $excludeServiceKeys='') 
+ *  549:     function deactivateService($serviceType, $serviceKey) 
  *
  *              SECTION: Adding FRONTEND features
- *  567:     function addPlugin($itemArray,$type='list_type')  
- *  591:     function addPiFlexFormValue($piKeyToMatch,$value) 
- *  607:     function addToInsertRecords($table)       
- *  637:     function addPItoST43($key,$classFile='',$prefix='',$type='list_type',$cached=0)   
- *  711:     function addStaticFile($extKey,$path,$title)      
- *  729:     function addTypoScriptSetup($content)     
- *  742:     function addTypoScriptConstants($content) 
- *  758:     function addTypoScript($key,$type,$content,$afterStaticUid=0)     
+ *  588:     function addPlugin($itemArray,$type='list_type')  
+ *  612:     function addPiFlexFormValue($piKeyToMatch,$value) 
+ *  630:     function addToInsertRecords($table,$content_table='tt_content',$content_field='records')  
+ *  660:     function addPItoST43($key,$classFile='',$prefix='',$type='list_type',$cached=0)   
+ *  734:     function addStaticFile($extKey,$path,$title)      
+ *  752:     function addTypoScriptSetup($content)     
+ *  765:     function addTypoScriptConstants($content) 
+ *  781:     function addTypoScript($key,$type,$content,$afterStaticUid=0)     
  *
  *              SECTION: INTERNAL EXTENSION MANAGEMENT:
- *  820:     function typo3_loadExtensions()   
- *  899:     function _makeIncludeHeader($key,$file)   
- *  919:     function isCacheFilesAvailable($cacheFilePrefix)  
- *  931:     function isLocalconfWritable()    
- *  943:     function cannotCacheFilesWritable($cacheFilePrefix)       
- *  966:     function currentCacheFiles()      
- *  988:     function writeCacheFiles($extensions,$cacheFilePrefix)    
+ *  843:     function typo3_loadExtensions()   
+ *  922:     function _makeIncludeHeader($key,$file)   
+ *  942:     function isCacheFilesAvailable($cacheFilePrefix)  
+ *  954:     function isLocalconfWritable()    
+ *  966:     function cannotCacheFilesWritable($cacheFilePrefix)       
+ *  989:     function currentCacheFiles()      
+ * 1011:     function writeCacheFiles($extensions,$cacheFilePrefix)    
  *
  * TOTAL FUNCTIONS: 31
  * (This index is automatically created/updated by the extension "extdeveval")
  * This class is never instantiated, rather the methods inside is called as functions like
  *             t3lib_extMgm::isLoaded('my_extension');
  * 
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage t3lib
  */
 class t3lib_extMgm {
 
@@ -621,6 +623,8 @@ class t3lib_extMgm {
         * FOR USE IN ext_tables.php FILES
         * 
         * @param       string          Table name
+        * @param       [type]          $content_table: ...
+        * @param       [type]          $content_field: ...
         * @return      void            
         */
        function addToInsertRecords($table,$content_table='tt_content',$content_field='records')        {
index 59962ec..7569040 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
 /** 
  * Contains the base class for 'Extension Objects' in backend modules.
  *
- * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
+ * $Id$
+ * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage t3lib
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  * (This index is automatically created/updated by the extension "extdeveval")
  *
  */
+
+
+
+
+
+
+
+
+
+
+
 /**
  * EXAMPLE: One level.
  * 
  * The two level-2 sub-module "wizard_crpages" and "wizard_sortpages" are totally normal "submodules".
  */
 
-
-
-
-
-
-
-
-
-
-
-
 /**
  * Parent class for 'Extension Objects' in backend modules.
  * Used for 'submodules' to other modules. Also called 'Function menu modules' in t3lib_extMgm. And now its even called 'Extension Objects'. Or 'Module functions'. Wish we had just one name. Or a name at all...(?) Thank God its not so advanced when it works...
  * For more information about this, please see the large example comment for the class t3lib_SCbase. This will show the principle of a 'level-1' connection.
  * The more advanced example - having two layers as it is done by the 'func_wizards' extension with the 'web_info' module - can be seen in the comment above.
  * 
- * @see t3lib_SCbase
- * @author     Kasper Skårhøj <kasper@typo3.com>
- * @see tx_funcwizards_webfunc::init(), tx_funcwizards_webfunc, tx_wizardsortpages_webfunc_2
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage t3lib
+ * @see t3lib_SCbase,tx_funcwizards_webfunc::init(), tx_funcwizards_webfunc, tx_wizardsortpages_webfunc_2
  */
 class t3lib_extobjbase {
        
index 107be65..f7fca29 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2002 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2002 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
 /**
- * generate a folder tree
+ * Generate a folder tree
  *
- * Revised for TYPO3 3.6 August/2003 by Kasper Skårhøj
+ * $Id$
+ * Revised for TYPO3 3.6 August/2003 by Kasper Skaarhoj
+ * Maintained by René Fritz
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @coauthor   René Fritz <r.fritz@colorcube.de>
- * Maintained by René Fritz
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  *
  *
  *
- *   74: class t3lib_folderTree extends t3lib_treeView  
- *   79:     function t3lib_folderTree()       
- *  100:     function wrapTitle($title,&$row)  
- *  111:     function wrapIcon($icon,&$row)    
- *  130:     function getId(&$v) 
- *  140:     function getJumpToParm(&$v) 
- *  150:     function getTitleStr(&$row)       
- *  159:     function getBrowsableTree()       
- *  241:     function getFolderTree($files_path, $depth=999, $depthData='')    
- *  310:     function getCount($files_path)    
+ *   82: class t3lib_folderTree extends t3lib_treeView  
+ *   87:     function t3lib_folderTree()       
+ *  107:     function wrapTitle($title,&$row)  
+ *  119:     function wrapIcon($icon,&$row)    
+ *  139:     function getId(&$v) 
+ *  149:     function getJumpToParm(&$v) 
+ *  159:     function getTitleStr(&$row)       
+ *  168:     function getBrowsableTree()       
+ *  249:     function getFolderTree($files_path, $depth=999, $depthData='')    
+ *  318:     function getCount($files_path)    
  *
  * TOTAL FUNCTIONS: 9
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -72,6 +73,10 @@ require_once (PATH_t3lib.'class.t3lib_treeview.php');
 /**
  * Extension class for the t3lib_browsetree class, specially made for browsing folders in the File module
  * 
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @coauthor   René Fritz <r.fritz@colorcube.de>
+ * @package TYPO3
+ * @subpackage t3lib
  * @see class t3lib_treeView
  */
 class t3lib_folderTree extends t3lib_treeView  {
@@ -91,7 +96,6 @@ class t3lib_folderTree extends t3lib_treeView  {
                // unsused $this->iconName = 'folder';
        }
 
-
        /**
         * Wrapping $title in a-tags.
         * $row is the array with path and other info.
@@ -221,7 +225,6 @@ class t3lib_folderTree extends t3lib_treeView  {
                                $row['path']=$val['path'];
                                $row['uid']=$specUID;
                                $row['title']=$val['name'];
-//                             debug($val);
                        $this->tree[]=array('HTML'=>$firstHtml,'row'=>$row);
 
                        if ($isOpen)    {
@@ -321,8 +324,6 @@ class t3lib_folderTree extends t3lib_treeView  {
                }
                return $c;
        }
-
-
 }
  
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_foldertree.php'])       {
index 7d36103..8312a66 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
 /**
  * Contains a class for formmail
  *
- * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
+ * $Id$
+ * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
+ *
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  *
  *
  *
- *   66: class t3lib_formmail extends t3lib_htmlmail 
- *   92:     function start($V,$base64=1)      
- *  166:     function addAttachment($file, $filename)  
+ *   69: class t3lib_formmail extends t3lib_htmlmail 
+ *   95:     function start($V,$base64=1)      
+ *  169:     function addAttachment($file, $filename)  
  *
  * TOTAL FUNCTIONS: 2
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -58,7 +61,7 @@
 /**
  * Formmail class
  * 
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @package TYPO3
  * @subpackage t3lib
  * @see tslib_fe::sendFormmail(), t3lib/formmail.php
index 261d1dd..3b413b2 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
  * Class used in module tools/dbint (advanced search) and which may hold code specific for that module
  * However the class has a general principle in it which may be used in the web/export module.
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage t3lib
+ * $Id$
+ *
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ */
+/**
+ * [CLASS/FUNCTION INDEX of SCRIPT]
+ *
+ *
+ *
+ *   83: class t3lib_fullsearch 
+ *   98:     function form()   
+ *  112:     function makeStoreControl()       
+ *  151:     function initStoreArray() 
+ *  171:     function cleanStoreQueryConfigs($storeQueryConfigs,$storeArray)   
+ *  188:     function addToStoreQueryConfigs($storeQueryConfigs,$index)        
+ *  204:     function saveQueryInAction($uid)  
+ *  254:     function loadStoreQueryConfigs($storeQueryConfigs,$storeIndex,$writeArray)        
+ *  270:     function procesStoreControl()     
+ *  343:     function queryMaker()     
+ *  407:     function getQueryResultCode($mQ,$res,$table)      
+ *  514:     function csvValues($row,$delim=",",$quote='"')    
+ *  524:     function tableWrap($str)  
+ *  533:     function search() 
+ *  591:     function resultRowDisplay($row,$conf,$table)      
+ *  614:     function resultRowTitles($row,$conf,$table)       
+ *
+ * TOTAL FUNCTIONS: 15
+ * (This index is automatically created/updated by the extension "extdeveval")
+ *
  */
 
  
+
+
+
+
+
+
+
+
+
+
+
+
+/**
+ * Class used in module tools/dbint (advanced search) and which may hold code specific for that module
+ * However the class has a general principle in it which may be used in the web/export module.
+ * 
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage t3lib
+ */
 class t3lib_fullsearch {
        var $storeList = "search_query_smallparts,queryConfig,queryTable,queryFields,queryLimit,queryOrder,queryOrderDesc,queryOrder2,queryOrder2Desc,queryGroup,search_query_makeQuery";
        var $downloadScript = "index.php";
        var $formW=48;
        var $noDownloadB=0;
        
+
+
+
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function form() {
                $out='
                Search Word:<BR>
@@ -48,6 +103,12 @@ class t3lib_fullsearch {
                
                return $out;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function makeStoreControl()     {
                        // Load/Save
                $storeArray = $this->initStoreArray();
@@ -81,6 +142,12 @@ class t3lib_fullsearch {
                ';
                return $tmpCode;        
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function initStoreArray()       {
                $storeArray=array(
                        "0" => "[New]"
@@ -93,6 +160,14 @@ class t3lib_fullsearch {
                }
                return $storeArray;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $storeQueryConfigs: ...
+        * @param       [type]          $storeArray: ...
+        * @return      [type]          ...
+        */
        function cleanStoreQueryConfigs($storeQueryConfigs,$storeArray) {
                if (is_array($storeQueryConfigs))       {
                        reset($storeQueryConfigs);
@@ -102,6 +177,14 @@ class t3lib_fullsearch {
                }
                return $storeQueryConfigs;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $storeQueryConfigs: ...
+        * @param       [type]          $index: ...
+        * @return      [type]          ...
+        */
        function addToStoreQueryConfigs($storeQueryConfigs,$index)      {
                $keyArr = explode(",",$this->storeList);
                reset($keyArr);
@@ -111,6 +194,13 @@ class t3lib_fullsearch {
                }
                return $storeQueryConfigs;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $uid: ...
+        * @return      [type]          ...
+        */
        function saveQueryInAction($uid)        {
                if (t3lib_extMgm::isLoaded("sys_action"))       {
                        $keyArr = explode(",",$this->storeList);
@@ -152,6 +242,15 @@ class t3lib_fullsearch {
                        return $qOK;
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $storeQueryConfigs: ...
+        * @param       [type]          $storeIndex: ...
+        * @param       [type]          $writeArray: ...
+        * @return      [type]          ...
+        */
        function loadStoreQueryConfigs($storeQueryConfigs,$storeIndex,$writeArray)      {
                if ($storeQueryConfigs[$storeIndex])    {
                        $keyArr = explode(",",$this->storeList);
@@ -162,6 +261,12 @@ class t3lib_fullsearch {
                }
                return $writeArray;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function procesStoreControl()   {
                $storeArray = $this->initStoreArray();
                $storeQueryConfigs = unserialize($GLOBALS["SOBE"]->MOD_SETTINGS["storeQueryConfigs"]);
@@ -229,6 +334,12 @@ class t3lib_fullsearch {
                }
                return $msg;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function queryMaker()   {
                global $TCA;
 
@@ -284,6 +395,15 @@ class t3lib_fullsearch {
                }               
                return $output;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $mQ: ...
+        * @param       [type]          $res: ...
+        * @param       [type]          $table: ...
+        * @return      [type]          ...
+        */
        function getQueryResultCode($mQ,$res,$table)    {
                global $TCA;
                $output="";
@@ -382,12 +502,34 @@ class t3lib_fullsearch {
                }
                return $cPR;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $row: ...
+        * @param       [type]          $delim: ...
+        * @param       [type]          $quote: ...
+        * @return      [type]          ...
+        */
        function csvValues($row,$delim=",",$quote='"')  {
                return t3lib_div::csvValues($row,$delim,$quote);
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $str: ...
+        * @return      [type]          ...
+        */
        function tableWrap($str)        {
                return '<table border=0 cellpadding=10 cellspacing=0 bgcolor="'.$GLOBALS["TBE_TEMPLATE"]->bgColor4.'"><tr><td nowrap><pre>'.$str.'</pre></td></tr></table>';
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function search()       {
                global $TCA;
                $SET = t3lib_div::GPvar("SET");
@@ -437,7 +579,15 @@ class t3lib_fullsearch {
                }
                return $out;
        }
-       
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $row: ...
+        * @param       [type]          $conf: ...
+        * @param       [type]          $table: ...
+        * @return      [type]          ...
+        */
        function resultRowDisplay($row,$conf,$table)    {
                $out='<tr bgcolor="'.$GLOBALS["SOBE"]->doc->bgColor4.'">';
                reset($row);
@@ -452,6 +602,15 @@ class t3lib_fullsearch {
                ';
                return $out;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $row: ...
+        * @param       [type]          $conf: ...
+        * @param       [type]          $table: ...
+        * @return      [type]          ...
+        */
        function resultRowTitles($row,$conf,$table)     {
                $out='<tr bgcolor="'.$GLOBALS["SOBE"]->doc->bgColor5.'">';
                reset($row);
@@ -466,9 +625,7 @@ class t3lib_fullsearch {
        }
 }
 
-
 if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["t3lib/class.t3lib_fullsearch.php"])       {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["t3lib/class.t3lib_fullsearch.php"]);
 }
-
 ?>
\ No newline at end of file
index 6a1ceb7..83bec74 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
-/** 
+/**
  * HTML mail class
+ * 
+ * $Id$
+ * 
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ */
+/**
+ * [CLASS/FUNCTION INDEX of SCRIPT]
  *
+ *
+ *
+ *  190: class t3lib_htmlmail 
+ *  253:     function start () 
+ *  263:     function useBase64()      
+ *  275:     function encodeMsg($content)      
+ *  285:     function addPlain ($content)      
+ *  297:     function addAttachment($file)     
+ *  315:     function addHTML ($file)  
+ *  338:     function extractHtmlInit($html,$url)      
+ *  349:     function send($recipient) 
+ *
+ *              SECTION: Main functions
+ *  378:     function setHeaders ()    
+ *  432:     function setRecipient ($recip)    
+ *  450:     function getHTMLContentType()     
+ *  459:     function setContent()     
+ *  486:     function constructMixed ($boundary)       
+ *  525:     function constructHTML ($boundary)        
+ *  549:     function constructAlternative($boundary)  
+ *  570:     function constructHTML_media ($boundary)  
+ *  603:     function sendTheMail () 
+ *  637:     function getBoundary()    
+ *  649:     function setPlain ($content)      
+ *  660:     function setHtml ($content)       
+ *  671:     function add_header ($header)     
+ *  682:     function add_message ($string)    
+ *  693:     function getContent($type)        
+ *  702:     function preview()        
+ *
+ *              SECTION: Functions for acquiring attachments, HTML, analyzing and so on  **
+ *  730:     function fetchHTML($file) 
+ *  748:     function fetchHTMLMedia() 
+ *  769:     function extractMediaLinks()      
+ *  845:     function extractHyperLinks()      
+ *  894:     function extractFramesInfo()      
+ *  920:     function substMediaNamesInHTML($absolute) 
+ *  947:     function substHREFsInHTML()       
+ *  975:     function substHTTPurlsInPlainText($content)       
+ * 1015:     function fixRollOvers()   
+ *
+ *              SECTION: File and URL-functions
+ * 1062:     function makeBase64($inputstr)    
+ * 1073:     function getExtendedURL($url)     
+ * 1093:     function addUserPass($url)        
+ * 1108:     function getURL($url)     
+ * 1129:     function getStrippedURL($url)     
+ * 1150:     function getMimeType($url)        
+ * 1179:     function absRef($ref)     
+ * 1199:     function split_fileref($fileref)  
+ * 1226:     function extParseUrl($path)       
+ * 1241:     function tag_regex($tagArray)     
+ * 1263:     function get_tag_attributes($tag) 
+ * 1303:     function quoted_printable($string)        
+ * 1341:     function convertName($name)       
+ *
+ * TOTAL FUNCTIONS: 46
+ * (This index is automatically created/updated by the extension "extdeveval")
+ *
+ */
 
-htmlmail.php
-
-
-
-
-
-
-
-
-
-
-Plain + HTML
-       multipart/alternative   (text, html)
-       multipart/alternative   (text, html)
-       
-
-Plain + HTML + billede
-       multipart/related (m/a, cids)
-               multipart/alternative (text, html)
-
-       multipart/related  (m/a, cids)
-               multipart/alternative   (text, html)
-
-
-plain + attachment
-       multipart/mixed 
-       
-
-HTML + Attachment:
-       multipart/mixed         (text/html , attachments)
 
-       
-Plain + HTML + Attachments:
-       multipart/mixed         (m/a, attachments)
-               multipart/alternative   (text, html)
 
 
-               
 
 
-Plain + HTML + billede + attachment
 
-               Calypso and outlook ex.
-       multipart/mixed (m/r, attachments)
-               multipart/related  (m/a, cids)
-                       multipart/alternative   (text, html)
 
 
+/**
+ * NOTES on MIME mail structures:
+ *
+ * Plain + HTML
+ *     multipart/alternative   (text, html)
+ *     multipart/alternative   (text, html)
+ *     
+ * Plain + HTML + image
+ *     multipart/related (m/a, cids)
+ *             multipart/alternative (text, html)
+ * 
+ *     multipart/related  (m/a, cids)
+ *             multipart/alternative   (text, html)
+ * 
+ * plain + attachment
+ *     multipart/mixed 
+ *     
+ * HTML + Attachment:
+ *     multipart/mixed         (text/html , attachments)
+ * 
+ * Plain + HTML + Attachments:
+ *     multipart/mixed         (m/a, attachments)
+ *             multipart/alternative   (text, html)
+ * 
+ * Plain + HTML + image + attachment
+ * 
+ *             Outlook expr.
+ *     multipart/mixed (m/r, attachments)
+ *             multipart/related  (m/a, cids)
+ *                     multipart/alternative   (text, html)
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ *
+ *
+ * FROM RFC 1521:
+ * 
+ * 5.1 Quoted-Printable Content-Transfer-Encoding
+ * The Quoted-Printable encoding is intended to represent data that largely consists of octets that correspond to printable characters in the ASCII character set. It encodes the data in such a way that the resulting octets are unlikely to be modified by mail transport. If the data being encoded are mostly ASCII text, the encoded form of the data remains largely recognizable by humans. A body which is entirely ASCII may also be encoded in Quoted-Printable to ensure the integrity of the data should the message pass through a character- translating, and/or line-wrapping gateway. 
+ * 
+ * In this encoding, octets are to be represented as determined by the following rules: 
+ * Rule #1: (General 8-bit representation) Any octet, except those indicating a line break according to the newline convention of the canonical (standard) form of the data being encoded, may be represented by an "=" followed by a two digit hexadecimal representation of the octet's value. The digits of the hexadecimal alphabet, for this purpose, are "0123456789ABCDEF". Uppercase letters must be used when sending hexadecimal data, though a robust implementation may choose to recognize lowercase letters on receipt. Thus, for example, the value 12 (ASCII form feed) can be represented by "=0C", and the value 61 (ASCII EQUAL SIGN) can be represented by "=3D". Except when the following rules allow an alternative encoding, this rule is mandatory. 
+ * Rule #2: (Literal representation) Octets with decimal values of 33 through 60 inclusive, and 62 through 126, inclusive, MAY be represented as the ASCII characters which correspond to those octets (EXCLAMATION POINT through LESS THAN, and GREATER THAN through TILDE, respectively). 
+ * Rule #3: (White Space): Octets with values of 9 and 32 MAY be represented as ASCII TAB (HT) and SPACE characters, respectively, but MUST NOT be so represented at the end of an encoded line. Any TAB (HT) or SPACE characters on an encoded line MUST thus be followed on that line by a printable character. In particular, an 
+ * "=" at the end of an encoded line, indicating a soft line break (see rule #5) may follow one or more TAB (HT) or SPACE characters. It follows that an octet with value 9 or 32 appearing at the end of an encoded line must be represented according to Rule #1. This rule is necessary because some MTAs (Message Transport Agents, programs which transport messages from one user to another, or perform a part of such transfers) are known to pad lines of text with SPACEs, and others are known to remove "white space" characters from the end of a line. Therefore, when decoding a Quoted-Printable body, any trailing white space on a line must be deleted, as it will necessarily have been added by intermediate transport agents. 
+ * Rule #4 (Line Breaks): A line break in a text body, independent of what its representation is following the canonical representation of the data being encoded, must be represented by a (RFC 822) line break, which is a CRLF sequence, in the Quoted-Printable encoding. Since the canonical representation of types other than text do not generally include the representation of line breaks, no hard line breaks (i.e. line breaks that are intended to be meaningful and to be displayed to the user) should occur in the quoted-printable encoding of such types. Of course, occurrences of "=0D", "=0A", "0A=0D" and "=0D=0A" will eventually be encountered. In general, however, base64 is preferred over quoted-printable for binary data. 
+ * Note that many implementations may elect to encode the local representation of various content types directly, as described in Appendix G. In particular, this may apply to plain text material on systems that use newline conventions other than CRLF delimiters. Such an implementation is permissible, but the generation of line breaks must be generalized to account for the case where alternate representations of newline sequences are used. 
+ * Rule #5 (Soft Line Breaks): The Quoted-Printable encoding REQUIRES that encoded lines be no more than 76 characters long. If longer lines are to be encoded with the Quoted-Printable encoding, 'soft' line breaks must be used. An equal sign as the last character on a encoded line indicates such a non-significant ('soft') line break in the encoded text. Thus if the "raw" form of the line is a single unencoded line that says: 
+ * Now's the time for all folk to come to the aid of their country. 
+ * 
+ * This can be represented, in the Quoted-Printable encoding, as 
+ * 
+ * Now's the time = 
+ * for all folk to come= 
+ * to the aid of their country. 
+ * 
+ * This provides a mechanism with which long lines are encoded in such a way as to be restored by the user agent. The 76 character limit does not count the trailing CRLF, but counts all other characters, including any equal signs. 
+ * Since the hyphen character ("-") is represented as itself in the Quoted-Printable encoding, care must be taken, when encapsulating a quoted-printable encoded body in a multipart entity, to ensure that the encapsulation boundary does not appear anywhere in the encoded body. (A good strategy is to choose a boundary that includes a character sequence such as "=_" which can never appear in a quoted- printable body. See the definition of multipart messages later in this document.) 
+ * NOTE: The quoted-printable encoding represents something of a compromise between readability and reliability in transport. Bodies encoded with the quoted-printable encoding will work reliably over most mail gateways, but may not work perfectly over a few gateways, notably those involving translation into EBCDIC. (In theory, an EBCDIC gateway could decode a quoted-printable body and re-encode it using base64, but such gateways do not yet exist.) A higher level of confidence is offered by the base64 Content-Transfer-Encoding. A way to get reasonably reliable transport through EBCDIC gateways is to also quote the ASCII characters 
+ * !"#$@[\]^`{|}~ 
+ * according to rule #1. See Appendix B for more information. 
+ * Because quoted-printable data is generally assumed to be line- oriented, it is to be expected that the representation of the breaks between the lines of quoted printable data may be altered in transport, in the same manner that plain text mail has always been altered in Internet mail when passing between systems with differing newline conventions. If such alterations are likely to constitute a corruption of the data, it is probably more sensible to use the base64 encoding rather than the quoted-printable encoding. 
+ * WARNING TO IMPLEMENTORS: If binary data are encoded in quoted- printable, care must be taken to encode CR and LF characters as "=0D" and "=0A", respectively. In particular, a CRLF sequence in binary data should be encoded as "=0D=0A". Otherwise, if CRLF were represented as a hard line break, it might be incorrectly decoded on 
+ * platforms with different line break conventions. 
+ * For formalists, the syntax of quoted-printable data is described by the following grammar: 
+ * 
+ *    quoted-printable := ([*(ptext / SPACE / TAB) ptext] ["="] CRLF)
+ *         ; Maximum line length of 76 characters excluding CRLF
+ * 
+ *    ptext := octet /<any ASCII character except "=", SPACE, or TAB>
+ *         ; characters not listed as "mail-safe" in Appendix B
+ *         ; are also not recommended.
+ * 
+ *    octet := "=" 2(DIGIT / "A" / "B" / "C" / "D" / "E" / "F")
+ *         ; octet must be used for characters > 127, =, SPACE, or TAB,
+ *         ; and is recommended for any characters not listed in
+ *         ; Appendix B as "mail-safe". 
+ */
+
+/**
+ * HTML mail class
+ * 
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @package TYPO3
  * @subpackage t3lib
  */
-
-
 class t3lib_htmlmail {
                // Headerinfo:
        var $recipient = "recipient@whatever.com";
@@ -134,23 +238,62 @@ class t3lib_htmlmail {
        var $plain_text_header = "Content-Type: text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: quoted-printable";
        var $html_text_header = "Content-Type: text/html; charset=iso-8859-1\nContent-Transfer-Encoding: quoted-printable";
 
+       
+       
+       
+       
+       
+       
+       
+       
+       
+       /**
+        * @return      [type]          ...
+        */
        function start ()       {
                        // Sets the message id
                $this->messageid = '<'.md5(microtime()).'@domain.tld>';
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function useBase64()    {
                $this->plain_text_header = 'Content-Type: text/plain; charset=iso-8859-1'.chr(10).'Content-Transfer-Encoding: base64';
                $this->html_text_header = 'Content-Type: text/html; charset=iso-8859-1'.chr(10).'Content-Transfer-Encoding: base64';
                $this->alt_base64=1;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $content: ...
+        * @return      [type]          ...
+        */
        function encodeMsg($content)    {
                return $this->alt_base64 ? $this->makeBase64($content) : $this->quoted_printable($content);
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $content: ...
+        * @return      [type]          ...
+        */
        function addPlain ($content)    {
                        // Adds plain-text and qp-encodes it
                $content=$this->substHTTPurlsInPlainText($content);
                $this->setPlain($this->encodeMsg($content));
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $file: ...
+        * @return      [type]          ...
+        */
        function addAttachment($file)   {
                        // Adds an attachment to the mail
                $theArr = $this->getExtendedURL($file);         // We fetch the content and the mime-type
@@ -162,6 +305,13 @@ class t3lib_htmlmail {
                        return true;
                } else { return false;}
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $file: ...
+        * @return      [type]          ...
+        */
        function addHTML ($file)        {
                        // Adds HTML and media, encodes it from a URL or file
                $status = $this->fetchHTML($file);
@@ -180,12 +330,22 @@ class t3lib_htmlmail {
 
        /**
         * External used to extract HTML-parts
+        * 
+        * @param       [type]          $html: ...
+        * @param       [type]          $url: ...
+        * @return      [type]          ...
         */
        function extractHtmlInit($html,$url)    {
                $this->theParts["html"]["content"]=$html;
                $this->theParts["html"]["path"]=$url;
        }
 
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $recipient: ...
+        * @return      [type]          ...
+        */
        function send($recipient)       {
                        // This function sends the mail to one $recipient
                if ($recipient) {$this->recipient = $recipient;}
@@ -195,9 +355,26 @@ class t3lib_htmlmail {
        }
 
 
-// *****************
-// Main functions 
-// *****************
+
+
+
+
+
+
+
+
+
+
+
+       /*****************************************
+        *
+        * Main functions 
+        *
+        *****************************************/
+        
+       /**
+        * @return      [type]          ...
+        */
        function setHeaders ()  {
                        // Clears the header-string and sets the headers based on object-vars.
                $this->headers = "";
@@ -245,6 +422,13 @@ class t3lib_htmlmail {
                }
                $this->add_header("Mime-Version: 1.0");
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $recip: ...
+        * @return      [type]          ...
+        */
        function setRecipient ($recip)  {
                // Sets the recipient(s). If you supply a string, you set one recipient. If you supply an array, every value is added as a recipient.
                if (is_array($recip))   {
@@ -257,9 +441,21 @@ class t3lib_htmlmail {
                        $this->recipient = $recip;
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function getHTMLContentType()   {
                return count($this->theParts["html"]["media"]) ? 'multipart/related;' : 'multipart/alternative;';
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function setContent()   {
                        // Begins building the message-body
                $this->message = "";
@@ -280,6 +476,13 @@ class t3lib_htmlmail {
                        $this->add_message($this->getContent("plain")); // Generate plain only
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $boundary: ...
+        * @return      [type]          ...
+        */
        function constructMixed ($boundary)     {
                        // Here (plain/HTML) is combined with the attachments
                $this->add_message("--".$boundary);
@@ -312,6 +515,13 @@ class t3lib_htmlmail {
                }
                $this->add_message("--".$boundary."--\n");
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $boundary: ...
+        * @return      [type]          ...
+        */
        function constructHTML ($boundary)      {
                if (count($this->theParts["html"]["media"]))    {       // If media, then we know, the multipart/related content-type has been set before this function call...
                        $this->add_message("--".$boundary);
@@ -329,6 +539,13 @@ class t3lib_htmlmail {
                        $this->constructAlternative($boundary); // Adding the plaintext/html mix, and if no media, then use $boundary instead of $newBoundary
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $boundary: ...
+        * @return      [type]          ...
+        */
        function constructAlternative($boundary)        {
                        // Here plain is combined with HTML
                $this->add_message("--".$boundary);
@@ -343,6 +560,13 @@ class t3lib_htmlmail {
                $this->add_message($this->getContent("html"));
                $this->add_message("--".$boundary."--\n");
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $boundary: ...
+        * @return      [type]          ...
+        */
        function constructHTML_media ($boundary)        {
 /*                     // Constructs the HTML-part of message if the HTML contains media
                $this->add_message("--".$boundary);
@@ -370,6 +594,12 @@ class t3lib_htmlmail {
                }
                $this->add_message("--".$boundary."--\n");
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function sendTheMail () {
                        // Sends the mail. 
                        // Requires the recipient, message and headers to be set.
@@ -398,30 +628,77 @@ class t3lib_htmlmail {
                        return true;
                } else {return false;}
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function getBoundary()  {
                        // Returns boundaries
                $this->part++;
                return  "----------".uniqid("part_".$this->part."_");
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $content: ...
+        * @return      [type]          ...
+        */
        function setPlain ($content)    {
                        // Sets the plain-text part. No processing done.
                $this->theParts["plain"]["content"] = $content;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $content: ...
+        * @return      [type]          ...
+        */
        function setHtml ($content)     {
                        // Sets the HTML-part. No processing done.
                $this->theParts["html"]["content"] = $content;
-       }       
+       }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $header: ...
+        * @return      [type]          ...
+        */
        function add_header ($header)   {
                // Adds a header to the mail. Use this AFTER the setHeaders()-function
                $this->headers.=$header."\n";
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $string: ...
+        * @return      [type]          ...
+        */
        function add_message ($string)  {
                // Adds a line of text to the mail-body. Is normally use internally
                $this->message.=$string."\n";
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $type: ...
+        * @return      [type]          ...
+        */
        function getContent($type)      {
                return $this->theParts[$type]["content"];
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function preview()      {
                echo nl2br(HTMLSpecialChars($this->headers));
                echo "<BR>";
@@ -429,9 +706,27 @@ class t3lib_htmlmail {
        }
        
 
-// *********************************************************************
-// ** Functions for acquiring attachments, HTML, analyzing and so on  **
-// *********************************************************************
+
+
+
+
+
+
+
+
+
+
+
+       /****************************************************
+        *
+        * Functions for acquiring attachments, HTML, analyzing and so on  **
+        *
+        ***************************************************/
+        
+       /**
+        * @param       [type]          $file: ...
+        * @return      [type]          ...
+        */
        function fetchHTML($file)       {
                // Fetches the HTML-content from either url og local serverfile
                $this->theParts["html"]["content"] = $this->getURL($file);      // Fetches the content of the page
@@ -444,6 +739,12 @@ class t3lib_htmlmail {
                        return false;
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function fetchHTMLMedia()       {
                // Fetches the mediafiles which are found by extractMediaLinks()
                if (is_array($this->theParts["html"]["media"])) {
@@ -459,6 +760,12 @@ class t3lib_htmlmail {
                        }
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function extractMediaLinks()    {
                        // extracts all media-links from $this->theParts["html"]["content"]
                $html_code = $this->theParts["html"]["content"];
@@ -529,6 +836,12 @@ class t3lib_htmlmail {
                        }
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function extractHyperLinks()    {
                // extracts all hyper-links from $this->theParts["html"]["content"]
                $html_code = $this->theParts["html"]["content"];
@@ -572,6 +885,12 @@ class t3lib_htmlmail {
                        }
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function extractFramesInfo()    {
                // extracts all media-links from $this->theParts["html"]["content"]
                $html_code = $this->theParts["html"]["content"];
@@ -591,6 +910,13 @@ class t3lib_htmlmail {
                        return $theInfo;
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $absolute: ...
+        * @return      [type]          ...
+        */
        function substMediaNamesInHTML($absolute)       {
                // This substitutes the media-references in $this->theParts["html"]["content"]
                // If $absolute is true, then the refs are substituted with http:// ref's indstead of Content-ID's (cid).
@@ -612,6 +938,12 @@ class t3lib_htmlmail {
                        $this->fixRollOvers();
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function substHREFsInHTML()     {
                // This substitutes the hrefs in $this->theParts["html"]["content"]
                if (is_array($this->theParts["html"]["hrefs"])) {
@@ -633,6 +965,13 @@ class t3lib_htmlmail {
                        }
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $content: ...
+        * @return      [type]          ...
+        */
        function substHTTPurlsInPlainText($content)     {
                // This substitutes the http:// urls in plain text with links 
                if ($this->jumperURL_prefix)    {
@@ -668,6 +1007,11 @@ class t3lib_htmlmail {
                return $content;
        }
 
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function fixRollOvers() {
                // JavaScript rollOvers cannot support graphics inside of mail. If these exists we must let them refer to the absolute url. By the way: Roll-overs seems to work only on some mail-readers and so far I've seen it work on Netscape 4 message-center (but not 4.5!!)
                $theNewContent = "";
@@ -691,13 +1035,41 @@ class t3lib_htmlmail {
        }
 
        
-// ************************
-// File and URL-functions
-// ************************
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+       /*******************************************
+        *
+        * File and URL-functions
+        *
+        *******************************************/
+        
+       /**
+        * @param       [type]          $inputstr: ...
+        * @return      [type]          ...
+        */
        function makeBase64($inputstr)  {
                // Returns base64-encoded content, which is broken every 76 character
                return chunk_split(base64_encode($inputstr));
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $url: ...
+        * @return      [type]          ...
+        */
        function getExtendedURL($url)   {
                // reads the URL or file and determines the Content-type by either guessing or opening a connection to the host
                $res["content"] = $this->getURL($url);
@@ -711,6 +1083,13 @@ class t3lib_htmlmail {
                if (!$res["content_type"])      {$res["content_type"] = $this->getMimeType($url);}
                return $res;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $url: ...
+        * @return      [type]          ...
+        */
        function addUserPass($url)      {
                $user=$this->http_username;
                $pass=$this->http_password;
@@ -719,6 +1098,13 @@ class t3lib_htmlmail {
                }
                return $url;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $url: ...
+        * @return      [type]          ...
+        */
        function getURL($url)   {
                $url = $this->addUserPass($url);
                        // reads a url or file
@@ -733,6 +1119,13 @@ class t3lib_htmlmail {
                        return false;
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $url: ...
+        * @return      [type]          ...
+        */
        function getStrippedURL($url)   {
                        // reads a url or file and strips the HTML-tags AND removes all empty lines. This is used to read plain-text out of a HTML-page
                if($fd = fopen($url,"rb"))      {
@@ -747,6 +1140,13 @@ class t3lib_htmlmail {
                        return $content;
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $url: ...
+        * @return      [type]          ...
+        */
        function getMimeType($url)      {
                        // Opens a connection to the server and returns the mime-type of the file
                        // takes url only
@@ -769,6 +1169,13 @@ class t3lib_htmlmail {
                }       
                return $res;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $ref: ...
+        * @return      [type]          ...
+        */
        function absRef($ref)   {
                        // Returns the absolute address of a link. This is based on $this->theParts["html"]["path"] being the root-address
                $ref = trim($ref);
@@ -782,6 +1189,13 @@ class t3lib_htmlmail {
                        return $this->theParts["html"]["path"].$ref;    // If the reference is relative, the path is added, in order for us to fetch the content
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $fileref: ...
+        * @return      [type]          ...
+        */
        function split_fileref($fileref)        {
                        // Returns an array with path, filename, filebody, fileext.
                if (    ereg("(.*/)(.*)$",$fileref,$reg)        )       {
@@ -802,6 +1216,13 @@ class t3lib_htmlmail {
                }
                return $info;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $path: ...
+        * @return      [type]          ...
+        */
        function extParseUrl($path)     {
                        // Returns an array with file or url-information
                $res = parse_url($path);
@@ -810,6 +1231,13 @@ class t3lib_htmlmail {
                $res["filename"]=$reg[2];
                return $res;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $tagArray: ...
+        * @return      [type]          ...
+        */
        function tag_regex($tagArray)   {
                if (!is_array($tagArray))       {
                        $tagArray=Array($tagArray);
@@ -822,11 +1250,17 @@ class t3lib_htmlmail {
                }
                return $theRegex;
        }
+
+       /**
+        * analyses a HTML-tag
+        * $tag is either like this "<TAG OPTION ATTRIB=VALUE>" or this " OPTION ATTRIB=VALUE>" which means you can omit the tag-name
+        * returns an array with the attributes as keys in lower-case           
+        * If an attribute is empty (like OPTION) the value of that key is just empty. Check it with is_set();
+        * 
+        * @param       [type]          $tag: ...
+        * @return      [type]          ...
+        */
        function get_tag_attributes($tag)       {
-               // analyses a HTML-tag
-               // $tag is either like this "<TAG OPTION ATTRIB=VALUE>" or this " OPTION ATTRIB=VALUE>" which means you can omit the tag-name
-               // returns an array with the attributes as keys in lower-case           
-               // If an attribute is empty (like OPTION) the value of that key is just empty. Check it with is_set();
                $attributes = Array();
                $tag = ltrim(eregi_replace ("^<[^ ]*","",trim($tag)));
                $tagLen = strlen($tag);
@@ -859,6 +1293,13 @@ class t3lib_htmlmail {
                }
                return $attributes;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $string: ...
+        * @return      [type]          ...
+        */
        function quoted_printable($string)      {
                        // This functions is buggy. It seems that in the part where the lines are breaked every 76th character, that it fails if the break happens right in a quoted_printable encode character!
                $newString = "";
@@ -890,6 +1331,13 @@ class t3lib_htmlmail {
                }
                return $newString;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $name: ...
+        * @return      [type]          ...
+        */
        function convertName($name)     {
                if (ereg("[^".chr(32)."-".chr(60).chr(62)."-".chr(127)."]",$name))      {
                        return '=?iso-8859-1?B?'.base64_encode($name).'?=';
@@ -899,95 +1347,7 @@ class t3lib_htmlmail {
        }
 }
 
-
-
-
-
-
-/*
-
-
-FROM RFC 1521:
-
-
-5.1 Quoted-Printable Content-Transfer-Encoding
-The Quoted-Printable encoding is intended to represent data that largely consists of octets that correspond to printable characters in the ASCII character set. It encodes the data in such a way that the resulting octets are unlikely to be modified by mail transport. If the data being encoded are mostly ASCII text, the encoded form of the data remains largely recognizable by humans. A body which is entirely ASCII may also be encoded in Quoted-Printable to ensure the integrity of the data should the message pass through a character- translating, and/or line-wrapping gateway. 
-
-In this encoding, octets are to be represented as determined by the following rules: 
-
-Rule #1: (General 8-bit representation) Any octet, except those indicating a line break according to the newline convention of the canonical (standard) form of the data being encoded, may be represented by an "=" followed by a two digit hexadecimal representation of the octet's value. The digits of the hexadecimal alphabet, for this purpose, are "0123456789ABCDEF". Uppercase letters must be used when sending hexadecimal data, though a robust implementation may choose to recognize lowercase letters on receipt. Thus, for example, the value 12 (ASCII form feed) can be represented by "=0C", and the value 61 (ASCII EQUAL SIGN) can be represented by "=3D". Except when the following rules allow an alternative encoding, this rule is mandatory. 
-
-Rule #2: (Literal representation) Octets with decimal values of 33 through 60 inclusive, and 62 through 126, inclusive, MAY be represented as the ASCII characters which correspond to those octets (EXCLAMATION POINT through LESS THAN, and GREATER THAN through TILDE, respectively). 
-
-Rule #3: (White Space): Octets with values of 9 and 32 MAY be represented as ASCII TAB (HT) and SPACE characters, respectively, but MUST NOT be so represented at the end of an encoded line. Any TAB (HT) or SPACE characters on an encoded line MUST thus be followed on that line by a printable character. In particular, an 
-
-"=" at the end of an encoded line, indicating a soft line break (see rule #5) may follow one or more TAB (HT) or SPACE characters. It follows that an octet with value 9 or 32 appearing at the end of an encoded line must be represented according to Rule #1. This rule is necessary because some MTAs (Message Transport Agents, programs which transport messages from one user to another, or perform a part of such transfers) are known to pad lines of text with SPACEs, and others are known to remove "white space" characters from the end of a line. Therefore, when decoding a Quoted-Printable body, any trailing white space on a line must be deleted, as it will necessarily have been added by intermediate transport agents. 
-
-Rule #4 (Line Breaks): A line break in a text body, independent of what its representation is following the canonical representation of the data being encoded, must be represented by a (RFC 822) line break, which is a CRLF sequence, in the Quoted-Printable encoding. Since the canonical representation of types other than text do not generally include the representation of line breaks, no hard line breaks (i.e. line breaks that are intended to be meaningful and to be displayed to the user) should occur in the quoted-printable encoding of such types. Of course, occurrences of "=0D", "=0A", "0A=0D" and "=0D=0A" will eventually be encountered. In general, however, base64 is preferred over quoted-printable for binary data. 
-
-Note that many implementations may elect to encode the local representation of various content types directly, as described in Appendix G. In particular, this may apply to plain text material on systems that use newline conventions other than CRLF delimiters. Such an implementation is permissible, but the generation of line breaks must be generalized to account for the case where alternate representations of newline sequences are used. 
-
-Rule #5 (Soft Line Breaks): The Quoted-Printable encoding REQUIRES that encoded lines be no more than 76 characters long. If longer lines are to be encoded with the Quoted-Printable encoding, 'soft' line breaks must be used. An equal sign as the last character on a encoded line indicates such a non-significant ('soft') line break in the encoded text. Thus if the "raw" form of the line is a single unencoded line that says: 
-
-Now's the time for all folk to come to the aid of 
-their country. 
-
-This can be represented, in the Quoted-Printable encoding, as 
-
-
-Now's the time = 
-for all folk to come= 
-to the aid of their country. 
-
-This provides a mechanism with which long lines are encoded in such a way as to be restored by the user agent. The 76 character limit does not count the trailing CRLF, but counts all other characters, including any equal signs. 
-
-Since the hyphen character ("-") is represented as itself in the Quoted-Printable encoding, care must be taken, when encapsulating a quoted-printable encoded body in a multipart entity, to ensure that the encapsulation boundary does not appear anywhere in the encoded body. (A good strategy is to choose a boundary that includes a character sequence such as "=_" which can never appear in a quoted- printable body. See the definition of multipart messages later in this document.) 
-
-NOTE: The quoted-printable encoding represents something of a compromise between readability and reliability in transport. Bodies encoded with the quoted-printable encoding will work reliably over most mail gateways, but may not work perfectly over a few gateways, notably those involving translation into EBCDIC. (In theory, an EBCDIC gateway could decode a quoted-printable body and re-encode it using base64, but such gateways do not yet exist.) A higher level of confidence is offered by the base64 Content-Transfer-Encoding. A way to get reasonably reliable transport through EBCDIC gateways is to also quote the ASCII characters 
-
-!"#$@[\]^`{|}~ 
-
-according to rule #1. See Appendix B for more information. 
-
-Because quoted-printable data is generally assumed to be line- oriented, it is to be expected that the representation of the breaks between the lines of quoted printable data may be altered in transport, in the same manner that plain text mail has always been altered in Internet mail when passing between systems with differing newline conventions. If such alterations are likely to constitute a corruption of the data, it is probably more sensible to use the base64 encoding rather than the quoted-printable encoding. 
-
-WARNING TO IMPLEMENTORS: If binary data are encoded in quoted- printable, care must be taken to encode CR and LF characters as "=0D" and "=0A", respectively. In particular, a CRLF sequence in binary data should be encoded as "=0D=0A". Otherwise, if CRLF were represented as a hard line break, it might be incorrectly decoded on 
-
-platforms with different line break conventions. 
-
-For formalists, the syntax of quoted-printable data is described by the following grammar: 
-
-
-   quoted-printable := ([*(ptext / SPACE / TAB) ptext] ["="] CRLF)
-        ; Maximum line length of 76 characters excluding CRLF
-
-   ptext := octet /<any ASCII character except "=", SPACE, or TAB>
-        ; characters not listed as "mail-safe" in Appendix B
-        ; are also not recommended.
-
-   octet := "=" 2(DIGIT / "A" / "B" / "C" / "D" / "E" / "F")
-        ; octet must be used for characters > 127, =, SPACE, or TAB,
-        ; and is recommended for any characters not listed in
-        ; Appendix B as "mail-safe".
-
-
-
-
-
-
-
-
-
-
-
-
-
-*/
-
-
-
-if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["t3lib/class.t3lib_htmlmail.php"]) {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["t3lib/class.t3lib_htmlmail.php"]);
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_htmlmail.php']) {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_htmlmail.php']);
 }
-
 ?>
\ No newline at end of file
index c8bb5a7..7a5279e 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
 ***************************************************************/
 /** 
  * Contains class for icon generation in the backend
- * 
- * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
+ *
+ * $Id$
+ * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
  * XHTML compliant
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage t3lib
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  *
  *
  *
- *   81: class t3lib_iconWorks 
- *   95:     function getIconImage($table,$row=array(),$backPath,$params='',$shaded=0) 
- *  112:     function getIcon($table,$row=array(),$shaded=0)   
- *  194:     function makeIcon($iconfile,$mode, $user, $protectSection=0,$absFile='')  
- *  297:     function imagecopyresized(&$im, $cpImg, $Xstart, $Ystart, $cpImgCutX, $cpImgCutY, $w, $h, $w, $h) 
- *  330:     function imagecreatefrom($file)   
- *  347:     function imagemake($im, $path)    
+ *   82: class t3lib_iconWorks 
+ *   96:     function getIconImage($table,$row=array(),$backPath,$params='',$shaded=0) 
+ *  113:     function getIcon($table,$row=array(),$shaded=0)   
+ *  195:     function makeIcon($iconfile,$mode, $user, $protectSection=0,$absFile='')  
+ *  298:     function imagecopyresized(&$im, $cpImg, $Xstart, $Ystart, $cpImgCutX, $cpImgCutY, $w, $h, $w, $h) 
+ *  331:     function imagecreatefrom($file)   
+ *  348:     function imagemake($im, $path)    
  *
  * TOTAL FUNCTIONS: 6
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -76,7 +75,9 @@
  * The class is included in eg. init.php
  * ALL functions called without making a class instance, eg. "t3lib_iconWorks::getIconImage()"
  * 
- * @author     Kasper Skårhøj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage t3lib
  */
 class t3lib_iconWorks  {
        
index 0125911..cc6c70a 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
+*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
 ***************************************************************/
 /** 
  * Used to setup localconf.php and verify the TYPO3 installation
- *
  * This script should reduce the number of questions on the mailing with more than 50%... :-)
  *
- * @author     Kasper Skårhøj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage t3lib
+ * $Id$
+ *
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ */
+/**
+ * [CLASS/FUNCTION INDEX of SCRIPT]
+ *
+ *
+ *
+ *  165: class t3lib_install 
+ *  243:     function t3lib_install()  
+ *  320:     function checkPassword($uKey)     
+ *  380:     function init()   
+ *  540:     function stepOutput()     
+ *  791:     function checkTheConfig() 
+ *  822:     function typo3conf_edit() 
+ *  932:     function phpinformation() 
+ *
+ *              SECTION: typo3temp/ manager
+ * 1033:     function typo3TempManager()       
+ * 1134:     function getSelectorOptions($deleteType,$tt="")   
+ *
+ *              SECTION: CONFIGURATION FORM
+ * 1167:     function generateConfigForm($type="")     
+ * 1239:     function getDefaultConfigArrayComments($string,$mainArray=array(),$commentArray=array())  
+ *
+ *              SECTION: CHECK CONFIGURATION FUNCTIONS
+ * 1292:     function checkConfiguration()     
+ * 1481:     function check_mail($cmd="")      
+ * 1504:     function checkExtensions()        
+ * 1567:     function checkDirs()      
+ * 1636:     function checkImageMagick($paths) 
+ * 1697:     function _checkImageMagickGifCapability($file)    
+ * 1739:     function _checkImageMagick_getVersion($file)      
+ * 1752:     function checkDatabase()          
+ * 1814:     function setupGeneral($cmd="")    
+ * 1979:     function writeToLocalconf_control($lines="",$dontOutputContent=0) 
+ * 2027:     function outputExitBasedOnStep($content)  
+ * 2042:     function checkForBadString($string)       
+ * 2057:     function setValueInLocalconfFile(&$line_array, $variable, $value) 
+ * 2104:     function slashValueForSingleDashes($value)        
+ * 2115:     function setLabelValueArray($arr,$type)   
+ * 2143:     function getFormElement($labels,$values,$fieldName,$default,$msg="")      
+ * 2163:     function getDatabaseList()        
+ * 2192:     function setupGeneralCalculate()  
+ * 2261:     function getGDPartOfPhpinfo()     
+ * 2280:     function isTTF($phpinfo="")       
+ *
+ *              SECTION: ABOUT the isXXX functions.
+ * 2329:     function isGD()   
+ * 2340:     function isGIF()  
+ * 2352:     function isJPG()  
+ * 2363:     function isPNG()  
+ * 2375:     function ImageTypes()     
+ * 2386:     function getGDSoftwareInfo()      
+ * 2398:     function generallyAboutConfiguration()    
+ *
+ *              SECTION: IMAGE processing
+ * 2458:     function checkTheImageProcessing()        
+ * 2937:     function isExtensionEnabled($ext, $headCode, $short)      
+ * 2953:     function displayTwinImage ($imageFile, $IMcommands=array(), $note="")     
+ * 3024:     function getTwinImageMessage($message, $label_1="", $label_2="")  
+ * 3040:     function formatImCmds($arr)       
+ * 3061:     function imagemenu()      
+ *
+ *              SECTION: DATABASE analysing
+ * 3103:     function checkTheDatabase()       
+ * 3702:     function isBackendAdminUser() 
+ * 3714:     function isStaticTemplates()      
+ * 3727:     function isBasicComplete($tLabel) 
+ * 3763:     function getListOfTables()        
+ * 3783:     function generateUpdateDatabaseForm($type, $arr_update, $arr_remove, $action_type)        
+ * 3813:     function getUpdateDbFormWrap($action_type, $content, $label="Write to database")  
+ * 3829:     function generateUpdateDatabaseForm_checkboxes($arr,$label,$checked=1,$iconDis=0,$currentValue=array(),$cVfullMsg=0)      
+ * 3863:     function preformUpdateQueries($arr,$keyArr)       
+ * 3884:     function displayFields($arr, $pre=0, $label="")   
+ * 3909:     function displayFieldComp($arr, $arr_db)  
+ * 3951:     function displaySuggestions($arr, $excludeList="")        
+ * 3980:     function getCreateTables($statements, $insertCountFlag=0) 
+ * 4005:     function getTableInsertStatements($statements, $table)    
+ * 4031:     function getStatementArray($sqlcode,$removeNonSQL=0,$query_regex="")      
+ * 4067:     function assembleFieldDefinition($row)    
+ * 4094:     function getFieldDefinitions_database($database)  
+ * 4132:     function getFieldDefinitions_sqlContent($sqlContent)      
+ * 4172:     function getDatabaseExtra($FDsrc, $FDcomp)        
+ * 4210:     function compareDatabaseAndTCA($FDsrc, $TCA, $onlyFields=0)       
+ * 4268:     function compareTCAandDatabase($TCA, $FDcomp)     
+ * 4303:     function getUpdateSuggestions($diffArr,$keyList="extra,diff")     
+ * 4405:     function suggestFieldDefinition($fieldInfo)       
+ * 4483:     function getItemArrayType($arr)   
+ * 4513:     function getItemBlobSize($len)    
+ * 4524:     function suggestTCAFieldDefinition($fieldName,$fieldInfo) 
+ * 4667:     function includeTCA()     
+ *
+ *              SECTION: GENERAL FUNCTIONS
+ * 4709:     function linkIt($url,$link="")    
+ * 4737:     function printSection($head, $short_string, $long_string, $type)  
+ * 4778:     function fw($str,$size=1) 
+ * 4791:     function fwheader($str)   
+ * 4802:     function wrapInCells($label,$content)     
+ * 4811:     function printAll()       
+ * 4830:     function outputWrapper($content)  
+ * 4883:     function menu()   
+ * 4905:     function stepHeader()     
+ * 4947:     function note123()        
+ * 4961:     function endNotes()       
+ * 4980:     function convertByteSize($bytes)  
+ * 4994:     function securityRisk()   
+ * 5012:     function alterPasswordForm()      
+ * 5028:     function messageBasicFinished()   
+ * 5050:     function setScriptName($type)     
+ * 5063:     function formWidth($size=48,$textarea=0,$styleOverride="") 
+ * 5084:     function formWidthText($size=48,$styleOverride="",$wrap="") 
+ *
+ * TOTAL FUNCTIONS: 89
+ * (This index is automatically created/updated by the extension "extdeveval")
+ *
  */
-
  
 
+
+
+
+
+
+
+
+/**
+ * Used to setup localconf.php and verify the TYPO3 installation
+ * 
+ * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @package TYPO3
+ * @subpackage t3lib
+ */
 class t3lib_install {
        var $getGD_start_string='<H2 align="center"><A NAME="module_gd">gd</A></H2>';   // Used to identify the GD section in the output from phpinfo()
        var $getGD_end_string = '</TABLE>';     // Used to identify the end of the GD section (found with getGD_start_string) in the output from phpinfo()
@@ -104,8 +230,15 @@ class t3lib_install {
        var $cookie_name = "Typo3InstallTool";
        var $JSmessage = '';
 
+
+
+
+
+
        /**
         * Constructor
+        * 
+        * @return      [type]          ...
         */
        function t3lib_install()        {
                if (!$GLOBALS["TYPO3_CONF_VARS"]["BE"]["installToolPassword"])  die("Install Tool deactivated.<BR>You must enable it by setting a password in typo3conf/localconf.php. If you insert the line below, the password will be 'joh316':<BR><BR>\$TYPO3_CONF_VARS[\"BE\"][\"installToolPassword\"] = \"bacb98acf97e0b6112b1d1b650b84971\";<BR><BR>See the document 'installing_upgrading_32b1.pdf' for more info.");
@@ -178,9 +311,11 @@ On behalf of PHP we regret this inconvenience.
                }
        }
 
-
        /**
         * Returns true if submitted password is ok. Else displays a form in which to enter password.
+        * 
+        * @param       [type]          $uKey: ...
+        * @return      [type]          ...
         */
        function checkPassword($uKey)   {
                $p = t3lib_div::GPvar("password");
@@ -237,9 +372,10 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv("REMOTE_ADDR")."' (".t3lib_div::getIndp
                }
        }
        
-       
        /**
         * Calling function that checks system, IM, GD, dirs, database and lets you alter localconf.php
+        * 
+        * @return      [type]          ...
         */
        function init() {
                if (!defined("PATH_typo3"))     exit;           // Must be called after inclusion of init.php (or from init.php)
@@ -398,6 +534,8 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv("REMOTE_ADDR")."' (".t3lib_div::getIndp
        
        /**
         * Controls the step 1-2-3-go process
+        * 
+        * @return      [type]          ...
         */
        function stepOutput()   {
                $this->checkTheConfig();
@@ -647,6 +785,8 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv("REMOTE_ADDR")."' (".t3lib_div::getIndp
 
        /**
         * Calling the functions that checks the system
+        * 
+        * @return      [type]          ...
         */
        function checkTheConfig()       {
                        // Order important:     
@@ -673,9 +813,13 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv("REMOTE_ADDR")."' (".t3lib_div::getIndp
                if ($this->checkIM)     $this->checkImageMagick($paths);
                $this->checkDatabase();
        }
-       
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function typo3conf_edit()       {
-               
                $EDIT_path = PATH_typo3conf;    // default:
                if ($this->allowFileEditOutsite_typo3conf_dir && $this->INSTALL["FILE"]["EDIT_path"])   {
                        if (t3lib_div::validPathStr($this->INSTALL["FILE"]["EDIT_path"]) && substr($this->INSTALL["FILE"]["EDIT_path"],-1)=="/")        {
@@ -779,6 +923,12 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv("REMOTE_ADDR")."' (".t3lib_div::getIndp
        
                echo $this->outputWrapper($this->printAll());                   
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function phpinformation()       {
                $headCode = "PHP information";
                
@@ -859,10 +1009,27 @@ th { font-family: verdana,arial, helvetica, sans-serif; font-size: 10pt; font-we
                echo $this->outputWrapper($this->printAll());                   
        }       
        
-       // *******************************
-       // typo3temp/ manager
-       // *******************************
-       
+
+
+
+
+
+
+
+
+
+
+
+
+       /*******************************
+        *
+        * typo3temp/ manager
+        *
+        *******************************/
+
+       /**
+        * @return      [type]          ...
+        */
        function typo3TempManager()     {
                $headCode = "typo3temp/ directory";
                $this->message($headCode,"What is it?","
@@ -957,9 +1124,13 @@ Number of files at a time:
                echo $this->outputWrapper($this->printAll());                   
        }
 
-
-
-
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $deleteType: ...
+        * @param       [type]          $tt: ...
+        * @return      [type]          ...
+        */
        function getSelectorOptions($deleteType,$tt="") {
                $out="";
                if (is_array($deleteType))      {
@@ -971,10 +1142,28 @@ Number of files at a time:
                return $out;
        }
        
+
+
+
+
+
+
+
+
+
+
+
+
+       /*******************************
+        *
+        * CONFIGURATION FORM
+        *
+        ********************************/
        
-       // *******************************
-       // CONFIGURATION FORM
-       // *******************************
+       /**
+        * @param       [type]          $type: ...
+        * @return      [type]          ...
+        */
        function generateConfigForm($type="")   {
                switch($type)   {
                        case "get_form":
@@ -1038,6 +1227,15 @@ Number of files at a time:
                        break;
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $string: ...
+        * @param       [type]          $mainArray: ...
+        * @param       [type]          $commentArray: ...
+        * @return      [type]          ...
+        */
        function getDefaultConfigArrayComments($string,$mainArray=array(),$commentArray=array())        {
                $lines = explode(chr(10),$string);
                $in=0;
@@ -1068,14 +1266,28 @@ Number of files at a time:
                return array($mainArray,$commentArray);
        }
        
-       // *******************************
-       // CHECK CONFIGURATION FUNCTIONS
-       // *******************************
 
-       
+
+
+
+
+
+
+
+
+
+
+
+       /*******************************
+        *
+        * CHECK CONFIGURATION FUNCTIONS
+        *
+        *******************************/
        
        /**
         * Checking php.ini configuration and set appropriate messages and flags.
+        * 
+        * @return      [type]          ...
         */
        function checkConfiguration()   {
                $ext="php.ini configuration checked";
@@ -1262,8 +1474,9 @@ Number of files at a time:
 
        /**
         * Check if php function mail() works
-        *
-        * @param       string  $cmd    If "get_form" then a formfield for the mail-address is shown. If not, it's checked if "check_mail" was in the INSTALL array and if so a test mail is sent to the recipient given.
+        * 
+        * @param       string          $cmd    If "get_form" then a formfield for the mail-address is shown. If not, it's checked if "check_mail" was in the INSTALL array and if so a test mail is sent to the recipient given.
+        * @return      [type]          ...
         */
        function check_mail($cmd="")    {
                switch($cmd)    {
@@ -1285,6 +1498,8 @@ Number of files at a time:
 
        /**
         * Checking php extensions, specifically GDLib and Freetype
+        * 
+        * @return      [type]          ...
         */
        function checkExtensions()      {
                $ext = "GDLib";
@@ -1346,6 +1561,8 @@ Number of files at a time:
 
        /**
         * Checking and testing that the required writable directories are writable.
+        * 
+        * @return      [type]          ...
         */
        function checkDirs()    {
                // Check typo3/temp/
@@ -1410,8 +1627,11 @@ Number of files at a time:
 
        /**
         * Checking for existing ImageMagick installs.
-        *
+        * 
         * This tries to find available ImageMagick installations and tries to find the version numbers by executing "convert" without parameters. If the ->checkIMlzw is set, LZW capabilities of the IM installs are check also.
+        * 
+        * @param       [type]          $paths: ...
+        * @return      [type]          ...
         */
        function checkImageMagick($paths)       {
                $ext="Check Image Magick";
@@ -1470,6 +1690,9 @@ Number of files at a time:
 
        /**
         * Checking GIF-compression capabilities of ImageMagick install
+        * 
+        * @param       [type]          $file: ...
+        * @return      [type]          ...
         */
        function _checkImageMagickGifCapability($file)  {
                if ($this->config_array["dir_typo3temp"])       {               //  && !$this->config_array["safemode"]
@@ -1509,8 +1732,9 @@ Number of files at a time:
 
        /**
         * Extracts the version number for imagemagick
-        *
-        * @param       string  $file   This is the path to the convert-program to execute in order to find the version number
+        * 
+        * @param       string          $file   This is the path to the convert-program to execute in order to find the version number
+        * @return      [type]          ...
         */
        function _checkImageMagick_getVersion($file)    {
                exec($file, $retVal);
@@ -1522,6 +1746,8 @@ Number of files at a time:
 
        /**
         * Checks database username/password/host/database
+        * 
+        * @return      [type]          ...
         */
        function checkDatabase()                {
                $ext="Check database";
@@ -1581,8 +1807,9 @@ Number of files at a time:
 
        /**
         * Prints form for updating localconf.php or updates localconf.php depending on $cmd
-        *
-        * @param       string  $cmd    If "get_form" it outputs the form. Default is to write "localconf.php" based on input in ->INSTALL[localconf.php] array and flag ->setLocalconf
+        * 
+        * @param       string          $cmd    If "get_form" it outputs the form. Default is to write "localconf.php" based on input in ->INSTALL[localconf.php] array and flag ->setLocalconf
+        * @return      [type]          ...
         */
        function setupGeneral($cmd="")  {
                switch($cmd)    {
@@ -1741,7 +1968,14 @@ Number of files at a time:
                }
                return $out;
        }
-       
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $lines: ...
+        * @param       [type]          $dontOutputContent: ...
+        * @return      [type]          ...
+        */
        function writeToLocalconf_control($lines="",$dontOutputContent=0)       {
                $this->writeToLocalconf_dat["file"] = PATH_typo3conf."localconf.php";
                if (!$this->allowUpdateLocalConf)       {
@@ -1783,6 +2017,13 @@ Number of files at a time:
                        }
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $content: ...
+        * @return      [type]          ...
+        */
        function outputExitBasedOnStep($content)        {
                if ($this->step)        {
                        Header("Location: ".t3lib_div::locationHeaderUrl($this->action));
@@ -1792,6 +2033,12 @@ Number of files at a time:
                exit;
        }
 
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $string: ...
+        * @return      [type]          ...
+        */
        function checkForBadString($string)     {
 //             if (ereg("[".chr(10).chr(13)."\$\"\\]|//",$string)){
                if (ereg("[".chr(10).chr(13)."]",$string)){
@@ -1801,10 +2048,11 @@ Number of files at a time:
        
        /**
         * This functions takes an array with lines from localconf.php, finds a variable and inserts the new value.
-        *
-        * @param       array   $lime_array     the localconf.php file exploded into an array by linebreaks.
-        * @param       string  $variable       The variable name to find and substitute. This string must match the first part of a trimmed line in the line-array. Matching is done backwards so the last appearing line will be substituted.
-        * @param       string  $value          Is the value to be insert for the variable
+        * 
+        * @param       array           $lime_array     the localconf.php file exploded into an array by linebreaks.
+        * @param       string          $variable       The variable name to find and substitute. This string must match the first part of a trimmed line in the line-array. Matching is done backwards so the last appearing line will be substituted.
+        * @param       string          $value          Is the value to be insert for the variable
+        * @return      [type]          ...
         */
        function setValueInLocalconfFile(&$line_array, $variable, $value)       {
                $value = stripslashes($value);
@@ -1846,13 +2094,23 @@ Number of files at a time:
                $this->setLocalconf=1;
 //             debug($line_array);
        }
-       
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $value: ...
+        * @return      [type]          ...
+        */
        function slashValueForSingleDashes($value)      {
                return str_replace("'","\'",str_replace('\\','\\\\',$value));
        }
 
        /**
         * This appends something to value in the input array based on $type. Private.
+        * 
+        * @param       [type]          $arr: ...
+        * @param       [type]          $type: ...
+        * @return      [type]          ...
         */
        function setLabelValueArray($arr,$type) {
                reset($arr);
@@ -1874,6 +2132,13 @@ Number of files at a time:
 
        /**
         * Returns a form-element for the localconf.php update form
+        * 
+        * @param       [type]          $labels: ...
+        * @param       [type]          $values: ...
+        * @param       [type]          $fieldName: ...
+        * @param       [type]          $default: ...
+        * @param       [type]          $msg: ...
+        * @return      [type]          ...
         */
        function getFormElement($labels,$values,$fieldName,$default,$msg="")    {
                $out.='<strong>'.htmlspecialchars(current($labels)).'</strong><BR>current value is '.htmlspecialchars($default).($msg?"<BR>".$msg:"");
@@ -1892,6 +2157,8 @@ Number of files at a time:
 
        /**
         * Returns the list of available databases (with access-check based on username/password)
+        * 
+        * @return      [type]          ...
         */
        function getDatabaseList()      {
                $dbArr=array();
@@ -1908,21 +2175,21 @@ Number of files at a time:
 
        /**
         * Calculates the suggested setup that should be written to localconf.php
+        * 
+        * If safe_mode
+        * - disable_exec_function = 1
+        * - im = 0
+        * 
+        * if PNG/GIF/GD
+        * - disable gdlib if nothing
+        *      - select png/gif if only one of them is available, else PNG/GIF selector, defaulting to GIF
+        * - (safe_mode is on)
+        *      - im_path (default to 4.2.9, preferable with LZW)               im_ver5-flag is set based on im_path being 4.2.9 or 5+
+        *      - im_path_lzw (default to LZW version, pref. 4.2.9)
+        * 
+        * @return      [type]          ...
         */
        function setupGeneralCalculate()        {
-       /*
-If safe_mode
-- disable_exec_function = 1
-- im = 0
-
-if PNG/GIF/GD
-- disable gdlib if nothing
-       - select png/gif if only one of them is available, else PNG/GIF selector, defaulting to GIF
-- (safe_mode is on)
-       - im_path (default to 4.2.9, preferable with LZW)               im_ver5-flag is set based on im_path being 4.2.9 or 5+
-       - im_path_lzw (default to LZW version, pref. 4.2.9)
-
-*/
                $formArray["disable_exec_function"]=array(0);
                $formArray["im_path"]=array("");
                $formArray["im_path_lzw"]=array("");
@@ -1988,6 +2255,8 @@ if PNG/GIF/GD
 
        /**
         * Returns the part of phpinfo() output that tells about GD library (HTML-code)
+        * 
+        * @return      [type]          ...
         */
        function getGDPartOfPhpinfo()   {
                ob_start();
@@ -2004,6 +2273,9 @@ if PNG/GIF/GD
 
        /**
         * Returns true if TTF lib is install according to phpinfo(). If $phpinfo supply as parameter that string is searched instead.
+        * 
+        * @param       [type]          $phpinfo: ...
+        * @return      [type]          ...
         */
        function isTTF($phpinfo="")     {
 /*             $phpinfo = $phpinfo?$phpinfo:$this->getGDPartOfPhpinfo();
@@ -2032,33 +2304,74 @@ if PNG/GIF/GD
                return is_array($test)?1:0;
        }
 
-
-               // ABOUT the isXXX functions.
-               // I had a very real experience that these checks DID NOT fail eg PNG support if it didn't exist! 
-               // So first (1) we check if the functions are there. If they ARE we are going to make further investigations (2) by creating an actual image. 
-               // And if THAT succeeds also, then we can be certain of the support!
+       
+       
+       
+       
+       
+       
+       
+       
+       
+       
+       /*****************************************
+        *
+        * ABOUT the isXXX functions.
+        *
+        * I had a very real experience that these checks DID NOT fail eg PNG support if it didn't exist! 
+        * So first (1) we check if the functions are there. If they ARE we are going to make further investigations (2) by creating an actual image. 
+        * And if THAT succeeds also, then we can be certain of the support!
+        */
+       
+       /**
+        * @return      [type]          ...
+        */
        function isGD() {
                if (function_exists("imagecreate"))     {
                        if (@imagecreate (50, 100))     return 1;
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function isGIF()        {
                if (function_exists("imagecreatefromgif") && function_exists("imagegif") && ($this->ImageTypes() & IMG_GIF))    {       // If GIF-functions exists, also do a real test of them:
                        $im = @imagecreatefromgif(t3lib_extMgm::extPath("install")."imgs/jesus.gif");
                        return $im?1:0;
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function isJPG()        {
                if (function_exists("imagecreatefromjpeg") && function_exists("imagejpeg") && ($this->ImageTypes() & IMG_JPG))  {
                        return 1;
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function isPNG()        {
                if (function_exists("imagecreatefrompng") && function_exists("imagepng") && ($this->ImageTypes() & IMG_PNG))    {       
                        $im = imagecreatefrompng(t3lib_extMgm::extPath("install")."imgs/jesus.png");
                        return $im?1:0;
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function ImageTypes()   {
                if (phpversion()!="4.1.2")      {
                        return imagetypes();
@@ -2067,6 +2380,8 @@ if PNG/GIF/GD
 
        /**
         * Returns general information about GDlib
+        * 
+        * @return      [type]          ...
         */
        function getGDSoftwareInfo()    {
                return trim("
@@ -2077,6 +2392,8 @@ if PNG/GIF/GD
 
        /**
         * Returns general information about configuration of TYPO3.
+        * 
+        * @return      [type]          ...
         */
        function generallyAboutConfiguration()  {
                $out='
@@ -2099,43 +2416,45 @@ if PNG/GIF/GD
        
        
        
-       // **********************
-       // IMAGE processing
-       // **********************
-/*
-
-jesus.TIF:     IBM/LZW
-jesus.GIF:     Save for web, 32 colors
-jesus.JPG:     Save for web, 30 quality
-jesus.PNG:     Save for web, PNG-24
-jesus.tga      24 bit TGA file
-jesus.pcx      
-jesus.bmp      24 bit BMP file
-jesus_ps6.PDF: PDF w/layers and vector data
-typo3logo.ai:  Illustrator 8 file
-pdf_from_imagemagick.PDF       PDF-file made by Acrobat Distiller from InDesign PS-file
-
-
-Imagemagick
-- Read formats
-- Write png, gif, jpg
-
-Problems may arise from the use of safe_mode (eg. png)
-In safemode you will automatically execute the program convert in the safe_mode_exec_path no matter what other path you specify
-check fileexist before anything...
-
-- compare gif size
-- scaling (by stdgraphic)
-- combining (by stdgraphic)
-
-GDlib: 
-- create from:....
-- ttf text
-
-From TypoScript: (GD only, GD+IM, IM)
+       /**********************
+        *
+        * IMAGE processing
+        *
+        **********************/
 
-*/
-       
+       /**
+        * jesus.TIF:   IBM/LZW
+        * jesus.GIF:   Save for web, 32 colors
+        * jesus.JPG:   Save for web, 30 quality
+        * jesus.PNG:   Save for web, PNG-24
+        * jesus.tga    24 bit TGA file
+        * jesus.pcx    
+        * jesus.bmp    24 bit BMP file
+        * jesus_ps6.PDF:       PDF w/layers and vector data
+        * typo3logo.ai:        Illustrator 8 file
+        * pdf_from_imagemagick.PDF     PDF-file made by Acrobat Distiller from InDesign PS-file
+        * 
+        * 
+        * Imagemagick
+        * - Read formats
+        * - Write png, gif, jpg
+        * 
+        * Problems may arise from the use of safe_mode (eg. png)
+        * In safemode you will automatically execute the program convert in the safe_mode_exec_path no matter what other path you specify
+        * check fileexist before anything...
+        * 
+        * - compare gif size
+        * - scaling (by stdgraphic)
+        * - combining (by stdgraphic)
+        * 
+        * GDlib: 
+        * - create from:....
+        * - ttf text
+        * 
+        * From TypoScript: (GD only, GD+IM, IM)
+        * 
+        * @return      [type]          ...
+        */
        function checkTheImageProcessing()      {
                $this->message("Image Processing","What is it?","
                TYPO3 is known for its ability to process images on the server.
@@ -2605,7 +2924,16 @@ From TypoScript: (GD only, GD+IM, IM)
                        $this->message("Info","Parsetime",$parseMS." ms");
                }       
                echo $this->outputWrapper($this->printAll());
-       }       
+       }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $ext: ...
+        * @param       [type]          $headCode: ...
+        * @param       [type]          $short: ...
+        * @return      [type]          ...
+        */
        function isExtensionEnabled($ext, $headCode, $short)    {
                if (!t3lib_div::inList($GLOBALS["TYPO3_CONF_VARS"]["GFX"]["imagefile_ext"],$ext))       {
                        $this->message($headCode,$short,"Skipped - extension not in the list of allowed extensions ([GFX][imagefile_ext]).",1);
@@ -2613,6 +2941,15 @@ From TypoScript: (GD only, GD+IM, IM)
                        return 1;
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $imageFile: ...
+        * @param       [type]          $IMcommands: ...
+        * @param       [type]          $note: ...
+        * @return      [type]          ...
+        */
        function displayTwinImage ($imageFile, $IMcommands=array(), $note="")   {
                $ex_rows="";
                $errorLevels=array(-1);
@@ -2675,6 +3012,15 @@ From TypoScript: (GD only, GD+IM, IM)
                
                return array($out,max($errorLevels));
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $message: ...
+        * @param       [type]          $label_1: ...
+        * @param       [type]          $label_2: ...
+        * @return      [type]          ...
+        */
        function getTwinImageMessage($message, $label_1="", $label_2="")        {
                if ($message)   $out.='<tr><td colspan=3><strong>'.$this->fw($message).'</strong></td></tr>';
                if ($label_1 && !$label_2)      {
@@ -2684,6 +3030,13 @@ From TypoScript: (GD only, GD+IM, IM)
                }
                return $out;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $arr: ...
+        * @return      [type]          ...
+        */
        function formatImCmds($arr)     {
                $out=array();
                if (is_array($arr))     {
@@ -2699,6 +3052,12 @@ From TypoScript: (GD only, GD+IM, IM)
                        return "<form>".$outputStr."</form>";
                };
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function imagemenu()    {
                $menuitems = array(
                        "read" => "Reading image formats",
@@ -2732,10 +3091,15 @@ From TypoScript: (GD only, GD+IM, IM)
        
        
        
-       // **********************
-       // DATABASE analysing
-       // **********************
-
+       /**********************
+        *
+        * DATABASE analysing
+        *
+        **********************/
+       
+       /**
+        * @return      [type]          ...
+        */
        function checkTheDatabase()     {
                if (!$this->config_array["mysqlConnect"])       {
                        $this->message("Database Analyser","Your database connection failed","
@@ -3329,18 +3693,37 @@ From TypoScript: (GD only, GD+IM, IM)
 
                echo $this->outputWrapper($this->printAll());                   
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function isBackendAdminUser() {
                $query="SELECT count(*) FROM be_users WHERE admin";
                $res=mysql(TYPO3_db,$query);
                $row = mysql_fetch_assoc($res);
                return current($row);
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function isStaticTemplates()    {
                $query="SELECT count(*) FROM static_template";
                $res=mysql(TYPO3_db,$query);
                $row = mysql_fetch_assoc($res);
                return current($row);
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $tLabel: ...
+        * @return      [type]          ...
+        */
        function isBasicComplete($tLabel)       {
                if ($this->mode=="123") {
                        $tables = $this->getListOfTables();
@@ -3371,6 +3754,12 @@ From TypoScript: (GD only, GD+IM, IM)
                }
                return $mode123Imported;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @return      [type]          ...
+        */
        function getListOfTables()      {
                $whichTables=array();
                $tables_result=mysql_list_tables(TYPO3_db); 
@@ -3381,6 +3770,16 @@ From TypoScript: (GD only, GD+IM, IM)
                }
                return $whichTables;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $type: ...
+        * @param       [type]          $arr_update: ...
+        * @param       [type]          $arr_remove: ...
+        * @param       [type]          $action_type: ...
+        * @return      [type]          ...
+        */
        function generateUpdateDatabaseForm($type, $arr_update, $arr_remove, $action_type)      {
                switch($type)   {
                        case "get_form":
@@ -3402,10 +3801,31 @@ From TypoScript: (GD only, GD+IM, IM)
                        break;
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $action_type: ...
+        * @param       [type]          $content: ...
+        * @param       [type]          $label: ...
+        * @return      [type]          ...
+        */
        function getUpdateDbFormWrap($action_type, $content, $label="Write to database")        {
                $form = '<form action="'.$this->action.'#bottom" method="POST"><input type="hidden" name="TYPO3_INSTALL[database_type]" value="'.htmlspecialchars($action_type).'">'.$content.'<BR><input type="submit" value="'.$label.'">';
                return $form;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $arr: ...
+        * @param       [type]          $label: ...
+        * @param       [type]          $checked: ...
+        * @param       [type]          $iconDis: ...
+        * @param       [type]          $currentValue: ...
+        * @param       [type]          $cVfullMsg: ...
+        * @return      [type]          ...
+        */
        function generateUpdateDatabaseForm_checkboxes($arr,$label,$checked=1,$iconDis=0,$currentValue=array(),$cVfullMsg=0)    {
                $out="";
                if (is_array($arr))     {
@@ -3432,6 +3852,14 @@ From TypoScript: (GD only, GD+IM, IM)
                }
                return $content;
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $arr: ...
+        * @param       [type]          $keyArr: ...
+        * @return      [type]          ...
+        */
        function preformUpdateQueries($arr,$keyArr)     {
                if (is_array($arr))     {
                        reset($arr);
@@ -3444,6 +3872,15 @@ From TypoScript: (GD only, GD+IM, IM)
                        }
                }
        }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $arr: ...
+        * @param       [type]          $pre: ...
+        * @param       [type]          $label: ...
+        * @return      [type]          ...
+        */
        function displayFields($arr, $pre=0, $label="") {
                $out="";
                $out.='<tr><td bgcolor="#9BA1A8" align=center><strong>'.$this->fw("Field name:").'</strong></td><td bgcolor="#9BA1A8" align=center><strong>'.$this->fw($label?$label:"Info:").'</strong></td></tr>';
@@ -3460,7 +3897,15 @@ From TypoScript: (GD only, GD+IM, IM)
                }
                $out= '<table border=0 cellpadding=0 cellspacing=0>'.$out.'</table>';
                return $out;
-       }       
+       }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $arr: ...
+        * @param       [type]          $arr_db: ...
+        * @return      [type]          ...
+        */
        function displayFieldComp($arr, $arr_db)        {
                $out="";
                $out.='<tr><td bgcolor="#9BA1A8" align=center><strong>'.$this->fw("Field name:").'</strong></td>
@@ -3494,7 +3939,15 @@ From TypoScript: (GD only, GD+IM, IM)
                }
                $out= '<table border=0 cellpadding=2 cellspacing=2>'.$out.'</table>';
                return $out;
-       }       
+       }
+
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $arr: ...
+        * @param       [type]          $excludeList: ...
+        * @return      [type]          ...
+        */
        function displaySuggestions($arr, $excludeList="")      {
                $out="";
                $out.='<tr><td bgcolor="#9BA1A8" align=center><strong>'.$this->fw("Field name:").'</strong></td><td bgcolor="#9BA1A8" align=center><strong>'.$this->fw("Info / Suggestion for the field:").'</strong></td></tr>';
@@ -3515,9 +3968,15 @@ From TypoScript: (GD only, GD+IM, IM)
                }
                $out= '<table border=0 cellpadding=2 cellspacing=2>'.$out.'</table>';
                return array($out,$fC);
-       }       
+       }
 
-       
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $statements: ...
+        * @param       [type]          $insertCountFlag: ...
+        * @return      [type]          ...
+        */
        function getCreateTables($statements, $insertCountFlag=0)       {
                reset($statements);
                $crTables=array();
@@ -3536,6 +3995,13 @@ From TypoScript: (GD only, GD+IM, IM)
                return array($crTables,$insertCount);
        }
 
+       /**
+        * [Describe function...]
+        * 
+        * @param       [type]          $statements: ...
+        * @param       [type]          $table: ...
+        * @return      [type]          ...
+        */
        function getTableInsertStatements($statements, $table)  {
                reset($statements);
 //             $str="INSERT INTO ".strtoupper($table);
@@ -3553,10 +4019,14 @@ From TypoScript: (GD only, GD+IM, IM)
                }
                return $outStatements;
        }
+       
        /**
         * Returns an array where every entry is a single sql-statement. Input must be formatted like an ordinary MySQL-dump files
-        *
-        * @param       string  $sqlcode        The sql-file content. Provided that 1) every query in the input is ended with ";" and that a line in the file contains only one query or a part of a query.
+        * 
+        * @param       string          $sqlcode        The sql-file content. Provided that 1) every query in the input is ended with ";" and that a line in the file contains only one query or a part of a query.
+        * @param       [type]          $removeNonSQL: ...
+        * @param       [type]          $query_regex: ...
+        * @return      [type]          ...
         */
        function getStatementArray($sqlcode,$removeNonSQL=0,$query_regex="")    {
                $sqlcodeArr = explode(chr(10),$sqlcode);
@@ -3590,6 +4060,9 @@ From TypoScript: (GD only, GD+IM, IM)
        
        /**
         * Converts a result row with field information into the SQL field definition string
+        * 
+        * @param       [type]          $row: ...
+        * @return      [type]          ...
         */
        function assembleFieldDefinition($row)  {
                $field[] = $row["Type"];
@@ -3614,8 +4087,9 @@ From TypoScript: (GD only, GD+IM, IM)
        
        /**
         * Reads the field definitions for the current database
-        *
-        * @param       string  $database       database name to get content from.
+        * 
+        * @param       string          $database       database name to get content from.
+        * @return      [type]          ...
         */
        function getFieldDefinitions_database($database)        {
                $total=array();
@@ -3633,11 +4107,9 @@ From TypoScript: (GD only, GD+IM, IM)
                        while($keyRow=mysql_fetch_assoc($keyRes))       {
                                $tempKeys[current($tableRow)][$keyRow["Key_name"]][$keyRow["Seq_in_index"]] = $keyRow["Column_name"];
                                $tempKeysPrefix[current($tableRow)][$keyRow["Key_name"]]= ($keyRow["Key_name"]=="PRIMARY"?"PRIMARY KEY":($keyRow["Non_unique"]?"KEY":"UNIQUE")." ".$keyRow["Key_name"]);
-//                             debug($keyRow);
                        }
                }
                        // Compile information:
-//             debug($tempKeys);
                if (is_array($tempKeys))        {
                        reset($tempKeys);
                        while(list($table,$keyInf)=each($tempKeys))     {
@@ -3648,14 +4120,14 @@ From TypoScript: (GD only, GD+IM, IM)
                                }
                        }
                }
-//             debug($total["index_phash"]);
                return $total;
        }
 
        /**
         * Reads the field definitions for the input sql-file string
-        *
-        * @param       string  $sqlContent             Should be a string read from an sql-file made with 'mysqldump [database_name] -d'
+        * 
+        * @param       string          $sqlContent             Should be a string read from an sql-file made with 'mysqldump [database_name] -d'
+        * @return      [type]          ...
         */
        function getFieldDefinitions_sqlContent($sqlContent)    {
                $lines = t3lib_div::trimExplode(chr(10), $sqlContent,1);
@@ -3685,8 +4157,6 @@ From TypoScript: (GD only, GD+IM, IM)
                                }
                        }
                }
-//             debug("sql");
-//             debug($total["index_phash"]);
                return $total;
        }
 
@@ -3694,6 +4164,10 @@ From TypoScript: (GD only, GD+IM, IM)
         * Compares two arrays with field information
         * 
         * Returns an array with 1) all elements from $FSsrc that is not in $FDcomp (in key "extra") and 2) all elements from $FSsrc that is difference from the ones in $FDcomp
+        * 
+        * @param       [type]          $FDsrc: ...
+        * @param       [type]          $FDcomp: ...
+        * @return      [type]          ...
         */
        function getDatabaseExtra($FDsrc, $FDcomp)      {
                $extraArr=array();
@@ -3727,6 +4201,11 @@ From TypoScript: (GD only, GD+IM, IM)
 
        /**
         * Compares an array with field definitions with $TCA array
+        * 
+        * @param       [type]          $FDsrc: ...
+        * @param       [type]          $TCA: ...
+        * @param       [type]          $onlyFields: ...
+        * @return      [type]          ...
         */
        function compareDatabaseAndTCA($FDsrc, $TCA, $onlyFields=0)     {
                $extraArr=array();
@@ -3781,6 +4260,10 @@ From TypoScript: (GD only, GD+IM, IM)
 
        /**
         * Compares the $TCA array with a field definition array
+        * 
+        * @param       [type]          $TCA: ...
+        * @param       [type]          $FDcomp: ...
+        * @return      [type]          ...
         */
        function compareTCAandDatabase($TCA, $FDcomp)   {
                $extraArr=array();
@@ -3812,6 +4295,10 @@ From TypoScript: (GD only, GD+IM, IM)
 
        /**
         * Returns an array with SQL-statements that is needed to update according to the diff-array
+        * 
+        * @param       [type]          $diffArr: ...
+        * @param       [type]          $keyList: ...
+        * @return      [type]          ...
         */
        function getUpdateSuggestions($diffArr,$keyList="extra,diff")   {
                $statements=array();
@@ -3911,6 +4398,9 @@ From TypoScript: (GD only, GD+IM, IM)
        
        /**
         * Suggests a field definition for a TCA config array.
+        * 
+        * @param       [type]          $fieldInfo: ...
+        * @return      [type]          ...
         */
        function suggestFieldDefinition($fieldInfo)     {
                $out="";
@@ -3986,6 +4476,9 @@ From TypoScript: (GD only, GD+IM, IM)
 
        /**
         * Private
+        * 
+        * @param       [type]          $arr: ...
+        * @return      [type]          ...
         */
        function getItemArrayType($arr) {
                if (is_array($arr))     {
@@ -4013,6 +4506,9 @@ From TypoScript: (GD only, GD+IM, IM)
 
        /**
         * Private
+        * 
+        * @param       [type]          $len: ...
+        * @return      [type]          ...
         */
        function getItemBlobSize($len)  {
                return ($len>255 ? "tiny" : "")."blob NOT NULL";
@@ -4020,6 +4516,10 @@ From TypoScript: (GD only, GD+IM, IM)
 
        /**
         * Should suggest a TCA configuration for a specific field.
+        * 
+        * @param       [type]          $fieldName: ...
+        * @param       [type]          $fieldInfo: ...
+        * @return      [type]          ...
         */
        function suggestTCAFieldDefinition($fieldName,$fieldInfo)       {
                list($type,$len) = split(" |\(|\)",$fieldInfo,3);
@@ -4161,6 +4661,8 @@ $out='
 
        /**
         * Includes TCA
+        * 
+        * @return      [type]          ...
         */
        function includeTCA()   {
                global $TCA;
@@ -4191,13 +4693,18 @@ $out='
        
 
 
-       // **********************
-       // GENERAL FUNCTIONS
-       // **********************
-
+       /**********************
+        *
+        * GENERAL FUNCTIONS
+        *
+        **********************/
 
        /**
         * This creates a link to the given $url. If $link is set, that'll be the link-text
+        * 
+        * @param       [type]          $url: ...
+        * @param       [type]          $link: ...
+        * @return      [type]          ...
         */
        function linkIt($url,$link="")  {
                return '<a href="'.$url.'" target="_blank">'.($link?$link:$url).'</a>';
@@ -4220,6 +4727,12 @@ $out='
 
        /**
         * This "prints" a section with a message to the ->sections array
+        * 
+        * @param       [type]          $head: ...
+        * @param       [type]          $short_string: ...
+        * @param       [type]          $long_string: ...
+        * @param       [type]          $type: ...
+        * @return      [type]          ...
         */
        function printSection($head, $short_string, $long_string, $type)        {
                $icon="";
@@ -4257,6 +4770,10 @@ $out='
 
        /**
         * Wraps the str in a font-tag with verdana 1
+        * 
+        * @param       [type]          $str: ...
+        * @param       [type]          $size: ...
+        * @return      [type]          ...
         */
        function fw($str,$size=1)       {
                if ($GLOBALS["CLIENT"]["SYSTEM"]=="unix" && $GLOBALS["CLIENT"]["BROWSER"]=="konqu")     {
@@ -4267,6 +4784,9 @@ $out='
 
        /**
         * Wraps the str in a font-tag with verdana 1
+        * 
+        * @param       [type]          $str: ...
+        * @return      [type]          ...
         */
        function fwheader($str) {
        &nb