</dd>
</dl>
{/if}
- <dl{if $errorField == 'imagePath'} class="formError"{/if}>
- <dt><label for="imagePath">{lang}wcf.acp.style.imagePath{/lang}</label></dt>
- <dd>
- <input type="text" name="imagePath" id="imagePath" value="{$imagePath}" class="long">
- {if $errorField == 'imagePath'}
- <small class="innerError">
- {if $errorType == 'empty'}
- {lang}wcf.global.form.error.empty{/lang}
- {else}
- {lang}wcf.acp.style.imagePath.error.{$errorType}{/lang}
- {/if}
- </small>
- {/if}
- <small>{lang}wcf.acp.style.imagePath.description{/lang}</small>
- </dd>
- </dl>
{event name='fileFields'}
</section>
*/
public $globals = [];
- /**
- * image path
- * @var string
- */
- public $imagePath = 'images/';
-
/**
* tainted style
* @var boolean
if (isset($_POST['authorName'])) $this->authorName = StringUtil::trim($_POST['authorName']);
if (isset($_POST['authorURL'])) $this->authorURL = StringUtil::trim($_POST['authorURL']);
if (isset($_POST['copyright'])) $this->copyright = StringUtil::trim($_POST['copyright']);
- if (isset($_POST['imagePath'])) $this->imagePath = StringUtil::trim($_POST['imagePath']);
if (isset($_POST['license'])) $this->license = StringUtil::trim($_POST['license']);
if (isset($_POST['packageName'])) $this->packageName = StringUtil::trim($_POST['packageName']);
if (isset($_POST['styleDate'])) $this->styleDate = StringUtil::trim($_POST['styleDate']);
}
}
- // ensure image path is below WCF_DIR/images/
- if ($this->imagePath) {
- $relativePath = FileUtil::unifyDirSeparator(FileUtil::getRelativePath(WCF_DIR.'images/', WCF_DIR.$this->imagePath));
- if (strpos($relativePath, '../') !== false) {
- throw new UserInputException('imagePath', 'invalid');
- }
- }
-
if (!empty($this->variables['overrideScss'])) {
$this->parseOverrides();
}
'styleDescription' => '',
'styleVersion' => $this->styleVersion,
'styleDate' => $this->styleDate,
- 'imagePath' => $this->imagePath,
'copyright' => $this->copyright,
'license' => $this->license,
'authorName' => $this->authorName,
$this->authorName = $this->authorURL = $this->copyright = $this->packageName = '';
$this->license = $this->styleDate = $this->styleDescription = $this->styleName = $this->styleVersion = '';
$this->setDefaultValues();
- $this->imagePath = 'images/';
$this->isTainted = true;
$this->templateGroupID = 0;
$this->rebuildUploadFields();
'colorCategories' => $this->colorCategories,
'colors' => $this->colors,
'copyright' => $this->copyright,
- 'imagePath' => $this->imagePath,
'isTainted' => $this->isTainted,
'license' => $this->license,
'packageName' => $this->packageName,
$this->authorName = $this->style->authorName;
$this->authorURL = $this->style->authorURL;
$this->copyright = $this->style->copyright;
- $this->imagePath = $this->style->imagePath;
$this->isTainted = $this->style->isTainted;
$this->license = $this->style->license;
$this->packageName = $this->style->packageName;
'templateGroupID' => $this->templateGroupID,
'styleVersion' => $this->styleVersion,
'styleDate' => $this->styleDate,
- 'imagePath' => $this->imagePath,
'copyright' => $this->copyright,
'packageName' => $this->packageName,
'license' => $this->license,