mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-10 01:09:19 -04:00
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
This commit is contained in:
@@ -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)));
|
||||
|
||||
Reference in New Issue
Block a user