summaryrefslogtreecommitdiff
path: root/Nexus.php
diff options
context:
space:
mode:
Diffstat (limited to 'Nexus.php')
-rw-r--r--Nexus.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/Nexus.php b/Nexus.php
index ff283be..843b857 100644
--- a/Nexus.php
+++ b/Nexus.php
@@ -236,6 +236,7 @@ class Nexus extends NexusSystem {
function storeMenu( &$pParamHash ) {
$ret = FALSE;
if( $this->verifyMenu( $pParamHash ) ) {
+ $this->mDb->StartTrans();
if( !@BitBase::verifyId( $pParamHash['menu_id'] ) ) {
$query = "INSERT INTO `".BIT_DB_PREFIX."nexus_menus`( `title`,`description`,`menu_type`,`plugin_guid`,`editable` ) VALUES(?,?,?,?,?)";
$result = $this->mDb->query( $query, array( $pParamHash['title'], $pParamHash['description'], $pParamHash['menu_type'], $pParamHash['plugin_guid'], $pParamHash['editable'] ) );
@@ -246,6 +247,7 @@ class Nexus extends NexusSystem {
$result = $this->mDb->query( $query, array( $pParamHash['title'], $pParamHash['description'], $pParamHash['menu_type'], $pParamHash['plugin_guid'], $pParamHash['editable'], $pParamHash['menu_id'] ) );
$ret = $pParamHash['menu_id'];
}
+ $this->mDb->CompleteTrans();
$this->writeMenuCache( $ret );
} else {
error_log( "Error storing menu: " . vc($this->mErrors) );
@@ -295,7 +297,7 @@ class Nexus extends NexusSystem {
$bindVars = array( $pMenuId );
}
$query .= ' ORDER BY nmi.`pos`';
- $result = $this->mDb->query( $query, array( $bindVars ) );
+ $result = $this->mDb->query( $query, $bindVars );
while( !$result->EOF ) {
$item = $result->fields;
$item['display_url'] = $this->printUrl( $item );