From 39b9861e7e517a7e990377ef979bffb27a3ec602 Mon Sep 17 00:00:00 2001 From: lsces Date: Mon, 1 Oct 2012 10:17:38 +0100 Subject: Detail query needed modifying for $bindVars as well --- Nexus.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nexus.php b/Nexus.php index ff283be..9d4c041 100644 --- a/Nexus.php +++ b/Nexus.php @@ -295,7 +295,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 ); -- cgit v1.3 From 931d1bfacb3cf7b19d8fda100e67aeb8c13862e0 Mon Sep 17 00:00:00 2001 From: lsces Date: Mon, 1 Oct 2012 10:45:51 +0100 Subject: Thought that this would fix an open transaction on Firebird, but something else seems to have started a transaction when building nexus menues, so commit in CompleteTransaction is not actioned until page closes --- Nexus.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Nexus.php b/Nexus.php index 9d4c041..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) ); -- cgit v1.3 From 26c65cdc6941f6d5d347b65c38bc24d23ff04a66 Mon Sep 17 00:00:00 2001 From: lsces Date: Mon, 1 Oct 2012 10:47:25 +0100 Subject: Reload page to get around the open transaction problem. I will revert the loads when I track down the real problem, but this does at least allow nexus to work on Firebird. --- menu_items.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/menu_items.php b/menu_items.php index ffac5a1..c912490 100644 --- a/menu_items.php +++ b/menu_items.php @@ -16,7 +16,7 @@ include_once( NEXUS_PKG_PATH.'menu_lookup_inc.php' ); $gBitSystem->verifyPermission( 'p_nexus_create_menus' ); if( empty( $_REQUEST['menu_id'] ) ) { - header( 'Location:'.NEXUS_PKG_URL.'index.php' ); + bit_redirect( NEXUS_PKG_URL.'index.php' ); } // get content and pass it on @@ -37,7 +37,7 @@ if( isset( $_REQUEST['store_item'] ) ) { } else { $formfeedback['error'] = $gNexus->mErrors; } - $gNexus->load(); + bit_redirect( NEXUS_PKG_URL.'menu_items.php?menu_id='.$_REQUEST['menu_id'] ); } if( isset( $_REQUEST['remove_item'] ) && is_array( $_REQUEST['remove_item'] ) ) { @@ -52,8 +52,8 @@ if( isset( $_REQUEST['remove_item'] ) && is_array( $_REQUEST['remove_item'] ) ) $formfeedback['success'] = tra( 'The following items were successfully removed from the menu' ).': '; $gBitSmarty->assign( 'delList', $delList ); } - $gNexus->load(); $gNexus->writeMenuCache(); + bit_redirect( NEXUS_PKG_URL.'menu_items.php?menu_id='.$_REQUEST['menu_id'] ); } if( !empty( $_REQUEST['item_id'] ) ) { -- cgit v1.3