Dashboard: fix complex urls

This commit is contained in:
Thomas Gelf 2014-11-19 16:44:45 +01:00
parent 92b2c5061d
commit fa44197947
2 changed files with 2 additions and 5 deletions

View File

@ -493,7 +493,7 @@ class IniEditor
private function isPropertyDeclaration($lineContent, array $key) private function isPropertyDeclaration($lineContent, array $key)
{ {
return preg_match( return preg_match(
'/^\s*' . $this->formatKey($key) . '\s*=\s*/', '/^\s*' . preg_quote($this->formatKey($key)) . '\s*=\s*/',
$lineContent $lineContent
) === 1; ) === 1;
} }

View File

@ -156,15 +156,12 @@ EOD;
public function toArray() public function toArray()
{ {
$array = array( $array = array(
'url' => $this->url->getPath(), 'url' => $this->url->getRelativeUrl(),
'title' => $this->getTitle() 'title' => $this->getTitle()
); );
if ($this->getDisabled() === true) { if ($this->getDisabled() === true) {
$array['disabled'] = 1; $array['disabled'] = 1;
} }
foreach ($this->url->getParams()->toArray() as $param) {
$array[$param[0]] = $param[1];
}
return $array; return $array;
} }