Fetching application through fetchObject()
authorAlexander Ebert <ebert@woltlab.com>
Wed, 17 Oct 2012 16:50:15 +0000 (18:50 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 17 Oct 2012 16:50:15 +0000 (18:50 +0200)
Thanks @Gravatronics

wcfsetup/install/files/lib/acp/action/InstallPackageAction.class.php
wcfsetup/install/files/lib/acp/action/UninstallPackageAction.class.php

index 314251b25bfe2f78f7c3131daf5619b9a6104ab2..3782fbbb34b2e09011514cacaa5ddfd562127725 100755 (executable)
@@ -1,7 +1,6 @@
 <?php
 namespace wcf\acp\action;
 use wcf\action\AbstractDialogAction;
-use wcf\data\application\Application;
 use wcf\data\package\installation\queue\PackageInstallationQueue;
 use wcf\system\cache\CacheHandler;
 use wcf\system\exception\IllegalLinkException;
@@ -117,7 +116,7 @@ class InstallPackageAction extends AbstractDialogAction {
                                        WHERE   packageID = ?";
                                $statement = WCF::getDB()->prepareStatement($sql);
                                $statement->execute(array($packageID));
-                               $application = new Application(null, $statement->fetchArray());
+                               $application = $statement->fetchObject('wcf\data\application\Application');
                                
                                // build redirect location
                                $location = $application->getPageURL() . 'acp/index.php/PackageList/' . SID_ARG_1ST;
index 266482f96f1b6185c67d5163435a2bde3edfd552..a2fe3e9b47e99a6c0b90caef5fd1172e5c85e766 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 namespace wcf\acp\action;
 use wcf\action\AbstractDialogAction;
-use wcf\data\application\Application;
 use wcf\data\package\installation\queue\PackageInstallationQueue;
 use wcf\data\package\installation\queue\PackageInstallationQueueEditor;
 use wcf\data\package\Package;
@@ -135,7 +134,7 @@ class UninstallPackageAction extends InstallPackageAction {
                                WHERE   packageID = ?";
                        $statement = WCF::getDB()->prepareStatement($sql);
                        $statement->execute(array($packageID));
-                       $application = new Application(null, $statement->fetchArray());
+                       $application = $statement->fetchObject('wcf\data\application\Application');
                        
                        // build redirect location
                        $location = $application->getPageURL() . 'acp/index.php/PackageList/' . SID_ARG_1ST;