Skip to content

Commit

Permalink
[BUGFIX] Issue #573: move record up to top position
Browse files Browse the repository at this point in the history
# Conflicts:
#	Classes/Service/ContentService.php
  • Loading branch information
galoppi authored and NamelessCoder committed Aug 8, 2015
1 parent 1ea4bab commit bd4b46e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Classes/Service/ContentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,10 @@ protected function initializeRecordByNewAndOldAndLanguageUids($row, $newUid, $ol
// look for the translated version of the parent record indicated
// in this new, translated record. Below, we adjust the parent UID
// so it has the UID of the translated parent if one exists.
if ($oldRecord['tx_flux_parent'] > 0) {
$translatedParents = (array) $this->workspacesAwareRecordService->get('tt_content', 'uid', "t3_origuid = '" . $oldRecord['tx_flux_parent'] . "'");
$translatedParent = reset($translatedParents);
} else {
$translatedParent = NULL;
}
$sortbyFieldName = TRUE === isset($GLOBALS['TCA']['tt_content']['ctrl']['sortby']) ? $GLOBALS['TCA']['tt_content']['ctrl']['sortby'] : 'sorting';
$translatedParents = (array) $this->workspacesAwareRecordService->get('tt_content', 'uid', "t3_origuid = '" . $oldRecord['tx_flux_parent'] . "'");
$translatedParent = reset($translatedParents);
$sortbyFieldName = TRUE === isset($GLOBALS['TCA']['tt_content']['ctrl']['sortby']) ?
$GLOBALS['TCA']['tt_content']['ctrl']['sortby'] : 'sorting';
$overrideValues = array(
$sortbyFieldName => $tceMain->resorting('tt_content', $row['pid'], $sortbyFieldName, $oldUid),
'tx_flux_parent' => NULL !== $translatedParent ? $translatedParent['uid'] : $oldRecord['tx_flux_parent']
Expand Down

0 comments on commit bd4b46e

Please sign in to comment.