Index: typo3/class.browse_links.php =================================================================== --- typo3/class.browse_links.php (revision 8125) +++ typo3/class.browse_links.php (working copy) @@ -1811,7 +1811,7 @@ } // Draw the record list IF there is a page id to expand: - if ($expPageId && t3lib_div::testInt($expPageId) && $BE_USER->isInWebMount($expPageId)) { + if ($expPageId && is_int($expPageId) && $BE_USER->isInWebMount($expPageId)) { // Set header: $out.=$this->barheader($GLOBALS['LANG']->getLL('contentElements').':'); @@ -1884,7 +1884,7 @@ global $TCA,$BE_USER, $BACK_PATH; $out=''; - if ($this->expandPage>=0 && t3lib_div::testInt($this->expandPage) && $BE_USER->isInWebMount($this->expandPage)) { + if ($this->expandPage>=0 && is_int($this->expandPage) && $BE_USER->isInWebMount($this->expandPage)) { // Set array with table names to list: if (!strcmp(trim($tables),'*')) { @@ -2614,7 +2614,7 @@ $id = array_shift($parameters); if ($id) { // Checking if the id-parameter is an alias. - if (!t3lib_div::testInt($id)) { + if (!is_int($id)) { list($idPartR) = t3lib_BEfunc::getRecordsByField('pages','alias',$id); $id=intval($idPartR['uid']); } Index: typo3/sysext/recycler/classes/model/class.tx_recycler_model_deletedRecords.php =================================================================== --- typo3/sysext/recycler/classes/model/class.tx_recycler_model_deletedRecords.php (revision 8125) +++ typo3/sysext/recycler/classes/model/class.tx_recycler_model_deletedRecords.php (working copy) @@ -156,7 +156,7 @@ // create the filter WHERE-clause if (trim($filter) != '') { $filterWhere = ' AND (' . - (t3lib_div::testInt($filter) ? 'uid = ' . $filter . ' OR pid = ' . $filter . ' OR ' : '') . + (is_int($filter) ? 'uid = ' . $filter . ' OR pid = ' . $filter . ' OR ' : '') . $tcaCtrl['label'] . ' LIKE "%' . $this->escapeValueForLike($filter, $table) . '%"' . ')'; } Index: typo3/sysext/install/mod/class.tx_install.php =================================================================== --- typo3/sysext/install/mod/class.tx_install.php (revision 8125) +++ typo3/sysext/install/mod/class.tx_install.php (working copy) @@ -1742,7 +1742,7 @@ $ok = 0; $fileCounter++; if ($tt) { - if (t3lib_div::testInt($tt)) { + if (is_int($tt)) { if (filesize($theFile) > $tt*1024) $ok=1; } else { if (fileatime($theFile) < $GLOBALS['EXEC_TIME'] - (intval($tmap[$tt]) * 60 * 60 * 24)) { @@ -2321,7 +2321,7 @@ else { $smtp_addr = $smtp; } - if (!$smtp || $bad_smtp || !t3lib_div::testInt(ini_get('smtp_port'))) { + if (!$smtp || $bad_smtp || !is_int(ini_get('smtp_port'))) { $this->message($ext, 'Mail configuration is not set correctly', '

