Commit e78f2c01 authored by Kasper Skårhøj's avatar Kasper Skårhøj
Browse files

Changed lots of stuff...


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@130 709f56b5-9817-0410-a4d7-c38de5d9e867
parent 630ea201
Kasper Skårhøj, 6/2:
- Added procession option to RTE, "proc.plainImageMode"
- Added options for select and group types in TCA to set the selector box style.
- Added $altPageId parameter to function linkTP*() in tslib_pibase + pi_list_linkSingle()
- Changed the order of <?xml> and <!DOCTYPE> in the frontend for XHTML around again. And added an option, "doctypeSwitch" which will reverse the order for those needing that. And finally the "doctype" option fed with a value that is not "xhtml_frames", "xhtml_trans" or "xhtml_strict" will be outputted AS the doctype!
- Implemented checkbox for show thumbnails in Element browser/file and RTE select image dialog.
- Implemented pop-up window size selector in link wizard
Kasper Skårhøj
* Removed "mininews" from global extensions - that was an error in RC1
* Removed global extensions "beuser_tracking/ classic_welcome/ design_components/ tt_links/" from main distribtion. They are either obsolete or irrelevant and it has been considered responsible to remove them like this.
......
......@@ -51,7 +51,7 @@ TCEmain:
- Permission management on selector box/radio button values
- so certain "CType" / "Insert plugin" / "FlexForm datatypes" values could be blocked
- Could it be considered to implement some "access pool" where elements on any level (like here selectorboxes or for FlexForms elements/types there) could add their element by an API and then it would A) automatically be listed for groups access lists and B) automatically enforced.
- Permission management for translations?
- Permission management for translations? Users are allowed to edit certain languages? (Setup with general access list API?)
- Permissions on record-level
- CHECK: That permissions are properly evaluated (especially for moving content?)
- Security in tcemain: Uploaded/Attached files are allowed to be in ONLY a relative path OR in the "lockDir"!
......@@ -647,7 +647,7 @@ Authors: Julle and Kasper.
- Versioning (for single elements including single "pages" record) is based on
- ONE element having an official position in the TYPO3 page tree, thus holding the official "uid" of the element! (If this element was deleted from the system, so are all versions of that element!)
- All versions of this one element being a) at pid "-1" and b) a field "real_id" pointing to the official UID
- Pages-versioninig: For all elements belonging to a version of a page; They are just copied and has no official new version or binding back to whatever element they came from. They just came along. And in fact, they could even have their own version history for them selves!
- Pages-versioning: For all elements belonging to a version of a page; They are just copied and has no official new version or binding back to whatever element they came from. They just came along. And in fact, they could even have their own version history for them selves!
- Backend user access to elements is based on the access restrictions for the official element. THis must be implemented on core level.
- Tables supporting versioning will have these fields:
- real_id - Pointing back to official in-tree version
......@@ -680,6 +680,15 @@ Authors: Julle and Kasper.
- Impact assesment: Low.
- Clean-up module (in templavoila?) could also track such things
- Problems for non-templavoila sites would be low.
- Swapping might need to exclude fields like "sorting" etc. Others could be imagined.
- copies:
- What about a page alias?
- Trunk/Branch:
- Create version of single page (as above)
- Create version of page branch (1-... levels)
- Either create version of EACH page individually (like tagging in CVS)
- Or create single-point-of-reference so that pages INSIDE can be swapped, deleted and created (just like content elements can)
- Requirement: Intelligent swapping of "sub-element" ids that CAN be traced back to the original!
- Backend:
- For single-editing of records we will show a version list from which to choose a version to edit (just like the delete button is also hidden at multi-edit)
......
......@@ -409,7 +409,7 @@ class t3lib_BEfunc {
*
* @param string Table name
* @param array Field values as key=>value pairs.
* @param boolean Set $slash=1 if values should be addslashes()'ed (default)
* @param boolean Set $slash=1 if values should be addslashes()'ed (default). YOU SHOULD ALWAYS USE THIS!
* @return string Full SQL query for INSERT
*/
function DBcompileInsert($table,$fields_values,$slash=1) {
......
......@@ -68,6 +68,7 @@ class t3lib_diff {
// External, static:
var $stripTags = 0; // If set, the HTML tags are stripped from the input strings first.
var $diffOptions = ''; // Diff options. eg "--unified=3"
// Internal, dynamic:
var $clearBufferIdx=0; // This indicates the number of times the function addClearBuffer has been called - and used to detect the very first call...
......@@ -165,7 +166,7 @@ class t3lib_diff {
$file2 = t3lib_div::tempnam('diff2_');
t3lib_div::writeFile($file2,$str2);
// Perform diff.
$cmd = $GLOBALS['TYPO3_CONF_VARS']['BE']['diff_path'].' '.$file1.' '.$file2;
$cmd = $GLOBALS['TYPO3_CONF_VARS']['BE']['diff_path'].' '.$this->diffOptions.' '.$file1.' '.$file2;
exec($cmd,$res);
unlink($file1);
......
This diff is collapsed.
......@@ -220,7 +220,7 @@ class t3lib_extobjbase {
*/
function handleExternalFunctionValue() {
// Must clean first to make sure the correct key is set...
$this->pObj->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->pObj->MOD_MENU, t3lib_div::GPvar('SET',1), $this->pObj->MCONF['name']);
$this->pObj->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->pObj->MOD_MENU, t3lib_div::_GP('SET'), $this->pObj->MCONF['name']);
if ($this->function_key) {
$this->extClassConf = $this->pObj->getExternalItemConfig($this->pObj->MCONF['name'],$this->function_key,$this->pObj->MOD_SETTINGS[$this->function_key]);
if (is_array($this->extClassConf) && $this->extClassConf['path']) {
......@@ -253,7 +253,7 @@ class t3lib_extobjbase {
$this->extObj->init($this->pObj,$this->extClassConf);
// Re-write:
$this->pObj->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->pObj->MOD_MENU, t3lib_div::GPvar('SET',1), $this->pObj->MCONF['name']);
$this->pObj->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->pObj->MOD_MENU, t3lib_div::_GP('SET'), $this->pObj->MCONF['name']);
}
}
......
......@@ -329,7 +329,7 @@ class t3lib_folderTree extends t3lib_treeView {
// PM action:
// (If an plus/minus icon has been clicked, the PM GET var is sent and we must update the stored positions in the tree):
$PM = explode('_',t3lib_div::GPvar('PM')); // 0: mount key, 1: set/clear boolean, 2: item ID (cannot contain "_"), 3: treeName
$PM = explode('_',t3lib_div::_GP('PM')); // 0: mount key, 1: set/clear boolean, 2: item ID (cannot contain "_"), 3: treeName
if (count($PM)==4 && $PM[3]==$this->treeName) {
if (isset($this->MOUNTS[$hashMap[$PM[0]]])) {
if ($PM[1]) { // set
......
......@@ -88,15 +88,12 @@ class t3lib_formmail extends t3lib_htmlmail {
* [html_enabled]: If mail is sent as html
* [quoted_printable]: if set, quoted-printable will be used instead of base 64
*
* @param array Contains values for the field names listed above
* @param array Contains values for the field names listed above (with slashes removed if from POSt input)
* @param boolean Whether to base64 encode the mail content
* @return void
*/
function start($V,$base64=1) {
if ($base64 && !$V['quoted_printable']) {$this->useBase64();}
if (is_array($V)) {
t3lib_div::stripSlashesOnArray($V);
}
if (isset($V['recipient'])) {
// Sets the message id
......
......@@ -271,7 +271,7 @@ class t3lib_fullsearch {
$storeArray = $this->initStoreArray();
$storeQueryConfigs = unserialize($GLOBALS["SOBE"]->MOD_SETTINGS["storeQueryConfigs"]);
$storeControl = t3lib_div::GPvar("storeControl");
$storeControl = t3lib_div::_GP("storeControl");
$storeIndex = intval($storeControl["STORE"]);
$saveStoreArray=0;
$writeArray=array();
......@@ -443,7 +443,7 @@ class t3lib_fullsearch {
$out.='<BR><input type="submit" name="download_file" value="Click to download file" onClick="document.location=\''.$this->downloadScript.'\';">'; // document.forms[0].target=\'_blank\';
}
// Downloads file:
if (t3lib_div::GPvar("download_file")) {
if (t3lib_div::_GP("download_file")) {
$filename="TYPO3_".$table."_export_".date("dmy-Hi").".csv";
$mimeType = "application/octet-stream";
Header("Content-Type: ".$mimeType);
......@@ -478,7 +478,7 @@ class t3lib_fullsearch {
$out.='<BR><input type="submit" name="download_file" value="Click to download file" onClick="document.location=\''.$this->downloadScript.'\';">'; // document.forms[0].target=\'_blank\';
}
// Downloads file:
if (t3lib_div::GPvar("download_file")) {
if (t3lib_div::_GP("download_file")) {
$filename="TYPO3_".$table."_export_".date("dmy-Hi").".xml";
$mimeType = "application/octet-stream";
Header("Content-Type: ".$mimeType);
......@@ -532,9 +532,9 @@ class t3lib_fullsearch {
*/
function search() {
global $TCA;
$SET = t3lib_div::GPvar("SET",1);
$SET = t3lib_div::_GP("SET");
$swords = $SET["sword"];
// $GLOBALS["HTTP_POST_VARS"]["SET"]["sword"]
$limit=200;
$showAlways=0;
if ($swords) {
......@@ -597,7 +597,7 @@ class t3lib_fullsearch {
$out.='<td'.$TDparams.'>'.htmlspecialchars($fVnew).'</td>';
}
$params = '&edit['.$table.']['.$row["uid"].']=edit';
$out.='<td nowrap><A HREF="#" onClick="top.launchView(\''.$table.'\','.$row["uid"].',\''.$GLOBALS["BACK_PATH"].'\');return false;"><img src="'.$GLOBALS["BACK_PATH"].'gfx/zoom2.gif" width="12" height="12" alt="" /></a><A HREF="#" onClick="'.t3lib_BEfunc::editOnClick($params,$GLOBALS["BACK_PATH"],t3lib_div::getIndpEnv("REQUEST_URI").t3lib_div::implodeArrayForUrl("SET",$GLOBALS["HTTP_POST_VARS"]["SET"])).'"><img src="'.$GLOBALS["BACK_PATH"].'gfx/edit2.gif" width="11" height="12" border="0" alt=""></a></td>
$out.='<td nowrap><A HREF="#" onClick="top.launchView(\''.$table.'\','.$row["uid"].',\''.$GLOBALS["BACK_PATH"].'\');return false;"><img src="'.$GLOBALS["BACK_PATH"].'gfx/zoom2.gif" width="12" height="12" alt="" /></a><A HREF="#" onClick="'.t3lib_BEfunc::editOnClick($params,$GLOBALS["BACK_PATH"],t3lib_div::getIndpEnv("REQUEST_URI").t3lib_div::implodeArrayForUrl("SET",t3lib_div::_POST("SET"))).'"><img src="'.$GLOBALS["BACK_PATH"].'gfx/edit2.gif" width="11" height="12" border="0" alt=""></a></td>
</tr>
';
return $out;
......
......@@ -255,9 +255,9 @@ class t3lib_install {
// ****************************
// Initializing incoming vars.
// ****************************
$this->INSTALL = t3lib_div::GPvar("TYPO3_INSTALL");
$this->mode = t3lib_div::GPvar("mode");
$this->step = t3lib_div::GPvar("step");
$this->INSTALL = t3lib_div::_GP("TYPO3_INSTALL");
$this->mode = t3lib_div::_GP("mode");
$this->step = t3lib_div::_GP("step");
if ($GLOBALS["HTTP_GET_VARS"]["TYPO3_INSTALL"]["type"]) $this->INSTALL["type"] = $GLOBALS["HTTP_GET_VARS"]["TYPO3_INSTALL"]["type"];
if ($this->step==3) {
......@@ -318,7 +318,7 @@ On behalf of PHP we regret this inconvenience.
* @return [type] ...
*/
function checkPassword($uKey) {
$p = t3lib_div::GPvar("password");
$p = t3lib_div::_GP("password");
if ($p && md5($p)==$GLOBALS["TYPO3_CONF_VARS"]["BE"]["installToolPassword"]) {
$sKey = md5($GLOBALS["TYPO3_CONF_VARS"]["BE"]["installToolPassword"]."|".$uKey);
......@@ -1211,11 +1211,11 @@ Number of files at a time:
$doit=1;
if ($k=="BE" && $vk=="installToolPassword") {
if ($value) {
if (isset($GLOBALS["HTTP_POST_VARS"]["installToolPassword_check"]) && (!t3lib_div::GPvar("installToolPassword_check") || strcmp(t3lib_div::GPvar("installToolPassword_check"),$value))) {
if (isset($GLOBALS["HTTP_POST_VARS"]["installToolPassword_check"]) && (!t3lib_div::_GP("installToolPassword_check") || strcmp(t3lib_div::_GP("installToolPassword_check"),$value))) {
$doit=0;
debug("ERROR: The two passwords did not match! The password was not changed.");
}
if (t3lib_div::GPvar("installToolPassword_md5")) $value =md5($value);
if (t3lib_div::_GP("installToolPassword_md5")) $value =md5($value);
} else $doit=0;
}
if ($doit && strcmp($GLOBALS["TYPO3_CONF_VARS"][$k][$vk],stripslashes($value))) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS["'.$k.'"]["'.$vk.'"]', $value);
......@@ -1327,9 +1327,9 @@ Number of files at a time:
$this->message($ext, "Register globals disabled","
<i>register_globals=".ini_get("register_globals")."</i>
Incoming values by GET or POST method are not registered as globals. TYPO3 is designed to cope with that - actually we encourage that setting - but you should be aware if your included PHP-scripts (or TypoScript configurations) are compatible with this setting.
You should always use the function t3lib_div::GPvar(\"<i>[the_var_name_from_GET_or_POST]</i>\") to retrieve values passed to your script from outside.
You should always use the function t3lib_div::_GP(\"<i>[the_var_name_from_GET_or_POST]</i>\") to retrieve values passed to your script from outside.
",1);
} else $this->message($ext, "Register globals enabled","You should always use the function t3lib_div::GPvar(\"<i>[the_var_name_from_GET_or_POST]</i>\") to retrieve values passed to your script from outside.",1);
} else $this->message($ext, "Register globals enabled","You should always use the function t3lib_div::_GP(\"<i>[the_var_name_from_GET_or_POST]</i>\") to retrieve values passed to your script from outside.",1);
if (!ini_get("magic_quotes_gpc")) {
$this->message($ext, "magic_quotes_gpc","
<i>magic_quotes_gpc=".ini_get("magic_quotes_gpc")."</i>
......@@ -2306,7 +2306,7 @@ Number of files at a time:
$text_color = imagecolorallocate ($im, 233, 14, 91);
$test = @imagettftext($im, t3lib_div::freetypeDpiComp(20), 0, 10, 20, $text_color, PATH_t3lib."/fonts/verdana.ttf", "Testing Truetype support");
if (t3lib_div::GPvar("testingTrueTypeSupport")) {
if (t3lib_div::_GP("testingTrueTypeSupport")) {
if ($this->isGIF()) {
header ("Content-type: image/gif");
imagegif ($im);
......@@ -3456,8 +3456,8 @@ Number of files at a time:
$this->message($tLabel,"Imported ALL","
Queries: ".$r."
",1,1);
if (t3lib_div::GPvar("goto_step")) {
$this->action.="&step=".t3lib_div::GPvar("goto_step");
if (t3lib_div::_GP("goto_step")) {
$this->action.="&step=".t3lib_div::_GP("goto_step");
Header("Location: ".t3lib_div::locationHeaderUrl($this->action));
exit;
}
......@@ -3518,7 +3518,7 @@ Number of files at a time:
<HR>
';
}
$content.='<input type="checkbox" name="TYPO3_INSTALL[database_import_all]" value="1"'.($this->mode=="123"||t3lib_div::GPvar("presetWholeTable")?" checked":"").'>'.$this->fw("Import the whole file '".basename($actionParts[1])."' directly (ignores selections above):").'<BR>
$content.='<input type="checkbox" name="TYPO3_INSTALL[database_import_all]" value="1"'.($this->mode=="123"||t3lib_div::_GP("presetWholeTable")?" checked":"").'>'.$this->fw("Import the whole file '".basename($actionParts[1])."' directly (ignores selections above):").'<BR>
';
$form = $this->getUpdateDbFormWrap($action_type, $content);
......
......@@ -535,7 +535,7 @@ class t3lib_matchCondition {
if ($k) {
switch((string)trim($vars[0])) {
case 'GP':
$val = t3lib_div::GPvar($k);
$val = t3lib_div::_GP($k);
break;
case 'TSFE':
$val = $GLOBALS['TSFE']->$k;
......
......@@ -296,7 +296,7 @@ class t3lib_modSettings {
$storeArray = $this->initStoreArray();
$storeConfigs = unserialize($GLOBALS['SOBE']->MOD_SETTINGS[$this->prefix.'StoreConfigs']);
#debug($storeConfigs);
$storeControl = t3lib_div::GPvar('storeControl');
$storeControl = t3lib_div::_GP('storeControl');
$storeIndex = intval($storeControl['STORE']);
#debug($storeControl);
$saveStoreArray=0;
......
......@@ -385,9 +385,9 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
// Init
$attribArray=$this->get_tag_attributes_classic($v,1);
$siteUrl = $this->siteUrl();
$absRef = trim($attribArray['src']);
// External image from another URL?
$absRef = trim($attribArray['src']); // It's always a absolute URL coming from the RTE into the Database.
// External image from another URL? In that case, fetch image (unless disabled feature).
if (!t3lib_div::isFirstPartOfStr($absRef,$siteUrl) && !$this->procOptions['dontFetchExtPictures']) {
$externalFile = $this->getUrl($absRef); // Get it
if ($externalFile) {
......@@ -410,14 +410,17 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
}
}
}
// Check image as local file
// Check image as local file (siteURL equals the one of the image)
if (t3lib_div::isFirstPartOfStr($absRef,$siteUrl)) {
$path = substr($absRef,strlen($siteUrl));
$pathPre=$this->rteImageStorageDir().'RTEmagicC_';
$path = rawurldecode(substr($absRef,strlen($siteUrl))); // Rel-path, rawurldecoded for special characters.
$filepath = t3lib_div::getFileAbsFileName($path); // Abs filepath, locked to relative path of this project.
// Check file existence (in relative dir to this installation!)
if ($filepath && @is_file($filepath)) {
if (t3lib_div::isFirstPartOfStr($path,$pathPre)) {
$filepath = PATH_site.$path;
if (@is_file($filepath)) {
// If "magic image":
$pathPre=$this->rteImageStorageDir().'RTEmagicC_';
if (t3lib_div::isFirstPartOfStr($path,$pathPre)) {
// Find original file:
$pI=pathinfo(substr($path,strlen($pathPre)));
$filename = substr($pI['basename'],0,-strlen('.'.$pI['extension']));
......@@ -449,17 +452,54 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
}
}
}
} elseif ($this->procOptions['plainImageMode']) { // If "plain image" has been configured:
// Image dimensions as set in the image tag
$curWH = $this->getWHFromAttribs($attribArray);
$attribArray['width'] = $curWH[0];
$attribArray['height'] = $curWH[1];
// Forcing values for style and border:
unset($attribArray['style']);
if (!$attribArray['border']) $attribArray['border']=0;
// Finding dimensions of image file:
$fI = @getimagesize($filepath);
// Perform corrections to aspect ratio based on configuration:
switch((string)$this->procOptions['plainImageMode']) {
case 'lockDimensions':
$attribArray['width']=$fI[0];
$attribArray['height']=$fI[1];
break;
case 'lockRatioWhenSmaller': // If the ratio has to be smaller, then first set the width...:
if ($attribArray['width']>$fI[0]) $attribArray['width'] = $fI[0];
case 'lockRatio':
if ($fI[0]>0) {
$attribArray['height']=round($attribArray['width']*($fI[1]/$fI[0]));
}
break;
}
// Compile the image tag again:
$params = t3lib_div::implodeParams($attribArray,1);
$imgSplit[$k]='<img '.$params.' />';
}
} else { // Remove image if it was not found in a proper position on the server!
$imgSplit[$k]='';
}
}
// Convert abs to rel url
$attribArray=$this->get_tag_attributes_classic($imgSplit[$k],1);
$absRef = trim($attribArray['src']);
if (t3lib_div::isFirstPartOfStr($absRef,$siteUrl)) {
$attribArray['src'] = $this->relBackPath.substr($absRef,strlen($siteUrl));
if (!isset($attribArray['alt'])) $attribArray['alt']=''; // Must have alt-attribute for XHTML compliance.
$imgSplit[$k]='<img '.t3lib_div::implodeParams($attribArray,1,1).' />';
if ($imgSplit[$k]) {
$attribArray=$this->get_tag_attributes_classic($imgSplit[$k],1);
$absRef = trim($attribArray['src']);
if (t3lib_div::isFirstPartOfStr($absRef,$siteUrl)) {
$attribArray['src'] = $this->relBackPath.substr($absRef,strlen($siteUrl));
if (!isset($attribArray['alt'])) $attribArray['alt']=''; // Must have alt-attribute for XHTML compliance.
$imgSplit[$k]='<img '.t3lib_div::implodeParams($attribArray,1,1).' />';
}
}
}
}
......
......@@ -248,8 +248,8 @@ class t3lib_SCbase {
*/
function init() {
$this->MCONF = $GLOBALS['MCONF'];
$this->id = intval(t3lib_div::GPvar('id'));
$this->CMD = t3lib_div::GPvar('CMD');
$this->id = intval(t3lib_div::_GP('id'));
$this->CMD = t3lib_div::_GP('CMD');
$this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
$this->menuConfig();
$this->handleExternalFunctionValue();
......@@ -270,7 +270,7 @@ class t3lib_SCbase {
$this->MOD_MENU['function'] = t3lib_BEfunc::unsetMenuItems($this->modTSconfig['properties'],$this->MOD_MENU['function'],'menu.function');
// CLEANSE 'function' SETTINGS
$this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::GPvar('SET',1), $this->MCONF['name'], $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);
$this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name'], $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);
}
/**
......@@ -338,7 +338,7 @@ class t3lib_SCbase {
$this->extObj = t3lib_div::makeInstance($this->extClassConf['name']);
$this->extObj->init($this,$this->extClassConf);
// Re-write:
$this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::GPvar('SET',1), $this->MCONF['name']);
$this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
}
}
......
......@@ -184,7 +184,7 @@ class t3lib_superadmin {
$content = $this->initProcess();
// Output mode:
$mode=t3lib_div::GPvar("show");
$mode=t3lib_div::_GP("show");
//debug($GLOBALS["HTTP_GET_VARS"]);
switch($mode) {
case "menu":
......@@ -200,7 +200,7 @@ class t3lib_superadmin {
$lines[]='';
$content = '<font>'.implode("<BR>",$lines).'</font>';
$content.= '<HR>';
$content.=$this->menuContent(t3lib_div::GPvar("exp"));
$content.=$this->menuContent(t3lib_div::_GP("exp"));
return '<h2><nobr><div align="center">TYPO3<BR>Super Admin</div></nobr></h2>'.$content;
break;
case "all":
......@@ -216,10 +216,10 @@ class t3lib_superadmin {
'<h2>Change TBE Admin Passwords:</h2>'.$this->changeAdminPasswordsForm()."<BR><HR><BR>";
break;
case "info":
return '<h1>Single site details</h1>'.$this->singleSite(t3lib_div::GPvar("exp"))."<BR>";
return '<h1>Single site details</h1>'.$this->singleSite(t3lib_div::_GP("exp"))."<BR>";
break;
case "rmTempCached":
return '<h1>Removing temp_CACHED_*.php files</h1>'.$this->rmCachedFiles(t3lib_div::GPvar("exp"))."<BR>";
return '<h1>Removing temp_CACHED_*.php files</h1>'.$this->rmCachedFiles(t3lib_div::_GP("exp"))."<BR>";
break;
case "localext":
return '<h1>Local Extensions Found:</h1>'.$this->localExtensions()."<BR>";
......@@ -239,7 +239,7 @@ class t3lib_superadmin {
*/
function setMenuItem($code,$label) {
$out = '<a HREF="'.$this->scriptName.'?type=menu&show=menu&exp='.$code.'" target="TSAmenu">'.$label.'</a>';
if ($code==t3lib_div::GPvar("exp")) {
if ($code==t3lib_div::_GP("exp")) {
$out = '<font color=red>&gt;&gt;</font>'.$out;
}
return $out;
......@@ -999,10 +999,10 @@ class t3lib_superadmin {
* @return [type] ...
*/
function setNewPasswords() {
$whichFields = t3lib_div::GPvar("SETFIELDS");
$whichFields = t3lib_div::_GP("SETFIELDS");
$pass = trim(t3lib_div::GPvar("NEWPASS"));
$passMD5 = t3lib_div::GPvar("NEWPASS_md5");
$pass = trim(t3lib_div::_GP("NEWPASS"));
$passMD5 = t3lib_div::_GP("NEWPASS_md5");
$updatedFlag=0;
if ($pass || $passMD5) {
$pass = $passMD5 ? $passMD5 : md5($pass);
......@@ -1051,7 +1051,7 @@ TD {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px}
</style>
';
switch(t3lib_div::GPvar("type")) {
switch(t3lib_div::_GP("type")) {
case "phpinfo":
phpinfo();
break;
......
......@@ -342,7 +342,7 @@ class t3lib_svbase {
/**
function available() {
global $AB,$BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$HTTP_GET_VARS,$HTTP_POST_VARS,$CLIENT,$TYPO3_CONF_VARS;
global $AB,$BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
// check if the service is available at runtime
// the sense of this method is that the service might need some more information to check the availablity
......
......@@ -208,6 +208,7 @@ class t3lib_TCEforms {
var $charsPerRow=40; // The number of chars expected per row when the height of a text area field is automatically calculated based on the number of characters found in the field content.
var $maxTextareaWidth=48; // The maximum abstract value for textareas
var $maxInputWidth=48; // The maximum abstract value for input fields
var $defaultMultipleSelectorStyle='width:250px;'; // Default style for the selector boxes used for multiple items in "select" and "group" types.
// INTERNAL, static
......@@ -1145,13 +1146,6 @@ class t3lib_TCEforms {
$sOnChange = 'setFormValueFromBrowseWin(\''.$PA['itemFormElName'].'\',this.options[this.selectedIndex].value,this.options[this.selectedIndex].text); '.implode('',$PA['fieldChangeFunc']);
// Put together the select form with selected elements:
$thumbnails='<select style="width:200 px;" name="'.$PA['itemFormElName'].'_sel"'.$this->insertDefStyle('select').($size?' size="'.$size.'"':'').' onchange="'.htmlspecialchars($sOnChange).'"'.$PA['onFocus'].'>';
foreach($selItems as $p) {
$thumbnails.= '<option value="'.htmlspecialchars($p[1]).'">'.htmlspecialchars($p[0]).'</option>';
}
$thumbnails.= '</select>';
// Perform modification of the selected items array:
$itemArray = t3lib_div::trimExplode(',',$PA['itemFormElValue'],1);
foreach($itemArray as $tk => $tv) {
......@@ -1163,10 +1157,20 @@ class t3lib_TCEforms {
}
$itemArray[$tk]=implode('|',$tvP);
}
// Put together the select form with selected elements:
$selector_itemListStyle = isset($config['itemListStyle']) ? ' style="'.htmlspecialchars($config['itemListStyle']).'"' : ' style="'.$this->defaultMultipleSelectorStyle.'"';
$size = $config['autoSizeMax'] ? t3lib_div::intInRange(count($itemArray)+1,t3lib_div::intInRange($size,1),$config['autoSizeMax']) : $size;
$thumbnails='<select name="'.$PA['itemFormElName'].'_sel"'.$this->insertDefStyle('select').($size?' size="'.$size.'"':'').' onchange="'.htmlspecialchars($sOnChange).'"'.$PA['onFocus'].$selector_itemListStyle.'>';
foreach($selItems as $p) {
$thumbnails.= '<option value="'.htmlspecialchars($p[1]).'">'.htmlspecialchars($p[0]).'</option>';
}
$thumbnails.= '</select>';
$params=array(
'size' => $size,
'autoSizeMax' => t3lib_div::intInRange($config['autoSizeMax'],0),
'style' => isset($config['selectedListStyle']) ? ' style="'.htmlspecialchars($config['selectedListStyle']).'"' : ' style="'.$this->defaultMultipleSelectorStyle.'"',
'dontShowMoveIcons' => ($maxitems<=1),
'info' => '',
'headers' => array(
......@@ -1257,6 +1261,7 @@ class t3lib_TCEforms {
'size' => $size,
'dontShowMoveIcons' => ($maxitems<=1),
'autoSizeMax' => t3lib_div::intInRange($config['autoSizeMax'],0),
'style' => isset($config['selectedListStyle']) ? ' style="'.htmlspecialchars($config['selectedListStyle']).'"' : ' style="'.$this->defaultMultipleSelectorStyle.'"',
'info' => $info,
'thumbnails' => $thumbsnail
);
......@@ -1315,6 +1320,7 @@ class t3lib_TCEforms {
'size' => $size,
'dontShowMoveIcons' => ($maxitems<=1),
'autoSizeMax' => t3lib_div::intInRange($config['autoSizeMax'],0),
'style' => isset($config['selectedListStyle']) ? ' style="'.htmlspecialchars($config['selectedListStyle']).'"' : ' style="'.$this->defaultMultipleSelectorStyle.'"',
'info' => $info,
'thumbnails' => $thumbsnail
);
......@@ -1457,7 +1463,7 @@ class t3lib_TCEforms {
// Render sheet:
if (is_array($dataStruct['ROOT']) && is_array($dataStruct['ROOT']['el'])) {
$cmdData = t3lib_div::GPvar('flexFormsCmdData',1);
$cmdData = t3lib_div::_GP('flexFormsCmdData');
$lang = 'l'.$lKey; // Default language, other options are "lUK" or whatever country code (independant of system!!!)
$PA['_valLang'] = $langChildren && !$langDisabled ? $editData['meta']['currentLangId'] : 'DEF'; // Default language, other options are "lUK" or whatever country code (independant of system!!!)
......@@ -2020,7 +2026,7 @@ class t3lib_TCEforms {
// Create selector box of the options
if (!$selector) {
$sSize = $params['autoSizeMax'] ? t3lib_div::intInRange($itemArrayC+1,t3lib_div::intInRange($params['size'],1),$params['autoSizeMax']) : $params['size'];
$selector = '<select size="'.$sSize.'"'.$this->insertDefStyle('group').' multiple="multiple" name="'.$fName.'_list" style="width:200px;"'.$onFocus.'>'.implode('',$opt).'</select>';
$selector = '<select size="'.$sSize.'"'.$this->insertDefStyle('group').' multiple="multiple" name="'.$fName.'_list" '.$onFocus.$params['style'].'>'.implode('',$opt).'</select>';
}
......
......@@ -193,7 +193,7 @@ class t3lib_TCEmain {
var $neverHideAtCopy = 0; // Boolean. If set, then the "hideAtCopy" flag for tables will be ignored.
var $reverseOrder=0; // boolean. If set, the dataarray is reversed in the order, which is a nice thing if you're creating a whole new bunch of records.
var $copyWhichTables = "*"; // This list of tables decides which tables will be copied. If empty then none will. If "*" then all will (that the user has permission to of course)
var $stripslashes_values=1; // If set, incoming values in the data-array have their slashes stripped. This is default, because tce_main expects HTTP_POST_VARS and HTTP_GET_VARS to be slashed (which is probably done in init.php). If you supply your own data to the data-array, you can just unset this flag and slashes will not be stripped then.
var $stripslashes_values=1; // If set, incoming values in the data-array have their slashes stripped. This is default, because tce_main expects HTTP_POST_VARS and HTTP_GET_VARS to be slashed (which is probably done in init.php). If you supply your own data to the data-array, you can just unset this flag and slashes will not be stripped then. NOTICE: This flag may be set false by default in the future! ALWAYS supply a stripped (normalized values) array for data!!!!
var $storeLogMessages=1; // If set, the default log-messages will be stored. This should not be necessary if the locallang-file for the log-display is properly configured. So disabling this will just save some database-space as the default messages are not saved.
var $enableLogging=1; // If set, actions are logged.
......@@ -1608,7 +1608,7 @@ class t3lib_TCEmain {
}
// Temporary fix to delete elements:
$deleteCMDs=t3lib_div::GPvar('_DELETE_FLEX_FORMdata');
$deleteCMDs=t3lib_div::_GP('_DELETE_FLEX_FORMdata');
if (is_array($deleteCMDs[$table][$id][$field]['data'])) {
$arrValue = t3lib_div::xml2array($xmlValue);
......@@ -3673,6 +3673,11 @@ class t3lib_TCEmain {
$res = mysql(TYPO3_db,"DELETE FROM cache_hash");
}
break;
case "temp_CACHED":
if ($this->admin && $TYPO3_CONF_VARS['EXT']['extCache']) {
$this->removeCacheFiles();
}
break;
}
// Clear cache for a page ID!
if (t3lib_div::testInt($cacheCmd)) {
......@@ -3689,6 +3694,26 @@ class t3lib_TCEmain {
}
}
}
/**
* Unlink (delete) typo3conf/temp_CACHED_*.php cache files
*
* @return integer The number of files deleted
*/
function removeCacheFiles() {
$cacheFiles=t3lib_extMgm::currentCacheFiles();
$out=0;
if (is_array($cacheFiles)) {
reset($cacheFiles);
while(list(,$cfile)=each($cacheFiles)) {
@unlink($cfile);
clearstatcache();
$out++;
}