</xs:complexType>
</xs:element>
<xs:element name="packageurl" type="xs:anyURI" minOccurs="0" maxOccurs="1" />
- <xs:element name="standalone" type="woltlab_boolean" 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 ref="packagedescription" />
<xs:choice minOccurs="0">
<xs:element ref="plugin" />
- <xs:element ref="standalone" />
+ <xs:element ref="isapplication" />
</xs:choice>
</xs:sequence>
</xs:complexType>
<!-- plugin element -->
<xs:element name="plugin" type="woltlab_varchar" />
- <!-- standalone element -->
- <xs:element name="standalone" type="woltlab_boolean" />
+ <!-- isapplication element -->
+ <xs:element name="isapplication" type="woltlab_boolean" />
<!-- author information element -->
<xs:element name="authorInformation">
<packageinformation>
<packagename>WoltLab Community Framework</packagename>
<packagedescription>Free web-framework, designed and developed for complex community applications.</packagedescription>
- <standalone>1</standalone>
+ <isapplication>1</isapplication>
<isunique>1</isunique>
<version>2.0.0 Alpha 1</version> <!-- codename: maelstrom -->
<date>2011-05-19</date>
/* ############## ACP Package List ############## */
-/* -- -- -- Package Standalone -- -- -- */
+/* -- -- -- Application Package -- -- -- */
/* Globals */
-.infoPackageStandalone {
+.infoPackageApplication {
position: relative;
}
-.infoPackageStandalone img.packageStandaloneIcon {
+.infoPackageApplication img.packageApplicationIcon {
position: absolute;
top: 30px;
left: 25px;
height: 96px;
}
-.infoPackageStandalone div {
+.infoPackageApplication div {
margin-bottom: -15px;
margin-left: 30px;
}
-.infoPackageStandalone footer {
+.infoPackageApplication footer {
position: relative;
right: -15px;
bottom: -15px;
/* -- -- -- Package Footers -- -- -- */
-.infoPackageStandalone footer nav,
+.infoPackageApplication footer nav,
.infoPackagePlugin footer nav {
text-align: right;
}
@media screen and (min-width: 480px), screen and (min-device-width: 480px) {
- .infoPackageStandalone footer nav,
+ .infoPackageApplication footer nav,
.infoPackagePlugin footer nav {
opacity: 0;
transition: opacity .1s linear;
}
- .infoPackageStandalone:hover footer nav,
+ .infoPackageApplication:hover footer nav,
.infoPackagePlugin:hover footer nav {
opacity: 1;
}
@media screen and (max-width: 480px), screen and (max-device-width: 480px) {
- .infoPackageStandalone footer nav,
+ .infoPackageApplication footer nav,
.infoPackagePlugin footer nav,
- .infoPackageStandalone:hover footer nav,
+ .infoPackageApplication:hover footer nav,
.infoPackagePlugin:hover footer nav {
opacity: 1;
}
</script>
<header class="mainHeading">
- <img src="{@RELATIVE_WCF_DIR}icon/packageStandalone1.svg" alt="" />
+ <img src="{@RELATIVE_WCF_DIR}icon/packageApplication1.svg" alt="" />
<hgroup>
<h1>{lang}wcf.acp.package.list{/lang}</h1>
</hgroup>
</hgroup>
{foreach from=$applications key=packageID item=package}
- <fieldset class="infoPackageStandalone">
+ <fieldset class="infoPackageApplication">
<legend>{$package->getName()}</legend>
- <img src="{@RELATIVE_WCF_DIR}icon/wcfIcon1.svg" alt="" title="{$package->getName()}" class="packageStandaloneIcon" />
+ <img src="{@RELATIVE_WCF_DIR}icon/wcfIcon1.svg" alt="" title="{$package->getName()}" class="packageApplicationIcon" />
<div>
<dl>
<div class="contentFooter">
<nav>
<ul class="largeButtons">
- <li><a href="{link controller='PackageListDetailed'}{/link}" title="{lang}wcf.acp.menu.link.package.list{/lang}"><img src="{@RELATIVE_WCF_DIR}icon/packageStandalone1.svg" alt="" /> <span>detailed package list</span></a></li>
+ <li><a href="{link controller='PackageListDetailed'}{/link}" title="{lang}wcf.acp.menu.link.package.list{/lang}"><img src="{@RELATIVE_WCF_DIR}icon/packageApplication1.svg" alt="" /> <span>detailed package list</span></a></li>
</ul>
</nav>
</div>
</script>
<header class="mainHeading">
- <img src="{@RELATIVE_WCF_DIR}icon/packageStandalone1.svg" alt="" />
+ <img src="{@RELATIVE_WCF_DIR}icon/packageApplication1.svg" alt="" />
<hgroup>
<h1>{lang}wcf.acp.package.list{/lang}</h1>
</hgroup>
</td>
<td class="columnID"><p>{@$package->packageID}</p></td>
<td class="columnIcon">
- {if $package->standalone}
- <img src="{@RELATIVE_WCF_DIR}icon/packageStandalone1.svg" alt="" title="{lang}wcf.acp.package.list.standalone{/lang}" class="balloonTooltip" />
+ {if $package->isApplication}
+ <img src="{@RELATIVE_WCF_DIR}icon/packageApplication1.svg" alt="" title="{lang}wcf.acp.package.list.isApplication{/lang}" class="balloonTooltip" />
{elseif $package->isPlugin()}
<img src="{@RELATIVE_WCF_DIR}icon/packagePlugin1.svg" alt="" title="{lang}wcf.acp.package.list.plugin{/lang}" class="balloonTooltip" />
{else}
<div class="contentHeader">
<nav>
<ul class="largeButtons">
- <li><a href="{link controller='PackageList'}{/link}" title="{lang}wcf.acp.menu.link.package.list{/lang}"><img src="{@RELATIVE_WCF_DIR}icon/packageStandalone1.svg" alt="" /> <span>{lang}wcf.acp.menu.link.package.list{/lang}</span></a></li>
+ <li><a href="{link controller='PackageList'}{/link}" title="{lang}wcf.acp.menu.link.package.list{/lang}"><img src="{@RELATIVE_WCF_DIR}icon/packageApplication1.svg" alt="" /> <span>{lang}wcf.acp.menu.link.package.list{/lang}</span></a></li>
{event name='largeButtons'}
</ul>
</td>
<td class="columnID"><p>{@$package.packageID}</p></td>
<td class="columnIcon">
- {if $package.standalone}
- <img src="{@RELATIVE_WCF_DIR}icon/packageStandalone1.svg" alt="" title="{lang}wcf.acp.package.list.standalone{/lang}" class="balloonTooltip" />
+ {if $package.isApplication}
+ <img src="{@RELATIVE_WCF_DIR}icon/packageApplication1.svg" alt="" title="{lang}wcf.acp.package.list.isApplication{/lang}" class="balloonTooltip" />
{elseif $package.parentPackageID}
<img src="{@RELATIVE_WCF_DIR}icon/packagePlugin1.svg" alt="" title="{lang}wcf.acp.package.list.plugin{/lang}" class="balloonTooltip" />
{else}
<dl>
<dt>{lang}wcf.acp.packageUpdate.search.type{/lang}</dt>
<dd>
- <label><input type="checkbox" name="standalone" value="1" {if $standalone == 1}checked="checked" {/if}/> {lang}wcf.acp.packageUpdate.search.type.standalone{/lang}</label>
+ <label><input type="checkbox" name="isApplication" value="1" {if $isApplication == 1}checked="checked" {/if}/> {lang}wcf.acp.packageUpdate.search.type.isApplication{/lang}</label>
</dd>
<dd>
<label><input type="checkbox" name="plugin" value="1" {if $plugin == 1}checked="checked" {/if}/> {lang}wcf.acp.packageUpdate.search.type.plugin{/lang}</label>
<div class="messageInner container-{cycle name='styles' values='1,2'}">
<hgroup class="subHeading">
<h1>
- {if $package.standalone == 1}
- <img src="{@RELATIVE_WCF_DIR}icon/packageStandalone1.svg" alt="" title="{lang}wcf.acp.package.list.standalone{/lang}" class="balloonTooltip" />
+ {if $package.isApplication == 1}
+ <img src="{@RELATIVE_WCF_DIR}icon/packageApplication1.svg" alt="" title="{lang}wcf.acp.package.list.isApplication{/lang}" class="balloonTooltip" />
{elseif $package.plugin != ''}
<img src="{@RELATIVE_WCF_DIR}icon/packagePlugin1.svg" alt="" title="{lang}wcf.acp.package.list.plugin{/lang}" class="balloonTooltip" />
{else}
</script>
<header class="mainHeading">
- <img src="{@RELATIVE_WCF_DIR}icon/packageStandalone1.svg" alt="" /><!-- ToDo: Add possibility to show a custom app icon if given! -->
+ <img src="{@RELATIVE_WCF_DIR}icon/packageApplication1.svg" alt="" /><!-- ToDo: Add possibility to show a custom app icon if given! -->
<hgroup>
<h1>{$package->getName()}</h1>
<h2>{$package->packageDescription}</h2>
</td>
<td class="columnID"><p>{@$requiredPackage.packageID}</p></td>
<td class="columnIcon">
- {if $requiredPackage.standalone}
- <img src="{@RELATIVE_WCF_DIR}icon/packageStandalone1.svg" alt="" title="{lang}wcf.acp.package.list.standalone{/lang}" class="balloonTooltip" />
+ {if $requiredPackage.isApplication}
+ <img src="{@RELATIVE_WCF_DIR}icon/packageApplication1.svg" alt="" title="{lang}wcf.acp.package.list.isApplication{/lang}" class="balloonTooltip" />
{elseif $requiredPackage.parentPackageID}
<img src="{@RELATIVE_WCF_DIR}icon/packagePlugin1.svg" alt="" title="{lang}wcf.acp.package.list.plugin{/lang}" class="balloonTooltip" />
{else}
</td>
<td class="columnID"><p>{@$dependentPackage.packageID}</p></td>
<td class="columnIcon">
- {if $dependentPackage.standalone}
- <img src="{@RELATIVE_WCF_DIR}icon/packageStandalone1.svg" alt="" title="{lang}wcf.acp.package.list.standalone{/lang}" class="balloonTooltip" />
+ {if $dependentPackage.isApplication}
+ <img src="{@RELATIVE_WCF_DIR}icon/packageApplication1.svg" alt="" title="{lang}wcf.acp.package.list.isApplication{/lang}" class="balloonTooltip" />
{elseif $dependentPackage.parentPackageID}
<img src="{@RELATIVE_WCF_DIR}icon/packagePlugin1.svg" alt="" title="{lang}wcf.acp.package.list.plugin{/lang}" class="balloonTooltip" />
{else}
{foreach from=$dependentPackages item=dependentPackage}
{if $dependentPackage.package != 'com.woltlab.wcf' && $dependentPackage.packageID == PACKAGE_ID}
{assign var=noDependentIsActive value=false}
- {* TODO: maybe show users that this package can't be uninstalled because a dependent package is the active standalone application *}
+ {* TODO: maybe show users that this package can't be uninstalled because a dependent package is the active application *}
{/if}
{/foreach}
<ul class="largeButtons">
{content}
{if PACKAGE_ID != $package->packageID}
- {if $package->standalone && $package->package != 'com.woltlab.wcf'}
+ {if $package->isApplication && $package->package != 'com.woltlab.wcf'}
<li><a href="{@RELATIVE_WCF_DIR}{$package->packageDir}acp/index.php{@SID_ARG_1ST}" title="{lang}wcf.acp.package.view.button.makeActive{/lang}"><img src="{@RELATIVE_WCF_DIR}icon/packageACP1.svg" alt="" /> <span>{lang}wcf.acp.package.view.button.makeActive{/lang}</span></a></li>
{/if}
{if $__wcf->session->getPermission('admin.system.package.canUninstallPackage') && $noDependentIsActive}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<!--<?xml-stylesheet type="text/css" href="svg.css"?>-->\r
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16" xml:space="preserve">\r
+ \r
+ <title>Package Standalone</title>\r
+ <desc>Package Standalone Icon</desc>\r
+ \r
+ <!--\r
+ @author Harald Szekely \r
+ @copyright 2011 WoltLab GmbH \r
+ @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> \r
+ --> \r
+ \r
+ <defs>\r
+ <style type="text/css">\r
+ <![CDATA[\r
+ .Upper1 {fill: #666;}\r
+ .Lower1 {fill: #fff;}\r
+ ]]>\r
+ </style>\r
+ </defs>\r
+ \r
+ <g id="IconPackageStandalone">\r
+ <g class="Lower1">\r
+ <path id="Front1" style="fill-rule: evenodd; clip-rule: evenodd;" d="M14,5H1v10h13V5z M12.984375,14H2.015625L2,6\r
+ h11L12.984375,14z"/>\r
+ <polygon id="Upside1" style="fill-rule: evenodd; clip-rule: evenodd;" points="12.5,2.5 2.5,2.5 1,4.75 14,4.75"/>\r
+ </g>\r
+ <g class="Upper1">\r
+ <path id="Front2" style="fill-rule: evenodd; clip-rule: evenodd;" d="M14,4H1v10h13V4z M12.984375,13H2.015625L2,5h11\r
+ L12.984375,13z"/>\r
+ <polygon id="Upside2" style="fill-rule: evenodd; clip-rule: evenodd;" points="12.5,1.5 2.5,1.5 1,3.75 14,3.75"/>\r
+ </g>\r
+ </g>\r
+</svg>\r
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<!--<?xml-stylesheet type="text/css" href="svg.css"?>-->\r
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16" xml:space="preserve">\r
- \r
- <title>Package Standalone</title>\r
- <desc>Package Standalone Icon</desc>\r
- \r
- <!--\r
- @author Harald Szekely \r
- @copyright 2011 WoltLab GmbH \r
- @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> \r
- --> \r
- \r
- <defs>\r
- <style type="text/css">\r
- <![CDATA[\r
- .Upper1 {fill: #666;}\r
- .Lower1 {fill: #fff;}\r
- ]]>\r
- </style>\r
- </defs>\r
- \r
- <g id="IconPackageStandalone">\r
- <g class="Lower1">\r
- <path id="Front1" style="fill-rule: evenodd; clip-rule: evenodd;" d="M14,5H1v10h13V5z M12.984375,14H2.015625L2,6\r
- h11L12.984375,14z"/>\r
- <polygon id="Upside1" style="fill-rule: evenodd; clip-rule: evenodd;" points="12.5,2.5 2.5,2.5 1,4.75 14,4.75"/>\r
- </g>\r
- <g class="Upper1">\r
- <path id="Front2" style="fill-rule: evenodd; clip-rule: evenodd;" d="M14,4H1v10h13V4z M12.984375,13H2.015625L2,5h11\r
- L12.984375,13z"/>\r
- <polygon id="Upside2" style="fill-rule: evenodd; clip-rule: evenodd;" points="12.5,1.5 2.5,1.5 1,3.75 14,3.75"/>\r
- </g>\r
- </g>\r
-</svg>\r
public $plugin = 1;
/**
- * indicates if standalone applications are searched
+ * indicates if applications are searched
* @var integer
*/
- public $standalone = 1;
+ public $isApplication = 1;
/**
- * indicates if packages that aren't plugins or standalone applications
- * are searched
+ * indicates if packages that aren't plugins or applications are searched
* @var integer
*/
public $other = 0;
public function readFormParameters() {
parent::readFormParameters();
- $this->ignoreUniques = $this->plugin = $this->standalone = 0;
+ $this->ignoreUniques = $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['searchDescription'])) $this->searchDescription = intval($_POST['searchDescription']);
if (isset($_POST['plugin'])) $this->plugin = intval($_POST['plugin']);
- if (isset($_POST['standalone'])) $this->standalone = intval($_POST['standalone']);
+ 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']);
}
// 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->standalone == 0 || $this->other == 0) && ($this->plugin == 1 || $this->standalone == 1 || $this->other == 1)) {
- if ($this->standalone == 1) {
- $condition = 'standalone = 1';
+ if (($this->plugin == 0 || $this->isApplication == 0 || $this->other == 0) && ($this->plugin == 1 || $this->isApplication == 1 || $this->other == 1)) {
+ if ($this->isApplication == 1) {
+ $condition = 'isApplication = 1';
if ($this->plugin == 1) {
$condition .= " OR plugin IN (SELECT package FROM wcf".WCF_N."_package)";
}
else if ($this->plugin == 1) {
$condition = "plugin IN (SELECT package FROM wcf".WCF_N."_package)";
if ($this->other == 1) {
- $condition .= " OR standalone = 0";
+ $condition .= " OR isApplication = 0";
}
$conditions->add('('.$condition.')');
}
else if ($this->other) {
- $conditions->add("(standalone = 0 AND plugin = '')");
+ $conditions->add("(isApplication = 0 AND plugin = '')");
}
}
'packageName' => $this->packageName,
'searchDescription' => $this->searchDescription,
'author' => $this->author,
- 'standalone' => $this->standalone,
+ 'isApplication' => $this->isApplication,
'plugin' => $this->plugin,
'other' => $this->other,
'packageUpdateServerIDs' => $this->packageUpdateServerIDs,
$conditions = new PreparedStatementConditionBuilder();
$conditions->add("packageID IN (?)", array(PackageDependencyHandler::getDependencies()));
- $conditions->add("standalone = ?", array(1));
+ $conditions->add("isApplication = ?", array(1));
// get package dirs
$sql = "SELECT packageDir
$conditions = new PreparedStatementConditionBuilder();
$conditions->add("packageID IN (?)", array(PackageDependencyHandler::getDependencies()));
- $conditions->add("standalone = ?", array(1));
+ $conditions->add("isApplication = ?", array(1));
// get package dirs
$sql = "SELECT packageDir, packageName, instanceNo
/**
* @see wcf\page\SortablePage::$validSortFields
*/
- public $validSortFields = array('packageID', 'package', 'packageDir', 'packageName', 'instanceNo', 'packageDescription', 'packageVersion', 'packageDate', 'packageURL', 'parentPackageID', 'isUnique', 'standalone', 'author', 'authorURL', 'installDate', 'updateDate');
+ public $validSortFields = array('packageID', 'package', 'packageDir', 'packageName', 'instanceNo', 'packageDescription', 'packageVersion', 'packageDate', 'packageURL', 'parentPackageID', 'isUnique', 'isApplication', 'author', 'authorURL', 'installDate', 'updateDate');
/**
* @see wcf\page\MultipleLinkPage::$objectListClassName
* @see wcf\page\MultipleLinkPage::readObjects()
*/
protected function readObjects() {
- $this->sqlOrderBy = 'package.'.($this->sortField == 'packageType' ? 'standalone '.$this->sortOrder.', package.parentPackageID '.$this->sortOrder : $this->sortField.' '.$this->sortOrder).($this->sortField != 'packageName' ? ', package.packageName ASC' : '');
+ $this->sqlOrderBy = 'package.'.($this->sortField == 'packageType' ? 'isApplication '.$this->sortOrder.', package.parentPackageID '.$this->sortOrder : $this->sortField.' '.$this->sortOrder).($this->sortField != 'packageName' ? ', package.packageName ASC' : '');
parent::readObjects();
}
// read applications
$this->applicationList = new PackageList();
- $this->applicationList->getConditionBuilder()->add("package.standalone = ?", array(1));
+ $this->applicationList->getConditionBuilder()->add("package.isApplication = ?", array(1));
$this->applicationList->getConditionBuilder()->add("package.packageID <> ?", array(1));
$this->applicationList->sqlLimit = 0;
$this->applicationList->readObjects();
// reset options.inc.php files
$sql = "SELECT package, packageID, packageDir
FROM wcf".WCF_N."_package
- WHERE standalone = ?";
+ WHERE isApplication = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute(array(1));
while ($row = $statement->fetchArray()) {
}
/**
- * Writes the config.inc.php for a standalone application.
+ * Writes the config.inc.php for an application.
*
* @param integer $packageID
*/
$file->write("<?php\n");
$currentPrefix = strtoupper(Package::getAbbreviation($package->package));
- // get dependencies (only standalones)
+ // get dependencies (only spplications)
$sql = "SELECT package.*, CASE WHEN package.packageID = ? THEN 1 ELSE 0 END AS sortOrder
FROM wcf".WCF_N."_package_dependency package_dependency
LEFT JOIN wcf".WCF_N."_package package
ON (package.packageID = package_dependency.dependency)
WHERE package_dependency.packageID = ?
- AND package.standalone = 1
+ AND package.isApplication = 1
AND package.packageDir <> ''
ORDER BY sortOrder DESC,
package_dependency.priority DESC";
public static function getPluginList() {
$pluginList = new PackageList();
$pluginList->getConditionBuilder()->add("package.packageID IN (?)", array(PackageDependencyHandler::getDependencies()));
- $pluginList->getConditionBuilder()->add("package.standalone = ?", array(0));
+ $pluginList->getConditionBuilder()->add("package.isApplication = ?", array(0));
return $pluginList;
}
$sql = "SELECT *
FROM wcf".WCF_N."_package
WHERE package = ?
- AND standalone = ?";
+ AND isApplication = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute(array(
$package,
$sql = "SELECT *
FROM wcf".WCF_N."_package
WHERE package = ?
- AND standalone = ?";
+ AND isApplication = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute(array(
$package,
// get package dirs
$sql = "SELECT package, packageDir
FROM wcf".WCF_N."_package
- WHERE standalone = 1
+ WHERE isApplication = 1
AND (packageDir <> '' OR package = 'com.woltlab.wcf')";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute();
$packages = CacheHandler::getInstance()->get('packages');
if (isset($_REQUEST['packageID'])) $packageID = intval($_REQUEST['packageID']);
- if (!isset($packages[$packageID]) || !$packages[$packageID]['standalone']) {
+ if (!isset($packages[$packageID]) || !$packages[$packageID]['isApplication']) {
// package id is invalid
$packageID = self::getWcfPackageID();
}
}
/**
- * Returns a list of all installed standalone packages.
+ * Returns a list of all installed applications packages.
*
* @return array
*/
$quickAccessPackages = array();
$packages = CacheHandler::getInstance()->get('packages');
foreach ($packages as $packageID => $package) {
- if (!$package->standalone) break;
+ if (!$package->isApplication) break;
if ($package->package != 'com.woltlab.wcf') {
$quickAccessPackages[] = $package;
}
}
/**
- * Gets the package name of the first standalone application in WCFSetup.tar.gz.
+ * Gets the package name of the first application in WCFSetup.tar.gz.
*/
protected static function getPackageName() {
// get package name
LEFT JOIN wcf".WCF_N."_package package
ON (package.packageID = package_dependency.dependency)
WHERE package_dependency.packageID = ?
- AND standalone = ?";
+ AND isApplication = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute(array(
PACKAGE_ID,
// get by other packages registered files
$conditions = new PreparedStatementConditionBuilder();
$conditions->add("packageID <> ?", array($packageID));
- $conditions->add("packageID IN (SELECT packageID FROM wcf".WCF_N."_package WHERE packageDir = ? AND standalone = ?)", array($this->packageInstallation->getPackage()->packageDir, 0));
+ $conditions->add("packageID IN (SELECT packageID FROM wcf".WCF_N."_package WHERE packageDir = ? AND isApplication = ?)", array($this->packageInstallation->getPackage()->packageDir, 0));
$conditions->add("templateName IN (?)", array($fileNames));
$sql = "SELECT *
}
// check if files from installing package are in conflict with already installed files
- if (!$this->packageInstallation->getPackage()->standalone && count($lockedFiles) > 0) {
+ if (!$this->packageInstallation->getPackage()->isApplication && count($lockedFiles) > 0) {
foreach ($fileNames as $key => $file) {
if (isset($lockedFiles[$file]) && $packageID != $lockedFiles[$file]) {
$owningPackage = new Package($lockedFiles[$file]);
- throw new SystemException("A non-standalone package can't overwrite template files. Only an update from the package which owns the template can do that. (Package '".$this->packageInstallation->getPackage()->getPackage()."' tries to overwrite template '".$file."', which is owned by package '".$owningPackage->package."')");
+ throw new SystemException("A non-application package can't overwrite template files. Only an update from the package which owns the template can do that. (Package '".$this->packageInstallation->getPackage()->getPackage()."' tries to overwrite template '".$file."', which is owned by package '".$owningPackage->package."')");
}
}
}
$this->packageInfo[$name][$languageCode] = $element->nodeValue;
break;
- case 'standalone':
- $this->packageInfo['standalone'] = intval($element->nodeValue);
+ case 'isapplication':
+ $this->packageInfo['isApplication'] = intval($element->nodeValue);
break;
case 'plugin':
}
// set default values
- if (!isset($this->packageInfo['standalone'])) $this->packageInfo['standalone'] = 0;
+ if (!isset($this->packageInfo['isApplication'])) $this->packageInfo['isApplication'] = 0;
if (!isset($this->packageInfo['plugin'])) $this->packageInfo['plugin'] = '';
if (!isset($this->packageInfo['packageURL'])) $this->packageInfo['packageURL'] = '';
$this->queue = new PackageInstallationQueue($this->queue->queueID);
$this->package = null;
- if ($package->standalone) {
+ if ($package->isApplication) {
$host = RouteHandler::getHost();
$path = RouteHandler::getPath(array('acp'));
$this->installPackageParent();
}
- if ($this->getPackage()->standalone && $this->getPackage()->package != 'com.woltlab.wcf' && $this->getAction() == 'install') {
+ if ($this->getPackage()->isApplication && $this->getPackage()->package != 'com.woltlab.wcf' && $this->getAction() == 'install') {
if (empty($this->getPackage()->packageDir)) {
$document = $this->promptPackageDir();
if ($document !== null && $document instanceof form\FormDocument) {
* Sets parent package and rebuilds dependencies for both.
*/
protected function installPackageParent() {
- // do not handle parent package if current package is standalone or does not have a plugin tag while within installation process
- if ($this->getArchive()->getPackageInfo('standalone') || $this->getAction() != 'install' || !$this->getArchive()->getPackageInfo('plugin')) {
+ // do not handle parent package if current package is an application or does not have a plugin tag while within installation process
+ if ($this->getArchive()->getPackageInfo('isApplication') || $this->getAction() != 'install' || !$this->getArchive()->getPackageInfo('plugin')) {
return;
}
}
/**
- * Prompts for a text input for package directory (applies for standalone-applications only)
+ * Prompts for a text input for package directory (applies for applications only)
*
* @return FormDocument
*/
'packageVersion' => $this->installation->getArchive()->getPackageInfo('version'),
'packageDate' => $this->installation->getArchive()->getPackageInfo('date'),
'packageURL' => $this->installation->getArchive()->getPackageInfo('packageURL'),
- 'standalone' => $this->installation->getArchive()->getPackageInfo('standalone'),
+ 'isApplication' => $this->installation->getArchive()->getPackageInfo('isApplication'),
'author' => $this->installation->getArchive()->getAuthorInfo('author'),
'authorURL' => $this->installation->getArchive()->getAuthorInfo('authorURL') !== null ? $this->installation->getArchive()->getAuthorInfo('authorURL') : '',
'installDate' => TIME_NOW,
$instructions = ($this->installation->getAction() == 'install') ? $this->installation->getArchive()->getInstallInstructions() : $this->installation->getArchive()->getUpdateInstructions();
foreach ($instructions as $pip) {
- if (isset($pip['attributes']['run']) && ($pip['attributes']['run'] == 'standalone')) {
+ if (isset($pip['attributes']['run']) && ($pip['attributes']['run'] == 'isApplication')) {
$this->parentNode = $this->node;
$this->node = $this->getToken();
$this->sequenceNo = 0;
// define default values
$packageInfo = array(
'packageDescription' => '',
- 'standalone' => 0,
+ 'isApplication' => 0,
'plugin' => '',
'author' => '',
'authorURL' => '',
$packageInfo['packageDescription'] = $element->nodeValue;
break;
- case 'standalone':
- $packageInfo['standalone'] = intval($element->nodeValue);
+ case 'isapplication':
+ $packageInfo['isApplication'] = intval($element->nodeValue);
break;
case 'plugin':
'packageDescription' => $packageData['packageDescription'],
'author' => $packageData['author'],
'authorURL' => $packageData['authorURL'],
- 'standalone' => $packageData['standalone'],
+ 'isApplication' => $packageData['isApplication'],
'plugin' => $packageData['plugin']
));
}
'packageDescription' => $packageData['packageDescription'],
'author' => $packageData['author'],
'authorURL' => $packageData['authorURL'],
- 'standalone' => $packageData['standalone'],
+ 'isApplication' => $packageData['isapplication'],
'plugin' => $packageData['plugin']
));
// get existing packages and their versions
$existingPackages = array();
$sql = "SELECT packageID, package, instanceNo, packageDescription,
- packageVersion, packageDate, author, authorURL, standalone,
+ packageVersion, packageDate, author, authorURL, isApplication,
CASE WHEN instanceName <> '' THEN instanceName ELSE packageName END AS packageName
FROM wcf".WCF_N."_package";
$statement = WCF::getDB()->prepareStatement($sql);
$updates[$packageID]['version'] = end($updates[$packageID]['versions']);
}
- // remove requirements of standalone packages
+ // remove requirements of application packages
if ($removeRequirements) {
foreach ($existingPackages as $identifier => $instances) {
foreach ($instances as $instance) {
- if ($instance['standalone'] && isset($updates[$instance['packageID']])) {
+ if ($instance['isApplication'] && isset($updates[$instance['packageID']])) {
$updates = self::removeUpdateRequirements($updates, $updates[$instance['packageID']]['version']['servers'][0]['packageUpdateVersionID']);
}
}
if (count($templates) > 0) {
// delete template files
$packageDir = FileUtil::addTrailingSlash(FileUtil::getRealPath(WCF_DIR.$this->installation->getPackage()->packageDir));
- $deleteEmptyDirectories = $this->installation->getPackage()->standalone;
+ $deleteEmptyDirectories = $this->installation->getPackage()->isApplication;
$this->installation->deleteFiles($packageDir, $templates, false, $deleteEmptyDirectories);
// delete log entries
// use parents package dir
$dir = $this->installation->getPackage()->getParentPackage()->packageDir;
}
- else if ($this->installation->getPackage()->standalone == 1 && $this->installation->getPackage()->package != 'com.woltlab.wcf' && $this->installation->getAction() == 'install') {
- // standalone package
+ else if ($this->installation->getPackage()->isApplication == 1 && $this->installation->getPackage()->package != 'com.woltlab.wcf' && $this->installation->getAction() == 'install') {
+ // application
// prompt package dir
$dir = $this->promptPackageDir();
}
// extract content of files.tar
$fileInstaller = $this->installation->extractFiles($packageDir, $sourceFile, $fileHandler);
- // if this a standalone package, write config.inc.php for this package
- if ($this->installation->getPackage()->standalone == 1 && $this->installation->getPackage()->package != 'com.woltlab.wcf' && $this->installation->getAction() == 'install') {
+ // if this a an application, write config.inc.php for this package
+ if ($this->installation->getPackage()->isApplication == 1 && $this->installation->getPackage()->package != 'com.woltlab.wcf' && $this->installation->getAction() == 'install') {
// touch file
$fileInstaller->touchFile(PackageInstallationDispatcher::CONFIG_FILE);
$languageEditor = new LanguageEditor($language);
// import xml
- // don't update language files if package is standalone
- $languageEditor->updateFromXML($xml, $this->installation->getPackageID(), !$this->installation->getPackage()->standalone);
+ // don't update language files if package is an application
+ $languageEditor->updateFromXML($xml, $this->installation->getPackageID(), !$this->installation->getPackage()->isApplication);
// add language to this package
$addedLanguageIDArray[] = $language->languageID;
$package = $package->getParentPackage();
}
- if ($package->standalone == 1) {
- // package is standalone
+ if ($package->isApplication == 1) {
+ // package is application
$packageAbbr = Package::getAbbreviation($package->package);
$tablePrefix = WCF_N.'_'.$package->instanceNo.'_';
if (count($templates) > 0) {
// delete template files
$packageDir = FileUtil::addTrailingSlash(FileUtil::getRealPath(WCF_DIR.$this->installation->getPackage()->packageDir));
- $deleteEmptyDirectories = $this->installation->getPackage()->standalone;
+ $deleteEmptyDirectories = $this->installation->getPackage()->isApplication;
$this->installation->deleteFiles($packageDir, $templates, false, $deleteEmptyDirectories);
// delete log entries
packageURL VARCHAR(255) NOT NULL DEFAULT '',
parentPackageID INT(10) NOT NULL DEFAULT 0,
isUnique TINYINT(1) NOT NULL DEFAULT 0,
- standalone TINYINT(1) NOT NULL DEFAULT 0,
+ isApplication TINYINT(1) NOT NULL DEFAULT 0,
author VARCHAR(255) NOT NULL DEFAULT '',
authorURL VARCHAR(255) NOT NULL DEFAULT '',
KEY package (package)
packageDescription VARCHAR(255) NOT NULL DEFAULT '',
author VARCHAR(255) NOT NULL DEFAULT '',
authorURL VARCHAR(255) NOT NULL DEFAULT '',
- standalone TINYINT(1) NOT NULL DEFAULT 0,
+ isApplication TINYINT(1) NOT NULL DEFAULT 0,
plugin VARCHAR(255) NOT NULL DEFAULT '',
UNIQUE KEY packageUpdateServerID (packageUpdateServerID, package)
);