namespace wcf\data\style;
use wcf\data\DatabaseObjectDecorator;
use wcf\system\WCF;
+use wcf\util\FileUtil;
/**
* Represents the active user style.
}
if ($this->imagePath && file_exists(WCF_DIR.$this->imagePath.$image)) {
- return WCF::getPath().$this->imagePath.$image;
+ return FileUtil::getRealPath(WCF::getPath().$this->imagePath.$image);
}
- return WCF::getPath().'images/'.$image;
+ return FileUtil::getRealPath(WCF::getPath().'images/'.$image);
}
/**
* @param \wcf\system\Callback $callback
*/
protected function compileStylesheet($filename, array $files, array $variables, $individualLess, Callback $callback) {
+ foreach ($variables as &$value) {
+ if (StringUtil::startsWith($value, '../')) {
+ $value = '~"'.$value.'"';
+ }
+ }
+ unset($value);
+
// add options as LESS variables
if (PACKAGE_ID) {
foreach (Option::getOptions() as $constantName => $option) {