Changed lots of stuff...
authorKasper Skårhøj <kasper@typo3.org>
Tue, 10 Feb 2004 10:33:51 +0000 (10:33 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Tue, 10 Feb 2004 10:33:51 +0000 (10:33 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@130 709f56b5-9817-0410-a4d7-c38de5d9e867

89 files changed:
ChangeLog
TODO.txt
t3lib/class.t3lib_befunc.php
t3lib/class.t3lib_diff.php
t3lib/class.t3lib_div.php
t3lib/class.t3lib_extobjbase.php
t3lib/class.t3lib_foldertree.php
t3lib/class.t3lib_formmail.php
t3lib/class.t3lib_fullsearch.php
t3lib/class.t3lib_install.php
t3lib/class.t3lib_matchcondition.php
t3lib/class.t3lib_modsettings.php
t3lib/class.t3lib_parsehtml_proc.php
t3lib/class.t3lib_scbase.php
t3lib/class.t3lib_superadmin.php
t3lib/class.t3lib_svbase.php
t3lib/class.t3lib_tceforms.php
t3lib/class.t3lib_tcemain.php
t3lib/class.t3lib_transferdata.php
t3lib/class.t3lib_treeview.php
t3lib/class.t3lib_tsfebeuserauth.php
t3lib/class.t3lib_tsparser_ext.php
t3lib/class.t3lib_tstemplate.php
t3lib/class.t3lib_userauthgroup.php
t3lib/config_default.php
t3lib/stddb/tbl_be.php
t3lib/thumbs.php
typo3/alt_clickmenu.php
typo3/alt_db_navframe.php
typo3/alt_doc.php
typo3/alt_file_navframe.php
typo3/alt_intro.php
typo3/alt_menu.php
typo3/alt_mod_frameset.php
typo3/alt_palette.php
typo3/alt_shortcut.php
typo3/alt_topmenu_dummy.php
typo3/browse_links.php
typo3/browser.php
typo3/class.alt_menu_functions.inc
typo3/class.db_list.inc
typo3/class.show_rechis.inc
typo3/db_list.php
typo3/db_new.php
typo3/dev/README.txt [deleted file]
typo3/dev/dump_template_tables.php [deleted file]
typo3/dev/phpinfo.php [deleted file]
typo3/file_edit.php
typo3/file_list.php
typo3/file_newfolder.php
typo3/file_rename.php
typo3/file_upload.php
typo3/index.php
typo3/init.php
typo3/logout.php
typo3/mod/help/about/index.php
typo3/mod/tools/em/class.kickstarter.php
typo3/mod/tools/em/index.php
typo3/mod/web/perm/index.php
typo3/move_el.php
typo3/show_item.php
typo3/stylesheet.css
typo3/sysext/cms/layout/class.tx_cms_layout.php
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/cms/layout/db_new_content_el.php
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_fetce.php
typo3/sysext/cms/tslib/class.tslib_feuserauth.php
typo3/sysext/cms/tslib/class.tslib_pagegen.php
typo3/sysext/cms/tslib/class.tslib_pibase.php
typo3/sysext/cms/tslib/index_ts.php
typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc
typo3/sysext/cms/tslib/publish.php
typo3/sysext/cms/tslib/showpic.php
typo3/sysext/lang/locallang_browse_links.php
typo3/sysext/lang/locallang_core.php
typo3/tce_db.php
typo3/tce_file.php
typo3/template.php
typo3/view_help.php
typo3/wizard_add.php
typo3/wizard_colorpicker.php
typo3/wizard_edit.php
typo3/wizard_forms.php
typo3/wizard_list.php
typo3/wizard_rte.php
typo3/wizard_table.php
typo3/wizard_tsconfig.php

index 8fd70eb..a046f77 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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.
index 9a18c62..bfb797b 100755 (executable)
--- a/TODO.txt
+++ b/TODO.txt
@@ -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)
index d095ee9..dd6c524 100755 (executable)
@@ -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)        {
index 00b67f6..8c1c3af 100755 (executable)
@@ -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);
index 5494021..32afd84 100755 (executable)
  *
  *
  *
- *  198: class t3lib_div 
+ *  202: class t3lib_div 
  *
- *              SECTION: BASIC FUNCTIONS
- *  220:     function milliseconds()   
- *  234:     function setGPvars($list,$strip=0)        
- *  252:     function GPvar($var,$strip=0)     
- *  268:     function GParrayMerged($var)      
- *  284:     function clientInfo($useragent='')        
+ *              SECTION: IO Variables
+ *  224:     function _GP($var)        
+ *  238:     function _GET($var='')    
+ *  252:     function _POST($var='')   
+ *  264:     function _GETset($inputGet)       
+ *  282:     function GPvar($var,$strip=0)     
+ *  299:     function setGPvars($list,$strip=0)        
+ *  316:     function GParrayMerged($var)      
  *
  *              SECTION: IMAGE FUNCTIONS
- *  371:     function gif_compress($theFile, $type)    
- *  399:     function png_to_gif_by_imagemagick($theFile)      
- *  423:     function read_png_gif($theFile,$output_png=0)     
+ *  361:     function gif_compress($theFile, $type)    
+ *  389:     function png_to_gif_by_imagemagick($theFile)      
+ *  413:     function read_png_gif($theFile,$output_png=0)     
  *
  *              SECTION: STRING FUNCTIONS
- *  472:     function fixed_lgd($string,$chars,$preStr='...')  
- *  494:     function fixed_lgd_pre($string,$chars)    
- *  508:     function breakTextForEmail($str,$implChar="\n",$charWidth=76)     
- *  528:     function breakLinesForEmail($str,$implChar="\n",$charWidth=76)    
- *  564:     function cmpIP($baseIP, $list)    
- *  611:     function inList($in_list,$item)   
- *  624:     function rmFromList($element,$list)       
- *  643:     function intInRange($theInt,$min,$max=2000000000,$zeroValue=0)    
- *  660:     function intval_positive($theInt) 
- *  674:     function int_from_ver($verNumberStr)      
- *  687:     function md5int($str)     
- *  699:     function uniqueList($in_list)     
- *  712:     function split_fileref($fileref)  
- *  749:     function dirname($path)   
- *  766:     function modifyHTMLColor($color,$R,$G,$B) 
- *  787:     function modifyHTMLColorAll($color,$all)  
- *  799:     function rm_endcomma($string)     
- *  812:     function danish_strtoupper($string)       
- *  827:     function convUmlauts($str)        
- *  842:     function shortMD5($input, $len=10)        
- *  854:     function testInt($var)    
- *  867:     function isFirstPartOfStr($str,$partStr)  
- *  884:     function formatSize($sizeInBytes,$labels='')      
- *  920:     function convertMicrotime($microtime)     
- *  934:     function splitCalc($string,$operators)    
- *  956:     function calcPriority($string)    
- *  996:     function calcParenthesis($string) 
- * 1023:     function htmlspecialchars_decode($value)  
- * 1037:     function deHSCentities($str)      
- * 1050:     function slashJS($string,$extended=0,$char="'")   
- * 1064:     function rawUrlEncodeJS($str)     
- * 1075:     function rawUrlEncodeFP($str)     
- * 1087:     function validEmail($email)       
- * 1102:     function formatForTextarea($content)      
+ *  462:     function fixed_lgd($string,$chars,$preStr='...')  
+ *  484:     function fixed_lgd_pre($string,$chars)    
+ *  498:     function breakTextForEmail($str,$implChar="\n",$charWidth=76)     
+ *  518:     function breakLinesForEmail($str,$implChar="\n",$charWidth=76)    
+ *  554:     function cmpIP($baseIP, $list)    
+ *  601:     function inList($in_list,$item)   
+ *  614:     function rmFromList($element,$list)       
+ *  633:     function intInRange($theInt,$min,$max=2000000000,$zeroValue=0)    
+ *  650:     function intval_positive($theInt) 
+ *  664:     function int_from_ver($verNumberStr)      
+ *  677:     function md5int($str)     
+ *  689:     function uniqueList($in_list)     
+ *  702:     function split_fileref($fileref)  
+ *  739:     function dirname($path)   
+ *  756:     function modifyHTMLColor($color,$R,$G,$B) 
+ *  777:     function modifyHTMLColorAll($color,$all)  
+ *  789:     function rm_endcomma($string)     
+ *  802:     function danish_strtoupper($string)       
+ *  817:     function convUmlauts($str)        
+ *  832:     function shortMD5($input, $len=10)        
+ *  844:     function testInt($var)    
+ *  857:     function isFirstPartOfStr($str,$partStr)  
+ *  874:     function formatSize($sizeInBytes,$labels='')      
+ *  910:     function convertMicrotime($microtime)     
+ *  924:     function splitCalc($string,$operators)    
+ *  946:     function calcPriority($string)    
+ *  986:     function calcParenthesis($string) 
+ * 1013:     function htmlspecialchars_decode($value)  
+ * 1027:     function deHSCentities($str)      
+ * 1040:     function slashJS($string,$extended=0,$char="'")   
+ * 1054:     function rawUrlEncodeJS($str)     
+ * 1065:     function rawUrlEncodeFP($str)     
+ * 1077:     function validEmail($email)       
+ * 1093:     function formatForTextarea($content)      
  *
  *              SECTION: ARRAY FUNCTIONS
- * 1134:     function inArray($in_array,$item) 
- * 1152:     function intExplode($delim, $string)      
- * 1172:     function revExplode($delim, $string, $count=0)    
- * 1193:     function trimExplode($delim, $string, $onlyNonEmptyValues=0)      
- * 1218:     function uniqueArray($valueArray) 
- * 1241:     function removeArrayEntryByValue($array,$cmpValue)        
- * 1270:     function implodeArrayForUrl($name,$theArray,$str='',$skipBlank=0,$rawurlencodeParamName=0)        
- * 1298:     function compileSelectedGetVarsFromArray($varList,$getArray,$GPvarAlt=1)  
- * 1322:     function addSlashesOnArray(&$theArray)    
- * 1347:     function stripSlashesOnArray(&$theArray)  
- * 1370:     function slashArray($arr,$cmd)    
- * 1387:     function array_merge_recursive_overrule ($arr0,$arr1,$notAddKeys=0) 
- * 1417:     function array_merge($arr1,$arr2) 
- * 1431:     function csvValues($row,$delim=',',$quote='"')    
+ * 1125:     function inArray($in_array,$item) 
+ * 1143:     function intExplode($delim, $string)      
+ * 1163:     function revExplode($delim, $string, $count=0)    
+ * 1184:     function trimExplode($delim, $string, $onlyNonEmptyValues=0)      
+ * 1209:     function uniqueArray($valueArray) 
+ * 1232:     function removeArrayEntryByValue($array,$cmpValue)        
+ * 1261:     function implodeArrayForUrl($name,$theArray,$str='',$skipBlank=0,$rawurlencodeParamName=0)        
+ * 1289:     function compileSelectedGetVarsFromArray($varList,$getArray,$GPvarAlt=1)  
+ * 1313:     function addSlashesOnArray(&$theArray)    
+ * 1338:     function stripSlashesOnArray(&$theArray)  
+ * 1361:     function slashArray($arr,$cmd)    
+ * 1378:     function array_merge_recursive_overrule ($arr0,$arr1,$notAddKeys=0) 
+ * 1408:     function array_merge($arr1,$arr2) 
+ * 1422:     function csvValues($row,$delim=',',$quote='"')    
  *
  *              SECTION: HTML/XML PROCESSING
- * 1474:     function get_tag_attributes($tag) 
- * 1512:     function split_tag_attributes($tag)       
- * 1547:     function implodeParams($arr,$xhtmlSafe=FALSE,$dontOmitBlankAttribs=FALSE) 
- * 1575:     function wrapJS($string, $linebreak=TRUE) 
- * 1604:     function xml2tree($string,$depth=999) 
- * 1687:     function array2xml($array,$NSprefix='',$level=0,$docTag='phparray',$spaceInd=0)   
- * 1745:     function xml2array($string,$NSprefix='') 
- * 1804:     function xmlRecompileFromStructValArray($vals)    
- * 1847:     function xmlGetHeaderAttribs($xmlData)    
+ * 1465:     function get_tag_attributes($tag) 
+ * 1503:     function split_tag_attributes($tag)       
+ * 1538:     function implodeParams($arr,$xhtmlSafe=FALSE,$dontOmitBlankAttribs=FALSE) 
+ * 1566:     function wrapJS($string, $linebreak=TRUE) 
+ * 1595:     function xml2tree($string,$depth=999) 
+ * 1678:     function array2xml($array,$NSprefix='',$level=0,$docTag='phparray',$spaceInd=0)   
+ * 1736:     function xml2array($string,$NSprefix='') 
+ * 1795:     function xmlRecompileFromStructValArray($vals)    
+ * 1838:     function xmlGetHeaderAttribs($xmlData)    
  *
  *              SECTION: FILES FUNCTIONS
- * 1880:     function getURL($url)     
- * 1923:     function writeFile($file,$content)        
- * 1944:     function get_dirs($path)  
- * 1970:     function getFilesInDir($path,$extensionList='',$prependPath=0,$order='')  
- * 2015:     function getAllFilesAndFoldersInPath($fileArr,$path,$extList='',$regDirs=0,$recursivityLevels=99) 
- * 2037:     function removePrefixPathFromList($fileArr,$prefixToRemove)       
- * 2055:     function fixWindowsFilePath($theFile)     
- * 2065:     function resolveBackPath($pathStr)        
- * 2093:     function locationHeaderUrl($path) 
+ * 1871:     function getURL($url)     
+ * 1914:     function writeFile($file,$content)        
+ * 1937:     function get_dirs($path)  
+ * 1963:     function getFilesInDir($path,$extensionList='',$prependPath=0,$order='')  
+ * 2008:     function getAllFilesAndFoldersInPath($fileArr,$path,$extList='',$regDirs=0,$recursivityLevels=99) 
+ * 2030:     function removePrefixPathFromList($fileArr,$prefixToRemove)       
+ * 2048:     function fixWindowsFilePath($theFile)     
+ * 2058:     function resolveBackPath($pathStr)        
+ * 2086:     function locationHeaderUrl($path) 
  *
  *              SECTION: DEBUG helper FUNCTIONS
- * 2133:     function debug_ordvalue($string,$characters=100)  
- * 2150:     function view_array($array_in)    
- * 2178:     function print_array($array_in)   
- * 2194:     function debug($var="",$brOrHeader=0)     
+ * 2126:     function debug_ordvalue($string,$characters=100)  
+ * 2143:     function view_array($array_in)    
+ * 2171:     function print_array($array_in)   
+ * 2187:     function debug($var="",$brOrHeader=0)     
  *
  *              SECTION: SYSTEM INFORMATION
- * 2263:     function getThisUrl()     
- * 2280:     function linkThisScript($getParams=array())       
- * 2302:     function linkThisUrl($url,$getParams=array())     
- * 2322:     function getIndpEnv($getEnvName)  
+ * 2256:     function getThisUrl()     
+ * 2273:     function linkThisScript($getParams=array())       
+ * 2295:     function linkThisUrl($url,$getParams=array())     
+ * 2315:     function getIndpEnv($getEnvName)  
+ * 2499:     function milliseconds()   
+ * 2512:     function clientInfo($useragent='')        
  *
  *              SECTION: TYPO3 SPECIFIC FUNCTIONS
- * 2536:     function getFileAbsFileName($filename,$onlyRelative=1,$relToTYPO3_mainDir=0)      
- * 2571:     function validPathStr($theFile)   
- * 2583:     function isAbsPath($path) 
- * 2595:     function isAllowedAbsPath($path)  
- * 2613:     function verifyFilenameAgainstDenyPattern($filename)      
- * 2630:     function upload_copy_move($source,$destination)   
- * 2655:     function upload_to_tempfile($uploadedFileName)    
- * 2669:     function unlink_tempfile($uploadedTempFileName)   
- * 2682:     function tempnam($filePrefix)     
- * 2695:     function stdAuthCode($uid_or_record,$fields='')   
- * 2729:     function loadTCA($table)  
- * 2748:     function resolveSheetDefInDS($dataStructArray,$sheet='sDEF')      
- * 2776:     function resolveAllSheetsInDS($dataStructArray)   
- * 2805:     function callUserFunction($funcName,&$params,&$ref,$checkPrefix='user_',$silent=0)        
- * 2845:     function makeInstance($className) 
- * 2863:     function makeInstanceService($serviceType, $serviceSubType='', $excludeServiceKeys='')    
- * 2902:     function makeInstanceClassName($className)        
- * 2922:     function plainMailEncoded($email,$subject,$message,$headers='',$enc='',$charset='ISO-8859-1',$dontEncodeSubject=0)        
- * 2969:     function quoted_printable($string,$maxlen=76)     
- * 3012:     function substUrlsInPlainText($message,$urlmode='76',$index_script_url='')        
- * 3047:     function makeRedirectUrl($inUrl,$l=0,$index_script_url='')        
- * 3070:     function freetypeDpiComp($font_size)      
+ * 2601:     function getFileAbsFileName($filename,$onlyRelative=1,$relToTYPO3_mainDir=0)      
+ * 2637:     function validPathStr($theFile)   
+ * 2649:     function isAbsPath($path) 
+ * 2661:     function isAllowedAbsPath($path)  
+ * 2679:     function verifyFilenameAgainstDenyPattern($filename)      
+ * 2697:     function upload_copy_move($source,$destination)   
+ * 2725:     function upload_to_tempfile($uploadedFileName)    
+ * 2742:     function unlink_tempfile($uploadedTempFileName)   
+ * 2757:     function tempnam($filePrefix)     
+ * 2770:     function stdAuthCode($uid_or_record,$fields='')   
+ * 2804:     function loadTCA($table)  
+ * 2823:     function resolveSheetDefInDS($dataStructArray,$sheet='sDEF')      
+ * 2851:     function resolveAllSheetsInDS($dataStructArray)   
+ * 2880:     function callUserFunction($funcName,&$params,&$ref,$checkPrefix='user_',$silent=0)        
+ * 2920:     function makeInstance($className) 
+ * 2938:     function makeInstanceService($serviceType, $serviceSubType='', $excludeServiceKeys='')    
+ * 2977:     function makeInstanceClassName($className)        
+ * 2997:     function plainMailEncoded($email,$subject,$message,$headers='',$enc='',$charset='ISO-8859-1',$dontEncodeSubject=0)        
+ * 3044:     function quoted_printable($string,$maxlen=76)     
+ * 3087:     function substUrlsInPlainText($message,$urlmode='76',$index_script_url='')        
+ * 3122:     function makeRedirectUrl($inUrl,$l=0,$index_script_url='')        
+ * 3145:     function freetypeDpiComp($font_size)      
  *
- * TOTAL FUNCTIONS: 104
+ * TOTAL FUNCTIONS: 108
  * (This index is automatically created/updated by the extension "extdeveval")
  *
  */
