Documentation TYPO3 par Ameos

t3lib_div Class Reference

List of all members.

Public Member Functions

 trimExplode ($delim, $string, $onlyNonEmptyValues=0)
 dirname ($path)
 revExplode ($delim, $string, $count=0)
 getIndpEnv ($getEnvName)
 _GP ($var)
 _GET ($var=NULL)
 _POST ($var=NULL)
 _GETset ($inputGet, $key='')
 GPvar ($var, $strip=0)
 GParrayMerged ($var)
 gif_compress ($theFile, $type)
 png_to_gif_by_imagemagick ($theFile)
 read_png_gif ($theFile, $output_png=0)
 fixed_lgd ($string, $origChars, $preStr='...')
 fixed_lgd_pre ($string, $chars)
 fixed_lgd_cs ($string, $chars)
 breakTextForEmail ($str, $implChar="\n", $charWidth=76)
 breakLinesForEmail ($str, $implChar="\n", $charWidth=76)
 cmpIP ($baseIP, $list)
 cmpIPv4 ($baseIP, $list)
 cmpIPv6 ($baseIP, $list)
 IPv6Hex2Bin ($hex)
 normalizeIPv6 ($address)
 validIPv6 ($ip)
 cmpFQDN ($baseIP, $list)
 inList ($list, $item)
 rmFromList ($element, $list)
 expandList ($list)
 intInRange ($theInt, $min, $max=2000000000, $zeroValue=0)
 intval_positive ($theInt)
 int_from_ver ($verNumberStr)
 compat_version ($verNumberStr)
 md5int ($str)
 shortMD5 ($input, $len=10)
 uniqueList ($in_list, $secondParameter=NULL)
 split_fileref ($fileref)
 dirname ($path)
 modifyHTMLColor ($color, $R, $G, $B)
 modifyHTMLColorAll ($color, $all)
 rm_endcomma ($string)
 danish_strtoupper ($string)
 convUmlauts ($str)
 testInt ($var)
 isFirstPartOfStr ($str, $partStr)
 formatSize ($sizeInBytes, $labels='')
 convertMicrotime ($microtime)
 splitCalc ($string, $operators)
 calcPriority ($string)
 calcParenthesis ($string)
 htmlspecialchars_decode ($value)
 deHSCentities ($str)
 slashJS ($string, $extended=0, $char="'")
 rawUrlEncodeJS ($str)
 rawUrlEncodeFP ($str)
 validEmail ($email)
 formatForTextarea ($content)
 inArray ($in_array, $item)
 intExplode ($delim, $string)
 revExplode ($delim, $string, $count=0)
 trimExplode ($delim, $string, $onlyNonEmptyValues=0)
 uniqueArray ($valueArray)
 removeArrayEntryByValue ($array, $cmpValue)
 implodeArrayForUrl ($name, $theArray, $str='', $skipBlank=0, $rawurlencodeParamName=0)
 explodeUrl2Array ($string, $multidim=FALSE)
 compileSelectedGetVarsFromArray ($varList, $getArray, $GPvarAlt=1)
 addSlashesOnArray (&$theArray)
 stripSlashesOnArray (&$theArray)
 slashArray ($arr, $cmd)
 array_merge_recursive_overrule ($arr0, $arr1, $notAddKeys=0, $includeEmtpyValues=true)
 array_merge ($arr1, $arr2)
 csvValues ($row, $delim=',', $quote='"')
 removeDotsFromTS ($ts)
 get_tag_attributes ($tag)
 split_tag_attributes ($tag)
 implodeAttributes ($arr, $xhtmlSafe=FALSE, $dontOmitBlankAttribs=FALSE)
 implodeParams ($arr, $xhtmlSafe=FALSE, $dontOmitBlankAttribs=FALSE)
 wrapJS ($string, $linebreak=TRUE)
 xml2tree ($string, $depth=999)
 array2xml_cs ($array, $docTag='phparray', $options=array(), $charset='')
 array2xml ($array, $NSprefix='', $level=0, $docTag='phparray', $spaceInd=0, $options=array(), $stackData=array())
 xml2array ($string, $NSprefix='', $reportDocTag=FALSE)
 xmlRecompileFromStructValArray ($vals)
 xmlGetHeaderAttribs ($xmlData)
 getURL ($url, $includeHeader=0, $requestHeaders=false)
 writeFile ($file, $content)
 fixPermissions ($file)
 writeFileToTypo3tempDir ($filepath, $content)
 mkdir ($theNewFolder)
 mkdir_deep ($destination, $deepDir)
 get_dirs ($path)
 getFilesInDir ($path, $extensionList='', $prependPath=0, $order='', $excludePattern='')
 getAllFilesAndFoldersInPath ($fileArr, $path, $extList='', $regDirs=0, $recursivityLevels=99, $excludePattern='')
 removePrefixPathFromList ($fileArr, $prefixToRemove)
 fixWindowsFilePath ($theFile)
 resolveBackPath ($pathStr)
 locationHeaderUrl ($path)
 debug_ordvalue ($string, $characters=100)
 view_array ($array_in)
 print_array ($array_in)
 debug ($var="", $brOrHeader=0)
 debug_trail ()
 debugRows ($rows, $header='')
 getThisUrl ()
 linkThisScript ($getParams=array())
 linkThisUrl ($url, $getParams=array())
 getIndpEnv ($getEnvName)
 milliseconds ()
 clientInfo ($useragent='')
 getHostname ($requestHost=TRUE)
 getFileAbsFileName ($filename, $onlyRelative=1, $relToTYPO3_mainDir=0)
 validPathStr ($theFile)
 isAbsPath ($path)
 isAllowedAbsPath ($path)
 verifyFilenameAgainstDenyPattern ($filename)
 upload_copy_move ($source, $destination)
 upload_to_tempfile ($uploadedFileName)
 unlink_tempfile ($uploadedTempFileName)
 tempnam ($filePrefix)
 stdAuthCode ($uid_or_record, $fields='', $codeLength=8)
 cHashParams ($addQueryParams)
 hideIfNotTranslated ($l18n_cfg_fieldValue)
 readLLfile ($fileRef, $langKey)
 readLLXMLfile ($fileRef, $langKey)
 llXmlAutoFileName ($fileRef, $language)
 loadTCA ($table)
 resolveSheetDefInDS ($dataStructArray, $sheet='sDEF')
 resolveAllSheetsInDS ($dataStructArray)
 callUserFunction ($funcName, &$params, &$ref, $checkPrefix='user_', $silent=0)
