From b4140fd77b7060fe21ed6d973bf2d0fa2e097287 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 19 Mar 2012 10:42:16 +0000 Subject: [PATCH] after activating an extension, there is a config option to enable it? confused --- contrib/tagger/main.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/contrib/tagger/main.php b/contrib/tagger/main.php index 076457b6..dd3698d5 100644 --- a/contrib/tagger/main.php +++ b/contrib/tagger/main.php @@ -10,18 +10,14 @@ class Tagger extends Extension { public function onDisplayingImage(DisplayingImageEvent $event) { global $page, $config, $user; - if($config->get_bool("tag_edit_anon") - || ($user->id != $config->get_int("anon_id")) - && $config->get_bool("ext_tagger_enabled")) - { + if($user->can("edit_image_tag") && ($event->image->is_locked() || $user->can("edit_image_lock")) { $this->theme->build_tagger($page,$event); } } public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Tagger"); - $sb->add_bool_option("ext_tagger_enabled","Enable Tagger"); - $sb->add_int_option("ext_tagger_search_delay","
Delay queries by "); + $sb->add_int_option("ext_tagger_search_delay", "Delay queries by "); $sb->add_label(" milliseconds."); $sb->add_label("
Limit queries returning more than "); $sb->add_int_option("ext_tagger_tag_max");