$this->readBoxImages();
}
+
+ if ($this->boxType === 'system') {
+ $this->boxController = ObjectTypeCache::getInstance()->getObjectType($this->boxControllerID);
+ }
}
/**
// validate controller
if ($this->boxType === 'system') {
- $this->boxController = ObjectTypeCache::getInstance()->getObjectType($this->boxControllerID);
if ($this->boxController === null || $this->boxController->getDefinition()->definitionName != 'com.woltlab.wcf.boxController') {
throw new UserInputException('boxController');
}
$this->externalURL = '';
}
- // validate page ids
- if (!empty($this->pageIDs)) {
- $conditionBuilder = new PreparedStatementConditionBuilder();
- $conditionBuilder->add('pageID IN (?)', [$this->pageIDs]);
- $sql = "SELECT pageID
- FROM wcf".WCF_N."_page
- " . $conditionBuilder;
- $statement = WCF::getDB()->prepareStatement($sql);
- $statement->execute($conditionBuilder->getParameters());
- $this->pageIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
+ if ($this->boxController && $this->boxController->getProcessor() instanceof IConditionBoxController) {
+ $this->boxController->getProcessor()->validateConditions();
}
// validate images
}
}
- if ($this->boxController && $this->boxController->getProcessor() instanceof IConditionBoxController) {
- $this->boxController->getProcessor()->validateConditions();
- }
-
if ($this->boxType == 'text') {
if ($this->isMultilingual) {
foreach (LanguageFactory::getInstance()->getLanguages() as $language) {
$this->htmlInputProcessors[0]->process((!empty($this->content[0]) ? $this->content[0] : ''), 'com.woltlab.wcf.box.content');
}
}
+
+ // validate page ids
+ if (!empty($this->pageIDs)) {
+ $conditionBuilder = new PreparedStatementConditionBuilder();
+ $conditionBuilder->add('pageID IN (?)', [$this->pageIDs]);
+ $sql = "SELECT pageID
+ FROM wcf".WCF_N."_page
+ " . $conditionBuilder;
+ $statement = WCF::getDB()->prepareStatement($sql);
+ $statement->execute($conditionBuilder->getParameters());
+ $this->pageIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
+ }
}
/**