aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Johnston <michaelgeorgejohnston@gmail.com>2013-09-14 18:16:54 -0400
committerMichael Johnston <michaelgeorgejohnston@gmail.com>2013-09-14 18:16:54 -0400
commitec7b462b1876eb47e38d545bcbcbd05097c31cd5 (patch)
tree3d90c26c1e8da5fde62327e51a1e71e3e2c9989d
parent0c4857e1a9f0fbfece2ac90ea90d6670a0d4ba41 (diff)
downloadvolse-hubzilla-ec7b462b1876eb47e38d545bcbcbd05097c31cd5.tar.gz
volse-hubzilla-ec7b462b1876eb47e38d545bcbcbd05097c31cd5.tar.bz2
volse-hubzilla-ec7b462b1876eb47e38d545bcbcbd05097c31cd5.zip
set menu_channel_id before we use it in a query
-rw-r--r--include/menu.php5
1 files changed, 2 insertions, 3 deletions
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)