Project

General

Profile

Bug #21958 ยป checkrecord-improvement.patch

Administrator Admin, 2010-01-15 08:24

View differences:

t3lib/class.t3lib_page.php (working copy)
function checkRecord($table,$uid,$checkPage=0) {
global $TCA;
$uid = intval($uid);
if (is_array($TCA[$table])) {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table, 'uid='.intval($uid).$this->enableFields($table));
if (is_array($TCA[$table]) && $uid > 0) {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table, 'uid=' . $uid . $this->enableFields($table));
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
$GLOBALS['TYPO3_DB']->sql_free_result($res);
if ($row) {
......
function getRawRecord($table,$uid,$fields='*',$noWSOL=FALSE) {
global $TCA;
$uid = intval($uid);
if (is_array($TCA[$table]) || $table=='pages') { // Excluding pages here so we can ask the function BEFORE TCA gets initialized. Support for this is followed up in deleteClause()...
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $table, 'uid='.intval($uid).$this->deleteClause($table));
if ((is_array($TCA[$table]) || $table=='pages') && $uid > 0) { // Excluding pages here so we can ask the function BEFORE TCA gets initialized. Support for this is followed up in deleteClause()...
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $table, 'uid=' . $uid . $this->deleteClause($table));
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
$GLOBALS['TYPO3_DB']->sql_free_result($res);
if ($row) {
    (1-1/1)