* [story #68129, doing] support for seting catelog orders param as the same as sortDoc.
This commit is contained in:
@@ -1092,7 +1092,10 @@ class doc extends control
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
foreach($_POST['orders'] as $id => $order) $this->doc->updateOrder($id, (int)$order, $_POST['type']);
|
||||
$orders = $_POST['orders'];
|
||||
$type = isset($_POST['type']) ? $_POST['type'] : 'doc';
|
||||
if(is_string($orders)) $orders = json_decode($orders, true);
|
||||
foreach($orders as $id => $order) $this->doc->updateOrder($id, (int)$order, $type);
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->send(array('result' => 'success'));
|
||||
|
||||
Reference in New Issue
Block a user