Bug #21261 » 12220_v2.diff
t3lib/class.t3lib_loaddbgroup.php (working copy) | ||
---|---|---|
$sorting_field = 'sorting_foreign';
|
||
if ($this->MM_isMultiTableRelationship) {
|
||
$additionalWhere .= ' AND ( tablenames="'.$this->currentTable.'"';
|
||
$additionalWhere .= ' AND ( tablenames=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->currentTable, $tableName);
|
||
if ($this->currentTable == $this->MM_isMultiTableRelationship) { // be backwards compatible! When allowing more than one table after having previously allowed only one table, this case applies.
|
||
$additionalWhere .= ' OR tablenames=""';
|
||
$additionalWhere .= ' OR tablenames=\'\'';
|
||
}
|
||
$additionalWhere .= ' ) ';
|
||
}
|
||
... | ... | |
$additionalWhere_tablenames = '';
|
||
if ($this->MM_is_foreign && $prep) {
|
||
$additionalWhere_tablenames = ' AND tablenames="'.$this->currentTable.'"';
|
||
$additionalWhere_tablenames = ' AND tablenames=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->currentTable, $MM_tableName);
|
||
}
|
||
$additionalWhere = '';
|
||
... | ... | |
$whereClause = $uidLocal_field.'='.$uid.' AND '.$uidForeign_field.'='.$val['id'].
|
||
($this->MM_hasUidField ? ' AND uid='.intval($oldMMs_inclUid[$oldMMs_index][2]) : ''); // In principle, selecting on the UID is all we need to do if a uid field is available since that is unique! But as long as it "doesn't hurt" we just add it to the where clause. It should all match up.
|
||
if ($tablename) {
|
||
$whereClause .= ' AND tablenames="'.$tablename.'"';
|
||
$whereClause .= ' AND tablenames=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($tablename, $MM_tableName);
|
||
}
|
||
$GLOBALS['TYPO3_DB']->exec_UPDATEquery($MM_tableName, $whereClause.$additionalWhere, array($sorting_field => $c));
|
||
... | ... | |
$elDelete = $oldMMs_inclUid[$oldMM_key];
|
||
} else {
|
||
if(is_array($mmItem)) {
|
||
$removeClauses[] = 'tablenames="'.$mmItem[0].'" AND '.$uidForeign_field.'='.$mmItem[1];
|
||
$removeClauses[] = 'tablenames=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($mmItem[0], $MM_tableName) . ' AND ' . $uidForeign_field . '=' . $mmItem[1];
|
||
} else {
|
||
$removeClauses[] = $uidForeign_field.'='.$mmItem;
|
||
}
|
||
... | ... | |
$additionalWhere_tablenames = '';
|
||
if ($this->MM_is_foreign && $prep) {
|
||
$additionalWhere_tablenames = ' AND tablenames="'.$this->currentTable.'"';
|
||
$additionalWhere_tablenames = ' AND tablenames=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->currentTable, $MM_tableName);
|
||
}
|
||
$additionalWhere = '';
|
- « Previous
- 1
- 2
- Next »