summaryrefslogtreecommitdiff
path: root/src/controllers/Config.class.php
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-10-09 15:46:38 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-10-09 15:46:38 -0400
commit4d2de268b75f08e6fa774063a277c2c50f603ef7 (patch)
tree8384dd7fce75b9ba7e31181c93da16923cb59235 /src/controllers/Config.class.php
parent93b1163cba7edf1a0a7e7ae787e06434de119dad (diff)
parent2e769649abf4f9b3712287e24eb42c5a93a8035e (diff)
Merge branch 'anon-userlist'
Diffstat (limited to 'src/controllers/Config.class.php')
-rw-r--r--src/controllers/Config.class.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/controllers/Config.class.php b/src/controllers/Config.class.php
new file mode 100644
index 0000000..37d1f09
--- /dev/null
+++ b/src/controllers/Config.class.php
@@ -0,0 +1,30 @@
+<?php
+require_once('Auth.class.php');
+
+Router::register('config', 'Config', 'index');
+
+class Config extends Controller {
+ public function index($routed, $remainder) {
+ $uid = Login::isLoggedIn();
+ if ($uid===false || !Auth::getObj($uid)->isAdmin()) {
+ $this->http401($routed, $remainder);
+ return;
+ }
+
+ $method = $_SERVER['REQUEST_METHOD'];
+ switch ($method) {
+ case 'PUT': $_POST = $_PUT;
+ case 'POST':
+ // We're PUTing an updated configuration.
+ $this->update();
+ break;
+ }
+ $this->show_index();
+ }
+ private function show_index() {
+
+ }
+ private function update() {
+
+ }
+}