* Merged changes from TYPO3_3-8 branch back
authorMichael Stucki <michael.stucki@typo3.org>
Sun, 19 Jun 2005 22:48:50 +0000 (22:48 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Sun, 19 Jun 2005 22:48:50 +0000 (22:48 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@766 709f56b5-9817-0410-a4d7-c38de5d9e867

23 files changed:
ChangeLog
t3lib/class.t3lib_befunc.php
t3lib/class.t3lib_cs.php
t3lib/class.t3lib_db.php
t3lib/class.t3lib_div.php
t3lib/class.t3lib_install.php
t3lib/class.t3lib_parsehtml.php
t3lib/class.t3lib_querygenerator.php
t3lib/class.t3lib_tsfebeuserauth.php
t3lib/class.t3lib_userauth.php
t3lib/config_default.php
t3lib/thumbs.php
typo3/index.php
typo3/mod/tools/em/index.php
typo3/sysext/cms/layout/class.tx_cms_layout.php
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_menu.php
typo3/sysext/indexed_search/ChangeLog
typo3/sysext/indexed_search/mod/index.php
typo3/sysext/indexed_search/modfunc1/class.tx_indexedsearch_modfunc1.php
typo3/sysext/install/mod/class.tx_install.php

index b36b4b1..5e2e15d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,72 @@
+2005-06-20  Michael Stucki  <michael@typo3.org>
+
+       * Merged changes from TYPO3_3-8 branch back
+
 2005-06-06 Andreas Otto <andreas.otto@dkd.de>
 
        * t3lib/class.t3lib_userauth.php: Implemented two hooks in the logoff() method. One hook for doing operations __before__ logoff() destroys the current session and one hook for doing operations __after__ the session was destroyed.
 
+2005-05-29  Michael Stucki  <michael@typo3.org>
+
+       * typo3/sysext/cms/tslib/class.tslib_content.php: Fixed a bug with the "addQueryString" property in typolinks
+       * typo3/mod/tools/em/index.php: Extension manager didn't allow to edit *.xml files
+
+2005-05-23  Rupert Germann  <rupi@gmx.li>
+
+       * Fix: Reversed the effect of the new parameter "config.disableImgBorderAttr". Now it does what the name says.
+
+2005-05-23  Michael Stucki  <michael@typo3.org>
+
+       * Release of TYPO3 3.8.0
+       * Fixed bug #0000840: Login URL feature attracts users to transfer password in cleartext
+
+2005-05-22  Karsten Dambekalns  <karsten@typo3.org>
+
+       * t3lib/class.t3lib_querygenerator.php: Fixed broken database search, originally caused by DBAL changes.
+
+2005-05-22  Kasper Skårhøj,,,  <kasper@typo3.com>
+
+       * Added loginscreen image and colorscheme, upgraded version number.
+
+2005-05-21  Bernhard Kraft  <kraftb@kraftb.at>
+
+       * Fixed bug #0000975: Make the thumbnail-size of filelinks chooseable
+
+2005-05-20  Michael Stucki  <michael@typo3.org>
+
+       * Fixed bug #0000459: undefined function: float() in class.t3lib_cs.php
+       * New feature #0000850: Store last built query independent of t3lib_db->debugOutput. Thanks to Rainer Kuhn.
+
+2005-05-19  Michael Stucki  <michael@typo3.org>
+
+       * Small fix in typo3/sysext/install/mod/class.tx_install.php: GraphicsMagick executed without any parameters caused a server error (used in the Install Tool for guessing the product version)
+       * Fixed bug #0001065: Labels of radio buttons in listview were not shown. Thanks to Sebastian Kurfuerst.
+       * Changed innerWrap and outerWrap in editPanels to be stdWrap'able. Thanks to Martin Kutschker.
+       * Fixed bug #0000098: Forms elements should not contain a wrap-attribute for textareas, so this is now optional. Thanks to Martin Kutschker.
+       * Fixed bug #0001075: XHTML compliance of FORM elements. Thanks to Martin Kutschker.
+       * Fixed bug #0001061: XHTML cleaning did not support the <param /> tag. Thanks to Martin Kutschker.
+
+2005-05-19  Karsten Dambekalns  <karsten@typo3.org>
+
+       * typo3/sysext/install/mod/class.tx_install.php: Added a button to generate a random encryption key.
+       * typo3/sysext/cms/layout/db_layout.php: Fix for bug #1042. Thanks to Sebastian Kurfuerst and Michael Stucki.
+         Additionally removed some unused variables/globalisations
+       * typo3/mod/tools/em/index.php: Applied patch for bug #1043 (ereg calls without escaped curly braces)
+       * t3lib/class.t3lib_install.php: Fix for bug #987 (hardcoded MyISAM table type)
+
+2005-05-17  Michael Stucki  <michael@typo3.org>
+
+       * Minor fix in t3lib/config_default.php: pageNotFoundOnCHashError used "false" instead of "0" as the default value
+
+2005-05-16  Michael Stucki  <michael@typo3.org>
+
+       * Fixed wrong display of empty tags in class.tx_cms_layout.php
+       * Fixed missing email address label if none specified in class.tslib_content.php
+       * Fixed missing replacement of "@" in spamProtectEmailAddresses mode in class.tslib_content.php
+
 2005-05-14  Michael Stucki  <michael@typo3.org>
 
+       * Release of TYPO3 3.8.0rc1
        * Fixed a bug in the context-sensitive menu (right-click on 2nd level like "more options..." didn't work). Thanks to Wolfgang Klinger.
 
 2005-05-14  Rupert Germann  <rupi@gmx.li>
@@ -19,7 +82,7 @@
 
 2005-05-11  Michael Scharkow  <mscharkow@gmx.net>
 
-       * Fixed bug #0000930: The delete button in QuickEdit mode lead to a 404 message. Thanks to Sebastian Kurfürst.
+       * Fixed bug #0000930: The delete button in QuickEdit mode lead to a 404 message. Thanks to Sebastian Kurfuerst.
 
 2005-05-09  Kasper Skårhøj,,,  <kasper@typo3.com>
 
 2005-04-28  Rupert Germann  <rupi@gmx.li>
 
        * Fixed bug #0000416: now the wrong default values in autoincrement lines will be removed from .sql files before they are written to the database. This fixes the problem that tables were not created under MySQL 4.1.x
-       * Fixed bug #0000955: Removed a double strcmp in class.t3lib_install
+       * Fixed bug #0000955: Removed a double strcmp in class.t3lib_install.php
        * Removed the mysql-version ckeck from class.tx_install.php. With current MySQL versions this is not needed anymore.
        * New features for the pi_base pagebrowser: first and last links, "floating" of the displayed pages, all wraps are now configurable, all hardcoded HTML can be substituted with own wraps, and many more.
          The behaviour of the pagebrowser doesn't change if the additional "internal"-array-elements don't exist.
          This array has to be set from an extension which passes its TS-config to the pagebrowser function. See comments in function for details.
          Thank goes to Michael H.E. Roth for developing most of the changes.
-       * Fixed bug #0000911: setting ['BE']['lockIP'] to a value < 4 does not log out the BEuser anymore.
+       * Fixed bug #0000911: setting ['BE']['lockIP'] to a value < 4 does not log out the BE user anymore.
        * Fixed bug #0000570: now it is prevented that umlauts or other special characters are inserted as "accessKey".
 
 2005-04-28  Christian Jul Jensen  <julle(at)typo3(dot)org>
 2005-04-04  Robert Lemke  <robert@typo3.org>
 
        * Added a preliminary way for moving containers in a flexform section in TCEforms + TCEmain. Before you could only delete containers.
-       * Added Sebastian Kurfürst's collapsable modules feature for the backend's module bar
+       * Added Sebastian Kurfuerst's collapsable modules feature for the backend's module bar
 
 2005-04-04  Kasper Skårhøj,,,  <kasper@typo3.com>
 
index 32c4925..881c928 100755 (executable)
@@ -1802,6 +1802,7 @@ class t3lib_BEfunc        {
                        switch((string)$theColConf['type'])     {
                                case 'radio':
                                        $l=t3lib_BEfunc::getLabelFromItemlist($table,$col,$value);
+                                       $l=$GLOBALS['LANG']->sL($l);
                                break;
                                case 'select':
                                        if ($theColConf['MM'])  {
index 1353853..66d1243 100755 (executable)
@@ -1499,7 +1499,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($string,'utf-8');
                        } else {
index ba32daa..16a5f30 100755 (executable)
@@ -134,8 +134,9 @@ class t3lib_DB {
 
 
                // Debug:
-       var $debugOutput = FALSE;                       // Set "TRUE" if you want database errors outputted.
+       var $debugOutput = FALSE;               // Set "TRUE" if you want database errors outputted.
        var $debug_lastBuiltQuery = '';         // Internally: Set to last built query (not necessarily executed...)
+       var $store_lastBuiltQuery = FALSE;      // Set "TRUE" if you want the last built query to be stored in $debug_lastBuiltQuery independent of $this->debugOutput
 
                // Default link identifier:
        var $link;
@@ -351,7 +352,7 @@ class t3lib_DB {
                                )';
 
                                // Return query:
-                       if ($this->debugOutput) $this->debug_lastBuiltQuery = $query;
+                       if ($this->debugOutput || $this->store_lastBuiltQuery) $this->debug_lastBuiltQuery = $query;
                        return $query;
                }
        }
@@ -388,7 +389,7 @@ class t3lib_DB {
                                                '.$where : '');
 
                                        // Return query:
-                               if ($this->debugOutput) $this->debug_lastBuiltQuery = $query;
+                               if ($this->debugOutput || $this->store_lastBuiltQuery) $this->debug_lastBuiltQuery = $query;
                                return $query;
                        }
                } else {
@@ -414,7 +415,7 @@ class t3lib_DB {
                                WHERE
                                        '.$where : '');
 
-                       if ($this->debugOutput) $this->debug_lastBuiltQuery = $query;
+                       if ($this->debugOutput || $this->store_lastBuiltQuery) $this->debug_lastBuiltQuery = $query;
                        return $query;
                } else {
                        die('<strong>TYPO3 Fatal Error:</strong> "Where" clause argument for DELETE query was not a string in $this->DELETEquery() !');
@@ -461,7 +462,7 @@ class t3lib_DB {
                }
 
                        // Return query:
-               if ($this->debugOutput) $this->debug_lastBuiltQuery = $query;
+               if ($this->debugOutput || $this->store_lastBuiltQuery) $this->debug_lastBuiltQuery = $query;
                return $query;
        }
 
index ed5cdd8..cc2c69e 100755 (executable)
@@ -2709,7 +2709,7 @@ class t3lib_div {
                                        } else break;
                                }
                                $commonEnd=strrev(implode('/',$acc));
-                               if (strcmp($commonEnd,''))              $DR = substr($SFN,0,-(strlen($commonEnd)+1));
+                               if (strcmp($commonEnd,''))      { $DR = substr($SFN,0,-(strlen($commonEnd)+1)); }
                                return $DR;
                        break;
                        case 'TYPO3_HOST_ONLY':
index bee5a1c..a877cc1 100755 (executable)
@@ -286,6 +286,8 @@ class t3lib_install {
                                        }
                                } else {
                                        if (substr($value,0,1)==')' && substr($value,-1)==';')  {
+                                               preg_match('/(ENGINE|TYPE)=([a-zA-Z]*)/',$value,$ttype);
+                                               $total[$isTable]['extra']['ttype'] = $ttype[2];
                                                $isTable = '';
                                        } else {
                                                $lineV = ereg_replace(',$','',$value);
@@ -293,7 +295,7 @@ class t3lib_install {
 
                                                        // Make sure there is no default value when auto_increment is set
                                                if(stristr($parts[1],'auto_increment')) {
-                                                       $parts[1] = eregi_replace(' default \'0\'','',$parts[1]);
+                                                       $parts[1] = preg_replace('/ default \'0\'/i','',$parts[1]);
                                                }
                                                        // "default" is always lower-case
                                                if(strstr($parts[1], ' DEFAULT '))      {
@@ -542,7 +544,8 @@ class t3lib_install {
                                                        list($count) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
                                                        $statements['tables_count'][md5($statement)] = $count?'Records in table: '.$count:'';
                                                } else {
-                                                       $statement = 'CREATE TABLE '.$table." (\n".implode(",\n",$whole_table)."\n) TYPE=MyISAM;";
+                                                       $statement = 'CREATE TABLE '.$table." (\n".implode(",\n",$whole_table)."\n)";
+                                                       $statement .= ($info['extra']['ttype']) ? ' TYPE='.$info['extra']['ttype'].';' : ';';
                                                        $statements['create_table'][md5($statement)]=$statement;
                                                }
                                        }
index 981a844..4f6b8af 100644 (file)
@@ -1275,7 +1275,7 @@ class t3lib_parsehtml {
                                }
                                $newTag='<'.trim($tagName.' '.implode(' ',$outA));
                                        // All tags that are standalone (not wrapping, not having endtags) should be ended with '/>'
-                               if (t3lib_div::inList('img,br,hr,meta,link,base,area,input',$tagName) || substr($value,-2)=='/>')       {
+                               if (t3lib_div::inList('img,br,hr,meta,link,base,area,input,param,col',$tagName) || substr($value,-2)=='/>')     {
                                        $newTag.=' />';
                                } else {
                                        $newTag.='>';
index de5e98d..dc96653 100755 (executable)
@@ -127,14 +127,14 @@ class t3lib_queryGenerator        {
                "0" => "#FIELD# LIKE '%#VALUE#%'",
                "1" => "#FIELD# NOT LIKE '%#VALUE#%'",
                "2" => "#FIELD# LIKE '#VALUE#%'",
-               "3" => "#FIELD# NOT LIKE #VALUE#%",
+               "3" => "#FIELD# NOT LIKE '#VALUE#%'",
                "4" => "#FIELD# LIKE '%#VALUE#'",
                "5" => "#FIELD# NOT LIKE '%#VALUE#'",
-               "6" => "#FIELD# = #VALUE#",
-               "7" => "#FIELD# != #VALUE#",
+               "6" => "#FIELD# = '#VALUE#'",
+               "7" => "#FIELD# != '#VALUE#'",
                        // Type = date,number , offset = 32
-               "32" => "#FIELD# = #VALUE#",
-               "33" => "#FIELD# != #VALUE#",
+               "32" => "#FIELD# = '#VALUE#'",
+               "33" => "#FIELD# != '#VALUE#'",
                "34" => "#FIELD# > #VALUE#",
                "35" => "#FIELD# < #VALUE#",
                "36" => "#FIELD# >= #VALUE# AND #FIELD# <= #VALUE1#",
@@ -772,16 +772,16 @@ class t3lib_queryGenerator        {
         */
        function getQuery ($queryConfig,$pad="") {
                $qs = "";
-               //since wo dont traverse the array using numeric keys in the upcoming whileloop make sure it's fresh and clean
+                       // Since we don't traverse the array using numeric keys in the upcoming whileloop make sure it's fresh and clean
                ksort($queryConfig);
                reset($queryConfig);
                $first=1;
                while(list($key,$conf) = each($queryConfig)) {
-                       switch($conf["type"]) {
-                               case "newlevel":
-                                       $qs.=chr(10).$pad.trim($conf["operator"])." (".$this->getQuery($queryConfig[$key]["nl"],$pad."   ").chr(10).$pad.")";
+                       switch($conf['type']) {
+                               case 'newlevel':
+                                       $qs.=chr(10).$pad.trim($conf['operator']).' ('.$this->getQuery($queryConfig[$key]['nl'],$pad.'   ').chr(10).$pad.')';
                                break;
-                               case "userdef":
+                               case 'userdef':
                                        $qs.=chr(10).$pad.getUserDefQuery($conf,$first);
                                break;
                                default:
@@ -801,14 +801,17 @@ class t3lib_queryGenerator        {
         * @return      [type]          ...
         */
        function getQuerySingle($conf,$first)   {
-               $prefix = $this->enablePrefix ? $this->table."." : "";
-               if (!$first)    {$qs.= trim(($conf["operator"]?$conf["operator"]:"AND"))." ";}          // Is it OK to insert the AND operator if none is set?
-               $qsTmp = str_replace("#FIELD#",$prefix.trim(substr($conf["type"],6)),$this->compSQL[$conf["comparison"]]);
+               $prefix = $this->enablePrefix ? $this->table.'.' : '';
+               if (!$first)    {
+                               // Is it OK to insert the AND operator if none is set?
+                       $qs .= trim(($conf['operator'] ? $conf['operator'] : 'AND')).' ';
+               }
+               $qsTmp = str_replace('#FIELD#', $prefix.trim(substr($conf['type'],6)), $this->compSQL[$conf['comparison']]);
                $inputVal = $this->cleanInputVal($conf);
-               $qsTmp = str_replace("#VALUE#", $GLOBALS['TYPO3_DB']->quoteStr($inputVal, $this->table),$qsTmp);
-               if ($conf["comparison"]==37 || $conf["comparison"]==36) {       // between:
-                       $inputVal = $this->cleanInputVal($conf,"1");
-                       $qsTmp = str_replace("#VALUE1#", $GLOBALS['TYPO3_DB']->quoteStr($inputVal, $this->table),$qsTmp);
+               $qsTmp = str_replace('#VALUE#', $GLOBALS['TYPO3_DB']->quoteStr($inputVal,$this->table), $qsTmp);
+               if ($conf['comparison']==37 || $conf['comparison']==36) {       // between:
+                       $inputVal = $this->cleanInputVal($conf,'1');
+                       $qsTmp = str_replace('#VALUE1#', $GLOBALS['TYPO3_DB']->quoteStr($inputVal,$this->table), $qsTmp);
                }
                $qs .= trim($qsTmp);
                return $qs;
index 05881a2..d1c8c7a 100755 (executable)
@@ -567,20 +567,31 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
                $tmpTSc = $tmpTSc ['properties']['newContentWiz.']['overrideWithExtension'];
                $newContentWizScriptPath = t3lib_extMgm::isLoaded($tmpTSc) ? (t3lib_extMgm::extRelPath($tmpTSc).'mod1/db_new_content_el.php') : (TYPO3_mainDir.'sysext/cms/layout/db_new_content_el.php');
 
+
+               $perms = $GLOBALS['BE_USER']->calcPerms($GLOBALS['TSFE']->page);
+
                $toolBar='';
                $id = $GLOBALS['TSFE']->id;
                $toolBar.='<a href="'.htmlspecialchars(TYPO3_mainDir.'show_rechis.php?element='.rawurlencode('pages:'.$id).'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'#latest">'.
                                        '<img src="t3lib/gfx/history2.gif" width="13" height="12" hspace="2" border="0" align="top" title="'.$this->extGetLL('edit_recordHistory').'" alt="" /></a>';
-               $toolBar.='<a href="'.htmlspecialchars($newContentWizScriptPath.'?id='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
-                                       '<img src="t3lib/gfx/new_record.gif" width="16" height="12" hspace="1" border="0" align="top" title="'.$this->extGetLL('edit_newContentElement').'" alt="" /></a>';
-               $toolBar.='<a href="'.htmlspecialchars(TYPO3_mainDir.'move_el.php?table=pages&uid='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
+
+               if ($perms&16)  {
+                       $toolBar.='<a href="'.htmlspecialchars($newContentWizScriptPath.'?id='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
+                                               '<img src="t3lib/gfx/new_record.gif" width="16" height="12" hspace="1" border="0" align="top" title="'.$this->extGetLL('edit_newContentElement').'" alt="" /></a>';
+               }
+               if ($perms&2)   {
+                       $toolBar.='<a href="'.htmlspecialchars(TYPO3_mainDir.'move_el.php?table=pages&uid='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
                                        '<img src="t3lib/gfx/move_page.gif" width="11" height="12" hspace="2" border="0" align="top" title="'.$this->extGetLL('edit_move_page').'" alt="" /></a>';
-               $toolBar.='<a href="'.htmlspecialchars(TYPO3_mainDir.'db_new.php?id='.$id.'&pagesOnly=1&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
+               }
+               if ($perms&8)   {
+                       $toolBar.='<a href="'.htmlspecialchars(TYPO3_mainDir.'db_new.php?id='.$id.'&pagesOnly=1&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
                                        '<img src="t3lib/gfx/new_page.gif" width="13" height="12" hspace="0" border="0" align="top" title="'.$this->extGetLL('edit_newPage').'" alt="" /></a>';
-
-               $params='&edit[pages]['.$id.']=edit';
-               $toolBar.='<a href="'.htmlspecialchars(TYPO3_mainDir.'alt_doc.php?'.$params.'&noView=1&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
+               }
+               if ($perms&2)   {
+                       $params='&edit[pages]['.$id.']=edit';
+                       $toolBar.='<a href="'.htmlspecialchars(TYPO3_mainDir.'alt_doc.php?'.$params.'&noView=1&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
                                        '<img src="t3lib/gfx/edit2.gif" width="11" height="12" hspace="2" border="0" align="top" title="'.$this->extGetLL('edit_editPageHeader').'" alt="" /></a>';
+               }
                if ($this->check('modules','web_list')) {
                        $toolBar.='<a href="'.htmlspecialchars(TYPO3_mainDir.'db_list.php?id='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
                                        '<img src="t3lib/gfx/list.gif" width="11" height="11" hspace="2" border="0" align="top" title="'.$this->extGetLL('edit_db_list').'" alt="" /></a>';
index d6eac98..07bab80 100755 (executable)
@@ -626,7 +626,7 @@ class t3lib_userAuth {
        function logoff() {
                if ($this->writeDevLog)         t3lib_div::devLog('logoff: ses_id = '.$this->id, 't3lib_userAuth');
 
-                       // Hook for pre-processing the logoff() method requested and implemented by andreas.otto@dkd.de:
+                       // Hook for pre-processing the logoff() method, requested and implemented by andreas.otto@dkd.de:
                if ( is_array( $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_feuserauth.php']['logoff_pre_processing'] ) ) {
                        $_params = array();
                        foreach( $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_feuserauth.php']['logoff_pre_processing'] as $_funcRef ) {
index d4fe4b3..9a9f849 100755 (executable)
@@ -74,7 +74,7 @@ $TYPO3_CONF_VARS = Array(
                'no_pconnect' => 0,                                             // Boolean: If true, "connect" is used instead of "pconnect" when connecting to the database!
                'multiplyDBfieldSize' => 1,                             // Double: 1-5: Amount used to multiply the DB field size when the install tool is evaluating the database size (eg. "2.5"). This is useful if you want to expand the size of fields for utf-8 etc. For western european sites using utf-8 the need should not be for more than twice the normal single-byte size (2) and for chinese / asian languages 3 should suffice.
                'setMemoryLimit' => 0,                                  // Integer, memory_limit in MB: If more than 16, TYPO3 will try to use ini_set() to set the memory limit of PHP to the value. This works only if the function ini_set() is not disabled by your sysadmin.
-               'forceReturnPath' => 0,                                 // Boolean: Force return path in mail() calls. If this is set, all calls to mail() done by t3lib_htmlmail will be called with '-f<return_path> as the 5th parameter. This will make the return-path correct on almost all unix systems. There is a known problem with postfix below version 2: Mails are not sent if this option is set and postfix is used. On windows platforms, the Return-Path is set via a call to ini_set. This has no effect if php safe_mode is on.
+               'forceReturnPath' => 0,                                 // Boolean: Force return path to be applied in mail() calls. If this is set, all calls to mail() done by t3lib_htmlmail will be called with '-f<return_path> as the 5th parameter. This will make the return path correct on almost all Unix systems. There is a known problem with Postfix below version 2: Mails are not sent if this option is set and Postfix is used. On Windows platforms, the return path is set via a call to ini_set. This has no effect if safe_mode in PHP is on.
                'displayErrors' => -1,                                  // Integer, -1,0,1. 0=Do not display any PHP error messages. 1=Display error messages. -1=Default setting. With this option, you can override the PHP setting "display_errors". It is suggested that you set this to "0" and enable the "error_log" option in php.ini instead.
                'serverTimeZone' => 1                                   // Integer, GMT offset of servers time (from time()). Default is "1" which is "GMT+1" (central european time). This value can be used in extensions that are GMT aware and wants to convert times to/from other timezones.
        ),
@@ -175,7 +175,7 @@ $TYPO3_CONF_VARS = Array(
                'compressionDebugInfo' => 0,                    // Boolean. If set, then in the end of the pages, the sizes of the compressed and non-compressed document is output. This should be used ONLY as a test, because the content is compressed twice in order to output this statistics!
                'pageNotFound_handling' => '',                  // How TYPO3 should handle requests for non-existing/accessible pages. false (default): The 'nearest' page is shown. TRUE or '1': An TYPO3 error box is displayed. Strings: redirect URL, eg. 'notfound.html' or 'http://www.domain.org/errors/notfound.html'. If prefixed with "READFILE:" then it will expect the remaining string to be a HTML file which will be read and outputted directly after having the marker "###CURRENT_URL###" substituted with REQUEST_URI and ###REASON### with reason text, for example: "READFILE:fileadmin/notfound.html". Another option is the prefix "USER_FUNCTION:" which will call a user function, eg. "USER_FUNCTION:typo3conf/pageNotFoundHandling.php:user_pageNotFound->pageNotFound" where the file must contain a class "user_pageNotFound" with a method "pageNotFound" inside with two parameters, $param and $ref
                'pageNotFound_handling_statheader' => 'Status: 404 Not Found',                  // If 'pageNotFound_handling' is enabled, this string will always be sent as header before the actual handling.
-               'pageNotFoundOnCHashError' => FALSE,    // Boolean. If true, a page not found call is made when cHash evaluation errors occur. By default they will just disable caching but still display page output.
+               'pageNotFoundOnCHashError' => 0,                // Boolean. If true, a page not found call is made when cHash evaluation errors occur. By default they will just disable caching but still display page output.
                'userFuncClassPrefix' => 'user_',               // This prefix must be the first part of any function or class name called from TypoScript, for instance in the stdWrap function.
                'addRootLineFields' => '',                              // Comma-list of fields from the 'pages'-table. These fields are added to the select query for fields in the rootline.
                'checkFeUserPid' => 1,                                  // Boolean. If set, the pid of fe_user logins must be sent in the form as the field 'pid' and then the user must be located in the pid. If you unset this, you should change the fe_users.username eval-flag 'uniqueInPid' to 'unique' in $TCA. This will do: $TCA['fe_users']['columns']['username']['config']['eval']= 'nospace,lower,required,unique';
@@ -235,7 +235,7 @@ $TYPO3_CONF_VARS = Array(
 $T3_VAR = array();     // Initialize.
 
        // TYPO3 version
-$TYPO_VERSION = '3.8.0-dev';
+$TYPO_VERSION = '3.9-dev';
 define('TYPO3_version', $TYPO_VERSION);
 define('TYPO3_branch', '3.8');
 
index b98e4ca..187d3c4 100755 (executable)
@@ -184,7 +184,7 @@ class SC_t3lib_thumbs {
                                // ... so we passed the extension test meaning that we are going to make a thumbnail here:
                        $this->size = $this->size ? $this->size : $this->sizeDefault;   // default
 
-                               //I added extra check, so that the size input option could not be fooled to pass other values. That means the value is exploded, evaluated to an integer and the imploded to [value]x[value]. Furthermore you can specify: size=340 and it'll be translated to 340x340.
+                               // I added extra check, so that the size input option could not be fooled to pass other values. That means the value is exploded, evaluated to an integer and the imploded to [value]x[value]. Furthermore you can specify: size=340 and it'll be translated to 340x340.
                        $sizeParts = explode('x', $this->size.'x'.$this->size); // explodes the input size (and if no "x" is found this will add size again so it is the same for both dimensions)
                        $sizeParts = array(t3lib_div::intInRange($sizeParts[0],1,1000),t3lib_div::intInRange($sizeParts[1],1,1000));    // Cleaning it up, only two parameters now.
                        $this->size = implode('x',$sizeParts);          // Imploding the cleaned size-value back to the internal variable
index 9114888..b4cd4c3 100755 (executable)
@@ -89,9 +89,9 @@ class SC_index {
                // Internal, GPvars:
        var $redirect_url;                      // GPvar: redirect_url; The URL to redirect to after login.
        var $GPinterface;                       // GPvar: Defines which interface to load (from interface selector)
-       var $u;                                         // GPvar: preset username
-       var $p;                                         // GPvar: preset password
-       var $L;                                         // GPvar: If "L" is "OUT", then any logged in used is logged out. If redirect_url is given, we redirect to it
+       var $u;                                 // GPvar: preset username
+       var $p;                                 // GPvar: preset password
+       var $L;                                 // GPvar: If "L" is "OUT", then any logged in used is logged out. If redirect_url is given, we redirect to it
        var $loginRefresh;                      // Login-refresh boolean; The backend will call this script with this value set when the login is close to being expired and the form needs to be redrawn.
        var $commandLI;                         // Value of forms submit button for login.
 
@@ -123,11 +123,14 @@ class SC_index {
                        // GPvars:
                $this->redirect_url = t3lib_div::_GP('redirect_url');
                $this->GPinterface = t3lib_div::_GP('interface');
-               $this->u = t3lib_div::_GP('u');                                                 // preset username
-               $this->p = t3lib_div::_GP('p');                                                 // preset password
-               $this->L = t3lib_div::_GP('L');                                                 // If "L" is "OUT", then any logged in used is logged out. If redirect_url is given, we redirect to it
-               $this->loginRefresh = t3lib_div::_GP('loginRefresh');           // Login
-               $this->commandLI = t3lib_div::_GP('commandLI');                 // Value of "Login" button. If set, the login button was pressed.
+
+               if(t3lib_div::getIndpEnv('TYPO3_SSL'))  {       // For security reasons this feature only works if SSL is used
+                       $this->u = t3lib_div::_GP('u');         // preset username
+                       $this->p = t3lib_div::_GP('p');         // preset password
+               }
+               $this->L = t3lib_div::_GP('L');                         // If "L" is "OUT", then any logged in used is logged out. If redirect_url is given, we redirect to it
+               $this->loginRefresh = t3lib_div::_GP('loginRefresh');   // Login
+               $this->commandLI = t3lib_div::_GP('commandLI');         // Value of "Login" button. If set, the login button was pressed.
 
                        // sets the level of security from conf vars
                if ($TYPO3_CONF_VARS['BE']['loginSecurityLevel']) {
@@ -603,7 +606,7 @@ class SC_index {
                        }
                } else {        // If no rotation folder configured, print default image:
                        $loginImage = 'loginbox_image_dev.png';
-                       $imagecopy = $loginImage=='loginbox_image_dev.png' ? 'You are running the CVS version of TYPO3 '.$GLOBALS['TYPO_VERSION'] : 'Photo: &copy; 2004-2005 Kasper Sk&#229;rh&#248;j'; // Directly outputted in image attributes...
+                       $imagecopy = $loginImage=='loginbox_image_dev.png' ? 'You are running the CVS version of TYPO3 '.$GLOBALS['TYPO_VERSION'] : 'Photo: &copy; 2005 Kasper Sk&#229;rh&#248;j';      // Directly outputted in image attributes...
                        $loginboxImage = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/'.$loginImage,'width="200" height="133"').' id="loginbox-image" alt="'.$imagecopy.'" title="'.$imagecopy.'" />';
                }
 
index 87e24df..580cff7 100755 (executable)
@@ -293,7 +293,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                );
 
        var $privacyNotice = 'When ever you interact with the online repository, server information is sent and stored in the repository for statistics. No personal information is sent, only identification of this TYPO3 install. If you want know exactly what is sent, look in typo3/mod/tools/em/index.php, function repTransferParams()';
-       var $editTextExtensions = 'html,htm,txt,css,tmpl,inc,php,sql,conf,cnf,pl,pm,sh,ChangeLog';
+       var $editTextExtensions = 'html,htm,txt,css,tmpl,inc,php,sql,conf,cnf,pl,pm,sh,xml,ChangeLog';
        var $nameSpaceExceptions = 'beuser_tracking,design_components,impexp,static_file_edit,cms,freesite,quickhelp,classic_welcome,indexed_search,sys_action,sys_workflows,sys_todos,sys_messages,direct_mail,sys_stat,tt_address,tt_board,tt_calender,tt_guest,tt_links,tt_news,tt_poll,tt_rating,tt_products,setup,taskcenter,tsconfig_help,context_help,sys_note,tstemplate,lowlevel,install,belog,beuser,phpmyadmin,aboutmodules,imagelist,setup,taskcenter,sys_notepad,viewpage';
 
 
@@ -2586,21 +2586,21 @@ EXTENSION KEYS:
                        // ext_tables.php:
                if (@is_file($absPath.'ext_tables.php'))        {
                        $content = t3lib_div::getUrl($absPath.'ext_tables.php');
-                       if (eregi('t3lib_extMgm::addModule',$content))  $infoArray['flags'][] = 'Module';
-                       if (eregi('t3lib_extMgm::insertModuleFunction',$content))       $infoArray['flags'][] = 'Module+';
+                       if (stristr($content,'t3lib_extMgm::addModule'))        $infoArray['flags'][] = 'Module';
+                       if (stristr($content,'t3lib_extMgm::insertModuleFunction'))     $infoArray['flags'][] = 'Module+';
                        if (stristr($content,'t3lib_div::loadTCA'))     $infoArray['flags'][] = 'loadTCA';
                        if (stristr($content,'$TCA['))  $infoArray['flags'][] = 'TCA';
-                       if (eregi('t3lib_extMgm::addPlugin',$content))  $infoArray['flags'][] = 'Plugin';
+                       if (stristr($content,'t3lib_extMgm::addPlugin'))        $infoArray['flags'][] = 'Plugin';
                }
 
                        // ext_localconf.php:
                if (@is_file($absPath.'ext_localconf.php'))     {
                        $content = t3lib_div::getUrl($absPath.'ext_localconf.php');
-                       if (eregi('t3lib_extMgm::addPItoST43',$content))        $infoArray['flags'][]='Plugin/ST43';
-                       if (eregi('t3lib_extMgm::addPageTSConfig',$content))    $infoArray['flags'][]='Page-TSconfig';
-                       if (eregi('t3lib_extMgm::addUserTSConfig',$content))    $infoArray['flags'][]='User-TSconfig';
-                       if (eregi('t3lib_extMgm::addTypoScriptSetup',$content)) $infoArray['flags'][]='TS/Setup';
-                       if (eregi('t3lib_extMgm::addTypoScriptConstants',$content))     $infoArray['flags'][]='TS/Constants';
+                       if (stristr($content,'t3lib_extMgm::addPItoST43'))      $infoArray['flags'][]='Plugin/ST43';
+                       if (stristr($content,'t3lib_extMgm::addPageTSConfig'))  $infoArray['flags'][]='Page-TSconfig';
+                       if (stristr($content,'t3lib_extMgm::addUserTSConfig'))  $infoArray['flags'][]='User-TSconfig';
+                       if (stristr($content,'t3lib_extMgm::addTypoScriptSetup'))       $infoArray['flags'][]='TS/Setup';
+                       if (stristr($content,'t3lib_extMgm::addTypoScriptConstants'))   $infoArray['flags'][]='TS/Constants';
                }
 
                if (@is_file($absPath.'ext_typoscript_constants.txt'))  {
@@ -2668,7 +2668,7 @@ EXTENSION KEYS:
                                        if (filesize($absPath.$fileName)<500*1024)      {
                                                $fContent = t3lib_div::getUrl($absPath.$fileName);
                                                unset($reg);
-                                               if (ereg("\n[[:space:]]*class[[:space:]]*([[:alnum:]_]+)([[:alnum:][:space:]_]*){",$fContent,$reg))     {
+                                               if (preg_match('/\n[[:space:]]*class[[:space:]]*([[:alnum:]_]+)([[:alnum:][:space:]_]*)\{/',$fContent,$reg))    {
 
                                                                // Find classes:
                                                        $classesInFile=array();
@@ -2676,7 +2676,7 @@ EXTENSION KEYS:
                                                        foreach($lines as $k => $l)     {
                                                                $line = trim($l);
                                                                unset($reg);
-                                                               if (ereg('^class[[:space:]]*([[:alnum:]_]+)([[:alnum:][:space:]_]*){',$line,$reg))      {
+                                                               if (preg_match('/^class[[:space:]]*([[:alnum:]_]+)([[:alnum:][:space:]_]*)\{/',$line,$reg))     {
                                                                        $out['classes'][] = $reg[1];
                                                                        $out['files'][$fileName]['classes'][] = $reg[1];
                                                                        if (substr($reg[1],0,3)!='ux_' && !t3lib_div::isFirstPartOfStr($reg[1],$table_class_prefix) && strcmp(substr($table_class_prefix,0,-1),$reg[1]))        {
@@ -2701,11 +2701,11 @@ EXTENSION KEYS:
                                                        $XclassParts = split('if \(defined\([\'"]TYPO3_MODE[\'"]\) && \$TYPO3_CONF_VARS\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]',$fContent,2);
                                                        if (count($XclassParts)==2)     {
                                                                unset($reg);
-                                                               ereg('^\[[\'"]([[:alnum:]_\/\.]*)[\'"]\]',$XclassParts[1],$reg);
+                                                               preg_match('/^\[[\'"]([[:alnum:]_\/\.]*)[\'"]\]/',$XclassParts[1],$reg);
                                                                if ($reg[1]) {
                                                                        $cmpF = 'ext/'.$extKey.'/'.$fileName;
                                                                        if (!strcmp($reg[1],$cmpF))     {
-                                                                               if (ereg('_once[[:space:]]*\(\$TYPO3_CONF_VARS\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]\[[\'"]'.$cmpF.'[\'"]\]\);', $XclassParts[1]))  {
+                                                                               if (preg_match('§_once[[:space:]]*\(\$TYPO3_CONF_VARS\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]\[[\'"]'.$cmpF.'[\'"]\]\);§', $XclassParts[1]))  {
                                                                                         $out['msg'][] = 'XCLASS OK in '.$fileName;
                                                                                } else $out['errors'][] = 'Couldn\'t find the include_once statement for XCLASS!';
                                                                        } else $out['errors'][] = 'The XCLASS filename-key "'.$reg[1].'" was different from "'.$cmpF.'" which it should have been!';
@@ -2735,12 +2735,12 @@ EXTENSION KEYS:
                        $line = trim($l);
 
                        unset($reg);
-                       if (ereg('^define[[:space:]]*\([[:space:]]*["\']TYPO3_MOD_PATH["\'][[:space:]]*,[[:space:]]*["\']([[:alnum:]_\/\.]+)["\'][[:space:]]*\)[[:space:]]*;',$line,$reg))      {
+                       if (preg_match('/^define[[:space:]]*\([[:space:]]*["\']TYPO3_MOD_PATH["\'][[:space:]]*,[[:space:]]*["\']([[:alnum:]_\/\.]+)["\'][[:space:]]*\)[[:space:]]*;/',$line,$reg))      {
                                $confFileInfo['TYPO3_MOD_PATH'] = array($k,$reg);
                        }
 
                        unset($reg);
-                       if (ereg('^\$MCONF\[["\']?name["\']?\][[:space:]]*=[[:space:]]*["\']([[:alnum:]_]+)["\'];',$line,$reg)) {
+                       if (preg_match('/^\$MCONF\[["\']?name["\']?\][[:space:]]*=[[:space:]]*["\']([[:alnum:]_]+)["\'];/',$line,$reg)) {
                                $confFileInfo['MCONF_name'] = array($k,$reg);
                        }
                }
@@ -3043,13 +3043,13 @@ EXTENSION KEYS:
                        $line = trim($l);
 
                        unset($reg);
-                       if (ereg('^define[[:space:]]*\([[:space:]]*["\']TYPO3_MOD_PATH["\'][[:space:]]*,[[:space:]]*["\']([[:alnum:]_\/\.]+)["\'][[:space:]]*\)[[:space:]]*;',$line,$reg))      {
+                       if (preg_match('/^define[[:space:]]*\([[:space:]]*["\']TYPO3_MOD_PATH["\'][[:space:]]*,[[:space:]]*["\']([[:alnum:]_\/\.]+)["\'][[:space:]]*\)[[:space:]]*;/',$line,$reg))      {
                                $lines[$k] = str_replace($reg[0], 'define(\'TYPO3_MOD_PATH\', \''.$this->typeRelPaths[$type].$mP.'\');', $lines[$k]);
                                $flag_M = $k+1;
                        }
 
                        unset($reg);
-                       if (ereg('^\$BACK_PATH[[:space:]]*=[[:space:]]*["\']([[:alnum:]_\/\.]+)["\'][[:space:]]*;',$line,$reg)) {
+                       if (preg_match('/^\$BACK_PATH[[:space:]]*=[[:space:]]*["\']([[:alnum:]_\/\.]+)["\'][[:space:]]*;/',$line,$reg)) {
                                $lines[$k] = str_replace($reg[0], '$BACK_PATH=\''.$this->typeBackPaths[$type].'\';', $lines[$k]);
                                $flag_B = $k+1;
                        }
@@ -3525,7 +3525,7 @@ EXTENSION KEYS:
 
                                                        // Initialize:
                                                $crDirStart = '';
-                                               $dirs_in_path = explode('/',ereg_replace('/$','',$crDir));
+                                               $dirs_in_path = explode('/',preg_replace('/\/$/','',$crDir));
 
                                                        // Traverse each part of the dir path and create it one-by-one:
                                                foreach($dirs_in_path as $dirP) {
@@ -3583,7 +3583,7 @@ EXTENSION KEYS:
                $dbStatus = array();
 
                        // Updating tables and fields?
-               if (in_array('ext_tables.sql',$extInfo['files']))       {
+               if (is_array($extInfo['files']) && in_array('ext_tables.sql',$extInfo['files']))        {
                        $fileContent = t3lib_div::getUrl($this->getExtPath($extKey,$extInfo['type']).'ext_tables.sql');
 
                        $FDfile = $instObj->getFieldDefinitions_sqlContent($fileContent);
@@ -3609,7 +3609,7 @@ EXTENSION KEYS:
                }
 
                        // Importing static tables?
-               if (in_array('ext_tables_static+adt.sql',$extInfo['files']))    {
+               if (is_array($extInfo['files']) && in_array('ext_tables_static+adt.sql',$extInfo['files']))     {
                        $fileContent = t3lib_div::getUrl($this->getExtPath($extKey,$extInfo['type']).'ext_tables_static+adt.sql');
 
                        $statements = $instObj->getStatementArray($fileContent,1);
@@ -3996,7 +3996,7 @@ EXTENSION KEYS:
                $parts = explode(':',$externalData,4);
                $dat = base64_decode($parts[2]);
                        // compare hashes ignoring any leading whitespace (This makes it work for some broken .t3x files that have leading white space. See bug #0000365. Thanks to Martin T. Kutschker <Martin-no5pam-Kutschker@blackbox.n0spam.net>)
-               if (ereg_replace("^[\n\r\t ]+",'',$parts[0])==md5($dat))        {
+               if (preg_replace('/^[\n\r\t ]+/','',$parts[0])==md5($dat))      {
                        if ($parts[1]=='gzcompress')    {
                                if ($this->gzcompress)  {
                                        $dat = gzuncompress($dat);
index 7098a0b..7972660 100755 (executable)
@@ -2545,18 +2545,11 @@ class tx_cms_layout extends recordList {
         * @return      string          Input string with all HTML and PHP tags stripped
         */
        function strip_tags($content, $fillEmptyContent=false)  {
-               if($fillEmptyContent && ereg('><', $content))   {
-                       $matches = explode('</', $content);
-                       foreach($matches as $key=>$val) {
-                               if($key==count($matches)-1)     { continue; }   // skip the last match
-
-                               if(ereg('>$', $val))    {
-                                       $tagContent = ereg_replace('.*<[^ ]* ([^ ]*).*>', '\1', $val);  // Returns the first attribut of a given tag
-                                       $matches[$key] .= $tagContent;
-                               }
-                       }
-                       $content = implode('</', $matches);
+               if($fillEmptyContent && strstr($content, '><')) {
+                       $content = preg_replace('/(<[^ >]* )([^ >]*)([^>]*>)(<\/[^>]*>)/', '$1$2$3$2$4', $content);
                }
+               $content = preg_replace('/<br.?\/?>/', chr(10), $content);
+
                return strip_tags($content);
        }
 }
index 494605f..c025e3e 100755 (executable)
@@ -142,7 +142,6 @@ class ext_posMap extends t3lib_positionMap {
         * @return      string
         */
        function onClickInsertRecord($row,$vv,$moveUid,$pid) {
-               $table='tt_content';
                if (is_array($row))     {
                        $location=$GLOBALS['SOBE']->local_linkThisScript(array('edit_record'=>'tt_content:new/-'.$row['uid'].'/'.$row['colPos']));
                } else {
@@ -229,7 +228,7 @@ class SC_db_layout {
         * @return      void
         */
        function init() {
-               global $BE_USER,$LANG;
+               global $BE_USER;
 
                        // Setting module configuration / page select clause
                $this->MCONF = $GLOBALS['MCONF'];
@@ -615,7 +614,6 @@ class SC_db_layout {
                $closeUrl = $this->local_linkThisScript(array('SET'=>array('function'=>1)));    // Goes to 'Columns' view if close is pressed (default)
 
                if ($BE_USER->uc['condensedMode'])      {
-                       $uParts = parse_url(t3lib_div::getIndpEnv('REQUEST_URI'));
                        $closeUrl=$BACK_PATH.'alt_db_navframe.php';
                }
                if ($this->returnUrl)   {
@@ -898,7 +896,6 @@ class SC_db_layout {
 
                        // Initialize other variables:
                $h_func='';
-               $optionArr=array();
                $tableOutput=array();
                $tableJSOutput=array();
                $CMcounter = 0;
@@ -977,6 +974,7 @@ class SC_db_layout {
                        }
 
                                // Start the dblist object:
+                       $dblist->itemsLimitSingleTable = 1000;
                        $dblist->start($this->id,$table,$this->pointer,$this->search_field,$this->search_levels,$this->showLimit);
                        $dblist->counter = $CMcounter;
                        $dblist->ext_function = $this->MOD_SETTINGS['function'];
index ee1c7b8..d2ed306 100755 (executable)
@@ -31,7 +31,7 @@
  * Revised for TYPO3 3.6 June/2003 by Kasper Skaarhoj
  * XHTML compliant
  *
- * class tslib_cObj                            :               All main TypoScript features, rendering of content objects (cObjects). This class is the backbone of TypoScript Template rendering.
+ * class tslib_cObj                    :               All main TypoScript features, rendering of content objects (cObjects). This class is the backbone of TypoScript Template rendering.
  * class tslib_controlTable            :               Makes a table CTABLE (TS cObject)
  * class tslib_tableOffset             :               Makes a table-offset (TS)
  * class tslib_frameset                        :               Generates framesets (TS)
@@ -1572,6 +1572,12 @@ class tslib_cObj {
                $fieldname_hashArray = Array();
                $cc = 0;
 
+                       // Formname;
+               $formname = $GLOBALS['TSFE']->uniqueHash();
+               if (ctype_digit($formname{0}))  {       // form name must start with a letter
+                       $formname = 'a'.$formname;
+               }
+
                foreach($dataArr as $val)       {
 
                        $cc++;
@@ -1631,7 +1637,7 @@ class tslib_cObj {
 
                                        // Accessibility: Set id = fieldname attribute:
                                if ($conf['accessibility'])     {
-                                       $elementIdAttribute = ' id="'.$confData['fieldname'].'"';
+                                       $elementIdAttribute = ' id="'.$formname.'_'.md5($confData['fieldname']).'"';
                                } else {
                                        $elementIdAttribute = '';
                                }
@@ -1645,7 +1651,12 @@ class tslib_cObj {
                                                $cols = t3lib_div::intInRange($cols*$compWidth, 1, 120);
 
                                                $rows=trim($fParts[2]) ? t3lib_div::intInRange($fParts[2],1,30) : 5;
-                                               $wrap=trim($fParts[3]) ? ' wrap="'.trim($fParts[3]).'"' : ' wrap="virtual"';
+                                               $wrap=trim($fParts[3]);
+                                               if ($conf['noWrapAttr'] || $wrap === 'disabled')        {
+                                                       $wrap='';
+                                               } else {
+                                                       $wrap=$wrap ? ' wrap="'.trim($fParts[3]).'"' : ' wrap="virtual"';
+                                               }
                                                $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));
@@ -1826,7 +1837,7 @@ class tslib_cObj {
                                                // Field:
                                        $fieldLabel = $confData['label'];
                                        if ($conf['accessibility'])     {
-                                               $fieldLabel = '<label for="'.htmlspecialchars($confData['fieldname']).'">'.$fieldLabel.'</label>';
+                                               $fieldLabel = '<label for="'.$formname.'_'.md5($confData['fieldname']).'">'.$fieldLabel.'</label>';
                                        }
 
                                                // Getting template code:
@@ -1930,8 +1941,9 @@ class tslib_cObj {
                        }
                }
 
-                       // Formname;
-               $formname = $GLOBALS['TSFE']->uniqueHash();
+                       // Wrap all hidden fields in a div tag (see http://bugs.typo3.org/view.php?id=678)
+               $hiddenfields = '<div style="display:none;">'.$hiddenfields.'</div>';
+
                if ($conf['REQ'])       {
                        $validateForm=' onsubmit="return validateForm(\''.$formname.'\',\''.implode(',',$fieldlist).'\',\''.rawurlencode($conf['goodMess']).'\',\''.rawurlencode($conf['badMess']).'\',\''.rawurlencode($conf['emailMess']).'\')"';
                        $GLOBALS['TSFE']->additionalHeaderData['JSFormValidate'] = '<script type="text/javascript" src="'.$GLOBALS['TSFE']->absRefPrefix.'t3lib/jsfunc.validateform.js"></script>';
@@ -2503,7 +2515,7 @@ class tslib_cObj {
         * @return      string          the border attribute
         */
        function getBorderAttr($borderAttr) {
-               if (!t3lib_div::inList('xhtml_strict,xhtml_11,xhtml_2',$GLOBALS['TSFE']->config['config']['doctype']) || $GLOBALS['TSFE']->config['config']['disableImgBorderAttr']) {
+               if (!t3lib_div::inList('xhtml_strict,xhtml_11,xhtml_2',$GLOBALS['TSFE']->config['config']['doctype']) || !$GLOBALS['TSFE']->config['config']['disableImgBorderAttr']) {
                        return $borderAttr;
                }
        }
@@ -3032,14 +3044,14 @@ class tslib_cObj {
                                $content=$this->listNum($content,$listNumber,$conf['listNum.']['splitChar']);
                        }
 
-                       if ($conf['trim']){$content=trim($content);}
+                       if ($conf['trim'])      { $content=trim($content); }
 
                                // Call stdWrap recursively
-                       if ($conf['stdWrap']){$content=$this->stdWrap($content,$conf['stdWrap.']);}
+                       if ($conf['stdWrap'])   { $content=$this->stdWrap($content,$conf['stdWrap.']); }
 
                        if (   ($conf['required'] && (string)$content=='') || ($conf['if.'] && !$this->checkIf($conf['if.'])) || ($conf['fieldRequired'] && !trim($this->data[$conf['fieldRequired']]))    ){
                                $content = '';
-                       } else {
+                       } else  {
                                        // Perform data processing:
                                if ($conf['csConv'])    { $content=$GLOBALS['TSFE']->csConv($content,$conf['csConv']); }
                                if ($conf['parseFunc.'] || $conf['parseFunc']) {$content=$this->parseFunc($content,$conf['parseFunc.'],$conf['parseFunc']);}
@@ -3715,7 +3727,9 @@ class tslib_cObj {
                                                $icon = $this->cObjGetSingle($conf['iconCObject'],$conf['iconCObject.'],'iconCObject');
                                        } else {
                                                if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['thumbnails'])   {
-                                                       $icon = 't3lib/thumbs.php?&dummy='.$GLOBALS['EXEC_TIME'].'&file='.rawurlencode('../'.$theFile);
+                                                       $thumbSize = '';
+                                                       if ($conf['icon_thumbSize'] || $conf['icon_thumbSize.'])        { $thumbSize = '&size='.$this->stdWrap($conf['icon_thumbSize'], $conf['icon_thumbSize.']); }
+                                                       $icon = 't3lib/thumbs.php?&dummy='.$GLOBALS['EXEC_TIME'].'&file='.rawurlencode('../'.$theFile).$thumbSize;
                                                } else {
                                                        $icon = 't3lib/gfx/notfound_thumb.gif';
                                                }
@@ -4989,7 +5003,7 @@ class tslib_cObj {
                                                if ($linktxt=='') $linktxt = $page['title'];
 
                                                        // Query Params:
-                                               $addQueryParams = $conf['addQueryString'] ? t3lib_div::getIndpEnv('QUERY_STRING') : '';
+                                               $addQueryParams = $conf['addQueryString'] ? '&'.t3lib_div::getIndpEnv('QUERY_STRING') : '';
                                                $addQueryParams .= trim($this->stdWrap($conf['additionalParams'],$conf['additionalParams.']));
                                                if (substr($addQueryParams,0,1)!='&')           {
                                                        $addQueryParams = '';
@@ -5235,6 +5249,8 @@ class tslib_cObj {
         * @return      string          Returns a numerical array with two elements: 1) $mailToUrl, string ready to be inserted into the href attribute of the <a> tag, b) $linktxt: The string between starting and ending <a> tag.
         */
        function getMailTo($mailAddress,$linktxt,$initP='?') {
+               if(!strcmp($linktxt,''))        { $linktxt = $mailAddress; }
+
                $mailToUrl = 'mailto:'.$mailAddress;
 
                if (!$GLOBALS['TSFE']->config['config']['jumpurl_enable'] || $GLOBALS['TSFE']->config['config']['jumpurl_mailto_disable']) {
@@ -5246,8 +5262,9 @@ class tslib_cObj {
                                }
                                if ($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses_atSubst']) {
                                        $atLabel = trim($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses_atSubst']);
-                                       $linktxt = str_replace('@',$atLabel?$atLabel:'(at)',$linktxt);
                                }
+                               $linktxt = str_replace('@',$atLabel?$atLabel:'(at)',$linktxt);
+
                                if ($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses_lastDotSubst']) {
                                        $lastDotLabel = trim($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses_lastDotSubst']);
                                        $lastDotLabel = $lastDotLabel ? $lastDotLabel : '(dot)';
@@ -6625,10 +6642,12 @@ class tslib_cObj {
                                                                </form>';
                                                // wrap the panel
                                        if ($conf['innerWrap']) $panel = $this->wrap($panel,$conf['innerWrap']);
+                                       if ($conf['innerWrap.']) $panel = $this->stdWrap($panel,$conf['innerWrap.']);
                                                // add black line:
                                        $panel.=$blackLine;
                                                // wrap the complete panel
                                        if ($conf['outerWrap']) $panel = $this->wrap($panel,$conf['outerWrap']);
+                                       if ($conf['outerWrap.']) $panel = $this->stdWrap($panel,$conf['outerWrap.']);
                                        $finalOut = $content.$panel;
                                break;
                        }
@@ -6790,8 +6809,10 @@ class tslib_cObj {
                        $thick = t3lib_div::intInRange($thick,1,100);
                        $color = $conf['color'] ? $conf['color'] : '#cccccc';
                        if ($conf['innerWrap']) $content = $this->wrap($content,$conf['innerWrap']);
+                       if ($conf['innerWrap.'])        $content = $this->stdWrap($content,$conf['innerWrap.']);
                        $content='<table class="typo3-editPanel-previewBorder" border="'.$thick.'" cellpadding="0" cellspacing="0" bordercolor="'.$color.'" width="100%"><tr><td>'.$content.'</td></tr></table>';
                        if ($conf['outerWrap']) $content = $this->wrap($content,$conf['outerWrap']);
+                       if ($conf['outerWrap.'])        $content = $this->stdWrap($panel,$conf['outerWrap.']);
                }
                return $content;
        }
index 3adc256..d22cb37 100755 (executable)
@@ -2866,17 +2866,17 @@ if (version == "n3") {
                                                'tstamp' => $GLOBALS['EXEC_TIME']                                               // Time stamp
                                        );
 
-                                               // Hook for preprocessing the list of fields to insert into sys_stat:
+                                               // Hook for preprocessing the list of fields to insert into sys_stat:
                                        if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['sys_stat-PreProcClass']))    {
                                                foreach($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['sys_stat-PreProcClass'] as $_classRef)    {
-                                                       $_procObj = &t3lib_div::getUserObj($_classRef);
-                                                       $insertFields = $_procObj->sysstat_preProcessFields($insertFields,$this);
+                                                       $_procObj = &t3lib_div::getUserObj($_classRef);
+                                                       $insertFields = $_procObj->sysstat_preProcessFields($insertFields,$this);
                                                }
                                        }
 
 
                                        $GLOBALS['TT']->push('Store SQL');
-                                               $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_stat', $insertFields);
+                                       $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_stat', $insertFields);
                                        $GLOBALS['TT']->pull();
                                }
 
@@ -3449,8 +3449,8 @@ if (version == "n3") {
         * @return      void
         */
        function make_seed() {
-           list($usec, $sec) = explode(' ', microtime());
-           $seedV = (float)$sec + ((float)$usec * 100000);
+               list($usec, $sec) = explode(' ', microtime());
+               $seedV = (float)$sec + ((float)$usec * 100000);
                srand($seedV);
        }
 
index e40650b..a0ea2ae 100755 (executable)
@@ -1415,7 +1415,7 @@ class tslib_menu {
         * Returns the title for the navigation
         *
         * @param       string          The current page title
-        * @param       string          The current value of the naviation title
+        * @param       string          The current value of the navigation title
         * @return      string          Returns the navigation title if it is NOT blank, otherwise the page title.
         * @access private
         */
index ce44422..43d6a34 100755 (executable)
@@ -1,3 +1,7 @@
+2005-05-15  Michael Stucki  <michael@typo3.org>
+
+       * Removed some debug output in backend module
+
 2005-05-12  Michael Stucki  <michael@typo3.org>
 
        * Added class tags to three elements for optionally styling/hiding them with CSS
index ec167f6..0cad838 100755 (executable)
@@ -121,8 +121,8 @@ class SC_mod_tools_isearch_index {
 
                $indexer = t3lib_div::makeInstance('tx_indexedsearch_indexer');
                $indexer->initializeExternalParsers();
-               debug(array_keys($indexer->external_parsers));
-               debug($indexer->internal_log);
+               #debug(array_keys($indexer->external_parsers));
+               #debug($indexer->internal_log);
        }
 
        /**
index 3296ef7..cad4fa5 100755 (executable)
@@ -1323,7 +1323,7 @@ class tx_indexedsearch_modfunc1 extends t3lib_extobjbase {
                                                                        $theContent.= $r[$v].' ';
                                                                }
                                                        }
-debug($theContent,$theTitle);
+#debug($theContent,$theTitle);
                                                        $indexerObj->backend_indexAsTYPO3Page(
                                                                        $theTitle,
                                                                        '',
@@ -1336,7 +1336,7 @@ debug($theContent,$theTitle);
                                                                );
 
                                                }
-debug($recs);
+#debug($recs);
                                        }
                                break;
                                case 2:
@@ -1344,14 +1344,14 @@ debug($recs);
                                        if (!t3lib_div::isAbsPath($readPath))   {
                                                $readpath = t3lib_div::getFileAbsFileName($readpath);
                                        }
-debug($readpath,'$readpath');
+#debug($readpath,'$readpath');
 
                                        if (t3lib_div::isAllowedAbsPath($readpath))     {
                                                $extList = implode(',',t3lib_div::trimExplode(',',$cfgRow['extensions'],1));
                                                $fileArr = array();
                                                $files = t3lib_div::getAllFilesAndFoldersInPath($fileArr,$readpath,$extList,0,$cfgRow['depth']);
                                                $files = t3lib_div::removePrefixPathFromList($files,PATH_site);
-debug($files);
+#debug($files);
                                                foreach($files as $path)        {
                                                                // (Re)-Indexing file on page.
                                                        $indexerObj = &t3lib_div::makeInstance('tx_indexedsearch_indexer');
@@ -1361,9 +1361,9 @@ debug($files);
 
                                                        $indexerObj->indexRegularDocument($path, TRUE);
 
-debug($indexerObj->internal_log,$resultRow['data_filename']);
-debug($indexerObj->file_phash_arr,'file_phash_arr');
-debug($indexerObj->hash,'hash');
+#debug($indexerObj->internal_log,$resultRow['data_filename']);
+#debug($indexerObj->file_phash_arr,'file_phash_arr');
+#debug($indexerObj->hash,'hash');
 
                                                }
                                        }
index 5fe856e..f1a7c70 100755 (executable)
@@ -1880,7 +1880,8 @@ From sub-directory:
 
                if($file=='gm') {
                        $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'] = 'gm';
-                       $file = 'identify';     // Work-around, preventing execution of "gm gm"
+                       $file = 'identify';             // Work-around, preventing execution of "gm gm"
+                       $parameters = '-version';       // Work-around - GM doesn't like to be executed without any arguments
                } else  {
                        $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'] = '1';
 
@@ -1889,7 +1890,7 @@ From sub-directory:
                        }
                }
 
-               $cmd = t3lib_div::imageMagickCommand($file, '', $path);
+               $cmd = t3lib_div::imageMagickCommand($file, $parameters, $path);
                exec($cmd, $retVal);
                $string = $retVal[0];
                list(,$ver) = explode('Magick', $string);
@@ -1974,7 +1975,7 @@ From sub-directory:
                                        // Database:
                                $out='
                                <table border=0 cellpadding=0 cellspacing=0>
-                               <form action="'.$this->action.'" method="POST">';
+                               <form name="setupGeneral" action="'.$this->action.'" method="POST">';
 
                                $out.=$this->wrapInCells("Username:", '<input type="text" name="TYPO3_INSTALL[localconf.php][typo_db_username]" value="'.htmlspecialchars(TYPO3_db_username?TYPO3_db_username:($this->config_array["sql.safe_mode_user"]?$this->config_array["sql.safe_mode_user"]:"")).'">'.($this->config_array["sql.safe_mode_user"]?"<BR>sql.safe_mode_user: <strong>".$this->config_array["sql.safe_mode_user"]."</strong>":""));
                                $out.=$this->wrapInCells("Password:", '<input type="text" name="TYPO3_INSTALL[localconf.php][typo_db_password]" value="'.htmlspecialchars(TYPO3_db_password).'">');
@@ -2002,7 +2003,8 @@ From sub-directory:
                                if ($this->mode!="123") {
                                        $out.=$this->wrapInCells("Site name:", '<input type="text" name="TYPO3_INSTALL[localconf.php][sitename]" value="'.htmlspecialchars($GLOBALS["TYPO3_CONF_VARS"]["SYS"]["sitename"]).'">');
                                        $out.=$this->wrapInCells("", "<BR>");
-                                       $out.=$this->wrapInCells("Encryption key:", '<input type="text" name="TYPO3_INSTALL[localconf.php][encryptionKey]" value="'.htmlspecialchars($GLOBALS["TYPO3_CONF_VARS"]["SYS"]["encryptionKey"]).'">');
+                                       $out.='<script type="text/javascript" src="../md5.js"></script><script type="text/javascript">function generateEncryptionKey(key) {time=new Date(); key=MD5(key)+MD5(time.getMilliseconds().toString());while(key.length<66){key=key+MD5(key)};return key;}</script>';
+                                       $out.=$this->wrapInCells("Encryption key:", '<input type="text" name="TYPO3_INSTALL[localconf.php][encryptionKey]" value="'.htmlspecialchars($GLOBALS["TYPO3_CONF_VARS"]["SYS"]["encryptionKey"]).'"><br /><input type="button" onclick="document.forms[\'setupGeneral\'].elements[\'TYPO3_INSTALL[localconf.php][encryptionKey]\'].value=generateEncryptionKey(document.forms[\'setupGeneral\'].elements[\'TYPO3_INSTALL[localconf.php][encryptionKey]\'].value);" value="Generate random key">');
                                        $out.=$this->wrapInCells("", "<BR>");
 
                                                // Other