getUserObj ($classRef, $checkPrefix='user_', $silent=0)
makeInstance ($className)
 makeInstanceClassName ($className)
makeInstanceService ($serviceType, $serviceSubType='', $excludeServiceKeys=array())
 requireOnce ($requireFile)
 plainMailEncoded ($email, $subject, $message, $headers='', $encoding='quoted-printable', $charset='', $dontEncodeHeader=false)
 quoted_printable ($string, $maxlen=76)
 encodeHeader ($line, $enc='quoted-printable', $charset='ISO-8859-1')
 substUrlsInPlainText ($message, $urlmode='76', $index_script_url='')
 makeRedirectUrl ($inUrl, $l=0, $index_script_url='')
 freetypeDpiComp ($font_size)
 initSysLog ()
 sysLog ($msg, $extKey, $severity=0)
 devLog ($msg, $extKey, $severity=0, $dataVar=FALSE)
 arrayToLogString ($arr, $valueList=array(), $valueLength=20)
 imageMagickCommand ($command, $parameters, $path='')
 unQuoteFilenames ($parameters, $unQuote=FALSE)
 quoteJSvalue ($value, $inScriptTags=false)

Detailed Description

Definition at line 10 of file incfile.php.


Member Function Documentation

t3lib_div::getIndpEnv ( getEnvName  ) 

Abstraction method which returns System Environment Variables regardless of server OS, CGI/MODULE version etc. Basically this is SERVER variables for most of them. This should be used instead of getEnv() and HTTP_SERVER_VARS/ENV_VARS to get reliable values for all situations.

Usage: 226

Parameters:
string Name of the "environment variable"/"server variable" you wish to use. Valid values are SCRIPT_NAME, SCRIPT_FILENAME, REQUEST_URI, PATH_INFO, REMOTE_ADDR, REMOTE_HOST, HTTP_REFERER, HTTP_HOST, HTTP_USER_AGENT, HTTP_ACCEPT_LANGUAGE, QUERY_STRING, TYPO3_DOCUMENT_ROOT, TYPO3_HOST_ONLY, TYPO3_HOST_ONLY, TYPO3_REQUEST_HOST, TYPO3_REQUEST_URL, TYPO3_REQUEST_SCRIPT, TYPO3_REQUEST_DIR, TYPO3_SITE_URL, _ARRAY
Returns:
string Value based on the input key, independent of server/os environment.

Definition at line 46 of file incfile.php.

References dirname(), and trimExplode().

