Tons of changes made to the CORE. All scripts has more a less been modified. Primaril...
authorKasper Skårhøj <kasper@typo3.org>
Thu, 11 Dec 2003 12:58:49 +0000 (12:58 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Thu, 11 Dec 2003 12:58:49 +0000 (12:58 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@60 709f56b5-9817-0410-a4d7-c38de5d9e867

149 files changed:
ChangeLog
TODO.txt
t3lib/README.txt
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_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_iconworks.php
t3lib/class.t3lib_install.php
t3lib/class.t3lib_loadmodules.php
t3lib/class.t3lib_modsettings.php
t3lib/class.t3lib_pagetree.php
t3lib/class.t3lib_parsehtml.php
t3lib/class.t3lib_positionmap.php
t3lib/class.t3lib_querygenerator.php
t3lib/class.t3lib_recordlist.php
t3lib/class.t3lib_stdgraphic.php
t3lib/class.t3lib_superadmin.php
t3lib/class.t3lib_tceforms.php
t3lib/class.t3lib_tcemain.php
t3lib/class.t3lib_timetrack.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/ext_php_api.dat [new file with mode: 0644]
t3lib/gfx/clear_all_cache.gif [new file with mode: 0755]
t3lib/gfx/clear_cache_files_in_typo3c.gif [new file with mode: 0755]
t3lib/gfx/loginbox_image.jpg [new file with mode: 0755]
t3lib/gfx/typo3logo.gif
t3lib/thumbs.php
typo3/README.txt
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/border.html
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/close.html
typo3/db_list.php
typo3/db_new.php
typo3/dev/README.txt [new file with mode: 0755]
typo3/dev/dump_template_tables.php
typo3/dev/phpinfo.php
typo3/dummy.php
typo3/ext_php_api.dat [new file with mode: 0644]
typo3/file_edit.php
typo3/file_list.php
typo3/file_newfolder.php
typo3/file_rename.php
typo3/file_upload.php
typo3/index.php
typo3/init.php
typo3/install/README.txt [new file with mode: 0755]
typo3/listframe_loader.php
typo3/login_frameset.php
typo3/logout.php
typo3/mod/README.txt [new file with mode: 0755]
typo3/mod/help/about/index.php
typo3/mod/tools/em/class.kickstarter.php
typo3/mod/tools/em/index.php
typo3/mod/web/func/index.php
typo3/mod/web/info/index.php
typo3/mod/web/perm/index.php
typo3/move_el.php
typo3/show_item.php
typo3/show_rechis.php
typo3/stylesheet.css
typo3/sysext/README.txt [new file with mode: 0755]
typo3/sysext/cms/ext_php_api.dat
typo3/sysext/cms/ext_tables.sql
typo3/sysext/cms/layout/class.tx_cms_layout.php [new file with mode: 0755]
typo3/sysext/cms/layout/conf.php
typo3/sysext/cms/layout/db_layout.php [new file with mode: 0755]
typo3/sysext/cms/layout/db_new_content_el.php [new file with mode: 0644]
typo3/sysext/cms/layout/locallang_db_new_content_el.php [new file with mode: 0755]
typo3/sysext/cms/tbl_cms.php
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_menu.php
typo3/sysext/cms/tslib/class.tslib_pagegen.php
typo3/sysext/cms/tslib/media/scripts/example_itemArrayProcFunc.php
typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc
typo3/sysext/cms/tslib/media/scripts/gmenu_foldout.php
typo3/sysext/cms/tslib/media/scripts/plaintextLib.inc
typo3/sysext/cms/tslib/media/scripts/testscript_EXT.php
typo3/sysext/cms/web_info/class.tx_cms_webinfo.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.fr.php
typo3/sysext/lang/locallang_core.it.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.se.php
typo3/sysext/lang/locallang_core.si.php
typo3/sysext/lang/locallang_core.tr.php
typo3/sysext/lang/locallang_show_rechis.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 548595d..ce9c45f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,10 @@ PHP:
 !!! Function t3lib_div::imagefinder, t3lib_div::linkfinder, t3lib_div::getStrippedURL, t3lib_div::getMimeType, t3lib_div::debug_white_space, t3lib_div::debug_code, t3lib_div::parsetime, t3lib_div::hardspace, t3lib_div::break_text, t3lib_div::unbreak_text removed
 !!! The font files "arial.ttf" and "verdana.ttf" has been removed from the folder t3lib/fonts/ and substituted with similar typefaces, "nimbus.ttf" and "vera.ttf" respectively.
 !!! The script "t3lib/formmail.php" has been removed. Was not used and didn't work anyways.
+!!! The classes t3lib_pagetree and t3lib_browsetree has been divided into four new classes (folder,page,browse + treeview) - and as a rule of thumb, the API has been modified so much that you should rather check all you applications using these classes in DETAIL! Consider it a reimplementation.
+!!! The three rte_*.php scripts in TYPO3 core has been moved TO the "rte" extension! This also means that any extension classes must have updated their XCLASS registration keys to the new file positions.
+!!! status_file.php is gone...
+!!! The typo3/ scripts db_new_content_el.php and db_layout.php has been moved into the sysext/cms/layout/ folder. Further, the classes have been remodelled a lot. If you link to these scripts or extend their classes in your applications, you should observe the compatibility!
 Charsets:
 - A new class "t3lib_cs" has been added. It contains homemade functions for conversion to and from a list of charsets (conversion tables found in t3lib/csconvtbl/). The conversion could be speeded up enourmously by using PHP functions but I simply didn't find any that could be used. By time we can substitute the PHP-processing with internal PHP functions if possible.
 - In TYPO3_CONF_VARS we can now set up a system charset. [BE][forceCharset] This is used a) for storage of information and b) for whole backend. Default is that charset of the current user (as always), but clearly recommended is "UTF-8"!!!
index c77393b..84e4350 100755 (executable)
--- a/TODO.txt
+++ b/TODO.txt
@@ -27,6 +27,7 @@ General:
 - Feature: Controlling access to function menu modules as well (thus we could have a user-module inside ?Template? which could edit the constants field)
 - Feature: Web >plugins -> to be a main module where people can place cmodules for their extension.
 
+
 TCEmain:
 - Commenting of the class.
 - Charset:
@@ -182,6 +183,7 @@ Wizards:
 - Finish the colorpicker! Some other person can be in charge of this (See "APPENDIX: Colorpicker")
 - Add wizard icon to TSconfig and Setup/Constants fields for immediate syntax highlighting (in popup window)
 - wizard_add, _edit and _list can be used fantastic to lead the user through multiple 1:n relations but than he starts to be confused if the records he created apear somewhere else, tries to edit them directly there, relations get lost, phone rings. (Peter K?hn). 
+- forms and table wizards should be configurable for making XML structures alternatively to the currently formatting.
 
 Interface:
 - Icons (see Bugs/Additions folder)
@@ -261,6 +263,7 @@ EM:
 - Feature: EM suggest clear-cache af scripts?
 - Feature: New category, "templates"
 - Feature: New review state: security-screened (light review, not quality oriented)
+- Feature: em_conf: "depreciated flag: Beskrivelse af, hvorfor den er depreciated"
 - Install: Select other repository URLS in selector box?
 - Install: Extensions which can point the import/export to a directory with import-files.
 - Install: Updates of plugin checks if there is a local manual.sxw file. If there is the manual is also downloaded. Maybe people can set a flag in the configuration that manuals should always be fetched. (Some of this is already implemented)
@@ -284,6 +287,7 @@ EM:
 - BUG: Clear cache files should remove ALL "temp_CACHED_*" files in typo3conf/ (not just the current two)
 - BUG: detection of single quotes in XCLASS and CONF.PHP file cases (and wherever a regex searches for code snippets!). 
 - BUG: MSIE4: Cannot make backup of extensions (and probably not export them either) because the header-mime-typen is not registered as it should be.
+- BUG: Download of extensions (compressed...) will sometimes NOT get the same MD5 key after being saved (with any browser it seems) as shown at the download link. Origin of error not know. Please help if you encounter the problem.
 - DOC: "Extension API" manual.sxw!
 - Check mailbox for more... ?
 - Related: The KickStarter Wizard, in particular a) cleaner code output, b) merging updates.
@@ -337,7 +341,7 @@ NOTES
 APPENDIX 1: CLEANING UP FOR TYPO3 3.6.0
 ******************************************
 Cleaning for 3.6 involves:
-- XHTML compliance
+- XHTML transitional compliance
 - " to '
 - Commented functions
 
@@ -347,19 +351,34 @@ Cleaning for 3.6 involves:
 2a: Set "@access private"
 3: double to single quote (check for "\n")
 4: XHTML
+5: $Id$ CVS keyword expansion
+6: @package tags
+7: Function Index in scripts
+8: Depreciated use of t3lib_BEfunc::titleAttrib
+9: Generally, try to read all GPvars in init() functions and set them as internal variables - gives a nice, natural overview of what is used from the outsite
 
 
 Status 27/10 (TYPO3 Core + extensions "cms" and "lang" in sysext/ (but without global extensions in ext/ !)):
 - 2000 @param and @return tags in 800 functions still needs commenting (3800 tags in 1400 functions has already been done)
 - 50 scripts still needs cleaning for XHTML, comments and single-quotes
 
+Note on XHTML compliance:
+- We strive for XHTML transitional / frames
+- Certain incompatibilities has been allowed for practical reasons (for now). These include:
+       - align="absmiddle" for images
+       - width/height properties for input tags when images are used
+       - missing "cols" attribute for textarea tags.
+       - Some attributes for framesets.
+       [The reason for allowing this is probably that I do not know any workaround to achieve the same effect. The problem of non-allowed attributes/values also rate very low in my understanding of XHTML compliancy - it is far more important with nesting integrity, char case of tags/attributes, etc.]
+
+
 ---------------------------------------------------------------
 NOTES ABOUT WHICH SCRIPTS HAS BEEN CLEANED AND WHICH REMAINS:
 ---------------------------------------------------------------
 Finished (XHTML, quotes, comments, revised-note), XQCR:
 (Indented scripts are still missing clean-up)
 
-t3lib________________________________________:
+t3lib/________________________________________:
 XQCR: t3lib/class.t3lib_admin.php
 XQCR: t3lib/class.t3lib_arraybrowser.php
 -QCR: t3lib/class.t3lib_basicfilefunc.php
@@ -369,17 +388,17 @@ XQCR: t3lib/class.t3lib_beuserauth.php
 XQCR: t3lib/class.t3lib_browsetree.php
 XQCR: t3lib/class.t3lib_clipboard.php
 -QC-: t3lib/class.t3lib_cs.php
-               t3lib/class.t3lib_diff.php
+XQCR: t3lib/class.t3lib_diff.php
 XQCR: t3lib/class.t3lib_div.php
-               t3lib/class.t3lib_dmailer.php
+               t3lib/class.t3lib_dmailer.php   [Pekue?]
                t3lib/class.t3lib_exec.php              [Rene]
                t3lib/class.t3lib_extfilefunc.php
 -QCR: t3lib/class.t3lib_extmgm.php
 -QCR: t3lib/class.t3lib_extobjbase.php
-               t3lib/class.t3lib_foldertree.php
+XQCR: t3lib/class.t3lib_foldertree.php
 -QCR: t3lib/class.t3lib_formmail.php
                t3lib/class.t3lib_fullsearch.php
-               t3lib/class.t3lib_htmlmail.php
+               t3lib/class.t3lib_htmlmail.php  [Pekue?]
 XQCR: t3lib/class.t3lib_iconworks.php
                t3lib/class.t3lib_install.php
 -QCR: t3lib/class.t3lib_loaddbgroup.php
@@ -387,10 +406,10 @@ XQCR: t3lib/class.t3lib_iconworks.php
 -QCR: t3lib/class.t3lib_matchcondition.php
                t3lib/class.t3lib_modsettings.php       [Rene]
 XQCR: t3lib/class.t3lib_page.php
-               t3lib/class.t3lib_pagetree.php
+XQCR: t3lib/class.t3lib_pagetree.php
 XQCR: t3lib/class.t3lib_parsehtml.php
                a.Q..: t3lib/class.t3lib_parsehtml_proc.php (45)
-               t3lib/class.t3lib_positionmap.php
+XQCR: t3lib/class.t3lib_positionmap.php
                t3lib/class.t3lib_querygenerator.php
 -QCR: t3lib/class.t3lib_readmail.php
 XQCR: t3lib/class.t3lib_recordlist.php
@@ -402,7 +421,7 @@ XQCR: t3lib/class.t3lib_recordlist.php
                t3lib/class.t3lib_tcemain.php
 XQCR: t3lib/class.t3lib_timetrack.php
 -QCR: t3lib/class.t3lib_transferdata.php
-               t3lib/class.t3lib_treeview.php
+XQCR: t3lib/class.t3lib_treeview.php
 XQCR: t3lib/class.t3lib_tsfebeuserauth.php
 -QCR: t3lib/class.t3lib_tsparser.php
                t3lib/class.t3lib_tsparser_ext.php
@@ -419,7 +438,11 @@ XQCR: template.php
 -QCR: t3lib/stddb/tables.php
 -QCR: t3lib/stddb/tbl_be.php
 
-cms_______________________________________:
+
+sysext/lang/___________________________________________:
+XQCR: lang.php
+
+sysext/cms/___________________________________________:
 XQCR: tslib/class.tslib_content.php
 XQCR: tslib/class.tslib_fe.php
 -QCR: tslib/class.tslib_fetce.php
@@ -453,87 +476,162 @@ XQCR: tslib/media/scripts/xmlversionLib.inc
 -Q-.: tslib/publish.php
 .QCR: tslib/showpic.php
 XQCR: web_info/class.tx_cms_webinfo.php
+XQCR: layout/db_layout.php
+XQCR: layout/class.tx_cms_layout.php
+XQCR: layout/db_new_content_el.php
 
-lang___________________________________________:
-XQCR: lang.php
-
-
-
-typo3___________________________________________:
+typo3/___________________________________________:
 XQCR: alt_clickmenu.php
 XQCR: alt_db_navframe.php
-               alt_doc.php             TODO: Check "redirect" GPvar for XSS hole!?
-               alt_doc_nodoc.php
+XQCR: alt_doc.php              TODO: Check "redirect" GPvar for XSS hole!?
+XQCR: alt_doc_nodoc.php
 XQCR: alt_file_navframe.php
 XQCR: alt_intro.php
 XQCR: alt_main.php
 XQCR: alt_menu.php
 XQCR: alt_menu_sel.php
 XQCR: alt_mod_frameset.php
-               alt_palette.php
+XQCR: alt_palette.php
 XQCR: alt_shortcut.php
 XQCR: alt_toplogo.php
 XQCR: alt_topmenu_dummy.php
-               browse_links.php
-               browser.php
+XQCR: browse_links.php
+XQCR: browser.php
 XQCR: class.alt_menu_functions.inc
-               class.db_layout.inc
-               class.db_list.inc
-               class.db_list_extra.inc
+XQCR: class.db_list.inc
+XQCR: class.db_list_extra.inc
 XQCR: class.file_list.inc
-               class.show_rechis.inc
-               db_layout.php
-               db_list.php
+XQCR: class.show_rechis.inc
+XQCR: db_list.php
 XQCR: db_new.php
-               db_new_content_el.php
+XQCR: db_new_content_el.php
 default.htm
 default.html
 XQCR: dummy.php
 XQCR: file_edit.php
 XQCR: file_list.php
-               file_newfolder.php
-               file_rename.php
-               file_upload.php
-               index.php               TODO: Check "redirect" GPvar for XSS hole!?
--QC-:  index_re.php
+XQCR: file_newfolder.php
+XQCR: file_rename.php
+XQCR: file_upload.php
+XQCR: index.php                TODO: Check "redirect" GPvar for XSS hole!?
+-QC-: index_re.php
 -Q-R: init.php
 XQCR: listframe_loader.php
-               login_frameset.php
--QC-:  logout.php              TODO: Check "redirect" GPvar for XSS hole!?
-               move_el.php
-               rte_cleaner.php
-               rte_select_image.php
-               rte_user.php
-               show_item.php
+XQCR: login_frameset.php
+-QC-: logout.php               TODO: Check "redirect" GPvar for XSS hole!?
+XQCR: move_el.php
+               show_item.php                           [Peter Kuehn]
 XQCR: show_rechis.php
-               status_file.php
--QCR:  tce_db.php
+-QCR: tce_db.php
 -QCR: tce_file.php
 XQCR: template.php
-XQCR:  view_help.php
-               wizard_add.php
+XQCR: view_help.php
+XQCR: wizard_add.php
                wizard_colorpicker.php          [Matthias]
-               wizard_edit.php
-               wizard_forms.php
-               wizard_list.php
-               wizard_rte.php
-               wizard_table.php
-               wizard_tsconfig.php
-
+XQCR: wizard_edit.php
+XQCR: wizard_forms.php
+XQCR: wizard_list.php
+XQCR: wizard_rte.php
+XQCR: wizard_table.php
+XQCR: wizard_tsconfig.php
 
 XQCR: mod/help/about/index.php:                TODO: Modernize content
                mod/tools/em/index.php
 XQCR: mod/web/info/index.php
 XQCR: mod/web/func/index.php
-               mod/web/perm/index.php
+XQCR: mod/web/perm/index.php
+
+
+typo3/ext/_____________________________________:
+OK             aboutmodules/
+               belog/          (2 / 500)
+               beuser/         (1 / 1300)
+OK             beuser_tracking/                                        -> move
+               classic_welcome/        (1/262)                 -> move
+               cms_plaintext_import/   (1/200)
+OK             conf_userts/
+OK             context_help/
+               css_styled_content/             (1/200)         [H]
+OK             design_components/              ->move
+               direct_mail/            (3/2500)        [Peter Kuehn] + class.t3lib_htmlmail.php
+OK             direct_mail_subscription/
+XQCR:  extra_page_cm_options/
+-QCR:  extrep/
+               extrep_wizard/          (2/4500)                [H]
+OK             feuser_admin/
+               freesite/                       (2/1600)
+XQCR:  func_wizards/
+               imagelist/                      (1/250)
+               impexp/                         (2/2000)                [H]
+               indexed_search/         (4/3500)                
+               info_pagetsconfig/      (1/200)
+OK             install/                                        + class.t3lib_install.php / class.t3lib_superadmin.php
+               lowlevel/                       (2/800)                 [H]
+XQ-R:  metatags/
+               phpmyadmin/                     (1/130)
+               plugin_mgm/                     (1/300) ->move? remove?
+               quickhelp/                      (1/80)
+               rte/                            (5/1900)                [H]
+OK             rte_conf/
+OK             setoldpluginlist/
+               setup/                          (1/400)
+OK             skin1/
+OK             static_file_edit/
+               sys_action/                     (1/400)
+               sys_messages/           (1/450)
+OK             sys_note/               
+               sys_notepad/            (1/130)
+OK             sys_stat/
+               sys_todos/                      (1/1100)                
+OK             sys_workflows/          
+               taskcenter/                     (4/400)                 
+               taskcenter_modules/             (1/100)
+               taskcenter_recent/              (1/150)
+               taskcenter_rootlist/    (1/50)
+               tipafriend/                             (1/260)
+OK             tsconfig_help/
+OK             ts_language_de/
+OK             ts_language_dk/
+OK             ts_language_fr/
+OK             ts_language_nl/
+OK             ts_language_no/
+               tstemplate/                             (1/450)         + class.t3lib_tsparser_ext.php (1700)
+               tstemplate_analyzer/    (1/250)
+               tstemplate_ceditor/             (1/250)
+               tstemplate_info/                (1/450)
+               tstemplate_objbrowser/  (1/500)
+               tstemplate_styler/              (1/1700)
+OK             tt_address/
+               tt_board/                               (3/1200)
+               tt_calender/                    (1/170)
+               tt_guest/                               (2/350)
+               tt_links/                                                       ->move / depreciated!
+               tt_news/                                (1/750)
+               tt_poll/                                (2/400)         [Rene F]
+               tt_products/                    (5/2000)        [? Peter Kuehn]
+               tt_rating/                              (3/550)         [Rene F]
+               viewpage/                               (2/200)
+XQRC:  wizard_crpages/                 
+XQRC:  wizard_sortpages/
+
+32,5 K Codes lines....
+
+For all extensions (even those approved):
+- Remember to add package tags to all classes!
+- Write documentation for each
+- Check HTML source / CSS usage / XHTML compliancy / That icons are skinnable (add to "skin360")
+- $LANG->getLL() are htmlspecialchars()'ed
+
+
+
+
 
-  
 *******************
 APPENDIX 2: XHTML
 *******************
 Overview of implications before implementation:
 - UTF-8 encoding is in fact expected by XML! So the real charset must be set
-- Wellformedness: Nesting ok. All img tags must be ended with />
+- Wellformedness: Nesting ok. All img tags must be ended with /> (frame,base,meta,link,img,br,hr,area,input)
 - Lowercase for elements and attributes (and everything else...) + stylesheet element and attribute names.
 - All attributes in quotes
 - Minimized values not allowed: Must do this: selected="selected"
@@ -551,13 +649,13 @@ Practical steps for creating XHTML compliance:
 
 - lowercase: <(td|tr|p|div|table|b|i|u|a)
 - attributes in lowercase and ""; TYP: bgColor, border=0 cellspacing=0 cellpadding=0, valign=top, onClick, onChange, onSubmit, method="POST", type="Submit"
-- Ending tags: <br>, <hr>, <input>, <img>
+- Ending tags: <br>, <hr>, <input>, <img> (Longer list: frame,base,meta,link,img,br,hr,area,input)
 - shorthand: checked, selected, multiple, nowrap
 - href="", action="", src="", onclick= tags: htmlspecialchars() of URLS
