From 3d1ea2904d982422ce24c43b25d0d4bca6f29aa3 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 18 Jan 2009 05:01:00 +0000 Subject: Rename theme callback helpers from xxx_block to xxx_theme to make room for us to rename the dashboard helper to be a block helper since sidebar blocks are not just in the dashboard. --- core/helpers/core_block.php | 76 --------------------------------------------- core/helpers/core_theme.php | 75 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 76 deletions(-) delete mode 100644 core/helpers/core_block.php create mode 100644 core/helpers/core_theme.php (limited to 'core/helpers') diff --git a/core/helpers/core_block.php b/core/helpers/core_block.php deleted file mode 100644 index 48e158be..00000000 --- a/core/helpers/core_block.php +++ /dev/null @@ -1,76 +0,0 @@ -get("debug")) { - $buf .= ""; - } - if ($theme->page_type == "album" && access::can("edit", $theme->item())) { - $buf .= ""; - $buf .= html::script("core/js/quick.js"); - } - return $buf; - } - - static function album_top($theme, $child) { - if (access::can("edit", $album)) { - $edit_link = url::site("quick/pane/$album->id"); - return "
"; - } - } - - static function thumb_top($theme, $child) { - if ($child->type == "photo" && access::can("edit", $child)) { - $edit_link = url::site("quick/pane/$child->id"); - return "
"; - } - } - - static function thumb_bottom($theme, $child) { - if ($child->type == "photo" && access::can("edit", $child)) { - return "
"; - } - } - - static function admin_head($theme) { - if (Session::instance()->get("debug")) { - return ""; - } - } - - static function page_bottom($theme) { - if (Session::instance()->get("profiler", false)) { - $profiler = new Profiler(); - $profiler->render(); - } - } - - static function admin_page_bottom($theme) { - if (Session::instance()->get("profiler", false)) { - $profiler = new Profiler(); - $profiler->render(); - } - } -} \ No newline at end of file diff --git a/core/helpers/core_theme.php b/core/helpers/core_theme.php new file mode 100644 index 00000000..0ccad457 --- /dev/null +++ b/core/helpers/core_theme.php @@ -0,0 +1,75 @@ +get("debug")) { + $buf .= ""; + } + if ($theme->page_type == "album" && access::can("edit", $theme->item())) { + $buf .= ""; + $buf .= html::script("core/js/quick.js"); + } + return $buf; + } + + static function album_top($theme, $child) { + if (access::can("edit", $album)) { + $edit_link = url::site("quick/pane/$album->id"); + return "
"; + } + } + + static function thumb_top($theme, $child) { + if ($child->type == "photo" && access::can("edit", $child)) { + $edit_link = url::site("quick/pane/$child->id"); + return "
"; + } + } + + static function thumb_bottom($theme, $child) { + if ($child->type == "photo" && access::can("edit", $child)) { + return "
"; + } + } + + static function admin_head($theme) { + if (Session::instance()->get("debug")) { + return ""; + } + } + + static function page_bottom($theme) { + if (Session::instance()->get("profiler", false)) { + $profiler = new Profiler(); + $profiler->render(); + } + } + + static function admin_page_bottom($theme) { + if (Session::instance()->get("profiler", false)) { + $profiler = new Profiler(); + $profiler->render(); + } + } +} \ No newline at end of file -- cgit v1.2.3