From 528e12200927a7d24f7603d9db93c810093b9edf Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 28 May 2013 20:13:12 +0200 Subject: [PATCH] Improved logging --- .../plugin/PageMenuPackageInstallationPlugin.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/package/plugin/PageMenuPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/PageMenuPackageInstallationPlugin.class.php index 109ba64a83..ac96558915 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/PageMenuPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/PageMenuPackageInstallationPlugin.class.php @@ -99,7 +99,8 @@ class PageMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationP $statement = WCF::getDB()->prepareStatement($sql); $statement->execute($conditions->getParameters()); $maxShowOrder = $statement->fetchArray(); - return (!$maxShowOrder) ? 1 : ($maxShowOrder['showOrder'] + 1); + //return (!$maxShowOrder) ? 1 : ($maxShowOrder['showOrder'] + 1); + $showOrder = (!$maxShowOrder) ? 1 : ($maxShowOrder['showOrder'] + 1); } else { file_put_contents(WCF_DIR.'__pageMenu.log', "\t!!! INCREASING SHOW ORDER !!!\n", FILE_APPEND); @@ -121,7 +122,8 @@ class PageMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationP $statement->execute($parameters); // return the wanted showOrder level - return $data['showOrder']; + //return $data['showOrder']; + $showOrder = $data['showOrder']; } $sql = "SELECT showOrder @@ -133,5 +135,7 @@ class PageMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationP if ($row) { file_put_contents(WCF_DIR.'__pageMenu.log', " show order of dashboard is now {$row['showOrder']}\n\n", FILE_APPEND); } + + return $showOrder; } } -- 2.20.1