From ec7b462b1876eb47e38d545bcbcbd05097c31cd5 Mon Sep 17 00:00:00 2001 From: Michael Johnston Date: Sat, 14 Sep 2013 18:16:54 -0400 Subject: set menu_channel_id before we use it in a query --- include/menu.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/menu.php b/include/menu.php index 0e98f3a84..900b48e65 100644 --- a/include/menu.php +++ b/include/menu.php @@ -118,6 +118,8 @@ function menu_edit($arr) { return false; + $menu_channel_id = intval($arr['menu_channel_id']); + $r = q("select menu_id from menu where menu_name = '%s' and menu_channel_id = %d limit 1", dbesc($menu_name), intval($menu_channel_id) @@ -128,9 +130,6 @@ function menu_edit($arr) { } - - $menu_channel_id = intval($arr['menu_channel_id']); - $r = q("select * from menu where menu_id = %d and menu_channel_id = %d limit 1", intval($menu_id), intval($menu_channel_id) -- cgit v1.2.3