fml fix
This commit is contained in:
parent
985feb398e
commit
3e7083d377
@ -325,23 +325,33 @@ class Script {
|
|||||||
*/
|
*/
|
||||||
private function buildTooltipConstants() {
|
private function buildTooltipConstants() {
|
||||||
if (!$this->tooltips) return;
|
if (!$this->tooltips) return;
|
||||||
$constantText = "[";
|
$constantText = '[';
|
||||||
$index = 0;
|
$index = 0;
|
||||||
$count = count($this->tooltipTexts);
|
$count = count($this->tooltipTexts);
|
||||||
foreach ($this->tooltipTexts as $tooltipId => $tooltipTexts) {
|
if ($count > 0) {
|
||||||
$constantText .= "\"{$tooltipId}\" => [";
|
foreach ($this->tooltipTexts as $tooltipId => $tooltipTexts) {
|
||||||
$subIndex = 0;
|
$constantText .= '"' . $tooltipId . '"=>[';
|
||||||
$subCount = count($tooltipTexts);
|
$subIndex = 0;
|
||||||
foreach ($tooltipTexts as $hoverId => $text) {
|
$subCount = count($tooltipTexts);
|
||||||
$constantText .= "\"{$hoverId}\" => \"{$text}\"";
|
if ($subCount > 0) {
|
||||||
if ($subIndex < $subCount - 1) $constantText .= ", ";
|
foreach ($tooltipTexts as $hoverId => $text) {
|
||||||
$subIndex++;
|
$constantText .= '"' . $hoverId . '"=>"' . $text . '"';
|
||||||
|
if ($subIndex < $subCount - 1) $constantText .= ',';
|
||||||
|
$subIndex++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$constantText .= '""';
|
||||||
|
}
|
||||||
|
$constantText .= ']';
|
||||||
|
if ($index < $count - 1) $constantText .= ',';
|
||||||
|
$index++;
|
||||||
}
|
}
|
||||||
$constantText .= "]";
|
|
||||||
if ($index < $count - 1) $constantText .= ", ";
|
|
||||||
$index++;
|
|
||||||
}
|
}
|
||||||
$constantText .= "]";
|
else {
|
||||||
|
$constantText .= '""=>[""=>""]';
|
||||||
|
}
|
||||||
|
$constantText .= ']';
|
||||||
$this->setConstant(self::CONSTANT_TOOLTIPTEXTS, $constantText);
|
$this->setConstant(self::CONSTANT_TOOLTIPTEXTS, $constantText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user