<hgroup class="containerHeadline">
<h1>{$style->styleName}</h1>
</hgroup>
- {if $style->styleDescription}<small>{$style->styleDescription}</small>{/if}
+ {if $style->styleDescription}<small>{lang}{@$style->styleDescription}{/lang}</small>{/if}
</div>
</div>
</li>
// save style
if ($style !== null) {
- // handle descriptions
- if (!empty($data['description'])) {
- $styleData['styleDescription'] = 'wcf.style.styleDescription'.$style->styleID;
- self::saveLocalizedDescriptions($style, $data['description']);
- }
-
$style->update($styleData);
}
else {
$styleData['packageID'] = $packageID;
$style = new StyleEditor(self::create($styleData));
-
- // handle descriptions
- if (!empty($data['description'])) {
- $styleData['styleDescription'] = 'wcf.style.styleDescription'.$style->styleID;
- self::saveLocalizedDescriptions($style, $data['description']);
- }
+ }
+
+ // handle descriptions
+ if (!empty($data['description'])) {
+ self::saveLocalizedDescriptions($style, $data['description']);
}
if ($data['default']) {
return $style;
}
+ /**
+ * Saves localized style descriptions.
+ *
+ * @param wcf\data\style\StyleEditor $styleEditor
+ * @param array<string> $descriptions
+ */
protected static function saveLocalizedDescriptions(StyleEditor $styleEditor, array $descriptions) {
// localize package information
$sql = "INSERT INTO wcf".WCF_N."_language_item
));
}
}
+
+ $styleEditor->update(array(
+ 'styleDescription' => 'wcf.style.styleDescription'.$styleEditor->styleID
+ ));
}
/**
templateGroupID INT(10) NOT NULL DEFAULT 0,
isDefault TINYINT(1) NOT NULL DEFAULT 0,
isDisabled TINYINT(1) NOT NULL DEFAULT 0,
- styleDescription TEXT,
+ styleDescription VARCHAR(30) NOT NULL DEFAULT '',
styleVersion VARCHAR(255) NOT NULL DEFAULT '',
styleDate CHAR(10) NOT NULL DEFAULT '0000-00-00',
image VARCHAR(255) NOT NULL DEFAULT '',