use wcf\system\database\statement\PreparedStatement;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\exception\SystemException;
-use wcf\system\form\container;
-use wcf\system\form\element;
+use wcf\system\form\container\GroupFormElementContainer;
+use wcf\system\form\container\MultipleSelectionFormElementContainer;
+use wcf\system\form\element\MultipleSelectionFormElement;
+use wcf\system\form\element\TextInputFormElement;
use wcf\system\form\FormDocument;
use wcf\system\form;
use wcf\system\language\LanguageFactory;
use wcf\system\request\LinkHandler;
use wcf\system\request\RouteHandler;
use wcf\system\style\StyleHandler;
+use wcf\system\version\VersionHandler;
use wcf\system\WCF;
use wcf\util\FileUtil;
use wcf\util\HeaderUtil;
protected function promptPackageDir() {
if (!PackageInstallationFormManager::findForm($this->queue, 'packageDir')) {
- $container = new container\GroupFormElementContainer();
- $packageDir = new element\TextInputFormElement($container);
+ $container = new GroupFormElementContainer();
+ $packageDir = new TextInputFormElement($container);
$packageDir->setName('packageDir');
$packageDir->setLabel(WCF::getLanguage()->get('wcf.acp.package.packageDir.input'));
*/
protected function promptOptionalPackages(array $packages) {
if (!PackageInstallationFormManager::findForm($this->queue, 'optionalPackages')) {
- $container = new container\MultipleSelectionFormElementContainer();
+ $container = new MultipleSelectionFormElementContainer();
$container->setName('optionalPackages');
foreach ($packages as $package) {
- $optionalPackage = new element\MultipleSelectionFormElement($container);
+ $optionalPackage = new MultipleSelectionFormElement($container);
$optionalPackage->setName('optionalPackages');
$optionalPackage->setLabel($package['packageName']);
$optionalPackage->setValue($package['package']);
break;
}
}
-
+
/*
* Restructure version tables.
*/
protected function restructureVersionTables() {
- $objectTypes = \wcf\system\version\VersionHandler::getInstance()->getObjectTypes();
+ $objectTypes = VersionHandler::getInstance()->getObjectTypes();
if (empty($objectTypes)) {
return;
$versionTableBaseColumns[] = array('name' => 'versionUserID', 'data' => array('type' => 'INT'));
$versionTableBaseColumns[] = array('name' => 'versionUsername', 'data' => array('type' => 'VARCHAR', 'length' => 255));
$versionTableBaseColumns[] = array('name' => 'versionTime', 'data' => array('type' => 'INT'));
-
- foreach ($objectTypes as $objectTypeID => $objectType) {
+
+ foreach ($objectTypes as $objectTypeID => $objectType) {
// get structure of base table
$baseTableColumns = WCF::getDB()->getEditor()->getColumns($objectType::getDatabaseTableName());
// get structure of version table
if (empty($versionTableColumns)) {
$columns = array_merge($versionTableBaseColumns, $baseTableColumns);
-
+
WCF::getDB()->getEditor()->createTable($objectType::getDatabaseVersionTableName(), $columns);
}
else {
}
}
}
- }
+ }
}