Default to JSON if there are no PHP templates
This commit is contained in:
parent
d157b9ad52
commit
eccb07e786
4 changed files with 106 additions and 79 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue