From f3ba69c1d67c425ffa180d082a373e5cce0c86ce Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 14 Jan 2009 04:12:02 +0000 Subject: Make sure that helper functions are all static. Add new File_Structure_Test to make sure we don't regress. According to the PHP docs, the "public" keyword is implied on static functions, so remove it. Also, require private static functions to start with an _. http://php.net/manual/en/language.oop5.visibility.php --- modules/user/helpers/group.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/user/helpers/group.php') diff --git a/modules/user/helpers/group.php b/modules/user/helpers/group.php index 4ec841dc..682ef5ef 100644 --- a/modules/user/helpers/group.php +++ b/modules/user/helpers/group.php @@ -61,7 +61,7 @@ class group_Core { return model_cache::get("group", 2); } - public static function get_edit_form_admin($group) { + static function get_edit_form_admin($group) { $form = new Forge("admin/groups/edit/$group->id"); $form_group = $form->group("edit_group")->label(t("Edit Group")); $form_group->input("name")->label(t("Name"))->id("gName")->value($group->name); @@ -72,7 +72,7 @@ class group_Core { return $form; } - public static function get_add_form_admin() { + static function get_add_form_admin() { $form = new Forge("admin/groups/add"); $form_group = $form->group("add_group")->label(t("Add Group")); $form_group->input("name")->label(t("Name"))->id("gName"); @@ -84,7 +84,7 @@ class group_Core { return $form; } - public static function get_delete_form_admin($group) { + static function get_delete_form_admin($group) { $form = new Forge("admin/groups/delete/$group->id", "", "post"); $form_group = $form->group("delete_group")->label( t("Are you sure you want to delete group {{group_name}}?", array("group_name" => $group->name))); -- cgit v1.2.3