From dc460f15c7f124cb9035f9ba130db74aff5dedf8 Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Thu, 26 Apr 2012 10:14:43 +0000 Subject: [PATCH] More 1.x -> 2.0 upgrade fixes. --- e107_admin/update_routines.php | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php index 04361da45..e606df12c 100644 --- a/e107_admin/update_routines.php +++ b/e107_admin/update_routines.php @@ -518,7 +518,7 @@ function update_706_to_800($type='') //delete record for online_extended_menu (now only using one online menu) if($sql->db_Select('menus', '*', "menu_path='online_extended_menu' || menu_path='online_extended_menu/'")) { - if ($just_check) return update_needed(); + if ($just_check) return update_needed("The Menu table needs to have some paths corrected in its data."); $row=$sql->db_Fetch(); @@ -547,6 +547,33 @@ function update_706_to_800($type='') catch_error($sql); } + if (!$just_check) + { + // Alert Admin to delete deprecated menu folders. + $chgPath = array(); + foreach($changeMenuPaths as $cgpArray) + { + if(is_dir(e_PLUGIN.$cgpArray['oldpath'])) + { + $chgPath[] = $cgpArray['oldpath']; + } + } + //TODO LAN + + if(count($chgPath)) + { + e107::getMessage()->addWarning('Before continuing, please manually delete the following outdated folders from your system: '); + array_unique($chgPath); + asort($chgPath); + foreach($chgPath as $cgp) + { + e107::getMessage()->addWarning(e_PLUGIN_ABS."".$cgp.""); + } + } + + } + + //--------------------------------------------------------- // Comments - split user field