fml fix update

This commit is contained in:
Steffen Schröder 2013-12-14 23:28:04 +01:00
parent 7f4b45286a
commit fd3a3056f1
2 changed files with 22 additions and 12 deletions

View File

@ -97,6 +97,10 @@ class Pages implements Constants, Globals, Includes, Labels, ScriptFeature {
}
$constant .= '"__FML__Pages__Id__" => ["' . $page[2] . '"], ';
$constant .= '"__FML__Pages__Ids__" => [';
if (count($page[1]) <= 0) {
$constant .= '""';
}
else {
$subIndex = 0;
foreach ($page[1] as $pageId) {
$constant .= '"' . $pageId . '"';
@ -105,6 +109,7 @@ class Pages implements Constants, Globals, Includes, Labels, ScriptFeature {
}
$subIndex++;
}
}
$constant .= ']]';
if ($index < count($this->pages) - 1) {
$constant .= ', ';

View File

@ -47,6 +47,10 @@ class Tooltips implements Constants, Labels, ScriptFeature {
*/
public function getConstants() {
$constant = '[';
if (count($this->tooltips) <= 0) {
$constant .= '"" => ""';
}
else {
$index = 0;
foreach ($this->tooltips as $hoverId => $tooltipId) {
$constant .= '"' . $hoverId . '" => "' . $tooltipId . '"';
@ -55,6 +59,7 @@ class Tooltips implements Constants, Labels, ScriptFeature {
}
$index++;
}
}
$constant .= ']';
$constants = array();
$constants[self::C_TOOLTIPIDS] = $constant;