Changes API.

This commit is contained in:
Lars Jung 2012-10-08 01:16:02 +02:00
parent d6c5696f96
commit 811994423d
7 changed files with 248 additions and 246 deletions

View file

@ -150,28 +150,9 @@ class App {
}
private function fileExists($file) {
return is_string($file) && file_exists($file);
}
public function get_generic_json() {
$entries = $this->get_entries($this->abs_href, 1);
$header = $this->options["custom"]["header"];
$footer = $this->options["custom"]["footer"];
$header = $this->fileExists($header ? $this->abs_path . "/" . $header : null) ? $header : null;
$footer = $this->fileExists($footer ? $this->abs_path . "/" . $footer : null) ? $footer : null;
$json = array(
"customHeader" => $header,
"customFooter" => $footer,
"entries" => $entries
);
return json_encode($json) . "\n";
return json_encode(array("entries" => $this->get_entries($this->abs_href, 1))) . "\n";
}