Mail configuration is not set @@ -5480,7 +5480,7 @@ if ($this->mode=="123" && !count($whichTables) && strstr($file,'_testsite')) { $directJump = $this->action.'&TYPO3_INSTALL[database_type]=import|'.rawurlencode($file); } - $lf=t3lib_div::testInt($k); + $lf=is_int($k); $fShortName = substr($file,strlen(PATH_site)); $spec1 = $spec2 = ''; @@ -7209,7 +7209,7 @@ if (is_array($arr)) { $type[] = $intSize[] = 0; foreach ($arr as $item) { - if (!t3lib_div::testInt($item[1]) && $item[1]!='--div--') { + if (!is_int($item[1]) && $item[1]!='--div--') { $type[]=strlen($item[1]); } else { $intSize[]=$item[1]; Index: typo3/sysext/tstemplate_info/class.tx_tstemplateinfo.php =================================================================== --- typo3/sysext/tstemplate_info/class.tx_tstemplateinfo.php (revision 8125) +++ typo3/sysext/tstemplate_info/class.tx_tstemplateinfo.php (working copy) @@ -202,8 +202,8 @@ if ($existTemplate) { // Update template ? $POST = t3lib_div::_POST(); - if ($POST['submit'] || (t3lib_div::testInt($POST['submit_x']) && t3lib_div::testInt($POST['submit_y'])) - || $POST['saveclose'] || (t3lib_div::testInt($POST['saveclose_x']) && t3lib_div::testInt($POST['saveclose_y']))) { + if ($POST['submit'] || (is_int($POST['submit_x']) && is_int($POST['submit_y'])) + || $POST['saveclose'] || (is_int($POST['saveclose_x']) && is_int($POST['saveclose_y']))) { // Set the data to be saved $recData = array(); $alternativeFileName = array(); @@ -351,8 +351,8 @@ $numberOfRows = 35; // If abort pressed, nothing should be edited: - if ($POST['abort'] || (t3lib_div::testInt($POST['abort_x']) && t3lib_div::testInt($POST['abort_y'])) - || $POST['saveclose'] || (t3lib_div::testInt($POST['saveclose_x']) && t3lib_div::testInt($POST['saveclose_y']))) { + if ($POST['abort'] || (is_int($POST['abort_x']) && is_int($POST['abort_y'])) + || $POST['saveclose'] || (is_int($POST['saveclose_x']) && is_int($POST['saveclose_y']))) { unset($e); } Index: typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php =================================================================== --- typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php (revision 8125) +++ typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php (working copy) @@ -150,7 +150,7 @@ $result=array(); if (is_array($propertyArray)) { foreach ($propertyArray as $key => $val) { - if (t3lib_div::testInt($key)) { // If num-arrays + if (is_int($key)) { // If num-arrays $result[$key]=$TSobjTable[$ObjectKind]["prop"]["1,2,3"]; } else { // standard $result[$key]=$TSobjTable[$ObjectKind]["prop"][$key]; Index: typo3/sysext/feedit/view/class.tx_feedit_editpanel.php =================================================================== --- typo3/sysext/feedit/view/class.tx_feedit_editpanel.php (revision 8125) +++ typo3/sysext/feedit/view/class.tx_feedit_editpanel.php (working copy) @@ -243,7 +243,7 @@ $out = $this->editPanelLinkWrap_doWrap($string, $adminURL . 'db_new.php?id=' . $rParts[1] . '&pagesOnly=1', $currentRecord); } else { if (!intval($nPid)) { - $nPid = t3lib_div::testInt($rParts[1]) ? -$rParts[1] : $GLOBALS['TSFE']->id; + $nPid = is_int($rParts[1]) ? -$rParts[1] : $GLOBALS['TSFE']->id; } $out = $this->editPanelLinkWrap_doWrap($string, $adminURL . 'alt_doc.php?edit[' . $rParts[0] . '][' . $nPid . ']=new&noView=' . $nV, $currentRecord); } Index: typo3/sysext/tstemplate/ts/index.php =================================================================== --- typo3/sysext/tstemplate/ts/index.php (revision 8125) +++ typo3/sysext/tstemplate/ts/index.php (working copy) @@ -521,7 +521,7 @@ reset($pArray); static $i; foreach ($pArray as $k => $v) { - if (t3lib_div::testInt($k)) { + if (is_int($k)) { if (isset($pArray[$k . "_"])) { $lines[] = ' ' . Index: typo3/sysext/extbase/Classes/Persistence/Storage/Typo3DbBackend.php =================================================================== --- typo3/sysext/extbase/Classes/Persistence/Storage/Typo3DbBackend.php (revision 8125) +++ typo3/sysext/extbase/Classes/Persistence/Storage/Typo3DbBackend.php (working copy) @@ -1014,7 +1014,7 @@ $clearCacheCommands = t3lib_div::trimExplode(',',strtolower($this->pageTSConfigCache[$storagePage]['TCEMAIN.']['clearCacheCmd']),1); $clearCacheCommands = array_unique($clearCacheCommands); foreach ($clearCacheCommands as $clearCacheCommand) { - if (t3lib_div::testInt($clearCacheCommand)) { + if (is_int($clearCacheCommand)) { $pageIdsToClear[] = $clearCacheCommand; } } Index: typo3/sysext/beuser/mod/index.php =================================================================== --- typo3/sysext/beuser/mod/index.php (revision 8125) +++ typo3/sysext/beuser/mod/index.php (working copy) @@ -1561,7 +1561,7 @@ $where_clause = ''; $orderBy = 'u.username'; - if (t3lib_div::testInt($GLOBALS['TYPO3_CONF_VARS']['BE']['sessionTimeout'])) { + if (is_int($GLOBALS['TYPO3_CONF_VARS']['BE']['sessionTimeout'])) { $where_clause .= 'ses_tstamp+' . $GLOBALS['TYPO3_CONF_VARS']['BE']['sessionTimeout'] . ' > ' . $GLOBALS['EXEC_TIME']; } else { $timeout = intval($GLOBALS['TYPO3_CONF_VARS']['BE']['sessionTimeout']); Index: typo3/sysext/rsaauth/sv1/storage/class.tx_rsaauth_split_storage.php =================================================================== --- typo3/sysext/rsaauth/sv1/storage/class.tx_rsaauth_split_storage.php (revision 8125) +++ typo3/sysext/rsaauth/sv1/storage/class.tx_rsaauth_split_storage.php (working copy) @@ -62,7 +62,7 @@ $result = null; list($keyId, $keyPart1) = $_SESSION['tx_rsaauth_key']; - if (t3lib_div::testInt($keyId)) { + if (is_int($keyId)) { // Remove expired keys (more than 30 minutes old) $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_rsaauth_keys', @@ -90,7 +90,7 @@ // Remove existing key list($keyId) = $_SESSION['tx_rsaauth_key']; - if (t3lib_div::testInt($keyId)) { + if (is_int($keyId)) { $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_rsaauth_keys', 'uid=' . $keyId); unset($_SESSION['tx_rsaauth_key']); Index: typo3/sysext/cms/tslib/class.tslib_pagegen.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_pagegen.php (revision 8125) +++ typo3/sysext/cms/tslib/class.tslib_pagegen.php (working copy) @@ -1128,7 +1128,7 @@ if ($needle=='int' || $needle=='integer') { // Integer - if (t3lib_div::testInt($haystack)) { + if (is_int($haystack)) { $OK = true; } @@ -1140,7 +1140,7 @@ } elseif (strstr($needle,'-')) { // Range - if (t3lib_div::testInt($haystack)) { + if (is_int($haystack)) { $range = explode('-',$needle); if ($range[0] <= $haystack && $range[1] >= $haystack) { $OK = true; Index: typo3/sysext/cms/tslib/class.tslib_menu.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_menu.php (revision 8125) +++ typo3/sysext/cms/tslib/class.tslib_menu.php (working copy) @@ -532,7 +532,7 @@ $value=$GLOBALS['TSFE']->page['uid']; } $items=t3lib_div::intExplode(',',$value); - if (t3lib_div::testInt($this->conf['special.']['depth'])) { + if (is_int($this->conf['special.']['depth'])) { $depth = t3lib_div::intInRange($this->conf['special.']['depth'],1,20); // Tree depth } else { $depth=20; @@ -621,7 +621,7 @@ } // depth, limit, extra where - if (t3lib_div::testInt($this->conf['special.']['depth'])) { + if (is_int($this->conf['special.']['depth'])) { $depth = t3lib_div::intInRange($this->conf['special.']['depth'],0,20); // Tree depth } else { $depth=20; @@ -668,7 +668,7 @@ case 'rootline': $begin_end = explode('|', $this->parent_cObj->stdWrap($this->conf['special.']['range'], $this->conf['special.']['range.'])); $begin_end[0] = intval($begin_end[0]); - if (!t3lib_div::testInt($begin_end[1])) { + if (!is_int($begin_end[1])) { $begin_end[1] = -1; } @@ -1631,7 +1631,7 @@ $conf = array( 'parameter' => is_array($overrideArray) && $overrideArray['uid'] ? $overrideArray['uid'] : $page['uid'], ); - if ($typeOverride && t3lib_div::testInt($typeOverride)) { + if ($typeOverride && is_int($typeOverride)) { $conf['parameter'] .= ',' . $typeOverride; } if ($addParams) { Index: typo3/sysext/cms/tslib/class.tslib_content.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_content.php (revision 8125) +++ typo3/sysext/cms/tslib/class.tslib_content.php (working copy) @@ -2155,7 +2155,7 @@ $page = $GLOBALS['TSFE']->page; if (!$theRedirect) { // Internal: Just submit to current page $LD = $GLOBALS['TSFE']->tmpl->linkData($page, $conf['target'], $conf['no_cache'],'index.php', '', $this->getClosestMPvalueForPage($page['uid'])); - } elseif (t3lib_div::testInt($theRedirect)) { // Internal: Submit to page with ID $theRedirect + } elseif (is_int($theRedirect)) { // Internal: Submit to page with ID $theRedirect $page = $GLOBALS['TSFE']->sys_page->getPage_noCheck($theRedirect); $LD = $GLOBALS['TSFE']->tmpl->linkData($page, $conf['target'], $conf['no_cache'],'index.php', '', $this->getClosestMPvalueForPage($page['uid'])); } else { // External URL, redirect-hidden field is rendered! @@ -2166,14 +2166,14 @@ // Formtype (where to submit to!): $formtype = $propertyOverride['type'] ? $propertyOverride['type'] : $this->stdWrap($conf['type'], $conf['type.']); - if (t3lib_div::testInt($formtype)) { // Submit to a specific page + if (is_int($formtype)) { // Submit to a specific page $page = $GLOBALS['TSFE']->sys_page->getPage_noCheck($formtype); $LD_A = $GLOBALS['TSFE']->tmpl->linkData($page, $conf['target'], $conf['no_cache'], '', '', $this->getClosestMPvalueForPage($page['uid'])); $action = $LD_A['totalURL']; } elseif ($formtype) { // Submit to external script $LD_A = $LD; $action = $formtype; - } elseif (t3lib_div::testInt($theRedirect)) { + } elseif (is_int($theRedirect)) { $LD_A = $LD; $action = $LD_A['totalURL']; } else { // Submit to "nothing" - which is current page @@ -2272,7 +2272,7 @@ $depth=100; // the startId is found $theStartId=0; - if (t3lib_div::testInt(t3lib_div::_GP('stype'))) { + if (is_int(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!! @@ -2331,7 +2331,7 @@ $search->build_search_query($endClause); // count... - if (t3lib_div::testInt(t3lib_div::_GP('scount'))) { + if (is_int(t3lib_div::_GP('scount'))) { $search->res_count = t3lib_div::_GP('scount'); } else { $search->count_query(); @@ -3660,7 +3660,7 @@ } else { if (is_array($row)) { foreach ($row as $field => $value) { - if (!t3lib_div::testInt($field)) { + if (!is_int($field)) { if ($HSC) { $value = htmlspecialchars($value); } @@ -3953,7 +3953,7 @@ */ function listNum($content,$listNum,$char) { $char = $char ? $char : ','; - if (t3lib_div::testInt($char)) { + if (is_int($char)) { $char = chr($char); } $temp = explode($char,$content); @@ -4775,7 +4775,7 @@ $valArr=explode($conf['token'],$value); - if (count($valArr) && (t3lib_div::testInt($conf['returnKey']) || $conf['returnKey.'])) { + if (count($valArr) && (is_int($conf['returnKey']) || $conf['returnKey.'])) { $key = intval($this->stdWrap($conf['returnKey'],$conf['returnKey.'])); $content = isset($valArr[$key]) ? $valArr[$key] : ''; } else { @@ -5874,7 +5874,7 @@ $link_param = trim($this->stdWrap($conf['parameter'],$conf['parameter.'])); $sectionMark = trim($this->stdWrap($conf['section'],$conf['section.'])); - $sectionMark = $sectionMark ? (t3lib_div::testInt($sectionMark)?'#c':'#').$sectionMark : ''; + $sectionMark = $sectionMark ? (is_int($sectionMark)?'#c':'#').$sectionMark : ''; $initP = '?id='.$GLOBALS['TSFE']->id.'&type='.$GLOBALS['TSFE']->type; $this->lastTypoLinkUrl = ''; $this->lastTypoLinkTarget = ''; @@ -5941,7 +5941,7 @@ $urlChar=intval(strpos($link_param, '.')); // Firsts, test if $link_param is numeric and page with such id exists. If yes, do not attempt to link to file - if (!t3lib_div::testInt($link_param) || count($GLOBALS['TSFE']->sys_page->getPage_noCheck($link_param)) == 0) { + if (!is_int($link_param) || count($GLOBALS['TSFE']->sys_page->getPage_noCheck($link_param)) == 0) { // Detects if a file is found in site-root (or is a 'virtual' simulateStaticDocument file!) and if so it will be treated like a normal file. list($rootFileDat) = explode('?',rawurldecode($link_param)); $containsSlash = strstr($rootFileDat,'/'); @@ -6002,7 +6002,7 @@ if (!strcmp($link_param,'')) {$link_param=$GLOBALS['TSFE']->id;} // If no id or alias is given if ($link_params_parts[1] && !$sectionMark) { $sectionMark = trim($link_params_parts[1]); - $sectionMark = (t3lib_div::testInt($sectionMark)?'#c':'#').$sectionMark; + $sectionMark = (is_int($sectionMark)?'#c':'#').$sectionMark; } unset($theTypeP); if (count($pairParts)>1) { @@ -6010,7 +6010,7 @@ $conf['additionalParams'].= isset($pairParts[2]) ? $pairParts[2] : ''; } // Checking if the id-parameter is an alias. - if (!t3lib_div::testInt($link_param)) { + if (!is_int($link_param)) { $link_param = $GLOBALS['TSFE']->sys_page->getPageIdFromAlias($link_param); } @@ -6810,7 +6810,7 @@ * @return string The formatted string */ function calcAge($seconds,$labels) { - if (t3lib_div::testInt($labels)) { + if (is_int($labels)) { $labels = ' min| hrs| days| yrs'; } else { $labels=str_replace('"','',$labels); Index: typo3/sysext/cms/tslib/class.tslib_pibase.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_pibase.php (revision 8125) +++ typo3/sysext/cms/tslib/class.tslib_pibase.php (working copy) @@ -1269,7 +1269,7 @@ $fList = t3lib_div::trimExplode(',',$fList,1); $tempPiVars = $this->piVars; foreach ($fList as $k) { - if (!t3lib_div::testInt($tempPiVars[$k]) || $tempPiVars[$k]<$lowerThan) unset($tempPiVars[$k]); + if (!is_int($tempPiVars[$k]) || $tempPiVars[$k]<$lowerThan) unset($tempPiVars[$k]); } if (!count($tempPiVars)) return 1; } @@ -1374,7 +1374,7 @@ $tempArr=$sheetArray; foreach($fieldNameArr as $k => $v) { - if (t3lib_div::testInt($v)) { + if (is_int($v)) { if (is_array($tempArr)) { $c=0; foreach($tempArr as $values) { Index: typo3/sysext/cms/tslib/class.tslib_fe.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_fe.php (revision 8125) +++ typo3/sysext/cms/tslib/class.tslib_fe.php (working copy) @@ -806,7 +806,7 @@ // Now it's investigated if the raw page-id points to a hidden page and if so, the flag is set. // This does not require the preview flag to be set in the admin panel - $idQ = t3lib_div::testInt($this->id) ? 'uid='.intval($this->id) : 'alias='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->id, 'pages').' AND pid>=0'; // pid>=0 added for the sake of versioning... + $idQ = is_int($this->id) ? 'uid='.intval($this->id) : 'alias='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->id, 'pages').' AND pid>=0'; // pid>=0 added for the sake of versioning... $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', 'pages', $idQ . ' AND hidden!=0 AND deleted=0'); if ($count) { $this->fePreview = 1; // The preview flag is set only if the current page turns out to actually be hidden! @@ -1592,7 +1592,7 @@ * @access private */ function checkAndSetAlias() { - if ($this->id && !t3lib_div::testInt($this->id)) { + if ($this->id && !is_int($this->id)) { $aid = $this->sys_page->getPageIdFromAlias($this->id); if ($aid) { $this->id = $aid; @@ -4328,7 +4328,7 @@ */ function workspacePreviewInit() { $previewWS = t3lib_div::_GP('ADMCMD_previewWS'); - if ($this->beUserLogin && is_object($GLOBALS['BE_USER']) && t3lib_div::testInt($previewWS)) { + if ($this->beUserLogin && is_object($GLOBALS['BE_USER']) && is_int($previewWS)) { if ($previewWS==0 || ($previewWS>=-1 && $GLOBALS['BE_USER']->checkWorkspace($previewWS))) { // Check Access to workspace. Live (0) is OK to preview for all. $this->workspacePreview = intval($previewWS); } else { Index: typo3/sysext/cms/tslib/index_ts.php =================================================================== --- typo3/sysext/cms/tslib/index_ts.php (revision 8125) +++ typo3/sysext/cms/tslib/index_ts.php (working copy) @@ -238,7 +238,7 @@ // Remove any output produced until now ob_clean(); if ($TYPO3_CONF_VARS['FE']['compressionLevel'] && extension_loaded('zlib')) { - if (t3lib_div::testInt($TYPO3_CONF_VARS['FE']['compressionLevel'])) { + if (is_int($TYPO3_CONF_VARS['FE']['compressionLevel'])) { // Prevent errors if ini_set() is unavailable (safe mode) @ini_set('zlib.output_compression_level', $TYPO3_CONF_VARS['FE']['compressionLevel']); } Index: typo3/sysext/cms/layout/db_layout.php =================================================================== --- typo3/sysext/cms/layout/db_layout.php (revision 8125) +++ typo3/sysext/cms/layout/db_layout.php (working copy) @@ -755,7 +755,7 @@ // Delete-button flag? - $this->deleteButton = (t3lib_div::testInt($this->eRParts[1]) && $edit_record && (($this->eRParts[0]!='pages'&&$this->EDIT_CONTENT) || ($this->eRParts[0]=='pages'&&($this->CALC_PERMS&4)))); + $this->deleteButton = (is_int($this->eRParts[1]) && $edit_record && (($this->eRParts[0]!='pages'&&$this->EDIT_CONTENT) || ($this->eRParts[0]=='pages'&&($this->CALC_PERMS&4)))); // If undo-button should be rendered (depends on available items in sys_history) $this->undoButton=0; @@ -916,7 +916,7 @@ // Select element matrix: - if ($this->eRParts[0]=='tt_content' && t3lib_div::testInt($this->eRParts[1])) { + if ($this->eRParts[0]=='tt_content' && is_int($this->eRParts[1])) { $posMap = t3lib_div::makeInstance('ext_posMap'); $posMap->backPath = $BACK_PATH; $posMap->cur_sys_language=$this->current_sys_language; @@ -1219,7 +1219,7 @@ t3lib_iconWorks::getSpriteIcon('actions-page-move') . ''; // Move record - if (t3lib_div::testInt($this->eRParts[1])) { + if (is_int($this->eRParts[1])) { $buttons['move_record'] = '' . t3lib_iconWorks::getSpriteIcon('actions-' . ($this->eRParts[0] == 'tt_content' ? 'document' : 'page') . '-move',array('class'=>'c-inputButton','title' => $LANG->getLL('move_' . ($this->eRParts[0] == 'tt_content' ? 'record' : 'page'), 1))) . ''; Index: typo3/sysext/impexp/class.tx_impexp.php =================================================================== --- typo3/sysext/impexp/class.tx_impexp.php (revision 8125) +++ typo3/sysext/impexp/class.tx_impexp.php (working copy) @@ -1350,7 +1350,7 @@ foreach($this->dat['header']['pid_lookup'] as $pid => $recList) { $newPid = isset($this->import_mapId['pages'][$pid]) ? $this->import_mapId['pages'][$pid] : $mainPid; - if (t3lib_div::testInt($newPid)) { + if (is_int($newPid)) { foreach($recList as $tableName => $uidList) { if (($tableName!='pages' || !$pagesFromTree[$pid]) && is_array($uidList)) { // If $mainPid===$newPid then we are on root level and we can consider to move pages as well! (they will not be in the page tree!) $uidList = array_reverse(array_keys($uidList)); @@ -1424,7 +1424,7 @@ // PID and UID: unset($this->import_data[$table][$ID]['uid']); - if (t3lib_div::testInt($ID)) { // Updates: + if (is_int($ID)) { // Updates: unset($this->import_data[$table][$ID]['pid']); } else { // Inserts: $this->import_data[$table][$ID]['pid'] = $pid; @@ -1938,7 +1938,7 @@ $insertValue = t3lib_BEfunc::wsMapId($tempTable,$this->import_mapId[$tempTable][$tempUid]); // Look if reference is to a page and the original token value was NOT an integer - then we assume is was an alias and try to look up the new one! - if ($tempTable==='pages' && !t3lib_div::testInt($cfg['subst']['tokenValue'])) { + if ($tempTable==='pages' && !is_int($cfg['subst']['tokenValue'])) { $recWithUniqueValue = t3lib_BEfunc::getRecord($tempTable,$insertValue, 'alias'); if ($recWithUniqueValue['alias']) { $insertValue = $recWithUniqueValue['alias']; Index: typo3/sysext/tstemplate_ceditor/class.tx_tstemplateceditor.php =================================================================== --- typo3/sysext/tstemplate_ceditor/class.tx_tstemplateceditor.php (revision 8125) +++ typo3/sysext/tstemplate_ceditor/class.tx_tstemplateceditor.php (working copy) @@ -110,7 +110,7 @@ $saveId = $tplRow['_ORIG_uid'] ? $tplRow['_ORIG_uid'] : $tplRow['uid']; // Update template ? - if (t3lib_div::_POST('submit') || (t3lib_div::testInt(t3lib_div::_POST('submit_x')) && t3lib_div::testInt(t3lib_div::_POST('submit_y')))) { + if (t3lib_div::_POST('submit') || (is_int(t3lib_div::_POST('submit_x')) && is_int(t3lib_div::_POST('submit_y')))) { $tmpl->changed=0; $tmpl->ext_procesInput(t3lib_div::_POST(),$_FILES,$theConstants,$tplRow); // debug($tmpl->changed); Index: typo3/wizard_forms.php =================================================================== --- typo3/wizard_forms.php (revision 8125) +++ typo3/wizard_forms.php (working copy) @@ -704,7 +704,7 @@ $cmd='row_down'; } - if ($cmd && t3lib_div::testInt($kk)) { + if ($cmd && is_int($kk)) { if (substr($cmd,0,4)=='row_') { switch($cmd) { case 'row_remove': Index: typo3/wizard_add.php =================================================================== --- typo3/wizard_add.php (revision 8125) +++ typo3/wizard_add.php (working copy) @@ -128,7 +128,7 @@ // Else proceed: if ($this->returnEditConf) { // If a new id has returned from a newly created record... $eC = unserialize($this->returnEditConf); - if (is_array($eC[$this->table]) && t3lib_div::testInt($this->P['uid'])) { + if (is_array($eC[$this->table]) && is_int($this->P['uid'])) { // Getting id and cmd from returning editConf array. reset($eC[$this->table]); Index: typo3/wizard_table.php =================================================================== --- typo3/wizard_table.php (revision 8125) +++ typo3/wizard_table.php (working copy) @@ -517,7 +517,7 @@ $cmd='row_down'; } - if ($cmd && t3lib_div::testInt($kk)) { + if ($cmd && is_int($kk)) { if (substr($cmd,0,4)=='row_') { switch($cmd) { case 'row_remove': Index: typo3/mod/tools/em/class.em_index.php =================================================================== --- typo3/mod/tools/em/class.em_index.php (revision 8125) +++ typo3/mod/tools/em/class.em_index.php (working copy) @@ -4752,7 +4752,7 @@ if(strlen($k) && is_array($v)) { $lines .= str_repeat(TAB,$level)."'".$k."' => ".$this->arrayToCode($v, $level); } elseif(strlen($k)) { - $lines .= str_repeat(TAB,$level)."'".$k."' => ".(t3lib_div::testInt($v) ? intval($v) : "'".t3lib_div::slashJS(trim($v),1)."'").','.LF; + $lines .= str_repeat(TAB,$level)."'".$k."' => ".(is_int($v) ? intval($v) : "'".t3lib_div::slashJS(trim($v),1)."'").','.LF; } } Index: typo3/mod/user/ws/index.php =================================================================== --- typo3/mod/user/ws/index.php (revision 8125) +++ typo3/mod/user/ws/index.php (working copy) @@ -193,7 +193,7 @@ foreach($post['items'] as $item => $v) { list($table,$uid) = explode(':',$item,2); - if ($GLOBALS['TCA'][$table] && t3lib_div::testInt($uid)) { + if ($GLOBALS['TCA'][$table] && is_int($uid)) { switch($post['_with_selected_do']) { case "stage_-1": $cmdArray[$table][$uid]['version']['action'] = 'setStage'; Index: typo3/mod/user/ws/class.wslib_gui.php =================================================================== --- typo3/mod/user/ws/class.wslib_gui.php (revision 8125) +++ typo3/mod/user/ws/class.wslib_gui.php (working copy) @@ -352,7 +352,7 @@ // Traverse $pArray if (is_array($pArray)) { foreach($pArray as $k => $v) { - if (t3lib_div::testInt($k)) { + if (is_int($k)) { // If there are elements on this level, output a divider row which just creates a little visual space. if (is_array($pArray[$k.'_'])) { @@ -548,7 +548,7 @@ // Traverse $pArray if (is_array($pArray)) { foreach($pArray as $k => $v) { - if (t3lib_div::testInt($k)) { + if (is_int($k)) { if (is_array($pArray[$k.'_'])) { foreach($pArray[$k.'_'] as $table => $oidArray) { Index: typo3/classes/class.shortcutmenu.php =================================================================== --- typo3/classes/class.shortcutmenu.php (revision 8125) +++ typo3/classes/class.shortcutmenu.php (working copy) @@ -299,7 +299,7 @@ } $pageId = $this->getLinkedPageId($row['url']); - if(t3lib_div::testInt($pageId)) { + if(is_int($pageId)) { // check for webmount access if(!$GLOBALS['BE_USER']->isInWebMount($pageId)) { continue; @@ -526,7 +526,7 @@ // Lookup the title of this page and use it as default description $pageId = $shortcut['recordid'] ? $shortcut['recordid'] : $this->getLinkedPageId($url); - if(t3lib_div::testInt($pageId)) { + if(is_int($pageId)) { $page = t3lib_BEfunc::getRecord('pages', $pageId); if(count($page)) { // set the name to the title of the page Index: typo3/alt_doc.php =================================================================== --- typo3/alt_doc.php (revision 8125) +++ typo3/alt_doc.php (working copy) @@ -868,7 +868,7 @@ // DELETE + UNDO buttons: if (!$this->errorC && !$TCA[$this->firstEl['table']]['ctrl']['readOnly'] && count($this->elementsData)==1) { - if ($this->firstEl['cmd']!='new' && t3lib_div::testInt($this->firstEl['uid'])) { + if ($this->firstEl['cmd']!='new' && is_int($this->firstEl['uid'])) { // Delete: if ($this->firstEl['deleteAccess'] && !$TCA[$this->firstEl['table']]['ctrl']['readOnly'] && !$this->getNewIconMode($this->firstEl['table'],'disableDelete')) { Index: typo3/alt_shortcut.php =================================================================== --- typo3/alt_shortcut.php (revision 8125) +++ typo3/alt_shortcut.php (working copy) @@ -167,7 +167,7 @@ // Lookup the title of this page and use it as default description $page_id = $this->getLinkedPageId($url); - if (t3lib_div::testInt($page_id)) { + if (is_int($page_id)) { if (preg_match('/\&edit\[(.*)\]\[(.*)\]=edit/',$url,$matches)) { // Edit record $description = ''; // TODO: Set something useful @@ -204,7 +204,7 @@ // Deleting shortcuts: if (strcmp($this->deleteCategory,'')) { - if (t3lib_div::testInt($this->deleteCategory)) { + if (is_int($this->deleteCategory)) { $GLOBALS['TYPO3_DB']->exec_DELETEquery('sys_be_shortcuts', 'sc_group='.intval($this->deleteCategory).$addUSERWhere); } } @@ -340,7 +340,7 @@ } $page_id = $this->getLinkedPageId($row['url']); - if (t3lib_div::testInt($page_id)) { + if (is_int($page_id)) { // Check for webmount access if (!$GLOBALS['BE_USER']->isInWebMount($page_id)) continue; @@ -453,7 +453,7 @@ } // Load alternative table/uid into editing form. - if (count($this->alternativeTableUid)==2 && isset($TCA[$this->alternativeTableUid[0]]) && t3lib_div::testInt($this->alternativeTableUid[1])) { + if (count($this->alternativeTableUid)==2 && isset($TCA[$this->alternativeTableUid[0]]) && is_int($this->alternativeTableUid[1])) { $JSaction = t3lib_BEfunc::editOnClick('&edit['.$this->alternativeTableUid[0].']['.$this->alternativeTableUid[1].']=edit','','dummy.php'); $this->content.=$this->doc->wrapScriptTags('function editArbitraryElement() { top.content.'.$JSaction.'; } editArbitraryElement();'); } @@ -567,7 +567,7 @@ if (!(count($this->alternativeTableUid)==2 && $BE_USER->isAdmin())) { // We restrict it to admins only just because I'm not really sure if alt_doc.php properly checks permissions of passed records for editing. If alt_doc.php does that, then we can remove this. $where = ' AND ('.$BE_USER->getPagePermsClause(2).' OR '.$BE_USER->getPagePermsClause(16).')'; - if (t3lib_div::testInt($this->editPage)) { + if (is_int($this->editPage)) { $this->theEditRec = t3lib_BEfunc::getRecordWSOL('pages',$this->editPage,'*',$where); } else { $records = t3lib_BEfunc::getRecordsByField('pages','alias',$this->editPage,$where); @@ -622,7 +622,7 @@ // edit alternative table/uid if(count($this->alternativeTableUid) == 2 && isset($GLOBALS['TCA'][$this->alternativeTableUid[0]]) - && t3lib_div::testInt($this->alternativeTableUid[1])) { + && is_int($this->alternativeTableUid[1])) { $data['type'] = 'alternative'; $data['alternativeTable'] = $this->alternativeTableUid[0]; $data['alternativeUid'] = $this->alternativeTableUid[1]; Index: typo3/init.php =================================================================== --- typo3/init.php (revision 8125) +++ typo3/init.php (working copy) @@ -445,7 +445,7 @@ // **************** ob_clean(); if (extension_loaded('zlib') && $TYPO3_CONF_VARS['BE']['compressionLevel']) { - if (t3lib_div::testInt($TYPO3_CONF_VARS['BE']['compressionLevel'])) { + if (is_int($TYPO3_CONF_VARS['BE']['compressionLevel'])) { @ini_set('zlib.output_compression_level', $TYPO3_CONF_VARS['BE']['compressionLevel']); } ob_start('ob_gzhandler'); Index: typo3/backend.php =================================================================== --- typo3/backend.php (revision 8125) +++ typo3/backend.php (working copy) @@ -528,7 +528,7 @@ $where = ' AND ('.$GLOBALS['BE_USER']->getPagePermsClause(2) .' OR '.$GLOBALS['BE_USER']->getPagePermsClause(16).')'; - if(t3lib_div::testInt($editId)) { + if(is_int($editId)) { $editRecord = t3lib_BEfunc::getRecordWSOL('pages', $editId, '*', $where); } else { $records = t3lib_BEfunc::getRecordsByField('pages', 'alias', $editId, $where); Index: typo3/wizard_edit.php =================================================================== --- typo3/wizard_edit.php (revision 8125) +++ typo3/wizard_edit.php (working copy) @@ -102,7 +102,7 @@ $fTable = $this->P['currentValue']<0 ? $config['neg_foreign_table'] : $config['foreign_table']; // Detecting the various allowed field type setups and acting accordingly. - if (is_array($config) && $config['type']=='select' && !$config['MM'] && $config['maxitems']<=1 && t3lib_div::testInt($this->P['currentValue']) && $this->P['currentValue'] && $fTable) { // SINGLE value: + if (is_array($config) && $config['type']=='select' && !$config['MM'] && $config['maxitems']<=1 && is_int($this->P['currentValue']) && $this->P['currentValue'] && $fTable) { // SINGLE value: $redirectUrl = 'alt_doc.php?returnUrl=' . rawurlencode('wizard_edit.php?doClose=1') . '&edit[' . $fTable . '][' . $this->P['currentValue'] . ']=edit'; t3lib_utility_Http::redirect($redirectUrl); } elseif (is_array($config) && $this->P['currentSelectedValues'] && (($config['type']=='select' && $config['foreign_table']) || ($config['type']=='group' && $config['internal_type']=='db'))) { // MULTIPLE VALUES: Index: t3lib/class.t3lib_tsparser_ext.php =================================================================== --- t3lib/class.t3lib_tsparser_ext.php (revision 8125) +++ t3lib/class.t3lib_tsparser_ext.php (working copy) @@ -367,7 +367,7 @@ if (substr($key,-2)!='..') { // Don't do anything with comments / linenumber registrations... $key=preg_replace('/\.$/','',$key); if (substr($key,-1)!='.') { - if (t3lib_div::testInt($key)) { + if (is_int($key)) { $keyArr_num[$key]=$arr[$key]; } else { $keyArr_alpha[$key]=$arr[$key]; @@ -978,7 +978,7 @@ $out[$key] = $val; break; default: - if (t3lib_div::testInt($key)) { + if (is_int($key)) { $constRefs = explode(',',$val); foreach ($constRefs as $const) { $const=trim($const); Index: t3lib/class.t3lib_tceforms_inline.php =================================================================== --- t3lib/class.t3lib_tceforms_inline.php (revision 8125) +++ t3lib/class.t3lib_tceforms_inline.php (working copy) @@ -199,7 +199,7 @@ if (!isset($this->inlineFirstPid)) { // if this record is not new, try to fetch the inlineView states // @TODO: Add checking/cleaning for unused tables, records, etc. to save space in uc-field - if (t3lib_div::testInt($row['uid'])) { + if (is_int($row['uid'])) { $inlineView = unserialize($GLOBALS['BE_USER']->uc['inlineView']); $this->inlineView = $inlineView[$table][$row['uid']]; } @@ -371,7 +371,7 @@ $this->inlineData['map'][$this->inlineNames['form']] = $this->inlineNames['object']; // Set this variable if we handle a brand new unsaved record: - $isNewRecord = t3lib_div::testInt($rec['uid']) ? false : true; + $isNewRecord = is_int($rec['uid']) ? false : true; // Set this variable if the record is virtual and only show with header and not editable fields: $isVirtualRecord = (isset($rec['__virtual']) && $rec['__virtual']); // If there is a selector field, normalize it: @@ -744,7 +744,7 @@ $comboRecord = array(); // If record does already exist, load it: - if ($rec[$foreign_selector] && t3lib_div::testInt($rec[$foreign_selector])) { + if ($rec[$foreign_selector] && is_int($rec[$foreign_selector])) { $comboRecord = $this->getRecord( $this->inlineFirstPid, $comboConfig['foreign_table'], @@ -1164,7 +1164,7 @@ $this->fObj->pushToDynNestedStack('inline', $this->inlineNames['object']); // dynamically create a new record using t3lib_transferData - if (!$foreignUid || !t3lib_div::testInt($foreignUid) || $config['foreign_selector']) { + if (!$foreignUid || !is_int($foreignUid) || $config['foreign_selector']) { $record = $this->getNewRecord($this->inlineFirstPid, $current['table']); // Set language of new child record to the language of the parent record: if ($config['localizationMode']=='select') { @@ -1250,7 +1250,7 @@ */ protected function synchronizeLocalizeRecords($domObjectId, $type) { $jsonArray = false; - if (t3lib_div::inList('localize,synchronize', $type) || t3lib_div::testInt($type)) { + if (t3lib_div::inList('localize,synchronize', $type) || is_int($type)) { // The current level: $current = $this->inlineStructure['unstable']; // The parent level: @@ -1407,7 +1407,7 @@ $top = $this->getStructureLevel(0); // only do some action if the top record and the current record were saved before - if (t3lib_div::testInt($top['uid'])) { + if (is_int($top['uid'])) { $inlineView = (array)unserialize($GLOBALS['BE_USER']->uc['inlineView']); $inlineViewCurrent =& $inlineView[$top['table']][$top['uid']]; @@ -1686,9 +1686,9 @@ protected function getNewRecordPid($table, $parentPid=null) { $newRecordPid = $this->inlineFirstPid; $pageTS = t3lib_beFunc::getPagesTSconfig($parentPid, true); - if (isset($pageTS['TCAdefaults.'][$table.'.']['pid']) && t3lib_div::testInt($pageTS['TCAdefaults.'][$table.'.']['pid'])) { + if (isset($pageTS['TCAdefaults.'][$table.'.']['pid']) && is_int($pageTS['TCAdefaults.'][$table.'.']['pid'])) { $newRecordPid = $pageTS['TCAdefaults.'][$table.'.']['pid']; - } elseif (isset($parentPid) && t3lib_div::testInt($parentPid)) { + } elseif (isset($parentPid) && is_int($parentPid)) { $newRecordPid = $parentPid; } return $newRecordPid; @@ -2002,7 +2002,7 @@ // If the command is to create a NEW record...: if ($cmd=='new') { // If the pid is numerical, check if it's possible to write to this page: - if (t3lib_div::testInt($this->inlineFirstPid)) { + if (is_int($this->inlineFirstPid)) { $calcPRec = t3lib_BEfunc::getRecord('pages', $this->inlineFirstPid); if(!is_array($calcPRec)) { return false; Index: t3lib/class.t3lib_compressor.php =================================================================== --- t3lib/class.t3lib_compressor.php (revision 8125) +++ t3lib/class.t3lib_compressor.php (working copy) @@ -59,7 +59,7 @@ if (extension_loaded('zlib') && $compressionLevel) { $this->createGzipped = TRUE; // $compressionLevel can also be TRUE - if (t3lib_div::testInt($compressionLevel)) { + if (is_int($compressionLevel)) { $this->gzipCompressionLevel = $compressionLevel; } } Index: t3lib/class.t3lib_parsehtml_proc.php =================================================================== --- t3lib/class.t3lib_parsehtml_proc.php (revision 8125) +++ t3lib/class.t3lib_parsehtml_proc.php (working copy) @@ -731,7 +731,7 @@ $sectionMark = trim($link_params_parts[1]); if (!strcmp($idPart,'')) { $idPart=$this->recPid; } // If no id or alias is given, set it to class record pid // Checking if the id-parameter is an alias. - if (!t3lib_div::testInt($idPart)) { + if (!is_int($idPart)) { list($idPartR) = t3lib_BEfunc::getRecordsByField('pages','alias',$idPart); $idPart = intval($idPartR['uid']); } Index: t3lib/class.t3lib_loaddbgroup.php =================================================================== --- t3lib/class.t3lib_loaddbgroup.php (revision 8125) +++ t3lib/class.t3lib_loaddbgroup.php (working copy) @@ -207,7 +207,7 @@ $theID = strrev($parts[0]); // Check that the id IS an integer: - if (t3lib_div::testInt($theID)) { + if (is_int($theID)) { // Get the table name: If a part of the exploded string, use that. Otherwise if the id number is LESS than zero, use the second table, otherwise the first table $theTable = trim($parts[1]) ? strrev(trim($parts[1])) : ($this->secondTable && $theID<0 ? $this->secondTable : $this->firstTable); // If the ID is not blank and the table name is among the names in the inputted tableList, then proceed: @@ -601,9 +601,9 @@ $foreign_table_field = $conf['foreign_table_field']; // if there are table items and we have a proper $parentUid - if (t3lib_div::testInt($parentUid) && count($this->tableArray)) { + if (is_int($parentUid) && count($this->tableArray)) { // if updateToUid is not a positive integer, set it to '0', so it will be ignored - if (!(t3lib_div::testInt($updateToUid) && $updateToUid > 0)) { + if (!(is_int($updateToUid) && $updateToUid > 0)) { $updateToUid = 0; } $fields = 'uid,'.$foreign_field.($symmetric_field ? ','.$symmetric_field : ''); @@ -716,7 +716,7 @@ $theID = strrev($parts[0]); $theTable = strrev($parts[1]); - if ( t3lib_div::testInt($theID) && (!$theTable || !strcmp($theTable,$fTable) || !strcmp($theTable,$nfTable)) ) { + if ( is_int($theID) && (!$theTable || !strcmp($theTable,$fTable) || !strcmp($theTable,$nfTable)) ) { $valueArray[$key]= $theTable && strcmp($theTable,$fTable) ? $theID*-1 : $theID; } } @@ -820,7 +820,7 @@ * @return boolean Returns true if looking from the symmetric ("other") side to the relation. */ function isOnSymmetricSide($parentUid, $parentConf, $childRec) { - return t3lib_div::testInt($childRec['uid']) && $parentConf['symmetric_field'] && $parentUid == $childRec[$parentConf['symmetric_field']] + return is_int($childRec['uid']) && $parentConf['symmetric_field'] && $parentUid == $childRec[$parentConf['symmetric_field']] ? true : false; } Index: t3lib/matchcondition/class.t3lib_matchcondition_abstract.php =================================================================== --- t3lib/matchcondition/class.t3lib_matchcondition_abstract.php (revision 8125) +++ t3lib/matchcondition/class.t3lib_matchcondition_abstract.php (working copy) @@ -326,7 +326,7 @@ // comp $values = t3lib_div::trimExplode(',', $value, true); foreach ($values as $test) { - if (t3lib_div::testInt($test)) { + if (is_int($test)) { $test = '=' . $test; } if ($this->compareNumber($test, $theTestValue)) { Index: t3lib/class.t3lib_div.php =================================================================== --- t3lib/class.t3lib_div.php (revision 8125) +++ t3lib/class.t3lib_div.php (working copy) @@ -1262,9 +1262,13 @@ * * @param mixed Any input variable to test. * @return boolean Returns true if string is an integer + * @ignore + * @deprecated since TYPO3 4.5 - Use the PHP function is_int instead */ - public static function testInt($var) { - return !strcmp($var,intval($var)); + public static function testInt($var) { + self::logDeprecatedFunction(); + + return is_int($var); } /** @@ -2448,7 +2452,7 @@ if(isset($options['grandParentTagMap'][$stackData['grandParentTagName'].'/'.$stackData['parentTagName']])) { // Use tag based on grand-parent + parent tag name $attr.=' index="'.htmlspecialchars($tagName).'"'; $tagName = (string)$options['grandParentTagMap'][$stackData['grandParentTagName'].'/'.$stackData['parentTagName']]; - }elseif(isset($options['parentTagMap'][$stackData['parentTagName'].':_IS_NUM']) && self::testInt($tagName)) { // Use tag based on parent tag name + if current tag is numeric + }elseif(isset($options['parentTagMap'][$stackData['parentTagName'].':_IS_NUM']) && is_int($tagName)) { // Use tag based on parent tag name + if current tag is numeric $attr.=' index="'.htmlspecialchars($tagName).'"'; $tagName = (string)$options['parentTagMap'][$stackData['parentTagName'].':_IS_NUM']; }elseif(isset($options['parentTagMap'][$stackData['parentTagName'].':'.$tagName])) { // Use tag based on parent tag name + current tag Index: t3lib/class.t3lib_cli.php =================================================================== --- t3lib/class.t3lib_cli.php (revision 8125) +++ t3lib/class.t3lib_cli.php (working copy) @@ -141,7 +141,7 @@ $cli_options = array(); $index = '_DEFAULT'; foreach($_SERVER['argv'] as $token) { - if ($token{0}==='-' && !t3lib_div::testInt($token{1})) { // Options starting with a number is invalid - they could be negative values... ! + if ($token{0}==='-' && !is_int($token{1})) { // Options starting with a number is invalid - they could be negative values... ! list($index,$opt) = explode('=',$token,2); if (isset($cli_options[$index])) { echo 'ERROR: Option '.$index.' was used twice!'.LF; Index: t3lib/class.t3lib_softrefproc.php =================================================================== --- t3lib/class.t3lib_softrefproc.php (revision 8125) +++ t3lib/class.t3lib_softrefproc.php (working copy) @@ -691,7 +691,7 @@ // Checking if the id-parameter is an alias. if (strlen($link_param)) { - if (!t3lib_div::testInt($link_param)) { + if (!is_int($link_param)) { $finalTagParts['alias'] = $link_param; $link_param = $this->getPageIdFromAlias($link_param); } @@ -780,7 +780,7 @@ // Add anchor if applicable if (strlen($tLP['anchor'])) { - if (t3lib_div::testInt($tLP['anchor'])) { // Anchor is assumed to point to a content elements: + if (is_int($tLP['anchor'])) { // Anchor is assumed to point to a content elements: // Initialize a new entry because we have a new relation: $newTokenID = $this->makeTokenID('setTypoLinkPartsElement:anchor:'.$idx); $elements[$newTokenID.':'.$idx] = array(); Index: t3lib/class.t3lib_parsehtml.php =================================================================== --- t3lib/class.t3lib_parsehtml.php (revision 8125) +++ t3lib/class.t3lib_parsehtml.php (working copy) @@ -1236,7 +1236,7 @@ } else { $attr=$meta[$k]['origTag']?$meta[$k]['origTag']:$k; if (strcmp($v,'') || isset($meta[$k]['dashType'])) { - $dash=$meta[$k]['dashType']?$meta[$k]['dashType']:(t3lib_div::testInt($v)?'':'"'); + $dash=$meta[$k]['dashType']?$meta[$k]['dashType']:(is_int($v)?'':'"'); $attr.='='.$dash.$v.$dash; } } Index: t3lib/class.t3lib_arraybrowser.php =================================================================== --- t3lib/class.t3lib_arraybrowser.php (revision 8125) +++ t3lib/class.t3lib_arraybrowser.php (working copy) @@ -180,7 +180,7 @@ // If varname is set: if ($this->varName && !$this->dontLinkVar) { - $variableName = $this->varName.'[\''.str_replace('.','\'][\'',$depth).'\'] = '.(!t3lib_div::testInt($theValue) ? '\''.addslashes($theValue).'\'' : $theValue).'; '; + $variableName = $this->varName.'[\''.str_replace('.','\'][\'',$depth).'\'] = '.(!is_int($theValue) ? '\''.addslashes($theValue).'\'' : $theValue).'; '; $label = '' . $label . ''; } Index: t3lib/class.t3lib_tstemplate.php =================================================================== --- t3lib/class.t3lib_tstemplate.php (revision 8125) +++ t3lib/class.t3lib_tstemplate.php (working copy) @@ -1395,7 +1395,7 @@ $keyArr = array(); $setupArrKeys = array_keys($setupArr); foreach ($setupArrKeys as $key) { - if ($acceptOnlyProperties || t3lib_div::testInt($key)) { + if ($acceptOnlyProperties || is_int($key)) { $keyArr[] = intval($key); } } @@ -1489,7 +1489,7 @@ // typeNum $typeNum = $this->setup[$LD['target'].'.']['typeNum']; - if (!t3lib_div::testInt($typeOverride) && intval($GLOBALS['TSFE']->config['config']['forceTypeValue'])) { + if (!is_int($typeOverride) && intval($GLOBALS['TSFE']->config['config']['forceTypeValue'])) { $typeOverride = intval($GLOBALS['TSFE']->config['config']['forceTypeValue']); } if (strcmp($typeOverride,'')) { $typeNum = $typeOverride; } // Override... Index: t3lib/class.t3lib_refindex.php =================================================================== --- t3lib/class.t3lib_refindex.php (revision 8125) +++ t3lib/class.t3lib_refindex.php (working copy) @@ -236,7 +236,7 @@ // Word indexing: t3lib_div::loadTCA($table); foreach($TCA[$table]['columns'] as $field => $conf) { - if (t3lib_div::inList('input,text',$conf['config']['type']) && strcmp($record[$field],'') && !t3lib_div::testInt($record[$field])) { + if (t3lib_div::inList('input,text',$conf['config']['type']) && strcmp($record[$field],'') && !is_int($record[$field])) { $this->words_strings[$field] = $record[$field]; } } Index: t3lib/class.t3lib_timetrack.php =================================================================== --- t3lib/class.t3lib_timetrack.php (revision 8125) +++ t3lib/class.t3lib_timetrack.php (working copy) @@ -480,14 +480,14 @@ $c=0; // First, find number of entries foreach ($arr as $k => $v) { - if (t3lib_div::testInt($k)) { + if (is_int($k)) { $ac++; } } // Traverse through entries $subtime=0; foreach ($arr as $k => $v) { - if (t3lib_div::testInt($k)) { + if (is_int($k)) { $c++; $deeper = is_array($arr[$k.'.']) ? 1 : 0; @@ -519,7 +519,7 @@ // Traverse array again, this time substitute the unique hash with the red key foreach ($arr as $k => $v) { - if (t3lib_div::testInt($k)) { + if (is_int($k)) { if (strlen($this->tsStackLog[$v]['content'])) { $content = str_replace($v, '['.$this->tsStackLog[$v]['key'].']', $content); } Index: t3lib/class.t3lib_befunc.php =================================================================== --- t3lib/class.t3lib_befunc.php (revision 8125) +++ t3lib/class.t3lib_befunc.php (working copy) @@ -1177,7 +1177,7 @@ // If there is a srcPointer value: if ($srcPointer) { - if (t3lib_div::testInt($srcPointer)) { // If integer, then its a record we will look up: + if (is_int($srcPointer)) { // If integer, then its a record we will look up: list($tName, $fName) = explode(':', $ds_tableField, 2); if ($tName && $fName && is_array($GLOBALS['TCA'][$tName])) { $dataStructRec = self::getRecord($tName, $srcPointer); @@ -2100,7 +2100,7 @@ */ public static function getRecordTitlePrep($title, $titleLength = 0) { // If $titleLength is not a valid positive integer, use BE_USER->uc['titleLen']: - if (!$titleLength || !t3lib_div::testInt($titleLength) || $titleLength < 0) { + if (!$titleLength || !is_int($titleLength) || $titleLength < 0) { $titleLength = $GLOBALS['BE_USER']->uc['titleLen']; } $titleOrig = htmlspecialchars($title); @@ -3289,7 +3289,7 @@ */ public static function getTSconfig_pidValue($table, $uid, $pid) { - if (t3lib_div::testInt($pid)) { // If pid is an integer this takes precedence in our lookup. + if (is_int($pid)) { // If pid is an integer this takes precedence in our lookup. $thePidValue = intval($pid); if ($thePidValue<0) { // If ref to another record, look that record up. $pidRec = self::getRecord($table, abs($thePidValue), 'pid'); @@ -3329,7 +3329,7 @@ * @see t3lib_TCEforms::getTSCpid() */ public static function getPidForModTSconfig($table, $uid, $pid) { - $retVal = ($table=='pages' && t3lib_div::testInt($uid)) ? $uid : $pid; + $retVal = ($table=='pages' && is_int($uid)) ? $uid : $pid; return $retVal; } Index: t3lib/class.t3lib_tceforms.php =================================================================== --- t3lib/class.t3lib_tceforms.php (revision 8125) +++ t3lib/class.t3lib_tceforms.php (working copy) @@ -922,7 +922,7 @@ // If the record has been saved and the "linkTitleToSelf" is set, we make the field name into a link, which will load ONLY this field in alt_doc.php $PA['label'] = t3lib_div::deHSCentities(htmlspecialchars($PA['label'])); - if (t3lib_div::testInt($row['uid']) && $PA['fieldTSConfig']['linkTitleToSelf'] && !t3lib_div::_GP('columnsOnly')) { + if (is_int($row['uid']) && $PA['fieldTSConfig']['linkTitleToSelf'] && !t3lib_div::_GP('columnsOnly')) { $lTTS_url = $this->backPath.'alt_doc.php?edit['.$table.']['.$row['uid'].']=edit&columnsOnly='.$field.'&returnUrl='.rawurlencode($this->thisReturnUrl()); $PA['label'] = ''.$PA['label'].''; } @@ -3150,7 +3150,7 @@ if (is_array($TCA[$table]['types'][$typeNum]['bitmask_excludelist_bits'])) { foreach($TCA[$table]['types'][$typeNum]['bitmask_excludelist_bits'] as $bitKey => $eList) { $bit=substr($bitKey,1); - if (t3lib_div::testInt($bit)) { + if (is_int($bit)) { $bit = t3lib_div::intInRange($bit,0,30); if ( (substr($bitKey,0,1)=='-' && !($sTValue&pow(2,$bit))) || @@ -3856,7 +3856,7 @@ case 'script': case 'popup': case 'colorbox': - if (!$wConf['notNewRecords'] || t3lib_div::testInt($row['uid'])) { + if (!$wConf['notNewRecords'] || is_int($row['uid'])) { // Setting &P array contents: $params = array(); @@ -6173,7 +6173,7 @@ } // Convert sys_language_uid to sys_language_uid if input was in fact a string (ISO code expected then) - if (!t3lib_div::testInt($sys_language_uid)) { + if (!is_int($sys_language_uid)) { foreach($this->cachedLanguageFlag[$mainKey] as $rUid => $cD) { if ('v'.$cD['ISOcode']===$sys_language_uid) { $sys_language_uid = $rUid; Index: t3lib/class.t3lib_clipboard.php =================================================================== --- t3lib/class.t3lib_clipboard.php (revision 8125) +++ t3lib/class.t3lib_clipboard.php (working copy) @@ -155,7 +155,7 @@ // NumberTabs $clNP = $BE_USER->getTSConfigVal('options.clipboardNumberPads'); - if (t3lib_div::testInt($clNP) && $clNP>=0) { + if (is_int($clNP) && $clNP>=0) { $this->numberTabs = t3lib_div::intInRange($clNP,0,20); } Index: t3lib/class.t3lib_tcemain.php =================================================================== --- t3lib/class.t3lib_tcemain.php (revision 8125) +++ t3lib/class.t3lib_tcemain.php (working copy) @@ -681,7 +681,7 @@ $old_pid_value = ''; $this->autoVersioningUpdate = FALSE; - if (!t3lib_div::testInt($id)) { // Is it a new record? (Then Id is a string) + if (!is_int($id)) { // Is it a new record? (Then Id is a string) $fieldArray = $this->newFieldArray($table); // Get a fieldArray with default values if (isset($incomingFieldArray['pid'])) { // A pid must be set for new records. // $value = the pid @@ -1941,7 +1941,7 @@ // Example for received data: // $value = 45,NEW4555fdf59d154,12,123 // We need to decide whether we use the stack or can save the relation directly. - if(strpos($value, 'NEW') !== false || !t3lib_div::testInt($id)) { + if(strpos($value, 'NEW') !== false || !is_int($id)) { $this->remapStackRecords[$table][$id] = array('remapStackIndex' => count($this->remapStack)); $this->remapStack[] = array( 'func' => 'checkValue_inline_processDBdata', @@ -1950,7 +1950,7 @@ 'field' => $field ); unset($res['value']); - } elseif($value || t3lib_div::testInt($id)) { + } elseif($value || is_int($id)) { $res['value'] = $this->checkValue_inline_processDBdata($valueArray, $tcaFieldConf, $id, $status, $table, $field); } @@ -3184,7 +3184,7 @@ } // If no language it set, this is a regular copy action: } else { - if (!t3lib_div::testInt($realDestPid)) { + if (!is_int($realDestPid)) { $newId = $this->copyRecord($v['table'], $v['id'], -$v['id']); } elseif ($realDestPid == -1) { $newId = $this->versionizeRecord($v['table'], $v['id'], 'Auto-created for WS #'.$this->BE_USER->workspace); @@ -3977,7 +3977,7 @@ $field = $parts[0]; $type = $parts[1]; - if ($field && (t3lib_div::inList('localize,synchronize', $type) || t3lib_div::testInt($type)) && isset($GLOBALS['TCA'][$table]['columns'][$field]['config'])) { + if ($field && (t3lib_div::inList('localize,synchronize', $type) || is_int($type)) && isset($GLOBALS['TCA'][$table]['columns'][$field]['config'])) { $config = $GLOBALS['TCA'][$table]['columns'][$field]['config']; $foreignTable = $config['foreign_table']; $localizationMode = t3lib_BEfunc::getInlineLocalizationMode($table, $config); @@ -4022,7 +4022,7 @@ } } // Perform synchronization/localization: Possibly add unlocalized records for original language: - if (t3lib_div::testInt($type) && isset($elementsOriginal[$type])) { + if (is_int($type) && isset($elementsOriginal[$type])) { $item = $elementsOriginal[$type]; $item['id'] = $this->localize($item['table'], $item['id'], $language); $dbAnalysisCurrent->itemArray[] = $item; @@ -5713,7 +5713,7 @@ $id = intval($id); // Processing the incoming $perms (from possible string to integer that can be AND'ed) - if (!t3lib_div::testInt($perms)) { + if (!is_int($perms)) { if ($table!='pages') { switch($perms) { case 'edit': @@ -6422,9 +6422,9 @@ function setTSconfigPermissions($fieldArray,$TSConfig_p) { if (strcmp($TSConfig_p['userid'],'')) $fieldArray['perms_userid']=intval($TSConfig_p['userid']); if (strcmp($TSConfig_p['groupid'],'')) $fieldArray['perms_groupid']=intval($TSConfig_p['groupid']); - if (strcmp($TSConfig_p['user'],'')) $fieldArray['perms_user']=t3lib_div::testInt($TSConfig_p['user']) ? $TSConfig_p['user'] : $this->assemblePermissions($TSConfig_p['user']); - if (strcmp($TSConfig_p['group'],'')) $fieldArray['perms_group']=t3lib_div::testInt($TSConfig_p['group']) ? $TSConfig_p['group'] : $this->assemblePermissions($TSConfig_p['group']); - if (strcmp($TSConfig_p['everybody'],'')) $fieldArray['perms_everybody']=t3lib_div::testInt($TSConfig_p['everybody']) ? $TSConfig_p['everybody'] : $this->assemblePermissions($TSConfig_p['everybody']); + if (strcmp($TSConfig_p['user'],'')) $fieldArray['perms_user']=is_int($TSConfig_p['user']) ? $TSConfig_p['user'] : $this->assemblePermissions($TSConfig_p['user']); + if (strcmp($TSConfig_p['group'],'')) $fieldArray['perms_group']=is_int($TSConfig_p['group']) ? $TSConfig_p['group'] : $this->assemblePermissions($TSConfig_p['group']); + if (strcmp($TSConfig_p['everybody'],'')) $fieldArray['perms_everybody']=is_int($TSConfig_p['everybody']) ? $TSConfig_p['everybody'] : $this->assemblePermissions($TSConfig_p['everybody']); return $fieldArray; } @@ -6692,7 +6692,7 @@ foreach ($this->dbAnalysisStore as $action) { $id = t3lib_BEfunc::wsMapId( $action[4], - (t3lib_div::testInt($action[2]) ? $action[2] : $this->substNEWwithIDs[$action[2]]) + (is_int($action[2]) ? $action[2] : $this->substNEWwithIDs[$action[2]]) ); if ($id) { $action[0]->writeMM($action[1], $id, $action[3]); @@ -7473,7 +7473,7 @@ } // Clear cache for a page ID! - if (t3lib_div::testInt($cacheCmd)) { + if (is_int($cacheCmd)) { if (t3lib_extMgm::isLoaded('cms')) { $list_cache = array($cacheCmd); @@ -7808,7 +7808,7 @@ switch ($TCA[$table]['columns'][$field]['config']['type']) { case 'inline': if ($TCA[$table]['columns'][$field]['config']['foreign_field']) { - if (!t3lib_div::testInt($value)) { + if (!is_int($value)) { $result[$field] = count(t3lib_div::trimExplode(',', $value, TRUE)); } }