Referenced by tslib_fe::ADMCMD_preview(), alt_menu_functions::adminFunctions(), tslib_fe::beLoginLinkIPList(), tslib_fe::checkAlternativeIdMethods(), t3lib_userAuth::checkAuthentication(), t3lib_tsfeBeUserAuth::checkBackendAccessSettingsFromInitPhp(), tslib_fe::checkDataSubmission(), tslib_fe::checkJumpUrlReferer(), t3lib_beUserAuth::checkLockToIP(), tx_install::checkPassword(), SC_mod_tools_log_index::checkUpload(), template::clearCacheMenu(), clientInfo(), clickMenu::DB_db_list(), tx_rtehtmlarea_pi2::drawRTE(), tx_rtehtmlarea_base::drawRTE(), tslib_cObj::editIcons(), t3lib_BEfunc::editOnClick(), tslib_cObj::editPanelLinkWrap(), tslib_cObj::editPanelLinkWrap_doWrap(), t3lib_beUserAuth::emailAtLogin(), t3lib_matchCondition::evalConditionStr(), t3lib_userAuthGroup::fetchGroups(), browse_links::fileList(), tslib_fe::findDomainRecord(), SC_alt_main::generateJScode(), wsol_preview::generateUrls(), t3lib_userAuth::getAuthInfoArray(), tslib_fe::getConfigArray(), tslib_cObj::getData(), t3lib_matchCondition::getGP_ENV_TSFE(), getIndpEnv(), t3lib_BEfunc::getPathType_web_nonweb(), tslib_cObj::getQueryArguments(), tx_cms_layout::getTable_tt_content(), getThisUrl(), t3lib_parsehtml::HTMLcleaner(), SC_mod_tools_log_index::importData(), SC_wizard_table::init(), SC_wizard_forms::init(), tx_rtehtmlarea_user::init(), tx_rtehtmlarea_select_image::init(), tx_rtehtmlarea_dam_browse_media::init(), tx_rtehtmlarea_browse_links::init(), user_feAdmin::init(), browse_links::init(), t3lib_basicFileFunctions::init(), SC_index::init(), t3lib_userAuth::ipLockClause_remoteIPNumber(), template::issueCommand(), tx_cms_layout::languageSelector(), tx_indexedsearch::linkPage(), linkThisScript(), fileList::linkWrapFile(), localFolderTree::localFolderTree(), locationHeaderUrl(), SC_wizard_list::main(), SC_wizard_add::main(), SC_tce_file::main(), SC_tce_db::main(), SC_logomenu::main(), SC_db_list::main(), SC_mod_web_view_index::main(), tx_version_cm1::main(), t3lib_queryGenerator::makeOptionList(), localRecordList::makeReturnUrl(), template::makeShortcutIcon(), t3lib_fullsearch::makeValueList(), tx_cms_layout::newContentElementOnClick(), t3lib_TCEmain::notifyStageChange(), t3lib_positionMap::onClickInsertRecord(), TSpagegen::pagegenInit(), tslib_fe::pageNotFoundHandler(), template::parseTime(), tx_install::phpinformation(), tslib_pibase::pi_getEditIcon(), tslib_fe::prefixLocalAnchorsWithScript(), SC_alt_doc::preInit(), tslib_fe::printError(), SC_mod_user_ws_workspaceForms::processData(), SC_alt_doc::processData(), SC_db_new::regularNew(), TSpagegen::renderContentWithHeader(), tx_rtehtmlarea_dam_browse_media::renderFileList(), SC_db_layout::renderQuickEdit(), mod_user_task::sendEmail(), SC_alt_doc::setDocument(), tslib_fe::setIDfromArgV(), t3lib_parsehtml_proc::siteUrl(), t3lib_userAuth::start(), t3lib_formmail::start(), tslib_fe::statistics(), TBE_browser_recordList::TBE_browser_recordList(), tslib_fe::tempPageCacheContent(), t3lib_beUserAuth::trackBeUser(), t3lib_parsehtml_proc::TS_images_db(), t3lib_parsehtml_proc::TS_images_rte(), tx_cms_layout::tt_content_drawHeader(), t3lib_BEfunc::viewOnClick(), template::viewPageIcon(), tx_version_cm1::workspaceMgm(), t3lib_userAuthGroup::writelog(), and tx_indexedsearch::writeSearchStat().

t3lib_div::_GP ( var  ) 

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() To enhancement security in your scripts, please consider using t3lib_div::_GET or t3lib_div::_POST if you already know by which method your data is arriving to the scripts! Usage: 537

Parameters:
string GET/POST var to return
Returns:
mixed POST var named $var and if not set, the GET var of the same name.
See also:
GPvar()

Definition at line 262 of file class.t3lib_div.php.

References stripSlashesOnArray().

