Skip to content

Commit

Permalink
fix(Menu) incorrect variable broke menu branch delete. fixes #355
Browse files Browse the repository at this point in the history
  • Loading branch information
joebordes committed Jan 23, 2017
1 parent ef09f13 commit b2d7522
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions modules/evvtMenu/Save.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@

function delMenuBranch($topofbranch) {
global $adb;
$mnurs = $adb->query('select evvtmenuid,mtype from vtiger_evvtmenu where mparent='.$topbranch);
if ($mnurs and $adb->num_rows($mnurs)>0)
while ($mnu = $adb->fetch_array($mnurs)) {
if ($mnu['mtype']=='menu') {
delMenuBranch($mnu['evvtmenuid']);
$mnurs = $adb->pquery('select evvtmenuid,mtype from vtiger_evvtmenu where mparent=?',array($topofbranch));
if ($mnurs and $adb->num_rows($mnurs)>0) {
while ($mnu = $adb->fetch_array($mnurs)) {
if ($mnu['mtype']=='menu') {
delMenuBranch($mnu['evvtmenuid']);
}
$adb->pquery('delete from vtiger_evvtmenu where evvtmenuid=?',array($mnu['evvtmenuid']));
}
$adb->pquery('delete from vtiger_evvtmenu where evvtmenuid=?',array($mnu['evvtmenuid']));
}
$adb->pquery('delete from vtiger_evvtmenu where evvtmenuid=?',array($topofbranch));
}
Expand Down

0 comments on commit b2d7522

Please sign in to comment.