Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't reorder many many versioned classes #250

Merged
merged 1 commit into from
Mar 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/GridFieldOrderableRows.php
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,12 @@ protected function reorderItems($list, array $values, array $sortedIDs)

// If not a ManyManyList and using versioning, detect it.
$this->validateSortField($list);
$isVersioned = false;
$class = $list->dataClass();
$isVersioned = $class::has_extension(Versioned::class);

if (DataObject::getSchema()->tableName($class) == $this->getSortTable($list)) {
$isVersioned = $class::has_extension(Versioned::class);
}

// Loop through each item, and update the sort values which do not
// match to order the objects.
Expand Down