function nodemoved() { global $apx; if (!checkToken()) { return; } if (!$apx->user->has_right('teaser.edit')) { return; } $id = (int) $_REQUEST['id']; $beforeid = (int) $_REQUEST['before']; $afterid = (int) $_REQUEST['after']; if (!$id || !$beforeid && !$afterid) { return; } require_once BASEDIR . 'lib/class.orderedlist.php'; $list = new OrderedList(PRE . '_teaser', 'id'); //Vor einen Knoten verschieben if ($beforeid) { $list->moveBefore($id, $beforeid); } elseif ($afterid) { $list->moveAfter($id, $afterid); } }
function listmoved() { global $apx, $set; if (!checkToken()) { return; } if (!$apx->user->has_right('gallery.edit') || $set['gallery']['subgals'] || $set['gallery']['ordergal'] != 3) { return; } $id = (int) $_REQUEST['id']; $beforeid = (int) $_REQUEST['before']; $afterid = (int) $_REQUEST['after']; if (!$id || !$beforeid && !$afterid) { return; } require_once BASEDIR . 'lib/class.orderedlist.php'; $list = new OrderedList(PRE . '_gallery', 'id'); //Vor einen Knoten verschieben if ($beforeid) { $list->moveBefore($id, $beforeid); } elseif ($afterid) { $list->moveAfter($id, $afterid); } }