summaryrefslogtreecommitdiffstats
path: root/application/models/BootMenuEntriesMapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/models/BootMenuEntriesMapper.php')
-rw-r--r--application/models/BootMenuEntriesMapper.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/application/models/BootMenuEntriesMapper.php b/application/models/BootMenuEntriesMapper.php
index a837dca..7a2da59 100644
--- a/application/models/BootMenuEntriesMapper.php
+++ b/application/models/BootMenuEntriesMapper.php
@@ -80,12 +80,20 @@ class Application_Model_BootMenuEntriesMapper
$stmt = $db->query("UPDATE pbs_bootmenuentries SET `order` = `order` - 1 WHERE `order` > ". $botmenuentries->getOrder() . " AND `bootmenuID` = " . $botmenuentries->getBootmenuID());
}
- public function orderedit(Application_Model_BootMenuEntries $botmenuentries, $oldval)
+ public function orderbefore(Application_Model_BootMenuEntries $botmenuentries, $oldval)
{
$db = Zend_Db_Table::getDefaultAdapter();
+ print_a($botmenuentries, $oldval);
$stmt = $db->query("UPDATE pbs_bootmenuentries SET `order` = `order` + 1 WHERE `order` >= ". $botmenuentries->getOrder() . " AND `order` < " . $oldval . " AND `bootmenuID` = " . $botmenuentries->getBootmenuID());
}
+ public function orderafter(Application_Model_BootMenuEntries $botmenuentries, $oldval)
+ {
+ $db = Zend_Db_Table::getDefaultAdapter();
+ print_a($botmenuentries, $oldval);
+ $stmt = $db->query("UPDATE pbs_bootmenuentries SET `order` = `order` - 1 WHERE `order` <= ". $botmenuentries->getOrder() . " AND `order` > " . $oldval . " AND `bootmenuID` = " . $botmenuentries->getBootmenuID());
+ }
+
public function delete(Application_Model_BootMenuEntries $botmenuentries)
{
if (null === ($id = $botmenuentries->getID()) ) {
@@ -105,6 +113,7 @@ class Application_Model_BootMenuEntriesMapper
$row = $result->current();
$botmenuentries->setID($row->bootmenuentriesID)->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setConfigID($row->configID)->setKcl($row->kcl)->setOrder($row->order);
+
}
public function fetchAll()