use wcf\system\event\EventHandler;
use wcf\system\exception\SystemException;
use wcf\system\exception\UserInputException;
+ use wcf\system\file\upload\UploadField;
+ use wcf\system\file\upload\UploadHandler;
+ use wcf\system\image\ImageHandler;
use wcf\system\language\I18nHandler;
use wcf\system\Regex;
+use wcf\system\style\StyleCompiler;
+ use wcf\system\style\exception\FontDownloadFailed;
+ use wcf\system\style\FontManager;
use wcf\system\WCF;
use wcf\util\ArrayUtil;
use wcf\util\DateUtil;
$this->parseOverrides();
}
+ $this->validateIndividualScss();
+
$this->validateApiVersion();
+
+ $this->validateUploads();
+
+ $this->downloadGoogleFont();
}
+ /**
+ * Validates the individual scss.
+ * @throws UserInputException
+ * @since 5.3
+ */
+ public function validateIndividualScss() {
+ $variables = array_merge(StyleCompiler::getDefaultVariables(), $this->variables);
+
+ $result = StyleCompiler::getInstance()->testStyle($this->apiVersion, $this->imagePath, $variables);
+
+ if ($result !== true) {
+ throw new UserInputException('individualScss', [
+ 'message' => $result,
+ ]);
+ }
+ }
+
/**
* Disallow the use of `com.woltlab.*` for package names to avoid accidental collisions.
*
use wcf\data\user\cover\photo\UserCoverPhoto;
use wcf\form\AbstractForm;
use wcf\system\exception\IllegalLinkException;
+use wcf\system\exception\SystemException;
+use wcf\system\exception\UserInputException;
+ use wcf\system\file\upload\UploadFile;
+ use wcf\system\file\upload\UploadHandler;
use wcf\system\language\I18nHandler;
+use wcf\system\style\StyleCompiler;
use wcf\system\WCF;
/**