Improved debug log
authorAlexander Ebert <ebert@woltlab.com>
Sun, 26 May 2013 20:20:46 +0000 (22:20 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 26 May 2013 20:20:46 +0000 (22:20 +0200)
wcfsetup/install/files/lib/system/package/plugin/PageMenuPackageInstallationPlugin.class.php

index c94c29de3dae6cf2416dfb00d129c82e3da67b35..71a3c8976ca0cd35fa6c34242759cd158f9b7ca3 100644 (file)
@@ -86,9 +86,8 @@ class PageMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationP
         */
        protected function getMenuItemPosition(array $data) {
                file_put_contents(WCF_DIR.'__pageMenu.log', "Resolving menu position for '" . $data['menuItem'] . "' (" . $data['menuPosition'] . ") ...\n", FILE_APPEND);
-               file_put_contents(WCF_DIR.'__pageMenu.log', "  showOrder = ".($data['showOrder'] === null) ? 'null' : $data['showOrder'] . "\n", FILE_APPEND);
+               file_put_contents(WCF_DIR.'__pageMenu.log', "  showOrder = ".($data['showOrder'] === null ? 'null' : $data['showOrder']) . "\n", FILE_APPEND);
                file_put_contents(WCF_DIR.'__pageMenu.log', "  parentMenuItem = ". $data['parentMenuItem'] . "\n", FILE_APPEND);
-               file_put_contents(WCF_DIR.'__pageMenu.log', "  menu = ". $data['parentMenuItem'] . "\n", FILE_APPEND);
                
                if ($data['showOrder'] === null) {
                        // get greatest showOrder value
@@ -106,6 +105,7 @@ class PageMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationP
                        $showOrder = (!$maxShowOrder) ? 1 : ($maxShowOrder['showOrder'] + 1);
                }
                else {
+                       file_put_contents(WCF_DIR.'__pageMenu.log', "\tINCREASING SHOW ORDER\n", FILE_APPEND);
                        // increase all showOrder values which are >= $showOrder
                        $sql = "UPDATE  wcf".WCF_N."_".$this->tableName."
                                SET     showOrder = showOrder + 1