@@ -203,38 +207,68 @@ class t3lib_div {
 
        /*************************
         *
-        * BASIC FUNCTIONS
+        * IO Variables
         *
         *************************/
 
 
        /**
-        * milliseconds
-        * 
-        * microtime recalculated to t3lib_div::milliseconds(1/1000 sec)
+        * Returns the 'GLOBAL' value of incoming data from POST or GET, with priority to POST (that is equalent to 'GP' order)
+        * Strips slashes from all output, both strings and arrays.
+        * This function substitutes t3lib_div::GPvar()
         * 
-        * Usage: 39
+        * @param       string          GET/POST var to return
+        * @return      mixed           POST var named $var and if not set, the GET var of the same name.
+        * @see GPvar()
+        */
+       function _GP($var)      {
+               $value = isset($GLOBALS['HTTP_POST_VARS'][$var]) ? $GLOBALS['HTTP_POST_VARS'][$var] : $GLOBALS['HTTP_GET_VARS'][$var];
+               if (is_array($value))   { t3lib_div::stripSlashesOnArray($value); } else { $value = stripslashes($value); }
+               return $value;
+       }
+
+       /**
+        * Returns the global GET array (or value from) normalized to contain un-escaped values.
+        * ALWAYS use this API function to acquire the GET variables!
         * 
-        * @return      integer         
+        * @param       string          Optional pointer to value in GET array (basically name of GET var)
+        * @return      mixed           If $var is set it returns the value of $HTTP_GET_VARS[$var]. If $var is blank or zero, returns $HTTP_GET_VARS itself. In any case *slashes are stipped from the output!*
+        * @see _POST(), _GP(), _GETset()
         */
-       function milliseconds() {
-               $p=explode(' ',microtime());
-               return round(($p[0]+$p[1])*1000);
+       function _GET($var='')  {
+               $getA = $GLOBALS['HTTP_GET_VARS'];
+               if (is_array($getA))    t3lib_div::stripSlashesOnArray($getA);  // Removes slashes since TYPO3 has added them regardless of magic_quotes setting.
+               return $var ? $getA[$var] : $getA;
        }
-       
+
        /**
-        * Sets global variables from HTTP_POST_VARS or HTTP_GET_VARS
+        * Returns the global POST array (or value from) normalized to contain un-escaped values.
+        * ALWAYS use this API function to acquire the POST variables!
         * 
-        * Usage: 9
+        * @param       string          Optional pointer to value in POST array (basically name of POST var)
+        * @return      mixed           If $var is set it returns the value of $HTTP_POST_VARS[$var]. If $var is blank or zero, returns $HTTP_POST_VARS itself. In any case *slashes are stipped from the output!*
+        * @see _GET(), _GP()
+        */
+       function _POST($var='') {
+               $postA = $GLOBALS['HTTP_POST_VARS'];
+               if (is_array($postA))   t3lib_div::stripSlashesOnArray($postA); // Removes slashes since TYPO3 has added them regardless of magic_quotes setting.
+               return $var ? $postA[$var] : $postA;
+       }
+
+       /**
+        * Writes input value to $HTTP_GET_VARS / $_GET
         * 
-        * @param       string          List of GET/POST var keys to set globally
-        * @param       boolean         If set, values are passed through stripslashes()
+        * @param       array           Array to write to $HTTP_GET_VARS / $_GET. Values should NOT be escaped at input time (but will be escaped before writing according to TYPO3 standards).
+        * @param       string          Alternative key; If set, this will not set the WHOLE GET array, but only the key in it specified by this value!
         * @return      void            
         */
-       function setGPvars($list,$strip=0)      {
-               $vars = t3lib_div::trimExplode(',',$list,1);
-               while(list(,$var)=each($vars))  {
-                       $GLOBALS[$var] = t3lib_div::GPvar($var,$strip);
+       function _GETset($inputGet,$key='')     {
+               if (!strcmp($key,''))   {
+                       if (is_array($inputGet))        { t3lib_div::addSlashesOnArray($inputGet); } else { $inputGet = addslashes($inputGet); }
+                       $GLOBALS['HTTP_GET_VARS'][$key] = $_GET[$key] = $inputGet;
+               } else {
+                       t3lib_div::addSlashesOnArray($inputGet);        // ADDS slashes since TYPO3 standard currently is that slashes MUST be applied (regardless of magic_quotes setting).
+                       $GLOBALS['HTTP_GET_VARS'] = $_GET = $inputGet;
                }
        }
 
@@ -248,6 +282,8 @@ class t3lib_div {
         * @param       string          GET/POST var to return
         * @param       boolean         If set, values are stripped of return values that are *arrays!* - string/integer values returned are always strip-slashed()
         * @return      mixed           POST var named $var and if not set, the GET var of the same name.
+        * @depreciated         Use t3lib_div::_GP instead (ALWAYS delivers a value with un-escaped values!)
+        * @see _GP()
         */
        function GPvar($var,$strip=0)   {
                $value = isset($GLOBALS['HTTP_POST_VARS'][$var]) ? $GLOBALS['HTTP_POST_VARS'][$var] : $GLOBALS['HTTP_GET_VARS'][$var];
@@ -257,6 +293,23 @@ class t3lib_div {
        }
 
        /**
+        * Sets global variables from HTTP_POST_VARS or HTTP_GET_VARS
+        * 
+        * Usage: 9
+        * 
+        * @param       string          List of GET/POST var keys to set globally
+        * @param       boolean         If set, values are passed through stripslashes()
+        * @return      void            
+        * @depreciated
+        */
+       function setGPvars($list,$strip=0)      {
+               $vars = t3lib_div::trimExplode(',',$list,1);
+               while(list(,$var)=each($vars))  {
+                       $GLOBALS[$var] = t3lib_div::GPvar($var,$strip);
+               }
+       }
+
+       /**
         * Returns the GET/POST global arrays merged with POST taking precedence.
         * 
         * Usage: 1
@@ -264,6 +317,7 @@ class t3lib_div {
         * @param       string          Key (variable name) from GET or POST vars
         * @return      array           Returns the GET vars merged recursively onto the POST vars.
         * @ignore
+        * @depreciated
         */
        function GParrayMerged($var)    {
                $postA = is_array($GLOBALS['HTTP_POST_VARS'][$var]) ? $GLOBALS['HTTP_POST_VARS'][$var] : array();
@@ -273,64 +327,6 @@ class t3lib_div {
                return $mergedA;
        }
 
-       /**
-        * Client Browser Information
-        * 
-        * Usage: 4
-        * 
-        * @param       string          Alternative User Agent string (if empty, t3lib_div::getIndpEnv('HTTP_USER_AGENT') is used)
-        * @return      array           Parsed information about the HTTP_USER_AGENT in categories BROWSER, VERSION, SYSTEM and FORMSTYLE
-        */
-       function clientInfo($useragent='')      {
-               if (!$useragent) $useragent=t3lib_div::getIndpEnv('HTTP_USER_AGENT');
-
-               $bInfo=array();
-                       // Which browser?
-               if (strstr($useragent,'Konqueror'))     {
-                       $bInfo['BROWSER']= 'konqu';
-               } elseif (strstr($useragent,'Opera'))   {
-                       $bInfo['BROWSER']= 'opera';
-               } elseif (strstr($useragent,'MSIE 4') || strstr($useragent,'MSIE 5') || strstr($useragent,'MSIE 6'))    {
-                       $bInfo['BROWSER']= 'msie';
-               } elseif (strstr($useragent,'Mozilla/4') || strstr($useragent,'Mozilla/5'))     {
-                       $bInfo['BROWSER']='net';
-               }
-               if ($bInfo['BROWSER'])  {
-                               // Browser version
-                       switch($bInfo['BROWSER'])       {
-                               case 'net':
-                                       $bInfo['VERSION']= doubleval(substr($useragent,8));
-                                       if (strstr($useragent,'Netscape6/')) {$bInfo['VERSION']=doubleval(substr(strstr($useragent,'Netscape6/'),10));}
-                                       if (strstr($useragent,'Netscape/7')) {$bInfo['VERSION']=doubleval(substr(strstr($useragent,'Netscape/7'),9));}
-                               break;
-                               case 'msie':
-                                       $tmp = strstr($useragent,'MSIE');
-                                       $bInfo['VERSION'] = doubleval(substr($tmp,4));
-                               break;
-                               case 'opera':
-                                       $tmp = strstr($useragent,'Opera');
-                                       $bInfo['VERSION'] = doubleval(substr($tmp,5));
-                               break;
-                               case 'konqu':
-                                       $tmp = strstr($useragent,'Konqueror/');
-                                       $bInfo['VERSION'] = doubleval(substr($tmp,10));
-                               break;
-                       }
-                               // Client system
-                       if (strstr($useragent,'Win'))   {
-                               $bInfo['SYSTEM'] = 'win';
-                       } elseif (strstr($useragent,'Mac'))     {
-                               $bInfo['SYSTEM'] = 'mac';
-                       } elseif (strstr($useragent,'Linux') || strstr($useragent,'X11') || strstr($useragent,'SGI') || strstr($useragent,' SunOS ') || strstr($useragent,' HP-UX '))   {
-                               $bInfo['SYSTEM'] = 'unix';
-                       }
-               }
-                       // Is true if the browser supports css to format forms, especially the width
-               $bInfo['FORMSTYLE']=($bInfo['BROWSER']=='msie' || ($bInfo['BROWSER']=='net'&&$bInfo['VERSION']>=5) || $bInfo['BROWSER']=='opera' || $bInfo['BROWSER']=='konqu');
-
-               return $bInfo;
-       }
-
        
        
        
@@ -1085,8 +1081,9 @@ class t3lib_div {
         * @return      boolean         Returns true if the $email address (input string) is valid; Has a "@", domain name with at least one period and only allowed a-z characters.
         */
        function validEmail($email)     {
+               $email = trim ($email);
                if (strstr($email,' '))  return FALSE;
-               return ereg('^[A-Za-z0-9\._-]+[@][A-Za-z0-9\._-]*[\.].[A-Za-z0-9]*$',$email) ? TRUE : FALSE;
+               return ereg('^[A-Za-z0-9\._-]+[@][A-Za-z0-9\._-]+[\.].[A-Za-z0-9]+$',$email) ? TRUE : FALSE;
        }
 
        /**
@@ -1292,17 +1289,17 @@ class t3lib_div {
         * 
         * @param       string          List of variable/key names
         * @param       array           Array from where to get values based on the keys in $varList
-        * @param       boolean         If set, then t3lib_div::GPvar() is used to fetch the value if not found (isset) in the $getArray
+        * @param       boolean         If set, then t3lib_div::_GP() is used to fetch the value if not found (isset) in the $getArray
         * @return      array           Output array with selected variables.
         */
        function compileSelectedGetVarsFromArray($varList,$getArray,$GPvarAlt=1)        {
                $keys = t3lib_div::trimExplode(',',$varList,1);
                $outArr=array();
-               while(list(,$v)=each($keys))    {
+               foreach($keys as $v)    {
                        if (isset($getArray[$v]))       {
                                $outArr[$v]=$getArray[$v];
                        } elseif ($GPvarAlt) {
-                               $outArr[$v]=t3lib_div::GPvar($v);
+                               $outArr[$v]=t3lib_div::_GP($v);
                        }
                }
                return $outArr;
@@ -1926,7 +1923,9 @@ class t3lib_div {
                        fclose( $fd );
                        
                                // Setting file system mode of file:
-                       if (@is_file($file) && TYPO3_OS!='WIN') { @chmod ($file, octdec($GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'])); }
+                       if (@is_file($file) && TYPO3_OS!='WIN') { 
+                               @chmod ($file, octdec($GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'])); 
+                       }
                        
                        return true;
                }
@@ -2279,14 +2278,16 @@ class t3lib_div {
         */
        function linkThisScript($getParams=array())     {       
                $parts = t3lib_div::getIndpEnv('SCRIPT_NAME');
-               $params = $GLOBALS['HTTP_GET_VARS'];
-               reset($getParams);
-               while(list($k,$v)=each($getParams))     {
+               $params = t3lib_div::_GET();
+
+               foreach($getParams as $k => $v) {
                        if (strcmp($v,''))      {
                                $params[$k]=$v;
                        } else unset($params[$k]);
                }
+
                $pString = t3lib_div::implodeArrayForUrl('',$params);
+
                return $pString ? $parts.'?'.ereg_replace('^&','',$pString) : $parts;
        }
 
@@ -2494,6 +2495,78 @@ class t3lib_div {
                }
        }
 
+       /**
+        * milliseconds
+        * 
+        * microtime recalculated to t3lib_div::milliseconds(1/1000 sec)
+        * 
+        * Usage: 39
+        * 
+        * @return      integer         
+        */
+       function milliseconds() {
+               $p=explode(' ',microtime());
+               return round(($p[0]+$p[1])*1000);
+       }
+
+       /**
+        * Client Browser Information
+        * 
+        * Usage: 4
+        * 
+        * @param       string          Alternative User Agent string (if empty, t3lib_div::getIndpEnv('HTTP_USER_AGENT') is used)
+        * @return      array           Parsed information about the HTTP_USER_AGENT in categories BROWSER, VERSION, SYSTEM and FORMSTYLE
+        */
+       function clientInfo($useragent='')      {
+               if (!$useragent) $useragent=t3lib_div::getIndpEnv('HTTP_USER_AGENT');
+
+               $bInfo=array();
+                       // Which browser?
+               if (strstr($useragent,'Konqueror'))     {
+                       $bInfo['BROWSER']= 'konqu';
+               } elseif (strstr($useragent,'Opera'))   {
+                       $bInfo['BROWSER']= 'opera';
+               } elseif (strstr($useragent,'MSIE 4') || strstr($useragent,'MSIE 5') || strstr($useragent,'MSIE 6'))    {
+                       $bInfo['BROWSER']= 'msie';
+               } elseif (strstr($useragent,'Mozilla/4') || strstr($useragent,'Mozilla/5'))     {
+                       $bInfo['BROWSER']='net';
+               }
+               if ($bInfo['BROWSER'])  {
+                               // Browser version
+                       switch($bInfo['BROWSER'])       {
+                               case 'net':
+                                       $bInfo['VERSION']= doubleval(substr($useragent,8));
+                                       if (strstr($useragent,'Netscape6/')) {$bInfo['VERSION']=doubleval(substr(strstr($useragent,'Netscape6/'),10));}
+                                       if (strstr($useragent,'Netscape/7')) {$bInfo['VERSION']=doubleval(substr(strstr($useragent,'Netscape/7'),9));}
+                               break;
+                               case 'msie':
+                                       $tmp = strstr($useragent,'MSIE');
+                                       $bInfo['VERSION'] = doubleval(substr($tmp,4));
+                               break;
+                               case 'opera':
+                                       $tmp = strstr($useragent,'Opera');
+                                       $bInfo['VERSION'] = doubleval(substr($tmp,5));
+                               break;
+                               case 'konqu':
+                                       $tmp = strstr($useragent,'Konqueror/');
+                                       $bInfo['VERSION'] = doubleval(substr($tmp,10));
+                               break;
+                       }
+                               // Client system
+                       if (strstr($useragent,'Win'))   {
+                               $bInfo['SYSTEM'] = 'win';
+                       } elseif (strstr($useragent,'Mac'))     {
+                               $bInfo['SYSTEM'] = 'mac';
+                       } elseif (strstr($useragent,'Linux') || strstr($useragent,'X11') || strstr($useragent,'SGI') || strstr($useragent,' SunOS ') || strstr($useragent,' HP-UX '))   {
+                               $bInfo['SYSTEM'] = 'unix';
+                       }
+               }
+                       // Is true if the browser supports css to format forms, especially the width
+               $bInfo['FORMSTYLE']=($bInfo['BROWSER']=='msie' || ($bInfo['BROWSER']=='net'&&$bInfo['VERSION']>=5) || $bInfo['BROWSER']=='opera' || $bInfo['BROWSER']=='konqu');
+
+               return $bInfo;
+       }
+
        
        
 
@@ -2567,6 +2640,7 @@ class t3lib_div {
         * 
         * @param       string          Filepath to evaluate
         * @return      boolean         True, if no '//', '..' or '\' is in the $theFile
+        * @todo        Possible improvement: Should it rawurldecode the string first to check if any of these characters is encoded ?
         */
        function validPathStr($theFile) {
                if (!strstr($theFile,'//') && !strstr($theFile,'..') && !strstr($theFile,'\\')) return true;
index d2fec51..b4b9c61 100755 (executable)
@@ -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']);
                }
        }
 
index 8c6cf3c..beb8039 100755 (executable)
@@ -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
index f3846ba..0ca3d5a 100644 (file)
@@ -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
index 5e46402..5e30540 100755 (executable)
@@ -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;
index a89a842..d7ba8dd 100755 (executable)
@@ -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);
index 17bcfbe..51b0fd9 100644 (file)
@@ -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;
index 28d2293..892ab04 100755 (executable)
@@ -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;
index 790cccf..6722c8f 100755 (executable)
@@ -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).' />';
+                                       }
                                }
                        }
                }               
index df930ac..707ce99 100644 (file)
@@ -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']);
                }
        }
 
index 68f5247..ff20ffa 100755 (executable)
@@ -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;
index a014f74..3957657 100755 (executable)
@@ -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
index ce98e04..c1f882a 100755 (executable)
@@ -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>';
                }
                
                        
index 85683a7..1965043 100755 (executable)
@@ -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++;
+                       }
+               }
+
+               return $out;
+       }       
 }
 
 
index 12bb080..d704db6 100755 (executable)
@@ -679,7 +679,7 @@ class t3lib_transferData {
                                        foreach($theExcludeFields as $theExcludeFieldsArrays)   {
                                                foreach($elements as $eKey => $value)   {
                                                        if (!strcmp($theExcludeFieldsArrays[1],$value)) {
-                                                               $dataAcc[$eKey]=rawurlencode($value).'|'.rawurlencode(ereg_replace(':$','',stripslashes($theExcludeFieldsArrays[0])));
+                                                               $dataAcc[$eKey]=rawurlencode($value).'|'.rawurlencode(ereg_replace(':$','',$theExcludeFieldsArrays[0]));
                                                        }
                                                }
                                        }
index 90f22df..07eac11 100755 (executable)
@@ -569,7 +569,7 @@ class 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[$PM[0]]))       {
                                if ($PM[1])     {       // set
index c94bfd5..19e5e24 100755 (executable)
@@ -130,7 +130,12 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
                        reset($this->extAdminConfig['enable.']);
                        while(list($k,$v)=each($this->extAdminConfig['enable.']))       {
                                if ($v) {
+                                               // Enable panel
                                        $this->extAdmEnabled=1;
+                                       
+                                               // Init TSFE_EDIT variables:
+                                       $this->TSFE_EDIT = t3lib_div::_POST('TSFE_EDIT');
+
                                        break;
                                }
                        }
@@ -358,7 +363,7 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
                        $out.=$this->extGetItem('edit_editNoPopup', '<input type="hidden" name="TSFE_ADMIN_PANEL[edit_editNoPopup]" value="0" /><input type="checkbox" name="TSFE_ADMIN_PANEL[edit_editNoPopup]" value="1"'.($this->uc['TSFE_adminConfig']['edit_editNoPopup']?' checked="checked"':'').' />');
 
                        $out.=$this->extGetItem('', $this->ext_makeToolBar());
-                       if (!t3lib_div::GPvar('ADMCMD_view'))   {
+                       if (!t3lib_div::_GP('ADMCMD_view'))     {
                                $out.=$this->extGetItem('', '<a href="#" onclick="'.
                                        htmlspecialchars('
                                                if (parent.opener && parent.opener.top && parent.opener.top.TS) {
@@ -683,9 +688,9 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
         * @return      void            
         */
        function extSaveFeAdminConfig() {
-               if (is_array($GLOBALS['HTTP_POST_VARS']['TSFE_ADMIN_PANEL']))   {
+               $input = t3lib_div::_POST('TSFE_ADMIN_PANEL');
+               if (is_array($input))   {
                                // Setting
-                       $input = $GLOBALS['HTTP_POST_VARS']['TSFE_ADMIN_PANEL'];
                        $this->uc['TSFE_adminConfig'] = array_merge(!is_array($this->uc['TSFE_adminConfig'])?array():$this->uc['TSFE_adminConfig'], $input);                    // Candidate for t3lib_div::array_merge() if integer-keys will some day make trouble...
                        unset($this->uc['TSFE_adminConfig']['action']);
                        
@@ -894,15 +899,10 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
         * @see index_ts.php
         */
        function extIsEditAction()      {
-               $TSFE_EDIT = $GLOBALS['HTTP_POST_VARS']['TSFE_EDIT'];
-               if (is_array($TSFE_EDIT))       {
-/*                     $cmd=(string)$TSFE_EDIT['cmd'];
-                       if ($cmd!="edit" && $cmd!='new')        {
-                               return true;
-                       }*/
-                       if ($TSFE_EDIT['cancel'])       {
-                               unset($TSFE_EDIT['cmd']);
-                       } elseif (($cmd!='edit' || (is_array($TSFE_EDIT['data']) && ($TSFE_EDIT['update'] || $TSFE_EDIT['update_close']))) && $cmd!='new')      {
+               if (is_array($this->TSFE_EDIT)) {
+                       if ($this->TSFE_EDIT['cancel']) {
+                               unset($this->TSFE_EDIT['cmd']);
+                       } elseif (($cmd!='edit' || (is_array($this->TSFE_EDIT['data']) && ($this->TSFE_EDIT['update'] || $this->TSFE_EDIT['update_close']))) && $cmd!='new')    {
                                        // $cmd can be a command like "hide" or "move". If $cmd is "edit" or "new" it's an indication to show the formfields. But if data is sent with update-flag then $cmd = edit is accepted because edit may be sendt because of .keepGoing flag.
                                return true;
                        }
@@ -917,9 +917,8 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
         * @see index_ts.php
         */
        function extIsFormShown()       {
-               $TSFE_EDIT = $GLOBALS['HTTP_POST_VARS']['TSFE_EDIT'];
-               if (is_array($TSFE_EDIT))       {
-                       $cmd=(string)$TSFE_EDIT['cmd'];
+               if (is_array($this->TSFE_EDIT)) {
+                       $cmd=(string)$this->TSFE_EDIT['cmd'];
                        if ($cmd=='edit' || $cmd=='new')        {
                                return true;
                        }
@@ -936,14 +935,12 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
        function extEditAction()        {
                global $TCA;
                        // Commands:
-               $TSFE_EDIT = $GLOBALS['HTTP_POST_VARS']['TSFE_EDIT'];
-
-               list($table,$uid) = explode(':',$TSFE_EDIT['record']);
-               if ($TSFE_EDIT['cmd'] && $table && $uid && isset($TCA[$table])) {
+               list($table,$uid) = explode(':',$this->TSFE_EDIT['record']);
+               if ($this->TSFE_EDIT['cmd'] && $table && $uid && isset($TCA[$table]))   {
                        $tce = t3lib_div::makeInstance('t3lib_TCEmain');
                        $recData=array();
                        $cmdData=array();
-                       $cmd=$TSFE_EDIT['cmd'];
+                       $cmd=$this->TSFE_EDIT['cmd'];
                        switch($cmd)    {
                                case 'hide':
                                case 'unhide':
@@ -1017,10 +1014,10 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
                        }
                }
                        // Data:
-               if (($TSFE_EDIT['doSave'] || $TSFE_EDIT['update'] || $TSFE_EDIT['update_close']) && is_array($TSFE_EDIT['data']))       {
+               if (($this->TSFE_EDIT['doSave'] || $this->TSFE_EDIT['update'] || $this->TSFE_EDIT['update_close']) && is_array($this->TSFE_EDIT['data']))       {
                        $tce = t3lib_div::makeInstance('t3lib_TCEmain');
-                       #       $tce->stripslashes_values=0; // This line is NOT needed because $TSFE_EDIT['data'] is already slashed and needs slashes stripped.
-                       $tce->start($TSFE_EDIT['data'],Array());
+                       $tce->stripslashes_values=0;
+                       $tce->start($this->TSFE_EDIT['data'],Array());
                        $tce->process_uploads($GLOBALS['HTTP_POST_FILES']);
                        $tce->process_datamap();
                }
index a898276..65e486a 100755 (executable)
@@ -1445,7 +1445,7 @@ class t3lib_tsparser_ext extends t3lib_TStemplate {
                        while(list($key,$var)=each($data))      {
                                if (isset($theConstants[$key])) {
                                        if ($this->ext_dontCheckIssetValues || isset($check[$key]))     {               // If checkbox is set, update the value
-                                               list($var) = explode(chr(10),stripslashes($var));       // exploding with linebreak, just to make sure that no multiline input is given!
+                                               list($var) = explode(chr(10),$var);     // exploding with linebreak, just to make sure that no multiline input is given!
                                                $typeDat=$this->ext_getTypeData($theConstants[$key]["type"]);
                                                switch($typeDat["type"])        {
                                                        case "int":
@@ -1477,7 +1477,7 @@ class t3lib_tsparser_ext extends t3lib_TStemplate {
                                                        break;
                                                        case "wrap":
                                                                if (isset($Wdata[$key]))        {
-                                                                       $var.="|".stripslashes($Wdata[$key]);
+                                                                       $var.="|".$Wdata[$key];
                                                                }
                                                        break;
                                                        case "offset":
index 3a666b0..c7be155 100755 (executable)
@@ -466,7 +466,7 @@ class t3lib_TStemplate      {
                                // This feature allows us a hack to test/demonstrate various included templates on the same set of content bearing pages. Used by the "freesite" extension.
                        $basedOn_hackFeature = explode('=',$row['basedOn']);
                        if ($basedOn_hackFeature[0]=='EXTERNAL_BASED_ON_TEMPLATE_ID' && $basedOn_hackFeature[1])                {       
-                               $id=intval($GLOBALS['HTTP_GET_VARS'][$basedOn_hackFeature[1]]);
+                               $id=intval(t3lib_div::_GET($basedOn_hackFeature[1]));
                                if ($id && !t3lib_div::inList($idList,'sys_'.$id))      {       // if $id is not allready included ...
                                        $res = mysql(TYPO3_db, 'SELECT * FROM sys_template WHERE uid='.$id.' '.$this->whereClause);
                                        echo mysql_error();
index b16330d..97528ba 100755 (executable)
@@ -851,7 +851,7 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
                        $fields_values['event_pid']=intval($event_pid);
                        $fields_values['NEWid']=$NEWid;
                        
-                       $query = t3lib_BEfunc::DBcompileInsert('sys_log',$fields_values,1);
+                       $query = t3lib_BEfunc::DBcompileInsert('sys_log',$fields_values);
 
                        mysql(TYPO3_db,$query);
                        return mysql_insert_id();
index 0143601..ad7bd0f 100755 (executable)
@@ -93,9 +93,9 @@ $TYPO3_CONF_VARS = Array(
                'fileadminDir' => 'fileadmin/',                 // Path to the fileadmin dir. This is relative to PATH_site. (Automatically mounted for admin-users if set)
                'RTE_imageStorageDir' => 'uploads/',    // Storage directory for Rich Text Editor files
                'staticFileEditPath' => 'fileadmin/static/',    // Path to directory with static files for editing (see table sys_staticfiles_edit). Relative to PATH_site.
-               'lockRootPath' => '',                                   // First part of the userHomePath/groupHomePath. Observe that the first part of 'userHomePath' and 'groupHomePath' must be the value of 'lockRootPath'. Eg. '/home/typo3/'. This path is also used to evaluate if paths outside the PATH_site should be allowed.
-               'userHomePath' => '',                                   // Path to the directory where TYPO3 backend-users have their home-dirs.  Eg. '/home/typo3/users/'. A home for backend user 2 would be: '/home/typo3/users/2/'.
-               'groupHomePath' => '',                                  // Path to the directory where TYPO3 backend-groups have their home-dirs. Remember that the first part of this path must be 'lockRootPath'. Eg. '/home/typo3/groups/'. A home for backend group 1 would be: '/home/typo3/groups/1/'.
+               'lockRootPath' => '',                                   // First part of the userHomePath/groupHomePath. Observe that the first part of 'userHomePath' and 'groupHomePath' must be the value of 'lockRootPath'. Eg. '/home/typo3/'. This path is also used to evaluate if paths outside the PATH_site should be allowed. Ending slash required!
+               'userHomePath' => '',                                   // Path to the directory where TYPO3 backend-users have their home-dirs.  Eg. '/home/typo3/users/'. A home for backend user 2 would be: '/home/typo3/users/2/'. Ending slash required!
+               'groupHomePath' => '',                                  // Path to the directory where TYPO3 backend-groups have their home-dirs. Remember that the first part of this path must be 'lockRootPath'. Eg. '/home/typo3/groups/'. A home for backend group 1 would be: '/home/typo3/groups/1/'. Ending slash required!
                'userUploadDir' => '',                                  // Suffix to the user home dir which is what gets mounted in TYPO3. Eg. if the user dir is "../123_user/" and this value is "/upload" then "../123_user/upload" gets mounted.
                'fileCreateMask' => '0644',                             // File mode mask for unix file systems (when files are uploaded/created)
                'folderCreateMask' => '0755',                   // As above, but for folders.
index dd34b00..20779ad 100755 (executable)
@@ -136,7 +136,7 @@ $TCA['be_users'] = Array (
                        'config' => Array (
                                'type' => 'select',
                                'foreign_table' => 'sys_filemounts',
-                               'foreign_table_where' => 'ORDER BY sys_filemounts.title',
+                               'foreign_table_where' => ' AND sys_filemounts.pid=0 ORDER BY sys_filemounts.title',
 #                              'type' => 'group',
 #                              'internal_type' => 'db',
 #                                      'allowed' => 'sys_filemounts',
@@ -377,9 +377,12 @@ $TCA['be_groups'] = Array (
                'file_mountpoints' => Array (
                        'label' => 'File Mounts:',
                        'config' => Array (
-                               'type' => 'group',
-                               'internal_type' => 'db',
-                                       'allowed' => 'sys_filemounts',
+                               'type' => 'select',
+                               'foreign_table' => 'sys_filemounts',
+                               'foreign_table_where' => ' AND sys_filemounts.pid=0 ORDER BY sys_filemounts.title',
+#                              'type' => 'group',
+#                              'internal_type' => 'db',
+#                                      'allowed' => 'sys_filemounts',
                                'size' => '3',
                                'maxitems' => '10',
                                'autoSizeMax' => 10,
index d8285cc..b14f03f 100755 (executable)
@@ -132,8 +132,8 @@ class SC_t3lib_thumbs {
                global $TYPO3_CONF_VARS;
 
                        // Setting GPvars:
-               $this->file = t3lib_div::GPvar('file');
-               $this->size = t3lib_div::GPvar('size');
+               $this->file = t3lib_div::_GP('file');
+               $this->size = t3lib_div::_GP('size');
 
                        // Image extension list is set:
                $this->imageList = $TYPO3_CONF_VARS['GFX']['imagefile_ext'];                    // valid extensions. OBS: No spaces in the list, all lowercase...
index 7d87f32..c620762 100755 (executable)
@@ -155,8 +155,8 @@ class clickMenu {
        function init($item)    {
 
                        // Setting GPvars:
-               $this->cmLevel = intval(t3lib_div::GPvar('cmLevel'));
-               $this->CB = t3lib_div::GPvar('CB');
+               $this->cmLevel = intval(t3lib_div::_GP('cmLevel'));
+               $this->CB = t3lib_div::_GP('CB');
 
 
                        // Explode the incoming command:
@@ -1170,8 +1170,8 @@ class SC_alt_clickmenu {
                global $BE_USER,$BACK_PATH;
                
                        // Setting GPvars:
-               $this->backPath = t3lib_div::GPvar('backPath');
-               $this->item = t3lib_div::GPvar('item');
+               $this->backPath = t3lib_div::_GP('backPath');
+               $this->item = t3lib_div::_GP('item');
 
                        // Setting pseudo module name
                $this->MCONF['name']='xMOD_alt_clickmenu.php';
@@ -1258,7 +1258,6 @@ class SC_alt_clickmenu {
         * @return      void            
         */
        function main() {
-               global $HTTP_GET_VARS;
 
                        // Initialize Clipboard object:
                $clipObj = t3lib_div::makeInstance('t3lib_clipboard');
@@ -1266,7 +1265,8 @@ class SC_alt_clickmenu {
                $clipObj->lockToNormal();       // This locks the clipboard to the Normal for this request.
                
                        // Update clipboard if some actions are sent.
-               $CB = $HTTP_GET_VARS['CB'];
+               $CB = t3lib_div::_GET('CB');
+               
                $clipObj->setCmd($CB);
                $clipObj->cleanCurrent();
                $clipObj->endClipboard();       // Saves
index 48e60e2..5a96489 100755 (executable)
@@ -148,8 +148,8 @@ class SC_alt_db_navframe {
                global $BE_USER,$BACK_PATH;
 
                        // Setting GPvars:
-               $this->currentSubScript = t3lib_div::GPvar('currentSubScript');
-               $this->cMR = t3lib_div::GPvar('cMR');
+               $this->currentSubScript = t3lib_div::_GP('currentSubScript');
+               $this->cMR = t3lib_div::_GP('cMR');
                
                        // Create page tree object:
                $this->pagetree = t3lib_div::makeInstance('localPageTree');
index ac89e81..206e10c 100755 (executable)
@@ -162,17 +162,17 @@ class SC_alt_doc {
         * @return      void            
         */
        function preInit()      {
-               global $BE_USER,$HTTP_GET_VARS;
+               global $BE_USER;
                
                        // Setting GPvars:
-               $this->editconf = t3lib_div::GPvar('edit');
-               $this->defVals = t3lib_div::GPvar('defVals',1);
-               $this->overrideVals = t3lib_div::GPvar('overrideVals',1);
-               $this->columnsOnly = t3lib_div::GPvar('columnsOnly',1);
-               $this->returnUrl = t3lib_div::GPvar('returnUrl');
-               $this->closeDoc = t3lib_div::GPvar('closeDoc');
-               $this->doSave = t3lib_div::GPvar('doSave');
-               $this->returnEditConf = t3lib_div::GPvar('returnEditConf');
+               $this->editconf = t3lib_div::_GP('edit');
+               $this->defVals = t3lib_div::_GP('defVals');
+               $this->overrideVals = t3lib_div::_GP('overrideVals');
+               $this->columnsOnly = t3lib_div::_GP('columnsOnly');
+               $this->returnUrl = t3lib_div::_GP('returnUrl');
+               $this->closeDoc = t3lib_div::_GP('closeDoc');
+               $this->doSave = t3lib_div::_GP('doSave');
+               $this->returnEditConf = t3lib_div::_GP('returnEditConf');
                
                        // Setting override values as default if defVals does not exist.
                if (!is_array($this->defVals) && is_array($this->overrideVals)) {
@@ -184,8 +184,7 @@ class SC_alt_doc {
                
                        // Make R_URL (request url) based on input GETvars:
                $this->R_URL_parts = parse_url(t3lib_div::getIndpEnv('REQUEST_URI'));
-               $this->R_URL_getvars = $HTTP_GET_VARS;
-               
+               $this->R_URL_getvars = t3lib_div::_GET();
                
                        // MAKE url for storing
                $this->compileStoreDat();
@@ -204,7 +203,7 @@ class SC_alt_doc {
                }
                
                        // If NO vars are sent to the script, try to read first document:
-               if (is_array($HTTP_GET_VARS) && count($HTTP_GET_VARS)<2 && !is_array($this->editconf))  {       // Added !is_array($this->editconf) because editConf must not be set either. Anyways I can't figure out when this situation here will apply...
+               if (is_array($this->R_URL_getvars) && count($this->R_URL_getvars)<2 && !is_array($this->editconf))      {       // Added !is_array($this->editconf) because editConf must not be set either. Anyways I can't figure out when this situation here will apply...
                        $this->setDocument($this->docDat[1]);
                }
        }
@@ -227,20 +226,21 @@ class SC_alt_doc {
         * @return      void            
         */
        function processData()  {
-               global $BE_USER,$HTTP_GET_VARS,$HTTP_POST_VARS,$TYPO3_CONF_VARS;
+               global $BE_USER,$HTTP_POST_VARS,$TYPO3_CONF_VARS;
 
                        // GPvars specifically for processing:
-               $this->data = t3lib_div::GPvar('data');
-               $this->mirror = t3lib_div::GPvar('mirror');
-               $this->cacheCmd = t3lib_div::GPvar('cacheCmd');
-               $this->redirect = t3lib_div::GPvar('redirect');
-               $this->disableRTE = t3lib_div::GPvar('_disableRTE');
-               $this->returnNewPageId = t3lib_div::GPvar('returnNewPageId');
-               $this->vC = t3lib_div::GPvar('vC');
+               $this->data = t3lib_div::_GP('data');
+               $this->mirror = t3lib_div::_GP('mirror');
+               $this->cacheCmd = t3lib_div::_GP('cacheCmd');
+               $this->redirect = t3lib_div::_GP('redirect');
+               $this->disableRTE = t3lib_div::_GP('_disableRTE');
+               $this->returnNewPageId = t3lib_div::_GP('returnNewPageId');
+               $this->vC = t3lib_div::_GP('vC');
 
                        // See tce_db.php for relevate options here:
                        // Only options related to $this->data submission are included here.
                $tce = t3lib_div::makeInstance('t3lib_TCEmain');
+               $tce->stripslashes_values=0;
        
                        // Setting default values specific for the user:
                $TCAdefaultOverride = $BE_USER->getTSConfigProp('TCAdefaults');
@@ -291,11 +291,9 @@ class SC_alt_doc {
                                
                                        // Finally, set the editconf array in the "getvars" so they will be passed along in URLs as needed.
                                $this->R_URL_getvars['edit']=$this->editconf;
-                               $HTTP_GET_VARS['edit']=$this->editconf;         // Just a note: Setting HTTP_GET_VARS here IS used by compileStoreDat() at the moment - but even if that is changed, the making of shortcuts on the buttom of the page will still look up values in HTTP_GET_VARS to make the shortcut. So I suppose the setting of HTTP_GET_VARS should be maintained.
                                        
                                        // Unsetting default values since we don't need them anymore.
                                unset($this->R_URL_getvars['defVals']);
-                               unset($HTTP_GET_VARS['defVals']);
                                
                                        // Re-compile the store* values since editconf changed...
                                $this->compileStoreDat();
@@ -323,7 +321,6 @@ class SC_alt_doc {
                                
                                        // Finally, set the editconf array in the "getvars" so they will be passed along in URLs as needed.
                                $this->R_URL_getvars['edit']=$this->editconf;
-                               $HTTP_GET_VARS['edit']=$this->editconf;
                                
                                        // Re-compile the store* values since editconf changed...
                                $this->compileStoreDat();
@@ -349,12 +346,12 @@ class SC_alt_doc {
                global $BE_USER,$LANG,$BACK_PATH,$HTTP_POST_VARS;
 
                        // Setting more GPvars:
-               $this->popViewId = t3lib_div::GPVar('popViewId');
-               $this->viewUrl = t3lib_div::GPvar('viewUrl');           
-               $this->editRegularContentFromId = t3lib_div::GPvar('editRegularContentFromId');
-               $this->recTitle = t3lib_div::GPvar('recTitle');
-               $this->disHelp = t3lib_div::GPvar('disHelp');
-               $this->noView = t3lib_div::GPvar('noView');
+               $this->popViewId = t3lib_div::_GP('popViewId');
+               $this->viewUrl = t3lib_div::_GP('viewUrl');             
+               $this->editRegularContentFromId = t3lib_div::_GP('editRegularContentFromId');
+               $this->recTitle = t3lib_div::_GP('recTitle');
+               $this->disHelp = t3lib_div::_GP('disHelp');
+               $this->noView = t3lib_div::_GP('noView');
 
                        // Set other internal variables:                
                $this->R_URL_getvars['returnUrl']=$this->retUrl;
@@ -374,7 +371,7 @@ class SC_alt_doc {
                $this->MCONF['name']='xMOD_alt_doc.php';
 
                        // CLEANSE SETTINGS
-               $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']);
 
                        // Create an instance of the document template object
                $this->doc = t3lib_div::makeInstance('bigDoc');
@@ -996,12 +993,9 @@ class SC_alt_doc {
         * 
         * @return      void            
         * @see makeDocSel()
-        * @todo        Check if $HTTP_GET_VARS should not be used, but rather the internal variables (eg. $this->R_URL_getvars) holding the same values...?
         */
        function compileStoreDat()      {
-               global $HTTP_GET_VARS;
-
-               $this->storeArray = t3lib_div::compileSelectedGetVarsFromArray('edit,defVals,overrideVals,columnsOnly,disHelp,noView,editRegularContentFromId',$HTTP_GET_VARS);
+               $this->storeArray = t3lib_div::compileSelectedGetVarsFromArray('edit,defVals,overrideVals,columnsOnly,disHelp,noView,editRegularContentFromId',$this->R_URL_getvars);
                $this->storeUrl = t3lib_div::implodeArrayForUrl('',$this->storeArray);
                $this->storeUrlMd5 = md5($this->storeUrl);
        }
index 16a5379..da724d7 100755 (executable)
@@ -86,8 +86,8 @@ class SC_alt_file_navframe {
                global $BE_USER,$BACK_PATH,$CLIENT;
 
                        // Setting GPvars:
-               $this->currentSubScript = t3lib_div::GPvar('currentSubScript');
-               $this->cMR = t3lib_div::GPvar('cMR');
+               $this->currentSubScript = t3lib_div::_GP('currentSubScript');
+               $this->cMR = t3lib_div::_GP('cMR');
                
                        // Create folder tree object:
                $this->foldertree = t3lib_div::makeInstance('t3lib_folderTree');
index 1e2e18c..2bbe6f6 100755 (executable)
@@ -114,7 +114,7 @@ class SC_alt_intro {
                } else {
                        $warrantyNote='TYPO3 comes with ABSOLUTELY NO WARRANTY; <a href="http://typo3.com/1316.0.html" target="_blank">click for details.</a>';
                }
-               $cNotice='<a href="http://typo3.com/" target="_blank"><img src="gfx/loginlogo_transp.gif" width="75" vspace="2" height="19" alt="TYPO3 logo" align="left" />TYPO3 CMS ver. '.htmlspecialchars($GLOBALS['TYPO_VERSION']).'</a>. Copyright &copy; 1998-2003 Kasper Sk&aring;rh&oslash;j. Extensions are copyright of their respective owners. Go to <a href="http://typo3.com/" target="_blank">http://typo3.com/</a> for details.
+               $cNotice='<a href="http://typo3.com/" target="_blank"><img src="gfx/loginlogo_transp.gif" width="75" vspace="2" height="19" alt="TYPO3 logo" align="left" />TYPO3 CMS ver. '.htmlspecialchars($GLOBALS['TYPO_VERSION']).'</a>. Copyright &copy; 1998-2004 Kasper Sk&aring;rh&oslash;j. Extensions are copyright of their respective owners. Go to <a href="http://typo3.com/" target="_blank">http://typo3.com/</a> for details.
                '.strip_tags($warrantyNote,'<a>').' This is free software, and you are welcome to redistribute it under certain conditions; <a href="http://typo3.com/1316.0.html" target="_blank">click for details</a>. Obstructing the appearance of this notice is prohibited by law.';
 
 
index 6c5a276..959d7d7 100755 (executable)
@@ -91,7 +91,7 @@ class SC_alt_menu {
                global $TBE_MODULES;
                
                        // Setting GPvars:
-               $this->_clearCacheFiles = t3lib_div::GPvar('_clearCacheFiles');
+               $this->_clearCacheFiles = t3lib_div::_GP('_clearCacheFiles');
 
                        // Loads the backend modules available for the logged in user.
                $this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
@@ -109,6 +109,7 @@ class SC_alt_menu {
                $TBE_TEMPLATE->docType='xhtml_trans';
                $TBE_TEMPLATE->divClass='vertical-menu';
                $this->content.=$TBE_TEMPLATE->startPage('Vertical Backend Menu');
+               $backPath = $GLOBALS['BACK_PATH'];
 
                        // Printing the menu
                $alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
@@ -116,6 +117,8 @@ class SC_alt_menu {
                
                        // clear cache commands for Admins
                if($BE_USER->isAdmin()) {
+                       $functionsArray = $alt_menuObj->adminFunctions($backPath);
+                       
                        $this->content.='
                        
 <!-- 
@@ -129,37 +132,21 @@ class SC_alt_menu {
                                // Table with those admin functions
                        $this->content.='
                                <table border="0" cellpadding="0" cellspacing="1" width="100%">';
-                       
-                               // Clearing of cache-files in typo3conf/ + menu
-                       if ($TYPO3_CONF_VARS['EXT']['extCache'])        {
-                               if ($this->_clearCacheFiles)    {
-                                       $this->removeCacheFiles();
-                               }
-                               $this->content.='
-                                       <tr>
-                                               <td valign="top" align="center"><img'.t3lib_iconWorks::skinImg($backPath,'gfx/clear_cache_files_in_typo3c.gif','width="21" height="18"').' alt="" /></td>
-                                               <td><a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('_clearCacheFiles'=>1))).'">'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.clearCache_allTypo3Conf',1).'</a></td>
-                                       </tr>';
 
-                                       // Divider
-                               $this->content.='
+                       $rows=array();                  
+                       foreach($functionsArray as $functionsArraySetup)        {
+                               $rows[]='
                                        <tr>
-                                               <td colspan="2"><img'.t3lib_iconWorks::skinImg($backPath,'gfx/altmenuline.gif','width="105" height="3"').' alt="" /></td>
+                                               <td valign="top" align="center">'.$functionsArraySetup['icon'].'</td>
+                                               <td><a href="'.htmlspecialchars($functionsArraySetup['href']).'">'.htmlspecialchars($functionsArraySetup['title']).'</a></td>
                                        </tr>';
                        }
-
-                               // clear all page cache
-                       $href = htmlspecialchars($this->backPath.'tce_db.php?vC='.$BE_USER->veriCode().
-                                               '&redirect='.rawurlencode(t3lib_div::getIndpEnv('TYPO3_REQUEST_SCRIPT')).
-                                               '&cacheCmd=all'
-                                       );
-                       $this->content.='
-                               <tr>
-                                       <td valign="top" align="center"><img'.t3lib_iconWorks::skinImg($backPath,'gfx/clear_all_cache.gif','width="21" height="18"').' alt="" /></td>
-                                       <td><a href="'.$href.'">'.
-                                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.clearCache_all',1).
-                                       '</a></td>
-                               </tr>';
+                       
+                               // Imploding around the divider table row:
+                       $this->content.=implode('
+                                       <tr>
+                                               <td colspan="2"><img'.t3lib_iconWorks::skinImg($backPath,'gfx/altmenuline.gif','width="105" height="3"').' alt="" /></td>
+                                       </tr>',$rows);
 
                        $this->content.='
                                </table>';
@@ -184,25 +171,6 @@ class SC_alt_menu {
        }
 
        /**
-        * Unlink (delete) 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++;
-                       }
-               }
-               return $out;
-       }
-
-       /**
         * Outputting the accumulated content to screen
         * 
         * @return      void            
index f8b0ad7..15051e3 100755 (executable)
@@ -89,9 +89,9 @@ class SC_alt_mod_frameset {
                global $BE_USER,$TBE_TEMPLATE,$TBE_STYLES;
 
                        // GPvars:
-               $this->exScript = t3lib_div::GPvar('exScript');
-               $this->id = t3lib_div::GPvar('id');
-               $this->fW = t3lib_div::GPvar('fW');
+               $this->exScript = t3lib_div::_GP('exScript');
+               $this->id = t3lib_div::_GP('id');
+               $this->fW = t3lib_div::_GP('fW');
                
                        // Setting resizing flag:
                $this->resizable = $BE_USER->uc['navFrameResizable'] ? TRUE : FALSE;
@@ -105,8 +105,8 @@ class SC_alt_mod_frameset {
                }
                
                        // Navigation frame URL:
-               $script = t3lib_div::GPvar('script');
-               $nav = t3lib_div::GPvar('nav');
+               $script = t3lib_div::_GP('script');
+               $nav = t3lib_div::_GP('nav');
                $URL_nav = htmlspecialchars($nav.'?currentSubScript='.rawurlencode($script));
                
                        // List frame URL:
index ae70b71..0225589 100755 (executable)
@@ -247,11 +247,11 @@ class SC_alt_palette {
        function init() {
 
                        // Setting GPvars, etc.
-               $this->formName = t3lib_div::GPvar('formName');
-               $this->GPbackref = t3lib_div::GPvar('backRef');
-               $this->inData = t3lib_div::GPvar('inData');
-               $this->prependFormFieldNames = t3lib_div::GPvar('prependFormFieldNames');
-               $this->rec = t3lib_div::GPvar('rec',1);
+               $this->formName = t3lib_div::_GP('formName');
+               $this->GPbackref = t3lib_div::_GP('backRef');
+               $this->inData = t3lib_div::_GP('inData');
+               $this->prependFormFieldNames = t3lib_div::_GP('prependFormFieldNames');
+               $this->rec = t3lib_div::_GP('rec');
                
                        // Making references:
                $this->backRef = $this->GPbackref ? $this->GPbackref : 'window.opener';
index 0cc347e..608036d 100755 (executable)
@@ -119,16 +119,16 @@ class SC_alt_shortcut {
                global $TBE_MODULES;
 
                        // Setting GPvars:
-               $this->modName = t3lib_div::GPvar('modName');
-               $this->M_modName = t3lib_div::GPvar('motherModName');
-               $this->URL = t3lib_div::GPvar('URL');
-               $this->editSC = t3lib_div::GPvar('editShortcut');
+               $this->modName = t3lib_div::_GP('modName');
+               $this->M_modName = t3lib_div::_GP('motherModName');
+               $this->URL = t3lib_div::_GP('URL');
+               $this->editSC = t3lib_div::_GP('editShortcut');
                
-               $this->deleteCategory = t3lib_div::GPvar('deleteCategory');
-               $this->editPage = t3lib_div::GPvar('editPage');
-               $this->editName = t3lib_div::GPvar('editName');
-               $this->editGroup = t3lib_div::GPvar('editGroup');
-               $this->whichItem = t3lib_div::GPvar('whichItem');
+               $this->deleteCategory = t3lib_div::_GP('deleteCategory');
+               $this->editPage = t3lib_div::_GP('editPage');
+               $this->editName = t3lib_div::_GP('editName');
+               $this->editGroup = t3lib_div::_GP('editGroup');
+               $this->whichItem = t3lib_div::_GP('whichItem');
 
                        // Creating modules object
                $this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
@@ -161,13 +161,13 @@ class SC_alt_shortcut {
                        // Deleting shortcuts:
                if (strcmp($this->deleteCategory,''))   {
                        if (t3lib_div::testInt($this->deleteCategory))  {
-                               $q = 'DELETE FROM sys_be_shortcuts WHERE sc_group='.$this->deleteCategory.$addUSERWhere;
+                               $q = 'DELETE FROM sys_be_shortcuts WHERE sc_group='.intval($this->deleteCategory).$addUSERWhere;
                                $res=mysql(TYPO3_db,$q);
                        }
                }
                
                        // If other changes in post-vars:
-               if ($HTTP_POST_VARS)    {
+               if (is_array($HTTP_POST_VARS))  {
                                // Saving:
                        if (isset($HTTP_POST_VARS['_savedok_x']) || isset($HTTP_POST_VARS['_saveclosedok_x']))  {
                                $fields_values=array();
index c025f38..dac3f28 100755 (executable)
@@ -106,6 +106,7 @@ class SC_alt_topmenu_dummy {
                                <table border="0" cellpadding="0" cellspacing="0" id="typo3-topMenu">
                                        <tr>
                                                <td class="c-menu">'.$alt_menuObj->topMenu($loadModules->modules,0,'',3).'</td>
+                                               '.($BE_USER->isAdmin() ? '<td class="c-admin">'.$alt_menuObj->adminButtons().'</td>' : '').'
                                                <td class="c-logout">'.$alt_menuObj->topButtons().'</td>
                                        </tr>
                                </table>';
index 058538e..b5a2e39 100755 (executable)
@@ -729,37 +729,43 @@ class SC_browse_links {
                global $BE_USER,$BACK_PATH;
 
                        // Main GPvars:
-               $this->pointer = t3lib_div::GPvar('pointer');
-               $this->bparams = t3lib_div::GPvar('bparams');
-               $this->P = t3lib_div::GPvar('P',1);
-               $this->RTEtsConfigParams = t3lib_div::GPvar('RTEtsConfigParams');
-               $this->expandPage = t3lib_div::GPvar('expandPage');
-               $this->expandFolder = t3lib_div::GPvar('expandFolder');
-               $this->PM = t3lib_div::GPvar('PM');
+               $this->pointer = t3lib_div::_GP('pointer');
+               $this->bparams = t3lib_div::_GP('bparams');
+               $this->P = t3lib_div::_GP('P');
+               $this->RTEtsConfigParams = t3lib_div::_GP('RTEtsConfigParams');
+               $this->expandPage = t3lib_div::_GP('expandPage');
+               $this->expandFolder = t3lib_div::_GP('expandFolder');
+               $this->PM = t3lib_div::_GP('PM');
                
+                       // Find "mode"          
+               $this->mode=t3lib_div::_GP('mode');
+               if (!$this->mode)       {
+                       $this->mode='rte';
+               }
+
                        // Site URL                     
                $this->siteURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL');       // Current site url
 
                        // CurrentUrl - the current link url must be passed around if it exists
-               $this->curUrlArray = t3lib_div::GPvar('curUrl',1);
-               if ($this->curUrlArray['all'])  {
-                       $this->curUrlArray=t3lib_div::get_tag_attributes($this->curUrlArray['all']);
+               if ($this->mode=='wizard')      {
+                       $currentLinkParts = t3lib_div::trimExplode(' ',$this->P['currentValue']);
+                       $this->curUrlArray = array(
+                               'target' => $currentLinkParts[1]
+                       );
+                       $this->curUrlInfo=$this->parseCurUrl($this->siteURL.'?id='.$currentLinkParts[0],$this->siteURL);
+               } else {
+                       $this->curUrlArray = t3lib_div::_GP('curUrl');
+                       if ($this->curUrlArray['all'])  {
+                               $this->curUrlArray=t3lib_div::get_tag_attributes($this->curUrlArray['all']);
+                       }
+                       $this->curUrlInfo=$this->parseCurUrl($this->curUrlArray['href'],$this->siteURL);
                }
-               $this->curUrlInfo=$this->parseCurUrl($this->curUrlArray['href'],$this->siteURL);
 
                        // Determine nature of current url:
-               $this->act=t3lib_div::GPvar('act');
+               $this->act=t3lib_div::_GP('act');
                if (!$this->act)        {
                        $this->act=$this->curUrlInfo['act'];
                }
-               
-               $this->mode=t3lib_div::GPvar('mode');
-               if (!$this->mode)       {
-                       $this->mode='rte';
-               }
-
-               
-               
 
                        // Rich Text Editor specific configuration:
                $addPassOnParams='';
@@ -796,7 +802,7 @@ class SC_browse_links {
                
                        function setTarget(target)      {       //
                                cur_target=target;
-                               add_target="&curUrl[target]="+target;
+                               add_target="&curUrl[target]="+escape(target);
                        }
                        function setValue(value)        {       //
                                cur_href=value;
@@ -954,7 +960,7 @@ class SC_browse_links {
                $this->doc->JScode = $this->doc->wrapScriptTags($JScode);
 
                        // Debugging:
-/*             debug(array(
+               if (FALSE) debug(array(
                        'pointer' => $this->pointer,
                        'act' => $this->act,
                        'mode' => $this->mode,
@@ -966,7 +972,7 @@ class SC_browse_links {
                        'expandPage' => $this->expandPage,
                        'expandFolder' => $this->expandFolder,
                        'PM' => $this->PM,
-               ),'Internal variables of Script Class:');       */
+               ),'Internal variables of Script Class:');
        }
 
        /**
@@ -1244,21 +1250,54 @@ class SC_browse_links {
                                        <table border="0" cellpadding="2" cellspacing="1" id="typo3-linkTarget">
                                                <tr>
                                                        <td>'.$GLOBALS['LANG']->getLL('target',1).':</td>
-                                                       <td><input type="text" name="ltarget" onchange="setTarget(this.value);" value="'.htmlspecialchars($this->setTarget).'"'.$this->doc->formWidth(20).' /></td>
+                                                       <td><input type="text" name="ltarget" onchange="setTarget(this.value);" value="'.htmlspecialchars($this->setTarget).'"'.$this->doc->formWidth(10).' /></td>
                                                        <td>
                                                                <select name="ltarget_type" onchange="setTarget(this.options[this.selectedIndex].value);document.ltargetform.ltarget.value=this.options[this.selectedIndex].value;this.selectedIndex=0;">
                                                                        <option></option>
                                                                        <option value="_top">'.$GLOBALS['LANG']->getLL('top',1).'</option>
                                                                        <option value="_blank">'.$GLOBALS['LANG']->getLL('newWindow',1).'</option>
                                                                </select>
-                                                       </td>';
+                                                       </td>
+                                                       <td>';
                                
                        if (($this->curUrlInfo['act']=="page" || $this->curUrlInfo['act']=='file') && $this->curUrlArray['href'])       {
                                $ltarget.='
-                                                       <td><input type="submit" value="'.$GLOBALS['LANG']->getLL('update',1).'" onclick="return link_current();" /></td>';
+                                                       <input type="submit" value="'.$GLOBALS['LANG']->getLL('update',1).'" onclick="return link_current();" />';
                        }
                        
-                       $ltarget.='
+                       $selectJS = '
+                               if (document.ltargetform.popup_width.options[document.ltargetform.popup_width.selectedIndex].value>0 && document.ltargetform.popup_height.options[document.ltargetform.popup_height.selectedIndex].value>0)     {
+                                       document.ltargetform.ltarget.value = document.ltargetform.popup_width.options[document.ltargetform.popup_width.selectedIndex].value+"x"+document.ltargetform.popup_height.options[document.ltargetform.popup_height.selectedIndex].value;
+                                       setTarget(document.ltargetform.ltarget.value);
+                                       document.ltargetform.popup_width.selectedIndex=0;
+                                       document.ltargetform.popup_height.selectedIndex=0;
+                               }
+                       ';
+                       
+                       $ltarget.='             </td>
+                                               </tr>
+                                               <tr>
+                                                       <td>'.$GLOBALS['LANG']->getLL('target_popUpWindow',1).':</td>
+                                                       <td colspan="3">
+                                                               <select name="popup_width" onchange="'.htmlspecialchars($selectJS).'">
+                                                                       <option value="0">'.$GLOBALS['LANG']->getLL('target_popUpWindow_width',1).'</option>
+                                                                       <option value="300">300</option>
+                                                                       <option value="400">400</option>
+                                                                       <option value="500">500</option>
+                                                                       <option value="600">600</option>
+                                                                       <option value="700">700</option>
+                                                                       <option value="800">800</option>
+                                                               </select>
+                                                               x
+                                                               <select name="popup_height" onchange="'.htmlspecialchars($selectJS).'">
+                                                                       <option value="0">'.$GLOBALS['LANG']->getLL('target_popUpWindow_height',1).'</option>
+                                                                       <option value="200">200</option>
+                                                                       <option value="300">300</option>
+                                                                       <option value="400">400</option>
+                                                                       <option value="500">500</option>
+                                                                       <option value="600">600</option>
+                                                               </select>
+                                                       </td>
                                                </tr>
                                        </table>
                                </form>';
@@ -1340,7 +1379,7 @@ class SC_browse_links {
                if (!$path || !@is_dir($path))  {
                        $path = $fileProcessor->findTempFolder().'/';   // The closest TEMP-path is found
                }
-               if ($path!="/" && @is_dir($path))       {
+               if ($path!='/' && @is_dir($path))       {
                        $uploadForm=$this->uploadForm($path);
                        $createFolder=$this->createFolder($path);
                } else {
@@ -1349,7 +1388,20 @@ class SC_browse_links {
                }
                if ($BE_USER->getTSConfigVal('options.uploadFieldsInTopOfEB'))  $content.=$uploadForm;
        
+                       // Getting flag for showing/not showing thumbnails:
+               $noThumbs = $GLOBALS['BE_USER']->getTSConfigVal('options.noThumbsInEB');
        
+               if (!$noThumbs) {
+                               // MENU-ITEMS, fetching the setting for thumbnails from File>List module:
+                       $_MOD_MENU = array('displayThumbs' => '');
+                       $_MCONF['name']='file_list';
+                       $_MOD_SETTINGS = t3lib_BEfunc::getModuleData($_MOD_MENU, t3lib_div::_GP('SET'), $_MCONF['name']);
+                       $addParams = '&act='.$this->act.'&mode='.$this->mode.'&expandFolder='.rawurlencode($path).'&bparams='.rawurlencode($this->bparams);
+                       $thumbNailCheck = t3lib_BEfunc::getFuncCheck('','SET[displayThumbs]',$_MOD_SETTINGS['displayThumbs'],'browse_links.php',$addParams).' '.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.php:displayThumbs',1);
+               } else {
+                       $thumbNailCheck='';
+               }
+               
                        // Create folder tree:
                $foldertree = t3lib_div::makeInstance('TBE_FolderTree');
                $foldertree->script='browse_links.php';
@@ -1361,7 +1413,7 @@ class SC_browse_links {
                if ($this->mode=='filedrag')    {
                        $files = $this->TBE_dragNDrop($foldertree->specUIDmap[$specUid],$pArr[3]);
                } else {
-                       $files = $this->TBE_expandFolder($foldertree->specUIDmap[$specUid],$pArr[3]);
+                       $files = $this->TBE_expandFolder($foldertree->specUIDmap[$specUid],$pArr[3],$noThumbs?$noThumbs:!$_MOD_SETTINGS['displayThumbs']);
                }
 
                        // Putting the parts together, side by side:            
@@ -1377,6 +1429,7 @@ class SC_browse_links {
                                </tr>
                        </table>
                        ';
+               $content.=$thumbNailCheck;
        
                        // Adding create folder + upload forms if applicable:
                if (!$BE_USER->getTSConfigVal('options.uploadFieldsInTopOfEB')) $content.=$uploadForm;
@@ -1531,10 +1584,10 @@ class SC_browse_links {
                        $dblist->noControlPanels=1;
                        $dblist->tableList=implode(',',$tablesArr);
        
-                       $dblist->start($id,t3lib_div::GPvar('table'),$pointer,
-                               t3lib_div::GPvar('search_field'),
-                               t3lib_div::GPvar('search_levels'),
-                               t3lib_div::GPvar('showLimit')
+                       $dblist->start($id,t3lib_div::_GP('table'),$pointer,
+                               t3lib_div::_GP('search_field'),
+                               t3lib_div::_GP('search_levels'),
+                               t3lib_div::_GP('showLimit')
                        );
                        $dblist->setDispFields();
                        $dblist->generateList($id,$table);
@@ -1638,9 +1691,10 @@ class SC_browse_links {
         * 
         * @param       string          The folder path to expand
         * @param       string          List of fileextensions to show
+        * @param       boolean         Whether to show thumbnails or not. It set, no thumbnails are shown.
         * @return      string          HTML output
         */
-       function TBE_expandFolder($expandFolder=0,$extensionList='')    {
+       function TBE_expandFolder($expandFolder=0,$extensionList='',$noThumbs=0)        {
                global $LANG;
                
                $expandFolder = $expandFolder ? $expandFolder : $this->expandFolder;
@@ -1666,9 +1720,6 @@ class SC_browse_links {
                                $imgObj->mayScaleUp=0;
                                $imgObj->tempPath=PATH_site.$imgObj->tempPath;
                
-                                       // Getting flag for showing/not showing thumbnails:
-                               $noThumbs = $GLOBALS['BE_USER']->getTSConfigVal('options.noThumbsInEB');
-               
                                        // Traverse the file list:
                                $lines=array();
                                foreach($files as $filepath)    {
@@ -1804,7 +1855,7 @@ class SC_browse_links {
                                                        $icon = '<img'.t3lib_iconWorks::skinImg('','gfx/fileicons/'.$ficon,'width="18" height="16"').' class="absmiddle" title="'.htmlspecialchars($fI['basename'].$size).'" alt="" />';
                                                        $filenameAndIcon=$icon.htmlspecialchars(t3lib_div::fixed_lgd(basename($filepath),$titleLen));
                
-                                                       if (t3lib_div::GPvar('noLimit'))        {
+                                                       if (t3lib_div::_GP('noLimit'))  {
                                                                $maxW=10000;
                                                                $maxH=10000;
                                                        } else {
@@ -2064,6 +2115,13 @@ class SC_browse_links {
                $code.='<input type="hidden" name="redirect" value="'.htmlspecialchars($redirectValue).'" />'.
                                '<input type="submit" name="submit" value="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.submit',1).'" />';
                                
+               $code.='
+                       <div id="c-override">
+                               <input type="checkbox" name="overwriteExistingFiles" value="1" /> '.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.php:overwriteExistingFiles',1).'
+                       </div>
+               ';
+                               
+                               
                $code.='</td>
                                        </tr>
                                </table>
index 47b7930..50ea6ee 100644 (file)
@@ -77,8 +77,8 @@ class SC_browser {
        function main() {
                
                        // Setting GPvars:
-               $mode =t3lib_div::GPvar('mode');
-               $bparams = t3lib_div::GPvar('bparams');
+               $mode =t3lib_div::_GP('mode');
+               $bparams = t3lib_div::_GP('bparams');
                
 
                        // Set doktype:
index 244ce12..7bbec19 100755 (executable)
@@ -89,7 +89,7 @@ class alt_menu_functions {
         * @return      string          The menu HTML
         */
        function topMenu($theModules,$dontLink=0,$backPath='',$descr=0) {
-               global $LANG, $TBE_TEMPLATE;
+               global $LANG, $TBE_TEMPLATE, $BE_USER;
        
                        // Initialize vars:
                $final='';
@@ -101,11 +101,11 @@ class alt_menu_functions {
                $mJScmds=array();
                $onBlur=$GLOBALS['CLIENT']['FORMSTYLE'] ? 'this.blur();' : '';
        
-               $selectItems[] = '<option value="">[ MODULES ]</option>';
+               $selectItems[] = '<option value="">[ '.$LANG->sL('LLL:EXT:lang/locallang_core.php:buttons.selMenu_modules',1).' ]</option>';
                $mC=0;
        
                        // Remove the 'doc' module?
-               if ($GLOBALS['BE_USER']->getTSConfigVal('options.disableDocModuleInAB'))        {
+               if ($BE_USER->getTSConfigVal('options.disableDocModuleInAB'))   {
                        unset($theModules['doc']);
                }
        
@@ -116,7 +116,7 @@ class alt_menu_functions {
 
                        $prefix='';
                        if ($moduleInfo['navFrameScript'])      {
-                               if ($GLOBALS['BE_USER']->uc['condensedMode'])   {
+                               if ($BE_USER->uc['condensedMode'])      {
                                        $prefix=$moduleInfo['navFrameScript'].'?currentSubScript=';
                                } else {
                                        $prefix='alt_mod_frameset.php?'.
@@ -234,7 +234,7 @@ class alt_menu_functions {
                                                // If there is a script to link to (and linking is not disabled.
                                        if ($link && !$dontLink)        {
                                                        // For condensed mode, send &cMR parameter to frameset script.
-                                               if ($addJS && $GLOBALS['BE_USER']->uc['condensedMode']) {$addJS.=  "+(cMR?'&cMR=1':'')";}
+                                               if ($addJS && $BE_USER->uc['condensedMode'])    {$addJS.=  "+(cMR?'&cMR=1':'')";}
 
                                                        // Command for the selector box:
                                                $JScmd = "
@@ -242,7 +242,7 @@ class alt_menu_functions {
                                                                top.fsMod.currentMainLoaded="'.$moduleName.'";';
 
                                                        // If there is a frameset script in place:
-                                               if (!$GLOBALS['BE_USER']->uc['condensedMode'] && $moduleInfo['navFrameScript']) {
+                                               if (!$BE_USER->uc['condensedMode'] && $moduleInfo['navFrameScript'])    {
                                                        $JScmd = '
                                                                if (top.content.list_frame && top.fsMod.currentMainLoaded=="'.$moduleName.'") {
                                                                        top.currentSubScript="'.$origLink.'";
@@ -266,7 +266,7 @@ class alt_menu_functions {
                                        $subCode.='
                                                        <tr class="c-subitem-row">
                                                                <td></td>
-                                                               <td align="center">'.(!$GLOBALS['BE_USER']->uc['hideSubmoduleIcons']?$imageCode:'').'</td>
+                                                               <td align="center">'.(!$BE_USER->uc['hideSubmoduleIcons']?$imageCode:'').'</td>
                                                                <td class="c-subitem-label">'.$flabel.'</td>
                                                        </tr>';
 
@@ -337,6 +337,19 @@ class alt_menu_functions {
 
                        // selector-box menu
                if ($descr==2)  {
+
+                               // Add admin-functions for clearing caches:
+                       if ($BE_USER->isAdmin())        {
+                               $functionArray = $this->adminFunctions($backPath);
+                               if (count($functionArray))      {
+                                       $selectItems[] = '<option value=""></option>';
+                                       foreach($functionArray as $fAoptions)   {
+                                               $selectItems[] = '<option value="'.htmlspecialchars("document.location='".$fAoptions['href']."';").'">[ '.htmlspecialchars($fAoptions['title']).' ]</option>';
+                                       }
+                               }
+                       }
+
+                               // Logout item:
                        $selectItems[] = '<option value=""></option>';
                        $selectItems[] = '<option value="'.htmlspecialchars("top.location='logout.php';").'">[ '.$LANG->sL('LLL:EXT:lang/locallang_core.php:buttons.logout',1).' ]</option>';
                        $final = '
@@ -403,6 +416,57 @@ class alt_menu_functions {
        }
 
        /**
+        * Returns logout button.
+        * 
+        * @return      string          
+        */
+       function adminButtons() {
+               global $LANG;
+               
+               $functionArray = $this->adminFunctions('');
+
+               $icons=array();         
+               foreach($functionArray as $fAoptions)   {
+                       $icons[]= '<a href="'.htmlspecialchars($fAoptions['href']).'">'.$fAoptions['icon'].'</a>';
+               }
+               
+               return implode('',$icons);
+       }
+
+       /**
+        * Returns array with parts from which the admin functions can be constructed.
+        * 
+        * @param       string          Backpath.
+        * @return      array   
+        */
+       function adminFunctions($backPath)      {
+               global $LANG,$BE_USER,$TYPO3_CONF_VARS;
+
+               $functions=array();
+               
+                       // Clearing of cache-files in typo3conf/ + menu
+               if ($TYPO3_CONF_VARS['EXT']['extCache'])        {
+                       $title = $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.clearCache_allTypo3Conf');
+                       $functions[]=array(
+                               'title' => $title,
+                               'href' => $backPath.'tce_db.php?vC='.$BE_USER->veriCode().'&redirect='.rawurlencode(t3lib_div::getIndpEnv('TYPO3_REQUEST_SCRIPT')).'&cacheCmd=temp_CACHED',
+                               'icon' => '<img'.t3lib_iconWorks::skinImg($backPath,'gfx/clear_cache_files_in_typo3c.gif','width="21" height="18"').' title="'.htmlspecialchars($title).'" alt="" />'
+                       );
+               }
+
+                       // Clear all page cache
+               $title = $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.clearCache_all');
+               $functions[]=array(
+                       'title' => $title,
+                       'href' => $backPath.'tce_db.php?vC='.$BE_USER->veriCode().'&redirect='.rawurlencode(t3lib_div::getIndpEnv('TYPO3_REQUEST_SCRIPT')).'&cacheCmd=all',
+                       'icon' => '<img'.t3lib_iconWorks::skinImg($backPath,'gfx/clear_all_cache.gif','width="21" height="18"').' title="'.htmlspecialchars($title).'" alt="" />'
+               );
+
+                       // Return functions
+               return $functions;
+       }
+
+       /**
         * Appends a '?' if there is none in the string already
         * 
         * @param       string          Link URL
index 63addcc..66892be 100755 (executable)
@@ -150,11 +150,11 @@ class recordList extends t3lib_recordList {
                $this->showLimit=t3lib_div::intInRange($showLimit,0,10000);
                
                        // Setting GPvars:
-               $this->csvOutput = t3lib_div::GPvar('csv') ? TRUE : FALSE;
-               $this->sortField = t3lib_div::GPvar('sortField');
-               $this->sortRev = t3lib_div::GPvar('sortRev');
-               $this->displayFields = t3lib_div::GPvar('displayFields');
-               $this->duplicateField = t3lib_div::GPvar('duplicateField');
+               $this->csvOutput = t3lib_div::_GP('csv') ? TRUE : FALSE;
+               $this->sortField = t3lib_div::_GP('sortField');
+               $this->sortRev = t3lib_div::_GP('sortRev');
+               $this->displayFields = t3lib_div::_GP('displayFields');
+               $this->duplicateField = t3lib_div::_GP('duplicateField');
                
                        // If thumbnails are disabled, set the "notfound" icon as default:
                if (!$GLOBALS['TYPO3_CONF_VARS']['GFX']['thumbnails'])  {
index 9f25af9..05e65e8 100755 (executable)
@@ -106,13 +106,13 @@ class recordHistory {
        function recordHistory()        {
                
                        // GPvars:
-               $this->sh_uid = t3lib_div::GPvar('sh_uid');     
-               $this->element = t3lib_div::GPvar('element');
-               $this->saveState = t3lib_div::GPvar('saveState');
-               $this->returnUrl = t3lib_div::GPvar('returnUrl');
-               $this->revert = t3lib_div::GPvar('revert');
-               $this->sumUp = t3lib_div::GPvar('sumUp');
-               $this->doReturn = t3lib_div::GPvar('doReturn');
+               $this->sh_uid = t3lib_div::_GP('sh_uid');       
+               $this->element = t3lib_div::_GP('element');
+               $this->saveState = t3lib_div::_GP('saveState');
+               $this->returnUrl = t3lib_div::_GP('returnUrl');
+               $this->revert = t3lib_div::_GP('revert');
+               $this->sumUp = t3lib_div::_GP('sumUp');
+               $this->doReturn = t3lib_div::_GP('doReturn');
        }
 
        /**
index fdc1e4e..2bf23a5 100755 (executable)
@@ -130,18 +130,18 @@ class SC_db_list {
                $this->perms_clause = $BE_USER->getPagePermsClause(1);
 
                        // GPvars:
-               $this->id = t3lib_div::GPvar('id');
-               $this->pointer = t3lib_div::GPvar('pointer');
-               $this->imagemode = t3lib_div::GPvar('imagemode');
-               $this->table = t3lib_div::GPvar('table');
-               $this->search_field = t3lib_div::GPvar('search_field');
-               $this->search_levels = t3lib_div::GPvar('search_levels');
-               $this->showLimit = t3lib_div::GPvar('showLimit');
-               $this->returnUrl = t3lib_div::GPvar('returnUrl');
-
-               $this->clear_cache = t3lib_div::GPvar('clear_cache');
-               $this->cmd = t3lib_div::GPvar('cmd');
-               $this->cmd_table = t3lib_div::GPvar('cmd_table');
+               $this->id = t3lib_div::_GP('id');
+               $this->pointer = t3lib_div::_GP('pointer');
+               $this->imagemode = t3lib_div::_GP('imagemode');
+               $this->table = t3lib_div::_GP('table');
+               $this->search_field = t3lib_div::_GP('search_field');
+               $this->search_levels = t3lib_div::_GP('search_levels');
+               $this->showLimit = t3lib_div::_GP('showLimit');
+               $this->returnUrl = t3lib_div::_GP('returnUrl');
+
+               $this->clear_cache = t3lib_div::_GP('clear_cache');
+               $this->cmd = t3lib_div::_GP('cmd');
+               $this->cmd_table = t3lib_div::_GP('cmd_table');
                
                        // Initialize menu
                $this->menuConfig();
@@ -169,7 +169,7 @@ class SC_db_list {
                $this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->id,'mod.'.$this->MCONF['name']);
                
                        // Clean up settings:
-               $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']);
        }
 
        /**
@@ -180,6 +180,7 @@ class SC_db_list {
        function clearCache()   {
                if ($this->clear_cache) {
                        $tce = t3lib_div::makeInstance('t3lib_TCEmain');
+                       $tce->stripslashes_values=0;
                        $tce->start(Array(),Array());
                        $tce->clear_cacheCmd($this->id);
                }
@@ -191,7 +192,7 @@ class SC_db_list {
         * @return      void            
         */
        function main() {
-               global $BE_USER,$LANG,$BACK_PATH,$HTTP_GET_VARS,$HTTP_POST_VARS,$CLIENT;
+               global $BE_USER,$LANG,$BACK_PATH,$CLIENT;
 
                        // Start document template object:
                $this->doc = t3lib_div::makeInstance('template');
@@ -222,11 +223,11 @@ class SC_db_list {
                $dblist->clipObj->initializeClipboard();        // Initialize - reads the clipboard content from the user session
 
                        // Clipboard actions are handled:
-               $CB = $HTTP_GET_VARS['CB'];     // CB is the clipboard command array
+               $CB = t3lib_div::_GET('CB');    // CB is the clipboard command array
                if ($this->cmd=='setCB') {
                                // CBH is all the fields selected for the clipboard, CBC is the checkbox fields which were checked. By merging we get a full array of checked/unchecked elements
                                // This is set to the 'el' array of the CB after being parsed so only the table in question is registered.
-                       $CB['el'] = $dblist->clipObj->cleanUpCBC(array_merge($HTTP_POST_VARS['CBH'],$HTTP_POST_VARS['CBC']),$this->cmd_table);
+                       $CB['el'] = $dblist->clipObj->cleanUpCBC(array_merge(t3lib_div::_POST('CBH'),t3lib_div::_POST('CBC')),$this->cmd_table);
                }
                if (!$this->MOD_SETTINGS['clipBoard'])  $CB['setP']='normal';   // If the clipboard is NOT shown, set the pad to 'normal'.
                $dblist->clipObj->setCmd($CB);          // Execute commands.
@@ -245,7 +246,7 @@ class SC_db_list {
                                // Deleting records...:
                                // Has not to do with the clipboard but is simply the delete action. The clipboard object is used to clean up the submitted entries to only the selected table.
                        if ($this->cmd=='delete')       {
-                               $items = $dblist->clipObj->cleanUpCBC($HTTP_POST_VARS['CBC'],$this->cmd_table,1);
+                               $items = $dblist->clipObj->cleanUpCBC(t3lib_div::_POST('CBC'),$this->cmd_table,1);
                                if (count($items))      {
                                        $cmd=array();
                                        reset($items);
@@ -254,6 +255,7 @@ class SC_db_list {
                                                $cmd[$iKParts[0]][$iKParts[1]]['delete']=1;
                                        }
                                        $tce = t3lib_div::makeInstance('t3lib_TCEmain');
+                                       $tce->stripslashes_values=0;
                                        $tce->start(array(),$cmd);
                                        $tce->process_cmdmap();
                
index 297b7c4..8d28f2c 100755 (executable)
@@ -161,9 +161,9 @@ class SC_db_new {
                $this->perms_clause = $BE_USER->getPagePermsClause(1);
 
                        // Setting GPvars:
-               $this->id = intval(t3lib_div::GPvar('id'));     // The page id to operate from
-               $this->returnUrl = t3lib_div::GPvar('returnUrl');
-               $this->pagesOnly = t3lib_div::GPvar('pagesOnly');
+               $this->id = intval(t3lib_div::_GP('id'));       // The page id to operate from
+               $this->returnUrl = t3lib_div::_GP('returnUrl');
+               $this->pagesOnly = t3lib_div::_GP('pagesOnly');
                
                        // Create instance of template class for output
                $this->doc = t3lib_div::makeInstance('smallDoc');
diff --git a/typo3/dev/README.txt b/typo3/dev/README.txt
deleted file mode 100755 (executable)
index 52aa614..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-typo3/dev/
-
-Contains a few scripts which are related to development.
-The scritps MUST BE disabled by default (done with a die() function call in the first lines).
-Just ignore these scripts.
\ No newline at end of file
diff --git a/typo3/dev/dump_template_tables.php b/typo3/dev/dump_template_tables.php
deleted file mode 100755 (executable)
index 072b6e1..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*  
-*  (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com)
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is 
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-* 
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license 
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-* 
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/** 
- * Dev-script: Dumps the TypoScrip template tables.
- *
- * This script prints out all language-labels in TYPO3 and provides a way of checking for missing translations.
- * Must be logged in as admin.
- *
- * $Id$
- *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage core
- */
-
-die("<strong>This script is for typo3 development and maintenance only. You'll probably find it useless for what you do.</strong><br><br>MUST remove this line in descriptions script before it'll work for you. This is a security precaution. Anyways, you must be logged in as admin as well.");
-$BACK_PATH='../';
-define('TYPO3_MOD_PATH', 'dev/');
-require ($BACK_PATH.'init.php');
-
-if (!$BE_USER->user['admin'])  die('You must be logged in as admin user!');
-
-
-// ***************************
-// Registering Incoming data
-// ***************************
-t3lib_div::setGPvars('table,uid,hide');
-//debug($HTTP_POST_VARS);
-
-
-// ***************************
-// Functions
-// ***************************
-function getTemplateOutput($row)       {
-       $title = 'TITLE: '.$row['title'].'                                                                      ';
-       $info = 'PID: '.$row['pid'].'  UID: '.$row['uid'].'                                                                    ';
-       
-       $out="";
-       $out.="[*******************************************************************]\n";
-       $out.="[*** ".substr($title,0,59)." ***]\n";
-       $out.="[*** ".substr($info,0,59)." ***]\n";
-       $out.="[*******************************************************************]\n";
-       $out.="[***                          CONSTANTS                          ***]\n";
-       $out.="[*******************************************************************]\n";
-
-       $out.=htmlspecialchars($row["constants"]);
-       $out.="\n\n";
-
-       $out.="[*******************************************************************]\n";
-       $out.="[***                           SETUP                             ***]\n";
-       $out.="[*******************************************************************]\n";
-
-       $out.=htmlspecialchars($row['config']);
-       $out.="\n\n";
-       
-       return $out;
-}
-
-
-
-// ***************************
-// Starting document output
-// ***************************
-
-if (!$hide)    {
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-       <title>Untitled</title>
-</head>
-
-<body>
-
-<form action="dump_template_tables.php" method="post">
-Table:
-<br>
-<select name="table">
-       <option value="static_template"<?php if($table=='static_template') echo' selected';?>>static_template</option>
-       <option value="sys_template"<?php if($table=='sys_template') echo' selected';?>>sys_template</option>
-</select><br>
-Specific Uid: <br>
-<input type="text" name="uid" size="5"><br>
-Hide this control:<br>
-<input type="checkbox" name="hide" value="1"><br>
-<input type="submit">
-</form>
-<hr>
-<br>
-<?php 
-}
-
-if ($table=='sys_template' || $table=='static_template')       {
-       $out='';
-       $where = ($table=='sys_template') ? 'NOT deleted' : '1=1';
-       if (intval($uid))       $where.=' AND uid='.intval($uid);
-       $query = 'SELECT uid,pid,constants,config,title FROM '.$table.' WHERE '.$where.' ORDER BY title';
-       $res = mysql(TYPO3_db,$query);
-       while($row=mysql_fetch_assoc($res))     {
-               $out.= getTemplateOutput($row);
-       }
-       echo (!$hide?'MD5: '.md5($out):'').'<PRE>
-'.$out.'
-</PRE>';
-
-}
-
-
-if (!$hide)    {
-?>
-
-
-</body>
-</html>
-<?php
-}
-?>
diff --git a/typo3/dev/phpinfo.php b/typo3/dev/phpinfo.php
deleted file mode 100755 (executable)
index 09ab419..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*  
-*  (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com)
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is 
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-* 
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license 
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-* 
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/** 
- * Dev-script: Display of phpinfo()
- *
- * $Id$
- *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage core
- */
-
-die("<strong>This script is for typo3 development and maintenance only. You'll probably find it useless for what you do.</strong><br><br>MUST remove this line in this script before it'll work for you. This is a security precaution. Anyways, you must be logged in as admin as well.");
-
-
-
-
-$BACK_PATH='../';
-if (isset($HTTP_GET_VARS['noInit']) && $HTTP_GET_VARS['noInit'])       {
-       include_once($BACK_PATH.'t3lib/class.t3lib_div.php');
-} else {
-       define('TYPO3_PROCEED_IF_NO_USER', 1);
-       define('TYPO3_MOD_PATH', 'dev/');
-       require ($BACK_PATH.'init.php');
-       require ($BACK_PATH.'template.php');
-}
-
-
-phpinfo();
-
-
-
-$getEnvArray = array();
-$gE_keys = explode(',','QUERY_STRING,HTTP_ACCEPT,HTTP_ACCEPT_ENCODING,HTTP_ACCEPT_LANGUAGE,HTTP_CONNECTION,HTTP_COOKIE,HTTP_HOST,HTTP_USER_AGENT,REMOTE_ADDR,REMOTE_HOST,REMOTE_PORT,SERVER_ADDR,SERVER_ADMIN,SERVER_NAME,SERVER_PORT,SERVER_SIGNATURE,SERVER_SOFTWARE,GATEWAY_INTERFACE,SERVER_PROTOCOL,REQUEST_METHOD,SCRIPT_NAME,PATH_TRANSLATED,HTTP_REFERER,PATH_INFO');
-while(list(,$k)=each($gE_keys))        {
-       $getEnvArray[$k] = getenv($k);
-}
-echo '<h3>getenv()</h3>';
-t3lib_div::print_array($getEnvArray);
-
-echo '<h3>$GLOBALS["HTTP_ENV_VARS"]</h3>';
-t3lib_div::print_array($GLOBALS['HTTP_ENV_VARS']);
-
-echo '<h3>$GLOBALS["HTTP_SERVER_VARS"]</h3>';
-t3lib_div::print_array($GLOBALS['HTTP_SERVER_VARS']);
-
-echo '<h3>$GLOBALS["HTTP_COOKIE_VARS"]</h3>';
-t3lib_div::print_array($GLOBALS['HTTP_COOKIE_VARS']);
-
-echo '<h3>$GLOBALS["HTTP_GET_VARS"]</h3>';
-t3lib_div::print_array($GLOBALS['HTTP_GET_VARS']);
-               
-
-$constants=array();
-$constants['TYPO3_OS'] = array(TYPO3_OS,defined('TYPO3_OS')?'':'NOT DEFINED!');
-$constants['PATH_thisScript'] = array(PATH_thisScript,defined('PATH_thisScript')?'':'NOT DEFINED!');
-$constants['TYPO3_mainDir'] = array(TYPO3_mainDir,defined('TYPO3_mainDir')?'':'NOT DEFINED!');
-$constants['PATH_typo3'] = array(PATH_typo3,defined('PATH_typo3')?'':'NOT DEFINED!');
-$constants['PATH_typo3_mod'] = array(PATH_typo3_mod,defined('PATH_typo3_mod')?'':'NOT DEFINED!');
-$constants['PATH_site'] = array(PATH_site,defined('PATH_site')?'':'NOT DEFINED!');
-$constants['PATH_t3lib'] = array(PATH_t3lib,defined('PATH_t3lib')?'':'NOT DEFINED!');
-$constants['PATH_typo3conf'] = array(PATH_typo3conf,defined('PATH_typo3conf')?'':'NOT DEFINED!');
-
-echo '<h3>Constants</h3>';
-t3lib_div::print_array($constants);
-               
-?>
\ No newline at end of file
index b609178..a411084 100755 (executable)
@@ -93,7 +93,7 @@ class SC_file_edit {
                global $BACK_PATH,$TYPO3_CONF_VARS;
                
                        // Setting target, which must be a file reference to a file within the mounts.
-               $this->target = $this->origTarget = t3lib_div::GPvar('target');
+               $this->target = $this->origTarget = t3lib_div::_GP('target');
 
                        // Creating file management object:
                $this->basicff = t3lib_div::makeInstance('t3lib_basicFileFunctions');
index db7470b..3ce3561 100755 (executable)
@@ -104,12 +104,12 @@ class SC_file_list {
                global $TYPO3_CONF_VARS,$FILEMOUNTS;
                        
                        // Setting GPvars:
-               $this->id = t3lib_div::GPvar('id');
-               $this->pointer = t3lib_div::GPvar('pointer');
-               $this->table = t3lib_div::GPvar('table');
-               $this->imagemode = t3lib_div::GPvar('imagemode');
-               $this->cmd = t3lib_div::GPvar('cmd');
-               $this->overwriteExistingFiles = t3lib_div::GPvar('overwriteExistingFiles');
+               $this->id = t3lib_div::_GP('id');
+               $this->pointer = t3lib_div::_GP('pointer');
+               $this->table = t3lib_div::_GP('table');
+               $this->imagemode = t3lib_div::_GP('imagemode');
+               $this->cmd = t3lib_div::_GP('cmd');
+               $this->overwriteExistingFiles = t3lib_div::_GP('overwriteExistingFiles');
                
                        // Setting module name:
                $this->MCONF = $GLOBALS['MCONF'];
@@ -140,7 +140,7 @@ class SC_file_list {
                );
                        
                        // CLEANSE SETTINGS
-               $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']);
        }
 
        /**
@@ -149,7 +149,7 @@ class SC_file_list {
         * @return      void            
         */
        function main() {
-               global $BE_USER,$LANG,$BACK_PATH,$HTTP_GET_VARS,$HTTP_POST_VARS,$TYPO3_CONF_VARS,$FILEMOUNTS;
+               global $BE_USER,$LANG,$BACK_PATH,$TYPO3_CONF_VARS,$FILEMOUNTS;
                
                        // Initialize the template object
                $this->doc = t3lib_div::makeInstance('template');
@@ -173,8 +173,8 @@ class SC_file_list {
                        $filelist->clipObj->fileMode=1;
                        $filelist->clipObj->initializeClipboard();
        
-                       $CB = $HTTP_GET_VARS['CB'];
-                       if ($this->cmd=='setCB') $CB['el'] = $filelist->clipObj->cleanUpCBC(array_merge($HTTP_POST_VARS['CBH'],$HTTP_POST_VARS['CBC']),'_FILE');
+                       $CB = t3lib_div::_GET('CB');
+                       if ($this->cmd=='setCB') $CB['el'] = $filelist->clipObj->cleanUpCBC(array_merge(t3lib_div::_POST('CBH'),t3lib_div::_POST('CBC')),'_FILE');
                        if (!$this->MOD_SETTINGS['clipBoard'])  $CB['setP']='normal';
                        $filelist->clipObj->setCmd($CB);
                        $filelist->clipObj->cleanCurrent();
@@ -182,7 +182,7 @@ class SC_file_list {
                        
                                // If the "cmd" was to delete files from the list (clipboard thing), do that:
                        if ($this->cmd=='delete')       {
-                               $items = $filelist->clipObj->cleanUpCBC($HTTP_POST_VARS['CBC'],'_FILE',1);
+                               $items = $filelist->clipObj->cleanUpCBC(t3lib_div::_POST('CBC'),'_FILE',1);
                                if (count($items))      {
                                                // Make command array:
                                        $FILE=array();
index 175216b..a298fa9 100755 (executable)
@@ -103,8 +103,8 @@ class SC_file_newfolder {
                global $LANG,$BACK_PATH,$TYPO3_CONF_VARS;
 
                        // Initialize GPvars:
-               $this->number = t3lib_div::GPvar('number');
-               $this->target = t3lib_div::GPvar('target');
+               $this->number = t3lib_div::_GP('number');
+               $this->target = t3lib_div::_GP('target');
                        
                        // Init basic-file-functions object:
                $this->basicff = t3lib_div::makeInstance('t3lib_basicFileFunctions');
index 04b1047..48b91b0 100755 (executable)
@@ -97,7 +97,7 @@ class SC_file_rename {
                global $LANG,$BACK_PATH,$TYPO3_CONF_VARS;
 
                        // Initialize GPvars:
-               $this->target = t3lib_div::GPvar('target');
+               $this->target = t3lib_div::_GP('target');
 
                        // Init basic-file-functions object:
                $this->basicff = t3lib_div::makeInstance('t3lib_basicFileFunctions');
index bf66d93..5878365 100755 (executable)
@@ -104,8 +104,8 @@ class SC_file_upload {
                global $LANG,$BACK_PATH,$TYPO3_CONF_VARS;
 
                        // Initialize GPvars:
-               $this->number = t3lib_div::GPvar('number');
-               $this->target = t3lib_div::GPvar('target');
+               $this->number = t3lib_div::_GP('number');
+               $this->target = t3lib_div::_GP('target');
 
                        // Init basic-file-functions object:
                $this->basicff = t3lib_div::makeInstance('t3lib_basicFileFunctions');
index e26b0c8..04f45e8 100755 (executable)
@@ -121,13 +121,13 @@ class SC_index {
                global $BE_USER,$TYPO3_CONF_VARS;
                
                        // GPvars:
-               $this->redirect_url = t3lib_div::GPvar('redirect_url');
-               $this->GPinterface = t3lib_div::GPvar('interface');
-               $this->u = t3lib_div::GPvar('u');                                                       // preset username
-               $this->p = t3lib_div::GPvar('p');                                                       // preset password
-               $this->L = t3lib_div::GPvar('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::GPvar('loginRefresh');         // Login 
-               $this->commandLI = t3lib_div::GPvar('commandLI');                       // Value of "Login" button. If set, the login button was pressed.
+               $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.
 
                        // Getting login labels:
                $this->L_vars = explode('|',$TYPO3_CONF_VARS['BE']['loginLabels']);
@@ -518,7 +518,7 @@ class SC_index {
                                        '<img src="gfx/loginlogo_transp.gif" width="75" height="19" alt="TYPO3 logo" align="left" />'.
                                        'TYPO3 CMS'.($GLOBALS['TYPO3_CONF_VARS']['SYS']['loginCopyrightShowVersion']?' ver. '.htmlspecialchars($GLOBALS['TYPO_VERSION']):'').
                                        '</a>. '.
-                                       'Copyright &copy; 1998-2003 Kasper Sk&#229;rh&#248;j. Extensions are copyright of their respective owners. '.
+                                       'Copyright &copy; 1998-2004 Kasper Sk&#229;rh&#248;j. Extensions are copyright of their respective owners. '.
                                        'Go to <a href="http://typo3.com/" target="_blank">http://typo3.com/</a> for details. '.
                                        $warrantyNote.' '.
                                        'This is free software, and you are welcome to redistribute it under certain conditions; <a href="http://typo3.com/1316.0.html" target="_blank">click for details</a>. '.
index 8b2bc36..9ebd45c 100755 (executable)
@@ -198,6 +198,8 @@ if (isset($HTTP_POST_VARS['GLOBALS']) || isset($HTTP_GET_VARS['GLOBALS']))  die('
 if (!get_magic_quotes_gpc())   {
        t3lib_div::addSlashesOnArray($HTTP_GET_VARS);
        t3lib_div::addSlashesOnArray($HTTP_POST_VARS);
+       $_GET = $HTTP_GET_VARS;
+       $_POST = $HTTP_POST_VARS;
 }
 
 
index f2823c9..eae13bc 100755 (executable)
@@ -72,7 +72,7 @@ class SC_logout {
                $BE_USER->writelog(255,2,0,1,'User %s logged out from TYPO3 Backend',Array($BE_USER->user['username']));        // Logout written to log
                $BE_USER->logoff();
 
-               header('Location: '.t3lib_div::locationHeaderUrl(t3lib_div::GPvar('redirect')?t3lib_div::GPvar('redirect'):'index.php'));
+               header('Location: '.t3lib_div::locationHeaderUrl(t3lib_div::_GP('redirect')?t3lib_div::_GP('redirect'):'index.php'));
        }
 }
 
index a835e10..4ba4e6b 100755 (executable)
@@ -103,7 +103,7 @@ class SC_mod_help_about_index {
                <div align="center"><b>'.$LANG->getLL('welcome').'</b></div><br />
                <br />
                ';
-               $minorText =sprintf($LANG->getLL('minor'), 'TYPO3 Ver. '.$TYPO_VERSION.', Copyright &#169; 1998-2003', 'Kasper Sk&#229;rh&#248;j');
+               $minorText =sprintf($LANG->getLL('minor'), 'TYPO3 Ver. '.$TYPO_VERSION.', Copyright &#169; 1998-2004', 'Kasper Sk&#229;rh&#248;j');
                $content='
                <div align="center">
                        <table border="0" cellspacing="0" cellpadding="0" width="333" bgcolor="#cccccc">
index 41b81ab..7ca0570 100755 (executable)
@@ -52,7 +52,7 @@ class em_kickstarter extends tx_extrepwizard {
         * @return      void            
         */
        function getPIdata() {
-               $this->piData = t3lib_div::GPvar($this->varPrefix,1);
+               $this->piData = t3lib_div::_GP($this->varPrefix);
        }
 
        /**
index 9091434..5ad2507 100755 (executable)
@@ -274,7 +274,7 @@ class SC_mod_tools_em_index {
         * @return      [type]          ...
         */
        function init() {
-               global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$HTTP_GET_VARS,$HTTP_POST_VARS,$CLIENT,$TYPO3_CONF_VARS;
+               global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
 
 #sleep(10);
 
@@ -291,7 +291,7 @@ class SC_mod_tools_em_index {
 
 
                $this->MCONF = $GLOBALS["MCONF"];
-               $this->CMD=t3lib_div::GPvar("CMD",1);
+               $this->CMD=t3lib_div::_GP("CMD");
                $this->menuConfig();
                $this->gzcompress = function_exists('gzcompress');
                if ($TYPO3_CONF_VARS["EXT"]["em_devVerUpdate"]) $this->versionDiffFactor=1;
@@ -331,7 +331,7 @@ class SC_mod_tools_em_index {
         * @return      [type]          ...
         */
        function menuConfig()   {
-               global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$HTTP_GET_VARS,$HTTP_POST_VARS,$CLIENT,$TYPO3_CONF_VARS;
+               global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
 
                        // MENU-ITEMS:
                        // If array, then it's a selector box menu
@@ -390,7 +390,7 @@ class SC_mod_tools_em_index {
                }
                
                        // CLEANSE SETTINGS
-               $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"]);
                if ($this->MOD_SETTINGS["function"]==2) {
                                // If listing from online repository, certain items are removed though:
                        unset($this->MOD_MENU["listOrder"]["type"]);
@@ -398,7 +398,7 @@ class SC_mod_tools_em_index {
                        unset($this->MOD_MENU["display_details"][3]);
                        unset($this->MOD_MENU["display_details"][4]);
                        unset($this->MOD_MENU["display_details"][5]);
-                       $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"]);
                }
        }
 
@@ -408,7 +408,7 @@ class SC_mod_tools_em_index {
         * @return      [type]          ...
         */
        function main() {
-               global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$HTTP_GET_VARS,$HTTP_POST_VARS,$CLIENT,$TYPO3_CONF_VARS;
+               global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
 
                $this->content.=$this->doc->startPage('Extension Manager');
                $this->content.=$this->doc->header('Extension Manager');
@@ -466,8 +466,6 @@ class SC_mod_tools_em_index {
                        }
                }
 
-//debug($GLOBALS['HTTP_GET_VARS']);
-                       
                if ($BE_USER->mayMakeShortcut())        {
                        $this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('','function',$this->MCONF['name']));
                }
@@ -567,7 +565,7 @@ class SC_mod_tools_em_index {
        function extensionList_import() {
                global $TYPO3_LOADED_EXT;
 
-               $listRemote = t3lib_div::GPvar('ter_connect');
+               $listRemote = t3lib_div::_GP('ter_connect');
                
                if ($listRemote)        {
                        list($inst_list,$inst_cat)=$this->getInstalledExtensions();
@@ -1117,7 +1115,7 @@ EXTENSION KEYS:
                                                                $this->content.=$this->doc->section("Installing ".$this->extensionTitleIconHeader($extKey,$list[$extKey]).strtoupper(": Database needs to be updated"),$updates,1,1,1,1);
                                                        }
                                                }
-                                               if (!$updates || t3lib_div::GPvar("_do_install")) {
+                                               if (!$updates || t3lib_div::_GP("_do_install")) {
                                                        $this->writeNewExtensionList($newExtList);
                
                
@@ -1129,7 +1127,7 @@ EXTENSION KEYS:
                                                        
                                                        <em>(".$content.")</em>",0,1);
                                                        */
-                                                       if ($this->CMD["clrCmd"] || t3lib_div::GPvar("_clrCmd"))        {
+                                                       if ($this->CMD["clrCmd"] || t3lib_div::_GP("_clrCmd"))  {
                                                                $vA = array("CMD"=>"");
                                                        } else {
                                                                $vA = array("CMD"=>Array("showExt"=>$extKey));
@@ -1158,7 +1156,7 @@ EXTENSION KEYS:
                                                if (filesize($editFile)<($this->kbMax*1024))    {
                                                        $outCode="";
                                                        $info="";
-                                                       $submittedContent = t3lib_div::GPvar("edit",1);
+                                                       $submittedContent = t3lib_div::_GP("edit");
                                                        $saveFlag=0;
                                                        if(isset($submittedContent["file"]))    {
                                                                $info.=$GLOBALS["TBE_TEMPLATE"]->rfw("<br /><strong>File saved.</strong>")."<br />";
@@ -1235,7 +1233,7 @@ EXTENSION KEYS:
                                                }
                                        break;
                                        case "upload":
-                                               $TER_CMD = t3lib_div::GPvar("TER_CMD",1);
+                                               $TER_CMD = t3lib_div::_GP("TER_CMD");
                                                if (is_array($TER_CMD)) {
                                                        $msg = $this->processRepositoryReturnData($TER_CMD);
                                                        if ($msg)       {
@@ -2176,12 +2174,12 @@ EXTENSION KEYS:
        function addClearCacheFiles()   {
                global $TYPO3_CONF_VARS;
                if ($TYPO3_CONF_VARS["EXT"]["extCache"])        {
-                       if (t3lib_div::GPvar("_clearCacheFiles"))       {
+                       if (t3lib_div::_GP("_clearCacheFiles")) {
                                $this->removeCacheFiles();
                                header("Location: ".t3lib_div::linkThisScript(array("_clearCacheFiles"=>0,"_cache_files_are_removed"=>1)));
                        } else {
                                $content="";
-                               if (t3lib_div::GPvar("_cache_files_are_removed"))       $content.=$GLOBALS["TBE_TEMPLATE"]->rfw("Cache files was removed.").'<br /><br />';
+                               if (t3lib_div::_GP("_cache_files_are_removed")) $content.=$GLOBALS["TBE_TEMPLATE"]->rfw("Cache files was removed.").'<br /><br />';
                                $content.='Click here to <a href="'.t3lib_div::linkThisScript(array("_clearCacheFiles"=>1)).'"><strong>clear cache files in typo3conf/</strong></a>';
                                $this->content.=$this->doc->spacer(20);
                                $this->content.=$this->doc->section("Clear cache files",$content,0,1);  
@@ -2560,7 +2558,7 @@ EXTENSION KEYS:
 
                        $tsStyleConfig->ext_loadResources($absPath."res/");
 
-                       $arr = unserialize($GLOBALS["TYPO3_CONF_VARS"]["EXT"]["extConf"][$eKey]);
+                       $arr = unserialize($TYPO3_CONF_VARS["EXT"]["extConf"][$eKey]);
                        $arr = is_array($arr) ? $arr : array();
                        
                                // Call processing function for constants config and data before write and form rendering:
@@ -2572,8 +2570,8 @@ EXTENSION KEYS:
                                unset($_params);
                        }                               
 
-                       if ($GLOBALS["HTTP_POST_VARS"]["submit"])       {
-                               $tsStyleConfig->ext_procesInput($GLOBALS["HTTP_POST_VARS"],array(),$theConstants,array());
+                       if (t3lib_div::_POST("submit")) {
+                               $tsStyleConfig->ext_procesInput(t3lib_div::_POST(),array(),$theConstants,array());
                                $arr = $tsStyleConfig->ext_mergeIncomingWithExisting($arr);
                                $this->writeTsStyleConfig($eKey,$arr);
                        }
@@ -2582,7 +2580,7 @@ EXTENSION KEYS:
                        
                        $MOD_MENU=array();
                        $MOD_MENU["constant_editor_cat"] = $tsStyleConfig->ext_getCategoriesForModMenu();
-                       $MOD_SETTINGS = t3lib_BEfunc::getModuleData($MOD_MENU, t3lib_div::GPvar("SET",1), "xMod_test");
+                       $MOD_SETTINGS = t3lib_BEfunc::getModuleData($MOD_MENU, t3lib_div::_GP("SET"), "xMod_test");
                        
                                // Resetting the menu (stop)
                        if (count($MOD_MENU)>1) {
@@ -2789,7 +2787,7 @@ EXTENSION KEYS:
         */
        function checkClearCache($eKey,$info)   {
                if ($info["EM_CONF"]["clearCacheOnLoad"])       {
-                       if (t3lib_div::GPvar("_clear_all_cache"))       {
+                       if (t3lib_div::_GP("_clear_all_cache")) {
                                $tce = t3lib_div::makeInstance("t3lib_TCEmain");
                                $tce->start(Array(),Array());
                                $tce->clear_cacheCmd("all");
@@ -2813,7 +2811,7 @@ EXTENSION KEYS:
                $instObj = new em_install_class;
                $uploadFolder = PATH_site.$this->ulFolder($eKey);
                if ($info["EM_CONF"]["uploadfolder"] && !@is_dir($uploadFolder))        {
-                       if (t3lib_div::GPvar("_uploadfolder"))  {
+                       if (t3lib_div::_GP("_uploadfolder"))    {
                                mkdir(ereg_replace('\/$','',$uploadFolder), 0777);
                                $indexContent = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <HTML>
@@ -2836,7 +2834,7 @@ EXTENSION KEYS:
                        $createDirs = array_unique(t3lib_div::trimExplode(",",$info["EM_CONF"]["createDirs"],1));
                        while(list(,$crDir)=each($createDirs))  {
                                if (!@is_dir(PATH_site.$crDir)) {
-                                       if (t3lib_div::GPvar("_createDir_".md5($crDir)))        {
+                                       if (t3lib_div::_GP("_createDir_".md5($crDir)))  {
                                                $crDirStart="";
                                                $dirs_in_path=explode("/",ereg_replace("/$","",$crDir));
                                                while(list(,$dirP)=each($dirs_in_path)) {
@@ -2886,7 +2884,7 @@ EXTENSION KEYS:
 
                        // Getting statement array from
                $instObj = new em_install_class;
-               $instObj->INSTALL = t3lib_div::GPvar("TYPO3_INSTALL",1);
+               $instObj->INSTALL = t3lib_div::_GP("TYPO3_INSTALL");
                $dbStatus=array();
 #              $instObj->mysqlVersion = "3.23";
 
index 9a5ad26..8ae4966 100755 (executable)
@@ -124,10 +124,10 @@ class SC_mod_web_perm_index {
                global $BE_USER,$BACK_PATH;
 
                        // Setting GPvars:
-               $this->id = intval(t3lib_div::GPvar('id'));
-               $this->edit = t3lib_div::GPvar('edit');
-               $this->return_id = t3lib_div::GPvar('return_id');
-               $this->lastEdited = t3lib_div::GPvar('lastEdited');
+               $this->id = intval(t3lib_div::_GP('id'));
+               $this->edit = t3lib_div::_GP('edit');
+               $this->return_id = t3lib_div::_GP('return_id');
+               $this->lastEdited = t3lib_div::_GP('lastEdited');
                
                        // Module name;
                $this->MCONF = $GLOBALS['MCONF'];
@@ -203,7 +203,7 @@ class SC_mod_web_perm_index {
                );
                
                        // Clean up settings:
-               $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']);
        }
 
        /**
index 3f18309..7188a8a 100755 (executable)
@@ -252,13 +252,13 @@ class SC_move_el {
 
                
                        // Setting internal vars:
-               $this->sys_language = intval(t3lib_div::GPvar('sys_language'));
-               $this->page_id=intval(t3lib_div::GPvar('uid'));
-               $this->table=t3lib_div::GPvar('table');
-               $this->R_URI=t3lib_div::GPvar('returnUrl');
-               $this->input_moveUid = t3lib_div::GPvar('moveUid');
+               $this->sys_language = intval(t3lib_div::_GP('sys_language'));
+               $this->page_id=intval(t3lib_div::_GP('uid'));
+               $this->table=t3lib_div::_GP('table');
+               $this->R_URI=t3lib_div::_GP('returnUrl');
+               $this->input_moveUid = t3lib_div::_GP('moveUid');
                $this->moveUid = $this->input_moveUid ? $this->input_moveUid : $this->page_id;
-               $this->makeCopy = t3lib_div::GPvar('makeCopy');
+               $this->makeCopy = t3lib_div::_GP('makeCopy');
                        
                        // Select-pages where clause for read-access:
                $this->perms_clause = $BE_USER->getPagePermsClause(1);
index 0c716a0..7d4f454 100755 (executable)
@@ -122,7 +122,7 @@ class transferData extends t3lib_transferData       {
 /**
  * Script Class
  * 
- * HTTP_GET_VARS:
+ * GPvars:
  * $table      :               Record table (or filename)
  * $uid        :               Record uid  (or '' when filename)
  * 
@@ -149,11 +149,11 @@ class SC_show_item {
         * @return      [type]          ...
         */
        function init() {
-               global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$HTTP_GET_VARS,$HTTP_POST_VARS,$CLIENT,$TYPO3_CONF_VARS;
+               global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
                
                $this->perms_clause = $BE_USER->getPagePermsClause(1);
-               $this->table = t3lib_div::GPvar('table');
-               $this->uid = t3lib_div::GPvar("uid");
+               $this->table = t3lib_div::_GP('table');
+               $this->uid = t3lib_div::_GP("uid");
                
                $this->access=0;
                $this->type="";
@@ -218,10 +218,10 @@ class SC_show_item {
         * @return      [type]          ...
         */
        function main() {
-               global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$HTTP_GET_VARS,$HTTP_POST_VARS,$CLIENT,$TYPO3_CONF_VARS;
+               global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
                
                if ($this->access)      {
-                       $returnLinkTag = t3lib_div::GPvar("returnUrl") ? '<a href="'.t3lib_div::GPvar("returnUrl").'" class="typo3-goBack">' : '<a href="#" onClick="window.close();">';
+                       $returnLinkTag = t3lib_div::_GP("returnUrl") ? '<a href="'.t3lib_div::_GP("returnUrl").'" class="typo3-goBack">' : '<a href="#" onClick="window.close();">';
                        
                        if ($this->type=="db")  {
                                $code=$this->doc->getHeader($this->table,$this->row,$this->pageinfo["_thePath"],1).'<br />';
@@ -236,7 +236,7 @@ class SC_show_item {
                                        if ($TCA[$this->table]["columns"][$name])       {
                                                if (!$TCA[$this->table]["columns"][$name]["exclude"] || $GLOBALS["BE_USER"]->check("non_exclude_fields",$this->table.":".$name))        {               
                                                        $i++;
-                                                       $codeArr[$i][]=stripslashes($LANG->sL(t3lib_BEfunc::getItemLabel($this->table,$name)));
+                                                       $codeArr[$i][]=$LANG->sL(t3lib_BEfunc::getItemLabel($this->table,$name));
                                                        $codeArr[$i][]=t3lib_BEfunc::getProcessedValue($this->table,$name,$this->row[$name]);
                                                }
                                        }
@@ -334,7 +334,7 @@ class SC_show_item {
                                }
                        }
                
-                       if (t3lib_div::GPvar("returnUrl"))      {
+                       if (t3lib_div::_GP("returnUrl"))        {
                                $this->content.=$this->doc->section('','<br />'.$returnLinkTag.'<strong>&lt; '.$LANG->sL("LLL:EXT:lang/locallang_core.php:labels.goBack").'</strong></a>');
                        }
                }               
index 178e5ab..70c3909 100755 (executable)
@@ -167,8 +167,8 @@ TABLE.typo3-CSM TR.typo3-CSM-itemRow { height: 13px; cursor: pointer; }
 /* Top menu (alt_topmenu_dummy.php) */
 BODY#typo3-alt-topmenu-dummy-php {     background-image: url(gfx/alt_topmenu_back_dummy.gif); }
 BODY#typo3-alt-topmenu-dummy-php-iconmenu { background-image: url(gfx/alt_topmenu_back_full.gif); margin-top: 8px; margin-left: 6px; }
-TABLE#typo3-topMenu TR TD {white-space: nowrap;}
-TABLE#typo3-topMenu TR TD.c-logout {padding-left: 20px;}
+TABLE#typo3-topMenu TR TD {white-space: nowrap; vertical-align: top; }
+TABLE#typo3-topMenu TR TD.c-logout, TABLE#typo3-topMenu TR TD.c-admin {padding-left: 20px;}
 TABLE#typo3-topMenu TR TD.c-menu IMG {margin: 0px 1px 0px 1px;}
 
 /* Logo frame (alt_toplogo.php) */
@@ -206,7 +206,7 @@ TABLE#typo3-curUrl { font-weight: bold; width: 100%; margin-bottom: 2px;}
 TABLE#typo3-RTElinkMenu TR TD { text-align: center; white-space: nowrap; width: 15%; font-weight: bold; }
 TABLE#typo3-linkTarget { margin-bottom: 25px; }
 TABLE#typo3-linkPages TR TD.c-wCell, TABLE#typo3-linkFiles TR TD.c-wCell, TABLE#typo3-EBrecords TR TD.c-wCell, TABLE#typo3-EBfiles TR TD.c-wCell { padding-right: 5px; white-space: nowrap; }
-BODY#typo3-browse-links-php IMG { vertical-align: middle; }
+BODY#typo3-browse-links-php IMG, BODY#ext-rte-app-rte-select-image-php IMG { vertical-align: middle; }
 BODY#typo3-browse-links-php IMG.c-blinkArrowL { margin: 0px 3px 0px 3px; }
 TABLE#typo3-linkMail, TABLE#typo3-linkURL, TABLE#typo3-linkTarget { margin-top: 5px; } 
 BODY#typo3-browse-links-php H3.bgColor5 { margin-top: 2px; }
@@ -214,6 +214,10 @@ BODY#typo3-browse-links-php A { text-decoration: none; }
 TABLE#typo3-msgBox { margin-top: 10px; margin-bottom: 10px;}
 TABLE#typo3-msgBox TR TD { padding: 10px 50px 10px 50px; }
 
+/* RTE select image */
+BODY#ext-rte-app-rte-select-image-php A { text-decoration : none; }
+BODY#ext-rte-app-rte-select-image-php TABLE TR TD TABLE TR.bgColor4 TD A { text-decoration : underline; }
+
 /* Palette display for TCEforms (top frame, alt_palette.php) */
 BODY#typo3-alt-palette-php { background-image: url(gfx/alt_topmenu_back_full.gif); margin-top: 8px; margin-left: 6px; }
 TABLE#typo3-TCEforms-palette TD {white-space: nowrap; vertical-align: top;}
@@ -301,6 +305,8 @@ BODY#typo3-file-edit-php DIV#c-submit, BODY#typo3-file-edit-php DIV#c-edit {
 TABLE.typo3-page-ceHeader { width: 100%; }
 TABLE.typo3-page-ceHeader IMG { vertical-align: middle; }
 TABLE.typo3-page-columnsMode IMG.c-divider { margin: 10px 0px 5px 0px;}
+TABLE.typo3-page-columnsMode TR TD A { text-decoration: none; }
+TABLE.typo3-page-columnsMode TR TD A B { text-decoration: underline; }
 
 /* Web > List */
 TABLE.typo3-dblist IMG { vertical-align: middle; }
index 25e58a5..3c879b4 100755 (executable)
@@ -333,7 +333,7 @@ class tx_cms_layout extends recordList {
                                                                break;
                                                        }
                                                } else {
-                                                       $theData[$field] = '&nbsp;&nbsp;<b>'.$GLOBALS['LANG']->sL(stripslashes($TCA['pages']['columns'][$field]['label']),1).'</b>'.$eI;
+                                                       $theData[$field] = '&nbsp;&nbsp;<b>'.$GLOBALS['LANG']->sL($TCA['pages']['columns'][$field]['label'],1).'</b>'.$eI;
                                                }
                                        break;
                                }
index 53f74be..8873edb 100755 (executable)
@@ -237,18 +237,18 @@ class SC_db_layout {
                $this->backPath = $GLOBALS['BACK_PATH'];
 
                        // GPvars:
-               $this->id = intval(t3lib_div::GPvar('id'));
-               $this->pointer = t3lib_div::GPvar('pointer');
-               $this->imagemode = t3lib_div::GPvar('imagemode');
-
-               $this->clear_cache = t3lib_div::GPvar('clear_cache');
-               $this->popView = t3lib_div::GPVar('popView');
-               $this->edit_record = t3lib_div::GPvar('edit_record');
-               $this->new_unique_uid = t3lib_div::GPvar('new_unique_uid');
-               $this->search_field = t3lib_div::GPvar('search_field');
-               $this->search_levels = t3lib_div::GPvar('search_levels');
-               $this->showLimit = t3lib_div::GPvar('showLimit');
-               $this->returnUrl = t3lib_div::GPvar('returnUrl');
+               $this->id = intval(t3lib_div::_GP('id'));
+               $this->pointer = t3lib_div::_GP('pointer');
+               $this->imagemode = t3lib_div::_GP('imagemode');
+
+               $this->clear_cache = t3lib_div::_GP('clear_cache');
+               $this->popView = t3lib_div::_GP('popView');
+               $this->edit_record = t3lib_div::_GP('edit_record');
+               $this->new_unique_uid = t3lib_div::_GP('new_unique_uid');
+               $this->search_field = t3lib_div::_GP('search_field');
+               $this->search_levels = t3lib_div::_GP('search_levels');
+               $this->showLimit = t3lib_div::_GP('showLimit');
+               $this->returnUrl = t3lib_div::_GP('returnUrl');
 
                        // Load page info array:
                $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
@@ -354,7 +354,7 @@ class SC_db_layout {
                }
                
                        // Clean up settings
-               $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']);
        }
 
        /**
@@ -365,6 +365,7 @@ class SC_db_layout {
        function clearCache()   {
                if ($this->clear_cache) {
                        $tce = t3lib_div::makeInstance('t3lib_TCEmain');
+                       $tce->stripslashes_values=0;
                        $tce->start(Array(),Array());
                        $tce->clear_cacheCmd($this->id);
                }
@@ -590,7 +591,7 @@ class SC_db_layout {
        
                        // Setting up the Return URL for coming back to THIS script (if links take the user to another script)  
                $R_URL_parts = parse_url(t3lib_div::getIndpEnv('REQUEST_URI'));
-               $R_URL_getvars = $GLOBALS['HTTP_GET_VARS'];
+               $R_URL_getvars = t3lib_div::_GET();
        
                unset($R_URL_getvars['popView']);
                unset($R_URL_getvars['new_unique_uid']);
index 203885e..2e3f4fa 100644 (file)
@@ -181,11 +181,11 @@ class SC_db_new_content_el {
                }
                
                        // Setting internal vars:
-               $this->id = intval(t3lib_div::GPvar('id'));
-               $this->sys_language = intval(t3lib_div::GPvar('sys_language_uid'));
-               $this->R_URI = t3lib_div::GPvar('returnUrl');
-               $this->colPos = t3lib_div::GPvar('colPos');
-               $this->uid_pid = intval(t3lib_div::GPvar('uid_pid'));
+               $this->id = intval(t3lib_div::_GP('id'));
+               $this->sys_language = intval(t3lib_div::_GP('sys_language_uid'));
+               $this->R_URI = t3lib_div::_GP('returnUrl');
+               $this->colPos = t3lib_div::_GP('colPos');
+               $this->uid_pid = intval(t3lib_div::_GP('uid_pid'));
 
                $this->MCONF['name'] = 'xMOD_db_new_content_el';
                $this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->id,'mod.'.$this->MCONF['name']);
index 1b5ad6c..bd37c63 100755 (executable)
@@ -1789,7 +1789,7 @@ class tslib_cObj {
                        // location data:
                if ($conf['locationData'])      {
                        if ($conf['locationData']=='HTTP_POST_VARS' && isset($GLOBALS['HTTP_POST_VARS']['locationData']))       {
-                               $locationData = $GLOBALS['HTTP_POST_VARS']['locationData'];
+                               $locationData = t3lib_div::_POST('locationData');
                        } else {
                                $locationData = $GLOBALS['TSFE']->id.':'.$this->currentRecord;  // locationData is [hte page id]:[tablename]:[uid of record]. Indicates on which page the record (from tablename with uid) is shown. Used to check access.
                        }
@@ -1845,16 +1845,16 @@ class tslib_cObj {
         * @link http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=368&cHash=d00731cd7b
         */
        function SEARCHRESULT($conf)    {
-               if (t3lib_div::GPvar('sword') && t3lib_div::GPvar('scols'))     {
+               if (t3lib_div::_GP('sword') && t3lib_div::_GP('scols')) {
                        $search = t3lib_div::makeInstance('tslib_search');
-                       $search->register_and_explode_search_string(stripSlashes(t3lib_div::GPvar('sword')));
-                       $search->register_tables_and_columns(t3lib_div::GPvar('scols'),$conf['allowedCols']);
+                       $search->register_and_explode_search_string(t3lib_div::_GP('sword'));
+                       $search->register_tables_and_columns(t3lib_div::_GP('scols'),$conf['allowedCols']);
                                // depth                
                        $depth=100;
                                // the startId is found
                        $theStartId=0;
-                       if (t3lib_div::testInt(t3lib_div::GPvar('stype')))      {
-                               $temp_theStartId=t3lib_div::GPvar('stype');
+                       if (t3lib_div::testInt(t3lib_div::_GP('stype')))        {
+                               $temp_theStartId=t3lib_div::_GP('stype');
                                $rootLine = $GLOBALS['TSFE']->sys_page->getRootLine($temp_theStartId);
                                        // The page MUST have a rootline with the Level0-page of the current site inside!!
                                while(list(,$val)=each($rootLine))      {
@@ -1862,12 +1862,12 @@ class tslib_cObj {
                                                $theStartId=$temp_theStartId;
                                        }
                                }
-                       } else if (t3lib_div::GPvar('stype'))   {
-                               if (substr(t3lib_div::GPvar('stype'),0,1)=='L') {
-                                       $pointer = intval(substr(t3lib_div::GPvar('stype'),1));
+                       } else if (t3lib_div::_GP('stype'))     {
+                               if (substr(t3lib_div::_GP('stype'),0,1)=='L')   {
+                                       $pointer = intval(substr(t3lib_div::_GP('stype'),1));
                                        $theRootLine = $GLOBALS['TSFE']->tmpl->rootLine;
                                                // location Data:
-                                       $locDat_arr = explode(':',$GLOBALS['HTTP_POST_VARS']['locationData']);
+                                       $locDat_arr = explode(':',t3lib_div::_POST('locationData'));
                                        $pId = intval($locDat_arr[0]);
                                        if ($pId)       {
                                                $altRootLine = $GLOBALS['TSFE']->sys_page->getRootLine($pId);
@@ -1908,13 +1908,13 @@ class tslib_cObj {
 #debug($search->query);
 
                                // count...
-                       if (t3lib_div::testInt(t3lib_div::GPvar('scount')))     {
-                               $search->res_count=t3lib_div::GPvar('scount');
+                       if (t3lib_div::testInt(t3lib_div::_GP('scount')))       {
+                               $search->res_count=t3lib_div::_GP('scount');
                        } else {
                                $search->count_query();
                        }
                                // range
-                       $spointer = intval(t3lib_div::GPvar('spointer'));
+                       $spointer = intval(t3lib_div::_GP('spointer'));
                        if (isset($conf['range']))      {
                                $theRange = intval($conf['range']);
                        } else {
@@ -1938,9 +1938,9 @@ class tslib_cObj {
                                $LD=$GLOBALS['TSFE']->tmpl->linkData($GLOBALS['TSFE']->page,$conf['target'],1,'');
                                $targetPart = $LD['target'] ? ' target="'.$LD['target'].'"' : '';
                                $urlParams = $this->URLqMark($LD['totalURL'],
-                                               '&sword='.rawurlencode(t3lib_div::GPvar('sword')).
-                                               '&scols='.rawurlencode(t3lib_div::GPvar('scols')).
-                                               '&stype='.rawurlencode(t3lib_div::GPvar('stype')).
+                                               '&sword='.rawurlencode(t3lib_div::_GP('sword')).
+                                               '&scols='.rawurlencode(t3lib_div::_GP('scols')).
+                                               '&stype='.rawurlencode(t3lib_div::_GP('stype')).
                                                '&scount='.$total);
                                        // substitution:
                                $result= $this->cObjGetSingle($conf['layout'],$conf['layout.'], 'layout');
@@ -2322,7 +2322,7 @@ class tslib_cObj {
                if (!$GLOBALS['TSFE']->no_cache || (!isset($GLOBALS['HTTP_POST_VARS'][$fieldName]) && !isset($GLOBALS['HTTP_GET_VARS'][$fieldName])) || $noValueInsert) {
                        return $defaultVal;
                } else {
-                       return t3lib_div::GPvar($fieldName);
+                       return t3lib_div::_GP($fieldName);
                }
        }
 
@@ -4339,7 +4339,7 @@ class tslib_cObj {
                        if ((string)$key!='')   {
                                switch(strtolower(trim($parts[0])))     {
                                        case 'gpvar':
-                                               $retVal= t3lib_div::GPvar($key);
+                                               $retVal= t3lib_div::_GP($key);
                                        break;
                                        case 'tsfe':
                                                $retVal= $GLOBALS['TSFE']->$key;
@@ -5345,7 +5345,7 @@ class tslib_cObj {
                        if (is_array($value))   {
                                reset($value);
                                while(list(,$Nvalue)=each($value))      {
-                                       $Nvalue = stripslashes($Nvalue);
+                                       $Nvalue = stripslashes($Nvalue);        // Oups, double stripping?
                                        if ($stripSlashes)      {$Nvalue = stripslashes($Nvalue);}
                                        $JSPart.="
        updateForm('".$formName."','".$arrPrefix."[".$fKey."][]',unescape('".rawurlencode($Nvalue)."'))";
@@ -5430,7 +5430,7 @@ class tslib_cObj {
         * @param       integer         The UID of the record from $table which we are going to update
         * @param       array           The data array where key/value pairs are fieldnames/values for the record to update.
         * @param       string          Comma list of fieldnames which are allowed to be updated. Only values from the data record for fields in this list will be updated!!
-        * @param       boolean         If set, then all the values are passed through addslashes() before being added to the query string.
+        * @param       boolean         If set, then all the values are passed through addslashes() before being added to the query string. YOU SHOULD ALWAYS USE THIS!
         * @return      string          The query, ready to execute.
         * @see DBgetInsert(), DBgetDelete(), user_feAdmin
         */
@@ -5466,7 +5466,7 @@ class tslib_cObj {
         * @param       integer         The PID value for the record to insert
         * @param       array           The data array where key/value pairs are fieldnames/values for the record to insert
         * @param       string          Comma list of fieldnames which are allowed to be inserted. Only values from the data record for fields in this list will be inserted!!
-        * @param       boolean         If set, then all the values are passed through addslashes() before being added to the query string.
+        * @param       boolean         If set, then all the values are passed through addslashes() before being added to the query string. YOU SHOULD ALWAYS USE THIS!
         * @return      string          The query, ready to execute.
         * @see DBgetUpdate(), DBgetDelete(), DBcompileInsert(), user_feAdmin
         */
@@ -5494,7 +5494,8 @@ class tslib_cObj {
        }
 
        /**
-        * Compiles a raw INSERT sql query, no questions asked.
+        * Compiles a raw INSERT sql query, no questions asked. 
+        * You MUST make sure that values are addslashes() before!
         * 
         * @param       string          The table name for the query.
         * @param       array           Array of fieldnames
@@ -5999,8 +6000,9 @@ class tslib_cObj {
                        $blackLine = $conf['line']?'<img src="clear.gif" width="1" height="'.intval($conf['line']).'" alt="" /><br /><table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="black" style="border: 0px;"><tr style="border: 0px;"><td style="border: 0px;"><img src="clear.gif" width="1" height="1" alt="" /></td></tr></table><br />':'';
 
                        $theCmd='';
-                       if (is_array($GLOBALS['HTTP_POST_VARS']['TSFE_EDIT']) && $GLOBALS['HTTP_POST_VARS']['TSFE_EDIT']['record']==$currentRecord && !$GLOBALS['HTTP_POST_VARS']['TSFE_EDIT']['update_close']) {
-                               $theCmd =$GLOBALS['HTTP_POST_VARS']['TSFE_EDIT']['cmd'];
+                       $TSFE_EDIT = t3lib_div::_POST('TSFE_EDIT');
+                       if (is_array($TSFE_EDIT) && $TSFE_EDIT['record']==$currentRecord && !$TSFE_EDIT['update_close'])        {
+                               $theCmd =$TSFE_EDIT['cmd'];
                        }
                        
                        switch($theCmd) {
@@ -6019,7 +6021,7 @@ class tslib_cObj {
                                        $tceforms->helpTextFontTag='<font face="verdana,sans-serif" color="#333333" size="1">';
                        
                                        $trData = t3lib_div::makeInstance('t3lib_transferData');
-                                       $trData->defVals = t3lib_div::GPvar('defVals',1);               // Added without testing - should provide ability to submit default values in frontend editing, in-page.
+                                       $trData->defVals = t3lib_div::_GP('defVals');           // Added without testing - should provide ability to submit default values in frontend editing, in-page.
                                        $trData->fetchRecord($table,    ($theCmd=='new'?$newUid:$dataArr['uid']), ($theCmd=='new'?'new':'') );
                                        reset($trData->regTableItems_data);
                                        $processedDataArr = current($trData->regTableItems_data);
@@ -6145,7 +6147,7 @@ class tslib_cObj {
                        $style = $conf['styleAttribute'] ? ' style="'.htmlspecialchars($conf['styleAttribute']).'"' : '';
                        $iconTitle = $this->stdWrap($conf['iconTitle'],$conf['iconTitle.']);
                        $iconImg = $conf['iconImg'] ? $conf['iconImg'] : '<img src="t3lib/gfx/edit_fe.gif" width="11" height="12" border="0" align="top" title="'.t3lib_div::deHSCentities(htmlspecialchars($iconTitle)).'"'.$style.' class="frontEndEditIcons" alt="" />';
-                       $nV=t3lib_div::GPvar('ADMCMD_view')?1:0;
+                       $nV=t3lib_div::_GP('ADMCMD_view')?1:0;
                        $icon = $this->editPanelLinkWrap_doWrap($iconImg,TYPO3_mainDir.'alt_doc.php?edit['.$rParts[0].']['.$rParts[1].']=edit&columnsOnly='.rawurlencode($fieldList).'&noView='.$nV.$addUrlParamStr,implode(':',$rParts));
                        if ($conf['beforeLastTag']<0)   {
                                $content=$icon.$content;
@@ -6179,7 +6181,7 @@ class tslib_cObj {
         */
        function editPanelLinkWrap($string,$formName,$cmd,$currentRecord='',$confirm='')        {
                $eFONPage = $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['edit_editFormsOnPage'];
-               $nV=t3lib_div::GPvar('ADMCMD_view')?1:0;
+               $nV=t3lib_div::_GP('ADMCMD_view')?1:0;
                if ($cmd=='edit' && !$eFONPage) {
                        $rParts = explode(':',$currentRecord);
                        $out=$this->editPanelLinkWrap_doWrap($string,TYPO3_mainDir.'alt_doc.php?edit['.$rParts[0].']['.$rParts[1].']=edit&noView='.$nV,$currentRecord);
index 6504222..82e7cea 100755 (executable)
         * Also sets internal clientInfo array (browser information) and a unique string (->uniqueString) for this script instance; A md5 hash of the microtime()
         * 
         * @param       array           The global $TYPO3_CONF_VARS array. Will be set internally in ->TYPO3_CONF_VARS
-        * @param       mixed           The value of t3lib_div::GPvar('id')
-        * @param       integer         The value of t3lib_div::GPvar('type')
-        * @param       boolean         The value of t3lib_div::GPvar('no_cache'), evaluated to 1/0
-        * @param       string          The value of t3lib_div::GPvar('cHash')
-        * @param       string          The value of t3lib_div::GPvar('jumpurl')
-        * @param       string          The value of t3lib_div::GPvar('MP')
-        * @param       string          The value of t3lib_div::GPvar('RDCT')
+        * @param       mixed           The value of t3lib_div::_GP('id')
+        * @param       integer         The value of t3lib_div::_GP('type')
+        * @param       boolean         The value of t3lib_div::_GP('no_cache'), evaluated to 1/0
+        * @param       string          The value of t3lib_div::_GP('cHash')
+        * @param       string          The value of t3lib_div::_GP('jumpurl')
+        * @param       string          The value of t3lib_div::_GP('MP')
+        * @param       string          The value of t3lib_div::_GP('RDCT')
         * @return      void            
         * @see index_ts.php
         */
                $this->fe_user = t3lib_div::makeInstance('tslib_feUserAuth');
                        
                $this->fe_user->checkPid = $this->TYPO3_CONF_VARS['FE']['checkFeUserPid'];
-               $this->fe_user->checkPid_value = implode(',',t3lib_div::intExplode(',',t3lib_div::GPvar('pid')));       // List of pid's acceptable
+               $this->fe_user->checkPid_value = implode(',',t3lib_div::intExplode(',',t3lib_div::_GP('pid'))); // List of pid's acceptable
 
                        // Check if a session is transferred:
-               if (t3lib_div::GPvar('FE_SESSION_KEY')) {
-                       $fe_sParts = explode('-',t3lib_div::GPvar('FE_SESSION_KEY'));
+               if (t3lib_div::_GP('FE_SESSION_KEY'))   {
+                       $fe_sParts = explode('-',t3lib_div::_GP('FE_SESSION_KEY'));
                        if (!strcmp(md5($fe_sParts[0].'/'.$this->TYPO3_CONF_VARS['SYS']['encryptionKey']), $fe_sParts[1]))      {       // If the session key hash check is OK:
                                $GLOBALS['HTTP_COOKIE_VARS'][$this->fe_user->name]=$fe_sParts[0];
                                $this->fe_user->forceSetCookie=1;
                $this->fe_user->start();
                $this->fe_user->unpack_uc('');
                $this->fe_user->fetchSessionData();     // Gets session data
-               $recs = t3lib_div::GPvar('recs');
+               $recs = t3lib_div::_GP('recs');
                if (is_array($recs))    {       // If any record registration is submitted, register the record.
                        $this->fe_user->record_registration($recs);
                }
        function mergingWithGetVars($GET_VARS)  {
                if (is_array($GET_VARS))        {
                        t3lib_div::addSlashesOnArray($GET_VARS);                // Since TYPO3 expects input in GETVARS to be escaped we will have to do so with the merging parameters.
-                       if (!is_array($GLOBALS['HTTP_GET_VARS']))       $GLOBALS['HTTP_GET_VARS'] = array();
-                       $GLOBALS['HTTP_GET_VARS'] = $_GET = t3lib_div::array_merge_recursive_overrule($GLOBALS['HTTP_GET_VARS'],$GET_VARS);
+                       $realGet = t3lib_div::_GET();           // Getting $_GET var, unescaped.
+                       if (!is_array($realGet))        $realGet = array();
+                       
+                               // Merge new values on top:
+                       $realGet = t3lib_div::array_merge_recursive_overrule($realGet,$GET_VARS);
+                       
+                               // Write values back to $_GET:
+                       t3lib_div::_GETset($realGet);
 
                                // Setting these specifically (like in the init-function):
                        if (isset($GET_VARS['type']))           $this->type = $GET_VARS['type'];
         * @return      void            
         */
        function makeCacheHash()        {
-               if ($this->cHash && is_array($GLOBALS['HTTP_GET_VARS']))        {
-                       $pA = $this->cHashParams(t3lib_div::implodeArrayForUrl('',$GLOBALS['HTTP_GET_VARS']));
+               $GET = t3lib_div::_GET();
+               if ($this->cHash && is_array($GET))     {
+                       $pA = $this->cHashParams(t3lib_div::implodeArrayForUrl('',$GET));
                        $this->cHash_array = $pA;
                        $cHash_calc = t3lib_div::shortMD5(serialize($this->cHash_array));
                        if ($cHash_calc!=$this->cHash)  {
         * @return      string          'email' if a formmail has been send, 'fe_tce' if front-end data submission (like forums, guestbooks) is send. '' if none.
         */
        function checkDataSubmission()  {
-               if ($GLOBALS['HTTP_POST_VARS']['formtype_db'] || $GLOBALS['HTTP_POST_VARS']['formtype_mail'])   {
+               global $HTTP_POST_VARS;
+               
+               if ($HTTP_POST_VARS['formtype_db'] || $HTTP_POST_VARS['formtype_mail']) {
                        $refInfo=parse_url(t3lib_div::getIndpEnv('HTTP_REFERER'));
                        if (t3lib_div::getIndpEnv('TYPO3_HOST_ONLY')==$refInfo['host'] || $this->TYPO3_CONF_VARS['SYS']['doNotCheckReferer'])   {
-                               if ($this->locDataCheck($GLOBALS['HTTP_POST_VARS']['locationData']))    {
+                               if ($this->locDataCheck($HTTP_POST_VARS['locationData']))       {
                                        $ret = '';
-                                       if ($GLOBALS['HTTP_POST_VARS']['formtype_mail'])        {
+                                       if ($HTTP_POST_VARS['formtype_mail'])   {
                                                $ret = 'email';
-                                       } elseif ($GLOBALS['HTTP_POST_VARS']['formtype_db'] && is_array($GLOBALS['HTTP_POST_VARS']['data']))    {
+                                       } elseif ($HTTP_POST_VARS['formtype_db'] && is_array($HTTP_POST_VARS['data']))  {
                                                $ret = 'fe_tce';
                                        }
                                        $GLOBALS['TT']->setTSlogMessage('"Check Data Submission": Return value: '.$ret,0);
         */
        function fe_tce()       {
                $fe_tce = t3lib_div::makeInstance('tslib_feTCE');
-               $fe_tce->start($GLOBALS['HTTP_POST_VARS']['data'],$this->config['FEData.']);
+               $fe_tce->start(t3lib_div::_POST('data'),$this->config['FEData.']);
                $fe_tce->includeScripts();
        }
 
        function sendFormmail() {
                $formmail = t3lib_div::makeInstance('t3lib_formmail');
 
-               $EMAIL_VARS = $GLOBALS['HTTP_POST_VARS'];
+               $EMAIL_VARS = t3lib_div::_POST();
                unset($EMAIL_VARS['locationData']);
                unset($EMAIL_VARS['formtype_mail']);
 
        function checkJumpUrl() {
                global $TCA;
                
-               $mid = t3lib_div::GPvar('mid');         // mail id, if direct mail link
-               $rid = t3lib_div::GPvar('rid');         // recipient id, if direct mail link
+               $mid = t3lib_div::_GP('mid');           // mail id, if direct mail link
+               $rid = t3lib_div::_GP('rid');           // recipient id, if direct mail link
                if ((strcmp($this->jumpurl,'') && ((t3lib_div::getIndpEnv('HTTP_REFERER') || $this->TYPO3_CONF_VARS['SYS']['doNotCheckReferer']) || $mid)) || ($this->jumpurl = $this->sys_page->getExtURL($this->page,$this->config['config']['disablePageExternalUrl'])))     {
                        if ($mid && is_array($TCA['sys_dmail']))        {       // Yes, it's OK if the link comes from a direct mail. AND sys_dmail module has installed the table, sys_dmail (and therefore we expect sys_dmail_maillog as well!)
                                $temp_recip=explode('_',$rid);
         */
        function jumpUrl()      {
                if ($this->jumpurl)     {
-                       if (t3lib_div::GPvar('juSecure'))       {
+                       if (t3lib_div::_GP('juSecure')) {
                                $hArr = array(  
                                        $this->jumpurl,
-                                       t3lib_div::GPvar('locationData'),
+                                       t3lib_div::_GP('locationData'),
                                        $this->TYPO3_CONF_VARS['SYS']['encryptionKey']
                                );
                                $calcJuHash=t3lib_div::shortMD5(serialize($hArr));
-                               $locationData = t3lib_div::GPvar('locationData');
-                               $juHash = t3lib_div::GPvar('juHash');
+                               $locationData = t3lib_div::_GP('locationData');
+                               $juHash = t3lib_div::_GP('juHash');
                                if ($juHash == $calcJuHash)     {
                                        if ($this->locDataCheck($locationData)) {
                                                $this->jumpurl = rawurldecode($this->jumpurl);  // 211002 - goes with cObj->filelink() rawurlencode() of filenames so spaces can be allowed.
                                                if (@is_file($this->jumpurl))   {
-                                                       $mimeType = t3lib_div::GPvar('mimeType');
+                                                       $mimeType = t3lib_div::_GP('mimeType');
                                                        $mimeType = $mimeType ? $mimeType : 'application/octet-stream';
                                                        Header('Content-Type: '.$mimeType);
                                                        Header('Content-Disposition: attachment; filename='.basename($this->jumpurl));
@@ -2093,7 +2102,7 @@ if (version == "n3") {
                        $GLOBALS['TT']->pull();
                }
 
-/*             if ($this->beUserLogin && t3lib_div::GPvar('ADMCMD_view'))      {               // This is a try to change target=_top to target=_self if pages are shown in the Web>View module...
+/*             if ($this->beUserLogin && t3lib_div::_GP('ADMCMD_view'))        {               // This is a try to change target=_top to target=_self if pages are shown in the Web>View module...
                        $this->content = str_replace('target="_top"','target="_self"',$this->content);
                        $this->content = str_replace('target=_top','target="_self"',$this->content);
                }*/
@@ -2144,7 +2153,7 @@ if (version == "n3") {
                        $GLOBALS['TT']->push('Stat');
                                if (t3lib_extMgm::isLoaded('sys_stat') && $this->config['config']['stat_mysql'])        {
                                                // Jumpurl:
-                                       $sword = t3lib_div::GPvar('sword');
+                                       $sword = t3lib_div::_GP('sword');
                                        if ($sword)     {
                                                $jumpurl_msg='sword:'.$sword;
                                        } elseif ($this->jumpurl) {
@@ -2164,8 +2173,8 @@ if (version == "n3") {
                                        }
                                
                                        $query ='INSERT INTO sys_stat SET ';
-                                       $query.='page_id="'.$this->id.'",';             // id
-                                       $query.='page_type="'.$this->type.'",';         // type
+                                       $query.='page_id="'.intval($this->id).'",';             // id
+                                       $query.='page_type="'.intval($this->type).'",';         // type
                                        $query.='jumpurl="'.addslashes($jumpurl_msg).'",';              // jumpurl message
                                        $query.='feuser_id="'.$this->fe_user->user['uid'].'",';         // fe_user id, integer
                                        $query.='cookie="'.addslashes($this->fe_user->id).'",';         // cookie as set or retrieve. If people has cookies disabled this will vary all the time...
index 0f25696..67f2869 100644 (file)
@@ -93,7 +93,7 @@ class tslib_feTCE     {
         * Traverses the input data and fills in the array, $this->extScripts with references to files which are then included by includeScripts() (called AFTER start() in tslib_fe)
         * These scripts will then put the content into the database.
         * 
-        * @param       array           Input data coming from POST vars, $GLOBALS['HTTP_POST_VARS']['data']
+        * @param       array           Input data coming from typ. $_POST['data'] vars
         * @param       array           TypoScript configuration for the FEDATA object, $this->config['FEData.']
         * @return      void            
         * @see tslib_fe::fe_tce(), includeScripts()
@@ -186,7 +186,7 @@ class tslib_feTCE   {
         * @access private
         */
        function checkDoublePostExist($table,$doublePostField,$key)     {
-               $query = 'SELECT count(*) FROM '.$table.' WHERE '.$doublePostField.'='.$key;
+               $query = 'SELECT count(*) FROM '.$table.' WHERE '.$doublePostField.'='.intval($key);
                $res = mysql(TYPO3_db,$query);
                echo mysql_error();
                $row = mysql_fetch_row($res);
@@ -244,7 +244,7 @@ class tslib_feTCE   {
                while(list($f,$v)=each($dataArr))       {
                        if (t3lib_div::inList($extraList,$f) || isset($GLOBALS['TCA'][$table]['columns'][$f]))  {
                                $fp[]=$f;
-                               $vp[]=$v;
+                               $vp[]=addslashes($v);
                        }
                }
                return $this->getInsert($table,$fp,$vp);
@@ -255,7 +255,7 @@ class tslib_feTCE   {
         * 
         * @param       string          Table name in which to insert the record
         * @param       array           Array with field names as values
-        * @param       array           Array with field values as values - in the same order and number as $fp
+        * @param       array           Array with field values as values - in the same order and number as $fp. MUST BE passed through addslashes() before!!
         * @return      string          The INSERT query.
         * @access private
         */
index 9053009..865e9ec 100644 (file)
@@ -342,7 +342,7 @@ class tslib_feUserAuth extends t3lib_userAuth {
                                reset($data);
                                while(list($rec_id,$value)=each($data)) {
                                        if ($value != $recs_array[$table][$rec_id])     {
-                                               $recs_array[$table][$rec_id] = stripslashes($value);
+                                               $recs_array[$table][$rec_id] = $value;
                                                $change=1;
                                        }
                                }
index 821e26f..5bfc006 100755 (executable)
@@ -167,7 +167,7 @@ function linkTo_UnCryptMailto(s)    {       //
                if ($GLOBALS['TSFE']->config['config']['setJS_openPic'])        $GLOBALS['TSFE']->setJS('openPic');
                
                $GLOBALS['TSFE']->sWordRegEx='';
-               $GLOBALS['TSFE']->sWordList = t3lib_div::GPvar('sword_list');
+               $GLOBALS['TSFE']->sWordList = t3lib_div::_GP('sword_list');
                if (is_array($GLOBALS['TSFE']->sWordList))      {
                        $standAlone = trim(''.$GLOBALS['TSFE']->config['config']['sword_standAlone']);
                        $noMixedCase = trim(''.$GLOBALS['TSFE']->config['config']['sword_noMixedCase']);
@@ -194,11 +194,12 @@ function linkTo_UnCryptMailto(s)  {       //
                        reset($linkVarArr);
                        while(list(,$val)=each($linkVarArr))    {
                                $val=trim($val);
-                               if ($val && isset($GLOBALS['HTTP_GET_VARS'][$val]))     {
-                                       if (!is_array($GLOBALS['HTTP_GET_VARS'][$val])) {
-                                               $GLOBALS['TSFE']->linkVars.='&'.$val.'='.rawurlencode($GLOBALS['HTTP_GET_VARS'][$val]);
+                               $GET = t3lib_div::_GET();
+                               if ($val && isset($GET[$val]))  {
+                                       if (!is_array($GET[$val]))      {
+                                               $GLOBALS['TSFE']->linkVars.='&'.$val.'='.rawurlencode($GET[$val]);
                                        } else {
-                                               $GLOBALS['TSFE']->linkVars.=t3lib_div::implodeArrayForUrl($val,$GLOBALS['HTTP_GET_VARS'][$val]);
+                                               $GLOBALS['TSFE']->linkVars.=t3lib_div::implodeArrayForUrl($val,$GET[$val]);
                                        }
                                }
                        }
@@ -319,33 +320,51 @@ function linkTo_UnCryptMailto(s)  {       //
                $GLOBALS['TSFE']->content='';
 
                        // Setting document type:
-               switch((string)$GLOBALS['TSFE']->config['config']['doctype'])   {
-                       case 'xhtml_trans':
-                               $GLOBALS['TSFE']->content.='<!DOCTYPE html 
+               $docTypeParts=array();
+               if ($GLOBALS['TSFE']->config['config']['doctype'])      {
+                       switch((string)$GLOBALS['TSFE']->config['config']['doctype'])   {
+                               case 'xhtml_trans':
+                                       $docTypeParts[]='<?xml version="1.0" encoding="'.$theCharset.'"?>';
+                                       $docTypeParts[]='<!DOCTYPE html 
      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<?xml version="1.0" encoding="'.$theCharset.'"?>
-';
-                       break;
-                       case 'xhtml_frames':
-                               $GLOBALS['TSFE']->content.='<!DOCTYPE html 
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
+                               break;
+                               case 'xhtml_strict':
+                                       $docTypeParts[]='<?xml version="1.0" encoding="'.$theCharset.'"?>';
+                                       $docTypeParts[]='<!DOCTYPE html 
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
+                               break;
+                               case 'xhtml_frames':
+                                       $docTypeParts[]='<?xml version="1.0" encoding="'.$theCharset.'"?>';
+                                       $docTypeParts[]='<!DOCTYPE html 
      PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-<?xml version="1.0" encoding="'.$theCharset.'"?>
-';
-                       break;
-                       default:
-                               $GLOBALS['TSFE']->content.='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
-                       break;
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">';
+                               break;
+                               default:
+                       $docTypeParts[]=$GLOBALS['TSFE']->config['config']['doctype'];
+                               break;
+                       }
+               } else {
+                       $docTypeParts[]='<!DOCTYPE html 
+       PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
                }
                
+                       // Swap XML and doctype order around (for MSIE / Opera standards compliance)
+               if ($GLOBALS['TSFE']->config['config']['doctypeSwitch'])        {
+                       $docTypeParts = array_reverse($docTypeParts);
+               }
+               
+                       // Adding doctype parts:
+               $GLOBALS['TSFE']->content.=implode(chr(10),$docTypeParts).chr(10);
+               
                $GLOBALS['TSFE']->content.='
 <html>
 <head>
 <!-- '.($customContent?$customContent.chr(10):'').'
        This website is brought to you by TYPO3 - get.content.right
-       TYPO3 is a free open source Content Management Framework
-       created by Kasper Skaarhoej and licensed under GNU/GPL.
+       TYPO3 is a free open source Content Management Framework created by Kasper Skaarhoj and licensed under GNU/GPL.
+       TYPO3 is copyright 1998-2004 of Kasper Skaarhoj. Extensions are copyright of their respective owners.
        Information and contribution at http://www.typo3.com
 -->
 ';
@@ -633,7 +652,7 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/class
 // ********************************************************
 // Includes the search-class if $sword and $scols are set.
 // ********************************************************
-if (t3lib_div::GPvar('sword') && t3lib_div::GPvar('scols'))    {
+if (t3lib_div::_GP('sword') && t3lib_div::_GP('scols'))        {
        require_once(PATH_tslib.'class.tslib_search.php');
 }
 
index 6900a9e..7462fcf 100755 (executable)
@@ -286,16 +286,17 @@ class tslib_pibase {
         * 
         * @param       string          The content string to wrap in <a> tags
         * @param       array           Array with URL parameters as key/value pairs. They will be "imploded" and added to the list of parameters defined in the plugins TypoScript property "parent.addParams" plus $this->pi_moreParams.
-        * @param       boolean         If $cache is set, the page is asked to be cached by a &cHash value (unless the current plugin using this class is a USER_INT). Otherwise the no_cache-parameter will be a part of the link.
+        * @param       boolean         If $cache is set (0/1), the page is asked to be cached by a &cHash value (unless the current plugin using this class is a USER_INT). Otherwise the no_cache-parameter will be a part of the link.
+        * @param       integer         Alternative page ID for the link. (By default this function links to the SAME page!)
         * @return      string          The input string wrapped in <a> tags
         * @see pi_linkTP_keepPIvars(), tslib_cObj::typoLink()
         */
-       function pi_linkTP($str,$urlParameters=array(),$cache=0)        {
+       function pi_linkTP($str,$urlParameters=array(),$cache=0,$altPageId=0)   {
                $conf=array();
-               $conf['useCacheHash']=$this->pi_USER_INT_obj?0:$cache;
-               $conf['no_cache']=$this->pi_USER_INT_obj?0:!$cache;
-               $conf['parameter']=$this->pi_tmpPageId ? $this->pi_tmpPageId : $GLOBALS['TSFE']->id;
-               $conf['additionalParams']=$this->conf['parent.']['addParams'].t3lib_div::implodeArrayForUrl('',$urlParameters,'',1).$this->pi_moreParams;
+               $conf['useCacheHash'] = $this->pi_USER_INT_obj ? 0 : $cache;
+               $conf['no_cache'] = $this->pi_USER_INT_obj ? 0 : !$cache;
+               $conf['parameter'] = $altPageId ? $altPageId : ($this->pi_tmpPageId ? $this->pi_tmpPageId : $GLOBALS['TSFE']->id);
+               $conf['additionalParams'] = $this->conf['parent.']['addParams'].t3lib_div::implodeArrayForUrl('',$urlParameters,'',1).$this->pi_moreParams;
                
                return $this->cObj->typoLink($str, $conf);
        }
@@ -309,10 +310,11 @@ class tslib_pibase {
         * @param       array           Array of values to override in the current piVars. Contrary to pi_linkTP the keys in this array must correspond to the real piVars array and therefore NOT be prefixed with the $this->prefixId string. Further, if a value is a blank string it means the piVar key will not be a part of the link (unset)
         * @param       boolean         If $cache is set, the page is asked to be cached by a &cHash value (unless the current plugin using this class is a USER_INT). Otherwise the no_cache-parameter will be a part of the link.
         * @param       boolean         If set, then the current values of piVars will NOT be preserved anyways... Practical if you want an easy way to set piVars without having to worry about the prefix, "tx_xxxxx[]"
+        * @param       integer         Alternative page ID for the link. (By default this function links to the SAME page!)
         * @return      string          The input string wrapped in <a> tags
         * @see pi_linkTP()
         */
-       function pi_linkTP_keepPIvars($str,$overrulePIvars=array(),$cache=0,$clearAnyway=0)     {
+       function pi_linkTP_keepPIvars($str,$overrulePIvars=array(),$cache=0,$clearAnyway=0,$altPageId=0)        {
                if (is_array($this->piVars) && is_array($overrulePIvars) && !$clearAnyway)      {
                        $piVars = $this->piVars;
                        unset($piVars['DATA']);
@@ -321,7 +323,7 @@ class tslib_pibase {
                                $cache = $this->pi_autoCache($overrulePIvars);
                        }
                }
-               $res = $this->pi_linkTP($str,Array($this->prefixId=>$overrulePIvars),$cache);
+               $res = $this->pi_linkTP($str,Array($this->prefixId=>$overrulePIvars),$cache,$altPageId);
                return $res;
        }
 
@@ -332,11 +334,12 @@ class tslib_pibase {
         * @param       array           See pi_linkTP_keepPIvars
         * @param       boolean         See pi_linkTP_keepPIvars
         * @param       boolean         See pi_linkTP_keepPIvars
+        * @param       integer         See pi_linkTP_keepPIvars
         * @return      string          The URL ($this->cObj->lastTypoLinkUrl)
         * @see pi_linkTP_keepPIvars()
         */
-       function pi_linkTP_keepPIvars_url($overrulePIvars=array(),$cache=0,$clearAnyway=0)      {
-               $this->pi_linkTP_keepPIvars('|',$overrulePIvars,$cache,$clearAnyway);
+       function pi_linkTP_keepPIvars_url($overrulePIvars=array(),$cache=0,$clearAnyway=0,$altPageId=0) {
+               $this->pi_linkTP_keepPIvars('|',$overrulePIvars,$cache,$clearAnyway,$altPageId);
                return $this->cObj->lastTypoLinkUrl;
        }
 
@@ -349,19 +352,20 @@ class tslib_pibase {
         * @param       boolean         See pi_linkTP_keepPIvars
         * @param       array           Array of values to override in the current piVars. Same as $overrulePIvars in pi_linkTP_keepPIvars
         * @param       boolean         If true, only the URL is returned, not a full link
+        * @param       integer         Alternative page ID for the link. (By default this function links to the SAME page!)
         * @return      string          The input string wrapped in <a> tags
         * @see pi_linkTP(), pi_linkTP_keepPIvars()
         */
-       function pi_list_linkSingle($str,$uid,$cache=FALSE,$mergeArr=array(),$urlOnly=FALSE)    {
+       function pi_list_linkSingle($str,$uid,$cache=FALSE,$mergeArr=array(),$urlOnly=FALSE,$altPageId=0)       {
                if ($this->prefixId)    {
                        if ($cache)     {
                                $overrulePIvars=$uid?array('showUid'=>$uid):Array();
                                $overrulePIvars=array_merge($overrulePIvars,$mergeArr);
-                               $str = $this->pi_linkTP($str,Array($this->prefixId=>$overrulePIvars),$cache);
+                               $str = $this->pi_linkTP($str,Array($this->prefixId=>$overrulePIvars),$cache,$altPageId);
                        } else {
                                $overrulePIvars=array('showUid'=>$uid?$uid:'');
                                $overrulePIvars=array_merge($overrulePIvars,$mergeArr);
-                               $str = $this->pi_linkTP_keepPIvars($str,$overrulePIvars,$cache);
+                               $str = $this->pi_linkTP_keepPIvars($str,$overrulePIvars,$cache,0,$altPageId);
                        }
                        
                                // If urlOnly flag, return only URL as it has recently be generated.
index 7337e40..fafa0e1 100755 (executable)
@@ -119,6 +119,8 @@ if (!get_magic_quotes_gpc())        {
        $TT->push('Add slashes to GET/POST arrays','');
        t3lib_div::addSlashesOnArray($HTTP_GET_VARS);
        t3lib_div::addSlashesOnArray($HTTP_POST_VARS);
+       $_GET = $HTTP_GET_VARS;
+       $_POST = $HTTP_POST_VARS;
        $TT->pull();
 }
 
@@ -129,13 +131,13 @@ if (!get_magic_quotes_gpc())      {
 $temp_TSFEclassName=t3lib_div::makeInstanceClassName('tslib_fe');
 $TSFE = new $temp_TSFEclassName(
                $TYPO3_CONF_VARS, 
-               t3lib_div::GPvar('id'), 
-               t3lib_div::GPvar('type'), 
-               t3lib_div::GPvar('no_cache'), 
-               t3lib_div::GPvar('cHash'), 
-               t3lib_div::GPvar('jumpurl'),
-               t3lib_div::GPvar('MP'),
-               t3lib_div::GPvar('RDCT')
+               t3lib_div::_GP('id'), 
+               t3lib_div::_GP('type'), 
+               t3lib_div::_GP('no_cache'), 
+               t3lib_div::_GP('cHash'), 
+               t3lib_div::_GP('jumpurl'),
+               t3lib_div::_GP('MP'),
+               t3lib_div::_GP('RDCT')
        );
 $TSFE->connectToMySQL();
 if ($TSFE->RDCT)       {$TSFE->sendRedirect();}
@@ -190,16 +192,16 @@ if ($HTTP_COOKIE_VARS['be_typo_user']) {          // If the backend cookie is set, we pr
                                $TSFE->displayEditIcons = $BE_USER->extGetFeAdminValue('edit', 'displayIcons');
                                $TSFE->displayFieldEditIcons = $BE_USER->extGetFeAdminValue('edit', 'displayFieldIcons');
        
-                               if (t3lib_div::GPvar('ADMCMD_editIcons'))       {
+                               if (t3lib_div::_GP('ADMCMD_editIcons')) {
                                        $TSFE->displayFieldEditIcons=1;
                                        $BE_USER->uc['TSFE_adminConfig']['edit_editNoPopup']=1;
                                }
-                               if (t3lib_div::GPvar('ADMCMD_simUser')) {
-                                       $BE_USER->uc['TSFE_adminConfig']['preview_simulateUserGroup']=intval(t3lib_div::GPvar('ADMCMD_simUser'));
+                               if (t3lib_div::_GP('ADMCMD_simUser'))   {
+                                       $BE_USER->uc['TSFE_adminConfig']['preview_simulateUserGroup']=intval(t3lib_div::_GP('ADMCMD_simUser'));
                                        $BE_USER->ext_forcePreview=1;
                                }
-                               if (t3lib_div::GPvar('ADMCMD_simTime')) {
-                                       $BE_USER->uc['TSFE_adminConfig']['preview_simulateDate']=intval(t3lib_div::GPvar('ADMCMD_simTime'));
+                               if (t3lib_div::_GP('ADMCMD_simTime'))   {
+                                       $BE_USER->uc['TSFE_adminConfig']['preview_simulateDate']=intval(t3lib_div::_GP('ADMCMD_simTime'));
                                        $BE_USER->ext_forcePreview=1;
                                }
        
index 5a496ef..345a9db 100755 (executable)
@@ -179,15 +179,15 @@ class user_feAdmin        {
                $this->templateCode = $this->conf['templateContent'] ? $this->conf['templateContent'] : $this->cObj->fileResource($this->conf['templateFile']);
 
                        // Getting the cmd var
-               $this->cmd = (string)t3lib_div::GPvar('cmd');
+               $this->cmd = (string)t3lib_div::_GP('cmd');
                        // Getting the preview var
-               $this->preview = (string)t3lib_div::GPvar('preview');
+               $this->preview = (string)t3lib_div::_GP('preview');
                        // backURL is a given URL to return to when login is performed
-               $this->backURL = t3lib_div::GPvar('backURL');
+               $this->backURL = t3lib_div::_GP('backURL');
                        // Uid to edit:
-               $this->recUid = t3lib_div::GPvar('rU');
+               $this->recUid = t3lib_div::_GP('rU');
                        // Authentication code:
-               $this->authCode = t3lib_div::GPvar('aC');
+               $this->authCode = t3lib_div::_GP('aC');
                        // get table
                $this->theTable = $this->conf['table'];
                
@@ -240,7 +240,7 @@ class user_feAdmin  {
                );
                
                        // Setting incoming data. Non-stripped
-               $fe=t3lib_div::GPvar('FE');
+               $fe=t3lib_div::_GP('FE');
                $this->dataArr = $fe[$this->theTable];  // Incoming data.
 
 /*
@@ -262,7 +262,7 @@ class user_feAdmin  {
                // *****************
                // If data is submitted, we take care of it here.
                // *******************
-               if ($this->cmd=='delete' && !$this->preview && !t3lib_div::GPvar('doNotSave'))  {       // Delete record if delete command is sent + the preview flag is NOT set.
+               if ($this->cmd=='delete' && !$this->preview && !t3lib_div::_GP('doNotSave'))    {       // Delete record if delete command is sent + the preview flag is NOT set.
                        $this->deleteRecord();
                }
                        // If incoming data is seen...
@@ -281,7 +281,7 @@ class user_feAdmin  {
                debug($this->preview);
                */
                                // if not preview and no failures, then set data...
-                       if (!$this->failure && !$this->preview && !t3lib_div::GPvar('doNotSave'))       {       // doNotSave is a global var (eg a 'Cancel' submit button) that prevents the data from being processed
+                       if (!$this->failure && !$this->preview && !t3lib_div::_GP('doNotSave')) {       // doNotSave is a global var (eg a 'Cancel' submit button) that prevents the data from being processed
                                $this->save();
                        } else {
                                if ($this->conf['debug'])               debug($this->failure);
@@ -440,7 +440,7 @@ class user_feAdmin  {
                                                        $this->dataArr[$theField] = substr(md5(uniqid(microtime(),1)),0,intval($cmdParts[1]));
                                                break;
                                                case 'files':
-                                                       if ($this->cmdKey=='create' && !t3lib_div::GPvar('doNotSave'))  {
+                                                       if ($this->cmdKey=='create' && !t3lib_div::_GP('doNotSave'))    {
                                                                $this->processFiles($cmdParts,$theField);
                                                        } else unset($this->dataArr[$theField]);        // Fields with files cannot be edited - only created.
                                                break;
@@ -1007,7 +1007,7 @@ class user_feAdmin        {
        function displayCreateScreen()  {
                if ($this->conf['create'])      {
                        $templateCode = $this->cObj->getSubpart($this->templateCode, ((!$GLOBALS['TSFE']->loginUser||$this->conf['create.']['noSpecialLoginForm'])?'###TEMPLATE_CREATE'.$this->previewLabel.'###':'###TEMPLATE_CREATE_LOGIN'.$this->previewLabel.'###'));
-                       $failure = t3lib_div::GPvar('noWarnings')?'':$this->failure;
+                       $failure = t3lib_div::_GP('noWarnings')?'':$this->failure;
                        if (!$failure)  $templateCode = $this->cObj->substituteSubpart($templateCode, '###SUB_REQUIRED_FIELDS_WARNING###', '');
 
                        $templateCode = $this->removeRequired($templateCode,$failure);
@@ -1084,7 +1084,7 @@ class user_feAdmin        {
 
                if ($this->conf['debug'])       debug('displayEditForm(): '.'###TEMPLATE_EDIT'.$this->previewLabel.'###',1);
                $templateCode = $this->cObj->getSubpart($this->templateCode, '###TEMPLATE_EDIT'.$this->previewLabel.'###');
-               $failure = t3lib_div::GPvar('noWarnings')?'':$this->failure;
+               $failure = t3lib_div::_GP('noWarnings')?'':$this->failure;
                if (!$failure)  {$templateCode = $this->cObj->substituteSubpart($templateCode, '###SUB_REQUIRED_FIELDS_WARNING###', '');}
 
                $templateCode = $this->removeRequired($templateCode,$failure);
@@ -1111,15 +1111,15 @@ class user_feAdmin      {
                if ($this->conf['setfixed'])    {
                        $theUid = intval($this->recUid);
                        $origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable,  $theUid);
-                       $fD = t3lib_div::GPvar('fD');
-                       $sFK = t3lib_div::GPvar('sFK');
+                       $fD = t3lib_div::_GP('fD');
+                       $sFK = t3lib_div::_GP('sFK');
 
                        $fieldArr=array();
                        if