-- <img -> ' alt="" />'    REGEX: <img[^>]*>
+- <img -> ' alt="" />'    REGEX: <img[^>]*[^-]>
 - FINDING attributes with no quotes:
 ([[:space:]]+)(class|face|hspace|vspace|rowspan|bgcolor|src|colspan|align|color|valign|border|width|height|cellpadding|cellspacing)=([^[:space:]>"']+)
-
+... and replace with: \1\2="\3"
 
 
 
@@ -917,7 +1015,7 @@ Bugs, considerations, notes
 - JavaScript: escape() doesn't rawurlencode the "+"-character. This can be a problem, eg. when trying to rename files with a plus in the name. I have made an alternative escape-function. 
 - PDF-files over 600 k are not rendered by ImageMagick. Less than 270 is! How come and is this true. Number of pages? 
 - When GDlib is disabled it can be very confusing that record icons does not change their look according to hidden/starttime/endtime etc...
-
+- many files in typo3temp/ slows down processing. Eg. a image resize with 33.000 files in typo3temp/ took 3 seconds where it would take 40 ms when the folder is clean. (on linux)
 
 
 **************************************
index 37f26d5..07727d8 100755 (executable)
@@ -6,4 +6,5 @@ functionalities of TYPO3 such as manipulation the
 database (tce_main.php), providing user authentication 
 and datatransfer to the TYPO3 backend to name a few.
 
-Please refer to the document "Inside TYPO3" for details on the TYPO3 core.
\ No newline at end of file
+Please refer to the document "Inside TYPO3" for details on the TYPO3 core.
+The document "TYPO3 Core API" will also contain information on these classes.
\ No newline at end of file
index 9f90858..be3f95c 100644 (file)
@@ -121,11 +121,11 @@ class t3lib_admin {
                        $a++;
                        $newID =$row['uid'];
                        if ($this->genTree_makeHTML)    {       
-                               $this->genTree_HTML.=chr(10).'<div><nobr>';
+                               $this->genTree_HTML.=chr(10).'<div><span class="nobr">';
                                $PM = 'join';
                                $LN = ($a==$c)?'blank':'line';
                                $BTM = ($a==$c)?'bottom':'';
-                               $this->genTree_HTML.= $depthData.'<img src="'.$this->backPath.'t3lib/gfx/ol/'.$PM.$BTM.'.gif" width="18" height="16" align="top" alt="" /><img src="'.$this->backPath.t3lib_iconWorks::getIcon('pages',$row).'" width="18" height="16" align="top" alt="" />'.htmlspecialchars($row['uid'].': '.t3lib_div::fixed_lgd(strip_tags($row['title']),50)).'</nobr></div>';
+                               $this->genTree_HTML.= $depthData.'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/'.$PM.$BTM.'.gif','width="18" height="16"').' align="top" alt="" />'.t3lib_iconWorks::getIconImage('pages',$row,$this->backPath,'align="top"').htmlspecialchars($row['uid'].': '.t3lib_div::fixed_lgd(strip_tags($row['title']),50)).'</span></div>';
                        }
 
                        if (isset($page_idlist[$newID]))        {
@@ -136,7 +136,7 @@ class t3lib_admin {
                        if ($row['hidden']) {$this->recStat['hidden']++;}
                        $this->recStat['doktype'][$row['doktype']]++;
                        
-                       $this->genTree($newID,$this->genTree_HTML ? $depthData.'<img src="'.$this->backPath.'t3lib/gfx/ol/'.$LN.'.gif" width="18" height="16" align="top" alt="" />'  : '');
+                       $this->genTree($newID,$this->genTree_HTML ? $depthData.'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/'.$LN.'.gif','width="18" height="16"').' align="top" alt="" />'  : '');
                }
                return (mysql_num_rows($res));
        }
@@ -172,7 +172,7 @@ class t3lib_admin {
        /**
         * Fixes lost record from $table with uid $uid by setting the PID to zero. If there is a disabled column for the record that will be set as well.
         * 
-        * @param       string          Tablename
+        * @param       string          Database tablename
         * @param       integer         The uid of the record which will have the PID value set to 0 (zero)
         * @return      boolean         True if done.
         */
@@ -305,7 +305,7 @@ class t3lib_admin {
        /**
         * This selects non-empty-records from the tables/fields in the fkey_array generated by getGroupFields()
         * 
-        * @param       array           
+        * @param       array           Array with tables/fields generated by getGroupFields()
         * @return      void            
         * @see getGroupFields()
         */
@@ -471,7 +471,7 @@ class t3lib_admin {
         * Finding all references to record based on table/uid
         * 
         * @param       string          Table name
-        * @param       integer         Uid
+        * @param       integer         Uid of database record
         * @return      array           Array with other arrays containing information about where references was found
         */
        function whereIsRecordReferenced($searchTable,$id)      {
@@ -505,7 +505,7 @@ class t3lib_admin {
         * Finding all references to file based on uploadfolder / filename
         * 
         * @param       string          Upload folder where file is found
-        * @param       string          filename
+        * @param       string          Filename to search for
         * @return      array           Array with other arrays containing information about where references was found
         */
        function whereIsFileReferenced($uploadfolder,$filename) {
index 9de8252..311f6ee 100644 (file)
@@ -109,7 +109,7 @@ class t3lib_arrayBrowser    {
 
 
                        $HTML.=$depthData;
-                       $theIcon='<img src="'.$GLOBALS['BACK_PATH'].'t3lib/gfx/ol/'.$PM.$BTM.'.gif" width="18" height="16" align="top" border="0" alt="" />';
+                       $theIcon='<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/ol/'.$PM.$BTM.'.gif','width="18" height="16"').' align="top" border="0" alt="" />';
                        if ($PM=='join')        {
                                $HTML.=$theIcon;
                        } else {
@@ -136,7 +136,7 @@ class t3lib_arrayBrowser    {
                        $HTML.='<br />';
                                
                        if ($deeper)    {
-                               $HTML.=$this->tree($arr[$key], $depth, $depthData.'<img src="'.$GLOBALS['BACK_PATH'].'t3lib/gfx/ol/'.$LN.'.gif" width="18" height="16" align="top" alt="" />');
+                               $HTML.=$this->tree($arr[$key], $depth, $depthData.'<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/ol/'.$LN.'.gif','width="18" height="16"').' align="top" alt="" />');
                        }
                }
                return $HTML;
index 55d9a08..5f0aa83 100644 (file)
@@ -417,7 +417,7 @@ class t3lib_basicFileFunctions      {
         * @return      string          Output string with any characters not matching [.a-zA-Z0-9_-] is substituted by '_'
         */
        function cleanFileName($fileName)       {
-               $theNewName = ereg_replace('[^\.[:alnum:]_-]','_',trim($fileName));
+               $theNewName = ereg_replace('[^.[:alnum:]_-]','_',trim($fileName));
                return $theNewName;
        }
 
index 8f75d00..e82bd13 100644 (file)
@@ -109,7 +109,7 @@ class t3lib_BEDisplayLog {
        }
 
        /**
-        * Get time label
+        * Get time label for log listing
         * 
         * @param       integer         Timestamp to display
         * @return      string          If the timestamp was also shown last time, then "." is returned. Otherwise the new timestamp formatted with ->doc->formatTime()
@@ -124,7 +124,7 @@ class t3lib_BEDisplayLog {
        }
 
        /**
-        * Get user name label
+        * Get user name label for log listing
         * 
         * @param       integer         be_user uid
         * @return      string          If username is different from last username then the username, otherwise "."
@@ -138,7 +138,7 @@ class t3lib_BEDisplayLog {
        }
 
        /**
-        * Get type label
+        * Get type label for log listing
         * 
         * @param       string          Key for the type label in locallang
         * @return      string          If labe is different from last type label then the label is returned, otherwise "."
@@ -152,7 +152,7 @@ class t3lib_BEDisplayLog {
        }
 
        /**
-        * Get action label
+        * Get action label for log listing
         * 
         * @param       string          Key for the action label in locallang
         * @return      string          If labe is different from last action label then the label is returned, otherwise "."
@@ -204,7 +204,7 @@ class t3lib_BEDisplayLog {
        }
 
        /**
-        * Reset
+        * Reset all internal "last..." variables to blank string.
         * 
         * @return      void            
         */
@@ -245,7 +245,7 @@ class t3lib_BEDisplayLog {
         * For all entries in the $inArray (expected to be filepaths) the basename is extracted and set as value (if $this->stripPath is set)
         * This is done for log-entries from the FILE modules
         * 
-        * @param       array           
+        * @param       array           Array of file paths
         * @return      array           
         * @see formatDetailsForList()
         */
index 5193dec..f000b10 100755 (executable)
@@ -97,7 +97,7 @@
  * 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)     
+ * 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='')       
@@ -303,7 +303,7 @@ class t3lib_BEfunc  {
         * 
         * Usage: 1
         * 
-        * @param       string          
+        * @param       string          [tablename]_[uid] string to explode
         * @return      array           
         */
        function splitTable_Uid($str)   {
@@ -425,7 +425,7 @@ class t3lib_BEfunc  {
         * 
         * Usage: 15
         * 
-        * @param       string          Tablename
+        * @param       string          Database tablename
         * @param       string          WHERE clause, eg. "uid=1"
         * @param       array           Field values as key=>value pairs.
         * @param       boolean         Set $slash=1 if values should be addslashes()'ed (default)
@@ -466,7 +466,7 @@ class t3lib_BEfunc  {
         * 
         * Usage: 13
         * 
-        * @param       integer         Page id
+        * @param       integer         Page id for which to create the root line.
         * @param       string          $clause can be used to select other criteria. It would typically be where-clauses that stops the proces if we meet a page, the user has no reading access to.
         * @return      array           Root line array, all the way to the page tree root (or as far as $clause allows!)
         */
@@ -512,7 +512,7 @@ class t3lib_BEfunc  {
         * 
         * Usage: 23
         * 
-        * @param       integer         Page uid
+        * @param       integer         Page uid for which to create record path
         * @param       string          $clause is additional where clauses, eg. "
         * @param       integer         Title limit
         * @return      string          Path of record
@@ -573,7 +573,7 @@ class t3lib_BEfunc  {
         * 
         * Usage: 21
         * 
-        * @param       integer         Page uid
+        * @param       integer         Page uid for which to check read-access
         * @param       string          $perms_clause is typically a value generated with $BE_USER->getPagePermsClause(1);
         * @return      array           Returns page record if OK, otherwise false.
         */
@@ -673,7 +673,7 @@ class t3lib_BEfunc  {
         * 
         * Usage: 3
         * 
-        * @param       string          
+        * @param       string          Content from the "types" configuration of TCA (the special configuration) - see description of function
         * @return      array           
         */
        function getSpecConfParts($str) {
@@ -698,7 +698,7 @@ class t3lib_BEfunc  {
         * 
         * Usage: 6
         * 
-        * @param       array           
+        * @param       array           Array of "[key]=[value]" strings to convert.
         * @return      array           
         */
        function getSpecConfParametersFromArray($pArr)  {
@@ -877,7 +877,7 @@ class t3lib_BEfunc  {
         * 
         * Usage: 26 (spec. in ext info_pagetsconfig)
         * 
-        * @param       integer         Page uid
+        * @param       integer         Page uid for which to create Page TSconfig
         * @param       array           If $rootLine is an array, that is used as rootline, otherwise rootline is just calculated
         * @param       boolean         If $returnPartArray is set, then the array with accumulated Page TSconfig is returned non-parsed. Otherwise the output will be parsed by the TypoScript parser.
         * @return      array           Page TSconfig
@@ -928,8 +928,8 @@ class t3lib_BEfunc  {
         * 
         * @param       integer         Page id
         * @param       array           Page TS array to write
-        * @param       string          Prefix
-        * @param       array           
+        * @param       string          Prefix for object paths
+        * @param       array           [Description needed.]
         * @return      void            
         * @internal
         * @see implodeTSParams(), getPagesTSconfig()
@@ -986,7 +986,7 @@ class t3lib_BEfunc  {
         * Usage: 3
         * 
         * @param       array           TypoScript structure
-        * @param       string          
+        * @param       string          Prefix string
         * @return      array           Imploded TypoScript objectstring/values
         */
        function implodeTSParams($p,$k='')      {
@@ -1115,9 +1115,9 @@ class t3lib_BEfunc        {
         * 
         * Usage: 2 (module web_perm)
         * 
-        * @param       array           
-        * @param       array           
-        * @param       boolean         
+        * @param       array           Group names
+        * @param       array           Group names (reference)
+        * @param       boolean         If $excludeBlindedFlag is set, then these records are unset from the array $usernames
         * @return      array           
         */
        function blindGroupNames($groups,$groupArray,$excludeBlindedFlag=0)     {
@@ -1255,15 +1255,15 @@ class t3lib_BEfunc      {
        /**
         * Returns either title='' or alt='' attribute. This depends on the client browser and whether it supports title='' or not (which is the default)
         * If no $content is given only the attribute name is returned.
-        * If $hsc is set, then content of the attribute is htmlspecialchar()'ed (which is good for XHTML and other reasons...)
         * The returned attribute with content will have a leading space char.
         * Warning: Be careful to submit empty $content var - that will return just the attribute name!
         * 
         * Usage: 203
         * 
-        * @param       string          
-        * @param       boolean         
+        * @param       string          String to set as title-attribute. If no $content is given only the attribute name is returned.
+        * @param       boolean         If $hsc is set, then content of the attribute is htmlspecialchar()'ed (which is good for XHTML and other reasons...)
         * @return      string          
+        * @depreciated         The idea made sense with older browsers, but now all browsers should support the "title" attribute - so just hardcode the title attribute instead!
         */
        function titleAttrib($content='',$hsc=0)        {
                global $CLIENT;
@@ -1274,7 +1274,7 @@ class t3lib_BEfunc        {
        /**
         * Returns alt="" and title="" attributes with the value of $content.
         * 
-        * @param       string          
+        * @param       string          Value for 'alt' and 'title' attributes (will be htmlspecialchars()'ed before output)
         * @return      string          
         */
        function titleAltAttrib($content)       {
@@ -1349,7 +1349,7 @@ class t3lib_BEfunc        {
                                        $params .= $size?'&size='.$size:'';
                                        $url = $thumbScript.'?&dummy='.$GLOBALS['EXEC_TIME'].$params;
                                        $onClick='top.launchView(\''.$theFile.'\',\'\',\''.$backPath.'\');return false;';
-                                       $thumbData.='<a href="#" onclick="'.htmlspecialchars($onClick).'"><img src="'.$backPath.$url.'" hspace="2" border="0" title="'.trim($theFile).'"'.$tparams.' alt="" /></a> ';
+                                       $thumbData.='<a href="#" onclick="'.htmlspecialchars($onClick).'"><img src="'.htmlspecialchars($backPath.$url).'" hspace="2" border="0" title="'.trim($theFile).'"'.$tparams.' alt="" /></a> ';
                                } else {
                                        $icon = t3lib_BEfunc::getFileIcon($ext);
                                        $url = 'gfx/fileicons/'.$icon;
@@ -1389,7 +1389,7 @@ class t3lib_BEfunc        {
         * @param       boolean         If $includeAttrib is set, then the 'title=""' attribute is wrapped about the return value, which is in any case htmlspecialchar()'ed already
         * @return      string          
         */
-       function titleAttribForPages ($row,$perms_clause='',$includeAttrib=1)   {
+       function titleAttribForPages($row,$perms_clause='',$includeAttrib=1)    {
                global $TCA,$LANG;
                $parts=array();
                $parts[] = 'id='.$row['uid'];
@@ -1430,7 +1430,7 @@ class t3lib_BEfunc        {
                        $parts[]=$LANG->sL($TCA['pages']['columns']['fe_group']['label']).' '.$label;
                }
                $out = htmlspecialchars(implode(' - ',$parts));
-               return $includeAttrib ? t3lib_BEfunc::titleAttrib().'="'.$out.'"' : $out;
+               return $includeAttrib ? 'title="'.$out.'"' : $out;
        }
 
        /**
@@ -1503,7 +1503,7 @@ class t3lib_BEfunc        {
         * 
         * @param       string          Table name, present in $TCA
         * @param       string          Field name
-        * @param       string          Wrap
+        * @param       string          Wrap value - set function description
         * @return      string          
         */
        function getItemLabel($table,$col,$printAllWrap='')     {
@@ -1529,7 +1529,7 @@ class t3lib_BEfunc        {
         * 
         * @param       string          Table name, present in TCA
         * @param       array           Row from table
-        * @param       boolean         If set, result is prepared for output: The output is cropped to a limited lenghty (depending on BE_USER->uc['titleLen']) and if no value is found for the title, '<em>[No title]</em>' is returned (localized)
+        * @param       boolean         If set, result is prepared for output: The output is cropped to a limited lenght (depending on BE_USER->uc['titleLen']) and if no value is found for the title, '<em>[No title]</em>' is returned (localized). Further, the output is htmlspecialchars()'ed
         * @return      string          
         */
        function getRecordTitle($table,$row,$prep=0)    {
@@ -1548,7 +1548,7 @@ class t3lib_BEfunc        {
                        }
                        if ($prep)      {
                                $t=htmlspecialchars(t3lib_div::fixed_lgd($t,$GLOBALS['BE_USER']->uc['titleLen']));
-                               if (!strcmp(trim($t),''))       $t='<em>['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title').']</em>';
+                               if (!strcmp(trim($t),''))       $t='<em>['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title',1).']</em>';
                        }
                        return $t;
                }
@@ -1701,7 +1701,7 @@ class t3lib_BEfunc        {
         * 
         * @param       string          Table name, present in TCA
         * @param       string          Table prefix
-        * @return      strign          List of fields.
+        * @return      string          List of fields.
         */
        function getCommonSelectFields($table,$prefix)  {
                global $TCA;
@@ -1812,7 +1812,7 @@ class t3lib_BEfunc        {
                if (is_array($TCA_DESCR[$table]) && is_array($TCA_DESCR[$table]['columns'][$field]) && ($BE_USER->uc['edit_showFieldHelp']=='icon' || $force))  {
                        $onClick = 'vHWin=window.open(\''.$BACK_PATH.'view_help.php?tfID='.($table.'.'.$field).'\',\'viewFieldHelp\',\'height=300,width=250,status=0,menubar=0,scrollbars=1\');vHWin.focus();return false;';
                        return '<a href="#" onclick="'.htmlspecialchars($onClick).'">'.
-                                       '<img src="'.$BACK_PATH.'gfx/helpbubble.gif" width="14" height="14" hspace="2" border="0" align="absmiddle"'.($GLOBALS['CLIENT']['FORMSTYLE']?' style="cursor:help;"':'').' alt="" />'.
+                                       '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/helpbubble.gif','width="14" height="14"').' hspace="2" border="0" class="absmiddle"'.($GLOBALS['CLIENT']['FORMSTYLE']?' style="cursor:help;"':'').' alt="" />'.
                                        '</a>';
                }
        }
@@ -1979,8 +1979,8 @@ class t3lib_BEfunc        {
         * 
         * Usage: 4
         * 
-        * @param       array           
-        * @param       array           
+        * @param       array           Module TS config array
+        * @param       array           Array of items from which to remove items.
         * @param       string          $TSref points to the "object string" in $modTSconfig
         * @return      array           The modified $itemArray is returned.
         */
@@ -2005,7 +2005,7 @@ class t3lib_BEfunc        {
         * 
         * Usage: 11
         * 
-        * @param       boolean         
+        * @param       string          Whether to set or clear the update signal. When setting, this value contains strings telling WHAT to set. At this point it seems that the value "updatePageTree" is the only one it makes sense to set.
         * @return      string          HTML code (<script> section)
         */
        function getSetUpdateSignal($set='')    {
@@ -2023,6 +2023,7 @@ class t3lib_BEfunc        {
                                while(list(,$v)=each($l))       {
                                        switch($v)      {
                                                case 'updatePageTree':
+                                               case 'updateFolderTree':
                                                        $out.='
                                        <script type="text/javascript">
                                        /*<![CDATA[*/
@@ -2490,8 +2491,8 @@ class t3lib_BEfunc        {
         * 
         * Usage: 19
         * 
-        * @param       string          Header
-        * @param       string          Content
+        * @param       string          Header string
+        * @param       string          Content string
         * @param       boolean         Will return an alert() with the content of header and text.
         * @param       boolean         Print header.
         * @return      void            
@@ -2506,12 +2507,12 @@ class t3lib_BEfunc      {
                                <head>
                                        <title>Error!</title>
                                </head>
-                               <body bgcolor="#cccccc" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">':'';
+                               <body bgcolor="white" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">':'';
                        echo '<div align="center">
                                        <table border="0" cellspacing="0" cellpadding="0" width="333">
                                                <tr>
                                                        <td align="center">'.
-                                                               ($GLOBALS["TBE_STYLES"]["logo_login"]?'<img src="'.$GLOBALS["BACK_PATH"].$GLOBALS["TBE_STYLES"]["logo_login"].'" alt="" />':'<img src="'.$GLOBALS["BACK_PATH"].'t3lib/gfx/typo3logo.gif" width="333" height="43" vspace="10" />').
+                                                               ($GLOBALS['TBE_STYLES']['logo_login']?'<img src="'.$GLOBALS['BACK_PATH'].$GLOBALS['TBE_STYLES']['logo_login'].'" alt="" />':'<img src="'.$GLOBALS['BACK_PATH'].'gfx/typo3logo.gif" width="333" height="43" vspace="10" />').
                                                        '</td>
                                                </tr>
                                                <tr>
@@ -2540,7 +2541,7 @@ class t3lib_BEfunc        {
         * 
         * Usage: 4
         * 
-        * @param       string          Path
+        * @param       string          Path to evaluate
         * @return      boolean         
         */
        function getPathType_web_nonweb($path)  {
@@ -2576,7 +2577,7 @@ class t3lib_BEfunc        {
         * 
         * Usage: 1
         * 
-        * @param       string          
+        * @param       string          String of parameters on multiple lines to parse into key-value pairs (see function description)
         * @return      array           
         */
        function processParams($params) {
@@ -2614,7 +2615,10 @@ class t3lib_BEfunc       {
                $theRows=array();
                while($row=mysql_fetch_assoc($res))     {
                        $theRows[]=$row;
-                       $out.='<nobr><a href="'.htmlspecialchars($script.'?id='.$row['uid']).'"><img src="'.$backPath.t3lib_iconWorks::getIcon('pages',$row).'" width="18" height="16" border="0" title="'.htmlspecialchars(t3lib_BEfunc::getRecordPath($row['uid'],$perms_clause,20)).'" align="top" alt="" />'.$row['title'].'</a></nobr><br />';
+                       $out.='<span class="nobr"><a href="'.htmlspecialchars($script.'?id='.$row['uid']).'">'.
+                                       t3lib_iconWorks::getIconImage('pages',$row,$backPath,'title="'.htmlspecialchars(t3lib_BEfunc::getRecordPath($row['uid'],$perms_clause,20)).'" align="top"').
+                                       htmlspecialchars($row['title']).
+                                       '</a></span><br />';
                }
                return array('rows'=>$theRows,'list'=>$out);
        }       
index 6057a42..88a20ce 100644 (file)
  *
  *
  *   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()       
+ *  150:     function trackBeUser($flag)       
+ *  163:     function checkLockToIP()  
+ *  183:     function backendCheckLogin()      
+ *  208:     function backendSetUC()   
+ *  243:     function overrideUC()     
+ *  253:     function resetUC()        
+ *  266:     function emailAtLogin()   
+ *  318:     function veriCode()       
  *
  * TOTAL FUNCTIONS: 8
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -141,8 +141,9 @@ class t3lib_beUserAuth extends t3lib_userAuthGroup {
        
        /**
         * If flag is set and the extensions 'beuser_tracking' is loaded, this will insert a table row with the REQUEST_URI of current script - thus tracking the scripts the backend users uses...
+        * This function works ONLY with the "beuser_tracking" extension and is depreciated since it does nothing useful.
         * 
-        * @param       boolean         
+        * @param       boolean         Activate insertion of the URL.
         * @return      void            
         * @access private
         */
index 8495936..2edd53d 100755 (executable)
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
 /** 
- * Generate a page-tree. OBS: remember $clause
+ * Generate a page-tree, browsable.
  *
  * $Id$
- * Revised for TYPO3 3.6 August/2003 by Kasper Skaarhoj
- * Maintained by René Fritz
+ * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
  *
  * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @coauthor   René Fritz <r.fritz@colorcube.de>
@@ -39,9 +38,9 @@
  *
  *
  *
- *   74: class t3lib_browseTree extends t3lib_treeView 
+ *   73: class t3lib_browseTree extends t3lib_treeView 
  *   82:     function init($clause='') 
- *  108:     function getTitleAttrib(&$row) 
+ *  105:     function getTitleAttrib($row) 
  *
  * TOTAL FUNCTIONS: 2
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -67,26 +66,23 @@ require_once (PATH_t3lib.'class.t3lib_treeview.php');
  * 
  * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @coauthor   René Fritz <r.fritz@colorcube.de>
- * @see class t3lib_treeView
+ * @see t3lib_treeView, t3lib_pageTree
  * @package TYPO3
  * @subpackage t3lib
  */
 class t3lib_browseTree extends t3lib_treeView {
 
        /**
-        * Initialize
+        * Initialize, setting what is necessary for browsing pages.
+        * Using the current user.
         * 
         * @param       string          Additional clause for selecting pages.
         * @return      void            
         */
        function init($clause='')       {
+                       // This is very important for making trees of pages: Filtering out deleted pages, pages with no access to and sorting them correctly:
                parent::init(' AND NOT deleted AND '.$GLOBALS['BE_USER']->getPagePermsClause(1).' '.$clause.' ORDER BY sorting');
 
-
-               $this->BE_USER = $GLOBALS['BE_USER'];
-               $this->titleAttrib = t3lib_BEfunc::titleAttrib();
-               $this->backPath = $GLOBALS['BACK_PATH'];
-
                $this->table='pages';
                $this->treeName='browsePages';
                $this->domIdPrefix = 'pages';
@@ -100,14 +96,37 @@ class t3lib_browseTree extends t3lib_treeView {
        }
 
        /**
-        * Creates title attribute for pages.
+        * Creates title attribute content for pages.
+        * Uses API function in t3lib_BEfunc which will retrieve lots of useful information for pages.
         * 
         * @param       array           The table row.
         * @return      string          
         */
-       function getTitleAttrib(&$row) {
+       function getTitleAttrib($row) {
                return t3lib_BEfunc::titleAttribForPages($row,'1=1 '.$this->clause,0);
        }
+       
+       /**
+        * Wrapping the image tag, $icon, for the row, $row (except for mount points)
+        * 
+        * @param       string          The image tag for the icon
+        * @param       array           The row for the current element
+        * @return      string          The processed icon input value.
+        * @access private
+        */
+       function wrapIcon($icon,$row)   {
+                       // Add title attribute to input icon tag
+               $theIcon = $this->addTagAttributes($icon,($this->titleAttrib ? $this->titleAttrib.'="'.$this->getTitleAttrib($row).'"' : ''));
+
+                       // Wrap icon in click-menu link.
+               if (!$this->ext_IconMode)       {
+                       $theIcon = $GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon($theIcon,$this->treeName,$this->getId($row),0);
+               } elseif (!strcmp($this->ext_IconMode,'titlelink'))     {
+                       $aOnClick = 'return jumpTo('.$this->getJumpToParm($row).',this,\''.$this->domIdPrefix.$this->getId($row).'_'.$this->bank.'\');';
+                       $theIcon='<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$theIcon.'</a>';
+               }
+               return $theIcon;
+       }
 }
 
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_browsetree.php'])       {
index c30f3d2..f799eba 100755 (executable)
  *  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')     
+ *  363:     function printContentFromTab($pad)        
+ *  437:     function padTitleWrap($str,$pad)  
+ *  454:     function linkItemText($str,$rec,$table='')        
+ *  479:     function isSelected($table,$uid)  
+ *  493:     function getSelectedRecord($table='',$uid='')     
+ *  516:     function selUrlDB($table,$uid,$copy=0,$deselect=0,$baseArray=array())     
+ *  532:     function selUrlFile($path,$copy=0,$deselect=0,$baseArray=array()) 
+ *  549:     function pasteUrl($table,$uid,$setRedirect=1)     
+ *  566:     function deleteUrl($setRedirect=1,$file=0)        
+ *  583:     function editUrl()        
+ *  604:     function removeUrl($table,$uid)   
+ *  614:     function cleanCurrent()   
+ *  641:     function elFromTable($matchTable='',$pad='')      
+ *  673:     function confirmMsg($table,$rec,$type,$clElements)        
+ *  716:     function removeElement($el)       
+ *  728:     function saveClipboard()  
+ *  738:     function currentMode()    
+ *  749:     function clLabel($key,$Akey='labels')     
  *
  *              SECTION: FOR USE IN tce_db.php:
- *  776:     function makePasteCmdArray($ref,$CMD)     
- *  805:     function makeDeleteCmdArray($CMD) 
+ *  790:     function makePasteCmdArray($ref,$CMD)     
+ *  819:     function makeDeleteCmdArray($CMD) 
  *
  *              SECTION: FOR USE IN tce_file.php:
- *  848:     function makePasteCmdArray_file($ref,$FILE)       
- *  870:     function makeDeleteCmdArray_file($FILE)   
+ *  862:     function makePasteCmdArray_file($ref,$FILE)       
+ *  884:     function makeDeleteCmdArray_file($FILE)   
  *
  * TOTAL FUNCTIONS: 30
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -166,7 +166,7 @@ class t3lib_clipboard {
         *              Array $cmd['el'] has keys = element-ident, value = element value (see description of clipData array in header)
         *              Selecting elements for 'copy' should be done by simultaneously setting setCopyMode.
         * 
-        * @param       array           
+        * @param       array           Array of actions, see function description
         * @return      void            
         */
        function setCmd($cmd)   {
@@ -278,8 +278,9 @@ class t3lib_clipboard {
                $elCount = count($this->elFromTable($this->fileMode?'_FILE':''));
                
                        // Upper header
-               $out[]='<tr bgcolor="'.$TBE_TEMPLATE->bgColor2.'">
-                       <td colspan="3" nowrap="nowrap" align="center"><strong>'.t3lib_div::danish_strtoupper($this->clLabel('clipboard','buttons')).'</strong></td>
+               $out[]='
+                       <tr class="bgColor2">
+                               <td colspan="3" nowrap="nowrap" align="center"><span class="uppercase"><strong>'.$this->clLabel('clipboard','buttons').'</strong></span></td>
                        </tr>';
 
                        // Button/menu header:
@@ -289,54 +290,64 @@ class t3lib_clipboard {
                
                        // Selector menu + clear button
                $opt=array();
-               $opt[]='<option value="" selected="selected">'.htmlspecialchars($this->clLabel('menu','rm')).'</option>';
-               if (!$this->fileMode && $elCount)       $opt[]='<option value="'.htmlspecialchars("document.location='".$this->editUrl()."&returnUrl='+top.rawurlencode(document.location);").'">'.htmlspecialchars($this->clLabel('edit','rm')).'</option>';
+               $opt[]='<option value="" selected="selected">'.$this->clLabel('menu','rm').'</option>';
+               if (!$this->fileMode && $elCount)       $opt[]='<option value="'.htmlspecialchars("document.location='".$this->editUrl()."&returnUrl='+top.rawurlencode(document.location);").'">'.$this->clLabel('edit','rm').'</option>';
                if ($elCount)   $opt[]='<option value="'.htmlspecialchars("
                        if(confirm(".$GLOBALS['LANG']->JScharCode(sprintf($LANG->sL('LLL:EXT:lang/locallang_core.php:mess.deleteClip'),$elCount)).")){
                                document.location='".$this->deleteUrl(0,$this->fileMode?1:0)."&redirect='+top.rawurlencode(document.location);
                        }
-                       ").'">'.htmlspecialchars($this->clLabel('delete','rm')).'</option>';
+                       ").'">'.$this->clLabel('delete','rm').'</option>';
                $selector_menu = '<select name="_clipMenu" onchange="eval(this.options[this.selectedIndex].value);this.selectedIndex=0;">'.implode('',$opt).'</select>';
                        
-               $out[]='<tr class="typo3-clipboard-head">
-                       <td>'.
-                       '<a href="'.htmlspecialchars($thumb_url).'#clip_head">'.
-                               '<img src="'.$this->backPath.'gfx/thumb_'.($this->clipData['_setThumb']?'s':'n').'.gif" width="21" height="16" vspace="2" border="0"'.t3lib_BEfunc::titleAttrib($this->clLabel('thumbmode_clip'),1).' alt="" />'.
-                               '</a>'.
-                       '<a href="'.htmlspecialchars($copymode_url).'#clip_head">'.
-                               '<img src="'.$this->backPath.'gfx/copymode_'.($this->currentMode()=='copy'?'s':'n').'.gif" width="21" height="16" vspace="2" border="0"'.t3lib_BEfunc::titleAttrib($this->clLabel('copymode'),1).' alt="" />'.
-                               '</a>'.
-                       '</td>
-                       <td width="95%">'.$selector_menu.'</td>
-                       <td><a href="'.htmlspecialchars($rmall_url).'#clip_head">'.$LANG->sL('LLL:EXT:lang/locallang_core.php:buttons.clear',1).'</a></td>
+               $out[]='
+                       <tr class="typo3-clipboard-head">
+                               <td>'.
+                               '<a href="'.htmlspecialchars($thumb_url).'#clip_head">'.
+                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/thumb_'.($this->clipData['_setThumb']?'s':'n').'.gif','width="21" height="16"').' vspace="2" border="0" title="'.$this->clLabel('thumbmode_clip').'" alt="" />'.
+                                       '</a>'.
+                               '<a href="'.htmlspecialchars($copymode_url).'#clip_head">'.
+                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/copymode_'.($this->currentMode()=='copy'?'s':'n').'.gif','width="21" height="16"').' vspace="2" border="0" title="'.$this->clLabel('copymode').'" alt="" />'.
+                                       '</a>'.
+                               '</td>
+                               <td width="95%">'.$selector_menu.'</td>
+                               <td><a href="'.htmlspecialchars($rmall_url).'#clip_head">'.$LANG->sL('LLL:EXT:lang/locallang_core.php:buttons.clear',1).'</a></td>
                        </tr>';
 
 
                        // Print header and content for the NORMAL tab:
-               $out[]='<tr bgcolor="'.$TBE_TEMPLATE->bgColor5.'">
-                       <td colspan="3"><a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('CB'=>array('setP'=>'normal')))).'#clip_head">'.
-                               '<img src="'.$this->backPath.'gfx/ol/'.($this->current=='normal'?'minus':'plus').'bullet.gif" width="18" height="16" border="0" align="top" alt="" />'.
-                               $this->padTitleWrap('Normal','normal').
-                               '</a></td>
+               $out[]='
+                       <tr class="bgColor5">
+                               <td colspan="3"><a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('CB'=>array('setP'=>'normal')))).'#clip_head">'.
+                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/'.($this->current=='normal'?'minus':'plus').'bullet.gif','width="18" height="16"').' border="0" align="top" alt="" />'.
+                                       $this->padTitleWrap('Normal','normal').
+                                       '</a></td>
                        </tr>';
                if ($this->current=='normal')   $out=array_merge($out,$this->printContentFromTab('normal'));
                
                        // Print header and content for the NUMERIC tabs:
                for ($a=1;$a<=$this->numberTabs;$a++)   {
-                       $out[]='<tr bgcolor="'.$TBE_TEMPLATE->bgColor5.'">
-                               <td colspan="3"><a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('CB'=>array('setP'=>'tab_'.$a)))).'#clip_head">'.
-                                       '<img src="'.$this->backPath.'gfx/ol/'.($this->current=='tab_'.$a?'minus':'plus').'bullet.gif" width="18" height="16" border="0" align="top" alt="" />'.
-                                       $this->padTitleWrap($this->clLabel('cliptabs').$a,'tab_'.$a).
-                                       '</a></td>
+                       $out[]='
+                               <tr class="bgColor5">
+                                       <td colspan="3"><a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('CB'=>array('setP'=>'tab_'.$a)))).'#clip_head">'.
+                                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/'.($this->current=='tab_'.$a?'minus':'plus').'bullet.gif','width="18" height="16"').' border="0" align="top" alt="" />'.
+                                               $this->padTitleWrap($this->clLabel('cliptabs').$a,'tab_'.$a).
+                                               '</a></td>
                                </tr>';
                        if ($this->current=='tab_'.$a)  $out=array_merge($out,$this->printContentFromTab('tab_'.$a));
                }
                
                        // Wrap accumulated rows in a table:
-               $output = '<a name="clip_head"></a><table cellpadding="0" cellspacing="1" border="0" width="290">'.implode('',$out).'</table>';
+               $output = '<a name="clip_head"></a>
+
+                       <!--
+                               TYPO3 Clipboard:
+                       -->
+                       <table cellpadding="0" cellspacing="1" border="0" width="290" id="typo3-clipboard">
+                               '.implode('',$out).'
+                       </table>';
                
                        // Wrap in form tag:
-               $output = '<form>'.$output.'</form>';
+               $output = '<form action="">'.$output.'</form>';
 
                        // Return the accumulated content:
                return $output;
@@ -358,25 +369,26 @@ class t3lib_clipboard {
                        while(list($k,$v)=each($this->clipData[$pad]['el']))    {
                                if ($v) {
                                        list($table,$uid) = explode('|',$k);
-                                       $bgCol = ($table=='_FILE'&&$this->fileMode)||($table!='_FILE'&&!$this->fileMode) ? t3lib_div::modifyhtmlColorAll($TBE_TEMPLATE->bgColor4,-20) : $TBE_TEMPLATE->bgColor4;
+                                       $bgColClass = ($table=='_FILE'&&$this->fileMode)||($table!='_FILE'&&!$this->fileMode) ? 'bgColor4-20' : 'bgColor4';
 
                                        if ($table=='_FILE')    {       // Rendering files/directories on the clipboard:
                                                if (@file_exists($v) && t3lib_div::isAllowedAbsPath($v))        {
                                                        $fI=pathinfo($v);
                                                        $icon = is_dir($v) ? 'folder.gif' : t3lib_BEfunc::getFileIcon(strtolower($fI['extension']));
                                                        $size=' ('.t3lib_div::formatSize(filesize($v)).'bytes)';
-                                                       $icon = '<img src="gfx/fileicons/'.$icon.'" width="18" height="16" border="0" hspace="20"'.t3lib_BEfunc::titleAttrib($fI['basename'].$size,1).' align="absmiddle" alt="" />';
+                                                       $icon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/fileicons/'.$icon,'width="18" height="16"').' border="0" hspace="20" class="absmiddle" title="'.htmlspecialchars($fI['basename'].$size).'" alt="" />';
                                                        $thumb= $this->clipData['_setThumb'] ? (t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],$fI['extension']) ? t3lib_BEfunc::getThumbNail($this->backPath.'thumbs.php',$v,' vspace="4"') : '') :'';
 
-                                                       $lines[]='<tr>
-                                                               <td bgcolor="'.$bgCol.'">'.$icon.'</td>
-                                                               <td bgcolor="'.$bgCol.'" nowrap="nowrap" width="95%">&nbsp;'.$this->linkItemText(htmlspecialchars(t3lib_div::fixed_lgd(basename($v),$GLOBALS['BE_USER']->uc['titleLen'])),$v).
-                                                                       ($pad=='normal'?(' <strong>('.htmlspecialchars($this->clipData['normal']['mode']=='copy'?$this->clLabel('copy','cm'):$this->clLabel('cut','cm')).')</strong>'):'').'&nbsp;'.($thumb?'<br />'.$thumb:'').'</td>
-                                                               <td bgcolor="'.$bgCol.'" align="center">'.
-                                                               '<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$v.'\', \'\'); return false;').'"><img src="'.$this->backPath.'gfx/zoom2.gif" width="12" height="12" hspace="2" border="0"'.t3lib_BEfunc::titleAttrib($this->clLabel('info','cm'),1).' alt="" /></a>'.
-                                                               '<a href="'.htmlspecialchars($this->removeUrl('_FILE',t3lib_div::shortmd5($v))).'#clip_head"><img src="'.$this->backPath.'gfx/close_12h.gif" width="11" height="12" border="0"'.t3lib_BEfunc::titleAttrib($this->clLabel('removeItem'),1).' alt="" /></a>'.
-                                                               '</td>
-                                                       </tr>';
+                                                       $lines[]='
+                                                               <tr>
+                                                                       <td class="'.$bgColClass.'">'.$icon.'</td>
+                                                                       <td class="'.$bgColClass.'" nowrap="nowrap" width="95%">&nbsp;'.$this->linkItemText(htmlspecialchars(t3lib_div::fixed_lgd(basename($v),$GLOBALS['BE_USER']->uc['titleLen'])),$v).
+                                                                               ($pad=='normal'?(' <strong>('.($this->clipData['normal']['mode']=='copy'?$this->clLabel('copy','cm'):$this->clLabel('cut','cm')).')</strong>'):'').'&nbsp;'.($thumb?'<br />'.$thumb:'').'</td>
+                                                                       <td class="'.$bgColClass.'" align="center">'.
+                                                                       '<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$v.'\', \'\'); return false;').'"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom2.gif','width="12" height="12"').' hspace="2" border="0" title="'.$this->clLabel('info','cm').'" alt="" /></a>'.
+                                                                       '<a href="'.htmlspecialchars($this->removeUrl('_FILE',t3lib_div::shortmd5($v))).'#clip_head"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/close_12h.gif','width="11" height="12"').' border="0" title="'.$this->clLabel('removeItem').'" alt="" /></a>'.
+                                                                       '</td>
+                                                               </tr>';
                                                } else {
                                                                // If the file did not exist (or is illegal) then it is removed from the clipboard immediately:
                                                        unset($this->clipData[$pad]['el'][$k]);
@@ -385,15 +397,16 @@ class t3lib_clipboard {
                                        } else {        // Rendering records:
                                                $rec=t3lib_BEfunc::getRecord($table,$uid);
                                                if (is_array($rec))     {
-                                                       $lines[]='<tr>
-                                                               <td bgcolor="'.$bgCol.'">'.$this->linkItemText(t3lib_iconWorks::getIconImage($table,$rec,$this->backPath,'hspace="20" '.t3lib_BEfunc::titleAttrib(t3lib_BEfunc::getRecordIconAltText($rec,$table),1)),$rec,$table).'</td>
-                                                               <td bgcolor="'.$bgCol.'" nowrap="nowrap" width="95%">&nbsp;'.$this->linkItemText(htmlspecialchars(t3lib_div::fixed_lgd(t3lib_BEfunc::getRecordTitle($table,$rec),$GLOBALS['BE_USER']->uc['titleLen'])),$rec,$table).
-                                                                       ($pad=='normal'?(' <strong>('.htmlspecialchars($this->clipData['normal']['mode']=='copy'?$this->clLabel('copy','cm'):$this->clLabel('cut','cm')).')</strong>'):'').'&nbsp;</td>
-                                                               <td bgcolor="'.$bgCol.'" align="center">'.
-                                                               '<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$table.'\', \''.intval($uid).'\'); return false;').'"><img src="'.$this->backPath.'gfx/zoom2.gif" width="12" height="12" hspace="2" border="0"'.t3lib_BEfunc::titleAttrib($this->clLabel('info','cm'),1).' alt="" /></a>'.
-                                                               '<a href="'.htmlspecialchars($this->removeUrl($table,$uid)).'#clip_head"><img src="'.$this->backPath.'gfx/close_12h.gif" width="11" height="12" border="0"'.t3lib_BEfunc::titleAttrib($this->clLabel('removeItem'),1).' alt="" /></a>'.
-                                                               '</td>
-                                                       </tr>';
+                                                       $lines[]='
+                                                               <tr>
+                                                                       <td class="'.$bgColClass.'">'.$this->linkItemText(t3lib_iconWorks::getIconImage($table,$rec,$this->backPath,'hspace="20" title="'.htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($rec,$table)).'"'),$rec,$table).'</td>
+                                                                       <td class="'.$bgColClass.'" nowrap="nowrap" width="95%">&nbsp;'.$this->linkItemText(htmlspecialchars(t3lib_div::fixed_lgd(t3lib_BEfunc::getRecordTitle($table,$rec),$GLOBALS['BE_USER']->uc['titleLen'])),$rec,$table).
+                                                                               ($pad=='normal'?(' <strong>('.($this->clipData['normal']['mode']=='copy'?$this->clLabel('copy','cm'):$this->clLabel('cut','cm')).')</strong>'):'').'&nbsp;</td>
+                                                                       <td class="'.$bgColClass.'" align="center">'.
+                                                                       '<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$table.'\', \''.intval($uid).'\'); return false;').'"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom2.gif','width="12" height="12"').' hspace="2" border="0" title="'.$this->clLabel('info','cm').'" alt="" /></a>'.
+                                                                       '<a href="'.htmlspecialchars($this->removeUrl($table,$uid)).'#clip_head"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/close_12h.gif','width="11" height="12"').' border="0" title="'.$this->clLabel('removeItem').'" alt="" /></a>'.
+                                                                       '</td>
+                                                               </tr>';
                                                } else {
                                                        unset($this->clipData[$pad]['el'][$k]);
                                                        $this->changed=1;
@@ -403,10 +416,11 @@ class t3lib_clipboard {
                        }
                }
                if (!count($lines))     {
-                       $lines[]='<tr>
-                               <td bgcolor="'.$TBE_TEMPLATE->bgColor4.'"><img src="clear.gif" width="56" height="1" alt="" /></td>
-                               <td colspan="2" bgcolor="'.$TBE_TEMPLATE->bgColor4.'" nowrap="nowrap" width="95%">&nbsp;<em>('.htmlspecialchars($this->clLabel('clipNoEl')).')</em>&nbsp;</td>
-                       </tr>';
+                       $lines[]='
+                                                               <tr>
+                                                                       <td class="bgColor4"><img src="clear.gif" width="56" height="1" alt="" /></td>
+                                                                       <td colspan="2" class="bgColor4" nowrap="nowrap" width="95%">&nbsp;<em>('.$this->clLabel('clipNoEl').')</em>&nbsp;</td>
+                                                               </tr>';
                }
                
                $this->endClipboard();
@@ -416,16 +430,16 @@ class t3lib_clipboard {
        /**
         * Wraps title of pad in bold-tags and maybe the number of elements if any.
         * 
-        * @param       string          String
+        * @param       string          String (already htmlspecialchars()'ed)
         * @param       string          Pad reference
         * @return      string          HTML output (htmlspecialchar'ed content inside of tags.)
         */
        function padTitleWrap($str,$pad)        {
                $el = count($this->elFromTable($this->fileMode?'_FILE':'',$pad));
                if ($el)        {
-                       return '<strong>'.htmlspecialchars($str).'</strong> ('.htmlspecialchars($pad=='normal'?($this->clipData['normal']['mode']=='copy'?$this->clLabel('copy','cm'):$this->clLabel('cut','cm')):$el).')';
+                       return '<strong>'.$str.'</strong> ('.($pad=='normal'?($this->clipData['normal']['mode']=='copy'?$this->clLabel('copy','cm'):$this->clLabel('cut','cm')):htmlspecialchars($el)).')';
                } else {
-                       return $GLOBALS['TBE_TEMPLATE']->dfw(htmlspecialchars($str));
+                       return $GLOBALS['TBE_TEMPLATE']->dfw($str);
                }
        }
 
@@ -463,7 +477,7 @@ class t3lib_clipboard {
         * @return      string          
         */
        function isSelected($table,$uid)        {
-               $k=$table."|".$uid;
+               $k=$table.'|'.$uid;
                return $this->clipData[$this->current]['el'][$k] ? ($this->current=='normal'?$this->currentMode():1) : '';
        }
 
@@ -728,12 +742,12 @@ class t3lib_clipboard {
        /**
         * Clipboard label - getting from "EXT:lang/locallang_core.php:"
         * 
-        * @param       string          Key
+        * @param       string          Label Key
         * @param       string          Alternative key to "labels"
         * @return      string          
         */
        function clLabel($key,$Akey='labels')   {
-               return $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:'.$Akey.'.'.$key);
+               return htmlspecialchars($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:'.$Akey.'.'.$key));
        }
 
 
@@ -797,7 +811,7 @@ class t3lib_clipboard {
        }
        
        /**
-        * Delete cmd array
+        * Delete record entries in CMD array
         * 
         * @param       array           Command-array
         * @return      array           Modified Command-array
@@ -841,7 +855,7 @@ class t3lib_clipboard {
         * Applies the proper paste configuration in the $file array send to tce_file.php. 
         * The current pad is pasted
         * 
-        * @param       string          
+        * @param       string          Reference to element (splitted by "|")
         * @param       array           Command-array
         * @return      array           Modified Command-array
         */
@@ -862,7 +876,7 @@ class t3lib_clipboard {
        }
        
        /**
-        * Delete cmd array
+        * Delete files in CMD array
         * 
         * @param       array           Command-array
         * @return      array           Modified Command-array
index abda00d..9acd5af 100755 (executable)
  *  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) 
+ *  625:     function utf_strlen($str) 
+ *  638:     function utf_substr($str,$start,$len=0)   
+ *  652:     function utf_strpos($haystack,$needle,$offset=0)  
+ *  665:     function utf_strrpos($haystack,$needle,$offset=0) 
  *
  * TOTAL FUNCTIONS: 15
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -187,7 +187,7 @@ class t3lib_cs {
 
 
        /**
-        * Normalize
+        * Normalize - changes input character set to lowercase letters.
         * 
         * @param       string          Input charset
         * @return      string          Normalized charset
@@ -609,12 +609,13 @@ class t3lib_cs {
 
 
 
+       /********************************************
+        *
+        * String operation functions
+        *
+        ********************************************/
 
-
-
-
-
-       // a few stubs of possibly useful functions, which may be impmeneted in PHP
+       // a few stubs of possibly useful functions, which may be implemented in PHP
 
        /**
         * @param       [type]          $str: ...
index c46d411..6b76b07 100755 (executable)
@@ -28,6 +28,8 @@
  * Contains class which has functions that generates a difference output of a content string
  *
  * $Id$
+ * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
+ * XHTML Compliant  
  *
  * @author     Kasper Skaarhoj <kasper@typo3.com>
  */
  *
  *
  *
- *   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)     
+ *   67: class t3lib_diff 
+ *   85:     function makeDiffDisplay($str1,$str2)     
+ *  159:     function getDiff($str1,$str2)     
+ *  186:     function addClearBuffer($clearBuffer,$last=0)     
+ *  202:     function explodeStringIntoWords($str)     
+ *  223:     function tagSpace($str,$rev=0)    
  *
  * TOTAL FUNCTIONS: 5
  * (This index is automatically created/updated by the extension "extdeveval")
  * @subpackage t3lib
  */
 class t3lib_diff {
-       var $stripTags = 0;
-       var $clearBufferIdx=0;
+
+               // External, static:
+       var $stripTags = 0;                     // If set, the HTML tags are stripped from the input strings first.
+       
+               // Internal, dynamic:
+       var $clearBufferIdx=0;          // This indicates the number of times the function addClearBuffer has been called - and used to detect the very first call...
+       
+       
        
-       /**
-        * @param       [type]          $str1: ...
-        * @param       [type]          $str2: ...
-        * @return      [type]          ...
-        */
-       function getDiff($str1,$str2)   {
-               if (TYPO3_OS!='WIN')    {
-                               // Create file 1 and write string
-                       $file1 = tempnam('','');
-                       t3lib_div::writeFile($file1,$str1);
-                               // Create file 2 and write string
-                       $file2 = tempnam('','');
-                       t3lib_div::writeFile($file2,$str2);
-                               // Perform diff.
-                       $cmd = $GLOBALS['TYPO3_CONF_VARS']['BE']['diff_path'].' '.$file1.' '.$file2;
-                       exec($cmd,$res);
        
-                       unlink($file1);
-                       unlink($file2);
-                       
-                       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);
-                       $outArray = array_merge($outArray,$allWords);
-                       $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));
-               } else {
-                       return str_replace('<',' <',str_replace('>','> ',$str));
-               }
-       }
-
        /**
-        * [Describe function...]
+        * This will produce a color-marked-up diff output in HTML from the input strings.
         * 
-        * @param       [type]          $str1: ...
-        * @param       [type]          $str2: ...
-        * @return      [type]          ...
+        * @param       string          String 1
+        * @param       string          String 2
+        * @return      string          Formatted output.
         */
        function makeDiffDisplay($str1,$str2)   {
                if ($this->stripTags)   {
@@ -172,10 +123,10 @@ class t3lib_diff {
                                        $outString.=$this->addClearBuffer($clearBuffer);
                                        $clearBuffer='';
                                        if (is_array($diffResArray[$a+1]['old']))       {
-                                               $outString.='<font color="red">'.htmlspecialchars(implode(' ',$diffResArray[$a+1]['old'])).'</font> ';
+                                               $outString.='<span class="diff-r">'.htmlspecialchars(implode(' ',$diffResArray[$a+1]['old'])).'</span> ';
                                        }
                                        if (is_array($diffResArray[$a+1]['new']))       {
-                                               $outString.='<font color="green">'.htmlspecialchars(implode(' ',$diffResArray[$a+1]['new'])).'</font> ';
+                                               $outString.='<span class="diff-g">'.htmlspecialchars(implode(' ',$diffResArray[$a+1]['new'])).'</span> ';
                                        }
                                        $chInfParts = explode(',',$diffResArray[$a+1]['changeInfo']);
                                        if (!strcmp($chInfParts[0],$a+1))       {
@@ -197,11 +148,40 @@ class t3lib_diff {
        }
 
        /**
-        * [Describe function...]
+        * Produce a diff (with the "diff" application on unix) between two strings
+        * The function will write the two input strings to temporary files, then execute the diff program, delete the temp files and return the result.
         * 
-        * @param       [type]          $clearBuffer: ...
-        * @param       [type]          $last: ...
-        * @return      [type]          ...
+        * @param       string          String 1
+        * @param       string          String 2
+        * @return      array           The result from the exec() function call.
+        * @access private
+        */
+       function getDiff($str1,$str2)   {
+               if (TYPO3_OS!='WIN')    {
+                               // Create file 1 and write string
+                       $file1 = tempnam('','');
+                       t3lib_div::writeFile($file1,$str1);
+                               // Create file 2 and write string
+                       $file2 = tempnam('','');
+                       t3lib_div::writeFile($file2,$str2);
+                               // Perform diff.
+                       $cmd = $GLOBALS['TYPO3_CONF_VARS']['BE']['diff_path'].' '.$file1.' '.$file2;
+                       exec($cmd,$res);
+       
+                       unlink($file1);
+                       unlink($file2);
+                       
+                       return $res;
+               }
+       }
+       
+       /**
+        * Will bring down the length of strings to < 150 chars if they were longer than 200 chars. This done by preserving the 70 first and last chars and concatenate those strings with "..." and a number indicating the string length
+        * 
+        * @param       string          The input string.
+        * @param       boolean         If set, it indicates that the string should just end with ... (thus no "complete" ending)
+        * @return      string          Processed string.
+        * @access private
         */
        function addClearBuffer($clearBuffer,$last=0)   {
                if (strlen($clearBuffer)>200)   {
@@ -210,6 +190,43 @@ class t3lib_diff {
                $this->clearBufferIdx++;
                return $clearBuffer;
        }
+
+       /**
+        * Explodes the input string into words.
+        * This is done by splitting first by lines, then by space char. Each word will be in stored as a value in an array. Lines will be indicated by two subsequent empty values.
+        * 
+        * @param       string          The string input
+        * @return      array           Array with words.
+        * @access private
+        */
+       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);
+                       $outArray = array_merge($outArray,$allWords);
+                       $outArray[]='';
+                       $outArray[]='';
+               }
+               return $outArray;
+       }
+
+       /**
+        * Adds a space character before and after HTML tags (more precisely any found < or >)
+        * 
+        * @param       string          String to process
+        * @param       boolean         If set, the < > searched for will be &lt; and &gt;
+        * @return      string          Processed string
+        * @access private
+        */
+       function tagSpace($str,$rev=0)  {
+               if ($rev)       {
+                       return str_replace(' &lt;','&lt;',str_replace('&gt; ','&gt;',$str));
+               } else {
+                       return str_replace('<',' <',str_replace('>','> ',$str));
+               }
+       }
 }
 
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_diff.php'])     {
index 8457bb7..8713c77 100755 (executable)
  *  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)      
+ *  807:     function convUmlauts($str)        
+ *  822:     function shortMD5($input, $len=10)        
+ *  834:     function testInt($var)    
+ *  847:     function isFirstPartOfStr($str,$partStr)  
+ *  863:     function formatSize($sizeInBytes) 
+ *  885:     function convertMicrotime($microtime)     
+ *  899:     function splitCalc($string,$operators)    
+ *  921:     function calcPriority($string)    
+ *  961:     function calcParenthesis($string) 
+ *  988:     function htmlspecialchars_decode($value)  
+ * 1002:     function deHSCentities($str)      
+ * 1015:     function slashJS($string,$extended=0,$char="'")   
+ * 1029:     function rawUrlEncodeJS($str)     
+ * 1041:     function validEmail($email)       
+ * 1056:     function formatForTextarea($content)      
  *
  *              SECTION: ARRAY FUNCTIONS
- * 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='"')    
+ * 1088:     function inArray($in_array,$item) 
+ * 1106:     function intExplode($delim, $string)      
+ * 1126:     function revExplode($delim, $string, $count=0)    
+ * 1147:     function trimExplode($delim, $string, $onlyNonEmptyValues=0)      
+ * 1172:     function uniqueArray($valueArray) 
+ * 1195:     function removeArrayEntryByValue($array,$cmpValue)        
+ * 1224:     function implodeArrayForUrl($name,$theArray,$str='',$skipBlank=0,$rawurlencodeParamName=0)        
+ * 1252:     function compileSelectedGetVarsFromArray($varList,$getArray,$GPvarAlt=1)  
+ * 1276:     function addSlashesOnArray(&$theArray)    
+ * 1301:     function stripSlashesOnArray(&$theArray)  
+ * 1324:     function slashArray($arr,$cmd)    
+ * 1341:     function array_merge_recursive_overrule ($arr0,$arr1,$notAddKeys=0) 
+ * 1371:     function array_merge($arr1,$arr2) 
+ * 1385:     function csvValues($row,$delim=',',$quote='"')    
  *
  *              SECTION: HTML/XML PROCESSING
- * 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)    
+ * 1428:     function get_tag_attributes($tag) 
+ * 1466:     function split_tag_attributes($tag)       
+ * 1500:     function implodeParams($arr,$xhtmlSafe=0) 
+ * 1528:     function wrapJS($string, $linebreak=TRUE) 
+ * 1557:     function xml2tree($string,$depth=999) 
+ * 1640:     function array2xml($array,$NSprefix='',$level=0,$docTag='phparray',$spaceInd=0)   
+ * 1698:     function xml2array($string,$NSprefix='') 
+ * 1757:     function xmlRecompileFromStructValArray($vals)    
+ * 1800:     function xmlGetHeaderAttribs($xmlData)    
  *
  *              SECTION: FILES FUNCTIONS
- * 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) 
+ * 1832:     function getURL($url)     
+ * 1875:     function writeFile($file,$content)        
+ * 1893:     function get_dirs($path)  
+ * 1919:     function getFilesInDir($path,$extensionList='',$prependPath=0,$order='')  
+ * 1964:     function getAllFilesAndFoldersInPath($fileArr,$path,$extList='',$regDirs=0,$recursivityLevels=99) 
+ * 1986:     function removePrefixPathFromList($fileArr,$prefixToRemove)       
+ * 2005:     function upload_copy_move($source,$destination)   
+ * 2023:     function fixWindowsFilePath($theFile)     
+ * 2033:     function resolveBackPath($pathStr)        
+ * 2061:     function locationHeaderUrl($path) 
  *
  *              SECTION: DEBUG helper FUNCTIONS
- * 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)     
+ * 2101:     function debug_ordvalue($string,$characters=100)  
+ * 2118:     function view_array($array_in)    
+ * 2146:     function print_array($array_in)   
+ * 2162:     function debug($var="",$brOrHeader=0)     
  *
  *              SECTION: SYSTEM INFORMATION
- * 2229:     function getThisUrl()     
- * 2246:     function linkThisScript($getParams=array())       
- * 2268:     function linkThisUrl($url,$getParams=array())     
- * 2288:     function getIndpEnv($getEnvName)  
+ * 2231:     function getThisUrl()     
+ * 2248:     function linkThisScript($getParams=array())       
+ * 2270:     function linkThisUrl($url,$getParams=array())     
+ * 2290:     function getIndpEnv($getEnvName)  
  *
  *              SECTION: TYPO3 SPECIFIC FUNCTIONS
- * 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)      
+ * 2504:     function getFileAbsFileName($filename,$onlyRelative=1,$relToTYPO3_mainDir=0)      
+ * 2539:     function validPathStr($theFile)   
+ * 2551:     function isAbsPath($path) 
+ * 2563:     function isAllowedAbsPath($path)  
+ * 2581:     function verifyFilenameAgainstDenyPattern($filename)      
+ * 2598:     function stdAuthCode($uid_or_record,$fields='')   
+ * 2632:     function loadTCA($table)  
+ * 2651:     function resolveSheetDefInDS($dataStructArray,$sheet='sDEF')      
+ * 2679:     function resolveAllSheetsInDS($dataStructArray)   
+ * 2708:     function callUserFunction($funcName,&$params,&$ref,$checkPrefix='user_',$silent=0)        
+ * 2748:     function makeInstance($className) 
+ * 2766:     function makeInstanceService($serviceType, $serviceSubType='', $excludeServiceKeys='')    
+ * 2801:     function makeInstanceClassName($className)        
+ * 2821:     function plainMailEncoded($email,$subject,$message,$headers='',$enc='',$charset='ISO-8859-1',$dontEncodeSubject=0)        
+ * 2868:     function quoted_printable($string,$maxlen=76)     
+ * 2911:     function substUrlsInPlainText($message,$urlmode='76',$index_script_url='')        
+ * 2946:     function makeRedirectUrl($inUrl,$l=0,$index_script_url='')        
+ * 2969:     function freetypeDpiComp($font_size)      
  *
  * TOTAL FUNCTIONS: 100
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -586,7 +586,7 @@ class t3lib_div {
         * 
         * @param       string          $in_list        comma-separated list of items (string)
         * @param       string          $item   item to check for
-        * @return      bool            true if $item is in $in_list
+        * @return      boolean         true if $item is in $in_list
         */
        function inList($in_list,$item) {
                return strstr(','.$in_list.',', ','.$item.',');
@@ -634,7 +634,7 @@ class t3lib_div {
         * 
         * Usage: 1
         * 
-        * @param       integer         
+        * @param       integer         Integer string to process
         * @return      integer         
         */
        function intval_positive($theInt)       {
@@ -773,7 +773,7 @@ class t3lib_div {
         * 
         * Usage: 4
         * 
-        * @param       string          
+        * @param       string          String from which the comma in the end (if any) will be removed.
         * @return      string          
         */
        function rm_endcomma($string)   {
@@ -782,10 +782,10 @@ class t3lib_div {
 
        /**
         * strtoupper which converts danish (and other characters) characters as well
-        * (Depreciated, use PHP function with locale settings instead)
+        * (Depreciated, use PHP function with locale settings instead or for HTML output, wrap your content in <span class="uppercase">...</span>)
         * Usage: 4
         * 
-        * @param       string          
+        * @param       string          String to process
         * @return      string          
         * @ignore
         */
@@ -795,12 +795,13 @@ class t3lib_div {
        }
 
        /**
-        * change umlaut characters to plain ASCII with normally two character target
+        * Change umlaut characters to plain ASCII with normally two character target
         * Only known characters will be converted, so don't expect a result for any character.
+        * Works only for western europe single-byte charsets!
         * 
         * ä => ae, Ö => Oe
         * 
-        * @param       string          
+        * @param       string          String to convert.
         * @return      string          
         */
        function convUmlauts($str)      {
@@ -856,7 +857,7 @@ class t3lib_div {
         * 
         * Usage: 54
         * 
-        * @param       integer         Bytes
+        * @param       integer         Number of bytes to format.
         * @return      string          Formatted representation of the byte number, for output.
         */
        function formatSize($sizeInBytes)       {
@@ -1022,7 +1023,7 @@ class t3lib_div {
         * 
         * Usage: 8
         * 
-        * @param       string          
+        * @param       string          String to raw-url-encode with spaces preserved
         * @return      string          Rawurlencoded result of input string, but with all %20 (space chars) converted to real spaces.
         */
        function rawUrlEncodeJS($str)   {
@@ -1163,7 +1164,7 @@ class t3lib_div {
         * (Depreciated, use PHP function array_unique instead)
         * Usage: 2
         * 
-        * @param       array           
+        * @param       array           Array of values to make unique
         * @return      array           
         * @ignore
         * @depreciated
@@ -1187,7 +1188,7 @@ class t3lib_div {
         * 
         * Usage: 2
         * 
-        * @param       array           
+        * @param       array           Array containing the values
         * @param       string          Value to search for and if found remove array entry where found.
         * @return      array           Output array with entries removed if search string is found
         */
@@ -1463,7 +1464,7 @@ class t3lib_div {
         * @internal
         */
        function split_tag_attributes($tag)     {
-               $tag_tmp = trim(eregi_replace ('^[ ]*<[^ ]*','',$tag));
+               $tag_tmp = trim(eregi_replace ('^<[^[:space:]]*','',trim($tag)));
                        // Removes any > in the end of the string
                $tag_tmp = trim(eregi_replace ('>$','',$tag_tmp));
 
@@ -1477,7 +1478,7 @@ class t3lib_div {
                                $value[] = '=';
                                $tag_tmp = trim(substr($tag_tmp,1));            // Removes = chars.
                        } else {
-                               // There are '' around the value. We look for the next ' ' or '>'
+                                       // There are '' around the value. We look for the next ' ' or '>'
                                $reg = split('[[:space:]=]',$tag_tmp,2);
                                $value[] = trim($reg[0]);
                                $tag_tmp = trim(substr($tag_tmp,strlen($reg[0]),1).$reg[1]);
@@ -1621,7 +1622,7 @@ class t3lib_div {
        /**
         * Converts a PHP array into an XML file.
         * The XML output is optimized for readability since associative keys are used as fieldnames. 
-        * This also means that only alphanumeric characters are allowed in the tag names
+        * This also means that only alphanumeric characters are allowed in the tag names AND only keys NOT starting with numbers (so watch your usage of keys!)
         * Numeric keys are converted to "n"+int (which means you should not use this kind of associative key otherwise)
         * The function handles input values from the PHP array in a binary-safe way; All characters below 32 (except 9,10,13) will trigger the content to be converted to a base64-string
         * The PHP variable type of the data is NOT preserved; integers will become strings, but arrays will stay arrays of course.
@@ -2016,7 +2017,7 @@ class t3lib_div {
         * 
         * Usage: 2
         * 
-        * @param       string          
+        * @param       string          File path to process
         * @return      string          
         */
        function fixWindowsFilePath($theFile)   {
@@ -2026,7 +2027,7 @@ class t3lib_div {
        /**
         * Resolves "../" sections in the input path string
         * 
-        * @param       string          
+        * @param       string          File path in which "/../" is resolved
         * @return      string          
         */
        function resolveBackPath($pathStr)      {
@@ -2054,7 +2055,7 @@ class t3lib_div {
         * 
         * Usage: 31
         * 
-        * @param       string          
+        * @param       string          URL / path to prepend full URL addressing to.
         * @return      string          
         */
        function locationHeaderUrl($path)       {
@@ -2111,7 +2112,7 @@ class t3lib_div {
         * Returns false if $array_in is not an array
         * Usage: 27
         * 
-        * @param       array           
+        * @param       array           Array to view
         * @return      string          HTML output
         */
        function view_array($array_in)  {
@@ -2137,9 +2138,10 @@ class t3lib_div {
         * Prints an array
         * Usage: 28
         * 
-        * @param       array           
+        * @param       array           Array to print visually (in a table).
         * @return      void            
         * @internal
+        * @see view_array()
         */
        function print_array($array_in) {
                echo t3lib_div::view_array($array_in);
@@ -2797,9 +2799,9 @@ class t3lib_div {
         * @return      string          Final class name to instantiate with "new [classname]"
         */
        function makeInstanceClassName($className)      {
-               return class_exists('ux_'.$className)?'ux_'.$className:$className;
+               return class_exists('ux_'.$className)?t3lib_div::makeInstanceClassName('ux_'.$className):$className;
        }
-
+       
        /**
         * Simple substitute for the PHP function mail().
         * The fifth parameter, $enc, will allow you to specify 'base64' encryption for the output (set $enc=base64)
@@ -2891,7 +2893,7 @@ class t3lib_div {
                        $newVal = ereg_replace(chr(9).'$','=09',$newVal);               // replaces a possible TAB-character at the end of a line
                        $newString.=$newVal.chr(13).chr(10);
                }
-               return $newString;
+               return ereg_replace(chr(13).chr(10).'$','',$newString);
        }
 
        /**
@@ -2902,8 +2904,9 @@ class t3lib_div {
         * 
         * @param       string          Message content
         * @param       string          URL mode; "76" or "all"
-        * @param       string          
+        * @param       string          URL of index script (see makeRedirectUrl())
         * @return      string          Processed message content
+        * @see makeRedirectUrl()
         */
        function substUrlsInPlainText($message,$urlmode='76',$index_script_url='')      {
                        // Substitute URLs with shorter links:
@@ -2924,7 +2927,7 @@ class t3lib_div {
                                $urlSplit[$c]=$newURL.substr($v,strlen($newParts[0]));
                        }
                }
-#debug($urlSplit);
+
                $message=implode('',$urlSplit);
                return $message;
        }
@@ -2936,7 +2939,7 @@ class t3lib_div {
         * 
         * @param       string          Input URL
         * @param       integer         URL string length limit
-        * @param       string          
+        * @param       string          URL of "index script" - the prefix of the "?RDCT=..." parameter. If not supplyed it will default to t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR')
         * @return      string          Processed URL
         * @internal
         */
index 29cabe7..36f6dd4 100755 (executable)
  *
  *
  *
- *  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)   
+ *  123: class t3lib_extFileFunctions extends t3lib_basicFileFunctions 
+ *  157:     function start($data)     
+ *  183:     function init_actionPerms($setup) 
+ *  216:     function mapData($inputArray)             
+ *  225:     function processData()    
+ *  274:     function printLogErrorMessages($redirect) 
+ *  312:     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)      
+ *  354:     function func_upload($cmds)       
+ *  395:     function func_copy($cmds) 
+ *  485:     function func_move($cmds) 
+ *  576:     function func_delete($cmds)       
+ *  642:     function func_rename($cmds)       
+ *  690:     function func_newfolder($cmds)    
+ *  723:     function func_unzip($cmds)        
+ *  758:     function func_newfile($cmds)      
+ *  796:     function func_edit($cmds) 
+ *  845:     function writeLog($action,$error,$details_nr,$details,$data)      
  *
- * TOTAL FUNCTIONS: 15
+ * TOTAL FUNCTIONS: 16
  * (This index is automatically created/updated by the extension "extdeveval")
  *
  */
@@ -224,6 +225,8 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
        function processData()  {
                if (!$this->isInit) return false;
                if (is_array($this->datamap))   {
+                       t3lib_div::stripSlashesOnArray($this->datamap);
+               
                        reset($this->datamap);
                        while (list($action, $content) = each($this->datamap))  {
                                if (is_array($content)) {
@@ -263,6 +266,39 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions      {
                        }
                }
        }
+       
+       /**
+        * @param       [type]          $redirect: ...
+        * @return      [type]          ...
+        */
+       function printLogErrorMessages($redirect)       {
+               if ($redirect)  {
+                       header('Location: '.t3lib_div::locationHeaderUrl($redirect));
+                       exit;
+               }
+       
+       
+               #t3lib_BEfunc::getSetUpdateSignal('updateFolderTree');
+               
+               echo '
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>File Status script</title>
+</head>
+<body bgcolor="#F7F3EF">
+
+<script language="javascript" type="text/javascript">
+if (top.busy)  {
+       top.busy.loginRefreshed();
+}
+top.goToModule("file_list");
+</script>
+</body>
+</html>                
+               ';
+       exit;
+       }
 
        /**
         * Takes a valid Path ($theFile)
index 83d1e4a..8407743 100644 (file)
@@ -54,7 +54,7 @@
  *  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)    
+ *  376:     function addLLrefForTCAdescr($tca_descr_key,$file_ref)    
  *
  *              SECTION: Adding SERVICES features
  *  418:     function addService($extKey, $serviceType, $serviceKey, $info)    
  *              SECTION: Adding FRONTEND features
  *  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)     
+ *  631:     function addToInsertRecords($table,$content_table='tt_content',$content_field='records')  
+ *  661:     function addPItoST43($key,$classFile='',$prefix='',$type='list_type',$cached=0)   
+ *  735:     function addStaticFile($extKey,$path,$title)      
+ *  753:     function addTypoScriptSetup($content)     
+ *  766:     function addTypoScriptConstants($content) 
+ *  782:     function addTypoScript($key,$type,$content,$afterStaticUid=0)     
  *
  *              SECTION: INTERNAL EXTENSION MANAGEMENT:
- *  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)    
+ *  844:     function typo3_loadExtensions()   
+ *  923:     function _makeIncludeHeader($key,$file)   
+ *  943:     function isCacheFilesAvailable($cacheFilePrefix)  
+ *  955:     function isLocalconfWritable()    
+ *  967:     function cannotCacheFilesWritable($cacheFilePrefix)       
+ *  990:     function currentCacheFiles()      
+ * 1012:     function writeCacheFiles($extensions,$cacheFilePrefix)    
  *
  * TOTAL FUNCTIONS: 31
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -324,8 +324,8 @@ class t3lib_extMgm {
         * @param       string          Module name
         * @param       string          Class name
         * @param       string          Class path
-        * @param       string          Title
-        * @param       string          
+        * @param       string          Title of module
+        * @param       string          Menu array key - default is "function"
         * @return      void            
         * @see t3lib_SCbase::mergeExternalItems()
         */
@@ -343,7 +343,7 @@ class t3lib_extMgm {
         * Prefixed with a [GLOBAL] line
         * FOR USE IN ext_tables.php/ext_locallang.php FILES
         * 
-        * @param       string          
+        * @param       string          Page TSconfig content
         * @return      void            
         */
        function addPageTSConfig($content)      {
@@ -356,7 +356,7 @@ class t3lib_extMgm {
         * Prefixed with a [GLOBAL] line
         * FOR USE IN ext_tables.php/ext_locallang.php FILES
         * 
-        * @param       string          
+        * @param       string          User TSconfig content
         * @return      void            
         */
        function addUserTSConfig($content)      {
@@ -367,9 +367,10 @@ class t3lib_extMgm {
        /**
         * Adds a reference to a locallang file with TCA_DESCR labels
         * FOR USE IN ext_tables.php FILES
+        * eg. t3lib_extMgm::addLLrefForTCAdescr('pages','EXT:lang/locallang_csh_pages.php'); for the pages table or t3lib_extMgm::addLLrefForTCAdescr('_MOD_web_layout','EXT:cms/locallang_csh_weblayout.php'); for the Web > Page module.
         * 
-        * @param       string          
-        * @param       string          
+        * @param       string          Description key. Typically a database table (like "pages") but for applications can be other strings, but prefixed with "_MOD_")
+        * @param       string          File reference to locallang file, eg. "EXT:lang/locallang_csh_pages.php"
         * @return      void            
         */
        function addLLrefForTCAdescr($tca_descr_key,$file_ref)  {
@@ -388,7 +389,6 @@ class t3lib_extMgm {
        
        
        
-       
 
 
 
@@ -582,7 +582,7 @@ class t3lib_extMgm {
         * FOR USE IN ext_tables.php FILES
         * 
         * @param       array           Item Array
-        * @param       string          Type
+        * @param       string          Type (eg. "list_type") - basically a field from "tt_content" table
         * @return      void            
         */
        function addPlugin($itemArray,$type='list_type')        {
@@ -620,11 +620,12 @@ class t3lib_extMgm {
 
        /**
         * Adds the $table tablename to the list of tables allowed to be includes by content element type "Insert records"
+        * By using $content_table and $content_field you can also use the function for other tables.
         * FOR USE IN ext_tables.php FILES
         * 
-        * @param       string          Table name
-        * @param       [type]          $content_table: ...
-        * @param       [type]          $content_field: ...
+        * @param       string          Table name to allow for "insert record"
+        * @param       string          Table name TO WHICH the $table name is applied. See $content_field as well.
+        * @param       string          Field name in the database $content_table in which $table is allowed to be added as a reference ("Insert Record")
         * @return      void            
         */
        function addToInsertRecords($table,$content_table='tt_content',$content_field='records')        {
@@ -746,7 +747,7 @@ tt_content.'.$key.$prefix.' {
         * Prefixed with a [GLOBAL] line
         * FOR USE IN ext_locallang.php FILES
         * 
-        * @param       string          TypoScript
+        * @param       string          TypoScript Setup string
         * @return      void            
         */
        function addTypoScriptSetup($content)   {
@@ -759,7 +760,7 @@ tt_content.'.$key.$prefix.' {
         * Prefixed with a [GLOBAL] line
         * FOR USE IN ext_locallang.php FILES
         * 
-        * @param       string          
+        * @param       string          TypoScript Constants string
         * @return      void            
         */
        function addTypoScriptConstants($content)       {
@@ -935,7 +936,7 @@ $_EXTCONF = $TYPO3_CONF_VARS[\'EXT\'][\'extConf\'][$_EXTKEY];
        /**
         * Returns true if both the localconf and tables cache file exists (with $cacheFilePrefix)
         * 
-        * @param       string          
+        * @param       string          Prefix of the cache file to check
         * @return      boolean         
         * @internal
         */
@@ -959,7 +960,7 @@ $_EXTCONF = $TYPO3_CONF_VARS[\'EXT\'][\'extConf\'][$_EXTKEY];
         * Returns an error string if typo3conf/ or cache-files with $cacheFilePrefix are NOT writable
         * Returns false if no problem.
         * 
-        * @param       string          
+        * @param       string          Prefix of the cache file to check
         * @return      string          
         * @internal
         */
@@ -1003,8 +1004,8 @@ $_EXTCONF = $TYPO3_CONF_VARS[\'EXT\'][\'extConf\'][$_EXTKEY];
         * Compiles/Creates the two cache-files in typo3conf/ based on $cacheFilePrefix
         * Returns a array with the key "_CACHEFILE" set to the $cacheFilePrefix value
         * 
-        * @param       array           
-        * @param       string          
+        * @param       array           Extension information array
+        * @param       string          Prefix for the cache files
         * @return      array           
         * @internal
         */
index 7569040..b80ca5a 100755 (executable)
@@ -189,7 +189,7 @@ class t3lib_extobjbase {
 
 
        /**
-        * Initialize
+        * Initialize the object
         * 
         * @param       object          A reference to the parent (calling) object (which is probably an instance of an extension class to t3lib_SCbase)
         * @param       array           The configuration set for this module - from global array TBE_MODULES_EXT
index f7fca29..2613b2c 100755 (executable)
@@ -28,8 +28,7 @@
  * Generate a folder tree
  *
  * $Id$
- * Revised for TYPO3 3.6 August/2003 by Kasper Skaarhoj
- * Maintained by René Fritz
+ * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
  *
  * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @coauthor   René Fritz <r.fritz@colorcube.de>
  *
  *
  *   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)    
+ *   89:     function t3lib_folderTree()       
+ *  108:     function wrapTitle($title,$row)   
+ *  121:     function wrapIcon($icon,$row)     
+ *  141:     function getId($v) 
+ *  151:     function getJumpToParm($v) 
+ *  163:     function getTitleStr($row,$titleLen=30)   
+ *  173:     function getBrowsableTree()       
+ *  236:     function getFolderTree($files_path, $depth=999, $depthData='')    
+ *  315:     function getCount($files_path)    
+ *  331:     function initializePositionSaving()       
  *
- * TOTAL FUNCTIONS: 9
+ * TOTAL FUNCTIONS: 10
  * (This index is automatically created/updated by the extension "extdeveval")
  *
  */
@@ -71,7 +71,7 @@ require_once (PATH_t3lib.'class.t3lib_treeview.php');
 
 
 /**
- * Extension class for the t3lib_browsetree class, specially made for browsing folders in the File module
+ * Extension class for the t3lib_treeView class, specially made for browsing folders in the File module
  * 
  * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @coauthor   René Fritz <r.fritz@colorcube.de>
@@ -82,124 +82,91 @@ require_once (PATH_t3lib.'class.t3lib_treeview.php');
 class t3lib_folderTree extends t3lib_treeView  {
 
        /**
-        * @return      [type]          ...
+        * Constructor function of the class
+        * 
+        * @return      void            
         */
        function t3lib_folderTree()     {
-               $this->BE_USER = $GLOBALS['BE_USER'];
-               $this->titleAttrib = t3lib_BEfunc::titleAttrib();
-               $this->backPath = $GLOBALS['BACK_PATH'];
+               parent::init();
 
                $this->MOUNTS = $GLOBALS['FILEMOUNTS'];
+
                $this->treeName='folder';
                $this->titleAttrib=''; //don't apply any title
                $this->domIdPrefix = 'folder';
-               // unsused $this->iconName = 'folder';
-       }
-
-       /**
-        * Wrapping $title in a-tags.
-        * $row is the array with path and other info.
-        * 
-        * @param       [type]          $title: ...
-        * @param       [type]          $row: ...
-        * @return      [type]          ...
-        */
-       function wrapTitle($title,&$row)        {
-               $aOnClick = 'return jumpTo('.$this->getJumpToParm($row).',this,'.$this->getId($row).');';
-               return '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$title.'</a>';
        }
-
+       
        /**
         * Wrapping the folder icon
         * 
-        * @param       [type]          $icon: ...
-        * @param       [type]          $row: ...
-        * @return      [type]          ...
+        * @param       string          The image tag for the icon
+        * @param       array           The row for the current element
+        * @return      string          The processed icon input value.
+        * @access private
         */
-       function wrapIcon($icon,&$row)  {
-                       // Add border attribute...
-               $theFolderIcon = substr($icon,0,-1).' border="0" />';
+       function wrapIcon($icon,$row)   {
+                       // Add title attribute to input icon tag
+               $theFolderIcon = $this->addTagAttributes($icon,($this->titleAttrib ? $this->titleAttrib.'="'.$this->getTitleAttrib($row).'"' : ''));
 
                        // Wrap icon in click-menu link.
                if (!$this->ext_IconMode)       {
                        $theFolderIcon = $GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon($theFolderIcon,$row['path'],'',0);
                } elseif (!strcmp($this->ext_IconMode,'titlelink'))     {
-                       $aOnClick = 'return jumpTo('.$this->getJumpToParm($row).'\',this,'.$this->getId($row).');';
+                       $aOnClick = 'return jumpTo('.$this->getJumpToParm($row).'\',this,\''.$this->domIdPrefix.$this->getId($row).'_'.$this->bank.'\');';
                        $theFolderIcon='<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$theFolderIcon.'</a>';
                }
                return $theFolderIcon;
        }
 
        /**
-        * [Describe function...]
+        * Returns the id from the record - for folders, this is an md5 hash.
         * 
-        * @param       [type]          $$v: ...
-        * @return      [type]          ...
+        * @param       array           Record array
+        * @return      integer         The "uid" field value.
         */
-       function getId(&$v) {
+       function getId($v) {
                return t3lib_div::md5Int($v['path']);
        }
 
        /**
-        * [Describe function...]
+        * Returns jump-url parameter value.
         * 
-        * @param       [type]          $$v: ...
-        * @return      [type]          ...
+        * @param       array           The record array.
+        * @return      string          The jump-url parameter.
         */
-       function getJumpToParm(&$v) {
+       function getJumpToParm($v) {
                return "'".rawurlencode($v['path'])."'";
        }
 
        /**
-        * [Describe function...]
+        * Returns the title for the input record. If blank, a "no title" labele (localized) will be returned. 
+        * '_title' is used for setting an alternative title for folders.
         * 
-        * @param       [type]          $$row: ...
-        * @return      [type]          ...
+        * @param       array           The input row array (where the key "_title" is used for the title)
+        * @param       integer         Title length (30)
+        * @return      string          The title.
         */
-       function getTitleStr(&$row)     {
-               return $row['_title'] ? $row['_title'] : parent::getTitleStr($row);
+       function getTitleStr($row,$titleLen=30) {
+               return $row['_title'] ? $row['_title'] : parent::getTitleStr($row,$titleLen);
        }
 
        /**
-        * [Describe function...]
+        * Will create and return the HTML code for a browsable tree of folders.
+        * Is based on the mounts found in the internal array ->MOUNTS (set in the constructor)
         * 
-        * @return      [type]          ...
+        * @return      string          HTML code for the browsable tree
         */
        function getBrowsableTree()     {
-               $this->init($addClause);
 
-                       // Get stored tree structure:
-               $this->stored=unserialize($this->BE_USER->uc[$this->treeName]);
-               
-                       // Mapping md5-hash to shorter number:
-               $hashMap=array();
-               reset($this->MOUNTS);
-               while (list($key,$val) = each($this->MOUNTS))   {
-                       $nkey = hexdec(substr($key,0,4));
-                       $hashMap[$nkey]=$key;
-                       $this->MOUNTS[$key]['nkey']=$nkey;
-               }
+                       // Get stored tree structure AND updating it if needed according to incoming PM GET var.
+               $this->initializePositionSaving();
 
-                       // PM action:
-               $PM = explode('_',t3lib_div::GPvar('PM'));
-               if (count($PM)==4 && $PM[3]==$this->treeName)   {
-                       if (isset($this->MOUNTS[$hashMap[$PM[0]]]))     {
-                               if ($PM[1])     {       // set
-                                       $this->stored[$PM[0]][$PM[2]]=1;
-                                       $this->savePosition($this->treeName);
-                               } else {        // clear
-                                       unset($this->stored[$PM[0]][$PM[2]]);
-                                       $this->savePosition($this->treeName);
-                               }
-                       }
-               }
-
-
-                       // traverse mounts:
+                       // Init done:
                $titleLen=intval($this->BE_USER->uc['titleLen']);
                $treeArr=array();
-               reset($this->MOUNTS);
-               while (list($key,$val) = each($this->MOUNTS))   {
+
+                       // Traverse mounts:
+               foreach($this->MOUNTS as $key => $val)  {
                        $md5_uid = md5($val['path']);
                        $specUID=hexdec(substr($md5_uid,0,6));
                        $this->specUIDmap[$specUID]=$val['path'];
@@ -211,7 +178,7 @@ class t3lib_folderTree extends t3lib_treeView  {
 
                                // Set PM icon:
                        $cmd=$this->bank.'_'.($isOpen?'0_':'1_').$specUID.'_'.$this->treeName;
-                       $icon='<img src="'.$this->backPath.'t3lib/gfx/ol/'.($isOpen?'minus':'plus').'only.gif" width="18" height="16" align="top" border="0" alt="" \></a>';
+                       $icon='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/'.($isOpen?'minus':'plus').'only.gif','width="18" height="16"').' alt="" />';
                        $firstHtml= $this->PM_ATagWrap($icon,$cmd);
 
                        switch($val['type'])    {
@@ -219,19 +186,24 @@ class t3lib_folderTree extends t3lib_treeView  {
                                case 'group':   $icon = 'gfx/i/_icon_ftp_group.gif'; break;
                                default:                $icon = 'gfx/i/_icon_ftp.gif'; break;
                        }
-                       
-                       $firstHtml.=$this->wrapIcon('<img src="'.$this->backPath.$icon.'" width="18" height="16" align="top" alt="" \>',$val);
+
+                               // Preparing rootRec for the mount
+                       $firstHtml.=$this->wrapIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,$icon,'width="18" height="16"').' alt="" />',$val);
                                $row=array();
                                $row['path']=$val['path'];
                                $row['uid']=$specUID;
                                $row['title']=$val['name'];
-                       $this->tree[]=array('HTML'=>$firstHtml,'row'=>$row);
+                               
+                               // Add the root of the mount to ->tree
+                       $this->tree[]=array('HTML'=>$firstHtml,'row'=>$row,'bank'=>$this->bank);
 
+                               // If the mount is expanded, go down:
                        if ($isOpen)    {
                                        // Set depth:
-                               $depthD='<img src="'.$this->backPath.'t3lib/gfx/ol/blank.gif" width="18" height="16" align="top" alt="" \>';
+                               $depthD='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/blank.gif','width="18" height="16"').' alt="" />';
                                $this->getFolderTree($val['path'],999,$depthD);
                        }
+
                                // Add tree:
                        $treeArr=array_merge($treeArr,$this->tree);
                }
@@ -239,17 +211,19 @@ class t3lib_folderTree extends t3lib_treeView  {
        }
 
        /**
-        * [Describe function...]
+        * Fetches the data for the tree
         * 
-        * @param       [type]          $files_path: ...
-        * @param       [type]          $depth: ...
-        * @param       [type]          $depthData: ...
-        * @return      [type]          ...
+        * @param       string          Abs file path
+        * @param       integer         Max depth (recursivity limit)
+        * @param       string          HTML-code prefix for recursive calls.
+        * @return      integer         The count of items on the level
+        * @see getBrowsableTree()
         */
        function getFolderTree($files_path, $depth=999, $depthData='')  {
+
                        // This generates the directory tree
                $dirs = t3lib_div::get_dirs($files_path);
-//             debug($dirs);
+
                $c=0;
                if (is_array($dirs))    {
                        $depth=intval($depth);
@@ -258,7 +232,7 @@ class t3lib_folderTree extends t3lib_treeView  {
                        $c=count($dirs);
                        sort($dirs);
 
-                       while (list($key,$val)= each($dirs))    {
+                       foreach($dirs as $key => $val)  {
                                $a++;
                                $this->tree[]=array();          // Reserve space.
                                end($this->tree);
@@ -279,11 +253,15 @@ class t3lib_folderTree extends t3lib_treeView  {
                                $row['title']=$title;
 
                                if ($depth>1 && $this->expandNext($specUID))    {
-                                       $nextCount=$this->getFolderTree($path, $depth-1, $this->makeHTML?$depthData.'<img src="'.$this->backPath.'t3lib/gfx/ol/'.$LN.'.gif" width="18" height="16" align="top" alt="" \>':'');
-                                       $exp=1;
+                                       $nextCount=$this->getFolderTree(
+                                               $path, 
+                                               $depth-1, 
+                                               $this->makeHTML ? $depthData.'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/'.$LN.'.gif','width="18" height="16"').' alt="" />' : ''
+                                       );
+                                       $exp=1;         // Set "did expand" flag
                                } else {
                                        $nextCount=$this->getCount($path);
-                                       $exp=0;
+                                       $exp=0;         // Clear "did expand" flag
                                }
        
                                        // Set HTML-icons, if any:
@@ -301,19 +279,25 @@ class t3lib_folderTree extends t3lib_treeView  {
                                                $row['title']='RECYCLER';
                                                $row['_title']='<b>RECYCLER</b>';
                                        }
-                                       $HTML.=$this->wrapIcon('<img src="'.$this->backPath.$icon.'" width="18" height="16" align="top" alt="" \>',$row);
+                                       $HTML.=$this->wrapIcon('<img'.t3lib_iconWorks::skinImg($this->backPath,$icon,'width="18" height="16"').' alt="" />',$row);
                                }
-                               $this->tree[$treeKey] = Array('row'=>$row, 'HTML'=>$HTML);
+
+                                       // Finally, add the row/HTML content to the ->tree array in the reserved key.
+                               $this->tree[$treeKey] = Array(
+                                       'row'=>$row, 
+                                       'HTML'=>$HTML,
+                                       'bank'=>$this->bank
+                               );
                        }
                }
                return $c;
        }
 
        /**
-        * [Describe function...]
+        * Counts the number of directories in a file path.
         * 
-        * @param       [type]          $files_path: ...
-        * @return      [type]          ...
+        * @param       string          File path.
+        * @return      integer         
         */
        function getCount($files_path)  {
                        // This generates the directory tree
@@ -324,6 +308,40 @@ class t3lib_folderTree extends t3lib_treeView  {
                }
                return $c;
        }
+       
+       /**
+        * Get stored tree structure AND updating it if needed according to incoming PM GET var.
+        * 
+        * @return      void            
+        * @access private
+        */
+       function initializePositionSaving()     {
+                       // Get stored tree structure:
+               $this->stored=unserialize($this->BE_USER->uc['browseTrees'][$this->treeName]);
+
+                       // Mapping md5-hash to shorter number:
+               $hashMap=array();
+               foreach($this->MOUNTS as $key => $val)  {
+                       $nkey = hexdec(substr($key,0,4));
+                       $hashMap[$nkey]=$key;
+                       $this->MOUNTS[$key]['nkey']=$nkey;
+               }
+
+                       // PM action:
+                       // (If an plus/minus icon has been clicked, the PM GET var is sent and we must update the stored positions in the tree):
+               $PM = explode('_',t3lib_div::GPvar('PM'));      // 0: mount key, 1: set/clear boolean, 2: item ID (cannot contain "_"), 3: treeName
+               if (count($PM)==4 && $PM[3]==$this->treeName)   {
+                       if (isset($this->MOUNTS[$hashMap[$PM[0]]]))     {
+                               if ($PM[1])     {       // set
+                                       $this->stored[$PM[0]][$PM[2]]=1;
+                                       $this->savePosition($this->treeName);
+                               } else {        // clear
+                                       unset($this->stored[$PM[0]][$PM[2]]);
+                                       $this->savePosition($this->treeName);
+                               }
+                       }
+               }
+       }       
 }
  
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_foldertree.php'])       {
index 8312a66..c7de3c4 100644 (file)
@@ -59,7 +59,7 @@
 
 
 /**
- * Formmail class
+ * Formmail class, used by the TYPO3 "cms" extension (default frontend) to send email forms.
  * 
  * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @package TYPO3
index 3b413b2..d1f3e09 100755 (executable)
@@ -133,7 +133,7 @@ class t3lib_fullsearch {
                        }
                }
 
-               $TDparams=' nowrap bgcolor="'.$GLOBALS["TBE_TEMPLATE"]->bgColor4.'"';
+               $TDparams=' nowrap="nowrap" class="bgColor4"';
                $tmpCode='
                <table border=0 cellpadding=3 cellspacing=1>
                <tr'.$TDparams.'><td><select name="storeControl[STORE]" onChange="document.forms[0][\'storeControl[title]\'].value= this.options[this.selectedIndex].value!=0 ? this.options[this.selectedIndex].text : \'\';">'.implode(chr(10),$opt).'</select><input type="submit" name="storeControl[LOAD]" value="Load"></td></tr>         
@@ -522,7 +522,7 @@ class t3lib_fullsearch {
         * @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>';
+               return '<table border=0 cellpadding=10 cellspacing=0 class="bgColor4"><tr><td nowrap><pre>'.$str.'</pre></td></tr></table>';
        }
 
        /**
@@ -589,7 +589,7 @@ class t3lib_fullsearch {
         * @return      [type]          ...
         */
        function resultRowDisplay($row,$conf,$table)    {
-               $out='<tr bgcolor="'.$GLOBALS["SOBE"]->doc->bgColor4.'">';
+               $out='<tr class="bgColor4">';
                reset($row);
                while(list($fN,$fV)=each($row)) {
                        $TDparams = " nowrap";
@@ -597,7 +597,7 @@ class t3lib_fullsearch {
                        $out.='<td'.$TDparams.'>'.htmlspecialchars($fVnew).'</td>';
                }
                $params = '&edit['.$table.']['.$row["uid"].']=edit';
-               $out.='<td nowrap><A HREF="#" onClick="top.launchView(\''.$table.'\','.$row["uid"].',\''.$GLOBALS["BACK_PATH"].'\');return false;"><img src="'.$GLOBALS["BACK_PATH"].'gfx/zoom2.gif" width="12" height="12" border="0" alt=""></a><A HREF="#" onClick="'.t3lib_BEfunc::editOnClick($params,$GLOBALS["BACK_PATH"],t3lib_div::getIndpEnv("REQUEST_URI").t3lib_div::implodeArrayForUrl("SET",$GLOBALS["HTTP_POST_VARS"]["SET"])).'"><img src="'.$GLOBALS["BACK_PATH"].'gfx/edit2.gif" width="11" height="12" border="0" alt=""></a></td>
+               $out.='<td nowrap><A HREF="#" onClick="top.launchView(\''.$table.'\','.$row["uid"].',\''.$GLOBALS["BACK_PATH"].'\');return false;"><img src="'.$GLOBALS["BACK_PATH"].'gfx/zoom2.gif" width="12" height="12" alt="" /></a><A HREF="#" onClick="'.t3lib_BEfunc::editOnClick($params,$GLOBALS["BACK_PATH"],t3lib_div::getIndpEnv("REQUEST_URI").t3lib_div::implodeArrayForUrl("SET",$GLOBALS["HTTP_POST_VARS"]["SET"])).'"><img src="'.$GLOBALS["BACK_PATH"].'gfx/edit2.gif" width="11" height="12" border="0" alt=""></a></td>
                </tr>
                ';
                return $out;
@@ -612,7 +612,7 @@ class t3lib_fullsearch {
         * @return      [type]          ...
         */
        function resultRowTitles($row,$conf,$table)     {
-               $out='<tr bgcolor="'.$GLOBALS["SOBE"]->doc->bgColor5.'">';
+               $out='<tr class="bgColor5">';
                reset($row);
                while(list($fN,$fV)=each($row)) {
                        if (strlen($fV)<50)             {$TDparams = " nowrap";} else {$TDparams = "";}
index 7a5279e..fe8d1c9 100755 (executable)
  *
  *
  *
- *   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)    
+ *   85: class t3lib_iconWorks 
+ *   99:     function getIconImage($table,$row=array(),$backPath,$params='',$shaded=0) 
+ *  116:     function getIcon($table,$row=array(),$shaded=0)   
+ *  198:     function skinImg($backPath,$src,$wHattribs='',$outputMode=0)      
  *
- * TOTAL FUNCTIONS: 6
+ *              SECTION: Other functions
+ *  267:     function makeIcon($iconfile,$mode, $user, $protectSection=0,$absFile='')  
+ *  370:     function imagecopyresized(&$im, $cpImg, $Xstart, $Ystart, $cpImgCutX, $cpImgCutY, $w, $h, $w, $h) 
+ *  403:     function imagecreatefrom($file)   
+ *  420:     function imagemake($im, $path)    
+ *
+ * TOTAL FUNCTIONS: 7
  * (This index is automatically created/updated by the extension "extdeveval")
  *
  */
@@ -94,7 +97,7 @@ class t3lib_iconWorks {
         * @see getIcon()
         */
        function getIconImage($table,$row=array(),$backPath,$params='',$shaded=0)       {
-               $str='<img src="'.$backPath.t3lib_iconWorks::getIcon($table,$row,$shaded).'" width="18" height="16" border="0"'.(trim($params)?' '.trim($params):'');
+               $str='<img'.t3lib_iconWorks::skinImg($backPath,t3lib_iconWorks::getIcon($table,$row,$shaded),'width="18" height="16"').(trim($params)?' '.trim($params):'');
                if (!stristr($str,'alt="'))     $str.=' alt=""';
                $str.=' />';
                return $str;
@@ -129,6 +132,7 @@ class t3lib_iconWorks       {
                if (!strstr($iconfile,'/'))     {
                        $iconfile = 'gfx/i/'.$iconfile;
                }
+               
                if (substr($iconfile,0,3)=='../')       {
                        $absfile=PATH_site.substr($iconfile,3);
                } else {
@@ -180,6 +184,75 @@ class t3lib_iconWorks      {
                        return $iconfile;
                }
        }
+       
+       /**
+        * Returns the src=... for the input $src value OR any alternative found in $TBE_STYLES['skinImg']
+        * Used for skinning the TYPO3 backend with an alternative set of icons
+        * 
+        * @param       string          Current backpath to PATH_typo3 folder
+        * @param       string          Icon file name relative to PATH_typo3 folder
+        * @param       string          Default width/height, defined like 'width="12" height="14"'
+        * @param       integer         Mode: 0 (zero) is default and returns src/width/height. 1 returns value of src+backpath, 2 returns value of w/h.
+        * @return      string          Returns ' src="[backPath][src]" [wHattribs]'
+        * @see skinImgFile()
+        */
+       function skinImg($backPath,$src,$wHattribs='',$outputMode=0)    {
+               
+                       // LOOKING for alternative icons:
+               if ($GLOBALS['TBE_STYLES']['skinImg'][$src])    {       // Slower or faster with is_array()? Could be used.
+                       list($src,$wHattribs) = $GLOBALS['TBE_STYLES']['skinImg'][$src];
+               } elseif ($GLOBALS['TBE_STYLES']['skinImgAutoCfg'])     {       // Otherwise, test if auto-detection is enabled:
+               
+                               // Search for alternative icon automatically:
+                       $fExt = $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['forceFileExtension'];
+                       $scaleFactor = $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['scaleFactor'] ? $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['scaleFactor'] : 1;   // Scaling factor
+                       $lookUpName = $fExt ? ereg_replace('\.[[:alnum:]]+$','',$src).'.'.$fExt : $src; // Set filename to look for
+                       
+                               // If file is found:
+                       if (@is_file($GLOBALS['TBE_STYLES']['skinImgAutoCfg']['absDir'].$lookUpName))   {       // If there is a file...
+                               $iInfo = @getimagesize($GLOBALS['TBE_STYLES']['skinImgAutoCfg']['absDir'].$lookUpName); // Get width/height:
+                               
+                                       // Set $src and $wHattribs:
+                               $src = $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['relDir'].$lookUpName;
+                               $wHattribs = 'width="'.round($iInfo[0]*$scaleFactor).'" height="'.round($iInfo[1]*$scaleFactor).'"';
+                       }
+                       
+                               // In anycase, set currect src / wHattrib - this way we make sure that an entry IS found next time we hit the function, regardless of whether it points to a alternative icon or just the current.
+                       $GLOBALS['TBE_STYLES']['skinImg'][$src] = array($src,$wHattribs);               // Set default...
+               }
+       
+                       // DEBUG: This doubles the size of all icons - for testing/debugging:   
+#              if (ereg('^width="([0-9]+)" height="([0-9]+)"$',$wHattribs,$reg))       $wHattribs='width="'.($reg[1]*2).'" height="'.($reg[2]*2).'"';
+
+                       // Return icon source/wHattributes:
+               switch($outputMode)     {
+                       case 0:
+                               return ' src="'.$backPath.$src.'" '.$wHattribs;
+                       break;
+                       case 1:
+                               return $backPath.$src;
+                       break;
+                       case 2:
+                               return $wHattribs;
+                       break;
+               }
+       }
+       
+       
+
+
+
+
+
+
+
+
+
+       /***********************************
+        *
+        * Other functions
+        *
+        ***********************************/
 
        /**
         * Creates the icon file for the function getIcon()
@@ -282,16 +355,16 @@ class t3lib_iconWorks     {
         * 
         * For parameters, see PHP function "imagecopyresized()"
         * 
-        * @param       pointer         
-        * @param       pointer         
-        * @param       integer         
-        * @param       integer         
-        * @param       integer         
-        * @param       integer         
-        * @param       integer         
-        * @param       integer         
-        * @param       integer         
-        * @param       integer         
+        * @param       pointer         see PHP function "imagecopyresized()"
+        * @param       pointer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
         * @return      void            
         * @access private
         */
index cc6c70a..7be2a60 100755 (executable)
@@ -540,7 +540,7 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv("REMOTE_ADDR")."' (".t3lib_div::getIndp
        function stepOutput()   {
                $this->checkTheConfig();
                $error_missingConnect='<br>
-                       '.$this->fontTag2.'<img src="../t3lib/gfx/icon_fatalerror.gif" width=18 height=16 align=absmiddle>
+                       '.$this->fontTag2.'<img src="../t3lib/gfx/icon_fatalerror.gif" width=18 height=16 class="absmiddle">
                        There is no connection to the database!<br>
                        (Username: <i>'.TYPO3_db_username.'</i>, Password: <i>'.TYPO3_db_password.'</i>, Host: <i>'.TYPO3_db_host.'</i>).<BR>
                        <br>
@@ -549,7 +549,7 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv("REMOTE_ADDR")."' (".t3lib_div::getIndp
                        <br>
                ';
                $error_missingDB='<br>
-                       '.$this->fontTag2.'<img src="../t3lib/gfx/icon_fatalerror.gif" width=18 height=16 align=absmiddle>
+                       '.$this->fontTag2.'<img src="../t3lib/gfx/icon_fatalerror.gif" width=18 height=16 class="absmiddle">
                        There is no access to the database (<i>'.TYPO3_db.'</i>)!<br>
                        <br>
                        <strong>Go to Step 2</strong> and select an accessible database!</font>
@@ -561,7 +561,7 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv("REMOTE_ADDR")."' (".t3lib_div::getIndp
                $dbInfo='
                                        <table border=0 cellpadding=1 cellspacing=0>
                                                <tr>
-                                                       <td valign="top" nowrap colspan=2 align=center>'.$this->fontTag2.'<strong><img src="../t3lib/gfx/icon_note.gif" hspace=5 width=18 height=16 align=absmiddle>Database summary:</strong></font></td>
+                                                       <td valign="top" nowrap colspan=2 align=center>'.$this->fontTag2.'<strong><img src="../t3lib/gfx/icon_note.gif" hspace=5 width=18 height=16 class="absmiddle">Database summary:</strong></font></td>
                                                </tr>
                                                <tr>
                                                        <td valign="top" nowrap>'.$this->fontTag1.'Username:</font></td>
@@ -586,7 +586,7 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv("REMOTE_ADDR")."' (".t3lib_div::getIndp
                                        </table>
                ';
                $error_emptyDB='<br>
-                       '.$this->fontTag2.'<img src="../t3lib/gfx/icon_fatalerror.gif" width=18 height=16 align=absmiddle>
+                       '.$this->fontTag2.'<img src="../t3lib/gfx/icon_fatalerror.gif" width=18 height=16 class="absmiddle">
                        The database is still empty. There are no tables!<br>
                        <br>
                        <strong>Go to Step 3</strong> and import a database!</font>
@@ -759,7 +759,7 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv("REMOTE_ADDR")."' (".t3lib_div::getIndp
                                                        '.nl2br($this->messageBasicFinished()).'
                                                        <br>
                                                        <hr>
-                                                       <div align="center"><strong><img src="../t3lib/gfx/icon_warning.gif" hspace=5 width=18 height=16 align=absmiddle>IMPORTANT</strong></div><br>
+                                                       <div align="center"><strong><img src="../t3lib/gfx/icon_warning.gif" hspace=5 width=18 height=16 class="absmiddle">IMPORTANT</strong></div><br>
                                                        <font size=1>'.nl2br($this->securityRisk()).'
                                                        <br>
                                                        <strong>Enter <a href="'.$this->scriptSelf.'">"Normal" mode for the Install Tool</a> to change this!</strong><br>
@@ -3049,7 +3049,7 @@ Number of files at a time:
                if (count($out))        {
                        $col = t3lib_div::intInRange(count($out),2,10);
                        $outputStr = '<textarea cols=40 rows='.$col.' wrap="off">'.htmlspecialchars(implode($out,chr(10))).'</textarea>';
-                       return "<form>".$outputStr."</form>";
+                       return '<form action="">'.$outputStr.'</form>';
                };
        }
 
@@ -4848,9 +4848,9 @@ A:hover {color: #000066}
                
                ':'').'
        </head>
-       <body bgcolor="#cccccc" alink="maroon" link="maroon" vlink="maroon">'.$this->contentBeforeTable.'
+       <body bgcolor="white" alink="maroon" link="maroon" vlink="maroon">'.$this->contentBeforeTable.'
                <div align="center">
-               <table border=0 cellspacing=0 cellpadding=0 width=333 bgcolor="#cccccc">
+               <table border=0 cellspacing=0 cellpadding=0 width=333 bgcolor="white">
                <tr>
                        <td><img src="'.$this->backPath.'t3lib/gfx/typo3logo.gif" width=333 height=43 vspace=10 hspace=50></td>
                </tr>
index 5642521..f542215 100644 (file)
  *   97:     function load($modulesArray,$BE_USER='')  
  *  366:     function checkExtensionModule($name)      
  *  385:     function checkMod($name, $fullpath)       
- *  445:     function checkModAccess($name,$MCONF)     
- *  468:     function parseModulesArray ($arr) 
- *  498:     function cleanName ($str) 
- *  509:     function getRelativePath($baseDir,$destDir)
+ *  458:     function checkModAccess($name,$MCONF)     
+ *  481:     function parseModulesArray ($arr) 
+ *  511:     function cleanName ($str) 
+ *  522:     function getRelativePath($baseDir,$destDir)
  *
  * TOTAL FUNCTIONS: 7
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -394,7 +394,20 @@ class t3lib_loadModules {
                                                // $MLANG['default']['tabs_images']['tab'] is for modules the reference to the module icon.
                                                // Here the path is transformed to an absolute reference.
                                        if ($MLANG['default']['tabs_images']['tab'])    {
-                                               $MLANG['default']['tabs_images']['tab']=$this->getRelativePath(PATH_typo3,$fullpath.'/'.$MLANG['default']['tabs_images']['tab']);
+                                               
+                                                       // Initializing search for alternative icon:
+                                               $altIconKey = 'MOD:'.$name.'/'.$MLANG['default']['tabs_images']['tab'];         // Alternative icon key (might have an alternative set in $TBE_STYLES['skinImg']
+                                               $altIconAbsPath = is_array($GLOBALS['TBE_STYLES']['skinImg'][$altIconKey]) ? t3lib_div::resolveBackPath(PATH_typo3.$GLOBALS['TBE_STYLES']['skinImg'][$altIconKey][0]) : '';
+
+                                                       // Setting icon, either default or alternative:
+                                               if ($altIconAbsPath && @is_file($altIconAbsPath))       {
+                                                       $MLANG['default']['tabs_images']['tab']=$this->getRelativePath(PATH_typo3,$altIconAbsPath);
+                                               } else {
+                                                               // Setting default icon:
+                                                       $MLANG['default']['tabs_images']['tab']=$this->getRelativePath(PATH_typo3,$fullpath.'/'.$MLANG['default']['tabs_images']['tab']);
+                                               }
+                       
+                                                       // Finally, setting the icon with correct path:
                                                if (substr($MLANG['default']['tabs_images']['tab'],0,3)=='../') {
                                                        $MLANG['default']['tabs_images']['tab'] = PATH_site.substr($MLANG['default']['tabs_images']['tab'],3);
                                                } else {
@@ -492,7 +505,7 @@ class t3lib_loadModules {
        /**
         * The $str is cleaned so that it contains alphanumerical characters only. Modules must only consist of these characters
         * 
-        * @param       string          
+        * @param       string          String to clean up
         * @return      string          
         */
        function cleanName ($str)       {
index c74366b..414f6c7 100755 (executable)
@@ -260,7 +260,7 @@ class t3lib_modSettings {
                        }
                }
 
-               $TDparams=' nowrap bgcolor="'.$GLOBALS['TBE_TEMPLATE']->bgColor4.'"';
+               $TDparams=' nowrap="nowrap" class="bgColor4"';
                $tmpCode='
                <table border=0 cellpadding=3 cellspacing=1 width="100%">
                <tr'.$TDparams.'>
index 7a9b244..f18c6ed 100755 (executable)
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
 /** 
- * Generate a page-tree. OBS: remember $clause
+ * Generate a page-tree, non-browsable.
  *
  * $Id$
- * Revised for TYPO3 3.6 August/2003 by Kasper Skaarhoj
- * Maintained by René Fritz
+ * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
  *
  * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @coauthor   René Fritz <r.fritz@colorcube.de>
  *
  *
  *
- *   78: class t3lib_pageTree extends t3lib_treeView
+ *   79: class t3lib_pageTree extends t3lib_treeView   
  *   91:     function init($clause='') 
- *  106:     function expandNext($id)  
- *  117:     function wrapIcon($icon,$row)     
- *  131:     function PMicon($row,$a,$c,$nextCount,$exp)       
+ *  107:     function expandNext($id)  
+ *  119:     function wrapIcon($icon,$row)     
+ *  136:     function PMicon($row,$a,$c,$nextCount,$exp)       
+ *  151:     function initializePositionSaving()       
  *
- * TOTAL FUNCTIONS: 4
+ * TOTAL FUNCTIONS: 5
  * (This index is automatically created/updated by the extension "extdeveval")
  *
  */
 
 
 
-require_once (PATH_t3lib."class.t3lib_treeview.php");
+require_once (PATH_t3lib.'class.t3lib_treeview.php');
 
 /**
  * Class for generating a page tree.
  * 
  * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @coauthor   René Fritz <r.fritz@colorcube.de>
+ * @see t3lib_treeView, t3lib_browseTree
  * @package TYPO3
  * @subpackage t3lib
  */
-class t3lib_pageTree extends t3lib_treeView{
-       var $makeHTML=1;
-
-       var $clause=' AND NOT deleted';
-       var $db;
+class t3lib_pageTree extends t3lib_treeView    {
        var $fieldArray = Array('uid','title','doktype','php_tree_stop');
        var $defaultList = 'uid,pid,tstamp,sorting,deleted,perms_userid,perms_groupid,perms_user,perms_group,perms_everybody,crdate,cruser_id';
        var $setRecs = 0;
        
        /**
-        * @param       [type]          $clause: ...
-        * @return      [type]          ...
+        * Init function
+        * REMEMBER to feed a $clause which will filter out non-readable pages!
+        * 
+        * @param       string          Part of where query which will filter out non-readable pages.
+        * @return      void            
         */
        function init($clause='')       {
-               parent::init($clause);
+               parent::init(' AND NOT deleted '.$clause.' ORDER BY sorting');
+
                if (t3lib_extMgm::isLoaded('cms'))      {
                        $this->fieldArray=array_merge($this->fieldArray,array('hidden','starttime','endtime','fe_group','module','extendToSubpages'));
                }
@@ -98,41 +99,45 @@ class t3lib_pageTree extends t3lib_treeView{
        }
 
        /**
-        * [Describe function...]
+        * Returns true/false if the next level for $id should be expanded - and all levels should, so we always return 1.
         * 
-        * @param       [type]          $id: ...
-        * @return      [type]          ...
+        * @param       integer         ID (uid) to test for (see extending classes where this is checked againts session data)
+        * @return      boolean         
         */
        function expandNext($id)        {
                return 1;
        }
 
        /**
-        * [Describe function...]
+        * Generate the plus/minus icon for the browsable tree.
+        * In this case, there is no plus-minus icon displayed.
         * 
-        * @param       [type]          $icon: ...
-        * @param       [type]          $row: ...
-        * @return      [type]          ...
+        * @param       array           record for the entry
+        * @param       integer         The current entry number
+        * @param       integer         The total number of entries. If equal to $a, a 'bottom' element is returned.
+        * @param       integer         The number of sub-elements to the current element.
+        * @param       boolean         The element was expanded to render subelements if this flag is set.
+        * @return      string          Image tag with the plus/minus icon.
+        * @access private
+        * @see t3lib_treeView::PMicon()
         */
-       function wrapIcon($icon,$row)   {
+       function PMicon($row,$a,$c,$nextCount,$exp)     {
+               $PM = 'join';
+               $BTM = ($a==$c)?'bottom':'';
+               $icon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/'.$PM.$BTM.'.gif','width="18" height="16"').' alt="" />';
                return $icon;
        }
+       
 
        /**
-        * [Describe function...]
+        * Get stored tree structure AND updating it if needed according to incoming PM GET var.
+        * - Here we just set it to nothing since we want to just render the tree, nothing more.
         * 
-        * @param       [type]          $row: ...
-        * @param       [type]          $a: ...
-        * @param       [type]          $c: ...
-        * @param       [type]          $nextCount: ...
-        * @param       [type]          $exp: ...
-        * @return      [type]          ...
+        * @return      void            
+        * @access private
         */
-       function PMicon($row,$a,$c,$nextCount,$exp)     {
-               $PM = 'join';
-               $BTM = ($a==$c)?'bottom':'';
-               $icon = '<img src="'.$this->backPath.'t3lib/gfx/ol/'.$PM.$BTM.'.gif" width="18" height="16" align="top" alt="" />';
-               return $icon;
+       function initializePositionSaving()     {
+               $this->stored=array();
        }
 }
 
index dc118a8..9a88194 100644 (file)
@@ -316,7 +316,7 @@ class t3lib_parsehtml {
         * Removes the first and last tag in the string
         * Anything before and after the first and last tags respectively is also removed
         * 
-        * @param       string          
+        * @param       string          String to process
         * @return      string          
         */
        function removeFirstAndLastTag($str)    {
@@ -335,7 +335,7 @@ class t3lib_parsehtml {
         * Returns the first tag in $str
         * Actually everything from the begining of the $str is returned, so you better make sure the tag is the first thing...
         * 
-        * @param       string          
+        * @param       string          HTML string with tags
         * @return      string          
         */
        function getFirstTag($str)      {
@@ -655,9 +655,10 @@ class t3lib_parsehtml {
         * @param       string          The tag or attributes
         * @return      array           
         * @access private
+        * @see t3lib_div::split_tag_attributes()
         */
        function split_tag_attributes($tag)     {
-               $tag_tmp = trim(eregi_replace ('^[ ]*<[^ ]*','',$tag));
+               $tag_tmp = trim(eregi_replace ('^<[^[:space:]]*','',trim($tag)));
                        // Removes any > in the end of the string
                $tag_tmp = trim(eregi_replace ('>$','',$tag_tmp));
 
@@ -675,7 +676,7 @@ class t3lib_parsehtml {
                                $metaValue[]='';
                                $tag_tmp = trim(substr($tag_tmp,1));            // Removes = chars.
                        } else {
-                               // There are '' around the value. We look for the next ' ' or '>'
+                                       // There are '' around the value. We look for the next ' ' or '>'
                                $reg = split('[[:space:]=]',$tag_tmp,2);
                                $value[] = trim($reg[0]);
                                $metaValue[]='';
@@ -708,7 +709,7 @@ class t3lib_parsehtml {
        /**
         * Prefixes the relative paths of hrefs/src/action in the tags [td,table,body,img,input,form,link,script,a] in the $content with the $main_prefix or and alternative given by $alternatives
         * 
-        * @param       string          Prefix
+        * @param       string          Prefix string
         * @param       string          HTML content
         * @param       array           Array with alternative prefixes for certain of the tags. key=>value pairs where the keys are the tag element names in uppercase
         * @return      string          Processed HTML content
@@ -776,7 +777,7 @@ class t3lib_parsehtml {
        /**
         * Internal sub-function for ->prefixResourcePath()
         * 
-        * @param       string          Prefix
+        * @param       string          Prefix string
         * @param       string          Relative path/URL
         * @return      string          Output path, prefixed if no scheme in input string
         * @access private
@@ -895,11 +896,11 @@ class t3lib_parsehtml {
        }
        
        /**
-        * Internal function
+        * Internal function for case shifting of a string or whole array
         * 
-        * @param       string          Input string
-        * @param       boolean         
-        * @param       string          
+        * @param       mixed           Input string/array
+        * @param       boolean         If $str is a string AND this boolean is true, the string is returned in uppercase
+        * @param       string          Key string used for internal caching of the results. Could be an MD5 hash of the serialized version of the input $str if that is an array.
         * @return      string          Output string, processed
         * @access private
         */
@@ -965,14 +966,14 @@ class t3lib_parsehtml {
         * Converts TSconfig into an array for the HTMLcleaner function.
         * 
         * @param       array           TSconfig for HTMLcleaner
-        * @param       array           ?
+        * @param       array           Array of tags to keep (?)
         * @return      array           
         * @access private
         */
        function HTMLparserConfig($TSconfig,$keepTags=array())  {
                        // Allow tags (base list, merged with incoming array)
                $alTags = array_flip(t3lib_div::trimExplode(',',strtolower($TSconfig['allowTags']),1));
-               $keepTags = array_merge($alTags,$keepTags);             // Candidate for t3lib_div::array_merge() if integer-keys will some day make trouble...
+               $keepTags = array_merge($alTags,$keepTags);
 
                        // Set config properties.
                if (is_array($TSconfig['tags.']))       {
@@ -1073,7 +1074,7 @@ class t3lib_parsehtml {
         *                      - Minimized values not allowed: Must do this: selected="selected"
         *                      
         *                      What it does at this point:
-        *                      - All tags (img,br,hr) is ended with "/>" - others?
+        *                      - All tags (frame,base,meta,link + img,br,hr,area,input) is ended with "/>" - others?
         *                      - Lowercase for elements and attributes
         *                      - All attributes in quotes
         *                      - Add "alt" attribute to img-tags if it's not there already.
@@ -1096,12 +1097,13 @@ class t3lib_parsehtml {
 
        /**
         * Processing all tags themselves
+        * (Some additions by Sacha Vorbeck)
         * 
-        * @param       string          TAG
+        * @param       string          Tag to process
         * @param       array           Configuration array passing instructions for processing. If count()==0, function will return value unprocessed. See source code for details
         * @param       boolean         Is endtag, then set this.
         * @param       boolean         If set, just return value straight away
-        * @return      strin           Processed value.
+        * @return      string          Processed value.
         * @access private
         */
        function processTag($value,$conf,$endTag,$protected=0)  {
@@ -1121,6 +1123,7 @@ class t3lib_parsehtml {
                                        // Process attributes
                                $tagAttrib = $this->get_tag_attributes($tagP);
                                if (!strcmp($tagName,'img') && !isset($tagAttrib[0]['alt']))            $tagAttrib[0]['alt']='';        // Set alt attribute for all images (not XHTML though...)
+                               if (!strcmp($tagName,'script') && !isset($tagAttrib[0]['type']))        $tagAttrib[0]['type']='text/javascript';        // Set type attribute for all script-tags
                                $outA=array();
                                reset($tagAttrib[0]);
                                while(list($attrib_name,$attrib_value)=each($tagAttrib[0]))     {
@@ -1129,7 +1132,7 @@ class t3lib_parsehtml {
                                }
                                $newTag='<'.trim($tagName.' '.implode(' ',$outA));
                                        // All tags that are standalone (not wrapping, not having endtags) should be ended with '/>'
-                               if (t3lib_div::inList('img,br,hr',$tagName) || substr($value,-2)=='/>') {
+                               if (t3lib_div::inList('img,br,hr,meta,link,base,area,input',$tagName) || substr($value,-2)=='/>')       {
                                        $newTag.=' />';
                                } else {
                                        $newTag.='>';
index 766ab90..dac3ecc 100755 (executable)
@@ -28,6 +28,8 @@
  * Contains class for creating a position map.
  *
  * $Id$
+ * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
+ * XHTML compliant (should be)
  *
  * @author     Kasper Skaarhoj <kasper@typo3.com>
  */
  *
  *
  *
- *   79: class t3lib_positionMap 
- *  101:     function positionTree($id,$pageinfo,$perms_clause,$R_URI) 
- *  184:     function JSimgFunc($prefix='')    
- *  193:     function changeImg(name,d)        
- *  213:     function boldTitle($t_code,$dat,$id)      
- *  225:     function onClickEvent($pid,$newPagePID)   
- *  242:     function insertlabel()    
- *  252:     function linkPageTitle($str,$rec) 
- *  260:     function checkNewPageInPid($pid)  
- *  273:     function getModConfig($pid)       
- *  287:     function insertQuadLines($codes,$allBlank=0)      
- *  317:     function printContentElementColumns($pid,$moveUid,$colPosList,$showHidden,$R_URI) 
- *  347:     function printRecordMap($lines,$colPosArray)      
- *  367:     function wrapColumnHeader($str,$vv)       
- *  379:     function insertPositionIcon($row,$vv,$kk,$moveUid,$pid)   
- *  392:     function onClickInsertRecord($row,$vv,$moveUid,$pid,$sys_lang=0) 
- *  410:     function wrapRecordHeader($str,$row)      
- *  418:     function getRecordHeader($row)    
- *  429:     function wrapRecordTitle($str,$row)       
+ *   85: class t3lib_positionMap 
  *
- * TOTAL FUNCTIONS: 18
+ *              SECTION: Page position map:
+ *  132:     function positionTree($id,$pageinfo,$perms_clause,$R_URI) 
+ *  246:     function JSimgFunc($prefix='')    
+ *  276:     function boldTitle($t_code,$dat,$id)      
+ *  290:     function onClickEvent($pid,$newPagePID)   
+ *  309:     function insertlabel()    
+ *  321:     function linkPageTitle($str,$rec) 
+ *  332:     function checkNewPageInPid($pid)  
+ *  348:     function getModConfig($pid)       
+ *  364:     function insertQuadLines($codes,$allBlank=0)      
+ *
+ *              SECTION: Content element positioning:
+ *  402:     function printContentElementColumns($pid,$moveUid,$colPosList,$showHidden,$R_URI) 
+ *  434:     function printRecordMap($lines,$colPosArray)      
+ *  472:     function wrapColumnHeader($str,$vv)       
+ *  486:     function insertPositionIcon($row,$vv,$kk,$moveUid,$pid)   
+ *  503:     function onClickInsertRecord($row,$vv,$moveUid,$pid,$sys_lang=0) 
+ *  523:     function wrapRecordHeader($str,$row)      
+ *  533:     function getRecordHeader($row)    
+ *  546:     function wrapRecordTitle($str,$row)       
+ *
+ * TOTAL FUNCTIONS: 17
  * (This index is automatically created/updated by the extension "extdeveval")
  *
  */
  
  
 /**
- * Position map class.
+ * Position map class - generating a page tree / content element list which links for inserting (copy/move) of records. 
+ * Used for pages / tt_content element wizards of various kinds.
  * 
  * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @package TYPO3
  * @subpackage t3lib
  */
 class t3lib_positionMap {
+
+               // EXTERNAL, static:    
+       var $moveOrCopy='move';
+       var $dontPrintPageInsertIcons=0;
+       var $backPath='';
+       var $depth=2;           // How deep the position page tree will go.
+       var $cur_sys_language;  // Can be set to the sys_language uid to select content elements for.
+
+
+               // INTERNAL, dynamic:
+       var $R_URI='';                  // Request uri
+       var $elUid='';                  // Element id.
+       var $moveUid='';                // tt_content element uid to move.
+
+               // Caching arrays:
        var $getModConfigCache=array();
        var $checkNewPageCache=Array();
-       
-       var $R_URI='';
-       var $elUid='';
-       var $moveUid='';
-       var $moveOrCopy='move';
+
+               // Label keys:
        var $l_insertNewPageHere = 'insertNewPageHere';
        var $l_insertNewRecordHere = 'insertNewRecordHere';
-       var $dontPrintPageInsertIcons=0;
-       var $backPath='';
+
        var $modConfigStr='mod.web_list.newPageWiz';
-       var $cur_sys_language;
+
+
+
+
+
+       
+       
+       /*************************************
+        *
+        * Page position map:
+        *
+        **************************************/
 
        /**
-        * @param       [type]          $id: ...
-        * @param       [type]          $pageinfo: ...
-        * @param       [type]          $perms_clause: ...
-        * @param       [type]          $R_URI: ...
-        * @return      [type]          ...
+        * Creates a "position tree" based on the page tree.
+        * Notice: A class, "localPageTree" must exist and probably it is an extension class of the t3lib_pageTree class. See "db_new.php" in the core for an example.
+        * 
+        * @param       integer         Current page id
+        * @param       array           Current page record.
+        * @param       string          Page selection permission clause.
+        * @param       string          Current REQUEST_URI
+        * @return      string          HTML code for the tree.
         */
        function positionTree($id,$pageinfo,$perms_clause,$R_URI)       {
                global $LANG;
+               
+                       // Make page tree object:
                $t3lib_pageTree = t3lib_div::makeInstance('localPageTree');
                $t3lib_pageTree->init(' AND '.$perms_clause);
                $t3lib_pageTree->addField('pid');
+
+                       // Initialize variables:
                $this->R_URI = $R_URI;
                $this->elUid = $id;
        
-               $depth=2;
-               $t3lib_pageTree->getTree($pageinfo['pid'], $depth);
+                       // Create page tree, in $this->depth levels.
+               $t3lib_pageTree->getTree($pageinfo['pid'], $this->depth);
                if (!$this->dontPrintPageInsertIcons)   $code.=$this->JSimgFunc();
-               reset($t3lib_pageTree->tree);
-       
+               
+                       // Initialize variables:
                $saveBlankLineState=array();
                $saveLatestUid=array();
-               $latestInvDepth=$depth;
-       
-               while(list($cc,$dat)=each($t3lib_pageTree->tree))       {
+               $latestInvDepth=$this->depth;
+
+                       // Traverse the tree:
+               foreach($t3lib_pageTree->tree as $cc => $dat)   {
+               
                                // Make link + parameters.
                        $latestInvDepth=$dat['invertedDepth'];
                        $saveLatestUid[$latestInvDepth]=$dat;
                        if (isset($t3lib_pageTree->tree[$cc-1]))        {
                                $prev_dat = $t3lib_pageTree->tree[$cc-1];
+                               
                                        // If current page, subpage?
                                if ($prev_dat['row']['uid']==$id)       {
                                        if (!$this->dontPrintPageInsertIcons && $this->checkNewPageInPid($id) && !($prev_dat['invertedDepth']>$t3lib_pageTree->tree[$cc]['invertedDepth']))     {       // 1) It must be allowed to create a new page and 2) If there are subpages there is no need to render a subpage icon here - it'll be done over the subpages...
-//                                             $params='&edit[pages]['.$id.']=new&returnNewPageId=1';
-                                               $code.='<nobr>'.$this->insertQuadLines($dat['blankLineCode']).'<img src=clear.gif width=18 height=8 align=top><a href="#" onClick="'.$this->onClickEvent($id,$id,1).'" onmouseover="changeImg(\'mImgSubpage'.$cc.'\',0);" onmouseout="changeImg(\'mImgSubpage'.$cc.'\',1);"><img name="mImgSubpage'.$cc.'" src="gfx/newrecord_marker_d.gif" width="281" height="8" border="0" title="'.$this->insertlabel().'" align=top></a><nobr><BR>';
+                                               $code.='<span class="nobr">'.
+                                                       $this->insertQuadLines($dat['blankLineCode']).
+                                                       '<img src="clear.gif" width="18" height="8" align="top" alt="" />'.
+                                                       '<a href="#" onclick="'.htmlspecialchars($this->onClickEvent($id,$id,1)).'" onmouseover="'.htmlspecialchars('changeImg(\'mImgSubpage'.$cc.'\',0);').'" onmouseout="'.htmlspecialchars('changeImg(\'mImgSubpage'.$cc.'\',1);').'">'.
+                                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/newrecord_marker_d.gif','width="281" height="8"').' name="mImgSubpage'.$cc.'" border="0" align="top" title="'.$this->insertlabel().'" alt="" />'.
+                                                       '</a></span><br />';
                                        }
                                }
                                        
@@ -135,8 +177,12 @@ class t3lib_positionMap {
                                        // First of all the previous level should have an icon:
                                        if (!$this->dontPrintPageInsertIcons && $this->checkNewPageInPid($prev_dat['row']['pid']))      {
                                                $prevPid = (-$prev_dat['row']['uid']);
-//                                             $params='&edit[pages]['.$prevPid.']=new&returnNewPageId=1';
-                                               $code.='<nobr>'.$this->insertQuadLines($dat['blankLineCode']).'<img src=clear.gif width=18 height=1 align=top><a href="#" onClick="'.$this->onClickEvent($prevPid,$prev_dat['row']['pid'],2).'" onmouseover="changeImg(\'mImgAfter'.$cc.'\',0);" onmouseout="changeImg(\'mImgAfter'.$cc.'\',1);"><img name="mImgAfter'.$cc.'" src="gfx/newrecord_marker_d.gif" width="281" height="8" border="0" title="'.$this->insertlabel().'" align=top></a><nobr><BR>';
+                                               $code.='<span class="nobr">'.
+                                                       $this->insertQuadLines($dat['blankLineCode']).
+                                                       '<img src="clear.gif" width="18" height="1" align="top" alt="" />'.
+                                                       '<a href="#" onclick="'.htmlspecialchars($this->onClickEvent($prevPid,$prev_dat['row']['pid'],2)).'" onmouseover="'.htmlspecialchars('changeImg(\'mImgAfter'.$cc.'\',0);').'" onmouseout="'.htmlspecialchars('changeImg(\'mImgAfter'.$cc.'\',1);').'">'.
+                                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/newrecord_marker_d.gif','width="281" height="8"').' name="mImgAfter'.$cc.'" border="0" align="top" title="'.$this->insertlabel().'" alt="" />'.
+                                                       '</a></span><br />';
                                        }
        
                                        // Then set the current prevPid
@@ -148,12 +194,18 @@ class t3lib_positionMap {
                                $prevPid = $dat['row']['pid'];  // First in the tree
                        }
                        if (!$this->dontPrintPageInsertIcons && $this->checkNewPageInPid($dat['row']['pid']))   {
-//                             $params='&edit[pages]['.$prevPid.']=new&returnNewPageId=1';
-                               $code.='<nobr>'.$this->insertQuadLines($dat['blankLineCode']).'<a href="#" onClick="'.$this->onClickEvent($prevPid,$dat['row']['pid'],3).'" onmouseover="changeImg(\'mImg'.$cc.'\',0);" onmouseout="changeImg(\'mImg'.$cc.'\',1);"><img name="mImg'.$cc.'" src="gfx/newrecord_marker_d.gif" width="281" height="8" border="0" title="'.$this->insertlabel().'" align=top></a><nobr><BR>';
+                               $code.='<span class="nobr">'.
+                                       $this->insertQuadLines($dat['blankLineCode']).
+                                       '<a href="#" onclick="'.htmlspecialchars($this->onClickEvent($prevPid,$dat['row']['pid'],3)).'" onmouseover="'.htmlspecialchars('changeImg(\'mImg'.$cc.'\',0);').'" onmouseout="'.htmlspecialchars('changeImg(\'mImg'.$cc.'\',1);').'">'.
+                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/newrecord_marker_d.gif','width="281" height="8"').' name="mImg'.$cc.'" border="0" align="top" title="'.$this->insertlabel().'" alt="" />'.
+                                       '</a></span><br />';
                        }
        
                                // The line with the icon and title:
-                       $t_code='<nobr>'.$dat['HTML'].$this->linkPageTitle($this->boldTitle(htmlspecialchars(t3lib_div::fixed_lgd($dat['row']['title'],$BE_USER->uc['titleLen'])),$dat,$id),$dat['row']).'<nobr><BR>';
+                       $t_code='<span class="nobr">'.
+                               $dat['HTML'].
+                               $this->linkPageTitle($this->boldTitle(htmlspecialchars(t3lib_div::fixed_lgd($dat['row']['title'],$BE_USER->uc['titleLen'])),$dat,$id),$dat['row']).
+                               '</span><br />';
                        $code.=$t_code;
                }
                
@@ -161,16 +213,24 @@ class t3lib_positionMap {
                $prev_dat = end($t3lib_pageTree->tree);
                if ($prev_dat['row']['uid']==$id)       {
                        if (!$this->dontPrintPageInsertIcons && $this->checkNewPageInPid($id))  {
-//                             $params='&edit[pages]['.$id.']=new&returnNewPageId=1';
-                               $code.='<nobr>'.$this->insertQuadLines($saveLatestUid[$latestInvDepth]['blankLineCode'],1).'<img src=clear.gif width=18 height=8 align=top><a href="#" onClick="'.$this->onClickEvent($id,$id,4).'" onmouseover="changeImg(\'mImgSubpage'.$cc.'\',0);" onmouseout="changeImg(\'mImgSubpage'.$cc.'\',1);"><img name="mImgSubpage'.$cc.'" src="gfx/newrecord_marker_d.gif" width="281" height="8" border="0" title="'.$this->insertlabel().'" align=top></a><nobr><BR>';
+                               $code.='<span class="nobr">'.
+                                       $this->insertQuadLines($saveLatestUid[$latestInvDepth]['blankLineCode'],1).
+                                       '<img src="clear.gif" width="18" height="8" align="top" alt="" />'.
+                                       '<a href="#" onclick="'.$this->onClickEvent($id,$id,4).'" onmouseover="'.htmlspecialchars('changeImg(\'mImgSubpage'.$cc.'\',0);').'" onmouseout="'.htmlspecialchars('changeImg(\'mImgSubpage'.$cc.'\',1);').'">'.
+                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/newrecord_marker_d.gif','width="281" height="8"').' name="mImgSubpage'.$cc.'" border="0" align="top" title="'.$this->insertlabel().'" alt="" />'.
+                                       '</a></span><br />';
                        }
                }
        
-               for ($a=$latestInvDepth;$a<=$depth;$a++)        {
+               for ($a=$latestInvDepth;$a<=$this->depth;$a++)  {
                        $dat = $saveLatestUid[$a];
                        $prevPid = (-$dat['row']['uid']);
                        if (!$this->dontPrintPageInsertIcons && $this->checkNewPageInPid($dat['row']['pid']))   {
-                               $code.='<nobr>'.$this->insertQuadLines($dat['blankLineCode'],1).'<a href="#" onClick="'.$this->onClickEvent($prevPid,$dat['row']['pid'],5).'" onmouseover="changeImg(\'mImgEnd'.$a.'\',0);" onmouseout="changeImg(\'mImgEnd'.$a.'\',1);"><img name="mImgEnd'.$a.'" src="gfx/newrecord_marker_d.gif" width="281" height="8" border="0" title="'.$this->insertlabel().'" align=top></a><nobr><BR>';
+                               $code.='<span class="nobr">'.
+                                       $this->insertQuadLines($dat['blankLineCode'],1).
+                                       '<a href="#" onclick="'.htmlspecialchars($this->onClickEvent($prevPid,$dat['row']['pid'],5)).'" onmouseover="'.htmlspecialchars('changeImg(\'mImgEnd'.$a.'\',0);').'" onmouseout="'.htmlspecialchars('changeImg(\'mImgEnd'.$a.'\',1);').'">'.
+                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/newrecord_marker_d.gif','width="281" height="8"').' name="mImgEnd'.$a.'" border="0" align="top" title="'.$this->insertlabel().'" alt="" />'.
+                                       '</a></span><br />';
                        }
                }
        
@@ -178,19 +238,21 @@ class t3lib_positionMap {
        }
 
        /**
-        * @param       [type]          $prefix: ...
-        * @return      [type]          ...
+        * Creates the JavaScritp for insert new-record rollover image
+        * 
+        * @param       string          Insert record image prefix.
+        * @return      string          <script> section
         */
        function JSimgFunc($prefix='')  {
-               $code.='
-               <script language="javascript" type="text/javascript">
+               $code.=$GLOBALS['TBE_TEMPLATE']->wrapScriptTags('
+               
                        var img_newrecord_marker=new Image(); 
-                       img_newrecord_marker.src = "gfx/newrecord'.$prefix.'_marker.gif";
+                       img_newrecord_marker.src = "'.t3lib_iconWorks::skinImg($this->backPath,'gfx/newrecord'.$prefix.'_marker.gif','',1).'";
        
                        var img_newrecord_marker_d=new Image(); 
-                       img_newrecord_marker_d.src = "gfx/newrecord'.$prefix.'_marker_d.gif";
+                       img_newrecord_marker_d.src = "'.t3lib_iconWorks::skinImg($this->backPath,'gfx/newrecord'.$prefix.'_marker_d.gif','',1).'";
        
-                       function changeImg(name,d)      {
+                       function changeImg(name,d)      {       //
                                if (document[name]) {
                                        if (d)  {
                                                document[name].src = img_newrecord_marker_d.src;
@@ -199,16 +261,17 @@ class t3lib_positionMap {
                                        }
                                }
                        }
-               </script>
-               ';
+               ');
                return $code;
        }
 
        /**
-        * @param       [type]          $t_code: ...
-        * @param       [type]          $dat: ...
-        * @param       [type]          $id: ...
-        * @return      [type]          ...
+        * Wrap $t_code in bold IF the $dat uid matches $id
+        * 
+        * @param       string          Title string
+        * @param       array           Infomation array with record array inside.
+        * @param       integer         The current id.
+        * @return      string          The title string.
         */
        function boldTitle($t_code,$dat,$id)    {
                if ($dat['row']['uid']==$id)    {
@@ -218,16 +281,18 @@ class t3lib_positionMap {
        }
 
        /**
-        * @param       [type]          $pid: ...
-        * @param       [type]          $newPagePID: ...
-        * @return      [type]          ...
+        * Creates the onclick event for the insert-icons.
+        * 
+        * @param       integer         The pid.
+        * @param       integer         New page id.
+        * @return      string          Onclick attribute content
         */
        function onClickEvent($pid,$newPagePID) {
                $TSconfigProp = $this->getModConfig($newPagePID);
                
                if ($TSconfigProp['useTemplaVoila'])    {
                        if (t3lib_extMgm::isLoaded('templavoila'))      {
-                               $onclick = "document.location='".t3lib_extMgm::extRelPath('templavoila')."mod1/index.php?cmd=crPage&positionPid=".$pid."';";
+                               $onclick = "document.location='".t3lib_extMgm::extRelPath('templavoila').'mod1/index.php?cmd=crPage&positionPid='.$pid."';";
                                return $onclick;
                        }
                }
@@ -237,25 +302,32 @@ class t3lib_positionMap {
        }
 
        /**
-        * @return      [type]          ...
+        * Get label, htmlspecialchars()'ed
+        * 
+        * @return      string          The localized label for "insert new page here"
         */
        function insertlabel()  {
                global $LANG;
-               return $LANG->getLL($this->l_insertNewPageHere);
+               return $LANG->getLL($this->l_insertNewPageHere,1);
        }
 
        /**
-        * @param       [type]          $str: ...
-        * @param       [type]          $rec: ...
-        * @return      [type]          ...
+        * Wrapping page title.
+        * 
+        * @param       string          Page title.
+        * @param       array           Page record (?)
+        * @return      string          Wrapped title.
         */
        function linkPageTitle($str,$rec)       {
                return $str;
        }
 
        /**
-        * @param       [type]          $pid: ...
-        * @return      [type]          ...
+        * Checks if the user has permission to created pages inside of the $pid page.
+        * Uses caching so only one regular lookup is made - hence you can call the function multiple times without worrying about performance.
+        * 
+        * @param       integer         Page id for which to test.
+        * @return      boolean         
         */
        function checkNewPageInPid($pid)        {
                global $BE_USER;
@@ -267,8 +339,11 @@ class t3lib_positionMap {
        }
 
        /**
-        * @param       [type]          $pid: ...
-        * @return      [type]          ...
+        * Returns module configuration for a pid.
+        * 
+        * @param       integer         Page id for which to get the module configuration.
+        * @return      array           The properties of teh module configuration for the page id.
+        * @see onClickEvent()
         */
        function getModConfig($pid)     {
                global $BE_USER;
@@ -280,9 +355,11 @@ class t3lib_positionMap {
        }
 
        /**
-        * @param       [type]          $codes: ...
-        * @param       [type]          $allBlank: ...
-        * @return      [type]          ...
+        * Insert half/quad lines.
+        * 
+        * @param       string          keywords for which lines to insert.
+        * @param       boolean         If true all lines are just blank clear.gifs
+        * @return      string          HTML content.
         */
        function insertQuadLines($codes,$allBlank=0)    {
                $codeA = t3lib_div::trimExplode(',',$codes.",line",1);
@@ -290,9 +367,9 @@ class t3lib_positionMap {
                $lines=array();
                while(list(,$code)=each($codeA))        {
                        if ($code=="blank" || $allBlank)        {
-                               $lines[]='<img src="clear.gif" width="18" height="8" align=top>';
+                               $lines[]='<img src="clear.gif" width="18" height="8" align="top" alt="" />';
                        } else {
-                               $lines[]='<img src="gfx/ol/halfline.gif" width="18" height="8" align="top">';
+                               $lines[]='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/halfline.gif','width="18" height="8"').' align="top" alt="" />';
                        }
                }
                return implode('',$lines);
@@ -306,13 +383,21 @@ class t3lib_positionMap {
 
 
 
+       /*************************************
+        *
+        * Content element positioning:
+        *
+        **************************************/
+
        /**
-        * @param       [type]          $pid: ...
-        * @param       [type]          $moveUid: ...
-        * @param       [type]          $colPosList: ...
-        * @param       [type]          $showHidden: ...
-        * @param       [type]          $R_URI: ...
-        * @return      [type]          ...
+        * Creates HTML for inserting/moving content elements.
+        * 
+        * @param       integer         page id onto which to insert content element.
+        * @param       integer         Move-uid (tt_content element uid?)
+        * @param       string          List of columns to show
+        * @param       boolean         If not set, then hidden/starttime/endtime records are filtered out.
+        * @param       string          Request URI
+        * @return      string          HTML
         */
        function printContentElementColumns($pid,$moveUid,$colPosList,$showHidden,$R_URI)       {
                $this->R_URI = $R_URI;
@@ -340,54 +425,80 @@ class t3lib_positionMap {
        }
 
        /**
-        * @param       [type]          $lines: ...
-        * @param       [type]          $colPosArray: ...
-        * @return      [type]          ...
+        * Creates the table with the content columns
+        * 
+        * @param       array           Array with arrays of lines for each column
+        * @param       array           Column position array
+        * @return      string          HTML
         */
        function printRecordMap($lines,$colPosArray)    {
                $row1='';
                $row2='';
-               reset($colPosArray);
-               while(list($kk,$vv)=each($colPosArray)) {
-                       $row1.='<td align=center width="'.round(100/count($colPosArray)).'%"><strong>'.$this->wrapColumnHeader(t3lib_div::danish_strtoupper($GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content','colPos',$vv))),$vv).'</strong></td>';
-                       $row2.='<td valign=top nowrap>'.implode('<BR>',$lines[$kk]).'</td>';
+               $count = t3lib_div::intInRange(count($colPosArray),1);
+               
+                       // Traverse the columns here:
+               foreach($colPosArray as $kk => $vv)     {
+                       $row1.='<td align="center" width="'.round(100/$count).'%"><span class="uppercase"><strong>'.
+                                       $this->wrapColumnHeader($GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content','colPos',$vv),1),$vv).
+                                       '</strong></span></td>';
+                       $row2.='<td valign="top" nowrap="nowrap">'.
+                                       implode('<br />',$lines[$kk]).
+                                       '</td>';
                }
-               $table = '<table border=0 cellpadding=0 cellspacing=1>
-                       <tr bgColor="'.$GLOBALS['SOBE']->doc->bgColor5.'">'.$row1.'</tr>
+               
+               $table = '
+               
+               <!--
+                       Map of records in columns: 
+               -->
+               <table border="0" cellpadding="0" cellspacing="1" id="typo3-ttContentList">
+                       <tr class="bgColor5">'.$row1.'</tr>
                        <tr>'.$row2.'</tr>
-               </table>';
+               </table>
+               
+               ';
+               
                return $this->JSimgFunc('2').$table;
        }
 
        /**
-        * @param       [type]          $str: ...
-        * @param       [type]          $vv: ...
-        * @return      [type]          ...
+        * Wrapping the column header
+        * 
+        * @param       string          Header value
+        * @param       string          Column info.
+        * @return      string          
+        * @see printRecordMap()
         */
        function wrapColumnHeader($str,$vv)     {
                return $str;
        }
 
        /**
-        * @param       [type]          $row: ...
-        * @param       [type]          $vv: ...
-        * @param       [type]          $kk: ...
-        * @param       [type]          $moveUid: ...
-        * @param       [type]          $pid: ...
-        * @return      [type]          ...
+        * Creates a linked position icon.
+        * 
+        * @param       array           Element row.
+        * @param       string          Column position value.
+        * @param       integer         Column key.
+        * @param       integer         Move uid
+        * @param       integer         PID value.
+        * @return      string          
         */
        function insertPositionIcon($row,$vv,$kk,$moveUid,$pid) {
                $cc = hexdec(substr(md5($row['uid'].'-'.$vv.'-'.$kk),0,4));
-               return '<a href="#" onClick="'.$this->onClickInsertRecord($row,$vv,$moveUid,$pid,$this->cur_sys_language).'" onmouseover="changeImg(\'mImg'.$cc.'\',0);" onmouseout="changeImg(\'mImg'.$cc.'\',1);"><img name="mImg'.$cc.'" src="gfx/newrecord2_marker_d.gif" width="100" height="8" border="0" title="'.$GLOBALS['LANG']->getLL($this->l_insertNewRecordHere).'" align=top></a>';
+               return '<a href="#" onclick="'.htmlspecialchars($this->onClickInsertRecord($row,$vv,$moveUid,$pid,$this->cur_sys_language)).'" onmouseover="'.htmlspecialchars('changeImg(\'mImg'.$cc.'\',0);').'" onmouseout="'.htmlspecialchars('changeImg(\'mImg'.$cc.'\',1);').'">'.
+                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/newrecord2_marker_d.gif','width="100" height="8"').' name="mImg'.$cc.'" border="0" align="top" title="'.$GLOBALS['LANG']->getLL($this->l_insertNewRecordHere,1).'" alt="" />'.
+                       '</a>';
        }
 
        /**
-        * @param       [type]          $row: ...
-        * @param       [type]          $vv: ...
-        * @param       [type]          $moveUid: ...
-        * @param       [type]          $pid: ...
-        * @param       [type]          $sys_lang: ...
-        * @return      [type]          ...
+        * Create on-click event value.
+        * 
+        * @param       array           The record.
+        * @param       string          Column position value.
+        * @param       integer         Move uid
+        * @param       integer         PID value.
+        * @param       integer         System language (not used currently)
+        * @return      string          
         */
        function onClickInsertRecord($row,$vv,$moveUid,$pid,$sys_lang=0) {
                $table='tt_content';
@@ -403,31 +514,37 @@ class t3lib_positionMap {
        }
 
        /**
-        * @param       [type]          $str: ...
-        * @param       [type]          $row: ...
-        * @return      [type]          ...
+        * Wrapping the record header  (from getRecordHeader())
+        * 
+        * @param       string          HTML content
+        * @param       array           Record array.
+        * @return      string          HTML content
         */
        function wrapRecordHeader($str,$row)    {
                return $str;
        }
 
        /**
-        * @param       [type]          $row: ...
-        * @return      [type]          ...
+        * Create record header (includes teh record icon, record title etc.)
+        * 
+        * @param       array           Record row.
+        * @return      string          HTML
         */
        function getRecordHeader($row)  {
-               $line = t3lib_iconWorks::getIconImage('tt_content',$row,$this->backPath,t3lib_BEfunc::titleAttrib(t3lib_BEfunc::getRecordIconAltText($row,'tt_content'),1).' align=top');
+               $line = t3lib_iconWorks::getIconImage('tt_content',$row,$this->backPath,' align="top" title="'.htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($row,'tt_content')).'"');
                $line.= t3lib_BEfunc::getRecordTitle('tt_content',$row,1);
                return $this->wrapRecordTitle($line,$row);
        }
 
        /**
-        * @param       [type]          $str: ...
-        * @param       [type]          $row: ...
-        * @return      [type]          ...
+        * Wrapping the title of the record.
+        * 
+        * @param       string          The title value.
+        * @param       array           The record row.
+        * @return      string          Wrapped title string.
         */
        function wrapRecordTitle($str,$row)     {
-               return '<a href="'.t3lib_div::linkThisScript(array('uid'=>intval($row['uid']),'moveUid'=>'')).'">'.$str.'</a>';
+               return '<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('uid'=>intval($row['uid']),'moveUid'=>''))).'">'.$str.'</a>';
        }
 }
 
index 9297f4c..fabfaa3 100755 (executable)
@@ -527,15 +527,15 @@ class t3lib_queryGenerator        {
                        }
                        if($fType != "ignore") {
                                $lineHTML .= $this->updateIcon();
-                               $lineHTML .= '<input type="image" border=0 src="'.$GLOBALS["BACK_PATH"].'gfx/garbage.gif" align="absmiddle" width="11" height="12" hspace=3 vspace=3 title="Remove condition" name="qG_del'.$subscript.'">';
-                               $lineHTML .= '<input type="image" border=0 src="'.$GLOBALS["BACK_PATH"].'gfx/add.gif" align="absmiddle" width="12" height="12" hspace=3 vspace=3 title="Add condition" name="qG_ins'.$subscript.'">';
-                               if($c!=0) $lineHTML.= '<input type="image" border=0 src="'.$GLOBALS["BACK_PATH"].'gfx/pil2up.gif" align="absmiddle" width="12" height="7" hspace=3 vspace=3 title="Move up" name="qG_up'.$subscript.'">';
+                               $lineHTML .= '<input type="image" border=0 src="'.$GLOBALS["BACK_PATH"].'gfx/garbage.gif" class="absmiddle" width="11" height="12" hspace=3 vspace=3 title="Remove condition" name="qG_del'.$subscript.'">';
+                               $lineHTML .= '<input type="image" border=0 src="'.$GLOBALS["BACK_PATH"].'gfx/add.gif" class="absmiddle" width="12" height="12" hspace=3 vspace=3 title="Add condition" name="qG_ins'.$subscript.'">';
+                               if($c!=0) $lineHTML.= '<input type="image" border=0 src="'.$GLOBALS["BACK_PATH"].'gfx/pil2up.gif" class="absmiddle" width="12" height="7" hspace=3 vspace=3 title="Move up" name="qG_up'.$subscript.'">';
 
                                if($c!=0 && $fType!="newlevel") {
-                                       $lineHTML.= '<input type="image" border=0 src="'.$GLOBALS["BACK_PATH"].'gfx/pil2right.gif" align="absmiddle" height="12" width="7" hspace=3 vspace=3 title="New level" name="qG_nl'.$subscript.'">';
+                                       $lineHTML.= '<input type="image" border=0 src="'.$GLOBALS["BACK_PATH"].'gfx/pil2right.gif" class="absmiddle" height="12" width="7" hspace=3 vspace=3 title="New level" name="qG_nl'.$subscript.'">';
                                }
                                if($fType=="newlevel") {
-                                       $lineHTML.= '<input type="image" border=0 src="'.$GLOBALS["BACK_PATH"].'gfx/pil2left.gif" align="absmiddle" height="12" width="7" hspace=3 vspace=3 title="Collapse new level" name="qG_remnl'.$subscript.'">';
+                                       $lineHTML.= '<input type="image" border=0 src="'.$GLOBALS["BACK_PATH"].'gfx/pil2left.gif" class="absmiddle" height="12" width="7" hspace=3 vspace=3 title="Collapse new level" name="qG_remnl'.$subscript.'">';
                                }
 
                                $codeArr[$arrCount]["html"] = $lineHTML;
@@ -672,7 +672,7 @@ class t3lib_queryGenerator  {
         */
        function mkFieldToInputSelect($name,$fieldName) {
                $out='<input type="Text" value="'.htmlspecialchars($fieldName).'" name="'.$name.'"'.$GLOBALS["TBE_TEMPLATE"]->formWidth().'>'.$this->updateIcon();
-               $out.='<a href="#" onClick="document.forms[0][\''.$name.'\'].value=\'\';return false;"><img src="'.$GLOBALS["BACK_PATH"].'gfx/garbage.gif" align="absmiddle" width="11" height="12" hspace=3 vspace=3 title="Clear list" border=0></a>';
+               $out.='<a href="#" onClick="document.forms[0][\''.$name.'\'].value=\'\';return false;"><img src="'.$GLOBALS["BACK_PATH"].'gfx/garbage.gif" class="absmiddle" width="11" height="12" hspace=3 vspace=3 title="Clear list" border=0></a>';
                $out.='<BR><select name="_fieldListDummy" size=5 onChange="document.forms[0][\''.$name.'\'].value+=\',\'+this.value">';
                reset($this->fields);
                while(list($key,)=each($this->fields)) {
@@ -854,7 +854,7 @@ class t3lib_queryGenerator  {
         * @return      [type]          ...
         */
        function updateIcon()   {
-               return '<input type="image" border=0 src="'.$GLOBALS["BACK_PATH"].'gfx/refresh_n.gif" align="absmiddle" width="14" height="14" hspace=3 vspace=3 title="Update" name="just_update">';
+               return '<input type="image" border=0 src="'.$GLOBALS["BACK_PATH"].'gfx/refresh_n.gif" class="absmiddle" width="14" height="14" hspace=3 vspace=3 title="Update" name="just_update">';
        }
 
        /**
@@ -877,7 +877,7 @@ class t3lib_queryGenerator  {
        function makeSelectorTable($modSettings,$enableList="table,fields,query,group,order,limit")     {
                $enableArr=explode(",",$enableList);
                        // Make output
-               $TDparams = ' bgColor="'.$GLOBALS["TBE_TEMPLATE"]->bgColor5.'" nowrap';;
+               $TDparams = ' class="bgColor5" nowrap';
                
                if (in_array("table",$enableArr))       {
                        $out='
index 4313a15..47e8307 100755 (executable)
  *
  *
  *
- *   81: class t3lib_recordList 
- *  123:     function addElement($h,$icon,$data,$tdParams='',$lMargin='',$altLine='')  
- *  195:     function writeTop()       
- *  203:     function writeBottom()    
- *  216:     function fwd_rwd_nav($table='')   
- *  249:     function fwd_rwd_HTML($type,$pointer,$table='')   
- *  272:     function listURL()        
- *  281:     function CBfunctions()    
- *  284:     function checkOffCB(listOfCBnames)        
- *  313:     function cbValue(CBname)  
- *  318:     function setcbValue(CBname,flag)  
+ *   78: class t3lib_recordList 
+ *  119:     function addElement($h,$icon,$data,$tdParams='',$lMargin='',$altLine='')  
+ *  193:     function writeTop()       
+ *  201:     function writeBottom()    
+ *  220:     function fwd_rwd_nav($table='')   
+ *  253:     function fwd_rwd_HTML($type,$pointer,$table='')   
+ *  276:     function listURL()        
+ *  285:     function CBfunctions()    
  *
- * TOTAL FUNCTIONS: 10
+ * TOTAL FUNCTIONS: 7
  * (This index is automatically created/updated by the extension "extdeveval")
  *
  */
@@ -79,6 +76,7 @@
  * @see typo3/db_list.php, typo3/file_list.php
  */
 class t3lib_recordList {
+
                // Used in this class:
        var $iLimit = 10;                                               // default Max items shown 
        var $leftMargin = 0;                                    // OBSOLETE - NOT USED ANYMORE. leftMargin
@@ -91,8 +89,6 @@ class t3lib_recordList {
 
                // Not used in this class - but maybe extension classes...
        var $fixedL = 50;                                               // Max length of strings
-       var $headLineCol = '#dddddd';                   // Head line color
-       var $subHeadLineCol = '#eeeeee';
        var $script = '';
        var $thumbScript = 'thumbs.php';
        var $setLMargin=1;                                              // Set to zero, if you don't want a left-margin with addElement function        
@@ -125,21 +121,22 @@ class t3lib_recordList {
 
                        // Start up:            
                $out='
+               <!-- Element, begin: -->
                <tr>';
                        // Show icon and lines
                if ($this->showIcon)    {
                        $out.='
-                       <td valign="top" align="left" nowrap="nowrap"'.$tdParams.'>';
+                       <td nowrap="nowrap"'.$tdParams.'>';
                        
                        if (!$h)        {
-                               $out.='<img src="'.$this->backPath.'t3lib/gfx/ol/halfline.gif" width="18" height="8" alt="" />';
+                               $out.='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/halfline.gif','width="18" height="8"').' alt="" />';
                        } else {
                                for ($a=0;$a<$h;$a++)   {
                                        if (!$a)        {
-                                               $out.= $altLine ? $altLine : '<img src="'.$this->backPath.'t3lib/gfx/ol/line.gif" width="18" height="16" alt="" />';
+                                               $out.= $altLine ? $altLine : '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/line.gif','width="18" height="16"').' alt="" />';
                                                if ($icon)      $out.= $icon;
                                        } else {
-                                               $out.= $altLine ? $altLine :'<br /><img src="'.$this->backPath.'t3lib/gfx/ol/line.gif" width="18" height="16" alt="" />';
+                                               $out.= $altLine ? $altLine :'<br /><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/line.gif','width="18" height="16"').' alt="" />';
                                        }
                                }
                        }
@@ -161,7 +158,7 @@ class t3lib_recordList {
                        if (isset($data[$vKey]))        {
                                if ($lastKey)   {       
                                        $out.='
-                                               <td valign="top"'.
+                                               <td'.
                                                $noWrap.
                                                $tdP[($ccount%2)].
                                                $colsp.
@@ -177,7 +174,8 @@ class t3lib_recordList {
                        }
                        if ($c>1)       {$colsp=' colspan="'.$c.'"';} else {$colsp='';}
                }
-               if ($lastKey)   {       $out.='<td valign="top"'.$noWrap.$tdP[($ccount%2)].$colsp.$this->addElement_tdParams[$lastKey].'>'.$data[$lastKey].'</td>';     }
+               if ($lastKey)   {       $out.='
+                                               <td'.$noWrap.$tdP[($ccount%2)].$colsp.$this->addElement_tdParams[$lastKey].'>'.$data[$lastKey].'</td>'; }
 
                        // End row
                $out.='
@@ -201,10 +199,16 @@ class t3lib_recordList {
         * @return      void            
         */
        function writeBottom()  {
-               $this->HTMLcode.='<table border="0" cellpadding="0" cellspacing="0">';
-               $theIcon='<img src="'.$this->backPath.'t3lib/gfx/ol/stopper.gif" width="18" height="16" alt="" />';
+               $this->HTMLcode.='
+               
+               <!--
+                       End of list table:
+               -->
+               <table border="0" cellpadding="0" cellspacing="0">';
+               $theIcon='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/stopper.gif','width="18" height="16"').' alt="" />';
                $this->HTMLcode.=$this->addElement(1,'','','',$this->leftMargin,$theIcon);
-               $this->HTMLcode.='</table>';    
+               $this->HTMLcode.='
+               </table>';      
        }
        
        /**
@@ -251,14 +255,14 @@ class t3lib_recordList {
                switch($type)   {
                        case 'fwd':
                                $href = $this->listURL().'&pointer='.($pointer-$this->iLimit).$tParam;
-                               return '&nbsp;<a href="'.htmlspecialchars($href).'">'.
-                                               '<img src="'.$this->backPath.'gfx/pilup.gif" width="14" height="14" valign="top" border="0" alt="" />'.
+                               return '<a href="'.htmlspecialchars($href).'">'.
+                                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/pilup.gif','width="14" height="14"').' alt="" />'.
                                                '</a> <i>[1 - '.$pointer.']</i>';
                        break;
                        case 'rwd':
                                $href = $this->listURL().'&pointer='.$pointer.$tParam;
-                               return '&nbsp;<a href="'.htmlspecialchars($href).'">'.
-                                               '<img src="'.$this->backPath.'gfx/pildown.gif" width="14" height="14" valign="top" border="0" alt="" />'.
+                               return '<a href="'.htmlspecialchars($href).'">'.
+                                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/pildown.gif','width="14" height="14"').' alt="" />'.
                                                '</a> <i>['.($pointer+1).' - '.$this->totalItems.']</i>';
                        break;
                }
@@ -281,7 +285,7 @@ class t3lib_recordList {
        function CBfunctions()  {
                return '
                // checkOffCB()
-       function checkOffCB(listOfCBnames)      {
+       function checkOffCB(listOfCBnames)      {       //
                var notChecked=0;
                var total=0;
                
@@ -310,12 +314,12 @@ class t3lib_recordList {
                setcbValue(listOfCBnames.substr(pointer),flag);
        }
                // cbValue()
-       function cbValue(CBname)        {
+       function cbValue(CBname)        {       //
                var CBfullName = "CBC["+CBname+"]";
                return (document.dblistForm[CBfullName] && document.dblistForm[CBfullName].checked ? 1 : 0);
        }
                // setcbValue()
-       function setcbValue(CBname,flag)        {
+       function setcbValue(CBname,flag)        {       //
                CBfullName = "CBC["+CBname+"]";
                document.dblistForm[CBfullName].checked = flag ? "on" : 0;
        }
index 75ff826..fc0b3de 100644 (file)
@@ -459,16 +459,16 @@ class t3lib_stdGraphic    {
         * 
         * For parameters, see PHP function "imagecopyresized()"
         * 
-        * @param       pointer         
-        * @param       pointer         
-        * @param       integer         
-        * @param       integer         
-        * @param       integer         
-        * @param       integer         
-        * @param       integer         
-        * @param       integer         
-        * @param       integer         
-        * @param       integer         
+        * @param       pointer         see PHP function "imagecopyresized()"
+        * @param       pointer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
+        * @param       integer         see PHP function "imagecopyresized()"
         * @return      void            
         * @access private
         * @see t3lib_iconWorks::imagecopyresized()
@@ -2219,7 +2219,7 @@ class t3lib_stdGraphic    {
         * 
         * @param       pointer         The GDlib image resource pointer
         * @param       string          The filename to write to
-        * @return      ?               The output of either imageGif or imagePng based on whether the $this->gifExtension was set to "gif" or "png"
+        * @return      mixed           The output of either imageGif or imagePng based on whether the $this->gifExtension was set to "gif" or "png"
         * @see maskImageOntoImage(), scale(), output()
         */
        function ImageGif($destImg, $theImage)  {
index 81470c6..33577db 100755 (executable)
@@ -538,7 +538,7 @@ class t3lib_superadmin {
                        
                        $extensionKeysCollect = array_unique($extensionKeysCollect);
                        asort($extensionKeysCollect);
-                       $out.='<form><textarea cols="80" rows="10">'.implode(chr(10),$extensionKeysCollect).'</textarea></form>';
+                       $out.='<form action=""><textarea cols="80" rows="10">'.implode(chr(10),$extensionKeysCollect).'</textarea></form>';
 
                        $out.='<BR><h3>User extensions:</h3><table border=1>'.implode("",$rows["user"]).'</table>';
                }
index 9271564..9e2de05 100755 (executable)
  *
  *              SECTION: JavaScript related functions
  * 3052:     function JStop($formname='forms[0]')      
- * 3085:     function JSbottom($formname='forms[0]')   
- * 3392:     function dbFileCon($formObj='document.forms[0]')  
+ * 3091:     function JSbottom($formname='forms[0]')   
+ * 3398:     function dbFileCon($formObj='document.forms[0]')  
  * 3506:     function printNeededJSFunctions() 
- * 3525:     function printNeededJSFunctions_top()     
+ * 3533:     function printNeededJSFunctions_top()     
  *
  *              SECTION: Various helper functions
- * 3573:     function getDefaultRecord($table,$pid=0)  
- * 3610:     function getRecordPath($table,$rec)       
- * 3623:     function readPerms()      
- * 3637:     function sL($str) 
- * 3650:     function getLL($str)      
- * 3668:     function isPalettesCollapsed($table,$palette)     
- * 3683:     function isDisplayCondition($displayCond,$row)    
- * 3734:     function getTSCpid($table,$uid,$pid)      
- * 3748:     function doLoadTableDescr($table) 
- * 3760:     function getAvailableLanguages($onlyIsoCoded=1,$setDefault=1)     
+ * 3581:     function getDefaultRecord($table,$pid=0)  
+ * 3619:     function getRecordPath($table,$rec)       
+ * 3632:     function readPerms()      
+ * 3646:     function sL($str) 
+ * 3659:     function getLL($str)      
+ * 3677:     function isPalettesCollapsed($table,$palette)     
+ * 3692:     function isDisplayCondition($displayCond,$row)    
+ * 3745:     function getTSCpid($table,$uid,$pid)      
+ * 3759:     function doLoadTableDescr($table) 
+ * 3771:     function getAvailableLanguages($onlyIsoCoded=1,$setDefault=1)     
  *
  *
- * 3803: class t3lib_TCEforms_FE extends t3lib_TCEforms 
- * 3811:     function wrapLabels($str) 
- * 3821:     function printPalette($palArr)    
+ * 3814: class t3lib_TCEforms_FE extends t3lib_TCEforms 
+ * 3822:     function wrapLabels($str) 
+ * 3832:     function printPalette($palArr)    
  *
  * TOTAL FUNCTIONS: 82
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -172,7 +172,7 @@ class t3lib_TCEforms        {
 
                // variables not commented yet.... (do so...)
        var $helpTextFontTag='<font color="#333333">';
-       var $RTEpath = 'ext/rte/';
+       var $RTEpath = 'ext/rte/app/';
        var $tceFormsEditor=1;
        var $palFieldArr=array();
        var $disableWizards=0;
@@ -608,7 +608,7 @@ class t3lib_TCEforms        {
                        // If a palette is collapsed (not shown in form, but in top frame instead) AND a collapse header string is given, then make that string a link to activate the palette.
                if ($this->isPalettesCollapsed($table,$palette) && $collapsedHeader)    {
                        $pC=    $this->intoTemplate(array(
-                                                       'PALETTE' => $this->wrapOpenPalette('<img src="'.$this->backPath.'gfx/options.gif" width="18" height="16" border="0" title="'.htmlspecialchars($this->getLL('l_moreOptions')).'" align="top" alt="" /><strong>'.$collapsedHeader.'</strong>',$table,$row,$palette),
+                                                       'PALETTE' => $this->wrapOpenPalette('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/options.gif','width="18" height="16"').' border="0" title="'.htmlspecialchars($this->getLL('l_moreOptions')).'" align="top" alt="" /><strong>'.$collapsedHeader.'</strong>',$table,$row,$palette),
                                                ),
                                                $this->palFieldTemplate
                                        );
@@ -669,7 +669,7 @@ class t3lib_TCEforms        {
                                                (($TCA[$table]['ctrl']['type'] && !strcmp($field,$TCA[$table]['ctrl']['type'])) ||
                                                ($TCA[$table]['ctrl']['requestUpdate'] && t3lib_div::inList($TCA[$table]['ctrl']['requestUpdate'],$field)))
                                                && !$BE_USER->uc['noOnChangeAlertInTypeFields'])        {
-                                       $alertMsgOnChange="if (confirm(".$GLOBALS['LANG']->JScharCode($this->getLL('m_onChangeAlert')).") && TBE_EDITOR_checkSubmit(-1)){TBE_EDITOR_submitForm()};";
+                                       $alertMsgOnChange='if (confirm('.$GLOBALS['LANG']->JScharCode($this->getLL('m_onChangeAlert')).') && TBE_EDITOR_checkSubmit(-1)){TBE_EDITOR_submitForm()};';
                                } else {$alertMsgOnChange='';}
                                
                                        // Render as a hidden field?
@@ -680,7 +680,7 @@ class t3lib_TCEforms        {
                                                // If the field is NOT a palette field, then we might create an icon which links to a palette for the field, if one exists.
                                        if (!$PA['palette'])    {
                                                if ($PA['pal'] && $this->isPalettesCollapsed($table,$PA['pal']))        {
-                                                       list($thePalIcon,$palJSfunc) = $this->wrapOpenPalette('<img src="'.$this->backPath.'gfx/options.gif" width="18" height="16" border="0" title="'.htmlspecialchars($this->getLL('l_moreOptions')).'" alt="" />',$table,$row,$PA['pal'],1);
+                                                       list($thePalIcon,$palJSfunc) = $this->wrapOpenPalette('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/options.gif','width="18" height="16"').' border="0" title="'.htmlspecialchars($this->getLL('l_moreOptions')).'" alt="" />',$table,$row,$PA['pal'],1);
                                                } else {
                                                        $thePalIcon = '';
                                                        $palJSfunc = '';
@@ -1020,7 +1020,7 @@ class t3lib_TCEforms      {
                        $p = $selItems[$c];
                        $rOnClick = implode('',$PA['fieldChangeFunc']);
                        $rChecked = (!strcmp($p[1],$PA['itemFormElValue'])?' checked="checked"':'');
-                       $item.= '<input type="radio"'.$this->insertDefStyle('radio').' name="'.$PA['itemFormElName'].'" value="'.htmlspecialchars($p[1]).'" onclick="'.$rOnClick.'"'.$rChecked.$PA['onFocus'].' />'.
+                       $item.= '<input type="radio"'.$this->insertDefStyle('radio').' name="'.$PA['itemFormElName'].'" value="'.htmlspecialchars($p[1]).'" onclick="'.htmlspecialchars($rOnClick).'"'.$rChecked.$PA['onFocus'].' />'.
                                        htmlspecialchars($p[0]).
                                        '<br />';
                }
@@ -1109,7 +1109,7 @@ class t3lib_TCEforms      {
                        }
                        $sOnChange = 'if (this.options[this.selectedIndex].value==\'--div--\') {this.selectedIndex='.$sI.';} '.implode('',$PA['fieldChangeFunc']);
                        $item.= '<input type="hidden" name="'.$PA['itemFormElName'].'_selIconVal" value="'.htmlspecialchars($sI).'" />';        // MUST be inserted before the selector - else is the value of the hiddenfield here mysteriously submitted...
-                       $item.= '<select name="'.$PA['itemFormElName'].'"'.$this->insertDefStyle('select').($size?' size="'.$size.'"':'').' onchange="'.$sOnChange.'"'.$PA['onFocus'].'>';
+                       $item.= '<select name="'.$PA['itemFormElName'].'"'.$this->insertDefStyle('select').($size?' size="'.$size.'"':'').' onchange="'.htmlspecialchars($sOnChange).'"'.$PA['onFocus'].'>';
                        $item.= implode('',$opt);
                        $item.= '</select>';
 
@@ -1247,7 +1247,7 @@ class t3lib_TCEforms      {
 
                                        $rowCopy=array();
                                        $rowCopy[$field] = $imgP[0];
-                                       $imgs[]= '<nobr>'.t3lib_BEfunc::thumbCode($rowCopy,$table,$field,$this->backPath,'thumbs.php',$config['uploadfolder'],0,' align="middle"').$imgP[0].'</nobr>';
+                                       $imgs[]= '<span class="nobr">'.t3lib_BEfunc::thumbCode($rowCopy,$table,$field,$this->backPath,'thumbs.php',$config['uploadfolder'],0,' align="middle"').$imgP[0].'</span>';
                                }
                                $thumbsnail = implode('<br />',$imgs);
                        }
@@ -1272,16 +1272,16 @@ class t3lib_TCEforms    {
                                // Creating string showing allowed types:
                        $tempFT = t3lib_div::trimExplode(',',$allowed,1);
                        if (!strcmp(trim($tempFT[0]),'*'))      {
-                               $info.='<nobr>&nbsp;&nbsp;&nbsp;&nbsp;'.
+                               $info.='<span class="nobr">&nbsp;&nbsp;&nbsp;&nbsp;'.
                                                htmlspecialchars($this->getLL('l_allTables')).
-                                               '</nobr><br />';
+                                               '</span><br />';
                        } else {
                                while(list(,$theT)=each($tempFT))       {
                                        if ($theT)      {
-                                               $info.='<nobr>&nbsp;&nbsp;&nbsp;&nbsp;'.
-                                                               '<img src="'.$this->backPath.t3lib_iconWorks::getIcon($theT).'" width="18" height="16" align="top" alt="" /> '.
+                                               $info.='<span class="nobr">&nbsp;&nbsp;&nbsp;&nbsp;'.
+                                                               t3lib_iconWorks::getIconImage($theT,array(),$this->backPath,'align="top"').
                                                                htmlspecialchars($this->sL($GLOBALS['TCA'][$theT]['ctrl']['title'])).
-                                                               '</nobr><br />';
+                                                               '</span><br />';
                                        }
                                }
                        }
@@ -1298,11 +1298,11 @@ class t3lib_TCEforms    {
                                $itemArray[] = array('table'=>$this_table, 'id'=>$this_uid);
                                if ($show_thumbs)       {
                                        $rr = t3lib_BEfunc::getRecord($this_table,$this_uid);
-                                       $imgs[]='<nobr>'.
+                                       $imgs[]='<span class="nobr">'.
                                                        t3lib_iconWorks::getIconImage($this_table,$rr,$this->backPath,'align="top" title="'.htmlspecialchars(t3lib_BEfunc::getRecordPath($rr['pid'],$perms_clause,15)).'"').
                                                        '&nbsp;'.
                                                        $this->noTitle($rr[$GLOBALS['TCA'][$this_table]['ctrl']['label']],array('<em>','</em>')).
-                                                       '</nobr>';
+                                                       '</span>';
                                }
                        }
                        $thumbsnail='';
@@ -1377,7 +1377,7 @@ class t3lib_TCEforms      {
                        $cols = $config['cols']?$config['cols']:($config['size']?$config['size']:$this->maxInputWidth);
                        if ($this->docLarge)    $cols = round($cols*$this->form_largeComp);
                        $width = ceil($cols*$this->form_rowsToStylewidth);
-                       $item='<div style="'.htmlspecialchars($divStyle.'width:'.$width.'px;').'"><nobr>'.(strcmp($itemValue,'')?$itemValue:"&nbsp;").'<nobr></div>';
+                       $item='<div style="'.htmlspecialchars($divStyle.'width:'.$width.'px;').'"><span class="nobr">'.(strcmp($itemValue,'')?$itemValue:'&nbsp;').'</span></div>';
                }
 
                return $item;
@@ -1517,7 +1517,7 @@ class t3lib_TCEforms      {
                $tCells=array();
                $pct = round(100/count($sArr));
                foreach($sArr as $sKey => $sheetCfg)    {
-                       $onClick="if (confirm(".$GLOBALS['LANG']->JScharCode($this->getLL('m_onChangeAlert')).") && TBE_EDITOR_checkSubmit(-1)){".$this->elName($elName).".value='".$sKey."'; TBE_EDITOR_submitForm()};";
+                       $onClick='if (confirm('.$GLOBALS['LANG']->JScharCode($this->getLL('m_onChangeAlert')).') && TBE_EDITOR_checkSubmit(-1)){'.$this->elName($elName).".value='".$sKey."'; TBE_EDITOR_submitForm()};";
 
                        $tCells[]='<td width="'.$pct.'%" style="'.($sKey==$sheetKey ? 'background-color: #9999cc; font-weight: bold;' : 'background-color: #aaaaaa;').' cursor: hand;" onclick="'.htmlspecialchars($onClick).'" align="center">'.
                                        ($sheetCfg['ROOT']['TCEforms']['sheetTitle'] ? $this->sL($sheetCfg['ROOT']['TCEforms']['sheetTitle']) : $sKey).
@@ -1624,7 +1624,7 @@ class t3lib_TCEforms      {
                                                                // Put row together
                                                        $tRows[]='<tr bgcolor="'.$bgColor.'">
                                                                <td nowrap="nowrap" valign="top">'.
-                                                               '<input name="_DELETE_FLEX_FORM'.$PA['itemFormElName'].$formPrefix.'" type="checkbox" value="1" /><img src="'.$this->backPath.'gfx/garbage.gif" border="0">'.
+                                                               '<input name="_DELETE_FLEX_FORM'.$PA['itemFormElName'].$formPrefix.'" type="checkbox" value="1" /><img src="'.$this->backPath.'gfx/garbage.gif" border="0" alt="" />'.
                                                                $rowCells['title'].'</td>
                                                                <td>'.$rowCells['formEl'].'</td>
                                                        </tr>';
@@ -1700,7 +1700,7 @@ class t3lib_TCEforms      {
        }
 
        /**
-        * User defined type
+        * User defined field type
         * 
         * @param       string          The table name of the record
         * @param       string          The field name which this element is supposed to edit
@@ -1713,7 +1713,7 @@ class t3lib_TCEforms      {
                $PA['field']=$field;
                $PA['row']=$row;
 
-               return t3lib_div::callUserFunction($PA['fieldConf']['config']["userFunc"],$PA,$this);
+               return t3lib_div::callUserFunction($PA['fieldConf']['config']['userFunc'],$PA,$this);
        }
 
 
@@ -2026,19 +2026,19 @@ class t3lib_TCEforms    {
                if (!$params['noBrowser'])      {
                        $aOnClick='setFormValueOpenBrowser(\''.$mode.'\',\''.($fName.'|||'.$allowed.'|').'\'); return false;';
                        $icons[]='<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
-                                       '<img src="'.$this->backPath.'gfx/insert3.gif" width="14" height="14" border="0" '.t3lib_BEfunc::titleAltAttrib($this->getLL("l_browse_".($mode=="file"?"file":"db"))).' />'.
+                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/insert3.gif','width="14" height="14"').' border="0" '.t3lib_BEfunc::titleAltAttrib($this->getLL('l_browse_'.($mode=='file'?'file':'db'))).' />'.
                                        '</a>';
                }
                if (!$params['dontShowMoveIcons'])      {
                        $icons[]='<a href="#" onclick="setFormValueManipulate(\''.$fName.'\',\'Up\'); return false;">'.
-                                       '<img src="'.$this->backPath.'gfx/group_totop.gif" width="14" height="14" border="0" '.t3lib_BEfunc::titleAltAttrib($this->getLL("l_move_to_top")).' />'.
+                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/group_totop.gif','width="14" height="14"').' border="0" '.t3lib_BEfunc::titleAltAttrib($this->getLL('l_move_to_top')).' />'.
                                        '</a>';
                }
                $icons[]='<a href="#" onclick="setFormValueManipulate(\''.$fName.'\',\'Remove\'); return false;">'.
-                               '<img src="'.$this->backPath.'gfx/group_clear.gif" width="14" height="14" border="0" '.t3lib_BEfunc::titleAltAttrib($this->getLL("l_remove_selected")).' />'.
+                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/group_clear.gif','width="14" height="14"').' border="0" '.t3lib_BEfunc::titleAltAttrib($this->getLL('l_remove_selected')).' />'.
                                '</a>';
-               $str='<table border=0 cellpadding=0 cellspacing=0 width=1>
-                       '.($params["headers"]?'
+               $str='<table border="0" cellpadding="0" cellspacing="0" width="1">
+                       '.($params['headers']?'
                                <tr>
                                        <td>'.$this->wrapLabels($params['headers']['selector']).'</td>
                                        <td></td>
@@ -2086,7 +2086,7 @@ class t3lib_TCEforms      {
                $fieldChangeFunc = $PA['fieldChangeFunc'];
                $item = $itemKinds[0];
                $outArr=array();
-               $fName='['.$table.']['.$row["uid"].']['.$field.']';
+               $fName='['.$table.']['.$row['uid'].']['.$field.']';
                $md5ID = t3lib_div::shortmd5($itemName);
 
                        // traverse wizards:
@@ -2216,7 +2216,7 @@ class t3lib_TCEforms      {
                                                $dist=$dist?'<td><img src="clear.gif" height="1" width="'.$dist.'" alt="" /></td>':'';
                                                $outStr='<tr><td'.$vAlign.'>'.implode('</td>'.$dist.'<td'.$vAlign.'>',$outArr).'</td></tr>';
                                        }
-                                       $outStr='<table border="0" cellpadding="'.intval($wizConf["_PADDING"]).'" cellspacing="0">'.$outStr.'</table>';
+                                       $outStr='<table border="0" cellpadding="'.intval($wizConf['_PADDING']).'" cellspacing="0">'.$outStr.'</table>';
                                } else {
                                        $outStr=implode('',$outArr);
                                }
@@ -2238,7 +2238,7 @@ class t3lib_TCEforms      {
        }
 
        /**
-        * Get icon
+        * Get icon (for example for selector boxes)
         * 
         * @param       string          Icon reference
         * @return      array           Array with two values; the icon file reference, the icon file information array (getimagesize())
@@ -2282,7 +2282,7 @@ class t3lib_TCEforms      {
 
                $aOnClick = $this->blur().substr($palJSFunc,0,-3).'0);return false;';
 
-               $iconCode = '<a href="#" onclick="'.htmlspecialchars($aOnClick).'"'.t3lib_BEfunc::titleAttrib($table).'>'.
+               $iconCode = '<a href="#" onclick="'.htmlspecialchars($aOnClick).'" title="'.htmlspecialchars($table).'">'.
                                        $header.
                                        '</a>';
                return $retFunc ? array($iconCode,$palJSFunc) : $iconCode;
@@ -2509,7 +2509,7 @@ class t3lib_TCEforms      {
        }
        
        /**
-        * addSelect options
+        * Add selector box items of more exotic kinds.
         * 
         * @param       array           The array of items (label,value,icon)
         * @param       array           The "columns" array for the field (from TCA)
@@ -2727,7 +2727,7 @@ class t3lib_TCEforms      {
                
                $this->totalWrap='
                <table border="0" cellspacing="0" cellpadding="0" width="'.($this->docLarge?440+150:440).'">'.
-                       '<tr bgcolor="'.t3lib_div::modifyHTMLColorAll($GLOBALS["SOBE"]->doc->bgColor2,$light).'">       
+                       '<tr bgcolor="'.t3lib_div::modifyHTMLColorAll($GLOBALS['SOBE']->doc->bgColor2,$light).'">       
                                <td>&nbsp;</td>
                                <td>###RECORD_ICON### <font color="#333366"><b>###TABLE_TITLE###</b></font> ###ID_NEW_INDICATOR### - ###RECORD_LABEL###</td>
                        </tr>'.
@@ -2847,7 +2847,7 @@ class t3lib_TCEforms      {
                        $arr[$k]=str_replace('###TABLE_TITLE###',htmlspecialchars($this->sL($TCA[$table]['ctrl']['title'])),$arr[$k]);
 
                        $titleA=t3lib_BEfunc::titleAltAttrib($this->getRecordPath($table,$rec));
-                       $arr[$k]=str_replace('###RECORD_ICON###',t3lib_iconWorks::getIconImage($table,$rec,$this->backPath,'align="absmiddle"'.$titleA),$arr[$k]);
+                       $arr[$k]=str_replace('###RECORD_ICON###',t3lib_iconWorks::getIconImage($table,$rec,$this->backPath,'class="absmiddle"'.$titleA),$arr[$k]);
                }
                return $arr;
        }
@@ -2894,7 +2894,7 @@ class t3lib_TCEforms      {
         * @return      string          
         */
        function getDivider()   {
-               //return "<HR>";
+               //return "<hr />";
        }
 
        /**
@@ -2904,7 +2904,7 @@ class t3lib_TCEforms      {
         * @return      string          HTML output
         */
        function printPalette($palArr)  {
-               $out="";
+               $out='';
                reset($palArr);
                $bgColor=' bgcolor="'.$this->colorScheme[2].'"';
                while(list(,$content)=each($palArr))    {
@@ -2926,11 +2926,11 @@ class t3lib_TCEforms    {
                $out='<table border="0" cellpadding="0" cellspacing="0">
                        <tr>
                                <td><img src="clear.gif" width="'.intval($this->paletteMargin).'" height="1" alt="" /></td>'.
-                                       implode("",$hRow).'
+                                       implode('',$hRow).'
                        </tr>
                        <tr>
                                <td></td>'.
-                               implode("",$iRow).'
+                               implode('',$iRow).'
                        </tr>
                </table>';
 
@@ -2949,7 +2949,7 @@ class t3lib_TCEforms      {
                if ($this->globalShowHelp && $GLOBALS['TCA_DESCR'][$table]['columns'][$field] && (($this->edit_showFieldHelp=='icon'&&!$this->doLoadTableDescr($table)) || $force))     {
                        $aOnClick = 'vHWin=window.open(\''.$this->backPath.'view_help.php?tfID='.($table.'.'.$field).'\',\'viewFieldHelp\',\'height=300,width=250,status=0,menubar=0,scrollbars=1\');vHWin.focus();return false;';
                        return '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
-                                       '<img src="'.$this->backPath.'gfx/helpbubble.gif" width="14" height="14" hspace="2" border="0" align="absmiddle"'.($GLOBALS['CLIENT']['FORMSTYLE']?' style="cursor:help;"':'').' alt="" />'.
+                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/helpbubble.gif','width="14" height="14"').' hspace="2" border="0" class="absmiddle"'.($GLOBALS['CLIENT']['FORMSTYLE']?' style="cursor:help;"':'').' alt="" />'.
                                        '</a>';
                } else return '&nbsp;';
        }
@@ -3052,6 +3052,12 @@ class t3lib_TCEforms     {
        function JStop($formname='forms[0]')    {
                if (count($this->RTEwindows))   {
                        $out.='
+
+
+                               <!--
+                                       JavaScript in top of page (before form):
+                               -->
+
                                <script type="text/javascript">
                                        /*<![CDATA[*/
                                                var TBE_RTE_WINDOWS=new Array();
@@ -3128,9 +3134,9 @@ class t3lib_TCEforms      {
                        <script type="text/javascript">
                                /*<![CDATA[*/
                                
-                               var TBE_EDITOR_req=new Image();         TBE_EDITOR_req.src = "'.$this->backPath.'gfx/required_h.gif"; 
-                               var TBE_EDITOR_cm=new Image();          TBE_EDITOR_cm.src = "'.$this->backPath.'gfx/content_client.gif"; 
-                               var TBE_EDITOR_sel=new Image();         TBE_EDITOR_sel.src = "'.$this->backPath.'gfx/content_selected.gif"; 
+                               var TBE_EDITOR_req=new Image();         TBE_EDITOR_req.src = "'.t3lib_iconWorks::skinImg($this->backPath,'gfx/required_h.gif','',1).'"; 
+                               var TBE_EDITOR_cm=new Image();          TBE_EDITOR_cm.src = "'.t3lib_iconWorks::skinImg($this->backPath,'gfx/content_client.gif','',1).'"; 
+                               var TBE_EDITOR_sel=new Image();         TBE_EDITOR_sel.src = "'.t3lib_iconWorks::skinImg($this->backPath,'gfx/content_selected.gif','',1).'"; 
                                var TBE_EDITOR_clear=new Image();       TBE_EDITOR_clear.src = "'.$this->backPath.'clear.gif"; 
                                var TBE_REQUIRED=new Array();
 '.implode(chr(10),$reqLines).'
@@ -3210,8 +3216,8 @@ class t3lib_TCEforms      {
                                }
                                '.($this->isPalettedoc?'
                                function TBE_EDITOR_setOriginalFormFieldValue(theField) {       //
-                                       if ('.$this->isPalettedoc.' && '.$this->isPalettedoc.'.'.$formname.' && '.$this->isPalettedoc.'.'.$formname.'[theField]) {
-                                               '.$this->isPalettedoc.'.'.$formname.'[theField].value = document.'.$formname.'[theField].value;
+                                       if ('.$this->isPalettedoc.' && '.$this->isPalettedoc.'.document.'.$formname.' && '.$this->isPalettedoc.'.document.'.$formname.'[theField]) {
+                                               '.$this->isPalettedoc.'.document.'.$formname.'[theField].value = document.'.$formname.'[theField].value;
                                        }
                                }
                                ':'').'
@@ -3325,7 +3331,7 @@ class t3lib_TCEforms      {
                                                if (document.'.$formname.'[theField])           url+="&rec["+field+"]="+TBE_EDITOR_rawurlencode(document.'.$formname.'[theField].value);
                                        }
                                        if (top.topmenuFrame)   {
-                                               top.topmenuFrame.document.location = url+"&backRef="+(top.content.list_frame?"top.content.list_frame":"top.content");
+                                               top.topmenuFrame.document.location = url+"&backRef="+(top.content.list_frame ? (top.content.list_frame.view_frame ? "top.content.list_frame.view_frame" : "top.content.list_frame") : "top.content");
                                        } else if (!isOnFocus) {
                                                var vHWin=window.open(url,"palette","height=300,width=200,status=0,menubar=0,scrollbars=1");
                                                vHWin.focus();
@@ -3398,17 +3404,11 @@ class t3lib_TCEforms    {
                
                        var browserWin="";
 
-                       function setFormValueOpenBrowser (mode,params) {        //
+                       function setFormValueOpenBrowser(mode,params) { //
                                var url = "'.$this->backPath.'browser.php?mode="+mode+"&bparams="+params;
-                               if (!browserWin)        {
-                                       browserWin = window.open(url,"Typo3WinBrowser","height=350,width="+(mode=="db"?650:600)+",status=0,menubar=0,resizable=1,scrollbars=1");
-                                       browserWin.typoWin = self;
-                                       browserWin.focus();
-                               } else {
-                                       browserWin.content.document.location=url;
-                                       browserWin.typoWin = self;
-                                       browserWin.focus();
-                               }
+
+                               browserWin = window.open(url,"Typo3WinBrowser","height=350,width="+(mode=="db"?650:600)+",status=0,menubar=0,resizable=1,scrollbars=1");
+                               browserWin.focus();
                        }
                        function setFormValueFromBrowseWin(fName,value,label)   {       //
                                var formObj = setFormValue_getFObj(fName)
@@ -3499,7 +3499,7 @@ class t3lib_TCEforms      {
        }
 
        /**
-        * Prints necessary JS
+        * Prints necessary JavaScript for TCEforms (after the form HTML).
         * 
         * @return      void            
         */
@@ -3507,10 +3507,18 @@ class t3lib_TCEforms    {
                        // JS evaluation:
                $out = $this->JSbottom($this->formName);
                        // 
-               if ($this->printNeededJS["dbFileIcons"])        {
-                       $out.= '<script type="text/javascript">
+               if ($this->printNeededJS['dbFileIcons'])        {
+                       $out.= '
+                                                               
+
+
+                       <!--
+                               JavaScript after the form has been drawn:
+                       -->
+                                                               
+                       <script type="text/javascript">
                                /*<![CDATA[*/
-                       '.$this->dbFileCon("document.".$this->formName).'
+                       '.$this->dbFileCon('document.'.$this->formName).'
                                /*]]>*/
                        </script>';