</xs:element>
<xs:element name="packageurl" type="xs:anyURI" minOccurs="0" maxOccurs="1" />
<xs:element name="isapplication" type="woltlab_boolean" minOccurs="0" maxOccurs="1" />
- <xs:element name="isunique" type="woltlab_boolean" minOccurs="0" maxOccurs="1" />
<xs:element name="version" type="woltlab_varchar" minOccurs="1" maxOccurs="1" />
<xs:element name="date" type="xs:date" minOccurs="1" maxOccurs="1" />
<xs:element name="plugin" type="woltlab_varchar" minOccurs="0" maxOccurs="1" />
<packagedescription>Free web-framework, designed and developed for complex community applications.</packagedescription>
<packagedescription language="de">Freies Web-Framework, das für komplexe Community-Anwendungen entworfen und entwickelt wurde.</packagedescription>
<isapplication>1</isapplication>
- <isunique>1</isunique>
<version>2.0.0 Alpha 1</version> <!-- codename: maelstrom -->
<date>2011-05-19</date>
</packageinformation>
var packageVersion = select.options[select.selectedIndex].value;
// set value
- {if !$package[isUnique]}document.getElementById('updates-{$package[package]}').value = packageVersion;{/if}
+ document.getElementById('updates-{$package[package]}').value = packageVersion;
{foreach from=$package[updatableInstances] item=updatableInstance}
document.getElementById('updates-{$updatableInstance[packageID]}').value = packageVersion;
{/foreach}
<legend>{lang}wcf.acp.packageUpdate.options{/lang}</legend>
<dl>
- {* new installation *}
- {if $package[isUnique] && !$package[updatableInstances]|count}
- <dt></dt>
- <dd>{lang}wcf.acp.packageUpdate.options.alreadyInstalledUnique{/lang}</dd>
- {/if}
- {if !$package[isUnique]}
- <dt></dt>
- <dd><label><input type="checkbox" id="updates-{$package[package]}" name="updates[{$package[package]}]" value="{$package[packageVersion]}" {if $selectedPackages[$package[packageID]]|isset}checked="checked" {/if}/> {if $package[instances]}{lang}wcf.acp.packageUpdate.options.installAlreadyInstalled{/lang}{else}{lang}wcf.acp.packageUpdate.options.install{/lang}{/if}</label></dd>
- {/if}
+ <dt></dt>
+ <dd><label><input type="checkbox" id="updates-{$package[package]}" name="updates[{$package[package]}]" value="{$package[packageVersion]}" {if $selectedPackages[$package[packageID]]|isset}checked="checked" {/if}/> {if $package[instances]}{lang}wcf.acp.packageUpdate.options.installAlreadyInstalled{/lang}{else}{lang}wcf.acp.packageUpdate.options.install{/lang}{/if}</label></dd>
{* update *}
{foreach from=$package[updatableInstances] item=updatableInstance}
*/
public $other = 0;
- /**
- * indicates if unique packages are ignored that are already installed
- * @var integer
- */
- public $ignoreUniques = 1;
-
/**
* list of available update servers
* @var array<wcf\data\package\update\server\PackageUpdateServer>
public function readFormParameters() {
parent::readFormParameters();
- $this->ignoreUniques = $this->plugin = $this->isApplication = 0;
+ $this->plugin = $this->isApplication = 0;
if (isset($_POST['packageUpdateServerIDs']) && is_array($_POST['packageUpdateServerIDs'])) $this->packageUpdateServerIDs = ArrayUtil::toIntegerArray($_POST['packageUpdateServerIDs']);
if (isset($_POST['packageName'])) $this->packageName = StringUtil::trim($_POST['packageName']);
if (isset($_POST['author'])) $this->author = StringUtil::trim($_POST['author']);
if (isset($_POST['plugin'])) $this->plugin = intval($_POST['plugin']);
if (isset($_POST['isApplication'])) $this->isApplication = intval($_POST['isApplication']);
if (isset($_POST['other'])) $this->other = intval($_POST['other']);
- if (isset($_POST['ignoreUniques'])) $this->ignoreUniques = intval($_POST['ignoreUniques']);
}
/**
// author
if (!empty($this->author)) $conditions->add("author LIKE ?", array($this->author));
- // ignore already installed uniques
- if ($this->ignoreUniques == 1) $conditions->add("package NOT IN (SELECT package FROM wcf".WCF_N."_package WHERE isUnique = 1)");
-
// package type
if (($this->plugin == 0 || $this->isApplication == 0 || $this->other == 0) && ($this->plugin == 1 || $this->isApplication == 1 || $this->other == 1)) {
if ($this->isApplication == 1) {
'isApplication' => $this->isApplication,
'plugin' => $this->plugin,
'other' => $this->other,
- 'packageUpdateServerIDs' => $this->packageUpdateServerIDs,
- 'ignoreUniques' => $this->ignoreUniques
+ 'packageUpdateServerIDs' => $this->packageUpdateServerIDs
));
}
/**
* @see wcf\page\SortablePage::$validSortFields
*/
- public $validSortFields = array('packageID', 'package', 'packageDir', 'packageName', 'packageDescription', 'packageDate', 'packageURL', 'isUnique', 'isApplication', 'author', 'authorURL', 'installDate', 'updateDate');
+ public $validSortFields = array('packageID', 'package', 'packageDir', 'packageName', 'packageDescription', 'packageDate', 'packageURL', 'isApplication', 'author', 'authorURL', 'installDate', 'updateDate');
/**
* @see wcf\page\MultipleLinkPage::$objectListClassName
$statement->execute($conditions->getParameters());
while ($row = $statement->fetchArray()) {
// default values
- $row['isUnique'] = 0;
$row['updatableInstances'] = array();
$row['packageVersions'] = array();
$row['packageVersion'] = '1.0.0';
$row['packageVersion'] = end($row['packageVersions']);
}
- // TODO: Multiple instances are no longer supported, remove this
- // get installed instances
- $sql = "SELECT package.*
- FROM wcf".WCF_N."_package package
- WHERE package.package = ?";
- $statement2 = WCF::getDB()->prepareStatement($sql);
- $statement2->execute(array($row['package']));
- while ($row2 = $statement2->fetchArray()) {
- $row['instances']++;
-
- // is already installed unique?
- if ($row2['isUnique'] == 1) $row['isUnique'] = 1;
-
- // check update support
- if (Package::compareVersion($row2['packageVersion'], $row['packageVersion'], '<')) {
- $row['updatableInstances'][] = $row2;
- }
- }
-
$this->packages[] = $row;
}
}