+++ /dev/null
-<?php
-namespace wcf\acp\action;
-
-/**
- * Copy of the default implementation for the clipboard-API.
- *
- * @author Alexander Ebert
- * @copyright 2001-2015 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage acp.action
- * @category Community Framework
- */
-class ClipboardAction extends \wcf\action\ClipboardAction { }
+++ /dev/null
-<?php
-namespace wcf\acp\action;
-
-/**
- * Copy of the default implementation for loading marked items from clipboard API.
- *
- * @author Alexander Ebert
- * @copyright 2001-2015 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage acp.action
- * @category Community Framework
- */
-class ClipboardLoadMarkedItemsAction extends \wcf\action\ClipboardLoadMarkedItemsAction { }
+++ /dev/null
-<?php
-namespace wcf\acp\action;
-
-/**
- * Copy of the default implementation for the clipboard proxy API.
- *
- * @author Alexander Ebert
- * @copyright 2001-2015 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage acp.action
- * @category Community Framework
- */
-class ClipboardProxyAction extends \wcf\action\ClipboardProxyAction { }
use wcf\data\category\CategoryAction;
use wcf\data\category\CategoryEditor;
use wcf\data\category\UncachedCategoryNodeTree;
+use wcf\data\object\type\ObjectType;
use wcf\form\AbstractForm;
use wcf\system\acl\ACLHandler;
use wcf\system\category\CategoryHandler;
/**
* updated package object
- * @var \wcf\system\package\Package
+ * @var \wcf\data\package\Package
*/
public $package = null;
<?php
namespace wcf\acp\form;
+use wcf\data\user\option\category\UserOptionCategory;
use wcf\data\user\option\category\UserOptionCategoryList;
use wcf\data\user\option\UserOption;
use wcf\data\user\option\UserOptionAction;
/**
* available option categories
- * @var \wcf\data\user\option\UserOptionCategory[]
+ * @var UserOptionCategory[]
*/
public $availableCategories = [];
<?php
namespace wcf\acp\page;
use wcf\data\category\CategoryNodeTree;
+use wcf\data\object\type\ObjectType;
use wcf\page\AbstractPage;
use wcf\system\category\CategoryHandler;
use wcf\system\exception\PermissionDeniedException;
* Reads the information of cached files
*
* @param string $cacheType
- * @param strign $cacheDir
+ * @param string $cacheDir
* @param \wcf\system\Regex $ignore
*/
protected function readCacheFiles($cacheType, $cacheDir, Regex $ignore = null, $extension = 'php') {
/**
* menu item node tree
- * @var wcf\data\menu\item\MenuItemNodeTree
+ * @var MenuItemNodeTree
*/
public $menuItems = null;
-
+
/**
* menu id
* @var integer
/**
* menu object
- * @var \wcf\data\menu\Menu
+ * @var Menu
*/
public $menu = null;
* Returns the link to the thumbnail file with the given size.
*
* @param string $size
- * @return sting
+ * @return string
*/
public function getThumbnailLink($size);
* Returns the physical location of the thumbnail file with the given size.
*
* @param string $size
- * @return sting
+ * @return string
*/
public function getThumbnailLocation($size);
/**
* image media object
- * @var Media
+ * @var ViewableMedia
*/
protected $image = null;
public function getObjectID();
/**
- * Gets the object type.
+ * Returns the object type.
*
- * @return \wcf\data\like\object\type\LikeObjectType
+ * @return ObjectType
*/
public function getObjectType();
/**
* Sets the object type.
*
- * @param \wcf\data\object\type\ObjectType
+ * @param ObjectType
*/
public function setObjectType(ObjectType $objectType);
/**
* Sends a notification for this like.
*
- * @param \wcf\data\like\Like $like
+ * @param Like $like
*/
public function sendNotification(Like $like);
use wcf\data\DatabaseObject;
use wcf\data\ILinkableObject;
use wcf\data\IThumbnailFile;
+use wcf\system\exception\SystemException;
use wcf\system\request\IRouteController;
use wcf\system\request\LinkHandler;
use wcf\system\WCF;
/**
* date time zone object
- * @var DateTimeZone
+ * @var \DateTimeZone
*/
protected $timezoneObj = null;
/**
* Returns the time zone of this user.
*
- * @return DateTimeZone
+ * @return \DateTimeZone
*/
public function getTimeZone() {
if ($this->timezoneObj === null) {
<?php
namespace wcf\data\user\profile\menu\item;
+use wcf\system\menu\user\profile\content\IUserProfileMenuContent;
use wcf\data\DatabaseObject;
use wcf\data\TDatabaseObjectOptions;
use wcf\data\TDatabaseObjectPermissions;
use wcf\system\exception\SystemException;
+use wcf\system\SingletonFactory;
/**
* Represents an user profile menu item.
/**
* content manager
- * @var \wcf\system\menu\user\profile\content\IUserProfileContent
+ * @var IUserProfileMenuContent
*/
protected $contentManager = null;
/**
- * @see \wcf\data\DatabaseObject::$databaseTableName
+ * @inheritDoc
*/
protected static $databaseTableName = 'user_profile_menu_item';
/**
- * @see \wcf\data\DatabaseObject::$databaseTableIndexName
+ * @inheritDoc
*/
protected static $databaseTableIndexName = 'menuItemID';
/**
* Returns the content manager for this menu item.
*
- * @return \wcf\system\menu\user\profile\content\IUserProfileMenuContent
+ * @return IUserProfileMenuContent
*/
public function getContentManager() {
if ($this->contentManager === null) {
throw new SystemException("Unable to find class '".$this->className."'");
}
- if (!is_subclass_of($this->className, 'wcf\system\SingletonFactory')) {
+ if (!is_subclass_of($this->className, SingletonFactory::class)) {
throw new SystemException("'".$this->className."' does not extend 'wcf\system\SingletonFactory'");
}
- if (!is_subclass_of($this->className, 'wcf\system\menu\user\profile\content\IUserProfileMenuContent')) {
+ if (!is_subclass_of($this->className, IUserProfileMenuContent::class)) {
throw new SystemException("'".$this->className."' does not implement 'wcf\system\menu\user\profile\content\IUserProfileMenuContent'");
}
public $matches = array();
/**
- * condtion builder object
- * @var \wcf\system\database\condition\PreparedStatementConditionBuilder
+ * condition builder object
+ * @var PreparedStatementConditionBuilder
*/
public $conditions = null;
/**
* Validates an attributes of a tag.
*
- * @param array $tagAttributes
- * @param \wcf\data\bbcode\BBCodeAttribute $definedTagAttribute
+ * @param array $tagAttributes
+ * @param BBCodeAttribute $definedTagAttribute
* @return boolean
*/
protected function isValidTagAttribute(array $tagAttributes, BBCodeAttribute $definedTagAttribute) {
<?php
namespace wcf\system\dashboard\box;
use wcf\data\dashboard\box\DashboardBox;
+use wcf\data\user\UserProfile;
use wcf\data\user\UserProfileCache;
use wcf\page\IPage;
use wcf\system\user\UserBirthdayCache;
class TodaysFollowingBirthdaysDashboardBox extends AbstractSidebarDashboardBox {
/**
* user profiles
- * @var arra<\wcf\data\user\UserProfile>
+ * @var UserProfile[]
*/
- public $userProfiles = array();
+ public $userProfiles = [];
/**
- * @see \wcf\system\dashboard\box\IDashboardBox::init()
+ * @inheritDoc
*/
public function init(DashboardBox $box, IPage $page) {
parent::init($box, $page);
}
/**
- * @see \wcf\system\dashboard\box\AbstractContentDashboardBox::render()
+ * @inheritDoc
*/
protected function render() {
if (empty($this->userProfiles)) {
return '';
}
- WCF::getTPL()->assign(array(
+ WCF::getTPL()->assign([
'birthdayUserProfiles' => $this->userProfiles
- ));
+ ]);
return WCF::getTPL()->fetch('dashboardBoxTodaysFollowingBirthdays');
}
}
* Returns the transfer encoding to use. Must either be
* 'quoted-printable' or 'base64'.
*
- * @return Either 'quoted-printable' or 'base64'
+ * @return string either 'quoted-printable' or 'base64'
*/
abstract public function getContentTransferEncoding();
<?php
namespace wcf\system\email\mime;
use wcf\system\email\EmailGrammar;
+use wcf\system\exception\SystemException;
use wcf\util\FileUtil;
/**
/**
* Validates database access.
*
- * @throws wcf\system\database\DatabaseException
+ * @throws \wcf\system\database\exception\DatabaseException
*/
public function validateDatabaseAccess();
/**
* Validates parameters for current request.
*
- * @param \wcf\system\message\IMessageQuickReplyAction $object
- * @param array<array> $parameters
- * @param string $containerClassName
- * @param string $containerDecoratorClassName
+ * @param IMessageQuickReplyAction $object
+ * @param array<array> $parameters
+ * @param string $containerClassName
+ * @param string $containerDecoratorClassName
*/
public function validateParameters(IMessageQuickReplyAction $object, array &$parameters, $containerClassName, $containerDecoratorClassName = '') {
if (!isset($parameters['data']['message'])) {
<?php
namespace wcf\system\message\quote;
+use wcf\data\object\type\ObjectType;
use wcf\data\object\type\ObjectTypeCache;
use wcf\data\IMessage;
use wcf\system\application\ApplicationHandler;
/**
* Returns a list of quotes.
*
- * @param boolean supportPaste
+ * @param boolean $supportPaste
*/
public function getQuotes($supportPaste = false) {
$template = '';
class QuotedMessage implements \Countable, \Iterator {
/**
* list of full quotes for insertation
- * @var array<string>
+ * @var string[]
*/
public $fullQuotes = array();
/**
* quotable database object
- * @var \wcf\data\IQuotableDatabaseObject
+ * @var IMessage
*/
public $object = null;
/**
- * list of quotes (shortend)
- * @var array<string>
+ * list of quotes (shortened)
+ * @var string[]
*/
public $quotes = array();
/**
* list of index to object relation
- * @var array<integer>
+ * @var integer[]
*/
protected $indexToObject = null;
/**
* Creates a new QuotedMessage object.
*
- * @param \wcf\data\IMessage $object
+ * @param IMessage $object
*/
public function __construct(IMessage $object) {
$this->object = $object;
}
/**
- * @see \wcf\data\ITitledObject::getTitle()
+ * @see ITitledObject::getTitle()
*/
public function __toString() {
return $this->object->getTitle();
* Option type implementation for radio buttons.
*
* @author Marcel Werk
- * @copyright 2001-2015 WoltLab GmbH
+ * @copyright 2001-2016 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
* @subpackage system.option
public $templateName = 'radioButtonOptionType';
/**
- * @see \wcf\system\option\IOptionType::getFormElement()
+ * @inheritDoc
*/
public function getFormElement(Option $option, $value) {
$availableOptions = $option->parseMultipleEnableOptions();
}
/**
- * @see \wcf\system\option\IOptionType::validate()
+ * @inheritDoc
*/
public function validate(Option $option, $newValue) {
if (!empty($newValue)) {
}
/**
- * @see \wcf\system\option\ISearchableUserOption::getSearchFormElement()
+ * @inheritDoc
*/
public function getSearchFormElement(Option $option, $value) {
$this->templateName = 'radioButtonSearchableOptionType';
}
/**
- * @see \wcf\system\option\ISearchableUserOption::getCondition()
+ * @inheritDoc
*/
public function getCondition(PreparedStatementConditionBuilder &$conditions, Option $option, $value) {
if (!isset($_POST['searchOptions'][$option->optionName])) return false;
}
/**
- * @see \wcf\system\option\ISearchableConditionUserOption::addCondition()
+ * @inheritDoc
*/
public function addCondition(UserList $userList, Option $option, $value) {
$userList->getConditionBuilder()->add('user_option_value.userOption'.$option->optionID.' = ?', array(StringUtil::trim($value)));
}
/**
- * @see \wcf\system\option\ISearchableConditionUserOption::checkUser()
+ * @inheritDoc
*/
public function checkUser(User $user, Option $option, $value) {
return mb_strtolower($user->getUserOption($option->optionName)) == mb_strtolower(StringUtil::trim($value));
}
/**
- * @see \wcf\system\option\ISearchableConditionUserOption::getConditionData()
+ * @inheritDoc
*/
public function getConditionData(Option $option, $newValue) {
return $newValue;
/**
* Returns the select options for the given option.
*
- * @param \wcf\dat\option\Option $option
- * @return array<string>
+ * @param Option $option
+ * @return string[]
*/
protected function getSelectOptions(Option $option) {
return $option->parseSelectOptions();
+++ /dev/null
-<?php
-namespace wcf\system\option;
-use wcf\data\option\Option;
-use wcf\system\cache\builder\ControllerCacheBuilder;
-use wcf\system\exception\UserInputException;
-use wcf\system\WCF;
-use wcf\util\StringUtil;
-
-/**
- * Option type implementation for URL controller replacements.
- *
- * @author Alexander Ebert
- * @copyright 2001-2015 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.option
- * @category Community Framework
- */
-class UrlControllerReplacementOptionType extends TextareaOptionType {
- /**
- * list of known controllers grouped by application
- * @var array<array>
- */
- protected $controllers = null;
-
- /**
- * @see \wcf\system\option\IOptionType::getData()
- */
- public function getData(Option $option, $newValue) {
- return $this->cleanup($newValue);
- }
-
- /**
- * @see \wcf\system\option\IOptionType::validate()
- */
- public function validate(Option $option, $newValue) {
- $newValue = $this->cleanup($newValue);
- if (!empty($newValue)) {
- $lines = explode("\n", $newValue);
-
- $aliases = array();
- $controllers = array();
- for ($i = 0, $length = count($lines); $i < $length; $i++) {
- $line = $lines[$i];
- if (preg_match('~^(?P<controller>[a-z][a-z0-9\-]+)=(?P<alias>[a-z][a-z0-9\-]+)$~', $line, $matches)) {
- // check if there is already a replacement for given controller
- if (in_array($matches['controller'], $controllers)) {
- WCF::getTPL()->assign('urlControllerReplacementError', $matches['controller']);
- throw new UserInputException($option->optionName, 'controllerReplacementDuplicateController', array('controller' => $matches['controller']));
- }
-
- // check if there is already the same alias for a different controller
- if (in_array($matches['alias'], $aliases)) {
- WCF::getTPL()->assign('urlControllerReplacementError', $matches['alias']);
- throw new UserInputException($option->optionName, 'controllerReplacementDuplicateAlias', array('alias' => $matches['alias']));
- }
-
- $aliases[] = $matches['alias'];
- $controllers[] = $matches['controller'];
-
- // check if controller exists
- if (!$this->isKnownController($matches['controller'])) {
- WCF::getTPL()->assign('urlControllerReplacementError', $matches['controller']);
- throw new UserInputException($option->optionName, 'controllerReplacementUnknown', array('controller' => $matches['controller']));
- }
-
- // check if alias collides with an existing controller name
- if ($this->isKnownController($matches['alias'])) {
- WCF::getTPL()->assign('urlControllerReplacementError', $matches['alias']);
- throw new UserInputException($option->optionName, 'controllerReplacementCollision', array('alias' => $matches['alias']));
- }
- }
- else {
- WCF::getTPL()->assign('urlControllerReplacementError', $line);
- throw new UserInputException($option->optionName, 'controllerReplacementInvalidFormat', array('line' => $line));
- }
- }
- }
- }
-
- /**
- * Cleans up newlines and converts input to lower-case.
- *
- * @param string $newValue
- * @return string
- */
- protected function cleanup($newValue) {
- $newValue = StringUtil::unifyNewlines($newValue);
- $newValue = trim($newValue);
- $newValue = preg_replace('~\n+~', "\n", $newValue);
- $newValue = mb_strtolower($newValue);
-
- return $newValue;
- }
-
- /**
- * Returns true if given controller name is known to the system, used to
- * prevent aliases colliding with existing ones.
- *
- * @param string $controller
- * @return boolean
- */
- protected function isKnownController($controller) {
- if ($this->controllers === null) {
- $this->controllers = ControllerCacheBuilder::getInstance()->getData(array(
- 'environment' => 'user'
- ));
- }
-
- $controller = str_replace('-', '', $controller);
- foreach ($this->controllers as $types) {
- foreach ($types as $controllers) {
- if (isset($controllers[$controller])) {
- return true;
- }
- }
- }
-
- return false;
- }
-}
/**
* Extracts files from .tar(.gz) archive and installs them
*
- * @param string $targetDir
- * @param string $sourceArchive
- * @param FileHandler $fileHandler
+ * @param string $targetDir
+ * @param string $sourceArchive
+ * @param \wcf\system\setup\IFileHandler $fileHandler
* @return \wcf\system\setup\Installer
*/
public function extractFiles($targetDir, $sourceArchive, $fileHandler = null) {
*
* Please be aware that unknown PIPs will silently ignored and cause no error.
*
- * @param \wcf\data\package\PackageArchive $archive
- * @param string $pip
- * @param string $instruction
+ * @param PackageArchive $archive
+ * @param string $pip
+ * @param string $instruction
* @return boolean
*/
public function validatePackageInstallationPluginInstruction(PackageArchive $archive, $pip, $instruction) {
class TemplateScriptingCompiler {
/**
* template engine object
- * @var \wcf\system\template\TemplateEngine
+ * @var TemplateEngine
*/
protected $template;
/**
* Creates a new TemplateScriptingCompiler object.
*
- * @param \wcf\system\templateTemplateEngine $template
+ * @param TemplateEngine $template
*/
public function __construct(TemplateEngine $template) {
$this->template = $template;
/**
* Returns the instance of the template engine class.
*
- * @return \wcf\system\templateTemplateEngine
+ * @return TemplateEngine
*/
public function getTemplate() {
return $this->template;
use wcf\data\AbstractDatabaseObjectAction;
use wcf\data\IFile;
use wcf\data\IThumbnailFile;
+use wcf\system\exception\SystemException;
use wcf\system\image\ImageHandler;
use wcf\system\WCF;
use wcf\util\ExifUtil;
<?php
namespace wcf\system\user\notification\event;
+use wcf\data\user\User;
use wcf\data\moderation\queue\ViewableModerationQueue;
use wcf\data\object\type\ObjectTypeCache;
use wcf\system\comment\CommentDataHandler;
* Validates the given object id. Throws an exception on error.
*
* @param integer $objectID
- * @throws wcf\system\exception\UserException
+ * @throws \wcf\system\exception\UserException
*/
public function validateObjectID($objectID);