Referenced by tx_sysaction::action_t1_createUpdateBeUser(), tslib_fe::ADMCMD_preview(), SC_mod_tools_em_index::checkDBupdates(), t3lib_SCbase::checkExtObj(), t3lib_extobjbase::checkExtObj(), tx_install::checkPassword(), SC_mod_tools_log_index::checkUpload(), t3lib_TCEmain::checkValue_flex(), SC_mod_web_ts_index::clearCache(), SC_mod_tools_be_user_index::compareUsers(), SC_mod_web_ts_index::createTemplate(), tslib_fe::determineId(), user_feAdmin::displayCreateScreen(), user_feAdmin::displayEditForm(), recordHistory::displaySettings(), tx_version_cm1::displayWorkspaceOverview(), tx_version_cm1::displayWorkspaceOverview_allStageCmd(), tslib_cObj::editIcons(), tslib_cObj::editPanel(), tslib_cObj::editPanelLinkWrap(), tx_rtehtmlarea_select_image::expandFolder(), localPageTree::ext_tree(), SC_mod_tools_em_index::extensionList_import(), t3lib_tsfeBeUserAuth::extGetCategory_edit(), SC_mod_tools_dbint_index::func_filesearch(), SC_mod_tools_dbint_index::func_refindex(), tx_install::generateConfigForm(), wsol_preview::generateUrls(), tslib_cObj::getData(), tslib_cObj::getFieldDefaultValue(), t3lib_matchCondition::getGP_ENV_TSFE(), tslib_feUserAuth::getLoginFormData(), t3lib_userAuth::getLoginFormData(), SC_mod_user_ws_workspaceForms::getModuleParameters(), t3lib_fullsearch::getQueryResultCode(), t3lib_TCEforms::getSingleField_typeFlex(), t3lib_extobjbase::handleExternalFunctionValue(), tx_rtehtmlarea_dam_browse_media::imageInsert(), SC_wizard_tsconfig::init(), SC_wizard_table::init(), SC_wizard_rte::init(), SC_wizard_list::init(), SC_wizard_forms::init(), SC_wizard_edit::init(), SC_wizard_colorpicker::init(), SC_wizard_add::init(), SC_view_help::init(), SC_tce_file::init(), SC_tce_db::init(), tx_rtehtmlarea_parse_html::init(), tx_rtehtmlarea_user::init(), tx_rtehtmlarea_select_image::init(), tx_rtehtmlarea_dam_browse_media::init(), tx_rtehtmlarea_browse_links::init(), tx_rtehtmlarea_acronym::init(), user_feAdmin::init(), SC_db_new_content_el::init(), SC_db_layout::init(), SC_move_el::init(), SC_mod_user_ws_publish::init(), SC_mod_tools_em_index::init(), SC_file_upload::init(), SC_file_rename::init(), SC_file_newfolder::init(), SC_file_list::init(), SC_file_edit::init(), SC_db_new::init(), SC_db_list::init(), browse_links::init(), SC_browse_links::init(), SC_alt_palette::init(), SC_alt_menu::init(), SC_alt_file_navframe::init(), SC_alt_doc_ajax::init(), SC_alt_doc::init(), SC_alt_db_navframe::init(), SC_alt_clickmenu::init(), clickMenu::init(), t3lib_SCbase::init(), SC_mod_web_view_index::init(), SC_mod_web_ts_index::init(), SC_mod_tools_be_user_index::init(), SC_mod_web_perm_index::init(), SC_index::init(), tslib_fe::initFEuser(), t3lib_treeView::initializePositionSaving(), t3lib_folderTree::initializePositionSaving(), tx_install::isTTF(), tx_rtehtmlarea_dam_browse_media::isValid(), tslib_fe::jumpUrl(), SC_alt_doc::localizationRedirect(), tx_install::loginForm(), SC_logout::logout(), tx_rtehtmlarea_select_image::magicProcess(), SC_wizard_colorpicker::main(), tx_wizardsortpages_webfunc_2::main(), tx_wizardcrpages_webfunc_2::main(), tx_tstemplateobjbrowser::main(), tx_tstemplateinfo::main(), tx_tstemplateceditor::main(), tx_rtehtmlarea_parse_html::main(), tx_rtehtmlarea_SC_select_image::main(), tx_indexedsearch_modfunc1::main(), tx_impexp_modfunc1::main(), tx_impexp_clickmenu::main(), tx_extrapagecmoptions::main(), tx_adodb_checkconnectionwizard::main(), SC_show_item::main(), wsol_preview::main(), SC_mod_user_ws_workspaceForms::main(), recordHistory::main(), SC_browser::main(), tx_rtehtmlarea_SC_browse_links::main(), SC_alt_mod_frameset::main(), SC_alt_clickmenu::main(), tx_version_cm1::main(), SC_mod_tools_config_index::main(), SC_mod_tools_log_index::main(), tx_dbal_module1::main(), SC_mod_tools_be_user_index::main(), tx_rtehtmlarea_acronym::main_acronym(), browse_links::main_file(), tx_rtehtmlarea_parse_html::main_parse_html(), tx_rtehtmlarea_select_image::main_rte(), tx_rtehtmlarea_dam_browse_media::main_rte(), tx_rtehtmlarea_user::main_user(), SC_db_layout::menuConfig(), SC_mod_tools_em_index::menuConfig(), SC_file_list::menuConfig(), SC_db_list::menuConfig(), t3lib_SCbase::menuConfig(), tx_version_cm1::menuConfig(), SC_mod_tools_dbint_index::menuConfig(), SC_mod_tools_config_index::menuConfig(), SC_mod_tools_isearch_index::menuConfig(), SC_mod_tools_be_user_index::menuConfig(), SC_mod_tools_log_index::menuConfig(), SC_mod_web_perm_index::menuConfig(), SC_mod_user_ws_index::menuConfig(), tx_lowlevel_cleaner::moduleContent(), SC_mod_user_ws_index::moduleContent_publish(), TSpagegen::pagegenInit(), user_feAdmin::parseValues(), SC_alt_shortcut::preinit(), SC_alt_doc::preInit(), tx_dbal_module1::printCachedInfo(), tx_dbal_module1::printLogMgm(), tx_dbal_module1::printSqlCheck(), webPageTree::printTree(), filelistFolderTree::printTree(), SC_mod_user_ws_workspaceForms::processData(), SC_alt_doc::processData(), user_feAdmin::procesSetFixed(), SC_mod_tools_log_index::processPresets(), t3lib_modSettings::processStoreControl(), t3lib_fullsearch::procesStoreControl(), recordHistory::recordHistory(), template::redirectUrls(), tx_sysaction::renderActions(), SC_mod_tools_em_index::requestInstallExtensions(), recordHistory::resolveShUid(), tslib_cObj::SEARCHRESULT(), user_feAdmin::sendInfoMail(), SC_mod_tools_em_index::showExtDetails(), SC_mod_user_setup_index::simulateUser(), recordList::start(), tslib_fe::statistics(), SC_mod_user_setup_index::storeIncomingData(), SC_mod_tools_be_user_index::switchUser(), browse_links::TBE_dragNDrop(), SC_mod_web_ts_index::templateMenu(), alt_menu_functions::topMenu(), SC_mod_tools_em_index::tsStyleConfigForm(), and tx_install::tx_install().

