mirror of
https://github.com/UndefinedOffset/SortableGridField.git
synced 2024-10-22 15:05:38 +00:00
Fixed query error causing crash on postgres (fixes #87)
This commit is contained in:
parent
d37fdd2ea9
commit
2f5cee4e36
@ -15,11 +15,6 @@ env:
|
||||
- DB=SQLITE3 CORE_RELEASE=3.1
|
||||
- DB=SQLITE3 CORE_RELEASE=3.2
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- env: DB=PGSQL CORE_RELEASE=3.1
|
||||
- env: DB=PGSQL CORE_RELEASE=3.2
|
||||
|
||||
before_script:
|
||||
- phpenv rehash
|
||||
- git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
|
||||
|
@ -287,7 +287,7 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
|
||||
if($this->update_versioned_stage && class_exists($table) && Object::has_extension($table, 'Versioned')) {
|
||||
DB::query('UPDATE "' . $table . '_' . $this->update_versioned_stage
|
||||
. '" SET "' . $sortColumn . '" = "' . $sortColumn .'"+1'
|
||||
. ' WHERE "ID" = '. ($list instanceof RelationList ? '"' . $list->foreignKey . '" = '. $owner->ID:$idCondition) . (!empty($topIncremented) ? ' AND "ID" NOT IN(\''.implode('\',\'', $topIncremented).'\')':''));
|
||||
. ' WHERE '. ($list instanceof RelationList ? '"' . $list->foreignKey . '" = '. $owner->ID:$idCondition) . (!empty($topIncremented) ? ' AND "ID" NOT IN(\''.implode('\',\'', $topIncremented).'\')':''));
|
||||
|
||||
if(Object::has_extension($baseDataClass, 'Versioned')) {
|
||||
DB::query('UPDATE "' . $baseDataClass . '_' . $this->update_versioned_stage
|
||||
|
Loading…
x
Reference in New Issue
Block a user