diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-11 11:33:12 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-11 11:33:12 +0000 |
commit | d884f0d1f1378061e9ae78f86a44aaa7c85fdece (patch) | |
tree | 2898ed5415ac3ea10e97175eaaca6ba110f929a9 | |
parent | 0cf0bca9495528ce17d544d8baa840fddcb8cf86 (diff) | |
download | elgg-d884f0d1f1378061e9ae78f86a44aaa7c85fdece.tar.gz elgg-d884f0d1f1378061e9ae78f86a44aaa7c85fdece.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* Starting admin and relocating to the garden...
git-svn-id: https://code.elgg.org/elgg/trunk@863 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | admin/index.php | 17 | ||||
-rw-r--r-- | admin/plugins/index.php | 3 | ||||
-rw-r--r-- | admin/settings/index.php | 3 | ||||
-rw-r--r-- | admin/users/index.php | 3 | ||||
-rw-r--r-- | engine/lib/admin.php | 48 |
5 files changed, 61 insertions, 13 deletions
diff --git a/admin/index.php b/admin/index.php index 9011e7e8b..8a59e8f85 100644 --- a/admin/index.php +++ b/admin/index.php @@ -14,11 +14,20 @@ // Get the Elgg framework
require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
- // Make sure only valid users can see this
- gatekeeper();
- if (!$_SESSION['user']->admin && !$_SESSION['user']->siteadmin) forward();
+ // Make sure only valid admin users can see this
+ admin_gatekeeper();
+
- $menuoptions = get_register("admin");
+ + + + + // Get menu list + + // render + + + // Display main admin menu
page_draw(elgg_echo("admin"),elgg_view("admin/main"));
diff --git a/admin/plugins/index.php b/admin/plugins/index.php deleted file mode 100644 index 0165eb215..000000000 --- a/admin/plugins/index.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php
-
-?>
\ No newline at end of file diff --git a/admin/settings/index.php b/admin/settings/index.php deleted file mode 100644 index 0165eb215..000000000 --- a/admin/settings/index.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php
-
-?>
\ No newline at end of file diff --git a/admin/users/index.php b/admin/users/index.php deleted file mode 100644 index 0165eb215..000000000 --- a/admin/users/index.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php
-
-?>
\ No newline at end of file diff --git a/engine/lib/admin.php b/engine/lib/admin.php new file mode 100644 index 000000000..5e3358078 --- /dev/null +++ b/engine/lib/admin.php @@ -0,0 +1,48 @@ +<?php + /** + * Elgg admin functions. + * Functions for adding and manipulating options on the admin panel. + * + * @package Elgg + * @subpackage Core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Marcus Povey + * @copyright Curverider Ltd 2008 + * @link http://elgg.org/ + */ + + + /** + * Register an admin page with the admin panel. + * + * @param string $view The view associated with the page, this is assumed to be under the view /admin/. + * @param int $priority Optional priority to govern the appearance in the list. + */ + function register_elgg_admin_page($view, $priority = 500) + { + + } + + + /** + * Return an array of registered elgg admin pages. + * + * @return array + */ + function get_elgg_admin_pages() + { + + } + + + function admin_init() + { + global $CONFIG; + + // TODO: Register default pages + } + + + /// Register init function + register_elgg_event_handler('init','system','admin_init'); +?>
\ No newline at end of file |