namespace wcf\system;
use wcf\data\language\LanguageEditor;
use wcf\data\language\SetupLanguage;
+use wcf\data\package\installation\queue\PackageInstallationQueueEditor;
use wcf\data\user\User;
use wcf\data\user\UserAction;
use wcf\system\cache\CacheHandler;
$statement->execute();
$result = $statement->fetchArray();
$processNo = intval($result['processNo']) + 1;
- $statementParameters = array();
// search existing wcf package
$sql = "SELECT COUNT(*) AS count
}
// register essential wcf package
- $statementParameters[] = array(
+ $queue = PackageInstallationQueueEditor::create(array(
'package' => 'com.woltlab.wcf',
'packageName' => 'WoltLab Community Framework',
'archive' => TMP_DIR.'install/packages/'.$wcfPackageFile
- );
+ ));
}
// register all other delivered packages
continue;
}
- $statementParameters[] = array(
+ $queue = PackageInstallationQueueEditor::create(array(
+ 'parentQueueID' => $queue->queueID,
'package' => $packageName,
'packageName' => $archive->getPackageInfo('packageName'),
'archive' => TMP_DIR.'install/packages/'.$packageFile
- );
- }
-
- if (!empty($statementParameters)) {
- $sql = "INSERT INTO wcf".WCF_N."_package_installation_queue
- (processNo, userID, package, packageName, archive)
- VALUES (?, ?, ?, ?, ?)";
- $statement = self::getDB()->prepareStatement($sql);
-
- foreach ($statementParameters as $parameter) {
- $statement->execute(array(
- $processNo,
- $admin->userID,
- $parameter['package'],
- $parameter['packageName'],
- $parameter['archive']
- ));
- }
+ ));
}
// login as admin