See changelog (updated later)
authorKasper Skårhøj <kasper@typo3.org>
Thu, 9 Sep 2004 02:26:26 +0000 (02:26 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Thu, 9 Sep 2004 02:26:26 +0000 (02:26 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@454 709f56b5-9817-0410-a4d7-c38de5d9e867

76 files changed:
misc/phpcheck/incfile.php
t3lib/class.t3lib_arraybrowser.php
t3lib/class.t3lib_cs.php
t3lib/class.t3lib_db.php
t3lib/class.t3lib_div.php
t3lib/class.t3lib_extfilefunc.php
t3lib/class.t3lib_formmail.php
t3lib/class.t3lib_loadmodules.php
t3lib/class.t3lib_querygenerator.php
t3lib/class.t3lib_sqlparser.php
t3lib/class.t3lib_stdgraphic.php
t3lib/class.t3lib_tceforms.php
t3lib/class.t3lib_tcemain.php
t3lib/class.t3lib_timetrack.php
t3lib/class.t3lib_transferdata.php
t3lib/class.t3lib_treeview.php
t3lib/class.t3lib_tsfebeuserauth.php
t3lib/class.t3lib_tstemplate.php
t3lib/class.t3lib_userauth.php
t3lib/config_default.php
t3lib/stddb/tables.php
t3lib/thumbs.php
typo3/alt_clickmenu.php
typo3/alt_db_navframe.php
typo3/alt_doc.php
typo3/alt_intro.php
typo3/alt_main.php
typo3/alt_menu.php
typo3/alt_shortcut.php
typo3/class.db_list.inc
typo3/class.db_list_extra.inc
typo3/db_list.php
typo3/index.php
typo3/init.php
typo3/install/index.php
typo3/mod/help/about/index.php
typo3/mod/help/cshmanual/ext_icon.gif
typo3/mod/tools/em/index.php
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/cms/layout/locallang.xml
typo3/sysext/cms/layout/locallang_db_new_content_el.xml
typo3/sysext/cms/layout/locallang_mod.xml
typo3/sysext/cms/locallang_csh_webinfo.xml
typo3/sysext/cms/locallang_csh_weblayout.xml
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_pagegen.php
typo3/sysext/cms/tslib/class.tslib_search.php
typo3/sysext/cms/tslib/index_ts.php
typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc
typo3/sysext/cms/tslib/showpic.php
typo3/sysext/cms/web_info/class.tx_cms_webinfo_lang.php
typo3/sysext/context_help/locallang_csh_fe_groups.xml
typo3/sysext/context_help/locallang_csh_fe_users.xml
typo3/sysext/context_help/locallang_csh_pages.xml
typo3/sysext/context_help/locallang_csh_statictpl.xml
typo3/sysext/context_help/locallang_csh_systmpl.xml
typo3/sysext/context_help/locallang_csh_ttcontent.xml
typo3/sysext/extra_page_cm_options/class.tx_extrapagecmoptions.php
typo3/sysext/func_wizards/locallang_csh.xml
typo3/sysext/install/mod/class.tx_install.php
typo3/sysext/lang/locallang_browse_links.xml
typo3/sysext/lang/locallang_core.xml
typo3/sysext/lang/locallang_mod_tools_em.xml
typo3/sysext/lang/locallang_mod_web_func.xml
typo3/sysext/lang/locallang_mod_web_info.xml
typo3/sysext/lang/locallang_mod_web_list.xml
typo3/sysext/lang/locallang_mod_web_perm.xml
typo3/sysext/lang/locallang_tsfe.xml
typo3/sysext/lang/locallang_view_help.xml
typo3/sysext/wizard_crpages/locallang_csh.xml
typo3/sysext/wizard_sortpages/locallang_csh.xml
typo3/tce_db.php
typo3/template.php
typo3/wizard_forms.php
typo3/wizard_table.php

index 8e39c04..2f64e13 100755 (executable)
@@ -32,15 +32,15 @@ class t3lib_div {
        /**
         * Abstraction method which returns System Environment Variables regardless of server OS, CGI/MODULE version etc. Basically this is SERVER variables for most of them.
         * This should be used instead of getEnv() and HTTP_SERVER_VARS/ENV_VARS to get reliable values for all situations.
-        * 
+        *
         * Usage: 226
-        * 
+        *
         * @param       string          Name of the "environment variable"/"server variable" you wish to use. Valid values are SCRIPT_NAME, SCRIPT_FILENAME, REQUEST_URI, PATH_INFO, REMOTE_ADDR, REMOTE_HOST, HTTP_REFERER, HTTP_HOST, HTTP_USER_AGENT, HTTP_ACCEPT_LANGUAGE, QUERY_STRING, TYPO3_DOCUMENT_ROOT, TYPO3_HOST_ONLY, TYPO3_HOST_ONLY, TYPO3_REQUEST_HOST, TYPO3_REQUEST_URL, TYPO3_REQUEST_SCRIPT, TYPO3_REQUEST_DIR, TYPO3_SITE_URL, _ARRAY
         * @return      string          Value based on the input key, independent of server/os environment.
         */
        function getIndpEnv($getEnvName)        {
                global $HTTP_SERVER_VARS;
-               /* 
+               /*
                        Conventions:
                        output from parse_url():
                        URL:    http://username:password@192.168.1.4:8080/typo3/32/temp/phpcheck/index.php/arg1/arg2/arg3/?arg1,arg2,arg3&p1=parameter1&p2[key]=value#link1
@@ -52,12 +52,12 @@ class t3lib_div {
                            [path] => '/typo3/32/temp/phpcheck/index.php/arg1/arg2/arg3/'
                            [query] => 'arg1,arg2,arg3&p1=parameter1&p2[key]=value'
                            [fragment] => 'link1'
-                               
+
                                Further definition: [path_script] = '/typo3/32/temp/phpcheck/index.php'
                                                                        [path_dir] = '/typo3/32/temp/phpcheck/'
                                                                        [path_info] = '/arg1/arg2/arg3/'
                                                                        [path] = [path_script/path_dir][path_info]
-                                                                               
+
 
                        Keys supported:
 
@@ -75,30 +75,30 @@ class t3lib_div {
                                REMOTE_HOST             =       (client host)
                                HTTP_USER_AGENT =       (client user agent)
                                HTTP_ACCEPT_LANGUAGE    = (client accept language)
-       
+
                        SERVER____:
                                SCRIPT_FILENAME =       Absolute filename of script             (Differs between windows/unix). On windows 'C:\\blabla\\blabl\\' will be converted to 'C:/blabla/blabl/'
-                               
+
                        Special extras:
                                TYPO3_HOST_ONLY =               [host]                  = 192.168.1.4
                                TYPO3_PORT              =               [port]                  = 8080 (blank if 80, taken from host value)
                                TYPO3_REQUEST_HOST =    [scheme]://[host][:[port]]
-                               TYPO3_REQUEST_URL =             [scheme]://[host][:[port]][path]?[query]        (sheme will by default be 'http' until we can detect if it's https - 
+                               TYPO3_REQUEST_URL =             [scheme]://[host][:[port]][path]?[query]        (sheme will by default be 'http' until we can detect if it's https -
                                TYPO3_REQUEST_SCRIPT =  [scheme]://[host][:[port]][path_script]
                                TYPO3_REQUEST_DIR =             [scheme]://[host][:[port]][path_dir]
-                               TYPO3_SITE_URL =                [scheme]://[host][:[port]][path_dir] of the TYPO3 website 
+                               TYPO3_SITE_URL =                [scheme]://[host][:[port]][path_dir] of the TYPO3 website
                                TYPO3_DOCUMENT_ROOT     =       Absolute path of root of documents:     TYPO3_DOCUMENT_ROOT.SCRIPT_NAME = SCRIPT_FILENAME (typically)
-               
+
                        Notice: [fragment] is apparently NEVER available to the script!
-                       
-                       
+
+
                        Testing suggestions:
                        - Output all the values.
                        - In the script, make a link to the script it self, maybe add some parameters and click the link a few times so HTTP_REFERER is seen
                        - ALSO TRY the script from the ROOT of a site (like 'http://www.mytest.com/' and not 'http://www.mytest.com/test/' !!)
-               
+
                */
-               
+
 #              if ($getEnvName=='HTTP_REFERER')        return '';
                switch((string)$getEnvName)     {
                        case 'SCRIPT_NAME':
@@ -214,7 +214,7 @@ class t3lib_div {
        }
 
 }
-       
+
        function view_array($array_in)  {
                // Returns HTML-code, which is a visual representation of a multidimensional array
                // use t3lib_div::print_array() in order to print an array
@@ -242,21 +242,21 @@ class t3lib_div {
        }
 
 
-       
-       
-       
-       
-       
 
 
 
-       
-       
-       
 
 
-       
-       error_reporting (E_ALL ^ E_NOTICE); 
+
+
+
+
+
+
+
+
+
+       error_reporting (E_ALL ^ E_NOTICE);
 
 define("TYPO3_OS", stristr(PHP_OS,"win")&&!stristr(PHP_OS,"darwin")?"WIN":"");
 /*
@@ -271,7 +271,7 @@ define("PATH_thisScript",str_replace('//','/', str_replace('\\','/', php_sapi_na
 define('PATH_site', dirname(PATH_thisScript).'/');
 
 
-if (count($HTTP_GET_VARS) || $HTTP_SERVER_VARS["HTTP_REFERER"])        {
+if (count($_GET) || $_SERVER["HTTP_REFERER"])  {
        # KOMPENSATED:
        echo "<H3>t3lib_div::getIndpEnv()</H3><p>These are 'system variables' returned from t3lib_div::getIndpEnv() and should be universal for any server configuration:</p>";
        debug(t3lib_div::getIndpEnv("_ARRAY"));
@@ -287,8 +287,8 @@ if (count($HTTP_GET_VARS) || $HTTP_SERVER_VARS["HTTP_REFERER"])     {
 
 
        ##debug(parse_url("http://admin:palindrom@192.168.1.4:8080/typo3/32/temp/phpcheck/index.php/arg1/arg2/arg3/index.php?arg1,arg2,arg3&p1=parameter1&p2[key]=value#link1"));
-       
-       
+
+
        echo "<H3>Raw values</H3><p>These are the raw 'system variables' returned from getenv(), HTTP_SERVER_VARS, HTTP_ENV_VARS etc. These are displayed here so we can find the right values via this testscript to map to with t3lib_div::getIndpEnv()</p>";
        $envTestVars = explode(",","REQUEST_URI,REMOTE_ADDR,REMOTE_HOST,PATH_INFO,SCRIPT_NAME,SCRIPT_FILENAME,HTTP_HOST,HTTP_USER_AGENT,HTTP_ACCEPT_ENCODING,HTTP_REFERER,QUERY_STRING");
        $lines=array();
@@ -322,8 +322,8 @@ if (count($HTTP_GET_VARS) || $HTTP_SERVER_VARS["HTTP_REFERER"])     {
 
 
        echo "Cookie 'test_script_cookie': '<strong>".$HTTP_COOKIE_VARS["test_script_cookie"]."</strong>'<BR>";
-       
-       
+
+
        echo '<HR><a name="link1"></a>';
        echo '<div style="border: 1px solid black; padding: 10px 10px 10px 10px;"><h3>What to do now?</h3>
                <p>1) Click this link above once more: <a href="index.php?arg1,arg2,arg3&p1=parameter1&p2[key]='.substr(md5(time()),0,4).'#link1">Go to this page again.</a><BR>
@@ -331,12 +331,12 @@ if (count($HTTP_GET_VARS) || $HTTP_SERVER_VARS["HTTP_REFERER"])   {
                2a) You might help us find any differences in your values to this <a href="reference.html" target="_blank">reference example</a> by comparing the values before you send the result (thanks).
                <br>
                3) If you are really advanced you try and click the link below here. With CGI-versions of servers it will most likely give an error page. If it does not, please send the output to me as well (save HTML-page and send to kasper@typo3.com). If you do this PATH_INFO test, please let me know.<br><br>
-               
+
                4) For the really, really advanced folks, it might be interesting to see the output if you could place this link in the root of a domain. That means the index.php script will be executed from eg. "http://www.blablabla.com/" and not "http://www.blablabla.com/kaspers_test/" - it can make a difference.<br>
                <br>
                <br>
                I am operating with these categories of servers. <strong>Please identify your configuration and label your email with that "type":</strong><br><br>
-               
+
                <table border=1>
 <tr bgcolor="#eeeeee">
        <td><em>TYPE:</em></td>
@@ -388,10 +388,10 @@ if (count($HTTP_GET_VARS) || $HTTP_SERVER_VARS["HTTP_REFERER"])   {
 </tr>
 </table>
 
-               
+
                </p></div>';
        echo '<a href="index.php/arg1/arg2/arg3/#link2" name="link2">Go to this page again (PATH_INFO).</a><BR>';
-       
+
        phpinfo();
 } else {
        echo '<a href="index.php?arg1,arg2,arg3&p1=parameter1&p2[key]=value#link1" name="link1">Click this link to start the test.</a><BR>';
index 64d5d2e..048fa28 100644 (file)
@@ -77,6 +77,7 @@ class t3lib_arrayBrowser      {
        var $searchKeys = array();              // After calling the getSearchKeys function this array is populated with the key-positions in the array which contains values matching the search.
        var $fixedLgd=1;                                // If set, the values are truncated with "..." appended if longer than a certain length.
        var $regexMode=0;                               // If set, search for string with regex, otherwise stristr()
+       var $varName='';                                // Set var name here if you want links to the variable name.
 
        /**
         * Make browsable tree
@@ -98,7 +99,7 @@ class t3lib_arrayBrowser      {
                reset($arr);
                while (list($key,)=each($arr))  {
                        $a++;
-                       $depth=$depth_in.$key;
+                       $depth = $depth_in.$key;
                        $goto = substr(md5($depth),0,6);
 
                        $deeper = (is_array($arr[$key]) && $this->depthKeys[$depth]) ? 1 : 0;
@@ -117,7 +118,7 @@ class t3lib_arrayBrowser    {
                        }
 
                        $label = $key;
-                       $HTML.='['.$label.']';
+                       $HTML.= $this->wrapArrayKey($label,$depth,!is_array($arr[$key]) ? $arr[$key] : '');
 
                        if (!is_array($arr[$key]))      {
                                $theValue = $arr[$key];
@@ -128,9 +129,9 @@ class t3lib_arrayBrowser    {
                                        $theValue = $this->fixed_lgd($theValue,$lgdChars);
                                }
                                if ($this->searchKeys[$depth])  {
-                                       $HTML.='=<b><span style="color:red;">'.htmlspecialchars($theValue).'</font></b>';
+                                       $HTML.='=<span style="color:red;">'.$this->wrapValue($theValue,$depth).'</font>';
                                } else {
-                                       $HTML.='=<b>'.htmlspecialchars($theValue).'</b>';
+                                       $HTML.='='.$this->wrapValue($theValue,$depth);
                                }
                        }
                        $HTML.='<br />';
@@ -143,6 +144,40 @@ class t3lib_arrayBrowser   {
        }
 
        /**
+        * Wrapping the value in bold tags etc.
+        *
+        * @param       string          The title string
+        * @param       string          Depth path
+        * @return      string          Title string, htmlspecialchars()'ed
+        */
+       function wrapValue($theValue,$depth)    {
+               return '<b>'.htmlspecialchars($theValue).'</b>';
+       }
+
+       /**
+        * Wrapping the value in bold tags etc.
+        *
+        * @param       string          The title string
+        * @param       string          Depth path
+        * @param       string          The value for the array entry.
+        * @return      string          Title string, htmlspecialchars()'ed
+        */
+       function wrapArrayKey($label,$depth,$theValue)  {
+
+                       // Protect label:
+               $label = htmlspecialchars($label);
+
+                       // If varname is set:
+               if ($this->varName) {
+                       $variableName = $this->varName.'[\''.str_replace('.','\'][\'',$depth).'\'] = '.(!t3lib_div::testInt($theValue) ? '\''.addslashes($theValue).'\'' : $theValue).'; ';
+                       $label = '<a href="'.htmlspecialchars('index.php?varname='.$variableName.'#varname').'">'.$label.'</a>';
+               }
+
+                       // Return:
+               return '['.$label.']';
+       }
+
+       /**
         * Creates an array with "depthKeys" which will expand the array to show the search results
         *
         * @param       array           The array to search for the value
index 2a4af73..41defbc 100755 (executable)
@@ -1433,8 +1433,7 @@ class t3lib_cs {
         * @see strtolower(), strtoupper()
         */
        function conv_case($charset,$string,$case)      {
-               if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] == 'mbstring' &&
-                       float(phpversion()) >= 4.3)     {
+               if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] == 'mbstring' && float(phpversion()) >= 4.3)   {
                        if ($case == 'toLower') {
                                return mb_strtolower($str,'utf-8');
                        } else {
index b478dfb..ca0aa3f 100755 (executable)
@@ -132,7 +132,7 @@ class t3lib_DB {
 
 
                // Debug:
-       var $debugOutput = FALSE;                       // Set "TRUE" if you want database errors outputted.
+       var $debugOutput = TRUE;                        // Set "TRUE" if you want database errors outputted.
        var $debug_lastBuiltQuery = '';         // Internally: Set to last built query (not necessarily executed...)
 
                // Default link identifier:
@@ -280,17 +280,25 @@ class t3lib_DB {
         * @param       string          See exec_SELECTquery()
         * @param       string          See exec_SELECTquery()
         * @param       string          See exec_SELECTquery()
+        * @param       string          If set, the result array will carry this field names value as index. Requires that field to be selected of course!
         * @return      array           Array of rows.
         */
-       function exec_SELECTgetRows($select_fields,$from_table,$where_clause,$groupBy='',$orderBy='',$limit='') {
+       function exec_SELECTgetRows($select_fields,$from_table,$where_clause,$groupBy='',$orderBy='',$limit='',$uidIndexField='')       {
                $res = mysql_query($this->SELECTquery($select_fields,$from_table,$where_clause,$groupBy,$orderBy,$limit), $this->link);
                if ($this->debugOutput) $this->debug('exec_SELECTquery');
 
                unset($output);
                if (!$this->sql_error())        {
                        $output = array();
-                       while($output[] = $this->sql_fetch_assoc($res));
-                       array_pop($output);
+
+                       if ($uidIndexField)     {
+                               while($tempRow = $this->sql_fetch_assoc($res))  {
+                                       $output[$tempRow[$uidIndexField]] = $tempRow;
+                               }
+                       } else {
+                               while($output[] = $this->sql_fetch_assoc($res));
+                               array_pop($output);
+                       }
                }
                return $output;
        }
index 651cd04..2728f23 100755 (executable)
@@ -236,7 +236,7 @@ class t3lib_div {
         */
        function _GP($var)      {
                if(empty($var)) return;
-               $value = isset($GLOBALS['HTTP_POST_VARS'][$var]) ? $GLOBALS['HTTP_POST_VARS'][$var] : $GLOBALS['HTTP_GET_VARS'][$var];
+               $value = isset($_POST[$var]) ? $_POST[$var] : $_GET[$var];
                if (isset($value))      {
                        if (is_array($value))   { t3lib_div::stripSlashesOnArray($value); } else { $value = stripslashes($value); }
                }
@@ -249,11 +249,11 @@ class t3lib_div {
         * Usage: 27
         *
         * @param       string          Optional pointer to value in GET array (basically name of GET var)
-        * @return      mixed           If $var is set it returns the value of $HTTP_GET_VARS[$var]. If $var is NULL (default), returns $HTTP_GET_VARS itself. In any case *slashes are stipped from the output!*
+        * @return      mixed           If $var is set it returns the value of $_GET[$var]. If $var is NULL (default), returns $_GET itself. In any case *slashes are stipped from the output!*
         * @see _POST(), _GP(), _GETset()
         */
        function _GET($var=NULL)        {
-               $value = ($var === NULL) ? $GLOBALS['HTTP_GET_VARS'] : (empty($var) ? NULL : $GLOBALS['HTTP_GET_VARS'][$var]);
+               $value = ($var === NULL) ? $_GET : (empty($var) ? NULL : $_GET[$var]);
                if (isset($value))      {       // Removes slashes since TYPO3 has added them regardless of magic_quotes setting.
                        if (is_array($value))   { t3lib_div::stripSlashesOnArray($value); } else { $value = stripslashes($value); }
                }
@@ -266,11 +266,11 @@ class t3lib_div {
         * Usage: 41
         *
         * @param       string          Optional pointer to value in POST array (basically name of POST var)
-        * @return      mixed           If $var is set it returns the value of $HTTP_POST_VARS[$var]. If $var is NULL (default), returns $HTTP_POST_VARS itself. In any case *slashes are stipped from the output!*
+        * @return      mixed           If $var is set it returns the value of $_POST[$var]. If $var is NULL (default), returns $_POST itself. In any case *slashes are stipped from the output!*
         * @see _GET(), _GP()
         */
        function _POST($var=NULL)       {
-               $value = ($var === NULL) ? $GLOBALS['HTTP_POST_VARS'] : (empty($var) ? NULL : $GLOBALS['HTTP_POST_VARS'][$var]);
+               $value = ($var === NULL) ? $_POST : (empty($var) ? NULL : $_POST[$var]);
                if (isset($value))      {       // Removes slashes since TYPO3 has added them regardless of magic_quotes setting.
                        if (is_array($value))   { t3lib_div::stripSlashesOnArray($value); } else { $value = stripslashes($value); }
                }
@@ -278,10 +278,10 @@ class t3lib_div {
        }
 
        /**
-        * Writes input value to $HTTP_GET_VARS / $_GET
+        * Writes input value to $_GET
         * Usage: 2
         *
-        * @param       array           Array to write to $HTTP_GET_VARS / $_GET. Values should NOT be escaped at input time (but will be escaped before writing according to TYPO3 standards).
+        * @param       array           Array to write to $_GET. Values should NOT be escaped at input time (but will be escaped before writing according to TYPO3 standards).
         * @param       string          Alternative key; If set, this will not set the WHOLE GET array, but only the key in it specified by this value!
         * @return      void
         */
@@ -310,29 +310,13 @@ class t3lib_div {
         */
        function GPvar($var,$strip=0)   {
                if(empty($var)) return;
-               $value = isset($GLOBALS['HTTP_POST_VARS'][$var]) ? $GLOBALS['HTTP_POST_VARS'][$var] : $GLOBALS['HTTP_GET_VARS'][$var];
-               if (isset($value) && is_string($value)) { $value = stripslashes($value); }      // Originally check '&& get_magic_quotes_gpc() ' but the values of HTTP_GET_VARS are always slashed regardless of get_magic_quotes_gpc() because HTTP_POST/GET_VARS are run through addSlashesOnArray in the very beginning of index_ts.php eg.
+               $value = isset($_POST[$var]) ? $_POST[$var] : $_GET[$var];
+               if (isset($value) && is_string($value)) { $value = stripslashes($value); }      // Originally check '&& get_magic_quotes_gpc() ' but the values of $_GET are always slashed regardless of get_magic_quotes_gpc() because HTTP_POST/GET_VARS are run through addSlashesOnArray in the very beginning of index_ts.php eg.
                if ($strip && isset($value) && is_array($value)) { t3lib_div::stripSlashesOnArray($value); }
                return $value;
        }
 
        /**
-        * Sets global variables from HTTP_POST_VARS or HTTP_GET_VARS
-        * Usage: 0
-        *
-        * @param       string          List of GET/POST var keys to set globally
-        * @param       boolean         If set, values are passed through stripslashes()
-        * @return      void
-        * @deprecated
-        */
-       function setGPvars($list,$strip=0)      {
-               $vars = t3lib_div::trimExplode(',',$list,1);
-               while(list(,$var)=each($vars))  {
-                       $GLOBALS[$var] = t3lib_div::GPvar($var,$strip);
-               }
-       }
-
-       /**
         * Returns the GET/POST global arrays merged with POST taking precedence.
         * Usage: 1
         *
@@ -342,8 +326,8 @@ class t3lib_div {
         * @deprecated
         */
        function GParrayMerged($var)    {
-               $postA = is_array($GLOBALS['HTTP_POST_VARS'][$var]) ? $GLOBALS['HTTP_POST_VARS'][$var] : array();
-               $getA = is_array($GLOBALS['HTTP_GET_VARS'][$var]) ? $GLOBALS['HTTP_GET_VARS'][$var] : array();
+               $postA = is_array($_POST[$var]) ? $_POST[$var] : array();
+               $getA = is_array($_GET[$var]) ? $_GET[$var] : array();
                $mergedA = t3lib_div::array_merge_recursive_overrule($getA,$postA);
                t3lib_div::stripSlashesOnArray($mergedA);
                return $mergedA;
@@ -1321,7 +1305,7 @@ class t3lib_div {
                                } else {
                                        if (!$skipBlank || strcmp($AVal,''))    {
                                                $str.='&'.($rawurlencodeParamName ? rawurlencode($thisKeyName) : $thisKeyName).
-                                                       '='.rawurlencode($AVal);        // strips slashes because HTTP_POST_VARS / GET_VARS input is with slashes...
+                                                       '='.rawurlencode($AVal);        // strips slashes because _POST / _GET input is with slashes...
                                        }
                                }
                        }
@@ -1756,52 +1740,54 @@ class t3lib_div {
                $output='';
 
                        // Traverse the input array
-               foreach($array as $k=>$v)       {
-                       $attr = '';
-                       $tagName = $k;
-
-                               // Construct the tag name.
-                       if (!strcmp(intval($tagName),$tagName)) {       // If integer...;
-                               if ($options['useNindex']) {    // If numeric key, prefix "n"
-                                       $tagName = 'n'.$tagName;
-                               } else {        // Use special tag for num. keys:
-                                       $attr.=' index="'.$tagName.'"';
-                                       $tagName = $options['useIndexTagForNum'] ? $options['useIndexTagForNum'] : 'numIndex';
+               if (is_array($array))   {
+                       foreach($array as $k=>$v)       {
+                               $attr = '';
+                               $tagName = $k;
+
+                                       // Construct the tag name.
+                               if (!strcmp(intval($tagName),$tagName)) {       // If integer...;
+                                       if ($options['useNindex']) {    // If numeric key, prefix "n"
+                                               $tagName = 'n'.$tagName;
+                                       } else {        // Use special tag for num. keys:
+                                               $attr.=' index="'.$tagName.'"';
+                                               $tagName = $options['useIndexTagForNum'] ? $options['useIndexTagForNum'] : 'numIndex';
+                                       }
+                               } elseif($options['useIndexTagForAssoc']) {             // Use tag for all associative keys:
+                                       $attr.=' index="'.htmlspecialchars($tagName).'"';
+                                       $tagName = $options['useIndexTagForAssoc'];
+                               } elseif(isset($options['parentTagMap'][$parentTagName])) {             // Use tag based on parent tag name:
+                                       $attr.=' index="'.htmlspecialchars($tagName).'"';
+                                       $tagName = (string)$options['parentTagMap'][$parentTagName];
                                }
-                       } elseif($options['useIndexTagForAssoc']) {             // Use tag for all associative keys:
-                               $attr.=' index="'.htmlspecialchars($tagName).'"';
-                               $tagName = $options['useIndexTagForAssoc'];
-                       } elseif(isset($options['parentTagMap'][$parentTagName])) {             // Use tag based on parent tag name:
-                               $attr.=' index="'.htmlspecialchars($tagName).'"';
-                               $tagName = (string)$options['parentTagMap'][$parentTagName];
-                       }
 
-                               // The tag name is cleaned up so only alphanumeric chars (plus - and _) are in there and not longer than 100 chars either.
-                       $tagName = substr(ereg_replace('[^[:alnum:]_-]','',$tagName),0,100);
-
-                               // If the value is an array then we will call this function recursively:
-                       if (is_array($v))       {
-                               // Sub elements:
-                               $content = chr(10).t3lib_div::array2xml($v,$NSprefix,$level+1,'',$spaceInd,$options,$tagName).
-                                                       str_pad('',($level+1)*$indentN,$indentChar);
-                               $attr.=' type="array"';
-                       } else {        // Just a value:
-
-                                       // Look for binary chars:
-                               if (strcspn($v,$binaryChars) != strlen($v))     {       // Go for base64 encoding if the initial segment NOT matching any binary char has the same length as the whole string!
-                                               // If the value contained binary chars then we base64-encode it an set an attribute to notify this situation:
-                                       $content = chr(10).chunk_split(base64_encode($v));
-                                       $attr.=' base64="1"';
-                               } else {
-                                               // Otherwise, just htmlspecialchar the stuff:
-                                       $content = htmlspecialchars($v);
-                                       $dType = gettype($v);
-                                       if ($dType!='string')   { $attr.=' type="'.$dType.'"'; }
+                                       // The tag name is cleaned up so only alphanumeric chars (plus - and _) are in there and not longer than 100 chars either.
+                               $tagName = substr(ereg_replace('[^[:alnum:]_-]','',$tagName),0,100);
+
+                                       // If the value is an array then we will call this function recursively:
+                               if (is_array($v))       {
+                                       // Sub elements:
+                                       $content = chr(10).t3lib_div::array2xml($v,$NSprefix,$level+1,'',$spaceInd,$options,$tagName).
+                                                               str_pad('',($level+1)*$indentN,$indentChar);
+                                       $attr.=' type="array"';
+                               } else {        // Just a value:
+
+                                               // Look for binary chars:
+                                       if (strcspn($v,$binaryChars) != strlen($v))     {       // Go for base64 encoding if the initial segment NOT matching any binary char has the same length as the whole string!
+                                                       // If the value contained binary chars then we base64-encode it an set an attribute to notify this situation:
+                                               $content = chr(10).chunk_split(base64_encode($v));
+                                               $attr.=' base64="1"';
+                                       } else {
+                                                       // Otherwise, just htmlspecialchar the stuff:
+                                               $content = htmlspecialchars($v);
+                                               $dType = gettype($v);
+                                               if ($dType!='string')   { $attr.=' type="'.$dType.'"'; }
+                                       }
                                }
-                       }
 
-                               // Add the element to the output string:
-                       $output.=str_pad('',($level+1)*$indentN,$indentChar).'<'.$NSprefix.$tagName.$attr.'>'.$content.'</'.$NSprefix.$tagName.'>'.chr(10);
+                                       // Add the element to the output string:
+                               $output.=str_pad('',($level+1)*$indentN,$indentChar).'<'.$NSprefix.$tagName.$attr.'>'.$content.'</'.$NSprefix.$tagName.'>'.chr(10);
+                       }
                }
 
                        // If we are at the outer-most level, then we finally wrap it all in the document tags and return that as the value:
@@ -2518,14 +2504,13 @@ class t3lib_div {
 
        /**
         * Abstraction method which returns System Environment Variables regardless of server OS, CGI/MODULE version etc. Basically this is SERVER variables for most of them.
-        * This should be used instead of getEnv() and HTTP_SERVER_VARS/ENV_VARS to get reliable values for all situations.
+        * This should be used instead of getEnv() and $_SERVER/ENV_VARS to get reliable values for all situations.
         * Usage: 221
         *
         * @param       string          Name of the "environment variable"/"server variable" you wish to use. Valid values are SCRIPT_NAME, SCRIPT_FILENAME, REQUEST_URI, PATH_INFO, REMOTE_ADDR, REMOTE_HOST, HTTP_REFERER, HTTP_HOST, HTTP_USER_AGENT, HTTP_ACCEPT_LANGUAGE, QUERY_STRING, TYPO3_DOCUMENT_ROOT, TYPO3_HOST_ONLY, TYPO3_HOST_ONLY, TYPO3_REQUEST_HOST, TYPO3_REQUEST_URL, TYPO3_REQUEST_SCRIPT, TYPO3_REQUEST_DIR, TYPO3_SITE_URL, _ARRAY
         * @return      string          Value based on the input key, independent of server/os environment.
         */
        function getIndpEnv($getEnvName)        {
-               global $HTTP_SERVER_VARS;
                /*
                        Conventions:
                        output from parse_url():
@@ -2589,25 +2574,25 @@ class t3lib_div {
 #              if ($getEnvName=='HTTP_REFERER')        return '';
                switch((string)$getEnvName)     {
                        case 'SCRIPT_NAME':
-                               return (php_sapi_name()=='cgi'||php_sapi_name()=='cgi-fcgi')&&($HTTP_SERVER_VARS['ORIG_PATH_INFO']?$HTTP_SERVER_VARS['ORIG_PATH_INFO']:$HTTP_SERVER_VARS['PATH_INFO']) ? ($HTTP_SERVER_VARS['ORIG_PATH_INFO']?$HTTP_SERVER_VARS['ORIG_PATH_INFO']:$HTTP_SERVER_VARS['PATH_INFO']) : ($HTTP_SERVER_VARS['ORIG_SCRIPT_NAME']?$HTTP_SERVER_VARS['ORIG_SCRIPT_NAME']:$HTTP_SERVER_VARS['SCRIPT_NAME']);
+                               return (php_sapi_name()=='cgi'||php_sapi_name()=='cgi-fcgi')&&($_SERVER['ORIG_PATH_INFO']?$_SERVER['ORIG_PATH_INFO']:$_SERVER['PATH_INFO']) ? ($_SERVER['ORIG_PATH_INFO']?$_SERVER['ORIG_PATH_INFO']:$_SERVER['PATH_INFO']) : ($_SERVER['ORIG_SCRIPT_NAME']?$_SERVER['ORIG_SCRIPT_NAME']:$_SERVER['SCRIPT_NAME']);
                        break;
                        case 'SCRIPT_FILENAME':
-                               return str_replace('//','/', str_replace('\\','/', (php_sapi_name()=='cgi'||php_sapi_name()=='isapi' ||php_sapi_name()=='cgi-fcgi')&&($HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']?$HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']:$HTTP_SERVER_VARS['PATH_TRANSLATED'])? ($HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']?$HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']:$HTTP_SERVER_VARS['PATH_TRANSLATED']):($HTTP_SERVER_VARS['ORIG_SCRIPT_FILENAME']?$HTTP_SERVER_VARS['ORIG_SCRIPT_FILENAME']:$HTTP_SERVER_VARS['SCRIPT_FILENAME'])));
+                               return str_replace('//','/', str_replace('\\','/', (php_sapi_name()=='cgi'||php_sapi_name()=='isapi' ||php_sapi_name()=='cgi-fcgi')&&($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED'])? ($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED']):($_SERVER['ORIG_SCRIPT_FILENAME']?$_SERVER['ORIG_SCRIPT_FILENAME']:$_SERVER['SCRIPT_FILENAME'])));
                        break;
                        case 'REQUEST_URI':
                                // Typical application of REQUEST_URI is return urls, forms submitting to itselt etc. Eg:       returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))
-                               if (!$HTTP_SERVER_VARS['REQUEST_URI'])  {       // This is for ISS/CGI which does not have the REQUEST_URI available.
+                               if (!$_SERVER['REQUEST_URI'])   {       // This is for ISS/CGI which does not have the REQUEST_URI available.
                                        return '/'.ereg_replace('^/','',t3lib_div::getIndpEnv('SCRIPT_NAME')).
-                                               ($HTTP_SERVER_VARS['QUERY_STRING']?'?'.$HTTP_SERVER_VARS['QUERY_STRING']:'');
-                               } else return $HTTP_SERVER_VARS['REQUEST_URI'];
+                                               ($_SERVER['QUERY_STRING']?'?'.$_SERVER['QUERY_STRING']:'');
+                               } else return $_SERVER['REQUEST_URI'];
                        break;
                        case 'PATH_INFO':
-                                       // $HTTP_SERVER_VARS['PATH_INFO']!=$HTTP_SERVER_VARS['SCRIPT_NAME'] is necessary because some servers (Windows/CGI) are seen to set PATH_INFO equal to script_name
+                                       // $_SERVER['PATH_INFO']!=$_SERVER['SCRIPT_NAME'] is necessary because some servers (Windows/CGI) are seen to set PATH_INFO equal to script_name
                                        // Further, there must be at least one '/' in the path - else the PATH_INFO value does not make sense.
-                                       // IF 'PATH_INFO' never works for our purpose in TYPO3 with CGI-servers, then 'php_sapi_name()=='cgi'' might be a better check. Right now strcmp($HTTP_SERVER_VARS['PATH_INFO'],t3lib_div::getIndpEnv('SCRIPT_NAME')) will always return false for CGI-versions, but that is only as long as SCRIPT_NAME is set equal to PATH_INFO because of php_sapi_name()=='cgi' (see above)
-//                             if (strcmp($HTTP_SERVER_VARS['PATH_INFO'],t3lib_div::getIndpEnv('SCRIPT_NAME')) && count(explode('/',$HTTP_SERVER_VARS['PATH_INFO']))>1)        {
+                                       // IF 'PATH_INFO' never works for our purpose in TYPO3 with CGI-servers, then 'php_sapi_name()=='cgi'' might be a better check. Right now strcmp($_SERVER['PATH_INFO'],t3lib_div::getIndpEnv('SCRIPT_NAME')) will always return false for CGI-versions, but that is only as long as SCRIPT_NAME is set equal to PATH_INFO because of php_sapi_name()=='cgi' (see above)
+//                             if (strcmp($_SERVER['PATH_INFO'],t3lib_div::getIndpEnv('SCRIPT_NAME')) && count(explode('/',$_SERVER['PATH_INFO']))>1)  {
                                if (php_sapi_name()!='cgi'&&php_sapi_name()!='cgi-fcgi')        {
-                                       return $HTTP_SERVER_VARS['PATH_INFO'];
+                                       return $_SERVER['PATH_INFO'];
                                } else return '';
                        break;
                                // These are let through without modification
@@ -2618,7 +2603,7 @@ class t3lib_div {
                        case 'HTTP_USER_AGENT':
                        case 'HTTP_ACCEPT_LANGUAGE':
                        case 'QUERY_STRING':
-                               return $HTTP_SERVER_VARS[$getEnvName];
+                               return $_SERVER[$getEnvName];
                        break;
                        case 'TYPO3_DOCUMENT_ROOT':
                                // Some CGI-versions (LA13CGI) and mod-rewrite rules on MODULE versions will deliver a 'wrong' DOCUMENT_ROOT (according to our description). Further various aliases/mod_rewrite rules can disturb this as well.
@@ -2637,16 +2622,16 @@ class t3lib_div {
                                return $DR;
                        break;
                        case 'TYPO3_HOST_ONLY':
-                               $p = explode(':',$HTTP_SERVER_VARS['HTTP_HOST']);
+                               $p = explode(':',$_SERVER['HTTP_HOST']);
                                return $p[0];
                        break;
                        case 'TYPO3_PORT':
-                               $p = explode(':',$HTTP_SERVER_VARS['HTTP_HOST']);
+                               $p = explode(':',$_SERVER['HTTP_HOST']);
                                return $p[1];
                        break;
                        case 'TYPO3_REQUEST_HOST':
                                return (t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://').
-                                       $HTTP_SERVER_VARS['HTTP_HOST'];
+                                       $_SERVER['HTTP_HOST'];
                        break;
                        case 'TYPO3_REQUEST_URL':
                                return t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST').t3lib_div::getIndpEnv('REQUEST_URI');
@@ -2670,7 +2655,7 @@ class t3lib_div {
                                return substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'),strlen(t3lib_div::getIndpEnv('TYPO3_SITE_URL')));
                        break;
                        case 'TYPO3_SSL':
-                               return $HTTP_SERVER_VARS['SSL_SESSION_ID'] || !strcmp($HTTP_SERVER_VARS['HTTPS'],'on') ? TRUE : FALSE;
+                               return $_SERVER['SSL_SESSION_ID'] || !strcmp($_SERVER['HTTPS'],'on') ? TRUE : FALSE;
                        break;
                        case '_ARRAY':
                                $out = array();
@@ -2934,7 +2919,7 @@ class t3lib_div {
         * REMEMBER to use t3lib_div::unlink_tempfile() afterwards - otherwise temp-files will build up! They are NOT automatically deleted in PATH_site."typo3temp/"!
         * Usage: 6
         *
-        * @param       string          The temporary uploaded filename, eg. $GLOBALS['HTTP_POST_FILES']['[upload field name here]']['tmp_name']
+        * @param       string          The temporary uploaded filename, eg. $_FILES['[upload field name here]']['tmp_name']
         * @return      string          If a new file was successfully created, return its filename, otherwise blank string.
         * @see unlink_tempfile(), upload_copy_move()
         */
@@ -3041,6 +3026,7 @@ class t3lib_div {
         */
        function resolveSheetDefInDS($dataStructArray,$sheet='sDEF')    {
                if (is_array($dataStructArray['sheets']))       {
+                       $singleSheet = FALSE;
                        if (!isset($dataStructArray['sheets'][$sheet])) {
                                $sheet='sDEF';
                        }
@@ -3054,10 +3040,11 @@ class t3lib_div {
                                }
                        }
                } else {
+                       $singleSheet = TRUE;
                        $dataStruct = $dataStructArray;
                        $sheet = 'sDEF';        // Default sheet
                }
-               return array($dataStruct,$sheet);
+               return array($dataStruct,$sheet,$singleSheet);
        }
 
        /**
index 76f1d35..cfdd971 100755 (executable)
@@ -771,16 +771,16 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions     {
        /**
         * Upload of files (action=1)
         *
-        * @param       array           $cmds['data'] is the ID-number (points to the global var that holds the filename-ref  ($GLOBALS['HTTP_POST_FILES']['upload_'.$id]['name']). $cmds['target'] is the target directory
+        * @param       array           $cmds['data'] is the ID-number (points to the global var that holds the filename-ref  ($_FILES['upload_'.$id]['name']). $cmds['target'] is the target directory
         * @return      string          Returns the new filename upon success
         */
        function func_upload($cmds)     {
                if (!$this->isInit) return FALSE;
                $id = $cmds['data'];
-               if ($GLOBALS['HTTP_POST_FILES']['upload_'.$id]['name']) {
-                       $theFile = $GLOBALS['HTTP_POST_FILES']['upload_'.$id]['tmp_name'];                              // filename of the uploaded file
-                       $theFileSize = $GLOBALS['HTTP_POST_FILES']['upload_'.$id]['size'];                              // filesize of the uploaded file
-                       $theName = $this->cleanFileName(stripslashes($GLOBALS['HTTP_POST_FILES']['upload_'.$id]['name']));      // The original filename
+               if ($_FILES['upload_'.$id]['name'])     {
+                       $theFile = $_FILES['upload_'.$id]['tmp_name'];                          // filename of the uploaded file
+                       $theFileSize = $_FILES['upload_'.$id]['size'];                          // filesize of the uploaded file
+                       $theName = $this->cleanFileName(stripslashes($_FILES['upload_'.$id]['name']));  // The original filename
                        if (is_uploaded_file($theFile) && $theName)     {       // Check the file
                                if ($this->actionPerms['uploadFile'])   {
                                        if ($theFileSize<($this->maxUploadFileSize*1024))       {
index 16aa80e..31fb2be 100644 (file)
@@ -135,8 +135,8 @@ class t3lib_formmail extends t3lib_htmlmail {
 
                        for ($a=0;$a<10;$a++)   {
                                $varname = 'attachment'.(($a)?$a:'');
-                               $theFile = t3lib_div::upload_to_tempfile($GLOBALS['HTTP_POST_FILES'][$varname]['tmp_name']);
-                               $theName = $GLOBALS['HTTP_POST_FILES'][$varname]['name'];
+                               $theFile = t3lib_div::upload_to_tempfile($_FILES[$varname]['tmp_name']);
+                               $theName = $_FILES[$varname]['name'];
 
                                if ($theFile && @file_exists($theFile)) {
                                        if (filesize($theFile) < 250000)        {
index 7be1567..b306535 100644 (file)
@@ -387,7 +387,7 @@ class t3lib_loadModules {
                $path = ereg_replace ('/[^/.]+/\.\./', '/', $fullpath); // because 'path/../path' does not work
                if (@is_dir($path) && @file_exists($path.'/conf.php'))  {
                        include($path.'/conf.php');     // The conf-file is included. This must be valid PHP.
-                       if ($this->checkModAccess($name,$MCONF))        {
+                       if (!$MCONF['shy'] && $this->checkModAccess($name,$MCONF))      {
                                $modconf['name']=$name;
                                        // language processing. This will add module labels and image reference to the internal ->moduleLabels array of the LANG object.
                                if (is_object($GLOBALS['LANG']))        {
index 87ec612..0a8a615 100755 (executable)
@@ -309,12 +309,7 @@ class t3lib_queryGenerator {
                $this->queryConfig = $qC;
 
                $POST = t3lib_div::_POST();
-/*             // adjust queryConfig to match requests from user
-               if($GLOBALS["HTTP_POST_VARS"]["queryConfig"]) {
-                       $this->queryConfig = $GLOBALS["HTTP_POST_VARS"]["queryConfig"];
-                       t3lib_div::stripSlashesOnArray($this->queryConfig);
-               }
-*/
+
                // if delete...
                if($POST["qG_del"]) {
                        //initialize array to work on, save special parameters
index 1e3b349..9035cb0 100755 (executable)
@@ -930,7 +930,7 @@ class t3lib_sqlparser {
                $result = array();
 
                        // Field type:
-               if ($result['fieldType'] =  $this->nextPart($parseString,'^(int|smallint|tinyint|mediumint|double|varchar|char|text|tinytext|mediumtext|blob|tinyblob|mediumblob)([[:space:]]+|\()'))   {
+               if ($result['fieldType'] =  $this->nextPart($parseString,'^(int|smallint|tinyint|mediumint|double|varchar|char|text|tinytext|mediumtext|blob|tinyblob|mediumblob|longblob)([[:space:]]+|\()'))  {
 
                                // Looking for value:
                        if (substr($parseString,0,1)=='(')      {
index f31eb6e..82815bf 100644 (file)
  *
  *
  *
- *  143: class t3lib_stdGraphic
- *  218:     function init()
+ *  147: class t3lib_stdGraphic
+ *  224:     function init()
  *
  *              SECTION: Layering images / "IMAGE" GIFBUILDER object
- *  317:     function maskImageOntoImage(&$im,$conf,$workArea)
- *  377:     function copyImageOntoImage(&$im,$conf,$workArea)
- *  399:     function copyGifOntoGif(&$im,$cpImg,$conf,$workArea)
- *  478:     function imagecopyresized(&$im, $cpImg, $Xstart, $Ystart, $cpImgCutX, $cpImgCutY, $w, $h, $w, $h)
+ *  324:     function maskImageOntoImage(&$im,$conf,$workArea)
+ *  384:     function copyImageOntoImage(&$im,$conf,$workArea)
+ *  406:     function copyGifOntoGif(&$im,$cpImg,$conf,$workArea)
+ *  485:     function imagecopyresized(&$im, $cpImg, $Xstart, $Ystart, $cpImgCutX, $cpImgCutY, $w, $h, $w, $h)
  *
  *              SECTION: Text / "TEXT" GIFBUILDER object
- *  527:     function makeText(&$im,$conf,$workArea)
- *  643:     function txtPosition($conf,$workArea,$BB)
- *  697:     function calcBBox($conf)
- *  766:     function addToMap($cords,$conf)
- *  787:     function calcTextCordsForMap($cords,$offset, $conf)
- *  820:     function SpacedImageTTFText(&$im, $fontSize, $angle, $x, $y, $Fcolor, $fontFile, $text, $spacing, $wordSpacing)
- *  853:     function fontResize($conf)
+ *  534:     function makeText(&$im,$conf,$workArea)
+ *  650:     function txtPosition($conf,$workArea,$BB)
+ *  704:     function calcBBox($conf)
+ *  773:     function addToMap($cords,$conf)
+ *  796:     function calcTextCordsForMap($cords,$offset, $conf)
+ *  831:     function SpacedImageTTFText(&$im, $fontSize, $angle, $x, $y, $Fcolor, $fontFile, $text, $spacing, $wordSpacing, $splitRenderingConf, $sF=1)
+ *  868:     function fontResize($conf)
+ *  910:     function ImageTTFBBoxWrapper($fontSize, $angle, $fontFile, $string, $splitRendering, $sF=1)
+ *  951:     function ImageTTFTextWrapper($im, $fontSize, $angle, $x, $y, $color, $fontFile, $string, $splitRendering,$sF=1)
+ *  980:     function splitString($string,$splitRendering,$fontSize,$fontFile)
  *
  *              SECTION: Other GIFBUILDER objects related to TEXT
- *  915:     function makeOutline(&$im,$conf,$workArea,$txtConf)
- *  944:     function circleOffset($distance, $iterations)
- *  968:     function makeEmboss(&$im,$conf,$workArea,$txtConf)
- *  990:     function makeShadow(&$im,$conf,$workArea,$txtConf)
+ * 1136:     function makeOutline(&$im,$conf,$workArea,$txtConf)
+ * 1165:     function circleOffset($distance, $iterations)
+ * 1189:     function makeEmboss(&$im,$conf,$workArea,$txtConf)
+ * 1211:     function makeShadow(&$im,$conf,$workArea,$txtConf)
  *
  *              SECTION: Other GIFBUILDER objects
- * 1120:     function makeBox(&$im,$conf,$workArea)
- * 1139:     function makeEffect(&$im, $conf)
- * 1154:     function IMparams($setup)
- * 1237:     function adjust(&$im, $conf)
- * 1269:     function crop(&$im,$conf)
- * 1299:     function scale(&$im,$conf)
- * 1331:     function setWorkArea($workArea)
+ * 1341:     function makeBox(&$im,$conf,$workArea)
+ * 1360:     function makeEffect(&$im, $conf)
+ * 1375:     function IMparams($setup)
+ * 1458:     function adjust(&$im, $conf)
+ * 1490:     function crop(&$im,$conf)
+ * 1520:     function scale(&$im,$conf)
+ * 1552:     function setWorkArea($workArea)
  *
  *              SECTION: Adjustment functions
- * 1372:     function autolevels(&$im)
- * 1403:     function outputLevels(&$im,$low,$high,$swap='')
- * 1435:     function inputLevels(&$im,$low,$high,$swap='')
- * 1466:     function reduceColors(&$im,$limit, $cols)
+ * 1593:     function autolevels(&$im)
+ * 1624:     function outputLevels(&$im,$low,$high,$swap='')
+ * 1656:     function inputLevels(&$im,$low,$high,$swap='')
+ * 1687:     function reduceColors(&$im,$limit, $cols)
  *
  *              SECTION: GIFBUILDER Helper functions
- * 1504:     function prependAbsolutePath($fontFile)
- * 1518:     function v5_sharpen($factor)
- * 1537:     function v5_blur($factor)
- * 1554:     function randomName()
- * 1566:     function applyOffset($cords,$OFFSET)
- * 1579:     function convertColor($string)
- * 1629:     function recodeString($string)
- * 1650:     function singleChars($theText)
- * 1673:     function objPosition($conf,$workArea,$BB)
+ * 1725:     function prependAbsolutePath($fontFile)
+ * 1739:     function v5_sharpen($factor)
+ * 1758:     function v5_blur($factor)
+ * 1775:     function randomName()
+ * 1788:     function applyOffset($cords,$OFFSET)
+ * 1801:     function convertColor($string)
+ * 1851:     function recodeString($string)
+ * 1873:     function singleChars($theText,$returnUnicodeNumber=FALSE)
+ * 1896:     function objPosition($conf,$workArea,$BB)
  *
  *              SECTION: Scaling, Dimensions of images
- * 1752:     function imageMagickConvert($imagefile,$newExt='',$w='',$h='',$params='',$frame='',$options='',$mustCreate=0)
- * 1835:     function getImageDimensions($imageFile)
- * 1863:     function cacheImageDimensions($identifyResult)
- * 1895:     function getCachedImageDimensions($imageFile)
- * 1930:     function getImageScale($info,$w,$h,$options)
- * 2018:     function file_exists_typo3temp_file($output,$orig='')
+ * 1975:     function imageMagickConvert($imagefile,$newExt='',$w='',$h='',$params='',$frame='',$options='',$mustCreate=0)
+ * 2063:     function getImageDimensions($imageFile)
+ * 2091:     function cacheImageDimensions($identifyResult)
+ * 2123:     function getCachedImageDimensions($imageFile)
+ * 2157:     function getImageScale($info,$w,$h,$options)
+ * 2245:     function file_exists_typo3temp_file($output,$orig='')
  *
  *              SECTION: ImageMagick API functions
- * 2079:     function imageMagickIdentify($imagefile)
- * 2112:     function imageMagickExec($input,$output,$params)
- * 2130:     function combineExec($input,$overlay,$mask,$output)
- * 2145:     function wrapFileName($inputName)
+ * 2306:     function imageMagickIdentify($imagefile)
+ * 2340:     function imageMagickExec($input,$output,$params)
+ * 2358:     function combineExec($input,$overlay,$mask,$output)
+ * 2373:     function wrapFileName($inputName)
  *
  *              SECTION: Various IO functions
- * 2186:     function checkFile($file)
- * 2201:     function applyImageMagickToPHPGif(&$im, $command)
- * 2227:     function gif_or_jpg($type,$w,$h)
- * 2244:     function output($file)
- * 2288:     function destroy()
- * 2298:     function imgTag ($imgInfo)
- * 2310:     function ImageGif($destImg, $theImage)
- * 2327:     function imageCreateFromGif($sourceImg)
+ * 2414:     function checkFile($file)
+ * 2428:     function createTempSubDir($dirName)
+ * 2450:     function applyImageMagickToPHPGif(&$im, $command)
+ * 2476:     function gif_or_jpg($type,$w,$h)
+ * 2493:     function output($file)
+ * 2537:     function destroy()
+ * 2547:     function imgTag ($imgInfo)
+ * 2559:     function ImageGif($destImg, $theImage)
+ * 2576:     function imageCreateFromGif($sourceImg)
  *
- * TOTAL FUNCTIONS: 54
+ * TOTAL FUNCTIONS: 58
  * (This index is automatically created/updated by the extension "extdeveval")
  *
  */
@@ -156,8 +160,8 @@ class t3lib_stdGraphic      {
        var $maskNegate = '';                                           // Will be ' -negate' if ImageMagick ver 5.2+. See init();
        var $NO_IM_EFFECTS = '';
        var $cmds = Array (
-               'jpg' => '-colorspace RGB -sharpen 50 -quality 60',
-               'jpeg' => '-colorspace RGB -sharpen 50 -quality 60',
+               'jpg' => '',
+               'jpeg' => '',
                'gif' => '-colors 64',
                'png' => '-colors 64'
        );
@@ -220,6 +224,9 @@ class t3lib_stdGraphic      {
        function init() {
                $gfxConf = $GLOBALS['TYPO3_CONF_VARS']['GFX'];
 
+                       // Setting default JPG parameters:
+               $this->cmds['jpg'] = $this->cmds['jpeg'] = '-colorspace RGB -sharpen 50 -quality '.intval($gfxConf['im_jpg_quality']);
+
                if ($gfxConf['im_combine_filename'])    $this->combineScript=$gfxConf['im_combine_filename'];
                if ($gfxConf['im_noFramePrepended'])    $this->noFramePrepended=1;
 
@@ -255,8 +262,7 @@ class t3lib_stdGraphic      {
                                // - therefore must be disabled in order not to perform sharpen, blurring and such.
                        $this->NO_IM_EFFECTS = 1;
 
-                       $this->cmds['jpg']  = '-colorspace RGB -quality 60';
-                       $this->cmds['jpeg'] = '-colorspace RGB -quality 60';
+                       $this->cmds['jpg'] = $this->cmds['jpeg'] = '-colorspace RGB -quality '.intval($gfxConf['im_jpg_quality']);
                }
                        // ... but if 'im_v5effects' is set, dont care about 'im_no_effects'
                if ($gfxConf['im_v5effects'])   {
@@ -264,8 +270,7 @@ class t3lib_stdGraphic      {
                        $this->V5_EFFECTS = 1;
 
                        if ($gfxConf['im_v5effects']>0) {
-                               $this->cmds['jpg']  = '-colorspace RGB -quality 60'.$this->v5_sharpen(10);
-                               $this->cmds['jpeg'] = '-colorspace RGB -quality 60'.$this->v5_sharpen(10);
+                               $this->cmds['jpg'] = $this->cmds['jpeg'] = '-colorspace RGB -quality '.intval($gfxConf['im_jpg_quality']).$this->v5_sharpen(10);
                        }
                }
 
@@ -552,9 +557,9 @@ class t3lib_stdGraphic      {
 
                                for ($a=0; $a<$conf['iterations']; $a++)        {
                                        if ($spacing || $wordSpacing)   {               // If any kind of spacing applys, we use this function:
-                                               $this->SpacedImageTTFText($im, $conf['fontSize'], $conf['angle'], $txtPos[0], $txtPos[1], $Fcolor, t3lib_stdGraphic::prependAbsolutePath($conf['fontFile']), $theText, $spacing, $wordSpacing);
+                                               $this->SpacedImageTTFText($im, $conf['fontSize'], $conf['angle'], $txtPos[0], $txtPos[1], $Fcolor, t3lib_stdGraphic::prependAbsolutePath($conf['fontFile']), $theText, $spacing, $wordSpacing, $conf['splitRendering.']);
                                        } else {
-                                               ImageTTFText($im, t3lib_div::freetypeDpiComp($conf['fontSize']), $conf['angle'], $txtPos[0], $txtPos[1], $Fcolor, t3lib_stdGraphic::prependAbsolutePath($conf['fontFile']), $theText);
+                                               $this->ImageTTFTextWrapper($im, $conf['fontSize'], $conf['angle'], $txtPos[0], $txtPos[1], $Fcolor, $conf['fontFile'], $theText, $conf['splitRendering.']);
                                        }
                                }
                        } else {                // NICETEXT::
@@ -576,9 +581,9 @@ class t3lib_stdGraphic      {
                                ImageColorAllocate($maskImg, 255,255,255);
                                $Fcolor = ImageColorAllocate($maskImg, 0,0,0);
                                if ($spacing || $wordSpacing)   {               // If any kind of spacing applys, we use this function:
-                                       $this->SpacedImageTTFText($maskImg, ceil($sF*$conf['fontSize']), $conf['angle'], ceil($sF*$txtPos[0]), ceil($sF*$txtPos[1]), $Fcolor, t3lib_stdGraphic::prependAbsolutePath($conf['fontFile']), $theText, ceil($sF*$spacing), ceil($sF*$wordSpacing));
+                                       $this->SpacedImageTTFText($maskImg, $conf['fontSize'], $conf['angle'], $txtPos[0], $txtPos[1], $Fcolor, t3lib_stdGraphic::prependAbsolutePath($conf['fontFile']), $theText, $spacing, $wordSpacing, $conf['splitRendering.'],$sF);
                                } else {
-                                       ImageTTFText($maskImg, t3lib_div::freetypeDpiComp(ceil($sF*$conf['fontSize'])), $conf['angle'], ceil($sF*$txtPos[0]), ceil($sF*$txtPos[1]), $Fcolor, t3lib_stdGraphic::prependAbsolutePath($conf['fontFile']), $theText);
+                                       $this->ImageTTFTextWrapper($maskImg, $conf['fontSize'], $conf['angle'], $txtPos[0], $txtPos[1], $Fcolor, $conf['fontFile'], $theText, $conf['splitRendering.'],$sF);
                                }
                                $this->ImageGif($maskImg, $fileMask);
                                ImageDestroy($maskImg);
@@ -712,7 +717,7 @@ class t3lib_stdGraphic      {
                $wordSpacing*=$sF;
                $theText = $this->recodeString($conf['text']);
 
-               $charInf = ImageTTFBBox(t3lib_div::freetypeDpiComp($sF*$conf['fontSize']), $conf['angle'], t3lib_stdGraphic::prependAbsolutePath($conf['fontFile']), $theText);
+               $charInf = $this->ImageTTFBBoxWrapper($conf['fontSize'], $conf['angle'], $conf['fontFile'], $theText, $conf['splitRendering.'],$sF);
                $theBBoxInfo = $charInf;
                if ($conf['angle'])     {
                        $xArr = Array($charInf[0],$charInf[2],$charInf[4],$charInf[6]);
@@ -729,7 +734,7 @@ class t3lib_stdGraphic      {
                                $bits = explode(' ',$theText);
                                while(list(,$word)=each($bits)) {
                                        $word.=' ';
-                                       $wordInf = ImageTTFBBox(t3lib_div::freetypeDpiComp($sF*$conf['fontSize']), $conf['angle'], t3lib_stdGraphic::prependAbsolutePath($conf['fontFile']), $word);
+                                       $wordInf = $this->ImageTTFBBoxWrapper($conf['fontSize'], $conf['angle'], $conf['fontFile'], $word, $conf['splitRendering.'],$sF);
                                        $wordW = ($wordInf[2]-$wordInf[0]);
                                        $x+=$wordW+$wordSpacing;
                                }
@@ -737,7 +742,7 @@ class t3lib_stdGraphic      {
                                $utf8Chars = $this->singleChars($theText);
                                        // For each UTF-8 char, do:
                                foreach($utf8Chars as $char)    {
-                                       $charInf = ImageTTFBBox(t3lib_div::freetypeDpiComp($sF*$conf['fontSize']), $conf['angle'], t3lib_stdGraphic::prependAbsolutePath($conf['fontFile']), $char);
+                                       $charInf = $this->ImageTTFBBoxWrapper($conf['fontSize'], $conf['angle'], $conf['fontFile'], $char, $conf['splitRendering.'],$sF);
                                        $charW = ($charInf[2]-$charInf[0]);
                                        $x+=$charW+(($char==' ')?$wordSpacing:$spacing);
                                }
@@ -819,28 +824,34 @@ class t3lib_stdGraphic    {
         * @param       string          (See argument for PHP function imageTTFtext()). UTF-8 string, possibly with entities in.
         * @param       integer         The spacing of letters in pixels
         * @param       integer         The spacing of words in pixels
+        * @param       array           $splitRenderingConf array
+        * @param       integer         Scale factor
         * @return      void
         * @access private
         */
-       function SpacedImageTTFText(&$im, $fontSize, $angle, $x, $y, $Fcolor, $fontFile, $text, $spacing, $wordSpacing) {
+       function SpacedImageTTFText(&$im, $fontSize, $angle, $x, $y, $Fcolor, $fontFile, $text, $spacing, $wordSpacing, $splitRenderingConf, $sF=1)     {
+
+               $spacing*=$sF;
+               $wordSpacing*=$sF;
+
                if (!$spacing && $wordSpacing)  {
                        $bits = explode(' ',$text);
                        reset($bits);
                        while(list(,$word)=each($bits)) {
                                $word.=' ';
                                $word = $word;
-                               $wordInf = ImageTTFBBox(t3lib_div::freetypeDpiComp($fontSize), $angle, t3lib_stdGraphic::prependAbsolutePath($fontFile), $word);
+                               $wordInf = $this->ImageTTFBBoxWrapper($fontSize, $angle, $fontFile, $word, $splitRenderingConf ,$sF);
                                $wordW = ($wordInf[2]-$wordInf[0]);
-                               ImageTTFText($im, t3lib_div::freetypeDpiComp($fontSize), $angle, $x, $y, $Fcolor, t3lib_stdGraphic::prependAbsolutePath($fontFile), $word);
+                               $this->ImageTTFTextWrapper($im, $fontSize, $angle, $x, $y, $Fcolor, $fontFile, $word, $splitRenderingConf, $sF);
                                $x+=$wordW+$wordSpacing;
                        }
                } else {
                        $utf8Chars = $this->singleChars($text);
                                // For each UTF-8 char, do:
                        foreach($utf8Chars as $char)    {
-                               $charInf = ImageTTFBBox(t3lib_div::freetypeDpiComp($fontSize), $angle, t3lib_stdGraphic::prependAbsolutePath($fontFile), $char);
+                               $charInf = $this->ImageTTFBBoxWrapper($fontSize, $angle, $fontFile, $char, $splitRenderingConf, $sF);
                                $charW = ($charInf[2]-$charInf[0]);
-                               ImageTTFText($im, t3lib_div::freetypeDpiComp($fontSize), $angle, $x, $y, $Fcolor, t3lib_stdGraphic::prependAbsolutePath($fontFile), $char);
+                               $this->ImageTTFTextWrapper($im, $fontSize, $angle, $x, $y, $Fcolor, $fontFile, $char, $splitRenderingConf, $sF);
                                $x+=$charW+(($char==' ')?$wordSpacing:$spacing);
                        }
                }
@@ -867,7 +878,7 @@ class t3lib_stdGraphic      {
                                do {
                                        $conf['fontSize'] = $fontSize;
                                                // determine bounding box.
-                                       $bounds = ImageTTFBBox(t3lib_div::freetypeDpiComp($conf['fontSize']), $conf['angle'], t3lib_stdGraphic::prependAbsolutePath($conf['fontFile']), $this->recodeString($conf['text']));
+                                       $bounds = $this->ImageTTFBBoxWrapper($conf['fontSize'], $conf['angle'], $conf['fontFile'], $this->recodeString($conf['text']), $conf['splitRendering.']);
                                        if ($conf['angle']< 0) {
                                                $pixelWidth = abs($bounds[4]-$bounds[0]);
                                        } elseif ($conf['angle'] > 0) {
@@ -886,6 +897,243 @@ class t3lib_stdGraphic    {
                return $conf['fontSize'];
        }
 
+       /**
+        * Wrapper for ImageTTFBBox
+        *
+        * @param       integer         (See argument for PHP function ImageTTFBBox())
+        * @param       integer         (See argument for PHP function ImageTTFBBox())
+        * @param       string          (See argument for PHP function ImageTTFBBox())
+        * @param       string          (See argument for PHP function ImageTTFBBox())
+        * @param       array           Split-rendering configuration
+        * @param       integer         Scale factor
+        * @return      array           Information array.
+        */
+       function ImageTTFBBoxWrapper($fontSize, $angle, $fontFile, $string, $splitRendering, $sF=1)     {
+
+                       // Initialize:
+               $offsetInfo = array();
+               $stringParts = $this->splitString($string,$splitRendering,$fontSize,$fontFile);
+
+                       // Traverse string parts:
+               foreach($stringParts as $strCfg)        {
+
+                               // Calculate Bounding Box for part:
+                       $calc = ImageTTFBBox(t3lib_div::freetypeDpiComp($sF*$strCfg['fontSize']), $angle, t3lib_stdGraphic::prependAbsolutePath($strCfg['fontFile']), $strCfg['str']);
+
+                               // Calculate offsets:
+                       if (!count($offsetInfo))        {
+                               $offsetInfo = $calc;    // First run, just copy over.
+                       } else {
+                               $offsetInfo[2]+=$calc[2]-$calc[0]+intval($splitRendering['compX'])+intval($strCfg['xSpaceBefore'])+intval($strCfg['xSpaceAfter']);
+                               $offsetInfo[3]+=$calc[3]-$calc[1]-intval($splitRendering['compY'])-intval($strCfg['ySpaceBefore'])-intval($strCfg['ySpaceAfter']);
+                               $offsetInfo[4]+=$calc[4]-$calc[6]+intval($splitRendering['compX'])+intval($strCfg['xSpaceBefore'])+intval($strCfg['xSpaceAfter']);
+                               $offsetInfo[5]+=$calc[5]-$calc[7]-intval($splitRendering['compY'])-intval($strCfg['ySpaceBefore'])-intval($strCfg['ySpaceAfter']);
+                       }
+               }
+
+               return $offsetInfo;
+       }
+
+       /**
+        * Wrapper for ImageTTFText
+        *
+        * @param       pointer         (See argument for PHP function imageTTFtext())
+        * @param       integer         (See argument for PHP function imageTTFtext())
+        * @param       integer         (See argument for PHP function imageTTFtext())
+        * @param       integer         (See argument for PHP function imageTTFtext())
+        * @param       integer         (See argument for PHP function imageTTFtext())
+        * @param       integer         (See argument for PHP function imageTTFtext())
+        * @param       string          (See argument for PHP function imageTTFtext())
+        * @param       string          (See argument for PHP function imageTTFtext()). UTF-8 string, possibly with entities in.
+        * @param       array           Split-rendering configuration
+        * @param       integer         Scale factor
+        * @return      void
+        */
+       function ImageTTFTextWrapper($im, $fontSize, $angle, $x, $y, $color, $fontFile, $string, $splitRendering,$sF=1) {
+
+                       // Initialize:
+               $stringParts = $this->splitString($string,$splitRendering,$fontSize,$fontFile);
+               $x = ceil($sF*$x);
+               $y = ceil($sF*$y);
+
+                       // Traverse string parts:
+               foreach($stringParts as $i => $strCfg)  {
+
+                               // Initialize:
+                       $colorIndex = $color;
+
+                               // Set custom color if any (only when niceText is off):
+                       if ($strCfg['color'] && $sF==1) {
+                               $cols = $this->convertColor($strCfg['color']);
+                               $colorIndex = ImageColorAllocate($im, $cols[0],$cols[1],$cols[2]);
+                               $colorIndex = $color >= 0 ? $colorIndex : -$colorIndex;
+                       }
+
+                               // Setting xSpaceBefore
+                       if ($i) {
+                               $x+= intval($strCfg['xSpaceBefore']);
+                               $y-= intval($strCfg['ySpaceBefore']);
+                       }
+
+                               // Render part:
+                       ImageTTFText($im, t3lib_div::freetypeDpiComp($sF*$strCfg['fontSize']), $angle, $x, $y, $colorIndex, t3lib_stdGraphic::prependAbsolutePath($strCfg['fontFile']), $strCfg['str']);
+
+                               // Calculate offset to apply:
+                       $wordInf = ImageTTFBBox(t3lib_div::freetypeDpiComp($sF*$strCfg['fontSize']), $angle, t3lib_stdGraphic::prependAbsolutePath($strCfg['fontFile']), $strCfg['str']);
+                       $x+= $wordInf[2]-$wordInf[0]+intval($splitRendering['compX'])+intval($strCfg['xSpaceAfter']);
+                       $y+= $wordInf[5]-$wordInf[7]-intval($splitRendering['compY'])-intval($strCfg['ySpaceAfter']);
+               }
+       }
+
+       /**
+        * Splitting a string for ImageTTFBBox up into an array where each part has its own configuration options.
+        *
+        * @param       [type]          $string: ...
+        * @param       [type]          $splitRendering: ...
+        * @param       [type]          $fontSize: ...
+        * @param       [type]          $fontFile: ...
+        * @return      [type]          ...
+        */
+       function splitString($string,$splitRendering,$fontSize,$fontFile)       {
+
+                       // Initialize by setting the whole string and default configuration as the first entry.
+               $result = array();
+               $result[] = array(
+                       'str' => $string,
+                       'fontSize' => $fontSize,
+                       'fontFile' => $fontFile
+               );
+
+                       // Traverse the split-rendering configuration:
+                       // Splitting will create more entries in $result with individual configurations.
+               if (is_array($splitRendering))  {
+                       $sKeyArray = t3lib_TStemplate::sortedKeyList($splitRendering);
+
+                               // Traverse configured options:
+                       foreach($sKeyArray as $key)     {
+                               $cfg = $splitRendering[$key.'.'];
+
+                                       // Process each type of split rendering keyword:
+                               switch((string)$splitRendering[$key])   {
+                                       case 'highlightWord':
+                                               if (strlen($cfg['value']))      {
+                                                       $newResult = array();
+
+                                                               // Traverse the current parts of the result array:
+                                                       foreach($result as $part)       {
+                                                                       // Explode the string value by the word value to highlight:
+                                                               $explodedParts = explode($cfg['value'],$part['str']);
+                                                               foreach($explodedParts as $c => $expValue)      {
+                                                                       if (strlen($expValue))  {
+                                                                               $newResult[] = array_merge($part,array('str' => $expValue));
+                                                                       }
+                                                                       if ($c+1 < count($explodedParts))       {
+                                                                               $newResult[] = array(
+                                                                                       'str' => $cfg['value'],
+                                                                                       'fontSize' => $cfg['fontSize'] ? $cfg['fontSize'] : $part['fontSize'],
+                                                                                       'fontFile' => $cfg['fontFile'] ? $cfg['fontFile'] : $part['fontFile'],
+                                                                                       'color' => $cfg['color'],
+                                                                                       'xSpaceBefore' => $cfg['xSpaceBefore'],
+                                                                                       'xSpaceAfter' => $cfg['xSpaceAfter'],
+                                                                                       'ySpaceBefore' => $cfg['ySpaceBefore'],
+                                                                                       'ySpaceAfter' => $cfg['ySpaceAfter'],
+                                                                               );
+                                                                       }
+                                                               }
+                                                       }
+
+                                                               // Set the new result as result array:
+                                                       if (count($newResult))  {
+                                                               $result = $newResult;
+                                                       }
+                                               }
+                                       break;
+                                       case 'charRange':
+                                               if (strlen($cfg['value']))      {
+
+                                                               // Initialize range:
+                                                       $ranges = t3lib_div::trimExplode(',',$cfg['value'],1);
+                                                       foreach($ranges as $i => $rangeDef)     {
+                                                               $ranges[$i] = t3lib_div::intExplode('-',$ranges[$i]);
+                                                               if (!isset($ranges[$i][1]))     $ranges[$i][1] = $ranges[$i][0];
+                                                       }
+                                                       $newResult = array();
+
+                                                               // Traverse the current parts of the result array:
+                                                       foreach($result as $part)       {
+
+                                                                       // Initialize:
+                                                               $currentState = -1;
+                                                               $bankAccum = '';
+
+                                                                       // Explode the string value by the word value to highlight:
+                                                               $utf8Chars = $this->singleChars($part['str']);
+                                                               foreach($utf8Chars as $utfChar) {
+
+                                                                               // Find number and evaluate position:
+                                                                       $uNumber = $this->csConvObj->utf8CharToUnumber($utfChar);
+                                                                       $inRange = 0;
+                                                                       foreach($ranges as $rangeDef)   {
+                                                                               if ($uNumber >= $rangeDef[0] && (!$rangeDef[1] || $uNumber <= $rangeDef[1])) {
+                                                                                       $inRange = 1;
+                                                                                       break;
+                                                                               }
+                                                                       }
+                                                                       if ($currentState==-1)  $currentState = $inRange;       // Initialize first char
+
+                                                                               // Switch bank:
+                                                                       if ($inRange != $currentState && !t3lib_div::inList('32,10,13,9',$uNumber))     {
+
+                                                                                       // Set result:
+                                                                               if (strlen($bankAccum)) {
+                                                                                       $newResult[] = array(
+                                                                                               'str' => $bankAccum,
+                                                                                               'fontSize' => $currentState && $cfg['fontSize'] ? $cfg['fontSize'] : $part['fontSize'],
+                                                                                               'fontFile' => $currentState && $cfg['fontFile'] ? $cfg['fontFile'] : $part['fontFile'],
+                                                                                               'color' => $currentState ? $cfg['color'] : '',
+                                                                                               'xSpaceBefore' => $currentState ? $cfg['xSpaceBefore'] : '',
+                                                                                               'xSpaceAfter' => $currentState ? $cfg['xSpaceAfter'] : '',
+                                                                                               'ySpaceBefore' => $currentState ? $cfg['ySpaceBefore'] : '',
+                                                                                               'ySpaceAfter' => $currentState ? $cfg['ySpaceAfter'] : '',
+                                                                                       );
+                                                                               }
+
+                                                                                       // Initialize new settings:
+                                                                               $currentState = $inRange;
+                                                                               $bankAccum = '';
+                                                                       }
+
+                                                                               // Add char to bank:
+                                                                       $bankAccum.=$utfChar;
+                                                               }
+
+                                                                       // Set result for FINAL part:
+                                                               if (strlen($bankAccum)) {
+                                                                       $newResult[] = array(
+                                                                               'str' => $bankAccum,
+                                                                               'fontSize' => $currentState && $cfg['fontSize'] ? $cfg['fontSize'] : $part['fontSize'],
+                                                                               'fontFile' => $currentState && $cfg['fontFile'] ? $cfg['fontFile'] : $part['fontFile'],
+                                                                               'color' => $currentState ? $cfg['color'] : '',
+                                                                               'xSpaceBefore' => $currentState ? $cfg['xSpaceBefore'] : '',
+                                                                               'xSpaceAfter' => $currentState ? $cfg['xSpaceAfter'] : '',
+                                                                               'ySpaceBefore' => $currentState ? $cfg['ySpaceBefore'] : '',
+                                                                               'ySpaceAfter' => $currentState ? $cfg['ySpaceAfter'] : '',
+                                                                       );
+                                                               }
+                                                       }
+
+                                                               // Set the new result as result array:
+                                                       if (count($newResult))  {
+                                                               $result = $newResult;
+                                                       }
+                                               }
+                                       break;
+                               }
+                       }
+               }
+
+               return $result;
+       }
 
 
 
@@ -1650,12 +1898,13 @@ class t3lib_stdGraphic  {
         * Split a string into an array of individual characters
         * The function will look at  $this->nativeCharset and if that is set, the input string is expected to be UTF-8 encoded, possibly with entities in it. Otherwise the string is supposed to be a single-byte charset which is just splitted by a for-loop.
         *
-        * @param       string          The text string to spli
+        * @param       string          The text string to split
+        * @param       boolean         Return Unicode numbers instead of chars.
         * @return      array           Numerical array with a char as each value.
         */
-       function singleChars($theText)  {
+       function singleChars($theText,$returnUnicodeNumber=FALSE)       {
                if ($this->nativeCharset)       {
-                       return $this->csConvObj->utf8_to_numberarray($theText,1,1);     // Get an array of separated UTF-8 chars
+                       return $this->csConvObj->utf8_to_numberarray($theText,1,$returnUnicodeNumber ? 0 : 1);  // Get an array of separated UTF-8 chars
                } else {
                        $output=array();
                        $c=strlen($theText);
@@ -2204,6 +2453,9 @@ class t3lib_stdGraphic    {
 
        /**
         * Creates subdirectory in typo3temp/ if not already found.
+        *
+        * @param       string          Name of sub directory
+        * @return      boolean         Result of t3lib_div::mkdir(), true if it went well.
         */
        function createTempSubDir($dirName)     {
 
index 211a322..398b777 100755 (executable)
@@ -1936,7 +1936,7 @@ class t3lib_TCEforms      {
 
                                                // Add to tab:
                                        $tabParts[] = array(
-                                               'label' => ($sheetCfg['ROOT']['TCEforms']['sheetTitle'] ? $this->sL($sheetCfg['ROOT']['TCEforms']['sheetTitle']) : $sKey),
+                                               'label' => ($sheetCfg['ROOT']['TCEforms']['sheetTitle'] ? $this->sL($sheetCfg['ROOT']['TCEforms']['sheetTitle']) : $sheet),
                                                'description' => ($sheetCfg['ROOT']['TCEforms']['sheetDescription'] ? $this->sL($sheetCfg['ROOT']['TCEforms']['sheetDescription']) : ''),
                                                'linkTitle' => ($sheetCfg['ROOT']['TCEforms']['sheetShortDescr'] ? $this->sL($sheetCfg['ROOT']['TCEforms']['sheetShortDescr']) : ''),
                                                'content' => $sheetContent
index 11a810e..d07c701 100755 (executable)
@@ -360,7 +360,7 @@ class t3lib_TCEmain {
         * Processing of uploaded files.
         * It turns out that some versions of PHP arranges submitted data for files different if sent in an array. This function will unify this so the internal array $this->uploadedFileArray will always contain files arranged in the same structure.
         *
-        * @param       array           HTTP_POST_FILES array
+        * @param       array           $_FILES array
         * @return      void
         */
        function process_uploads($postFiles)    {
@@ -387,8 +387,8 @@ class t3lib_TCEmain {
         * Traverse the upload array if needed to rearrange values.
         *
         * @param       array           $this->uploadedFileArray passed by reference
-        * @param       array           Input array  (HTTP_POST_FILES parts)
-        * @param       string          The current HTTP_POST_FILES array key to set on the outermost level.
+        * @param       array           Input array  ($_FILES parts)
+        * @param       string          The current $_FILES array key to set on the outermost level.
         * @return      void
         * @access private
         * @see process_uploads()
@@ -3400,7 +3400,7 @@ class t3lib_TCEmain       {
         * @param       string          Table name
         * @param       integer         UID of the online record to swap
         * @param       integer         UID of the archived version to swap with!
-        * @param       boolean         Swap content; If set then - for pages - the page content PIDs are swapped as well.
+        * @param       string          If set, swap content; If set then - for pages - the page content PIDs are swapped as well. If set to "ALL" then subpages are swapped as well!
         * @return      void
         */
        function version_swap($table,$id,$swapWith,$swapContent)        {
@@ -3490,7 +3490,7 @@ class t3lib_TCEmain       {
 
                                                                // Collect table names that should be copied along with the tables:
                                                                foreach($TCA as $tN => $tCfg)   {
-                                                                       if ($TCA[$tN]['ctrl']['versioning_followPages'] || $tN=='pages')        {               // THIS produces the problem that some records might be left inside a versionized branch. Question is; Should ALL records swap pids, not only the versioning_followPages ones?
+                                                                       if ($TCA[$tN]['ctrl']['versioning_followPages'] || ($tN=='pages' && $swapContent==='ALL'))      {               // THIS produces the problem that some records might be left inside a versionized branch. Question is; Should ALL records swap pids, not only the versioning_followPages ones?
                                                                                $temporaryPid = -($id+1000000);
 
                                                                                $GLOBALS['TYPO3_DB']->exec_UPDATEquery($tN,'pid='.intval($id),array('pid'=>$temporaryPid));
index b7af2fc..9ce8524 100755 (executable)
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
 /**
- * Contains class with time tracking functions
- *
- * $Id$
- * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
- * XHTML compliant
- *
- * @author  Kasper Skaarhoj <kasper@typo3.com>
- */
+* Contains class with time tracking functions
+*
+* $Id$
+* Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
+* XHTML compliant
+*
+* @author  Kasper Skaarhoj <kasper@typo3.com>
+*/
 /**
- * [CLASS/FUNCTION INDEX of SCRIPT]
- *
- *
- *
- *   88: class t3lib_timeTrack
- *
- *              SECTION: Logging parsing times in the scripts
- *  144:     function start()
- *  157:     function push($tslabel, $value='')
- *  182:     function pull($content='')
- *  200:     function setTSlogMessage($content,$num=0)
- *  214:     function setTSselectQuery($query,$msg)
- *  227:     function incStackPointer()
- *  238:     function decStackPointer()
- *  248:     function mtime()
- *  258:     function convertMicrotime($microtime)
- *
- *              SECTION: Printing the parsing time information (for Admin Panel)
- *  291:     function printTSlog()
- *  435:     function fixContent(&$arr, $content, $depthData='', $first=0, $vKey='')
- *  499:     function fixCLen($c,$v)
- *  515:     function fw($str)
- *  529:     function createHierarchyArray(&$arr,$pointer,$uniqueId)
- *  548:     function debug_typo3PrintError($header,$text,$js)
- *
- * TOTAL FUNCTIONS: 15
- * (This index is automatically created/updated by the extension "extdeveval")
- *
- */
+* [CLASS/FUNCTION INDEX of SCRIPT]
+*
+*
+*
+*   88: class t3lib_timeTrack
+*
+*              SECTION: Logging parsing times in the scripts
+*  144:     function start()
+*  157:     function push($tslabel, $value='')
+*  182:     function pull($content='')
+*  200:     function setTSlogMessage($content,$num=0)
+*  214:     function setTSselectQuery($query,$msg)
+*  227:     function incStackPointer()
+*  238:     function decStackPointer()
+*  248:     function mtime()
+*  258:     function convertMicrotime($microtime)
+*
+*              SECTION: Printing the parsing time information (for Admin Panel)
+*  291:     function printTSlog()
+*  435:     function fixContent(&$arr, $content, $depthData='', $first=0, $vKey='')
+*  499:     function fixCLen($c,$v)
+*  515:     function fw($str)
+*  529:     function createHierarchyArray(&$arr,$pointer,$uniqueId)
+*  548:     function debug_typo3PrintError($header,$text,$js)
+*
+* TOTAL FUNCTIONS: 15
+* (This index is automatically created/updated by the extension "extdeveval")
+*
+*/
 
 
 
 
 
 /**
- * Frontend Timetracking functions
- *
- * Is used to register how much time is used with operations in TypoScript
- * Used by index_ts
- *
- * @author  Kasper Skaarhoj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage t3lib
- * @see t3lib_tsfeBeUserAuth, tslib_fe, tslib_cObj, TSpagegen
- */
+* Frontend Timetracking functions
+*
+* Is used to register how much time is used with operations in TypoScript
+* Used by index_ts
+*
+* @author  Kasper Skaarhoj <kasper@typo3.com>
+* @package TYPO3
+* @subpackage t3lib
+* @see t3lib_tsfeBeUserAuth, tslib_fe, tslib_cObj, TSpagegen
+*/
 class t3lib_timeTrack {
-    var $starttime = 0;             // Is loaded with the millisecond time when this object is created
-
-    var $LR = 1;                    // Log Rendering flag. If set, ->push() and ->pull() is called from the cObj->cObjGetSingle(). This determines whether or not the TypoScript parsing activity is logged. But it also slows down the rendering
-    var $printConf=array(
-        'showParentKeys' => 1,
-        'contentLength' => 10000,       // Determines max lenght of displayed content before it gets cropped.
-        'contentLength_FILE' => 400,    // Determines max lenght of displayed content FROM FILE cObjects before it gets cropped. Reason is that most FILE cObjects are huge and often used as template-code.
-        'flag_tree' => 1,
-        'flag_messages' => 1,
-        'flag_queries' => 0,
-        'flag_content' => 0,
-        'allTime' => 0,
-        'keyLgd' => 40,
-        'factor' => 10,
-        'col' => '#D9D5C9'
-    );
-
-    var $wrapError =array(
-        0 => array('',''),
-        1 => array('<b>','</b>'),
-        2 => array('<b><font color="#ff6600">','</font></b>'),
-        3 => array('<b><font color="#ff0000">','</font></b>')
-    );
-    var $wrapIcon =array(
-        0 => '',
-        1 => '<img src="t3lib/gfx/icon_note.gif" width="18" height="16" align="absmiddle" alt="" />',
-        2 => '<img src="t3lib/gfx/icon_warning.gif" width="18" height="16" align="absmiddle" alt="" />',
-        3 => '<img src="t3lib/gfx/icon_fatalerror.gif" width="18" height="16" align="absmiddle" alt="" />'
-    );
-
-    var $uniqueCounter=0;
-    var $tsStack = array(array());
-    var $tsStackLevel = 0;
-    var $tsStackLevelMax=array();
-    var $tsStackLog = array();
-    var $tsStackPointer=0;
-    var $currentHashPointer=array();
-
-
-
-
-
-
-    /*******************************************
-     *
-     * Logging parsing times in the scripts
-     *
-     *******************************************/
-
-    /**
-     * Constructor
-     * Sets the starting time
-     *
-     * @return  void
-     */
-    function start()    {
-        $this->starttime=0;
-        $this->starttime=$this->mtime();
-    }
-
-    /**
-     * Pushes an element to the TypoScript tracking array
-     *
-     * @param   string      Label string for the entry, eg. TypoScript property name
-     * @param   string      Additional value(?)
-     * @return  void
-     * @see tslib_cObj::cObjGetSingle(), pull()
-     */
-    function push($tslabel, $value='')  {
-        array_push($this->tsStack[$this->tsStackPointer], $tslabel);
-        array_push($this->currentHashPointer, 'timetracker_'.$this->uniqueCounter++);
-
-        $this->tsStackLevel++;
-        $this->tsStackLevelMax[] = $this->tsStackLevel;
-
-            // setTSlog
-        $k = end($this->currentHashPointer);
-        $this->tsStackLog[$k] = array(
-            'level' => $this->tsStackLevel,
-            'tsStack' => $this->tsStack,
-            'value' => $value,
-            'starttime' => microtime(),
-            'stackPointer' => $this->tsStackPointer
-        );
-    }
-
-    /**
-     * Pulls an element from the TypoScript tracking array
-     *
-     * @param   string      The content string generated within the push/pull part.
-     * @return  void
-     * @see tslib_cObj::cObjGetSingle(), push()
-     */
-    function pull($content='')  {
-        $k = end($this->currentHashPointer);
-        $this->tsStackLog[$k]['endtime'] =  microtime();
-        $this->tsStackLog[$k]['content'] = $content;
-
-        $this->tsStackLevel--;
-        array_pop($this->tsStack[$this->tsStackPointer]);
-        array_pop($this->currentHashPointer);
-    }
-
-    /**
-     * Logs the TypoScript entry
-     *
-     * @param   string      The message string
-     * @param   integer     Message type: 0: information, 1: message, 2: warning, 3: error
-     * @return  void
-     * @see tslib_cObj::CONTENT()
-     */
-    function setTSlogMessage($content,$num=0)   {
-        end($this->currentHashPointer);
-        $k = current($this->currentHashPointer);
-
-        $this->tsStackLog[$k]['message'][] = $this->wrapIcon[$num].$this->wrapError[$num][0].htmlspecialchars($content).$this->wrapError[$num][1];
-    }
-
-    /**
-     * Set TSselectQuery - for messages in TypoScript debugger.
-     *
-     * @param   string      Query string
-     * @param   string      Message/Label to attach
-     * @return  void
-     */
-    function setTSselectQuery($query,$msg)  {
-        end($this->currentHashPointer);
-        $k = current($this->currentHashPointer);
-
-        $this->tsStackLog[$k]['selectQuery'][] = array('query'=>$query,'msg'=>$msg);
-    }
-
-    /**
-     * Increases the stack pointer
-     *
-     * @return  void
-     * @see decStackPointer(), TSpagegen::renderContent(), tslib_cObj::cObjGetSingle()
-     */
-    function incStackPointer()  {
-        $this->tsStackPointer++;
-        $this->tsStack[$this->tsStackPointer]=array();
-    }
-
-    /**
-     * Decreases the stack pointer
-     *
-     * @return  void
-     * @see incStackPointer(), TSpagegen::renderContent(), tslib_cObj::cObjGetSingle()
-     */
-    function decStackPointer()  {
-        unset($this->tsStack[$this->tsStackPointer]);
-        $this->tsStackPointer--;
-    }
-
-    /**
-     * Returns the current time in milliseconds
-     *
-     * @return  integer
-     */
-    function mtime()    {
-        return $this->convertMicrotime(microtime())-$this->starttime;
-    }
-
-    /**
-     * Returns microtime input to milliseconds
-     *
-     * @param   string      PHP microtime string
-     * @return  integer
-     */
-    function convertMicrotime($microtime)   {
-        $parts = explode(' ',$microtime);
-        return round(($parts[0]+$parts[1])*1000);
-    }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    /*******************************************
-     *
-     * Printing the parsing time information (for Admin Panel)
-     *
-     *******************************************/
-
-    /**
-     * Print TypoScript parsing log
-     *
-     * @return  string      HTML table with the information about parsing times.
-     * @see t3lib_tsfeBeUserAuth::extGetCategory_tsdebug()
-     */
-    function printTSlog()   {
-            // Calculate times and keys for the tsStackLog
-        reset($this->tsStackLog);
-        $preEndtime=0;
-        while(list($uniqueId,$data)=each($this->tsStackLog))    {
-            $this->tsStackLog[$uniqueId]['endtime'] = $this->convertMicrotime($this->tsStackLog[$uniqueId]['endtime'])-$this->starttime;
-            $this->tsStackLog[$uniqueId]['starttime'] = $this->convertMicrotime($this->tsStackLog[$uniqueId]['starttime'])-$this->starttime;
-            $this->tsStackLog[$uniqueId]['deltatime'] = $this->tsStackLog[$uniqueId]['endtime']-$this->tsStackLog[$uniqueId]['starttime'];
-            $this->tsStackLog[$uniqueId]['key'] = implode(end($data['tsStack']),$this->tsStackLog[$uniqueId]['stackPointer']?'.':'/');
-            $preEndtime = $this->tsStackLog[$uniqueId]['endtime'];
-        }
-
-            // Create hierarchical array of keys pointing to the stack
-        $arr = array();
-        reset($this->tsStackLog);
-        while(list($uniqueId,$data)=each($this->tsStackLog))    {
-            $this->createHierarchyArray($arr,$data['level'], $uniqueId);
-        }
-            // Parsing the registeret content and create icon-html for the tree
-        $this->tsStackLog[$arr['0.'][0]]['content'] = $this->fixContent($arr['0.']['0.'], $this->tsStackLog[$arr['0.'][0]]['content'], '', 0, $arr['0.'][0]);
-
-            // Displaying the tree:
-        reset($this->tsStackLog);
-        $out='<tr>
-            <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('TypoScript Key').'</b></td>
-            <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Value').'</b></td>';
-        if ($this->printConf['allTime'])    {
-            $out.='
-            <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Time').'</b></td>
-            <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Own').'</b></td>
-            <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Sub').'</b></td>
-            <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Total').'</b></td>';
-        } else {
-            $out.='
-            <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Own').'</b></td>';
-        }
-
-        $out.='
-            <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Details').'</b></td>
-            </tr>';
-
-
-
-        $flag_tree=$this->printConf['flag_tree'];
-        $flag_messages=$this->printConf['flag_messages'];
-        $flag_content=$this->printConf['flag_content'];
-        $flag_queries=$this->printConf['flag_queries'];
-        $keyLgd=$this->printConf['keyLgd'];
-        $factor=$this->printConf['factor'];
-        $col=$this->printConf['col'];
-
-        $c=0;
-        while(list($uniqueId,$data)=each($this->tsStackLog))    {
-            $bgColor = ' bgcolor="'.($c%2 ? t3lib_div::modifyHTMLColor($col,$factor,$factor,$factor) : $col).'"';
-            $item='';
-            if (!$c)    {   // If first...
-                $data['icons']='';
-                $data['key']= 'Script Start';
-                $data['value'] = '';
-            }
-
-
-                // key label:
-            $keyLabel='';
-            if (!$flag_tree && $data['stackPointer'])   {
-                $temp=array();
-                reset($data['tsStack']);
-                while(list($k,$v)=each($data['tsStack']))   {
-                    $temp[]=t3lib_div::fixed_lgd_pre(implode($v,$k?'.':'/'),$keyLgd);
-                }
-                array_pop($temp);
-                $temp = array_reverse($temp);
-                array_pop($temp);
-                if (count($temp))   {
-                    $keyLabel='<br /><font color="#999999">'.implode($temp,'<br />').'</font>';
-                }
-            }
-            $theLabel = $flag_tree ? end(t3lib_div::trimExplode('.',$data['key'],1)) : $data['key'];
-            $theLabel = t3lib_div::fixed_lgd_pre($theLabel, $keyLgd);
-            $theLabel = $data['stackPointer'] ? '<font color="maroon">'.$theLabel.'</font>' : $theLabel;
-            $keyLabel=$theLabel.$keyLabel;
-            $item.='<td valign="top" nowrap="nowrap"'.$bgColor.'>'.($flag_tree?$data['icons']:'').$this->fw($keyLabel).'</td>';
-
-                // key value:
-            $keyValue=$data['value'];
-            $item.='<td valign="top" nowrap="nowrap"'.$bgColor.'>'.$this->fw(htmlspecialchars($keyValue)).'</td>';
-
-            if ($this->printConf['allTime'])    {
-                    // deltatime:
-                $item.='<td valign="top" align="right" nowrap="nowrap"'.$bgColor.'>'.$this->fw($data['starttime']).'</td>';
-                $item.='<td valign="top" align="right" nowrap="nowrap"'.$bgColor.'>'.$this->fw($data['owntime']).'</td>';
-                $item.='<td valign="top" align="right" nowrap="nowrap"'.$bgColor.'>'.$this->fw($data['subtime'] ? '+'.$data['subtime'] : '').'</td>';
-                $item.='<td valign="top" align="right" nowrap="nowrap"'.$bgColor.'>'.$this->fw($data['subtime'] ? '='.$data['deltatime'] : '').'</td>';
-            } else {
-                    // deltatime:
-                $item.='<td valign="top" align="right" nowrap="nowrap"'.$bgColor.'>'.$this->fw($data['owntime']).'</td>';
-            }
-
-
-                // messages:
-            $msgArr=array();
-            $msg='';
-            if ($flag_messages && is_array($data['message']))   {
-                reset($data['message']);
-                while(list(,$v)=each($data['message'])) {
-                    $msgArr[]=nl2br($v);
-                }
-            }
-            if ($flag_queries && is_array($data['selectQuery']))    {
-                reset($data['selectQuery']);
-                while(list(,$v)=each($data['selectQuery'])) {
-                    $res = $GLOBALS['TYPO3_DB']->sql_query('EXPLAIN '.$v['query']);
-                    $v['mysql_error'] = $GLOBALS['TYPO3_DB']->sql_error();
-                    if (!$GLOBALS['TYPO3_DB']->sql_error()) {
-                        while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))   {
-                            $v['explain'][]=$row;
-                        }
-                    }
-                    $msgArr[]=t3lib_div::view_array($v);
-                }
-            }
-            if ($flag_content && strcmp($data['content'],''))   {
-                $msgArr[]='<font color="#000066">'.nl2br($data['content']).'</font>';
-            }
-            if (count($msgArr)) {
-                $msg=implode($msgArr,'<hr />');
-            }
-            $item.='<td valign="top"'.$bgColor.'>'.$this->fw($msg).'</td>';
-            $out.='<tr>'.$item.'</tr>';
-            $c++;
-        }
-        $out='<table border="0" cellpadding="0" cellspacing="0">'.$out.'</table>';
-        return $out;
-    }
-
-    /**
-     * Recursively generates the content to display
-     *
-     * @param   array       Array which is modified with content. Reference
-     * @param   string      Current content string for the level
-     * @param   string      Prefixed icons for new PM icons
-     * @param   boolean     Set this for the first call from outside.
-     * @param   string      Seems to be the previous tsStackLog key
-     * @return  string      Returns the $content string generated/modified. Also the $arr array is modified!
-     */
-    function fixContent(&$arr, $content, $depthData='', $first=0, $vKey='') {
-        $ac=0;
-        $c=0;
-            // First, find number of entries
-        reset($arr);
-        while(list($k,$v)=each($arr))   {
-            if (t3lib_div::testInt($k)) {
-                $ac++;
-            }
-        }
-            // Traverse through entries
-        $subtime=0;
-        reset($arr);
-        while(list($k,$v)=each($arr))   {
-            if (t3lib_div::testInt($k)) {
-                $c++;
-
-                $deeper = is_array($arr[$k.'.']) ? 1 : 0;
-                $PM = 'join';
-                $LN = ($ac==$c)?'blank':'line';
-                $BTM = ($ac==$c)?'bottom':'';
-                $PM = is_array($arr[$k.'.']) ? ($deeper ? 'minus':'plus') : 'join';
-                $this->tsStackLog[$v]['icons']=$depthData.($first?'':'<img src="t3lib/gfx/ol/'.$PM.$BTM.'.gif" width="18" height="16" align="top" border="0" alt="" />');
-
-                if (strlen($this->tsStackLog[$v]['content']))   {
-                    $content = str_replace($this->tsStackLog[$v]['content'],$v, $content);
-                }
-                if (is_array($arr[$k.'.'])) {
-                    $this->tsStackLog[$v]['content'] = $this->fixContent($arr[$k.'.'], $this->tsStackLog[$v]['content'], $depthData.($first?'':'<img src="t3lib/gfx/ol/'.$LN.'.gif" width="18" height="16" align="top" border="0" alt="" />'), 0, $v);
-                } else {
-                    $this->tsStackLog[$v]['content'] = $this->fixCLen($this->tsStackLog[$v]['content'], $this->tsStackLog[$v]['value']);
-                    $this->tsStackLog[$v]['subtime']='';
-                    $this->tsStackLog[$v]['owntime']=$this->tsStackLog[$v]['deltatime'];
-                }
-                $subtime+=$this->tsStackLog[$v]['deltatime'];
-            }
-        }
-            // Set content with special chars
-        if (isset($this->tsStackLog[$vKey]))    {
-            $this->tsStackLog[$vKey]['subtime']=$subtime;
-            $this->tsStackLog[$vKey]['owntime']=$this->tsStackLog[$vKey]['deltatime']-$subtime;
-        }
-        $content=$this->fixCLen($content, $this->tsStackLog[$vKey]['value']);
-
-            // Traverse array again, this time substitute the unique hash with the red key
-        reset($arr);
-        while(list($k,$v)=each($arr))   {
-            if (t3lib_div::testInt($k)) {
-                if (strlen($this->tsStackLog[$v]['content']))   {
-                    $content = str_replace($v, '<font color="red"><b>['.$this->tsStackLog[$v]['key'].']</b></font>', $content);
-                }
-            }
-        }
-            // return the content
-        return $content;
-    }
-
-    /**
-     * Wraps the input content string in green colored font-tags IF the length o fthe input string exceeds $this->printConf['contentLength'] (or $this->printConf['contentLength_FILE'] if $v == "FILE"
-     *
-     * @param   string      The content string
-     * @param   string      Command: If "FILE" then $this->printConf['contentLength_FILE'] is used for content length comparison, otherwise $this->printConf['contentLength']
-     * @return  string
-     */
-    function fixCLen($c,$v) {
-        $len = $v=='FILE'?$this->printConf['contentLength_FILE']:$this->printConf['contentLength'];
-        if (strlen($c)>$len)    {
-            $c='<font color="green">'.htmlspecialchars(t3lib_div::fixed_lgd($c,$len)).'</font>';
-        } else {
-            $c=htmlspecialchars($c);
-        }
-        return $c;
-    }
-
-    /**
-     * Wraps input string in a <font> tag with verdana, black and size 1
-     *
-     * @param   string      The string to be wrapped
-     * @return  string
-     */
-    function fw($str)   {
-        return '<font face="verdana" color="black" size="1" style="color:black;">'.$str.'&nbsp;</font>';
-    }
-
-    /**
-     * Helper function for internal data manipulation
-     *
-     * @param   array       Array (passed by reference) and modified
-     * @param   integer     Pointer value
-     * @param   string      Unique ID string
-     * @return  void
-     * @access private
-     * @see printTSlog()
-     */
-    function createHierarchyArray(&$arr,$pointer,$uniqueId) {
-        if (!is_array($arr))    $arr=array();
-        if ($pointer>0) {
-            end($arr);
-            $k=key($arr);
-            $this->createHierarchyArray($arr[intval($k).'.'],$pointer-1,$uniqueId);
-        } else {
-            $arr[] = $uniqueId;
-        }
-    }
-
-    /**
-     * This prints out a TYPO3 error message.
-     *
-     * @param   string      Header string
-     * @param   string      Message string
-     * @param   boolean     If set, then this will produce a alert() line for inclusion in JavaScript.
-     * @return  string
-     */
-    function debug_typo3PrintError($header,$text,$js,$baseUrl='')   {
-        if ($js)    {
-            echo"alert('".t3lib_div::slashJS($header."\n".$text)."');";
-        } else {
-            echo '
-                <html>
-                    <head>
-                        '.($baseUrl ? '<base href="'.htmlspecialchars($baseUrl).'" />' : '').'
-                        <title>Error!</title>
-                    </head>
-                    <body bgcolor="white">
-                        <div align="center">
-                            <table border="0" cellspacing="0" cellpadding="0" width="333" bgcolor="#ffffff">
-                                <tr>
-                                    <td><img src="t3lib/gfx/typo3logo.gif" width="333" height="43" vspace="10" border="0" alt="" /></td>
-                                </tr>
-                                <tr>
-                                    <td bgcolor="black">
-                                        <table width="100%" border="0" cellspacing="1" cellpadding="10">
-                                            <tr>
-                                                <td bgcolor="#F4F0E8">
-                                                    <font face="verdana,arial,helvetica" size="2">';
-            echo '<b><center><font size="+1">'.$header.'</font></center></b><br />'.$text;
-            echo '                                  </font>
-                                                </td>
-                                            </tr>
-                                        </table>
-                                    </td>
-                                </tr>
-                            </table>
-                        </div>
-                    </body>
-                </html>';
-        }
-    }
+       var $starttime = 0;             // Is loaded with the millisecond time when this object is created
+
+       var $LR = 1;                    // Log Rendering flag. If set, ->push() and ->pull() is called from the cObj->cObjGetSingle(). This determines whether or not the TypoScript parsing activity is logged. But it also slows down the rendering
+       var $printConf=array(
+               'showParentKeys' => 1,
+               'contentLength' => 10000,       // Determines max lenght of displayed content before it gets cropped.
+               'contentLength_FILE' => 400,    // Determines max lenght of displayed content FROM FILE cObjects before it gets cropped. Reason is that most FILE cObjects are huge and often used as template-code.
+               'flag_tree' => 1,
+               'flag_messages' => 1,
+               'flag_queries' => 0,
+               'flag_content' => 0,
+               'allTime' => 0,
+               'keyLgd' => 40,
+               'factor' => 10,
+               'col' => '#D9D5C9'
+       );
+
+       var $wrapError =array(
+               0 => array('',''),
+               1 => array('<b>','</b>'),
+               2 => array('<b><font color="#ff6600">','</font></b>'),
+               3 => array('<b><font color="#ff0000">','</font></b>')
+       );
+       var $wrapIcon =array(
+               0 => '',
+               1 => '<img src="t3lib/gfx/icon_note.gif" width="18" height="16" align="absmiddle" alt="" />',
+               2 => '<img src="t3lib/gfx/icon_warning.gif" width="18" height="16" align="absmiddle" alt="" />',
+               3 => '<img src="t3lib/gfx/icon_fatalerror.gif" width="18" height="16" align="absmiddle" alt="" />'
+       );
+
+       var $uniqueCounter=0;
+       var $tsStack = array(array());
+       var $tsStackLevel = 0;
+       var $tsStackLevelMax=array();
+       var $tsStackLog = array();
+       var $tsStackPointer=0;
+       var $currentHashPointer=array();
+
+
+
+
+
+
+       /*******************************************
+       *
+       * Logging parsing times in the scripts
+       *
+       *******************************************/
+
+       /**
+       * Constructor
+       * Sets the starting time
+       *
+       * @return  void
+       */
+       function start()    {
+               $this->starttime=0;
+               $this->starttime=$this->mtime();
+       }
+
+       /**
+       * Pushes an element to the TypoScript tracking array
+       *
+       * @param   string      Label string for the entry, eg. TypoScript property name
+       * @param   string      Additional value(?)
+       * @return  void
+       * @see tslib_cObj::cObjGetSingle(), pull()
+       */
+       function push($tslabel, $value='')  {
+               array_push($this->tsStack[$this->tsStackPointer], $tslabel);
+               array_push($this->currentHashPointer, 'timetracker_'.$this->uniqueCounter++);
+
+               $this->tsStackLevel++;
+               $this->tsStackLevelMax[] = $this->tsStackLevel;
+
+                       // setTSlog
+               $k = end($this->currentHashPointer);
+               $this->tsStackLog[$k] = array(
+                       'level' => $this->tsStackLevel,
+                       'tsStack' => $this->tsStack,
+                       'value' => $value,
+                       'starttime' => microtime(),
+                       'stackPointer' => $this->tsStackPointer
+               );
+       }
+
+       /**
+       * Pulls an element from the TypoScript tracking array
+       *
+       * @param   string      The content string generated within the push/pull part.
+       * @return  void
+       * @see tslib_cObj::cObjGetSingle(), push()
+       */
+       function pull($content='')  {
+               $k = end($this->currentHashPointer);
+               $this->tsStackLog[$k]['endtime'] =  microtime();
+               $this->tsStackLog[$k]['content'] = $content;
+
+               $this->tsStackLevel--;
+               array_pop($this->tsStack[$this->tsStackPointer]);
+               array_pop($this->currentHashPointer);
+       }
+
+       /**
+       * Logs the TypoScript entry
+       *
+       * @param   string      The message string
+       * @param   integer     Message type: 0: information, 1: message, 2: warning, 3: error
+       * @return  void
+       * @see tslib_cObj::CONTENT()
+       */
+       function setTSlogMessage($content,$num=0)   {
+               end($this->currentHashPointer);
+               $k = current($this->currentHashPointer);
+
+               $this->tsStackLog[$k]['message'][] = $this->wrapIcon[$num].$this->wrapError[$num][0].htmlspecialchars($content).$this->wrapError[$num][1];
+       }
+
+       /**
+       * Set TSselectQuery - for messages in TypoScript debugger.
+       *
+       * @param   string      Query string
+       * @param   string      Message/Label to attach
+       * @return  void
+       */
+       function setTSselectQuery($query,$msg)  {
+               end($this->currentHashPointer);
+               $k = current($this->currentHashPointer);
+
+               $this->tsStackLog[$k]['selectQuery'][] = array('query'=>$query,'msg'=>$msg);
+       }
+
+       /**
+       * Increases the stack pointer
+       *
+       * @return  void
+       * @see decStackPointer(), TSpagegen::renderContent(), tslib_cObj::cObjGetSingle()
+       */
+       function incStackPointer()  {
+               $this->tsStackPointer++;
+               $this->tsStack[$this->tsStackPointer]=array();
+       }
+
+       /**
+       * Decreases the stack pointer
+       *
+       * @return  void
+       * @see incStackPointer(), TSpagegen::renderContent(), tslib_cObj::cObjGetSingle()
+       */
+       function decStackPointer()  {
+               unset($this->tsStack[$this->tsStackPointer]);
+               $this->tsStackPointer--;
+       }
+
+       /**
+       * Returns the current time in milliseconds
+       *
+       * @return  integer
+       */
+       function mtime()    {
+               return $this->convertMicrotime(microtime())-$this->starttime;
+       }
+
+       /**
+       * Returns microtime input to milliseconds
+       *
+       * @param   string      PHP microtime string
+       * @return  integer
+       */
+       function convertMicrotime($microtime)   {
+               $parts = explode(' ',$microtime);
+               return round(($parts[0]+$parts[1])*1000);
+       }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+       /*******************************************
+       *
+       * Printing the parsing time information (for Admin Panel)
+       *
+       *******************************************/
+
+       /**
+       * Print TypoScript parsing log
+       *
+       * @return  string      HTML table with the information about parsing times.
+       * @see t3lib_tsfeBeUserAuth::extGetCategory_tsdebug()
+       */
+       function printTSlog()   {
+                       // Calculate times and keys for the tsStackLog
+               reset($this->tsStackLog);
+               $preEndtime=0;
+               while(list($uniqueId,$data)=each($this->tsStackLog))    {
+                       $this->tsStackLog[$uniqueId]['endtime'] = $this->convertMicrotime($this->tsStackLog[$uniqueId]['endtime'])-$this->starttime;
+                       $this->tsStackLog[$uniqueId]['starttime'] = $this->convertMicrotime($this->tsStackLog[$uniqueId]['starttime'])-$this->starttime;
+                       $this->tsStackLog[$uniqueId]['deltatime'] = $this->tsStackLog[$uniqueId]['endtime']-$this->tsStackLog[$uniqueId]['starttime'];
+                       $this->tsStackLog[$uniqueId]['key'] = implode(end($data['tsStack']),$this->tsStackLog[$uniqueId]['stackPointer']?'.':'/');
+                       $preEndtime = $this->tsStackLog[$uniqueId]['endtime'];
+               }
+
+                       // Create hierarchical array of keys pointing to the stack
+               $arr = array();
+               reset($this->tsStackLog);
+               while(list($uniqueId,$data)=each($this->tsStackLog))    {
+                       $this->createHierarchyArray($arr,$data['level'], $uniqueId);
+               }
+                       // Parsing the registeret content and create icon-html for the tree
+               $this->tsStackLog[$arr['0.'][0]]['content'] = $this->fixContent($arr['0.']['0.'], $this->tsStackLog[$arr['0.'][0]]['content'], '', 0, $arr['0.'][0]);
+
+                       // Displaying the tree:
+               reset($this->tsStackLog);
+               $out='<tr>
+                       <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('TypoScript Key').'</b></td>
+                       <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Value').'</b></td>';
+               if ($this->printConf['allTime'])    {
+                       $out.='
+                       <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Time').'</b></td>
+                       <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Own').'</b></td>
+                       <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Sub').'</b></td>
+                       <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Total').'</b></td>';
+               } else {
+                       $out.='
+                       <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Own').'</b></td>';
+               }
+
+               $out.='
+                       <td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Details').'</b></td>
+                       </tr>';
+
+
+
+               $flag_tree=$this->printConf['flag_tree'];
+               $flag_messages=$this->printConf['flag_messages'];
+               $flag_content=$this->printConf['flag_content'];
+               $flag_queries=$this->printConf['flag_queries'];
+               $keyLgd=$this->printConf['keyLgd'];
+               $factor=$this->printConf['factor'];
+               $col=$this->printConf['col'];
+
+               $c=0;
+               while(list($uniqueId,$data)=each($this->tsStackLog))    {
+                       $bgColor = ' bgcolor="'.($c%2 ? t3lib_div::modifyHTMLColor($col,$factor,$factor,$factor) : $col).'"';
+                       $item='';
+                       if (!$c)    {   // If first...
+                               $data['icons']='';
+                               $data['key']= 'Script Start';
+                               $data['value'] = '';
+                       }
+
+
+                               // key label:
+                       $keyLabel='';
+                       if (!$flag_tree && $data['stackPointer'])   {
+                               $temp=array();
+                               reset($data['tsStack']);
+                               while(list($k,$v)=each($data['tsStack']))   {
+                                       $temp[]=t3lib_div::fixed_lgd_pre(implode($v,$k?'.':'/'),$keyLgd);
+                               }
+                               array_pop($temp);
+                               $temp = array_reverse($temp);
+                               array_pop($temp);
+                               if (count($temp))   {
+                                       $keyLabel='<br /><font color="#999999">'.implode($temp,'<br />').'</font>';
+                               }
+                       }
+                       $theLabel = $flag_tree ? end(t3lib_div::trimExplode('.',$data['key'],1)) : $data['key'];
+                       $theLabel = t3lib_div::fixed_lgd_pre($theLabel, $keyLgd);
+                       $theLabel = $data['stackPointer'] ? '<font color="maroon">'.$theLabel.'</font>' : $theLabel;
+                       $keyLabel=$theLabel.$keyLabel;
+                       $item.='<td valign="top" nowrap="nowrap"'.$bgColor.'>'.($flag_tree?$data['icons']:'').$this->fw($keyLabel).'</td>';
+
+                               // key value:
+                       $keyValue=$data['value'];
+                       $item.='<td valign="top" nowrap="nowrap"'.$bgColor.'>'.$this->fw(htmlspecialchars($keyValue)).'</td>';
+
+                       if ($this->printConf['allTime'])    {
+                                       // deltatime:
+                               $item.='<td valign="top" align="right" nowrap="nowrap"'.$bgColor.'>'.$this->fw($data['starttime']).'</td>';
+                               $item.='<td valign="top" align="right" nowrap="nowrap"'.$bgColor.'>'.$this->fw($data['owntime']).'</td>';
+                               $item.='<td valign="top" align="right" nowrap="nowrap"'.$bgColor.'>'.$this->fw($data['subtime'] ? '+'.$data['subtime'] : '').'</td>';
+                               $item.='<td valign="top" align="right" nowrap="nowrap"'.$bgColor.'>'.$this->fw($data['subtime'] ? '='.$data['deltatime'] : '').'</td>';
+                       } else {
+                                       // deltatime:
+                               $item.='<td valign="top" align="right" nowrap="nowrap"'.$bgColor.'>'.$this->fw($data['owntime']).'</td>';
+                       }
+
+
+                               // messages:
+                       $msgArr=array();
+                       $msg='';
+                       if ($flag_messages && is_array($data['message']))   {
+                               reset($data['message']);
+                               while(list(,$v)=each($data['message'])) {
+                                       $msgArr[]=nl2br($v);
+                               }
+                       }
+                       if ($flag_queries && is_array($data['selectQuery']))    {
+                               reset($data['selectQuery']);
+                               while(list(,$v)=each($data['selectQuery'])) {
+                                       $res = $GLOBALS['TYPO3_DB']->sql_query('EXPLAIN '.$v['query']);
+                                       $v['mysql_error'] = $GLOBALS['TYPO3_DB']->sql_error();
+                                       if (!$GLOBALS['TYPO3_DB']->sql_error()) {
+                                               while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))   {
+                                                       $v['explain'][]=$row;
+                                               }
+                                       }
+                                       $msgArr[]=t3lib_div::view_array($v);
+                               }
+                       }
+                       if ($flag_content && strcmp($data['content'],''))   {
+                               $msgArr[]='<font color="#000066">'.nl2br($data['content']).'</font>';
+                       }
+                       if (count($msgArr)) {
+                               $msg=implode($msgArr,'<hr />');
+                       }
+                       $item.='<td valign="top"'.$bgColor.'>'.$this->fw($msg).'</td>';
+                       $out.='<tr>'.$item.'</tr>';
+                       $c++;
+               }
+               $out='<table border="0" cellpadding="0" cellspacing="0">'.$out.'</table>';
+               return $out;
+       }
+
+       /**
+       * Recursively generates the content to display
+       *
+       * @param   array       Array which is modified with content. Reference
+       * @param   string      Current content string for the level
+       * @param   string      Prefixed icons for new PM icons
+       * @param   boolean     Set this for the first call from outside.
+       * @param   string      Seems to be the previous tsStackLog key
+       * @return  string      Returns the $content string generated/modified. Also the $arr array is modified!
+       */
+       function fixContent(&$arr, $content, $depthData='', $first=0, $vKey='') {
+               $ac=0;
+               $c=0;
+                       // First, find number of entries
+               reset($arr);
+               while(list($k,$v)=each($arr))   {
+                       if (t3lib_div::testInt($k)) {
+                               $ac++;
+                       }
+               }
+                       // Traverse through entries
+               $subtime=0;
+               reset($arr);
+               while(list($k,$v)=each($arr))   {
+                       if (t3lib_div::testInt($k)) {
+                               $c++;
+
+                               $deeper = is_array($arr[$k.'.']) ? 1 : 0;
+                               $PM = 'join';
+                               $LN = ($ac==$c)?'blank':'line';
+                               $BTM = ($ac==$c)?'bottom':'';
+                               $PM = is_array($arr[$k.'.']) ? ($deeper ? 'minus':'plus') : 'join';
+                               $this->tsStackLog[$v]['icons']=$depthData.($first?'':'<img src="t3lib/gfx/ol/'.$PM.$BTM.'.gif" width="18" height="16" align="top" border="0" alt="" />');
+
+                               if (strlen($this->tsStackLog[$v]['content']))   {
+                                       $content = str_replace($this->tsStackLog[$v]['content'],$v, $content);
+                               }
+                               if (is_array($arr[$k.'.'])) {
+                                       $this->tsStackLog[$v]['content'] = $this->fixContent($arr[$k.'.'], $this->tsStackLog[$v]['content'], $depthData.($first?'':'<img src="t3lib/gfx/ol/'.$LN.'.gif" width="18" height="16" align="top" border="0" alt="" />'), 0, $v);
+                               } else {
+                                       $this->tsStackLog[$v]['content'] = $this->fixCLen($this->tsStackLog[$v]['content'], $this->tsStackLog[$v]['value']);
+                                       $this->tsStackLog[$v]['subtime']='';
+                                       $this->tsStackLog[$v]['owntime']=$this->tsStackLog[$v]['deltatime'];
+                               }
+                               $subtime+=$this->tsStackLog[$v]['deltatime'];
+                       }
+               }
+                       // Set content with special chars
+               if (isset($this->tsStackLog[$vKey]))    {
+                       $this->tsStackLog[$vKey]['subtime']=$subtime;
+                       $this->tsStackLog[$vKey]['owntime']=$this->tsStackLog[$vKey]['deltatime']-$subtime;
+               }
+               $content=$this->fixCLen($content, $this->tsStackLog[$vKey]['value']);
+
+                       // Traverse array again, this time substitute the unique hash with the red key
+               reset($arr);
+               while(list($k,$v)=each($arr))   {
+                       if (t3lib_div::testInt($k)) {
+                               if (strlen($this->tsStackLog[$v]['content']))   {
+                                       $content = str_replace($v, '<font color="red"><b>['.$this->tsStackLog[$v]['key'].']</b></font>', $content);
+                               }
+                       }
+               }
+                       // return the content
+               return $content;
+       }
+
+       /**
+       * Wraps the input content string in green colored font-tags IF the length o fthe input string exceeds $this->printConf['contentLength'] (or $this->printConf['contentLength_FILE'] if $v == "FILE"
+       *
+       * @param   string      The content string
+       * @param   string      Command: If "FILE" then $this->printConf['contentLength_FILE'] is used for content length comparison, otherwise $this->printConf['contentLength']
+       * @return  string
+       */
+       function fixCLen($c,$v) {
+               $len = $v=='FILE'?$this->printConf['contentLength_FILE']:$this->printConf['contentLength'];
+               if (strlen($c)>$len)    {
+                       $c='<font color="green">'.htmlspecialchars(t3lib_div::fixed_lgd($c,$len)).'</font>';
+               } else {
+                       $c=htmlspecialchars($c);
+               }
+               return $c;
+       }
+
+       /**
+       * Wraps input string in a <font> tag with verdana, black and size 1
+       *
+       * @param   string      The string to be wrapped
+       * @return  string
+       */
+       function fw($str)   {
+               return '<font face="verdana" color="black" size="1" style="color:black;">'.$str.'&nbsp;</font>';
+       }
+
+       /**
+       * Helper function for internal data manipulation
+       *
+       * @param   array       Array (passed by reference) and modified
+       * @param   integer     Pointer value
+       * @param   string      Unique ID string
+       * @return  void
+       * @access private
+       * @see printTSlog()
+       */
+       function createHierarchyArray(&$arr,$pointer,$uniqueId) {
+               if (!is_array($arr))    $arr=array();
+               if ($pointer>0) {
+                       end($arr);
+                       $k=key($arr);
+                       $this->createHierarchyArray($arr[intval($k).'.'],$pointer-1,$uniqueId);
+               } else {
+                       $arr[] = $uniqueId;
+               }
+       }
+
+       /**
+       * This prints out a TYPO3 error message.
+       *
+       * @param   string      Header string
+       * @param   string      Message string
+       * @param   boolean     If set, then this will produce a alert() line for inclusion in JavaScript.
+       * @return  string
+       */
+       function debug_typo3PrintError($header,$text,$js,$baseUrl='')   {
+               if ($js)    {
+                       echo"alert('".t3lib_div::slashJS($header."\n".$text)."');";
+               } else {
+                       echo '
+                               <html>
+                                       <head>
+                                               '.($baseUrl ? '<base href="'.htmlspecialchars($baseUrl).'" />' : '').'
+                                               <title>Error!</title>
+                                       </head>
+                                       <body bgcolor="white">
+                                               <div align="center">
+                                                       <table border="0" cellspacing="0" cellpadding="0" width="333" bgcolor="#ffffff">
+                                                               <tr>
+                                                                       <td><img src="t3lib/gfx/typo3logo.gif" width="333" height="43" vspace="10" border="0" alt="" /></td>
+                                                               </tr>
+                                                               <tr>
+                                                                       <td bgcolor="black">
+                                                                               <table width="100%" border="0" cellspacing="1" cellpadding="10">
+                                                                                       <tr>
+                                                                                               <td bgcolor="#F4F0E8">
+                                                                                                       <font face="verdana,arial,helvetica" size="2">';
+                       echo '<b><center><font size="+1">'.$header.'</font></center></b><br />'.$text;
+                       echo '                                  </font>
+                                                                                               </td>
+                                                                                       </tr>
+                                                                               </table>
+                                                                       </td>
+                                                               </tr>
+                                                       </table>
+                                               </div>
+                                       </body>
+                               </html>';
+               }
+       }
 }
 ?>
\ No newline at end of file
index e4953b9..a66fb96 100755 (executable)
@@ -100,6 +100,7 @@ class t3lib_transferData {
        var $disableRTE=0;                                      // Is set externally if RTE is disabled.
        var $prevPageID = '';                           // If the pid in the command is 'prev' then $prevPageID is used as pid for the record. This is used to attach new records to other previous records eg. new pages.
        var $defVals=array();                                           // Can be set with an array of default values for tables. First key is table name, second level keys are field names. Originally this was a GLOBAL array used internally.
+       var $addRawData = FALSE;                        // If set, the processed data is overlaid the raw record.
 
                // Internal, dynamic
        var $regTableItems = Array();           // Used to register, which items are already loaded!!
@@ -239,7 +240,7 @@ class t3lib_transferData {
                        $this->regTableItems_data[$uniqueItemRef] = $this->renderRecordRaw($table, $id, $pid, $row, $TSconfig, $tscPID);
 
                                // Merges the processed array on-top of the raw one - this is done because some things in TCEforms may need access to other fields than those in the columns configuration!
-                       if (is_array($row) && is_array($this->regTableItems_data[$uniqueItemRef]))      {
+                       if ($this->addRawData && is_array($row) && is_array($this->regTableItems_data[$uniqueItemRef])) {
                                $this->regTableItems_data[$uniqueItemRef] = array_merge($row, $this->regTableItems_data[$uniqueItemRef]);
                        }
                }
index c014328..66e8a77 100755 (executable)
@@ -1051,34 +1051,6 @@ class t3lib_treeView {
 }
 
 
-
-
-// temporary code by r.fritz
-// will be removed if better solution is available
-
-class t3lib_TCEforms_SelectTreeView extends t3lib_treeview {
-
-       var $TCEforms_itemFormElName='';
-       var $TCEforms_nonSelectableItemsArray=array();
-
-       function wrapTitle($title,$v)   {
-               if($v['uid']>0) {
-                       if (in_array($v['uid'],$this->TCEforms_nonSelectableItemsArray)) {
-                               return '<span style="color:grey">'.$title.'</span>';
-                       } else {
-                               $aOnClick = 'setFormValueFromBrowseWin(\''.$this->TCEforms_itemFormElName.'\','.$v['uid'].',\''.$title.'\'); return false;';
-                               return '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$title.'</a>';
-                       }
-               } else {
-                       return $title;
-               }
-       }
-}
-
-
-
-
-
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_treeview.php']) {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_treeview.php']);
 }
index 3473645..ae856e3 100755 (executable)
@@ -1028,7 +1028,7 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
                        $tce = t3lib_div::makeInstance('t3lib_TCEmain');
                        $tce->stripslashes_values=0;
                        $tce->start($this->TSFE_EDIT['data'],Array());
-                       $tce->process_uploads($GLOBALS['HTTP_POST_FILES']);
+                       $tce->process_uploads($_FILES);
                        $tce->process_datamap();
                }
        }
index 864fc72..57c7950 100755 (executable)
@@ -476,7 +476,7 @@ class t3lib_TStemplate      {
 
                        // Include "Based On" sys_templates:
                if (trim($row['basedOn']))      {               // 'basedOn' is a list of templates to include
-                               // Manually you can put this value in the field and then the based_on ID will be taken from the HTTP_GET_VARS var defined by '=....'.
+                               // Manually you can put this value in the field and then the based_on ID will be taken from the $_GET var defined by '=....'.
                                // Example: If $row['basedOn'] is 'EXTERNAL_BASED_ON_TEMPLATE_ID=based_on_uid', then the global var, based_on_uid - given by the URL like '&based_on_uid=999' - is included instead!
                                // This feature allows us a hack to test/demonstrate various included templates on the same set of content bearing pages. Used by the "freesite" extension.
                        $basedOn_hackFeature = explode('=',$row['basedOn']);
index 9b13154..670e1d7 100755 (executable)
@@ -114,14 +114,14 @@ class t3lib_userAuth {
 
        var $auth_include = '';                         // this is the name of the include-file containing the login form. If not set, login CAN be anonymous. If set login IS needed.
 
-       var $auth_timeout_field = 0;            // if > 0 : session-timeout in seconds. if false/<0 : no timeout. if string: The string is fieldname from the usertable where the timeout can be found.
+       var $auth_timeout_field = 0;            // if > 0 : session-timeout in seconds. if string: The string is fieldname from the usertable where the timeout can be found.
        var $lifetime = 0;                  // 0 = Session-cookies. If session-cookies, the browser will stop session when the browser is closed. Else it keeps the session for $lifetime seconds.
        var $gc_time  = 24;                     // GarbageCollection. Purge all session data older than $gc_time hours.
        var $gc_probability = 1;                        // Possibility (in percent) for GarbageCollection to be run.
        var $writeStdLog = 0;                                   // Decides if the writelog() function is called at login and logout
        var $writeAttemptLog = 0;                               // If the writelog() functions is called if a login-attempt has be tried without success
        var $sendNoCacheHeaders = 1;            // If this is set, headers is sent to assure, caching is NOT done
-       var $getFallBack = 0;                           // If this is set, authentication is also accepted by the HTTP_GET_VARS. Notice that the identification is NOT 128bit MD5 hash but reduced. This is done in order to minimize the size for mobile-devices, such as WAP-phones
+       var $getFallBack = 0;                           // If this is set, authentication is also accepted by the $_GET. Notice that the identification is NOT 128bit MD5 hash but reduced. This is done in order to minimize the size for mobile-devices, such as WAP-phones
        var $hash_length = 32;                          // The ident-hash is normally 32 characters and should be! But if you are making sites for WAP-devices og other lowbandwidth stuff, you may shorten the length. Never let this value drop below 6. A length of 6 would give you more than 16 mio possibilities.
        var $getMethodEnabled = 0;                      // Setting this flag true lets user-authetication happen from GET_VARS if POST_VARS are not set. Thus you may supply username/password from the URL.
        var $lockIP = 4;                                        // If set, will lock the session to the users IP address (all four numbers. Reducing to 1-3 means that only first, second or third part of the IP address is used).
@@ -135,7 +135,7 @@ class t3lib_userAuth {
 
                // Internals
        var $id;                                                        // Internal: Will contain session_id (MD5-hash)
-       var $cookieId;                                          // Internal: Will contain the session_id gotten from cookie or GET method. This is used in statistics as a reliable cookie (one which is known to come from HTTP_COOKIE_VARS).
+       var $cookieId;                                          // Internal: Will contain the session_id gotten from cookie or GET method. This is used in statistics as a reliable cookie (one which is known to come from $_COOKIE).
        var $loginSessionStarted = 0;           // Will be set to 1 if the login session is actually written during auth-check.
 
        var $user;                                                      // Internal: Will contain user- AND session-data from database (joined tables)
@@ -157,17 +157,16 @@ class t3lib_userAuth {
         * @return      void
         */
        function start() {
-               global $HTTP_COOKIE_VARS, $HTTP_GET_VARS;
 
                        // Init vars.
                $mode='';
                $new_id = false;                                // Default: not a new session
-               $id = isset($HTTP_COOKIE_VARS[$this->name]) ? stripslashes($HTTP_COOKIE_VARS[$this->name]) : '';        // $id is set to ses_id if cookie is present. Else set to false, which will start a new session
+               $id = isset($_COOKIE[$this->name]) ? stripslashes($_COOKIE[$this->name]) : '';  // $id is set to ses_id if cookie is present. Else set to false, which will start a new session
                $this->hash_length = t3lib_div::intInRange($this->hash_length,6,32);
 
                        // If fallback to get mode....
                if (!$id && $this->getFallBack && $this->get_name)      {
-                       $id = isset($HTTP_GET_VARS[$this->get_name]) ? t3lib_div::_GET($this->get_name) : '';
+                       $id = isset($_GET[$this->get_name]) ? t3lib_div::_GET($this->get_name) : '';
                        if (strlen($id)!=$this->hash_length)    $id='';
                        $mode='get';
                }
index 8c84b1e..f009fc9 100755 (executable)
@@ -43,6 +43,7 @@ $TYPO3_CONF_VARS = Array(
                'im_noScaleUp' => 0,                                    // Boolean. If set, images are not being scaled up if told so (in t3lib/stdgraphics.php)
                'im_combine_filename' => 'combine',             // String. Latest ImageMagick versions has changed the name of combine to composite. Configure here if needed.
                'im_noFramePrepended' => 0,                             // Boolean. If set, the the [x] frame indicator is NOT prepended to filenames in stdgraphic. Some IM5+ version didn't work at all with the typical [0]-prefix, which allow multipage pdf's and animated gif's to be scaled only for the first frame/page and that seriously cuts down rendering time. Set this flag only if your ImageMagick version cannot find the files. Notice that changing this flag causes temporary filenames to change, thus the server will begin scaling images again which were previously cached.
+               'im_jpg_quality' => 70,                                 // Integer. Default JPEG generation quality
                'enable_typo3temp_db_tracking' => 0,    // Boolean. If set, then all files in typo3temp will be logged in a database table. In addition to being a log of the files with original filenames, it also serves to secure that the same image is not rendered simultaneously by two different processes.
                'TTFLocaleConv' => '',                                  // String. Enter locale conversion string used to recode input to TrueType functions. Eg. 'cp1250..UTF-8'. Works ONLY if 'recode' is enabled in PHP. Depreciated from ver. 3.6.0 of TYPO3. Set up [BE][forceCharset] as strings are automatically converted from databsae charset to UTF-8.
                'TTFdpi' => '72',                                               // Integer. Enter how many dpi the FreeType module uses. Freetype1 should be set to 72. Freetype2 should be set to 96 (otherwise fonts are rendered way bigger than FreeType1). This works as a global scaling factor for Freetype.
@@ -107,6 +108,7 @@ $TYPO3_CONF_VARS = Array(
                'warning_email_addr' => '',                             // Email-address that will receive a warning if there has been failed logins 4 times within an hour (all users).
                'warning_mode' => '',                                   // Bit 1: If set, warning_email_addr gets a mail everytime a user logs in. Bit 2: If set, a mail is sent if an ADMIN user logs in! Other bits reserved for future options.
                'lockIP' => 4,                                                  // Integer (0-4). Session IP locking for backend users. See [FE][lockIP] for details. Default is 4 (which is locking the FULL IP address to session).
+               'sessionTimeout' => 3600,                               // Integer, seconds. Session time out for backend users. Default is 3600 seconds = 1 hour.
                'IPmaskList' => '',                                             // String. Lets you define a list of IP-numbers (with *-wildcards) that are the ONLY ones allowed access to ANY backend activity. On error an error header is sent and the script exits. Works like IP masking for users configurable through TSconfig. See syntax for that (or look up syntax for the function t3lib_div::cmpIP())
                'lockBeUserToDBmounts' => 1,                    // Boolean. If set, the backend user is allowed to work only within his page-mount. It's advisable to leave this on because it makes security easy to manage.
                'lockSSL' => 0,                                                 // Int. 0,1,2: If set (1+2), the backend can only be operated from an ssl-encrypted connection (https). Set to 2 you will be redirected to the https admin-url supposed to be the http-url, but with https scheme instead.
@@ -203,6 +205,10 @@ $TYPO3_CONF_VARS = Array(
 );
 $T3_VAR = array();     // Initialize.
 
+       // TYPO3 version
+$TYPO_VERSION = '3.7.0-dev';
+define('TYPO3_version', $TYPO_VERSION);
+
 // Database-variables are cleared!
 $typo_db = '';                                 // The database name
 $typo_db_username = '';                        // The database username
@@ -337,5 +343,4 @@ unset($LOCAL_LANG);
        // Setting some global vars:
 $EXEC_TIME = time();                                   // $EXEC_TIME is set so that the rest of the script has a common value for the script execution time
 $SIM_EXEC_TIME = $EXEC_TIME;                   // $SIM_EXEC_TIME is set to $EXEC_TIME but can be altered later in the script if we want to simulate another execution-time when selecting from eg. a database
-$TYPO_VERSION = '3.7.0-dev';                           // TYPO3 version
 ?>
index f29fe0e..9b4c7dc 100755 (executable)
@@ -376,7 +376,6 @@ $TCA['sys_language'] = Array (
 $TBE_MODULES = Array (
        'web' => 'list,info,perm,func',
        'file' => 'list',
-       'txdamM1' => '',
        'doc' => '',    // This should always be empty!
        'user' => '',
        'tools' => 'em',
index 7d49e25..8dfeab8 100755 (executable)
@@ -64,7 +64,7 @@ error_reporting (E_ALL ^ E_NOTICE);
 // ******************
 define('TYPO3_OS', stristr(PHP_OS,'win')&&!stristr(PHP_OS,'darwin')?'WIN':'');
 define('TYPO3_MODE','BE');
-define('PATH_thisScript',str_replace('//','/', str_replace('\\','/', (php_sapi_name()=='cgi'||php_sapi_name()=='isapi' ||php_sapi_name()=='cgi-fcgi')&&($HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']?$HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']:$HTTP_SERVER_VARS['PATH_TRANSLATED'])? ($HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']?$HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']:$HTTP_SERVER_VARS['PATH_TRANSLATED']):($HTTP_SERVER_VARS['ORIG_SCRIPT_FILENAME']?$HTTP_SERVER_VARS['ORIG_SCRIPT_FILENAME']:$HTTP_SERVER_VARS['SCRIPT_FILENAME']))));
+define('PATH_thisScript',str_replace('//','/', str_replace('\\','/', (php_sapi_name()=='cgi'||php_sapi_name()=='isapi' ||php_sapi_name()=='cgi-fcgi')&&($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED'])? ($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED']):($_SERVER['ORIG_SCRIPT_FILENAME']?$_SERVER['ORIG_SCRIPT_FILENAME']:$_SERVER['SCRIPT_FILENAME']))));
 
 define('PATH_site', ereg_replace('[^/]*.[^/]*$','',PATH_thisScript));          // the path to the website folder (see init.php)
 define('PATH_typo3conf', PATH_site.'typo3conf/');
index 345c3c4..7bafc72 100755 (executable)
@@ -727,7 +727,7 @@ class clickMenu {
 
        /**
         * Adding CM element for a flag field of the input record
-        * 
+        *
         * @param       string          Table name
         * @param       array           Record array
         * @param       string          Name of the flag field
@@ -742,7 +742,7 @@ class clickMenu {
            $loc='top.content'.($this->listFrame && !$this->alwaysContentFrame ?'.list_frame':'');
            $editOnClick='if('.$loc.'){'.$loc.".document.location=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'".
                "&data[".$table.']['.$uid.']['.$flagField.']='.($rec[$flagField]?0:1).'&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode()."';hideCM();}";
-       
+
            return $this->linkItem(
                $title,
                $this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,$iconRelPath.'button_'.($rec[$flagField]?'un':'').$name.'.gif','width="11" height="10"').' alt="" />'),
@@ -1110,7 +1110,7 @@ if (top.content && top.content'.$frameName.' && top.content'.$frameName.'.setLay
                }
                return $out;
        }
-       
+
        /**
         * Adds or inserts a menu item
         * Can be used to set the position of new menu entries within the list of existing menu entries. Has this syntax: [cmd]:[menu entry key],[cmd].... cmd can be "after", "before" or "top" (or blank/"bottom" which is default). If "after"/"before" then menu items will be inserted after/before the existing entry with [menu entry key] if found. "after-spacer" and "before-spacer" do the same, but inserts before or after an item and a spacer. If not found, the bottom of list. If "top" the items are inserted in the top of the list.
@@ -1122,19 +1122,19 @@ if (top.content && top.content'.$frameName.' && top.content'.$frameName.'.setLay
         */
        function addMenuItems($menuItems,$newMenuItems,$position='')    {
                if (is_array($newMenuItems))    {
-                       
+
                        if($position) {
-                       
+
                                $posArr = t3lib_div::trimExplode(',', $position, 1);
                                foreach($posArr as $pos) {
                                        list($place,$menuEntry) = t3lib_div::trimExplode(':', $pos, 1);
-                                       list($place,$placeExtra) = t3lib_div::trimExplode('-', $place, 1);      
-               
+                                       list($place,$placeExtra) = t3lib_div::trimExplode('-', $place, 1);
+
                                                // bottom
                                        $pointer = count($menuItems);
-                                       
+
                                        $found=FALSE;
-                                               
+
                                        if ($place) {
                                                switch(strtolower($place))      {
                                                        case 'after':
@@ -1152,7 +1152,7 @@ if (top.content && top.content'.$frameName.' && top.content'.$frameName.'.setLay
                                                                                $p++;
                                                                        }
                                                                        if (!$found) break;
-                                                                       
+
                                                                        if ($place=='before') {
                                                                                $pointer--;
                                                                                if ($placeExtra=='spacer' AND prev($menuItems)=='spacer') {
@@ -1182,10 +1182,10 @@ if (top.content && top.content'.$frameName.' && top.content'.$frameName.'.setLay
                        $menuItemsBefore = array_slice($menuItems, 0, ($pointer?$pointer:0));
                        $menuItemsAfter = array_slice($menuItems, $pointer);
                        $menuItems = $menuItemsBefore + $newMenuItems + $menuItemsAfter;
-               } 
+               }
                return $menuItems;
        }
-       
+
        /**
         * Creating an array with various elements for the clickmenu entry
         *
index ca89304..b8e98e0 100755 (executable)
@@ -104,7 +104,7 @@ class localPageTree extends t3lib_browseTree {
 
                        // Wrap icon in click-menu link.
                if (!$this->ext_IconMode)       {
-                       $thePageIcon = $GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon($thePageIcon,'pages',$row['uid'],0);
+                       $thePageIcon = $GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon($thePageIcon,'pages',$row['uid'],0,'&bank='.$this->bank);
                } elseif (!strcmp($this->ext_IconMode,'titlelink'))     {
                        $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->treeName.'\');';
                        $thePageIcon='<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$thePageIcon.'</a>';
index 76510c4..cc7042c 100755 (executable)
@@ -217,9 +217,7 @@ class SC_alt_doc {
         * @return      boolean         True, then save the document (data submitted)
         */
        function doProcessData()        {
-               global $HTTP_POST_VARS;
-
-               $out = $this->doSave || isset($HTTP_POST_VARS['_savedok_x']) || isset($HTTP_POST_VARS['_saveandclosedok_x']) || isset($HTTP_POST_VARS['_savedokview_x']) || isset($HTTP_POST_VARS['_savedoknew_x']);
+               $out = $this->doSave || isset($_POST['_savedok_x']) || isset($_POST['_saveandclosedok_x']) || isset($_POST['_savedokview_x']) || isset($_POST['_savedoknew_x']);
                return $out;
        }
 
@@ -229,7 +227,7 @@ class SC_alt_doc {
         * @return      void
         */
        function processData()  {
-               global $BE_USER,$HTTP_POST_VARS,$TYPO3_CONF_VARS;
+               global $BE_USER,$TYPO3_CONF_VARS;
 
                        // GPvars specifically for processing:
                $this->data = t3lib_div::_GP('data');
@@ -275,7 +273,7 @@ class SC_alt_doc {
                } else {
 
                                // Perform the saving operation with TCEmain:
-                       $tce->process_uploads($GLOBALS['HTTP_POST_FILES']);
+                       $tce->process_uploads($_FILES);
                        $tce->process_datamap();
 
                                // If there was saved any new items, load them:
@@ -303,7 +301,7 @@ class SC_alt_doc {
                        }
 
                                // If a document is saved and a new one is created right after.
-                       if (isset($HTTP_POST_VARS['_savedoknew_x']) && is_array($this->editconf))       {
+                       if (isset($_POST['_savedoknew_x']) && is_array($this->editconf))        {
 
                                        // Finding the current table:
                                reset($this->editconf);
@@ -330,12 +328,12 @@ class SC_alt_doc {
                        }
 
                        $tce->printLogErrorMessages(
-                               isset($HTTP_POST_VARS['_saveandclosedok_x']) ?
+                               isset($_POST['_saveandclosedok_x']) ?
                                $this->retUrl :
                                $this->R_URL_parts['path'].'?'.t3lib_div::implodeArrayForUrl('',$this->R_URL_getvars)   // popView will not be invoked here, because the information from the submit button for save/view will be lost .... But does it matter if there is an error anyways?
                        );
                }
-               if (isset($HTTP_POST_VARS['_saveandclosedok_x']) || $this->closeDoc<0)  {       //  || count($tce->substNEWwithIDs)... If any new items has been save, the document is CLOSED because if not, we just get that element re-listed as new. And we don't want that!
+               if (isset($_POST['_saveandclosedok_x']) || $this->closeDoc<0)   {       //  || count($tce->substNEWwithIDs)... If any new items has been save, the document is CLOSED because if not, we just get that element re-listed as new. And we don't want that!
                        $this->closeDocument(abs($this->closeDoc));
                }
        }
@@ -346,7 +344,7 @@ class SC_alt_doc {
         * @return      void
         */
        function init() {
-               global $BE_USER,$LANG,$BACK_PATH,$HTTP_POST_VARS;
+               global $BE_USER,$LANG,$BACK_PATH;
 
                        // Setting more GPvars:
                $this->popViewId = t3lib_div::_GP('popViewId');
@@ -416,7 +414,7 @@ class SC_alt_doc {
                                }
                                return false;
                        }
-               '.(isset($HTTP_POST_VARS['_savedokview_x']) && $this->popViewId ? t3lib_BEfunc::viewOnClick($this->popViewId,'',t3lib_BEfunc::BEgetRootLine($this->popViewId),'',$this->viewUrl,$this->popViewId_addParams) : '')
+               '.(isset($_POST['_savedokview_x']) && $this->popViewId ? t3lib_BEfunc::viewOnClick($this->popViewId,'',t3lib_BEfunc::BEgetRootLine($this->popViewId),'',$this->viewUrl,$this->popViewId_addParams) : '')
                ).$this->doc->getDynTabMenuJScode();
 
                        // Setting up the context sensitive menu:
@@ -624,6 +622,7 @@ class SC_alt_doc {
                                                        if ($hasAccess) {
                                                                $prevPageID = is_object($trData)?$trData->prevPageID:'';
                                                                $trData = t3lib_div::makeInstance('t3lib_transferData');
+                                                               $trData->addRawData = TRUE;
                                                                $trData->defVals = $this->defVals;
                                                                $trData->lockRecords=1;
                                                                $trData->disableRTE = $this->MOD_SETTINGS['disableRTE'];
index 09f4625..0d2d355 100755 (executable)
@@ -96,7 +96,7 @@ class SC_alt_intro {
         */
        function main() {
                global $BE_USER,$LANG,$TYPO3_CONF_VARS;
-               global $TBE_TEMPLATE,$TYPO_VERSION;
+               global $TBE_TEMPLATE;
 
                $alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
 
@@ -110,7 +110,7 @@ class SC_alt_intro {
                        <p>%s</p>
                        <p>&nbsp;</p>
                        <p>%s</p>',
-                       'TYPO3 '.$TYPO_VERSION,
+                       'TYPO3 '.TYPO3_version,
                        $LANG->getLL('introtext'),
                        t3lib_BEfunc::TYPO3_copyRightNotice(),
                        $LANG->getLL('introtext2')
index 86dc0dc..e4c35a7 100755 (executable)
@@ -186,7 +186,7 @@ class SC_alt_main {
                }
        }
        function busy_OpenRefreshWindow()       {       //
-               vHWin=window.open("login_frameset.php","relogin","height=350,width=700,status=0,menubar=0");
+               vHWin=window.open("login_frameset.php","relogin","height=350,width=700,status=0,menubar=0,location=1");
                vHWin.focus();
                this.openRefreshW=1;
        }
@@ -417,7 +417,7 @@ class SC_alt_main {
         * @return      void
         */
        function main() {
-               global $BE_USER,$TYPO3_CONF_VARS,$TYPO_VERSION;
+               global $BE_USER,$TYPO3_CONF_VARS;
 
                        // Set doktype:
                $GLOBALS['TBE_TEMPLATE']->docType='xhtml_frames';
@@ -431,7 +431,7 @@ class SC_alt_main {
                $GLOBALS['TBE_TEMPLATE']->JScode.=$GLOBALS['TBE_TEMPLATE']->wrapScriptTags($this->mainJScode);
 
                        // Title:
-               $title = $TYPO3_CONF_VARS['SYS']['sitename'] ? $TYPO3_CONF_VARS['SYS']['sitename'].' [TYPO3 '.$TYPO_VERSION.']' : 'TYPO3 '.$TYPO_VERSION;
+               $title = $TYPO3_CONF_VARS['SYS']['sitename'] ? $TYPO3_CONF_VARS['SYS']['sitename'].' [TYPO3 '.TYPO3_version.']' : 'TYPO3 '.TYPO3_version;
 
                        // Start page header:
                $this->content.=$GLOBALS['TBE_TEMPLATE']->startPage($title);
index 9be7774..ae0a20b 100755 (executable)
@@ -103,7 +103,7 @@ class SC_alt_menu {
         * @return      void
         */
        function main() {
-               global $BE_USER,$TYPO3_CONF_VARS,$TBE_TEMPLATE,$TYPO_VERSION;
+               global $BE_USER,$TYPO3_CONF_VARS,$TBE_TEMPLATE;
 
                $TBE_TEMPLATE->docType='xhtml_trans';
                $TBE_TEMPLATE->divClass='vertical-menu';
index c450950..705d88a 100755 (executable)
@@ -141,7 +141,7 @@ class SC_alt_shortcut {
         * @return      void
         */
        function preprocess()   {
-               global $BE_USER,$HTTP_POST_VARS;
+               global $BE_USER;
 
                        // Adding a shortcut being set from another frame
                if ($this->modName && $this->URL)       {
@@ -165,9 +165,9 @@ class SC_alt_shortcut {
                }
 
                        // If other changes in post-vars:
-               if (is_array($HTTP_POST_VARS))  {
+               if (is_array($_POST))   {
                                // Saving:
-                       if (isset($HTTP_POST_VARS['_savedok_x']) || isset($HTTP_POST_VARS['_saveclosedok_x']))  {
+                       if (isset($_POST['_savedok_x']) || isset($_POST['_saveclosedok_x']))    {
                                $fields_values = array(
                                        'description' => $this->editName,
                                        'sc_group' => intval($this->editGroup)
@@ -179,11 +179,11 @@ class SC_alt_shortcut {
                                $GLOBALS['TYPO3_DB']->exec_UPDATEquery('sys_be_shortcuts', 'uid='.intval($this->whichItem).$addUSERWhere, $fields_values);
                        }
                                // If save without close, keep the session going...
-                       if (isset($HTTP_POST_VARS['_savedok_x']))       {
+                       if (isset($_POST['_savedok_x']))        {
                                $this->editSC=$this->whichItem;
                        }
                                // Deleting a single shortcut ?
-                       if (isset($HTTP_POST_VARS['_deletedok_x']))     {
+                       if (isset($_POST['_deletedok_x']))      {
                                $GLOBALS['TYPO3_DB']->exec_DELETEquery('sys_be_shortcuts', 'uid='.intval($this->whichItem).$addUSERWhere);
 
                                if (!$this->editSC)     $this->editSC=-1;       // Just to have the checkbox set...
index 1bb0690..7898b54 100755 (executable)
@@ -92,6 +92,7 @@ class recordList extends t3lib_recordList {
        var $widthGif = '<img src="clear.gif" width="1" height="4" hspace="160" alt="" />';
        var $script = 'db_list.php';                    // Current script name
        var $allFields=0;                                               // Indicates if all available fields for a user should be selected or not.
+       var $localizationView=FALSE;                    // Whether to show localization view or not.
 
                // Internal, static: GPvar:
        var $csvOutput=FALSE;                   // If set, csvList is outputted.
@@ -112,6 +113,9 @@ class recordList extends t3lib_recordList {
        var $perms_clause='';                   // Page select permissions
        var $calcPerms=0;                               // Some permissions...
        var $clickTitleMode = '';               // Mode for what happens when a user clicks the title of a record.
+       var $pageOverlays = array();                    // Contains page translation languages
+       var $languageIconTitles = array();              // Contains sys language icons and titles
+       var $modSharedTSconfig = array();               // Shared module configuration, used by localization features
 
                // Internal, dynamic:
        var $JScode = '';                               // JavaScript code accumulation
@@ -176,6 +180,11 @@ class recordList extends t3lib_recordList {
                } else {
                        $this->pidSelect = 'pid='.intval($id);
                }
+
+                       // Initialize languages:
+               if ($this->localizationView)    {
+                       $this->initializeLanguages();
+               }
        }
 
        /**
@@ -650,6 +659,70 @@ class recordList extends t3lib_recordList {
                return $tree;
        }
 
+       /**
+        * Initializes page languages and icons
+        *
+        * @return      void
+        */
+       function initializeLanguages()  {
+               global $TCA,$LANG;
+
+                       // Look up page overlays:
+               $this->pageOverlays = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
+                       '*',
+                       'pages_language_overlay',
+                       'pid='.intval($this->id).
+                               t3lib_BEfunc::deleteClause('pages_language_overlay'),
+                       '',
+                       '',
+                       '',
+                       'sys_language_uid'
+               );
+
+                       // icons and language titles:
+               t3lib_div::loadTCA ('sys_language');
+               $flagAbsPath = t3lib_div::getFileAbsFileName($TCA['sys_language']['columns']['flag']['config']['fileFolder']);
+               $flagIconPath = $this->backPath.'../'.substr($flagAbsPath, strlen(PATH_site));
+
+               $this->modSharedTSconfig = t3lib_BEfunc::getModTSconfig($this->id, 'mod.SHARED');
+               $this->languageIconTitles = array();
+
+                       // Set default:
+               $this->languageIconTitles[0]=array(
+                       'uid' => 0,
+                       'title' => strlen ($this->modSharedTSconfig['properties']['defaultLanguageFlag']) ? $this->modSharedTSconfig['properties']['defaultLanguageLabel'].' ('.$LANG->getLL('defaultLanguage').')' : $LANG->getLL('defaultLanguage'),
+                       'ISOcode' => 'DEF',
+                       'flagIcon' => strlen($this->modSharedTSconfig['properties']['defaultLanguageFlag']) && @is_file($flagAbsPath.$this->modSharedTSconfig['properties']['defaultLanguageFlag']) ? $flagIconPath.$this->modSharedTSconfig['properties']['defaultLanguageFlag'] : null,
+               );
+
+                       // Set "All" language:
+               $this->languageIconTitles[-1]=array(
+                       'uid' => -1,
+                       'title' => $LANG->getLL ('multipleLanguages'),
+                       'ISOcode' => 'DEF',
+                       'flagIcon' => $flagIconPath.'multi-language.gif',
+               );
+
+                       // Find all system languages:
+               $sys_languages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
+                       '*',
+                       'sys_language',
+                       ''
+               );
+               foreach($sys_languages as $row)         {
+                       $this->languageIconTitles[$row['uid']] = $row;
+
+                       if ($row['static_lang_isocode'])        {
+                               $staticLangRow = t3lib_BEfunc::getRecord('static_languages',$row['static_lang_isocode'],'lg_iso_2');
+                               if ($staticLangRow['lg_iso_2']) {
+                                       $this->languageIconTitles[$row['uid']]['ISOcode'] = $staticLangRow['lg_iso_2'];
+                               }
+                       }
+                       if (strlen ($row['flag'])) {
+                               $this->languageIconTitles[$row['uid']]['flagIcon'] = @is_file($flagAbsPath.$row['flag']) ? $flagIconPath.$row['flag'] : '';
+                       }
+               }
+       }
 }
 
 
index 5a0272b..403d631 100755 (executable)
@@ -299,12 +299,18 @@ class localRecordList extends recordList {
                t3lib_div::loadTCA($table);
 
                        // Init
+               $addWhere = '';
                $titleCol = $TCA[$table]['ctrl']['label'];
                $thumbsCol = $TCA[$table]['ctrl']['thumbnail'];
+               $l10nEnabled = $TCA[$table]['ctrl']['languageField'] && $TCA[$table]['ctrl']['transOrigPointerField'] && !$TCA[$table]['ctrl']['transOrigPointerTable'];
 
                        // Cleaning rowlist for duplicates and place the $titleCol as the first column always!
                $this->fieldArray=array();
                $this->fieldArray[] = $titleCol;        // Add title column
+               if ($this->localizationView && $l10nEnabled)    {
+                       $this->fieldArray[] = '_LOCALIZATION_';
+                       $addWhere.=' AND '.$TCA[$table]['ctrl']['languageField'].'<=0';
+               }
                if (!t3lib_div::inList($rowlist,'_CONTROL_'))   {
                        $this->fieldArray[] = '_CONTROL_';
                }
@@ -347,6 +353,10 @@ class localRecordList extends recordList {
                if ($TCA[$table]['ctrl']['versioning']) {
                        $selectFields[] = 't3ver_id';
                }
+               if ($l10nEnabled)       {
+                       $selectFields[] = $TCA[$table]['ctrl']['languageField'];
+                       $selectFields[] = $TCA[$table]['ctrl']['transOrigPointerField'];
+               }
                if ($TCA[$table]['ctrl']['label_alt'])  {
                        $selectFields = array_merge($selectFields,t3lib_div::trimExplode(',',$TCA[$table]['ctrl']['label_alt'],1));
                }
@@ -355,7 +365,7 @@ class localRecordList extends recordList {
                $selFieldList = implode(',',$selectFields);             // implode it into a list of fields for the SQL-statement.
 
                        // Create the SQL query for selecting the elements in the listing:
-               $queryParts = $this->makeQueryArray($table, $id,'',$selFieldList);      // (API function from class.db_list.inc)
+               $queryParts = $this->makeQueryArray($table, $id,$addWhere,$selFieldList);       // (API function from class.db_list.inc)
                $this->setTotalItems($queryParts);              // Finding the total amount of records on the page (API function from class.db_list.inc)
 
                        // Init:
@@ -460,6 +470,25 @@ class localRecordList extends recordList {
                                        if ($flag)      {
                                                $cc++;
                                                $iOut.=$this->renderListRow($table,$row,$cc,$titleCol,$thumbsCol);
+
+                                                       // If localization view is enabled it means that the selected records are either default or All language and here we will not select translations which point to the main record:
+                                               if ($this->localizationView && $l10nEnabled)    {
+
+                                                               // Look for translations of this record:
+                                                       $translations = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
+                                                               $selFieldList,
+                                                               $table,
+                                                               'pid='.$row['pid'].
+                                                                       ' AND '.$TCA[$table]['ctrl']['languageField'].'>0'.
+                                                                       ' AND '.$TCA[$table]['ctrl']['transOrigPointerField'].'='.intval($row['uid']).
+                                                                       t3lib_BEfunc::deleteClause($table)
+                                                       );
+
+                                                               // For each available translation, render the record:
+                                                       foreach($translations as $lRow) {
+                                                               $iOut.=$this->renderListRow($table,$lRow,$cc,$titleCol,$thumbsCol,18);
+                                                       }
+                                               }
                                        }
 
                                                // Counter of total rows incremented:
@@ -501,11 +530,12 @@ class localRecordList extends recordList {
         * @param       integer         Counter, counting for each time an element is rendered (used for alternating colors)
         * @param       string          Table field (column) where header value is found
         * @param       string          Table field (column) where (possible) thumbnails can be found
+        * @param       integer         Indent from left.
         * @return      string          Table row for the element
         * @access private
         * @see getTable()
         */
-       function renderListRow($table,$row,$cc,$titleCol,$thumbsCol)    {
+       function renderListRow($table,$row,$cc,$titleCol,$thumbsCol,$indent=0)  {
                $iOut = '';
 
                        // Background color, if any:
@@ -522,7 +552,7 @@ class localRecordList extends recordList {
                $this->counter++;
 
                        // The icon with link
-               $iconImg = t3lib_iconWorks::getIconImage($table,$row,$this->backPath,'title="'.htmlspecialchars($alttext).'"');
+               $iconImg = t3lib_iconWorks::getIconImage($table,$row,$this->backPath,'title="'.htmlspecialchars($alttext).'"'.($indent ? ' style="margin-left: '.$indent.'px;"' : ''));
                $theIcon = $this->clickMenuEnabled ? $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg,$table,$row['uid']) : $iconImg;
 
                        // Preparing and getting the data-array
@@ -538,6 +568,8 @@ class localRecordList extends recordList {
                                $theData[$fCol]=$this->makeControl($table,$row);
                        } elseif ($fCol=='_CLIPBOARD_') {
                                $theData[$fCol]=$this->makeClip($table,$row);
+                       } elseif ($fCol=='_LOCALIZATION_') {
+                               $theData[$fCol]=$this->makeLocalizationPanel($table,$row);
                        } else {
                                $theData[$fCol]=htmlspecialchars(t3lib_BEfunc::getProcessedValueExtra($table,$fCol,$row[$fCol],100));
                        }
@@ -583,6 +615,9 @@ class localRecordList extends recordList {
                                case '_PATH_':                  // Path
                                        $theData[$fCol]='<i>['.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels._PATH_',1).']</i>';
                                break;
+                               case '_LOCALIZATION_':                  // Path
+                                       $theData[$fCol]='<i>['.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels._LOCALIZATION_',1).']</i>';
+                               break;
                                case '_CLIPBOARD_':             // Clipboard:
                                        $cells=array();
 
@@ -961,6 +996,61 @@ class localRecordList extends recordList {
        }
 
        /**
+        * Creates the localization panel
+        *
+        * @param       string          The table
+        * @param       array           The record for which to make the localization panel.
+        * @return      string          HTML table with the localization panel
+        */
+       function makeLocalizationPanel($table,$row)     {
+               global $TCA,$LANG;
+
+               $out = '';
+               if ($TCA[$table]['ctrl']['languageField'] && $TCA[$table]['ctrl']['transOrigPointerField'] && !$TCA[$table]['ctrl']['transOrigPointerTable'])   {
+
+                               // Language title and icon:
+                       $out = $this->languageFlag($row[$TCA[$table]['ctrl']['languageField']]);
+
+                               // Create new localizations links:
+                       if ($row[$TCA[$table]['ctrl']['languageField']] <=0)    {
+
+                                       // Look for translations of this record, index by language field value:
+                               $translations = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
+                                       'uid,'.$TCA[$table]['ctrl']['languageField'],
+                                       $table,
+                                       'pid='.intval($this->id).
+                                               ' AND '.$TCA[$table]['ctrl']['languageField'].'>0'.
+                                               ' AND '.$TCA[$table]['ctrl']['transOrigPointerField'].'='.intval($row['uid']).
+                                               t3lib_BEfunc::deleteClause($table),
+                                       '',
+                                       '',
+                                       '',
+                                       $TCA[$table]['ctrl']['languageField']
+                               );
+
+                                       // Traverse page translations and add icon for each language that does NOT yet exist:
+                               $lNew = '';
+                               foreach($this->pageOverlays as $lUid_OnPage => $lsysRec)        {
+                                       if (!isset($translations[$lUid_OnPage]))        {
+                                               $href = $GLOBALS['TBE_TEMPLATE']->issueCommand('&cmd['.$table.']['.$row['uid'].'][localize]='.$lUid_OnPage,$rUrl='');
+
+                                               $lC = ($this->languageIconTitles[$lUid_OnPage]['flagIcon'] ? '<img src="'.$this->languageIconTitles[$lUid_OnPage]['flagIcon'].'" class="absmiddle" alt="" />' : $this->languageIconTitles[$lUid_OnPage]['title']);
+                                               $lC = '<a href="'.htmlspecialchars($href).'">'.$lC.'</a> ';
+
+                                               $lNew.=$lC;
+                                       }
+                               }
+
+                               if ($lNew)      $out.=' - '.$LANG->getLL('Localize',1).': '.$lNew;
+                       } else {
+                               $out = '&nbsp;&nbsp;&nbsp;&nbsp;'.$out;
+                       }
+               }
+
+               return $out;
+       }
+
+       /**
         * Create the selector box for selecting fields to display from a table:
         *
         * @param       string          Table name
@@ -985,6 +1075,7 @@ class localRecordList extends recordList {
 
                        // Add pseudo "control" fields
                $fields[]='_PATH_';
+               $fields[]='_LOCALIZATION_';
                $fields[]='_CONTROL_';
                $fields[]='_CLIPBOARD_';
 
@@ -1074,7 +1165,7 @@ class localRecordList extends recordList {
        function addSortLink($code,$field,$table)       {
 
                        // Certain circumstances just return string right away (no links):
-               if ($field=='_CONTROL_' || $field=='_CLIPBOARD_' || $this->disableSingleTableView)      return $code;
+               if ($field=='_CONTROL_' || $field=='_LOCALIZATION_' || $field=='_CLIPBOARD_' || $this->disableSingleTableView)  return $code;
 
                        // If "_PATH_" (showing record path) is selected, force sorting by pid field (will at least group the records!)
                if ($field=='_PATH_')   $field=pid;
@@ -1123,6 +1214,18 @@ class localRecordList extends recordList {
                return '&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
        }
 
+       /**
+        * Return the icon for the language
+        *
+        * @param       integer         Sys language uid
+        * @return      string          Language icon
+        */
+       function languageFlag($sys_language_uid)        {
+               return ($this->languageIconTitles[$sys_language_uid]['flagIcon'] ? '<img src="'.$this->languageIconTitles[$sys_language_uid]['flagIcon'].'" class="absmiddle" alt="" />&nbsp;' : '').
+                               htmlspecialchars($this->languageIconTitles[$sys_language_uid]['title']);
+       }
+
+
 
 
 
index 8bb868c..329f180 100755 (executable)
@@ -162,7 +162,8 @@ class SC_db_list {
                        // MENU-ITEMS:
                $this->MOD_MENU = array(
                        'bigControlPanel' => '',
-                       'clipBoard' => ''
+                       'clipBoard' => '',
+                       'localization' => ''
                );
 
                        // Loading module configuration:
@@ -210,6 +211,7 @@ class SC_db_list {
                $dblist->thumbs = $BE_USER->uc['thumbnailsByDefault'];
                $dblist->returnUrl=$this->returnUrl;
                $dblist->allFields = ($this->MOD_SETTINGS['bigControlPanel'] || $this->table) ? 1 : 0;
+               $dblist->localizationView = $this->MOD_SETTINGS['localization'];
                $dblist->showClipboard = 1;
                $dblist->disableSingleTableView = $this->modTSconfig['properties']['disableSingleTableView'];
                $dblist->listOnlyInSingleTableMode = $this->modTSconfig['properties']['listOnlyInSingleTableView'];
@@ -380,8 +382,9 @@ class SC_db_list {
 
                        $this->content.=t3lib_BEfunc::getFuncCheck($this->id,'SET[bigControlPanel]',$this->MOD_SETTINGS['bigControlPanel'],'db_list.php','').' '.$LANG->getLL('largeControl',1).'<br />';
                        if ($dblist->showClipboard)     {
-                               $this->content.=t3lib_BEfunc::getFuncCheck($this->id,'SET[clipBoard]',$this->MOD_SETTINGS['clipBoard'],'db_list.php','').' '.$LANG->getLL('showClipBoard',1);
+                               $this->content.=t3lib_BEfunc::getFuncCheck($this->id,'SET[clipBoard]',$this->MOD_SETTINGS['clipBoard'],'db_list.php','').' '.$LANG->getLL('showClipBoard',1).'<br />';
                        }
+                       $this->content.=t3lib_BEfunc::getFuncCheck($this->id,'SET[localization]',$this->MOD_SETTINGS['localization'],'db_list.php','').' '.$LANG->getLL('localization',1).'<br />';
                        $this->content.='
                                                </form>
                                        </div>';
index 439603c..46a2cfb 100755 (executable)
@@ -413,7 +413,7 @@ class SC_index {
                if ($BE_USER->user['uid'] && ($this->commandLI || $this->loginRefresh || !$this->interfaceSelector))    {
 
                                // If no cookie has been set previously we tell people that this is a problem. This assumes that a cookie-setting script (like this one) has been hit at least once prior to this instance.
-                       if (!$GLOBALS['HTTP_COOKIE_VARS'][$BE_USER->name])      {
+                       if (!$_COOKIE[$BE_USER->name])  {
                                t3lib_BEfunc::typo3PrintError ('Login-error',"Yeah, that's a classic. No cookies, no TYPO3.<br /><br />Please accept cookies from TYPO3 - otherwise you'll not be able to use the system.",0);
                                exit;
                        }
index 746dda6..48ce3de 100755 (executable)
@@ -69,7 +69,7 @@ error_reporting (E_ALL ^ E_NOTICE);
 // *******************************
 define('TYPO3_OS', stristr(PHP_OS,'win')&&!stristr(PHP_OS,'darwin')?'WIN':'');
 define('TYPO3_MODE','BE');
-define('PATH_thisScript',str_replace('//','/', str_replace('\\','/', (php_sapi_name()=='cgi'||php_sapi_name()=='isapi' ||php_sapi_name()=='cgi-fcgi')&&($HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']?$HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']:$HTTP_SERVER_VARS['PATH_TRANSLATED'])? ($HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']?$HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']:$HTTP_SERVER_VARS['PATH_TRANSLATED']):($HTTP_SERVER_VARS['ORIG_SCRIPT_FILENAME']?$HTTP_SERVER_VARS['ORIG_SCRIPT_FILENAME']:$HTTP_SERVER_VARS['SCRIPT_FILENAME']))));
+define('PATH_thisScript',str_replace('//','/', str_replace('\\','/', (php_sapi_name()=='cgi'||php_sapi_name()=='isapi' ||php_sapi_name()=='cgi-fcgi')&&($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED'])? ($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED']):($_SERVER['ORIG_SCRIPT_FILENAME']?$_SERVER['ORIG_SCRIPT_FILENAME']:$_SERVER['SCRIPT_FILENAME']))));
 define('TYPO3_mainDir', 'typo3/');             // This is the directory of the backend administration for the sites of this TYPO3 installation.
 
 
@@ -111,8 +111,8 @@ if (!$temp_path || substr($temp_path,-strlen(TYPO3_mainDir))!=TYPO3_mainDir)        {       /
                'PATH_thisScript'=>PATH_thisScript,
                'php_sapi_name()'=>php_sapi_name(),
                'TYPO3_MOD_PATH'=>TYPO3_MOD_PATH,
-               'PATH_TRANSLATED'=>$HTTP_SERVER_VARS['PATH_TRANSLATED'],
-               'SCRIPT_FILENAME'=>$HTTP_SERVER_VARS['SCRIPT_FILENAME']
+               'PATH_TRANSLATED'=>$_SERVER['PATH_TRANSLATED'],
+               'SCRIPT_FILENAME'=>$_SERVER['SCRIPT_FILENAME']
        ));
        echo '</pre><HR>';
        phpinfo();
@@ -196,13 +196,13 @@ if (intval($TYPO3_CONF_VARS['BE']['lockSSL']))    {
 // *******************************
 // Checking environment
 // *******************************
-if (t3lib_div::int_from_ver(phpversion())<4000006)     die ('TYPO3 runs with PHP4.0.6+ only');
-if (isset($HTTP_POST_VARS['GLOBALS']) || isset($HTTP_GET_VARS['GLOBALS']))     die('You cannot set the GLOBALS-array from outside the script.');
+if (t3lib_div::int_from_ver(phpversion())<4100000)     die ('TYPO3 runs with PHP4.1.0+ only');
+if (isset($_POST['GLOBALS']) || isset($_GET['GLOBALS']))       die('You cannot set the GLOBALS-array from outside the script.');
 if (!get_magic_quotes_gpc())   {
-       t3lib_div::addSlashesOnArray($HTTP_GET_VARS);
-       t3lib_div::addSlashesOnArray($HTTP_POST_VARS);
-       $_GET = $HTTP_GET_VARS;
-       $_POST = $HTTP_POST_VARS;
+       t3lib_div::addSlashesOnArray($_GET);
+       t3lib_div::addSlashesOnArray($_POST);
+       $HTTP_GET_VARS = $_GET;
+       $HTTP_POST_VARS = $_POST;
 }
 
 
@@ -271,6 +271,7 @@ if (TYPO3_extTableDef_script)       {
 $BE_USER = t3lib_div::makeInstance('t3lib_beUserAuth');        // New backend user object
 $BE_USER->warningEmail = $TYPO3_CONF_VARS['BE']['warning_email_addr'];
 $BE_USER->lockIP = $TYPO3_CONF_VARS['BE']['lockIP'];
+$BE_USER->auth_timeout_field = intval($TYPO3_CONF_VARS['BE']['sessionTimeout']);
 $BE_USER->OS = TYPO3_OS;
 $BE_USER->start();                     // Object is initialized
 $BE_USER->checkCLIuser();
index e19b6b6..d7706f6 100755 (executable)
@@ -41,7 +41,7 @@
 // **************************************************************************
 
        // This checks for my own IP at home. You can just remove the if-statement.
-if (1==0 || (substr($HTTP_SERVER_VARS['REMOTE_ADDR'],0,7)!='192.168' && $HTTP_SERVER_VARS['REMOTE_ADDR']!='127.0.0.1'))                {
+if (1==0 || (substr($_SERVER['REMOTE_ADDR'],0,7)!='192.168' && $_SERVER['REMOTE_ADDR']!='127.0.0.1'))          {
        die("In the source distribution of TYPO3, the install script is disabled by a die() function call.<br/><b>Fix:</b> Open the file typo3/install/index.php and remove/out-comment the line that outputs this message!");
 }
 
index 7395c28..3cd7202 100755 (executable)
@@ -89,7 +89,7 @@ class SC_mod_help_about_index {
         * @return      void
         */
        function main() {
-               global $TBE_TEMPLATE,$TYPO_VERSION,$LANG,$BACK_PATH;
+               global $TBE_TEMPLATE,$LANG,$BACK_PATH;
 
                $this->MCONF = $GLOBALS['MCONF'];
 
@@ -101,7 +101,7 @@ class SC_mod_help_about_index {
                $TBE_TEMPLATE->docType = 'xhtml_trans';
                $this->content.= $TBE_TEMPLATE->startPage('About');
 
-               $minorText = sprintf($LANG->getLL('minor'), 'TYPO3 Ver. '.$TYPO_VERSION.', Copyright &#169; 1998-2004', 'Kasper Sk&#229;rh&#248;j');
+               $minorText = sprintf($LANG->getLL('minor'), 'TYPO3 Ver. '.TYPO3_version.', Copyright &#169; 1998-2004', 'Kasper Sk&#229;rh&#248;j');
 
                $content='
                        <div id="typo3-mod-help-about-index-php-outer">
index aec5e60..fe90955 100755 (executable)
Binary files a/typo3/mod/help/cshmanual/ext_icon.gif and b/typo3/mod/help/cshmanual/ext_icon.gif differ
index f9931ad..b2931a8 100755 (executable)
@@ -414,7 +414,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
        function handleExternalFunctionValue($MM_key='function', $MS_value=NULL)        {
                $MS_value = is_null($MS_value) ? $this->MOD_SETTINGS[$MM_key] : $MS_value;
                $externalItems = $this->getExternalItemConfig($this->MCONF['name'],$MM_key,$MS_value);
-               if (is_array($externalItems))   $this->extClassConf = array_merge($externalItems,$this->extClassConf);
+               if (is_array($externalItems))   $this->extClassConf = array_merge($externalItems,is_array($this->extClassConf)?$this->extClassConf:array());
                if (is_array($this->extClassConf) && $this->extClassConf['path'])       {
                        $this->include_once[]=$this->extClassConf['path'];
                }
@@ -1019,10 +1019,10 @@ EXTENSION KEYS:
                        $fetchData = array($directInput,'');
                        $loc = !strcmp($loc,'G')?'G':'L';
                } elseif ($uploadFlag)  {
-                       if ($GLOBALS['HTTP_POST_FILES']['upload_ext_file']['tmp_name']) {
+                       if ($_FILES['upload_ext_file']['tmp_name'])     {
 
                                        // Read uploaded file:
-                               $uploadedTempFile = t3lib_div::upload_to_tempfile($GLOBALS['HTTP_POST_FILES']['upload_ext_file']['tmp_name']);
+                               $uploadedTempFile = t3lib_div::upload_to_tempfile($_FILES['upload_ext_file']['tmp_name']);
                                $fileContent = t3lib_div::getUrl($uploadedTempFile);
                                t3lib_div::unlink_tempfile($uploadedTempFile);
 
@@ -2602,9 +2602,9 @@ EXTENSION KEYS:
                        // Classes:
                if ($validity)  {
                        $filesInside = $this->getClassIndexLocallangFiles($absPath,$table_class_prefix,$extKey);
-                       if (is_array($filesInside['errors']))   $infoArray['errors'] = array_merge($infoArray['errors'],$filesInside['errors']);
-                       if (is_array($filesInside['NSerrors'])) $infoArray['NSerrors'] = array_merge($infoArray['NSerrors'],$filesInside['NSerrors']);
-                       if (is_array($filesInside['NSok']))     $infoArray['NSok'] = array_merge($infoArray['NSok'],$filesInside['NSok']);
+                       if (is_array($filesInside['errors']))   $infoArray['errors'] = array_merge((array)$infoArray['errors'],$filesInside['errors']);
+                       if (is_array($filesInside['NSerrors'])) $infoArray['NSerrors'] = array_merge((array)$infoArray['NSerrors'],$filesInside['NSerrors']);
+                       if (is_array($filesInside['NSok']))     $infoArray['NSok'] = array_merge((array)$infoArray['NSok'],$filesInside['NSok']);
                        $infoArray['locallang'] = $filesInside['locallang'];
                        $infoArray['classes'] = $filesInside['classes'];
                }
index 5aac2f5..98f6816 100755 (executable)
@@ -700,6 +700,7 @@ class SC_db_layout {
 
                                // Initializing transfer-data object:
                        $trData = t3lib_div::makeInstance('t3lib_transferData');
+                       $trData->addRawData = TRUE;
                        $trData->defVals[$eRParts[0]] = array (
                                'colPos' => intval($ex_colPos),
                                'sys_language_uid' => intval($this->current_sys_language)
index 1fc231c..f8c3747 100755 (executable)
@@ -74,7 +74,7 @@
                        <label index="m_tt_products_ext">Extended</label>
                        <label index="m_default">Default</label>
                        <label index="clickAPage_header">Web&gt;Page module</label>
-                       <label index="clickAPage_content">If you wish to edit the content of a page, please click the page title in the page tree to the left.</label>
+                       <label index="clickAPage_content">Please click the page title in the page tree to the left to edit page content.</label>
                        <label index="pI_crUser">Created by</label>
                        <label index="pI_crDate">Created date</label>
                        <label index="pI_lastChange">Last change</label>
                </languageKey>
        </data>
        <orig_hash type="array">
-               <languageKey index="default" type="array">
-                       <label index="title" type="integer">73079758</label>
-                       <label index="advancedFunctions" type="integer">155530193</label>
-                       <label index="noEditItems" type="integer">22184829</label>
-                       <label index="noEditPage" type="integer">59166922</label>
-                       <label index="nextThree" type="integer">52002706</label>
-                       <label index="moveUp" type="integer">70382816</label>
-                       <label index="moveDown" type="integer">167541671</label>
-                       <label index="unHide" type="integer">151399157</label>
-                       <label index="hide" type="integer">103439945</label>
-                       <label index="edit" type="integer">131916066</label>
-                       <label index="newAfter" type="integer">9161017</label>
-                       <label index="move_record" type="integer">57306690</label>
-                       <label index="move_page" type="integer">32081372</label>
-                       <label index="deleteItem" type="integer">254438473</label>
-                       <label index="deleteWarning" type="integer">75838368</label>
-                       <label index="editColumn" type="integer">14150015</label>
-                       <label index="editPageTitle" type="integer">60384081</label>
-                       <label index="editInRTE" type="integer">50446768</label>
-                       <label index="newPageContent" type="integer">100832025</label>
-                       <label index="newPageContent2" type="integer">74406052</label>
-                       <label index="newInColumn" type="integer">192491768</label>
-                       <label index="records" type="integer">115682368</label>
-                       <label index="pageInformation" type="integer">9265976</label>
-                       <label index="goToTable" type="integer">131114258</label>
-                       <label index="internalNotes" type="integer">267841144</label>
-                       <label index="clearCache" type="integer">128738260</label>
-                       <label index="hiddenCE" type="integer">218457432</label>
-                       <label index="new_language" type="integer">174017384</label>
-                       <label index="newLabel" type="integer">38618522</label>
-                       <label index="editLanguageHeader" type="integer">60830633</label>
-                       <label index="editPageHeader" type="integer">60384081</label>
-                       <label index="newRecordGeneral" type="integer">54021068</label>
-                       <label index="newContentElement" type="integer">165001110</label>
-                       <label index="CEonThisPage" type="integer">260925574</label>
-                       <label index="newPage" type="integer">10918545</label>
-                       <label index="newPage2" type="integer">107510865</label>
-                       <label index="noAccess" type="integer">101501626</label>
-                       <label index="noAccess_msg" type="integer">75856839</label>
-                       <label index="undoLastChange" type="integer">109787245</label>
-                       <label index="recordHistory" type="integer">38913415</label>
-                       <label index="tt_board_subject" type="integer">209228523</label>
-                       <label index="tt_board_author" type="integer">173111111</label>
-                       <label index="tt_board_date" type="integer">71780721</label>
-                       <label index="tt_board_age" type="integer">165204693</label>
-                       <label index="tt_board_RE" type="integer">182416032</label>
-                       <label index="m_function_0" type="integer">114319247</label>
-                       <label index="m_function_1" type="integer">23640109</label>
-                       <label index="m_function_2" type="integer">60853806</label>
-                       <label index="m_tt_board_0" type="integer">267360715</label>
-                       <label index="m_tt_board_expand" type="integer">224753595</label>
-                       <label index="m_tt_address_0" type="integer">99410510</label>
-                       <label index="m_tt_address_1" type="integer">244323618</label>
-                       <label index="m_tt_address_2" type="integer">16616904</label>
-                       <label index="m_tt_links_1" type="integer">20515061</label>
-                       <label index="m_tt_links_2" type="integer">23258562</label>
-                       <label index="m_tt_calender_date" type="integer">71780721</label>
-                       <label index="m_tt_calender_date_ext" type="integer">248953831</label>
-                       <label index="m_tt_calender_todo" type="integer">197754386</label>
-                       <label index="m_tt_calender_todo_ext" type="integer">104661576</label>
-                       <label index="m_tt_calender_ext" type="integer">253974415</label>
-                       <label index="m_tt_products_ext" type="integer">253974415</label>
-                       <label index="m_default" type="integer">128029197</label>
-                       <label index="clickAPage_header" type="integer">150819539</label>
-                       <label index="clickAPage_content" type="integer">187457778</label>
-                       <label index="pI_crUser" type="integer">210659966</label>
-                       <label index="pI_crDate" type="integer">188440759</label>
-                       <label index="pI_lastChange" type="integer">48593502</label>
-                       <label index="pI_lastChangeContent" type="integer">239918564</label>
-                       <label index="pI_hitsTotal" type="integer">203132422</label>
-                       <label index="pI_hitsPeriod" type="integer">248983029</label>
-                       <label index="pI_hits24hours" type="integer">104044646</label>
-                       <label index="pI_hits10days" type="integer">192341173</label>
-               </languageKey>
                <languageKey index="dk" type="array">
                        <label index="title" type="integer">73079758</label>
                        <label index="advancedFunctions" type="integer">155530193</label>
index 36ad445..5ed405f 100755 (executable)
@@ -9,17 +9,17 @@
        </meta>
        <data type="array">
                <languageKey index="default" type="array">
-                       <label index="sel1">Please select which kind of page content you wish to create:</label>
-                       <label index="sel2">Now, click at the position where you wish to place the element on the page:</label>
+                       <label index="sel1">Please select the type of page content you wish to create:</label>
+                       <label index="sel2">Now, click the position where you wish to place the element on the page:</label>
                        <label index="common">Typical page content</label>
                        <label index="common_1_title">Regular text element</label>
                        <label index="common_1_description">A regular text element with header and bodytext fields.</label>
                        <label index="common_2_title">Text with image below</label>
-                       <label index="common_2_description">Regular text element with a field which can contain any number of images which are positioned below the text.</label>
+                       <label index="common_2_description">A regular text element which can contain any number of images positioned below the text</label>
                        <label index="common_3_title">Text with image to the right</label>
-                       <label index="common_3_description">Like above but with the images placed to the right of the text with the text wrapping around the images.</label>
+                       <label index="common_3_description">As above but with text wrapped around a right aligned image.</label>
                        <label index="common_4_title">Images only</label>
-                       <label index="common_4_description">Any number of images aligned in columns and rows with caption. Like the image options above but without text.</label>
+                       <label index="common_4_description">Any number of images aligned in columns and rows with a caption.</label>
                        <label index="common_5_title">Bullet list</label>
                        <label index="common_5_description">A single bullet list.</label>
                        <label index="common_6_title">Table</label>
                        <label index="special_4_description">With this element you can insert raw HTML code on the page.</label>
                        <label index="forms">Form elements</label>
                        <label index="forms_1_title">Mail form</label>
-                       <label index="forms_1_description">A response mail form by which users of the website can submit responses.</label>
+                       <label index="forms_1_description">A mail form allowing website users to submit responses.</label>
                        <label index="forms_2_title">Search form</label>
                        <label index="forms_2_description">Draws a search form and the searchresult if a search is performed.</label>
                        <label index="forms_3_title">Login form</label>
-                       <label index="forms_3_description">Login/logout form for website users. This is used to password protect pages. You must create website users and groups for this to work.</label>
+                       <label index="forms_3_description">Login/logout form used to password protect pages allowing only authorised website users and groups access.</label>
                        <label index="plugins">Plugins</label>
                        <label index="plugins_1_title">General Plugin</label>
-                       <label index="plugins_1_description">If you want to insert a plugin which cannot be found among the options below, just select this element type and you can select your specific plugin in a selector box afterward.</label>
+                       <label index="plugins_1_description">Select this element type to insert a plugin which cannot be found amongst the options below.</label>
                </languageKey>
                <languageKey index="dk" type="array">
                        <label index="sel1">Vælg hvilken slags sideindhold du ønsker at oprette:</label>
                </languageKey>
        </data>
        <orig_hash type="array">
-               <languageKey index="default" type="array">
-                       <label index="sel1" type="integer">257792844</label>
-                       <label index="sel2" type="integer">2777796</label>
-                       <label index="common" type="integer">57063941</label>
-                       <label index="common_1_title" type="integer">134955826</label>
-                       <label index="common_1_description" type="integer">29135748</label>
-                       <label index="common_2_title" type="integer">153490096</label>
-                       <label index="common_2_description" type="integer">215746919</label>
-                       <label index="common_3_title" type="integer">13066984</label>
-                       <label index="common_3_description" type="integer">57201809</label>
-                       <label index="common_4_title" type="integer">62677049</label>
-                       <label index="common_4_description" type="integer">233905425</label>
-                       <label index="common_5_title" type="integer">88917113</label>
-                       <label index="common_5_description" type="integer">136121208</label>
-                       <label index="common_6_title" type="integer">85738935</label>
-                       <label index="common_6_description" type="integer">145590635</label>
-                       <label index="special" type="integer">183531399</label>
-                       <label index="special_1_title" type="integer">23062602</label>
-                       <label index="special_1_description" type="integer">154390211</label>
-                       <label index="special_2_title" type="integer">49638223</label>
-                       <label index="special_2_description" type="integer">87627445</label>
-                       <label index="special_3_title" type="integer">92355808</label>
-                       <label index="special_3_description" type="integer">36006628</label>
-                       <label index="special_4_title" type="integer">238583373</label>
-                       <label index="special_4_description" type="integer">92097111</label>
-                       <label index="forms" type="integer">14172094</label>
-                       <label index="forms_1_title" type="integer">173513512</label>
-                       <label index="forms_1_description" type="integer">149875491</label>
-                       <label index="forms_2_title" type="integer">184654558</label>
-                       <label index="forms_2_description" type="integer">71325784</label>
-                       <label index="forms_3_title" type="integer">149378624</label>
-                       <label index="forms_3_description" type="integer">64416876</label>
-                       <label index="plugins" type="integer">196313238</label>
-                       <label index="plugins_1_title" type="integer">188310073</label>
-                       <label index="plugins_1_description" type="integer">4113831</label>
-               </languageKey>
                <languageKey index="dk" type="array">
                        <label index="sel1" type="integer">257792844</label>
                        <label index="sel2" type="integer">2777796</label>
                <languageKey index="vn" type="array">
                </languageKey>
        </orig_hash>
-       <orig_text type="array">
-               <languageKey index="default" type="array">
-               </languageKey>
-               <languageKey index="dk" type="array">
-               </languageKey>
-               <languageKey index="de" type="array">
-               </languageKey>
-               <languageKey index="no" type="array">
-               </languageKey>
-               <languageKey index="it" type="array">
-               </languageKey>
-               <languageKey index="fr" type="array">
-               </languageKey>
-               <languageKey index="es" type="array">
-               </languageKey>
-               <languageKey index="nl" type="array">
-               </languageKey>
-               <languageKey index="cz" type="array">
-               </languageKey>
-               <languageKey index="pl" type="array">
-               </languageKey>
-               <languageKey index="si" type="array">
-               </languageKey>
-               <languageKey index="fi" type="array">
-               </languageKey>
-               <languageKey index="tr" type="array">
-               </languageKey>
-               <languageKey index="se" type="array">
-               </languageKey>
-               <languageKey index="pt" type="array">
-               </languageKey>
-               <languageKey index="ru" type="array">
-               </languageKey>
-               <languageKey index="ro" type="array">
-               </languageKey>
-               <languageKey index="ch" type="array">
-               </languageKey>
-               <languageKey index="sk" type="array">
-               </languageKey>
-               <languageKey index="lt" type="array">
-               </languageKey>
-               <languageKey index="is" type="array">
-               </languageKey>
-               <languageKey index="hr" type="array">
-               </languageKey>
-               <languageKey index="hu" type="array">
-               </languageKey>
-               <languageKey index="gl" type="array">
-               </languageKey>
-               <languageKey index="th" type="array">
-               </languageKey>
-               <languageKey index="gr" type="array">
-               </languageKey>
-               <languageKey index="hk" type="array">
-               </languageKey>
-               <languageKey index="eu" type="array">
-               </languageKey>
-               <languageKey index="bg" type="array">
-               </languageKey>
-               <languageKey index="br" type="array">
-               </languageKey>
-               <languageKey index="et" type="array">
-               </languageKey>
-               <languageKey index="ar" type="array">
-               </languageKey>
-               <languageKey index="he" type="array">
-               </languageKey>
-               <languageKey index="ua" type="array">
-               </languageKey>
-               <languageKey index="lv" type="array">
-               </languageKey>
-               <languageKey index="jp" type="array">
-               </languageKey>
-               <languageKey index="vn" type="array">
-               </languageKey>
-       </orig_text>
 </T3locallang>
\ No newline at end of file
index 7a2c3ef..199519e 100755 (executable)
@@ -10,7 +10,7 @@
        <data type="array">
                <languageKey index="default" type="array">
                        <label index="mlang_labels_tablabel">Page content</label>
-                       <label index="mlang_labels_tabdescr">This module allows you to create and edit webpages. It provides a Quick-Editor for instant access to the primary page content. In addition you can manage different languages and columns of content per page. Finally you may access special page content like guestbook, board and shopping items. The module also presents pagehit statistics for the individual pages.</label>
+                       <label index="mlang_labels_tabdescr">This module allows you to create and edit webpages, view page hit statistics, manage different languages and columns of content per page and access special page contents like guesbooks and shopping items.</label>
                        <label index="mlang_tabs_tab">Page</label>
                </languageKey>
                <languageKey index="dk" type="array">
                </languageKey>
        </data>
        <orig_hash type="array">
-               <languageKey index="default" type="array">
-                       <label index="mlang_labels_tablabel" type="integer">73079758</label>
-                       <label index="mlang_labels_tabdescr" type="integer">229943848</label>
-                       <label index="mlang_tabs_tab" type="integer">26464201</label>
-               </languageKey>
                <languageKey index="dk" type="array">
                        <label index="mlang_labels_tablabel" type="integer">73079758</label>
                        <label index="mlang_labels_tabdescr" type="integer">229943848</label>
                <languageKey index="vn" type="array">
                </languageKey>
        </orig_hash>
-       <orig_text type="array">
-               <languageKey index="default" type="array">
-               </languageKey>
-               <languageKey index="dk" type="array">
-               </languageKey>
-               <languageKey index="de" type="array">
-               </languageKey>
-               <languageKey index="no" type="array">
-               </languageKey>
-               <languageKey index="it" type="array">
-               </languageKey>
-               <languageKey index="fr" type="array">
-               </languageKey>
-               <languageKey index="es" type="array">
-               </languageKey>
-               <languageKey index="nl" type="array">
-               </languageKey>
-               <languageKey index="cz" type="array">
-               </languageKey>
-               <languageKey index="pl" type="array">
-               </languageKey>
-               <languageKey index="si" type="array">
-               </languageKey>
-               <languageKey index="fi" type="array">
-               </languageKey>
-               <languageKey index="tr" type="array">
-               </languageKey>
-               <languageKey index="se" type="array">
-               </languageKey>
-               <languageKey index="pt" type="array">
-               </languageKey>
-               <languageKey index="ru" type="array">
-               </languageKey>
-               <languageKey index="ro" type="array">
-               </languageKey>
-               <languageKey index="ch" type="array">
-               </languageKey>
-               <languageKey index="sk" type="array">
-               </languageKey>
-               <languageKey index="lt" type="array">
-               </languageKey>
-               <languageKey index="is" type="array">
-               </languageKey>
-               <languageKey index="hr" type="array">
-               </languageKey>
-               <languageKey index="hu" type="array">
-               </languageKey>
-               <languageKey index="gl" type="array">
-               </languageKey>
-               <languageKey index="th" type="array">
-               </languageKey>
-               <languageKey index="gr" type="array">
-               </languageKey>
-               <languageKey index="hk" type="array">
-               </languageKey>
-               <languageKey index="eu" type="array">
-               </languageKey>
-               <languageKey index="bg" type="array">
-               </languageKey>
-               <languageKey index="br" type="array">
-               </languageKey>
-               <languageKey index="et" type="array">
-               </languageKey>
-               <languageKey index="ar" type="array">
-               </languageKey>
-               <languageKey index="he" type="array">
-               </languageKey>
-               <languageKey index="ua" type="array">
-               </languageKey>
-               <languageKey index="lv" type="array">
-               </languageKey>
-               <languageKey index="jp" type="array">
-               </languageKey>
-               <languageKey index="vn" type="array">
-               </languageKey>
-       </orig_text>
 </T3locallang>
\ No newline at end of file
index c58ad44..0a6cabe 100755 (executable)
@@ -13,7 +13,7 @@
        <data type="array">
                <languageKey index="default" type="array">
                        <label index="pagetree_overview.alttitle">Pagetree Overview</label>
-                       <label index="pagetree_overview.description">The Pagetree Overview shows information related to pages for a branch of the page tree. This includes record counts, page settings like alias, start- and stop-times, cache settings etc.</label>
+                       <label index="pagetree_overview.description">The Pagetree Overview shows information related to pages for a branch of the page tree. This includes start- and stop-times, cache settings etc.</label>
                        <label index="_pagetree_overview.seeAlso">_MOD_web_info:func_0,
 _MOD_web_info:func_1,
 _MOD_web_info:func_2,
@@ -33,19 +33,18 @@ _MOD_web_info:pagetree_overview</label>
                        <label index="_func_0.image">EXT:cms/cshimages/pagetree_overview_4.png,
 EXT:cms/cshimages/pagetree_overview_8.png,
 EXT:cms/cshimages/pagetree_overview_9.png</label>
-                       <label index="func_0.image_descr">The Basic Settings view. Notice how this offers a very convenient overview of page aliases, start times and access restriction settings in the tree branch.
-If you click an edit-icon in the header you will be able to edit that field (here the &quot;Access&quot; field) for all listed pages.
-This is how batch-editing looks like; Only one field per record!</label>
+                       <label index="func_0.image_descr">The Basic Settings view offers a very convenient overview of page aliases, start times and access restriction settings in the tree branch.
+If you click an edit-icon in the header you will be able to edit that field for all listed pages.</label>
                        <label index="func_1.alttitle">Record Overview</label>
                        <label index="func_1.description">Record overview gives you an indispensable overview of the distribution of records in the page tree. Each database table in the system is represented with a column and for each page you can see the number of records from that table located on the page.</label>
-                       <label index="func_1.details">&lt;b&gt;Notice:&lt;/b&gt; Be careful with the level-setting. Setting for instance &quot;3 levels&quot; might make the module respond very slowly if there are many pages and many records in the database as well!
+                       <label index="func_1.details">&lt;b&gt;Notice:&lt;/b&gt; Be careful with the level-setting. A high level-setting may cause the module to respond very slowly if there are many pages and many records in the database as well!
 
 &lt;b&gt;Tree stop?&lt;/b&gt;
 Notice the red &quot;+&quot; next to a page in the page tree? This is due to a setting for that page record which means that the page tree will not expand for this page. Typically this is set for protection when there are a large amount of subpages underneath (hundreds of pages typically). If you click the icon/title the overview will jump to make this page the new root of the overview.</label>
                        <label index="_func_1.seeAlso">_MOD_web_info:pagetree_overview,
 pages:php_tree_stop</label>
                        <label index="_func_1.image">EXT:cms/cshimages/pagetree_overview_6.png</label>
-                       <label index="func_1.image_descr">Notice how you can easily see the distribution of Content Elements on a page. You can also see where Template Records - and basically any record! - are located in the page tree!</label>
+                       <label index="func_1.image_descr">You can easily see the distribution of Content Elements on a page. You can also see where Template Records - and basically any record! - are located in the page tree!</label>
                        <label index="func_2.alttitle">Cache and Age</label>
                        <label index="func_2.description">Displays a selection of fields from page records related to page caching and time settings.</label>
                        <label index="_func_2.seeAlso">_MOD_web_info:func_0,
@@ -70,10 +69,10 @@ This is an overview of the meaning of each view mode:
 This shows page hits/sessions for each page.
 
 &lt;b&gt;Total hits&lt;/b&gt;
-This will show statistics only for pages that has a Template Record (with Root-flag set) on it. This means that page hits are shown as totals for a whole website.
+This will show statistics for only pages that have a Template Record (with Root-flag set) on it. This means that page hits are shown as totals for a whole website.
 
 &lt;b&gt;Hits in main sections&lt;/b&gt;
-Will show the total number of page hits/sessions within main sections of a website. A &quot;main section&quot; is all subpages to a page on the first level of a website (defined by a Template Record with the Root flag set).</label>
+Will show the total number of page hits/sessions within main sections of a website. A &quot;main section&quot; is all subpages to a page on the first level of a website (defined by a Template Record with the Root flag set)</label>
                        <label index="_func_hits.image">EXT:cms/cshimages/pagetree_overview_2.png</label>
                        <label index="lang.alttitle">Localization overview</label>
                        <label index="lang.description">Gives an overview of which pages in the page tree are translated to the system languages installed.</label>
index 05e4e22..a1ae999 100755 (executable)
@@ -13,8 +13,8 @@
        <data type="array">
                <languageKey index="default" type="array">
                        <label index=".alttitle">Web &gt; Page Module</label>
-                       <label index=".description">The page module is the primary module for all basic CMS operations you need to perform when you maintain the content on a website.</label>
-                       <label index=".details">The Web&gt;Page module is activated from the backend menu. After selecting the module you will see the page tree and to edit content on a page you simply click the title of that page and in the right frame you will see the content of the page displayed by the Page module.
+                       <label index=".description">The page module is activated from the backend menu and is the primary module for all basic CMS operations you need to perform when maintaining website content.</label>
+                       <label index=".details">Selecting the module will display the page tree.  Click the title of the page you wish to edit content on, and in the right frame you will see the content of the page displayed by the Page module.
 
 The page module has various modes of display of content;
 
index 14e8a4d..9f3a8b6 100755 (executable)
 
 
   // Includes this class since it is used for parsing HTML
-require_once (PATH_t3lib."class.t3lib_parsehtml.php");
+require_once(PATH_t3lib."class.t3lib_parsehtml.php");
 
+       // Object TypoScript library included:
+if(t3lib_extMgm::isLoaded('obts')) {
+       require_once(t3lib_extMgm::extPath('obts').'_tsobject/_tso.php');
+}
 
 
 
@@ -453,93 +457,100 @@ class tslib_cObj {
                                        $content.=$this->cObjGetSingle($name,$conf,$key);
                                $GLOBALS['TT']->decStackPointer();
                        } else {
-                               switch($name)   {
-                                       case 'COBJ_ARRAY':
-                                       case 'COA':
-                                               $content.=$this->COBJ_ARRAY($conf);
-                                       break;
-                                       case 'COA_INT':
-                                               $content.=$this->COBJ_ARRAY($conf,'INT');
-                                       break;
-                                       case 'HTML':
-                                               $content.=$this->HTML($conf);
-                                       break;
-                                       case 'TEXT':
-                                               $content.=$this->TEXT($conf);
-                                       break;
-                                       case 'CLEARGIF':
-                                               $content.=$this->CLEARGIF($conf);
-                                       break;
-                                       case 'FILE':
-                                               $content.=$this->FILE($conf);
-                                       break;
-                                       case 'IMAGE':
-                                               $content.=$this->IMAGE($conf);
-                                       break;
-                                       case 'IMG_RESOURCE':
-                                               $content.=$this->IMG_RESOURCE($conf);
-                                       break;
-                                       case 'IMGTEXT':
-                                               $content.=$this->IMGTEXT($conf);
-                                       break;
-                                       case 'CONTENT':
-                                               $content.=$this->CONTENT($conf);
-                                       break;
-                                       case 'RECORDS':
-                                               $content.=$this->RECORDS($conf);
-                                       break;
-                                       case 'HMENU':
-                                               $content.=$this->HMENU($conf);
-                                       break;
-                                       case 'CTABLE':
-                                               $content.=$this->CTABLE($conf);
-                                       break;
-                                       case 'OTABLE':
-                                               $content.=$this->OTABLE($conf);
-                                       break;
-                                       case 'COLUMNS':
-                                               $content.=$this->COLUMNS($conf);
-                                       break;
-                                       case 'HRULER':
-                                               $content.=$this->HRULER($conf);
-                                       break;
-                                       case 'CASE':
-                                               $content.=$this->CASEFUNC($conf);
-                                       break;
-                                       case 'LOAD_REGISTER':
-                                       case 'RESTORE_REGISTER':
-                                               $this->LOAD_REGISTER($conf,$name);
-                                       break;
-                                       case 'FORM':
-                                               $content.=$this->FORM($conf);
-                                       break;
-                                       case 'SEARCHRESULT':
-                                               $content.=$this->SEARCHRESULT($conf);
-                                       break;
-                                       case 'PHP_SCRIPT':
-                                               $content.=$this->PHP_SCRIPT($conf);
-                                       break;
-                                       case 'PHP_SCRIPT_EXT':
-                                               $content.=$this->PHP_SCRIPT($conf,'EXT');
-                                       break;
-                                       case 'PHP_SCRIPT_INT':
-                                               $content.=$this->PHP_SCRIPT($conf,'INT');
-                                       break;
-                                       case 'USER':
-                                               $content.=$this->USER($conf);
-                                       break;
-                                       case 'USER_INT':
-                                               $content.=$this->USER($conf,'INT');
-                                       break;
-                                       case 'TEMPLATE':
-                                               $content.=$this->TEMPLATE($conf);
-                                       break;
-                                       case 'EDITPANEL':
-                                               if ($GLOBALS['TSFE']->beUserLogin)      {$content.=$this->editPanel($content, $conf);}
-                                       break;
-                                       case 'MULTIMEDIA':
-                                               $content.=$this->MULTIMEDIA($conf);
-                                       break;
+
+                                       // Object TypoScript hook:
+                               if(t3lib_extMgm::isLoaded('obts') && isset($GLOBALS['OBTS']['tso_list'][$name])) {
+                                       $content.= obts_dtutil::renderDatatypeContent($name, $GLOBALS['OBTS']['tso_list'][$name], $conf, $this);
+                               } else {
+                                               // Traditional Content Object branching:
+                                       switch($name)   {
+                                               case 'COBJ_ARRAY':
+                                               case 'COA':
+                                                       $content.=$this->COBJ_ARRAY($conf);
+                                               break;
+                                               case 'COA_INT':
+                                                       $content.=$this->COBJ_ARRAY($conf,'INT');
+                                               break;
+                                               case 'HTML':
+                                                       $content.=$this->HTML($conf);
+                                               break;
+                                               case 'TEXT':
+                                                       $content.=$this->TEXT($conf);
+                                               break;
+                                               case 'CLEARGIF':
+                                                       $content.=$this->CLEARGIF($conf);
+                                               break;
+                                               case 'FILE':
+                                                       $content.=$this->FILE($conf);
+                                               break;
+                                               case 'IMAGE':
+                                                       $content.=$this->IMAGE($conf);
+                                               break;
+                                               case 'IMG_RESOURCE':
+                                                       $content.=$this->IMG_RESOURCE($conf);
+                                               break;
+                                               case 'IMGTEXT':
+                                                       $content.=$this->IMGTEXT($conf);
+                                               break;
+                                               case 'CONTENT':
+                                                       $content.=$this->CONTENT($conf);
+                                               break;
+                                               case 'RECORDS':
+                                                       $content.=$this->RECORDS($conf);
+                                               break;
+                                               case 'HMENU':
+                                                       $content.=$this->HMENU($conf);
+                                               break;
+                                               case 'CTABLE':
+                                                       $content.=$this->CTABLE($conf);
+                                               break;
+                                               case 'OTABLE':
+                                                       $content.=$this->OTABLE($conf);
+                                               break;
+                                               case 'COLUMNS':
+                                                       $content.=$this->COLUMNS($conf);
+                                               break;
+                                               case 'HRULER':
+                                                       $content.=$this->HRULER($conf);
+                                               break;
+                                               case 'CASE':
+                                                       $content.=$this->CASEFUNC($conf);
+                                               break;
+                                               case 'LOAD_REGISTER':
+                                               case 'RESTORE_REGISTER':
+                                                       $this->LOAD_REGISTER($conf,$name);
+                                               break;
+                                               case 'FORM':
+                                                       $content.=$this->FORM($conf);
+                                               break;
+                                               case 'SEARCHRESULT':
+                                                       $content.=$this->SEARCHRESULT($conf);
+                                               break;
+                                               case 'PHP_SCRIPT':
+                                                       $content.=$this->PHP_SCRIPT($conf);
+                                               break;
+                                               case 'PHP_SCRIPT_EXT':
+                                                       $content.=$this->PHP_SCRIPT($conf,'EXT');
+                                               break;
+                                               case 'PHP_SCRIPT_INT':
+                                                       $content.=$this->PHP_SCRIPT($conf,'INT');
+                                               break;
+                                               case 'USER':
+                                                       $content.=$this->USER($conf);
+                                               break;
+                                               case 'USER_INT':
+                                                       $content.=$this->USER($conf,'INT');
+                                               break;
+                                               case 'TEMPLATE':
+                                                       $content.=$this->TEMPLATE($conf);
+                                               break;
+                                               case 'EDITPANEL':
+                                                       if ($GLOBALS['TSFE']->beUserLogin)      {$content.=$this->editPanel($content, $conf);}
+                                               break;
+                                               case 'MULTIMEDIA':
+                                                       $content.=$this->MULTIMEDIA($conf);
+                                               break;
+                                       }
                                }
                        }
                        if ($GLOBALS['TT']->LR) $GLOBALS['TT']->pull($content);
@@ -1639,7 +1650,7 @@ class tslib_cObj {
 
                                                $rows=trim($fParts[2]) ? t3lib_div::intInRange($fParts[2],1,30) : 5;
                                                $wrap=trim($fParts[3]) ? ' wrap="'.trim($fParts[3]).'"' : ' wrap="virtual"';
-                                               $default = $this->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], trim($parts[2]));
+                                               $default = $this->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], str_replace('\n',chr(10),trim($parts[2])));
                                                $fieldCode=sprintf('<textarea name="%s"'.$elementIdAttribute.' cols="%s" rows="%s"%s'.$addParams.'>%s</textarea>',
                                                        $confData['fieldname'], $cols, $rows, $wrap, t3lib_div::formatForTextarea($default));
                                        break;
@@ -1890,7 +1901,7 @@ class tslib_cObj {
 
                        // location data:
                if ($conf['locationData'])      {
-                       if ($conf['locationData']=='HTTP_POST_VARS' && isset($GLOBALS['HTTP_POST_VARS']['locationData']))       {
+                       if ($conf['locationData']=='HTTP_POST_VARS' && isset($_POST['locationData']))   {
                                $locationData = t3lib_div::_POST('locationData');
                        } else {
                                $locationData = $GLOBALS['TSFE']->id.':'.$this->currentRecord;  // locationData is [hte page id]:[tablename]:[uid of record]. Indicates on which page the record (from tablename with uid) is shown. Used to check access.
@@ -2439,7 +2450,7 @@ class tslib_cObj {
         * @access private
         */
        function getFieldDefaultValue($noValueInsert, $fieldName, $defaultVal) {
-               if (!$GLOBALS['TSFE']->no_cache || (!isset($GLOBALS['HTTP_POST_VARS'][$fieldName]) && !isset($GLOBALS['HTTP_GET_VARS'][$fieldName])) || $noValueInsert) {
+               if (!$GLOBALS['TSFE']->no_cache || (!isset($_POST[$fieldName]) && !isset($_GET[$fieldName])) || $noValueInsert) {
                        return $defaultVal;
                } else {
                        return t3lib_div::_GP($fieldName);
@@ -3434,12 +3445,17 @@ class tslib_cObj {
                $options = explode('|',$options);
                $chars = intval($options[0]);
                $afterstring = trim($options[1]);
+               $crop2space = trim($options[2]);
                if ($chars)     {
                        if (strlen($content)>abs($chars))       {
                                if ($chars<0)   {
-                                       $content = $afterstring.$GLOBALS['TSFE']->csConvObj->substr($GLOBALS['TSFE']->renderCharset,$content,$chars);
+                                       $content = $GLOBALS['TSFE']->csConvObj->substr($GLOBALS['TSFE']->renderCharset,$content,$chars);
+                                       $trunc_at = strpos($content, ' ');
+                                       $content = ($trunc_at&&$crop2space) ? $afterstring.substr($content,$trunc_at) : $afterstring.$content;
                                } else {
-                                       $content = $GLOBALS['TSFE']->csConvObj->substr($GLOBALS['TSFE']->renderCharset,$content,0,$chars).$afterstring;
+                                       $content = $GLOBALS['TSFE']->csConvObj->substr($GLOBALS['TSFE']->renderCharset,$content,0,$chars);
+                                       $trunc_at = strrpos($content, ' ');
+                                       $content = ($trunc_at&&$crop2space) ? substr($content, 0, $trunc_at).$afterstring : $content.$afterstring;
                                }
                        }
                }
@@ -4853,12 +4869,15 @@ class tslib_cObj {
 
                                        // Detects if a file is found in site-root (or is a 'virtual' simulateStaticDocument file!) and if so it will be treated like a normal file.
                                list($rootFileDat) = explode('?',rawurldecode($link_param));
+                               $containsSlash = strstr($rootFileDat,'/');
                                $rFD_fI = pathinfo($rootFileDat);
-                               if (trim($rootFileDat) && !strstr($link_param,'/') && (@is_file(PATH_site.$rootFileDat) || t3lib_div::inList('php,html,htm',strtolower($rFD_fI['extension'])))) {
-                                       $isLocalFile=1;
+                               if (trim($rootFileDat) && !$containsSlash && (@is_file(PATH_site.$rootFileDat) || t3lib_div::inList('php,html,htm',strtolower($rFD_fI['extension']))))  {
+                                       $isLocalFile = 1;
+                               } elseif ($containsSlash)       {
+                                       $isLocalFile = 2;               // Adding this so realurl directories are linked right (non-existing).
                                }
 
-                               if($pU['scheme'] || (!$isLocalFile && $urlChar && (!$fileChar || $urlChar<$fileChar)))  {       // url (external): If doubleSlash or if a '.' comes before a '/'.
+                               if($pU['scheme'] || ($isLocalFile!=1 && $urlChar && (!$containsSlash || $urlChar<$fileChar)))   {       // url (external): If doubleSlash or if a '.' comes before a '/'.
                                        $target = isset($conf['extTarget']) ? $conf['extTarget'] : $GLOBALS['TSFE']->extTarget;
                                        if ($conf['extTarget.'])        {$target = $this->stdWrap($target, $conf['extTarget.']);}
                                        if ($forceTarget)       {$target=$forceTarget;}
@@ -4873,7 +4892,7 @@ class tslib_cObj {
                                        $finalTagParts['url']=$this->lastTypoLinkUrl;
                                        $finalTagParts['targetParams'] = $target ? ' target="'.$target.'"' : '';
                                        $finalTagParts['TYPE']='url';
-                               } elseif ($fileChar || $isLocalFile)    {       // file (internal)
+                               } elseif ($containsSlash || $isLocalFile)       {       // file (internal)
                                        $splitLinkParam = explode('?', $link_param);
                                        if (@file_exists(rawurldecode($splitLinkParam[0])) || $isLocalFile)     {
                                                if ($linktxt=='') $linktxt = rawurldecode($link_param);
@@ -6471,6 +6490,7 @@ class tslib_cObj {
                                        $tceforms->helpTextFontTag='<font face="verdana,sans-serif" color="#333333" size="1">';
 
                                        $trData = t3lib_div::makeInstance('t3lib_transferData');
+                                       $trData->addRawData = TRUE;
                                        $trData->defVals = t3lib_div::_GP('defVals');           // Added without testing - should provide ability to submit default values in frontend editing, in-page.
                                        $trData->fetchRecord($table,    ($theCmd=='new'?$newUid:$dataArr['uid']), ($theCmd=='new'?'new':'') );
                                        reset($trData->regTableItems_data);
index 2bc861d..4aee0cc 100755 (executable)
                if (t3lib_div::_GP('FE_SESSION_KEY'))   {
                        $fe_sParts = explode('-',t3lib_div::_GP('FE_SESSION_KEY'));
                        if (!strcmp(md5($fe_sParts[0].'/'.$this->TYPO3_CONF_VARS['SYS']['encryptionKey']), $fe_sParts[1]))      {       // If the session key hash check is OK:
-                               $GLOBALS['HTTP_COOKIE_VARS'][$this->fe_user->name]=$fe_sParts[0];
+                               $_COOKIE[$this->fe_user->name]=$fe_sParts[0];
                                $this->fe_user->forceSetCookie=1;
                        }
                }
                $this->siteScript = t3lib_div::getIndpEnv('TYPO3_SITE_SCRIPT');
 
                        // Resolving of "simulateStaticDocuments" URLs:
-               if ($this->siteScript && substr($this->siteScript,0,9)!='index.php')    {               // If there has been a redirect (basically; we arrived here otherwise than via "index.php" in the URL) this can happend either due to a CGI-script or because of reWrite rule. Earlier we used $GLOBALS['HTTP_SERVER_VARS']['REDIRECT_URL'] to check but
+               if ($this->siteScript && substr($this->siteScript,0,9)!='index.php')    {               // If there has been a redirect (basically; we arrived here otherwise than via "index.php" in the URL) this can happend either due to a CGI-script or because of reWrite rule. Earlier we used $_SERVER['REDIRECT_URL'] to check but
                        $uParts = parse_url($this->siteScript); // Parse the path:
                        $fI = t3lib_div::split_fileref($uParts['path']);
 
                $GLOBALS['TT']->pull();
 
                if ($this->pageNotFound && $this->TYPO3_CONF_VARS['FE']['pageNotFound_handling'])       {
-                       $this->pageNotFoundHandler();
+                       $pNotFoundMsg = array(
+                               1 => 'ID was not an accessible page',
+                               2 => 'Subsection was found and not accessible',
+                               3 => 'ID was outside the domain',
+                       );
+                       $this->pageNotFoundAndExit($pNotFoundMsg[$this->pageNotFound]);
                }
 
                        // set no_cache if set
                                // If still no page...
                        if (!count($this->page))        {
                                if ($this->TYPO3_CONF_VARS['FE']['pageNotFound_handling'])      {
-                                       $this->pageNotFoundHandler();
+                                       $this->pageNotFoundAndExit('The requested page does not exist!');
                                } else {
                                        $this->printError('The requested page does not exist!');
                                        exit;
        }
 
        /**
-        * Merging values into the global $HTTP_GET_VARS/$_GET
+        * Merging values into the global $_GET
         *
         * @param       array           Array of key/value pairs that will be merged into the current GET-vars. (Non-escaped values)
         * @return      void
         * @return      string          'email' if a formmail has been send, 'fe_tce' if front-end data submission (like forums, guestbooks) is send. '' if none.
         */
        function checkDataSubmission()  {
-               global $HTTP_POST_VARS;
-
-               if ($HTTP_POST_VARS['formtype_db'] || $HTTP_POST_VARS['formtype_mail']) {
+               if ($_POST['formtype_db'] || $_POST['formtype_mail'])   {
                        $refInfo = parse_url(t3lib_div::getIndpEnv('HTTP_REFERER'));
                        if (t3lib_div::getIndpEnv('TYPO3_HOST_ONLY')==$refInfo['host'] || $this->TYPO3_CONF_VARS['SYS']['doNotCheckReferer'])   {
-                               if ($this->locDataCheck($HTTP_POST_VARS['locationData']))       {
+                               if ($this->locDataCheck($_POST['locationData']))        {
                                        $ret = '';
-                                       if ($HTTP_POST_VARS['formtype_mail'])   {
+                                       if ($_POST['formtype_mail'])    {
                                                $ret = 'email';
-                                       } elseif ($HTTP_POST_VARS['formtype_db'] && is_array($HTTP_POST_VARS['data']))  {
+                                       } elseif ($_POST['formtype_db'] && is_array($_POST['data']))    {
                                                $ret = 'fe_tce';
                                        }
                                        $GLOBALS['TT']->setTSlogMessage('"Check Data Submission": Return value: '.$ret,0);
        /**
         * Checks if a formmail submission can be sent as email
         *
-        * @param       string          The input from $GLOBALS['HTTP_POST_VARS']['locationData']
+        * @param       string          The input from $_POST['locationData']
         * @return      void
         * @access private
         * @see checkDataSubmission()
index a2ee5d6..3bf50fa 100755 (executable)
@@ -410,7 +410,13 @@ function linkTo_UnCryptMailto(s)   {       //
                        $_attr = '';
                }
                $GLOBALS['TSFE']->content.='<html'.($_attr ? ' '.$_attr : '').'>
-<head>
+<head>';
+                       // Setting charset meta tag:
+               $GLOBALS['TSFE']->content.='
+       <meta http-equiv="Content-Type" content="text/html; charset='.$theCharset.'" />';
+
+$GLOBALS['TSFE']->content.='
+
 <!-- '.($customContent?$customContent.chr(10):'').'
        This website is brought to you by TYPO3 - get.content.right
        TYPO3 is a free open source Content Management Framework created by Kasper Skaarhoj and licensed under GNU/GPL.
@@ -599,8 +605,6 @@ function linkTo_UnCryptMailto(s)    {       //
                $GLOBALS['TSFE']->content.='
        <title>'.htmlspecialchars($titleTagContent).'</title>';
                $GLOBALS['TSFE']->content.='
-       <meta http-equiv="Content-Type" content="text/html; charset='.$theCharset.'" />';
-               $GLOBALS['TSFE']->content.='
        <meta name="generator" content="TYPO3 3.6 CMS" />';
 
                $conf=$GLOBALS['TSFE']->pSetup['meta.'];
index 80ac6e7..ce30e35 100755 (executable)
@@ -226,7 +226,7 @@ class tslib_search {
         * @param       string          Special chars which are deleted if the append the searchword (+-., is default)
         * @return      mixed           Returns an ARRAY if there were search words, othervise the return value may be unset.
         */
-       function split($origSword, $specchars='+-', $delchars='+-.,')   {
+       function split($origSword, $specchars='+-', $delchars='+.,-')   {
                $sword = $origSword;
                $specs = '['.$this->quotemeta($specchars).']';
                $delchars = '['.$this->quotemeta($delchars).']';
index 13f4849..d266761 100755 (executable)
@@ -55,7 +55,7 @@ error_reporting (E_ALL ^ E_NOTICE);
 $TYPO3_MISC['microtime_start'] = microtime();
 define('TYPO3_OS', stristr(PHP_OS,'win')&&!stristr(PHP_OS,'darwin')?'WIN':'');
 define('TYPO3_MODE','FE');
-define('PATH_thisScript',str_replace('//','/', str_replace('\\','/', (php_sapi_name()=='cgi'||php_sapi_name()=='isapi' ||php_sapi_name()=='cgi-fcgi')&&($HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']?$HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']:$HTTP_SERVER_VARS['PATH_TRANSLATED'])? ($HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']?$HTTP_SERVER_VARS['ORIG_PATH_TRANSLATED']:$HTTP_SERVER_VARS['PATH_TRANSLATED']):($HTTP_SERVER_VARS['ORIG_SCRIPT_FILENAME']?$HTTP_SERVER_VARS['ORIG_SCRIPT_FILENAME']:$HTTP_SERVER_VARS['SCRIPT_FILENAME']))));
+define('PATH_thisScript',str_replace('//','/', str_replace('\\','/', (php_sapi_name()=='cgi'||php_sapi_name()=='isapi' ||php_sapi_name()=='cgi-fcgi')&&($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED'])? ($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED']):($_SERVER['ORIG_SCRIPT_FILENAME']?$_SERVER['ORIG_SCRIPT_FILENAME']:$_SERVER['SCRIPT_FILENAME']))));
 
 define('PATH_site', dirname(PATH_thisScript).'/');
 define('PATH_t3lib', PATH_site.'t3lib/');
@@ -115,15 +115,15 @@ $TT->pull();
 // *******************************
 // Checking environment
 // *******************************
-if (t3lib_div::int_from_ver(phpversion())<4000006)     die ('TYPO3 runs with PHP4.0.6+ only');
+if (t3lib_div::int_from_ver(phpversion())<4100000)     die ('TYPO3 runs with PHP4.1.0+ only');
 
-if (isset($HTTP_POST_VARS['GLOBALS']) || isset($HTTP_GET_VARS['GLOBALS']))     die('You cannot set the GLOBALS-array from outside the script.');
+if (isset($_POST['GLOBALS']) || isset($_GET['GLOBALS']))       die('You cannot set the GLOBALS-array from outside the script.');
 if (!get_magic_quotes_gpc())   {
        $TT->push('Add slashes to GET/POST arrays','');
-       t3lib_div::addSlashesOnArray($HTTP_GET_VARS);
-       t3lib_div::addSlashesOnArray($HTTP_POST_VARS);
-       $_GET = $HTTP_GET_VARS;
-       $_POST = $HTTP_POST_VARS;
+       t3lib_div::addSlashesOnArray($_GET);
+       t3lib_div::addSlashesOnArray($_POST);
+       $HTTP_GET_VARS = $_GET;
+       $HTTP_POST_VARS = $_POST;
        $TT->pull();
 }
 
@@ -165,7 +165,7 @@ $TT->pull();
 // BE_USER
 // *********
 $BE_USER='';
-if ($HTTP_COOKIE_VARS['be_typo_user']) {               // If the backend cookie is set, we proceed and checks if a backend user is logged in.
+if ($_COOKIE['be_typo_user']) {                // If the backend cookie is set, we proceed and checks if a backend user is logged in.
        $TYPO3_MISC['microtime_BE_USER_start'] = microtime();
        $TT->push('Back End user initialized','');
                require_once (PATH_t3lib.'class.t3lib_befunc.php');
index 92d3db5..a9939fb 100755 (executable)
@@ -251,11 +251,6 @@ class user_feAdmin {
                $fe=t3lib_div::_GP('FE');
                $this->dataArr = $fe[$this->theTable];  // Incoming data.
 
-/*
-               debug($GLOBALS['HTTP_POST_VARS']);
-               debug($GLOBALS['HTTP_GET_VARS']);
-               debug($GLOBALS['HTTP_POST_FILES']);
-*/
                        // Checking template file and table value
                if (!$this->templateCode)       {
                        $content = 'No template file found: '.$this->conf['templateFile'];
@@ -506,7 +501,7 @@ class user_feAdmin  {
         * @see parseValues()
         */
        function processFiles($cmdParts,$theField)      {
-//debug($GLOBALS['HTTP_POST_FILES']);
+//debug($_FILES);
                        // First, make an array with the filename and file reference, whether the file is just uploaded or a preview
                $filesArr = array();
 
@@ -520,11 +515,11 @@ class user_feAdmin        {
                                        'tmp_name'=>PATH_site.'typo3temp/'.$valParts[0]
                                );
                        }
-               } elseif (is_array($GLOBALS['HTTP_POST_FILES']['FE'][$this->theTable][$theField]['name']))      {       // Files from upload
-                       reset($GLOBALS['HTTP_POST_FILES']['FE'][$this->theTable][$theField]['name']);
-                       while(list($kk,$vv)=each($GLOBALS['HTTP_POST_FILES']['FE'][$this->theTable][$theField]['name']))        {
+               } elseif (is_array($_FILES['FE'][$this->theTable][$theField]['name']))  {       // Files from upload
+                       reset($_FILES['FE'][$this->theTable][$theField]['name']);
+                       while(list($kk,$vv)=each($_FILES['FE'][$this->theTable][$theField]['name']))    {
                                if ($vv)        {
-                                       $tmpFile = t3lib_div::upload_to_tempfile($GLOBALS['HTTP_POST_FILES']['FE'][$this->theTable][$theField]['tmp_name'][$kk]);
+                                       $tmpFile = t3lib_div::upload_to_tempfile($_FILES['FE'][$this->theTable][$theField]['tmp_name'][$kk]);
                                        if ($tmpFile)   {
                                                $this->unlinkTempFiles[]=$tmpFile;
                                                $filesArr[] = array (
@@ -534,11 +529,11 @@ class user_feAdmin        {
                                        }
                                }
                        }
-               } elseif (is_array($GLOBALS['HTTP_POST_FILES']['FE']['name'][$this->theTable][$theField]))      {       // Files from upload
-                       reset($GLOBALS['HTTP_POST_FILES']['FE']['name'][$this->theTable][$theField]);
-                       while(list($kk,$vv)=each($GLOBALS['HTTP_POST_FILES']['FE']['name'][$this->theTable][$theField]))        {
+               } elseif (is_array($_FILES['FE']['name'][$this->theTable][$theField]))  {       // Files from upload
+                       reset($_FILES['FE']['name'][$this->theTable][$theField]);
+                       while(list($kk,$vv)=each($_FILES['FE']['name'][$this->theTable][$theField]))    {
                                if ($vv)        {
-                                       $tmpFile = t3lib_div::upload_to_tempfile($GLOBALS['HTTP_POST_FILES']['FE']['tmp_name'][$this->theTable][$theField][$kk]);
+                                       $tmpFile = t3lib_div::upload_to_tempfile($_FILES['FE']['tmp_name'][$this->theTable][$theField][$kk]);
                                        if ($tmpFile)   {
                                                $this->unlinkTempFiles[]=$tmpFile;
                                                $filesArr[] = array (