23 lines
512 B
PHP
23 lines
512 B
PHP
|
|
<?
|
||
|
|
|
||
|
|
namespace controller\shop\category;
|
||
|
|
|
||
|
|
use shop\Category;
|
||
|
|
use shop\core\structure\shopControllerTable;
|
||
|
|
|
||
|
|
class Api extends shopControllerTable {
|
||
|
|
|
||
|
|
static $class = 'shop\Category';
|
||
|
|
|
||
|
|
public function updatePosForID($id=null,$pos=null,$where = null){
|
||
|
|
if(IF_AUTH) {
|
||
|
|
$C = Category::getByID($_POST['id']);
|
||
|
|
$where = \Where::_operator(Category::$PARENT, '=', $C[Category::$PARENT]);
|
||
|
|
parent::updatePosForID($_POST['id'], $_POST['pos'], $where);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|