summaryrefslogtreecommitdiff
path: root/src/controllers/Config.class.php
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-10-09 14:22:23 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-10-09 14:22:23 -0400
commitf4ea92cc3931535bb749d5e68b7100431dde3652 (patch)
tree80309095bafffa7d2907a81b4f9c9a8d9c3919f3 /src/controllers/Config.class.php
parent7e91c2872778407172fa42208be1aa7e466b97e3 (diff)
parent38bb3a7c752199ee8f58e16bc784f48a6a600e08 (diff)
Merge branch 'concurrent-editing' into anon-userlist
Conflicts: src/controllers/Users.class.php
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() {
+
+ }
+}