t3lib_div::_GET ( var = NULL  ) 

Returns the global GET array (or value from) normalized to contain un-escaped values. ALWAYS use this API function to acquire the GET variables! Usage: 27

Parameters:
string Optional pointer to value in GET array (basically name of GET var)
Returns:
mixed If $var is set it returns the value of $_GET[$var]. If $var is NULL (default), returns $_GET itself. In any case *slashes are stipped from the output!*
See also:
_POST(), _GP(), _GETset()

Definition at line 280 of file class.t3lib_div.php.

References stripSlashesOnArray().

Referenced by SC_alt_main::editPageHandling(), t3lib_tsfeBeUserAuth::extPrintFeAdminDialog(), t3lib_tsfeBeUserAuth::extSaveFeAdminConfig(), SC_mod_tools_dbint_index::func_records(), t3lib_BEfunc::getFuncMenu(), tslib_cObj::getQueryArguments(), SC_show_item::init(), linkThisScript(), tx_tstemplateobjbrowser::main(), tx_tstemplateanalyzer::main(), SC_logomenu::main(), SC_file_list::main(), SC_db_list::main(), SC_alt_clickmenu::main(), SC_mod_tools_config_index::main(), SC_mod_user_ws_index::main(), tslib_fe::makeCacheHash(), template::makeShortcutUrl(), tslib_fe::mergingWithGetVars(), tx_tstemplateobjbrowser::modMenu(), TSpagegen::pagegenInit(), SC_alt_doc::preInit(), t3lib_TStemplate::processTemplate(), SC_db_layout::renderQuickEdit(), t3lib_userAuth::start(), SC_alt_main::startModule(), and SC_mod_tools_em_index::translationHandling().

t3lib_div::_POST ( var = NULL  ) 

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: 41

Parameters:
string Optional pointer to value in POST array (basically name of POST var)
Returns:
mixed If $var is set it returns the value of $_POST[$var]. If $var is NULL (default), returns $_POST itself. In any case *slashes are stipped from the output!*
See also:
_GET(), _GP()

Definition at line 297 of file class.t3lib_div.php.

References stripSlashesOnArray().

Referenced by tslib_fe::ADMCMD_preview(), SC_mod_tools_em_index::checkClearCache(), SC_mod_tools_em_index::checkUploadFolder(), SC_wizard_colorpicker::colorImage(), tslib_cObj::editPanel(), t3lib_tsfeBeUserAuth::extInitFeAdmin(), tslib_fe::fe_tce(), tslib_cObj::FORM(), tslib_feUserAuth::getLoginFormData(), t3lib_userAuth::getLoginFormData(), tslib_cObj::getQueryArguments(), SC_mod_tools_log_index::importData(), tx_tstemplateobjbrowser::main(), tx_tstemplateinfo::main(), tx_tstemplateceditor::main(), tx_rtehtmlarea_pi1::main(), tx_indexedsearch_modfunc1::main(), SC_file_list::main(), SC_db_list::main(), SC_mod_tools_config_index::main(), t3lib_queryGenerator::procesData(), tx_version_cm1::publishAction(), tx_lowlevel_cleaner::quickDBlookUp(), SC_mod_tools_em_index::requestInstallExtensions(), tslib_cObj::SEARCHRESULT(), tslib_fe::sendFormmail(), SC_mod_tools_em_index::showExtDetails(), SC_mod_user_setup_index::storeIncomingData(), SC_mod_tools_em_index::translationHandling(), SC_mod_tools_em_index::tsStyleConfigForm(), tx_version_cm1::versioningMgm(), and tx_version_cm1::workspaceMgm().

