Default to JSON if there are no PHP templates

This commit is contained in:
Josh Sherman 2010-11-14 16:47:06 -05:00
parent d157b9ad52
commit eccb07e786
4 changed files with 106 additions and 79 deletions

View file

@ -34,14 +34,7 @@ class Display_JSON extends Display_Common
*/
public function render()
{
if (JSON_AVAILABLE)
{
echo json_encode($this->module_return);
}
else
{
echo '{ "status": "error", "message": "json_encode() not found" }';
}
return $this->jsonEncode();
}
}