mirror of
https://github.com/UndefinedOffset/SortableGridField.git
synced 2024-10-22 17:05:38 +02:00
Merge pull request #30 from halkyon/undefined_var_fix
Fixing undefined variable $dataList
This commit is contained in:
commit
a8950160c8
@ -20,6 +20,8 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
|
|||||||
* @return Array Map where the keys are fragment names and the values are pieces of HTML to add to these fragments.
|
* @return Array Map where the keys are fragment names and the values are pieces of HTML to add to these fragments.
|
||||||
*/
|
*/
|
||||||
public function getHTMLFragments($gridField) {
|
public function getHTMLFragments($gridField) {
|
||||||
|
$dataList = $gridField->getList();
|
||||||
|
|
||||||
if(class_exists('UnsavedRelationList') && $dataList instanceof UnsavedRelationList) {
|
if(class_exists('UnsavedRelationList') && $dataList instanceof UnsavedRelationList) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
@ -246,6 +248,8 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
|
|||||||
* @param Array $data Data submitted in the request
|
* @param Array $data Data submitted in the request
|
||||||
*/
|
*/
|
||||||
protected function saveGridRowSort(GridField $gridField, $data) {
|
protected function saveGridRowSort(GridField $gridField, $data) {
|
||||||
|
$dataList = $gridField->getList();
|
||||||
|
|
||||||
if(class_exists('UnsavedRelationList') && $dataList instanceof UnsavedRelationList) {
|
if(class_exists('UnsavedRelationList') && $dataList instanceof UnsavedRelationList) {
|
||||||
user_error('Cannot sort an UnsavedRelationList', E_USER_ERROR);
|
user_error('Cannot sort an UnsavedRelationList', E_USER_ERROR);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user