t3lib_div::_GETset ( inputGet,
key = '' 
)

Writes input value to $_GET Usage: 2

Parameters:
array Array to write to $_GET. Values should NOT be escaped at input time (but will be escaped before writing according to TYPO3 standards).
string Alternative key; If set, this will not set the WHOLE GET array, but only the key in it specified by this value!
Returns:
void

Definition at line 313 of file class.t3lib_div.php.

References addSlashesOnArray().

Referenced by tslib_fe::ADMCMD_preview(), and tslib_fe::mergingWithGetVars().

t3lib_div::GPvar ( var,
strip = 0 
)

GET/POST variable Returns the 'GLOBAL' value of incoming data from POST or GET, with priority to POST (that is equalent to 'GP' order) Strips slashes of string-outputs, but not arrays UNLESS $strip is set. If $strip is set all output will have escaped characters unescaped. Usage: 2

Parameters:
string GET/POST var to return
boolean If set, values are stripped of return values that are *arrays!* - string/integer values returned are always strip-slashed()
Returns:
mixed POST var named $var and if not set, the GET var of the same name.
Deprecated:
Use t3lib_div::_GP instead (ALWAYS delivers a value with un-escaped values!)
See also:
_GP()

Definition at line 336 of file class.t3lib_div.php.

References stripSlashesOnArray().

t3lib_div::GParrayMerged ( var  ) 

Returns the GET/POST global arrays merged with POST taking precedence. Usage: 1

Parameters:
string Key (variable name) from GET or POST vars
Returns:
array Returns the GET vars merged recursively onto the POST vars.
Deprecated:

Definition at line 353 of file class.t3lib_div.php.

References array_merge_recursive_overrule(), and stripSlashesOnArray().

Referenced by tslib_pibase::tslib_pibase().

t3lib_div::gif_compress ( theFile,
type 
)

Compressing a GIF file if not already LZW compressed This function is a workaround for the fact that ImageMagick and/or GD does not compress GIF-files to their minimun size (that is RLE or no compression used)

