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

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