diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-23 00:13:22 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-23 00:13:22 +0000 |
commit | d330e4203ad9709ed7bb05a2815016e7809173c7 (patch) | |
tree | 2bd798edaadb7ded333d806052fd4769ae2f0b0a /modules/watermark/helpers | |
parent | 34daf50695a09237819a1e112f009a9649152452 (diff) |
Step 1 of converting watermarks over to be an admin page.
Diffstat (limited to 'modules/watermark/helpers')
-rw-r--r-- | modules/watermark/helpers/watermark_block.php | 24 | ||||
-rw-r--r-- | modules/watermark/helpers/watermark_menu.php | 26 |
2 files changed, 6 insertions, 44 deletions
diff --git a/modules/watermark/helpers/watermark_block.php b/modules/watermark/helpers/watermark_block.php deleted file mode 100644 index 0751268c..00000000 --- a/modules/watermark/helpers/watermark_block.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access."); -/** - * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2008 Bharat Mediratta - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - */ -class watermark_block_Core { - public static function head($theme) { - return html::script("modules/watermark/js/watermark.js"); - } -} diff --git a/modules/watermark/helpers/watermark_menu.php b/modules/watermark/helpers/watermark_menu.php index 9d85319d..fa5501b1 100644 --- a/modules/watermark/helpers/watermark_menu.php +++ b/modules/watermark/helpers/watermark_menu.php @@ -18,25 +18,11 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class watermark_menu_Core { - // @todo this needs to get on the admin page at some point - - public static function site($menu, $theme) { - $user = user::active(); - if ($user->admin) { - $menu->get("admin_menu")->append( - Menu::Factory("dialog") - ->id("watermark_Load") - ->label(_("Load Watermark")) - ->url(url::site("admin/watermark/load"))); - - $path = module::get_var("watermark", "watermark_image_path"); - if (!empty($path)) { - $menu->get("admin_menu")->append( - Menu::Factory("dialog") - ->id("watermark_position") - ->label(_("Set Watermark Position")) - ->url(url::site("admin/watermark/get_form/$user->id"))); - } - } + public static function admin($menu, $theme) { + $menu->append( + Menu::factory("link") + ->id("watermarks") + ->label(_("Watermarks")) + ->url(url::site("admin/watermarks"))); } } |