protected function changePosition() { if (!Validate::isInt(Tools::getValue('position')) || Tools::getValue('location') != OvicBlockCMSModel::LEFT_COLUMN && Tools::getValue('location') != OvicBlockCMSModel::RIGHT_COLUMN && Tools::getValue('location') != OvicBlockCMSModel::CMS_POS || Tools::getValue('way') != 0 && Tools::getValue('way') != 1) { Tools::displayError(); } $this->_html .= 'pos change!'; $position = (int) Tools::getValue('position'); $location = (int) Tools::getValue('location'); $id_cms_block = (int) Tools::getValue('id_cms_block'); if (Tools::getValue('way') == 0) { $new_position = $position + 1; } else { if (Tools::getValue('way') == 1) { $new_position = $position - 1; } } OvicBlockCMSModel::updateCMSBlockPositions($id_cms_block, $position, $new_position, $location); Tools::redirectAdmin('index.php?tab=AdminModules&configure=' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')); }