diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-22 03:53:36 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-22 03:53:36 +0000 |
commit | b526cc8c0bea4033a1ffadd6706f073f9cb90eeb (patch) | |
tree | 1bc51063fad8c56910cb52bafb13294d31b82a7b /core | |
parent | fe27bd1eb34efe95da6ffe8b6f6c137fe8a18306 (diff) |
Add some admin theme callbacks and make them explicitly admin_xxx for consistency
with the callbacks in the xxx_block helpers. So in the theme we have:
admin.html.php:
$theme->admin_page_bottom()
then in the helpers:
core_block.php:
function admin_page_bottom() { }
Diffstat (limited to 'core')
-rw-r--r-- | core/helpers/core_block.php | 7 | ||||
-rw-r--r-- | core/libraries/Admin_View.php | 8 | ||||
-rw-r--r-- | core/libraries/Theme_View.php | 1 |
3 files changed, 13 insertions, 3 deletions
diff --git a/core/helpers/core_block.php b/core/helpers/core_block.php index 06354a10..ec1ee066 100644 --- a/core/helpers/core_block.php +++ b/core/helpers/core_block.php @@ -30,6 +30,13 @@ class core_block_Core { } } + public static function admin_page_bottom($theme) { + if (Session::instance()->get("profiler", false)) { + $profiler = new Profiler(); + $profiler->render(); + } + } + public static function admin_dashboard_blocks($theme) { $block = new Block(); $block->id = "gWelcome"; diff --git a/core/libraries/Admin_View.php b/core/libraries/Admin_View.php index 5752d659..c172b76b 100644 --- a/core/libraries/Admin_View.php +++ b/core/libraries/Admin_View.php @@ -65,9 +65,11 @@ class Admin_View_Core extends View { */ public function __call($function, $args) { switch ($function) { - case "dashboard_blocks": - case "sidebar_blocks": - $function = "admin_$function"; + case "admin_dashboard_blocks": + case "admin_footer": + case "admin_page_bottom": + case "admin_page_top": + case "admin_sidebar_blocks": $blocks = array(); foreach (module::installed() as $module) { $helper_class = "{$module->name}_block"; diff --git a/core/libraries/Theme_View.php b/core/libraries/Theme_View.php index 02609063..3144ca2a 100644 --- a/core/libraries/Theme_View.php +++ b/core/libraries/Theme_View.php @@ -93,6 +93,7 @@ class Theme_View_Core extends View { case "album_bottom": case "album_top": case "credits"; + case "footer": case "head": case "header_bottom": case "header_top": |