use wcf\system\request\LinkHandler;
use wcf\system\upload\DefaultUploadFileSaveStrategy;
use wcf\system\upload\DefaultUploadFileValidationStrategy;
+use wcf\system\upload\UploadFile;
use wcf\system\WCF;
use wcf\util\ArrayUtil;
use wcf\util\FileUtil;
}
}
+ /** @noinspection PhpUndefinedMethodInspection */
+ /** @var UploadFile[] $files */
$files = $this->parameters['__files']->getFiles();
foreach ($files as $file) {
if ($file->getValidationErrorType()) {
* @return Condition[]
*/
public function getConditions() {
+ /** @noinspection PhpUndefinedMethodInspection */
if ($this->boxType === 'system' && $this->getController() instanceof IConditionBoxController && $this->getController()->getConditionDefinition()) {
+ /** @noinspection PhpUndefinedMethodInspection */
return ConditionHandler::getInstance()->getConditions($this->getController()->getConditionDefinition(), $this->boxID);
}
// fetch categories
$categories = $xpath->query('/ns:language/ns:category');
+
+ /** @var \DOMElement $category */
foreach ($categories as $category) {
$usedCategories[$category->getAttribute('name')] = 0;
}
// loop through categories to import items
$itemData = [];
+
+ /** @var \DOMElement $category */
foreach ($categories as $category) {
$categoryName = $category->getAttribute('name');
$categoryID = $usedCategories[$categoryName];
// loop through items
$elements = $xpath->query('child::*', $category);
+
+ /** @var \DOMElement $element */
foreach ($elements as $element) {
$itemName = $element->getAttribute('name');
$itemValue = $element->nodeValue;
$values = [];
if (!empty($data[Like::LIKE])) {
$values[Like::LIKE] = new GroupedUserList(WCF::getLanguage()->get('wcf.like.details.like'));
+ /** @noinspection PhpUndefinedMethodInspection */
$values[Like::LIKE]->addUserIDs($data[Like::LIKE]);
}
if (!empty($data[Like::DISLIKE])) {
$values[Like::DISLIKE] = new GroupedUserList(WCF::getLanguage()->get('wcf.like.details.dislike'));
+ /** @noinspection PhpUndefinedMethodInspection */
$values[Like::DISLIKE]->addUserIDs($data[Like::DISLIKE]);
}
$values = [];
if (!empty($data[Like::LIKE])) {
$values[Like::LIKE] = new GroupedUserList(WCF::getLanguage()->get('wcf.like.details.like'));
+ /** @noinspection PhpUndefinedMethodInspection */
$values[Like::LIKE]->addUserIDs($data[Like::LIKE]);
}
if (!empty($data[Like::DISLIKE])) {
$values[Like::DISLIKE] = new GroupedUserList(WCF::getLanguage()->get('wcf.like.details.dislike'));
+ /** @noinspection PhpUndefinedMethodInspection */
$values[Like::DISLIKE]->addUserIDs($data[Like::DISLIKE]);
}
// parse like
foreach ($likeGroups as $likeData) {
if ($likeData['provider'] instanceof IViewableLikeProvider) {
+ /** @noinspection PhpUndefinedMethodInspection */
$likeData['provider']->prepare($likeData['objects']);
}
}
*/
public function upload() {
// save files
+ /** @noinspection PhpUndefinedMethodInspection */
/** @var UploadFile[] $files */
$files = $this->parameters['__files']->getFiles();
$file = $files[0];
*/
public function uploadLogo() {
// save files
+ /** @noinspection PhpUndefinedMethodInspection */
/** @var UploadFile[] $files */
$files = $this->parameters['__files']->getFiles();
$file = $files[0];
$variables = $xml->xpath()->query('/ns:variables/ns:variable');
$data = [];
+
+ /** @var \DOMElement $variable */
foreach ($variables as $variable) {
$data[$variable->getAttribute('name')] = $variable->nodeValue;
}