The function takes a file-reference, $theFile, and saves it again through GD or ImageMagick in order to compress the file GIF: If $type is not set, the compression is done with ImageMagick (provided that $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw'] is pointing to the path of a lzw-enabled version of 'convert') else with GD (should be RLE-enabled!) If $type is set to either 'IM' or 'GD' the compression is done with ImageMagick and GD respectively PNG: No changes.

$theFile is expected to be a valid GIF-file! The function returns a code for the operation. Usage: 9

Parameters:
string Filepath
string See description of function
Returns:
string Returns "GD" if GD was used, otherwise "IM" if ImageMagick was used. If nothing done at all, it returns empty string.

Definition at line 397 of file class.t3lib_div.php.

References imageMagickCommand().

Referenced by t3lib_stdGraphic::imageMagickConvert(), t3lib_iconWorks::makeIcon(), and t3lib_stdGraphic::output().

t3lib_div::png_to_gif_by_imagemagick ( theFile  ) 

Converts a png file to gif This converts a png file to gif IF the FLAG $GLOBALS['TYPO3_CONF_VARS']['FE']['png_to_gif'] is set true. Usage: 5

Parameters:
string $theFile the filename with path
Returns:
string new filename

Definition at line 425 of file class.t3lib_div.php.

References imageMagickCommand().

Referenced by tslib_cObj::cImage(), tslib_tmenu::getBeforeAfter(), and tslib_imgmenu::makeImageMap().

t3lib_div::read_png_gif ( theFile,
output_png = 0 
)

Returns filename of the png/gif version of the input file (which can be png or gif). If input file type does not match the wanted output type a conversion is made and temp-filename returned. Usage: 2

Parameters:
string Filepath of image file
boolean If set, then input file is converted to PNG, otherwise to GIF
Returns:
string If the new image file exists, it's filepath is returned

Definition at line 450 of file class.t3lib_div.php.

Referenced by t3lib_iconWorks::imagecreatefrom().

t3lib_div::fixed_lgd ( string,
origChars,
preStr = '...' 
)

Truncate string Returns a new string of max. $chars length. If the string is longer, it will be truncated and appended with '...'. Usage: 39

Parameters:
string string to truncate
integer must be an integer with an absolute value of at least 4. if negative the string is cropped from the right end.
string String to append to the output if it is truncated, default is '...'
Returns:
string new string
Deprecated:
Works ONLY for single-byte charsets! USE t3lib_div::fixed_lgd_cs() instead
See also:
fixed_lgd_pre()

Definition at line 499 of file class.t3lib_div.php.

Referenced by user_wapversion::cBodytext(), user_wapversion::contentAbstract(), tx_indexedsearch_modfunc1::drawTableOfIndexedPages(), tslib_cObj::editPanel(), tx_rtehtmlarea_select_image::expandFolder(), SC_mod_tools_em_index::extensionListRow(), SC_mod_tools_em_index::extensionTitleIconHeader(), t3lib_timeTrack::fixCLen(), mod_user_task::fixed_lgd(), fixed_lgd_cs(), fixed_lgd_pre(), fileList::formatDirList(), fileList::formatFileList(), tx_install::generateConfigForm(), SC_mod_tools_isearch_index::getPhashExternalDocs(), SC_mod_tools_isearch_index::getPhashT3pages(), SC_alt_shortcut::main(), SC_mod_web_perm_index::notEdit(), and tx_rtehtmlarea_image_folderTree::printTree().

t3lib_div::fixed_lgd_pre ( string,
chars 
)

Truncate string Returns a new string of max. $chars length. If the string is longer, it will be truncated and prepended with '...'. This works like fixed_lgd, but is truncated in the start of the string instead of the end Usage: 6

Parameters:
string string to truncate
integer must be an integer of at least 4
Returns:
string new string
Deprecated:
Use either fixed_lgd() or fixed_lgd_cs() (with negative input value for $chars)
See also:
fixed_lgd()

Definition at line 524 of file class.t3lib_div.php.

References fixed_lgd().

Referenced by t3lib_timeTrack::printTSlog().

t3lib_div::fixed_lgd_cs ( string,
chars 
)

Truncates a string with appended/prepended "..." and takes backend character set into consideration Use only from backend! Usage: 75

Parameters:
string string to truncate
integer must be an integer with an absolute value of at least 4. if negative the string is cropped from the right end.
Returns:
string New string
See also:
fixed_lgd()

Definition at line 538 of file class.t3lib_div.php.

References fixed_lgd().

Referenced by t3lib_diff::addClearBuffer(), t3lib_clipboard::confirmMsg(), tx_cms_layout::dataFields(), SC_mod_user_ws_index::displayWorkspaceOverview_pageTreeIconTitle(), browse_links::expandFolder(), browse_links::expandPage(), tx_impexp::export_addRecord(), browse_links::fileList(), t3lib_admin::genTree(), template::getFileheader(), template::getHeader(), t3lib_BEfunc::getProcessedValue(), t3lib_BEfunc::getRecordTitlePrep(), t3lib_TCEforms::getSingleField_typeFlex_draw(), tx_cms_layout::getTable_tt_content(), t3lib_treeView::getTitleStr(), t3lib_browseTree::getTitleStr(), recordList::linkWrapItems(), TBE_browser_recordList::linkWrapItems(), tx_wizardsortpages_webfunc_2::main(), tx_wizardcrpages_webfunc_2::main(), tx_impexp_modfunc1::main(), SC_logomenu::main(), SC_alt_shortcut::main(), SC_alt_db_navframe::main(), SC_mod_web_ts_index::main(), SC_mod_web_perm_index::main(), SC_mod_web_info_index::main(), SC_mod_web_func_index::main(), SC_mod_web_perm_index::notEdit(), tx_impexp_modfunc1::overview_main(), browse_links::parseCurUrl(), t3lib_positionMap::positionTree(), t3lib_clipboard::printContentFromTab(), clickMenu::printDBClickMenu(), tx_indexedsearch_modfunc1::printPhashRow(), tx_rtehtmlarea_folderTree::printTree(), localFolderTree::printTree(), printAllPageTree_perms::printTree(), t3lib_loadDBGroup::readyForInterface(), tx_rtehtmlarea_dam_browse_media::renderFileList(), tx_cms_webinfo_lang::renderL10nTable(), SC_mod_web_ts_index::renderList(), SC_db_layout::renderListContent(), SC_db_layout::renderQuickEdit(), tx_cms_layout::renderText(), t3lib_TCEforms::replaceTableWrap(), t3lib_transferData::selectAddForeign(), tx_impexp::singleRecordLines(), browse_links::TBE_dragNDrop(), tx_cms_layout::tt_board_drawItem(), fileList::writeTop(), and localRecordList::writeTop().

t3lib_div::breakTextForEmail ( str,
implChar = "\n",
charWidth = 76 
)

Breaks up the text for emails Usage: 1

Parameters:
string The string to break up
string The string to implode the broken lines with (default/typically
)
integer The line length
Deprecated:
Use PHP function wordwrap()
Returns:
string

Definition at line 556 of file class.t3lib_div.php.

References breakLinesForEmail().

t3lib_div::breakLinesForEmail ( str,
implChar = "\n",
charWidth = 76 
)

Breaks up a single line of text for emails Usage: 5

Parameters:
string The string to break up
string The string to implode the broken lines with (default/typically
)
integer The line length
Returns:
string
See also:
breakTextForEmail()

Definition at line 575 of file class.t3lib_div.php.

Referenced by user_plaintext::breakLines(), and breakTextForEmail().

t3lib_div::cmpIP ( baseIP,
list 
)

Match IP number with list of numbers with wildcard Dispatcher method for switching into specialised IPv4 and IPv6 methods. Usage: 10

Parameters:
string $baseIP is the current remote IP address for instance, typ. REMOTE_ADDR
string $list is a comma-list of IP-addresses to match with. *-wildcard allowed instead of number, plus leaving out parts in the IP number is accepted as wildcard (eg. 192.168.*.* equals 192.168). If list is "*" no check is done and the function returns TRUE immediately.
Returns:
boolean True if an IP-mask from $list matches $baseIP

Definition at line 611 of file class.t3lib_div.php.

References cmpIPv4(), cmpIPv6(), and validIPv6().

Referenced by tslib_fe::beLoginLinkIPList(), t3lib_tsfeBeUserAuth::checkBackendAccessSettingsFromInitPhp(), t3lib_beUserAuth::checkLockToIP(), t3lib_matchCondition::evalConditionStr(), tx_sv_auth::getGroups(), and tslib_fe::statistics().

t3lib_div::cmpIPv4 ( baseIP,
list 
)

Match IPv4 number with list of numbers with wildcard

Parameters:
string $baseIP is the current remote IP address for instance, typ. REMOTE_ADDR
string $list is a comma-list of IP-addresses to match with. *-wildcard allowed instead of number, plus leaving out parts in the IP number is accepted as wildcard (eg. 192.168.*.* equals 192.168)
Returns:
boolean True if an IP-mask from $list matches $baseIP

Definition at line 627 of file class.t3lib_div.php.

References trimExplode().

Referenced by cmpIP().

t3lib_div::cmpIPv6 ( baseIP,
list 
)

Match IPv6 address with a list of IPv6 prefixes

Parameters:
string $baseIP is the current remote IP address for instance
string $list is a comma-list of IPv6 prefixes, could also contain IPv4 addresses
Returns:
boolean True if an baseIP matches any prefix

Definition at line 669 of file class.t3lib_div.php.

References IPv6Hex2Bin(), normalizeIPv6(), trimExplode(), and validIPv6().

Referenced by cmpIP().

t3lib_div::IPv6Hex2Bin ( hex  ) 

[Describe function...]

Parameters:
[type] $hex: ...
Returns:
[type] ...

Definition at line 712 of file class.t3lib_div.php.

Referenced by cmpIPv6().

t3lib_div::normalizeIPv6 ( address  ) 

Normalize an IPv6 address to full length

Parameters:
string Given IPv6 address
Returns:
string Normalized address

Definition at line 727 of file class.t3lib_div.php.

Referenced by cmpIPv6().

t3lib_div::validIPv6 ( ip  ) 

Validate a given IP address to the IPv6 address format.

Example for possible format: 43FBBB3F:A0A0:0 | ::1

Parameters:
string IP address to be tested
Returns:
boolean True if $ip is of IPv6 format.

Definition at line 783 of file class.t3lib_div.php.

Referenced by cmpIP(), and cmpIPv6().

t3lib_div::cmpFQDN ( baseIP,
list 
)

Match fully qualified domain name with list of strings with wildcard

Parameters:
string The current remote IP address for instance, typ. REMOTE_ADDR
string A comma-list of domain names to match with. *-wildcard allowed but cannot be part of a string, so it must match the full host name (eg. myhost.*.com => correct, myhost.*domain.com => wrong)
Returns:
boolean True if a domain name mask from $list matches $baseIP

Definition at line 806 of file class.t3lib_div.php.

References trimExplode().

Referenced by t3lib_matchCondition::evalConditionStr().

t3lib_div::inList ( list,
item 
)

Check for item in list Check if an item exists in a comma-separated list of items. Usage: 163

Parameters:
string comma-separated list of items (string)
string item to check for
Returns:
boolean true if $item is in $list

Definition at line 836 of file class.t3lib_div.php.

Referenced by tslib_cObj::_parseFunc(), ux_t3lib_DB::_quoteWhereClause(), t3lib_treeView::addField(), t3lib_TCEforms::addSelectOptionsToItemArray(), t3lib_extMgm::addToAllTCAtypes(), t3lib_BEfunc::blindUserNames(), tx_rtehtmlarea_base::buildJSFontfacesConfig(), cHashParams(), tslib_cObj::checkIf(), t3lib_TCEmain::checkModifyAccessList(), t3lib_loadModules::checkModWorkspace(), t3lib_TCEmain::checkValue(), t3lib_userAuthGroup::checkWorkspace(), t3lib_cli::cli_keyboardInput_yes(), tx_lowlevel_cleaner_core::cli_referenceIndexCheck(), t3lib_sqlparser::compileWhereClause(), t3lib_htmlmail::constructHTML_media(), t3lib_stdGraphic::copyImageOntoImage(), t3lib_TCEmain::copyPages(), t3lib_TCEmain::copyRecord(), tx_version_cm1::createDiffView(), SC_mod_user_ws_index::createDiffView(), t3lib_fullsearch::csvRowTitles(), tslib_cObj::DBgetInsert(), tslib_cObj::DBgetUpdate(),