Project

General

Profile

Bug #18253 » bug_0007591_without_on_duplicate_key_update.patch

Administrator Admin, 2008-02-21 10:56

View differences:

class.t3lib_tstemplate.php (copia de trabajo)
'tstamp' => $GLOBALS['EXEC_TIME']
);
$mpvar_hash = t3lib_div::md5int($GLOBALS['TSFE']->MP);
$GLOBALS['TYPO3_DB']->exec_UPDATEquery('cache_pagesection', 'page_id=' . intval($GLOBALS['TSFE']->id) . ' AND mpvar_hash=' . $mpvar_hash, $dbFields);
$dbFields['page_id'] = intval($GLOBALS['TSFE']->id);
$dbFields['mpvar_hash'] = $mpvar_hash;
@$GLOBALS['TYPO3_DB']->exec_INSERTquery('cache_pagesection', $dbFields);
if ($GLOBALS['TYPO3_DB']->sql_affected_rows() == 0) {
$dbFields['page_id'] = intval($GLOBALS['TSFE']->id);
$dbFields['mpvar_hash'] = $mpvar_hash;
$GLOBALS['TYPO3_DB']->exec_INSERTquery('cache_pagesection', $dbFields);
unset($dbFields['page_id']);
unset($dbFields['mpvar_hash']);
$GLOBALS['TYPO3_DB']->exec_UPDATEquery('cache_pagesection', 'page_id=' . intval($GLOBALS['TSFE']->id) . ' AND mpvar_hash=' . $mpvar_hash, $dbFields);
}
}
// If everything OK.
(2-2/3)