<dt>{lang}wcf.acp.package.version{/lang}</dt>
<dd>{$package->packageVersion}</dd>
</dl>
- {if $package->instanceNo > 1}
- <dl>
- <dt>{lang}wcf.acp.package.instanceNo{/lang}</dt>
- <dd>{#$package->instanceNo}</dd>
- </dl>
- {elseif $package->package == 'com.woltlab.wcf' && WCF_N != 1}
- <dl>
- <dt>{lang}wcf.acp.package.instanceNo{/lang}</dt>
- <dd>{#WCF_N}</dd>
- </dl>
- {/if}
<dl>
<dt>{lang}wcf.acp.package.packageDate{/lang}</dt>
<dd>{@$package->packageDate|date}</dd>
<h1>
<label>
<input type="checkbox" name="updates[{@$availableUpdate.packageID}]" onclick="enableFormElements(document.getElementById('version-{@$availableUpdate.packageID}Div'), this.checked)" value="{$availableUpdate.version.packageVersion}" />
- {$availableUpdate.packageName}{if $availableUpdate.instanceNo > 1} (#{#$availableUpdate.instanceNo}){/if}
+ {$availableUpdate.packageName}
</label>
</h1>
</hgroup>
$this->cacheData['version'] = phpversion('apc');
// get package dirs
- $sql = "SELECT packageDir, packageName, instanceNo
+ $sql = "SELECT packageDir, packageName
FROM wcf".WCF_N."_package
WHERE isApplication = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$packageNames = array();
while ($row = $statement->fetchArray()) {
$packagePath = FileUtil::getRealPath(WCF_DIR.$row['packageDir']).'cache/';
- $packageNames[$packagePath] = $row['packageName'].' #'.$row['instanceNo'];
+ $packageNames[$packagePath] = $row['packageName'];
}
$apcinfo = apc_cache_info('user');
/**
* @see wcf\page\SortablePage::$validSortFields
*/
- public $validSortFields = array('packageID', 'package', 'packageDir', 'packageName', 'instanceNo', 'packageDescription', 'packageDate', 'packageURL', 'isUnique', 'isApplication', 'author', 'authorURL', 'installDate', 'updateDate');
+ public $validSortFields = array('packageID', 'package', 'packageDir', 'packageName', 'packageDescription', 'packageDate', 'packageURL', 'isUnique', 'isApplication', 'author', 'authorURL', 'installDate', 'updateDate');
/**
* @see wcf\page\MultipleLinkPage::$objectListClassName
$file->write("// ".$package->package." (packageID ".$package->packageID.")\n");
$file->write("if (!defined('".$prefix."_DIR')) define('".$prefix."_DIR', dirname(__FILE__).'/');\n");
$file->write("if (!defined('RELATIVE_".$prefix."_DIR')) define('RELATIVE_".$prefix."_DIR', '');\n");
- $file->write("if (!defined('".$prefix."_N')) define('".$prefix."_N', '".WCF_N."_".$package->instanceNo."');\n");
+ $file->write("\n");
+ $file->write("\n// using ".$prefix."_N is deprecated, please use WCF_N instead!");
+ $file->write("if (!defined('".$prefix."_N')) define('".$prefix."_N', '".WCF_N."');\n");
$file->write("\n");
// write general information
$this->node = $this->getToken();
// calculate the number of instances of this package
- $instanceNo = 1;
- $sql = "SELECT COUNT(*) AS count, MAX(instanceNo) AS instanceNo
- FROM wcf".WCF_N."_package
- WHERE package = ?";
- $statement = WCF::getDB()->prepareStatement($sql);
- $statement->execute(array(
- $this->installation->getArchive()->getPackageInfo('name')
- ));
- $row = $statement->fetchArray();
-
- if ($row['count'] > 0) $instanceNo = $row['instanceNo'] + 1;
-
$sql = "INSERT INTO wcf".WCF_N."_package_installation_node
(queueID, processNo, sequenceNo, node, parentNode, nodeType, nodeData)
VALUES (?, ?, ?, ?, ?, ?, ?)";
serialize(array(
'package' => $this->installation->getArchive()->getPackageInfo('name'),
'packageName' => $this->installation->getArchive()->getLocalizedPackageInfo('packageName'),
- 'instanceNo' => $instanceNo,
'packageDescription' => $this->installation->getArchive()->getLocalizedPackageInfo('packageDescription'),
'packageVersion' => $this->installation->getArchive()->getPackageInfo('version'),
'packageDate' => $this->installation->getArchive()->getPackageInfo('date'),
// get existing packages and their versions
$existingPackages = array();
- $sql = "SELECT packageID, package, instanceNo, packageDescription,
+ $sql = "SELECT packageID, package, packageDescription,
packageVersion, packageDate, author, authorURL, isApplication
FROM wcf".WCF_N."_package";
$statement = WCF::getDB()->prepareStatement($sql);
if ($package->isApplication == 1) {
// package is application
$packageAbbr = Package::getAbbreviation($package->package);
- $tablePrefix = WCF_N.'_'.$package->instanceNo.'_';
+ $tablePrefix = WCF_N;
// Replace the variable xyz1_1 with $tablePrefix in the table names.
$queries = StringUtil::replace($packageAbbr.'1_1_', $packageAbbr.$tablePrefix, $queries);
package VARCHAR(255) NOT NULL DEFAULT '',
packageDir VARCHAR(255) NOT NULL DEFAULT '',
packageName VARCHAR(255) NOT NULL DEFAULT '',
- instanceNo INT(10) NOT NULL DEFAULT 1,
packageDescription VARCHAR(255) NOT NULL DEFAULT '',
packageVersion VARCHAR(255) NOT NULL DEFAULT '',
packageDate INT(10) NOT NULL DEFAULT 0,