Improved logging
authorAlexander Ebert <ebert@woltlab.com>
Tue, 28 May 2013 18:13:12 +0000 (20:13 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 28 May 2013 18:13:12 +0000 (20:13 +0200)
wcfsetup/install/files/lib/system/package/plugin/PageMenuPackageInstallationPlugin.class.php

index 109ba64a83a5cbf53c6babbc9b83cf18be866fca..ac965589155003ce56c13cbf577c7a6464288811 100644 (file)
@@ -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;
        }
 }