Commit 6e54dfc2 authored by Michael Stucki's avatar Michael Stucki
Browse files

* Merged changes from TYPO3_3-8 branch back


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@766 709f56b5-9817-0410-a4d7-c38de5d9e867
parent 136ce13d
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>
......@@ -65,13 +128,13 @@
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>
......@@ -246,7 +309,7 @@
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>
......
......@@ -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']) {
......
......@@ -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 {
......
......@@ -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;
}
......
......@@ -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':
......
......@@ -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;
}
}
......
......@@ -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.='>';
......
......@@ -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;
......
......@@ -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>';
......
......@@ -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 ) {
......
......@@ -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');
......
......@@ -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
......
......@@ -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.'" />';
}
......
......@@ -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);
......
......@@ -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);
}
}
......
......@@ -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() {