diff --git a/app/controllers/InfosController.php b/app/controllers/InfosController.php
index 6f7b6bb22..8e3bfd8e5 100644
--- a/app/controllers/InfosController.php
+++ b/app/controllers/InfosController.php
@@ -2,6 +2,7 @@
class InfosController extends BaseController {
function load() {
+ header('Content-type: application/json');
$this->session_only = false;
$this->raw = true;
}
diff --git a/app/views/admin.tpl b/app/views/admin.tpl
index 53fb8e45e..3c2e2198a 100644
--- a/app/views/admin.tpl
+++ b/app/views/admin.tpl
@@ -7,6 +7,7 @@
widget('Admin');?>
widget('Statistics');?>
+ widget('Api');?>
diff --git a/app/widgets/Admin/Admin.php b/app/widgets/Admin/Admin.php
index 6bbf500aa..a9c4fd0ef 100644
--- a/app/widgets/Admin/Admin.php
+++ b/app/widgets/Admin/Admin.php
@@ -27,8 +27,10 @@ class Admin extends WidgetBase {
$this->addjs('admin.js');
$this->_conf = Conf::getServerConf();
- $this->saveConfig($_POST);
- $_POST = null;
+ if(isset($_POST)) {
+ $this->saveConfig($_POST);
+ $_POST = null;
+ }
}
private function saveConfig($form) {
@@ -151,9 +153,7 @@ class Admin extends WidgetBase {
return $html;
}
- function prepareAdminGen() {
- $html = '';
-
+ function prepareAdminGen() {
$html .= '