Project

General

Profile

Feature #23790 ยป transl8tool-hook.patch

Administrator Admin, 2010-10-19 16:50

View differences:

t3lib/class.t3lib_transl8tools.php (working copy)
if ($trTable!==$table || $row[$TCA[$table]['ctrl']['languageField']] <= 0) {
if ($trTable!==$table || $row[$TCA[$table]['ctrl']['transOrigPointerField']] == 0) {
$whereClause = $TCA[$trTable]['ctrl']['transOrigPointerField'] . '=' . intval($uid) .
' AND pid=' . intval($table === 'pages' ? $row['uid'] : $row['pid']). // Making exception for pages of course where the translations will always be ON the page, not on the level above...
' AND ' . $TCA[$trTable]['ctrl']['languageField'] . (!$sys_language_uid ? '>0' : '=' . intval($sys_language_uid)) .
t3lib_BEfunc::deleteClause($trTable) .
t3lib_BEfunc::versioningPlaceholderClause($trTable);
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_transl8tools.php']['translationInfo'])) {
foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_transl8tools.php']['translationInfo'] as $classRef) {
$hookObj = t3lib_div::getUserObj($classRef);
if (method_exists($hookObj, 'modifyWhereClause')) {
$hookObj->modifyWhereClause($table, $trTable, $uid, $sys_language_uid, $row, $selFieldList, $whereClause, $this);
}
}
}
// Look for translations of this record, index by language field value:
$translationsTemp = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
($selFieldList ? $selFieldList : 'uid,'.$TCA[$trTable]['ctrl']['languageField']),
$trTable,
$TCA[$trTable]['ctrl']['transOrigPointerField'] . '=' . intval($uid) .
' AND pid=' . intval($table === 'pages' ? $row['uid'] : $row['pid']). // Making exception for pages of course where the translations will always be ON the page, not on the level above...
' AND '.$TCA[$trTable]['ctrl']['languageField'].(!$sys_language_uid ? '>0' : '='.intval($sys_language_uid)).
t3lib_BEfunc::deleteClause($trTable).
t3lib_BEfunc::versioningPlaceholderClause($trTable)
$whereClause
);
$translations = array();
    (1-1/1)