class InstallPackageAction extends AbstractDialogAction {
/**
* current node
- *
* @var string
*/
public $node = '';
/**
* PackageInstallationDispatcher object
- *
- * @var PackageInstallationDispatcher
+ * @var wcf\system\package\PackageInstallationDispatcher
*/
public $installation = null;
/**
* PackageInstallationQueue object
- *
- * @var PackageInstallationQueue
+ * @var wcf\data\package\installation\queue\PackageInstallationQueue
*/
public $queue = null;
/**
* current queue id
- *
* @var integer
*/
public $queueID = 0;
- // system
+ /**
+ * @see wcf\action\AbstractDialogAction::$templateName
+ */
public $templateName = 'packageInstallationStep';
/**
class UninstallPackageAction extends InstallPackageAction {
/**
* active package id
- *
* @var integer
*/
protected $packageID = 0;
- // system
+ /**
+ * @see wcf\action\AbstractDialogAction::$templateName
+ */
public $templateName = 'packageUninstallationStep';
/**
* Provides a default implementation for the show method in acp forms.
*
* @author Marcel Werk
- * @copyright 2001-2009 WoltLab GmbH
+ * @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
* @subpackage acp.form
* @see wcf\page\IPage::show()
*/
public function show() {
- // enable menu item
- if (!empty($this->activeMenuItem)) ACPMenu::getInstance()->setActiveMenuItem($this->activeMenuItem);
+ // set active acp menu item
+ if (!empty($this->activeMenuItem)) {
+ ACPMenu::getInstance()->setActiveMenuItem($this->activeMenuItem);
+ }
parent::show();
}
class AJAXProxyAction extends AbstractSecureAction {
/**
* class name
- * @var string
+ * @var string
*/
protected $className = '';
/**
* action name
- * @var string
+ * @var string
*/
protected $actionName = '';
/**
* list of object ids
- * @var array<integer>
+ * @var array<integer>
*/
protected $objectIDs = array();
/**
* additional parameters
- * @var array<mixed>
+ * @var array<mixed>
*/
protected $parameters = array();
/**
* object action
- * @var wcf\data\IDatabaseObjectAction
+ * @var wcf\data\IDatabaseObjectAction
*/
protected $objectAction = null;
/**
* results of the executed action
- * @var mixed
+ * @var mixed
*/
protected $response = null;
*/
abstract class AbstractAction implements IAction {
/**
- * Needed modules to execute this action.
- *
+ * needed modules to execute this action
* @var array<string>
*/
public $neededModules = array();
/**
- * Needed permissions to execute this action.
- *
+ * needed permissions to execute this action
* @var array<string>
*/
public $neededPermissions = array();
use wcf\util\JSON;
use wcf\util\StringUtil;
+/**
+ * Abstract implementation of an action that displays a dialog and that is executed
+ * in multiple steps.
+ *
+ * @author
+ * @copyright 2001-2011 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage action
+ * @category Community Framework
+ */
abstract class AbstractDialogAction extends AbstractSecureAction {
/**
* current step
- *
* @var string
*/
public $step = '';
/**
* template name
- *
* @var string
*/
public $templateName = '';
/**
* response data
- *
* @var array
*/
public $data = array();
$this->validateStep();
}
+ /**
+ * @see wcf\action\IAction::execute()
+ */
public final function execute() {
parent::execute();
/**
* Validates current dialog step.
*/
- abstract protected function validateStep();
+ protected abstract function validateStep();
}
if (count($categoriesToCache) > 0) {
$file = new File($filename);
$file->write("<?php\n/**\n* WoltLab Community Framework\n* language: ".$this->languageCode."\n* encoding: UTF-8\n* category: WCF Setup\n* generated at ".gmdate("r")."\n* \n* DO NOT EDIT THIS FILE\n*/\n");
- foreach ($categoriesToCache as $value => $name) {
+ foreach ($categoriesToCache as $name) {
$file->write("\$this->items['".$name['name']."'] = '".str_replace("'", "\'", $name['cdata'])."';\n");
// compile dynamic language variables
* Sets the local language.
*/
private function setLocale() {
- // set locale for
- // string comparison
- // character classification and conversion
- // date and time formatting
+ // set locale for:
+ // - string comparison
+ // - character classification and conversion
+ // - date and time formatting
setlocale(LC_COLLATE, $this->get('wcf.global.locale.unix').'.UTF-8', $this->get('wcf.global.locale.unix'), $this->get('wcf.global.locale.win'));
setlocale(LC_CTYPE, $this->get('wcf.global.locale.unix').'.UTF-8', $this->get('wcf.global.locale.unix'), $this->get('wcf.global.locale.win'));
}
<?php
namespace wcf\form;
+use wcf\system\exception\IllegalLinkException;
+use wcf\system\WCF;
/**
* Extends AbstractForm by a function to validate a given security token.
* A missing or invalid token will be result in a throw of a IllegalLinkException.
*
* @author Marcel Werk
- * @copyright 2001-2009 WoltLab GmbH
+ * @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
* @subpackage form
* Imports language variables for a language from given language servers.
*
* @param wcf\data\language\Language $language
- * @param array $languageServers
+ * @param array<wcf\data\language\server\LanguageServer> $languageServers
*/
public function import(Language $language, array $languageServers) {
if (!count($languageServers)) return;
/**
* Returns list of installed packages and their associated version.
*
- * @return array
+ * @return array<string>
*/
protected function getPackageList() {
$sql = "SELECT package, packageVersion
/**
* Downloads and imports a language file from a language server.
*
- * @param string $location
- * @param array $packageList
+ * @param string $location
+ * @param array<string> $packageList
*/
protected function importLanguageFile($location, array $packageList) {
// get proxy
/**
* Parses XML response from language server.
*
- * @param string $xmlResponse
+ * @param string $xmlResponse
*/
protected function parseResponse($xmlResponse) {
// parse xml
/**
* Imports language variables and categories.
*
- * @param array $variables
- * @param array $packages
+ * @param array $variables
+ * @param array<integer> $packages
*/
protected function importVariables(array $variables, array $packages) {
$categories = $this->importCategories($variables);
/**
* Imports new langage categories.
*
- * @param array $variables
+ * @param array $variables
* @return array
*/
protected function importCategories(array $variables) {
protected $pageType = '';
/**
- * true, if this request was executed already.
+ * true, if this request has already been executed
* @var boolean
*/
protected $executed = false;
}
/**
- * Returns true, if this request was executed already.
+ * Returns true, if this request has already been executed.
*
- * @return boolean
+ * @return boolean
*/
public function isExecuted() {
return $this->executed;
/**
* Returns the page class name of this request.
*
- * @return string
+ * @return string
*/
public function getClassName() {
return $this->className;
/**
* Returns the page name of this request.
*
- * @return string
+ * @return string
*/
public function getPageName() {
return $this->pageName;
/**
* Returns the page type of this request.
*
- * @return string
+ * @return string
*/
public function getPageType() {
return $this->pageType;
class RequestHandler extends SingletonFactory {
/**
* active request object
- * @var Request
+ * @var wcf\system\request\Request
*/
protected $activeRequest = null;
/**
* Returns the active request object.
*
- * @return Request
+ * @return wcf\system\request\Request
*/
public function getActiveRequest() {
return $this->activeRequest;
*/
class StorageHandler extends SingletonFactory {
/**
- * Data cache
- *
+ * data cache
* @var array<array>
*/
protected $cache = array();
/**
- * List of outdated data records
- *
+ * list of outdated data records
* @var array<array>
*/
protected $resetFields = array();
/**
- * List of updated or new data records
- *
+ * list of updated or new data records
* @var array<array>
*/
protected $updateFields = array();
/**
* Loads storage for a given set of users.
*
- * @param array $userIDs
+ * @param array<integer> $userIDs
* @param integer $packageID
*/
public function loadStorage(array $userIDs, $packageID = PACKAGE_ID) {
/**
* Returns stored data for given users.
*
- * @param array $userIDs
+ * @param array<integer> $userIDs
* @param string $field
* @param integer $packageID
* @return array<array>
/**
* Removes a data record from database.
*
- * @param array<integer> $userID
+ * @param array<integer> $userIDs
* @param string $field
* @param integer $packageID
*/
/**
* active style object
- * @var ActiveStyle
+ * @var wcf\data\style\ActiveStyle
*/
protected $style = null;
/**
* Returns a list of all for the current user available styles.
*
- * @return array<Style>
+ * @return array<wcf\data\style\Style>
*/
public function getAvailableStyles() {
$styles = array();
/**
* Returns the active style.
*
- * @return ActiveStyle
+ * @return wcf\data\style\ActiveStyle
*/
public function getStyle() {
return $this->style;