summaryrefslogtreecommitdiff
path: root/modules/user
diff options
context:
space:
mode:
authormamouneyya <mamoun.diraneyya@gmail.com>2010-09-29 22:01:36 +0300
committermamouneyya <mamoun.diraneyya@gmail.com>2010-09-29 22:01:36 +0300
commit6aabab4b715ff8ac00cc667e9d0a40c9868410d8 (patch)
tree85766ce290f3a89b1039969ce31bc47138d76594 /modules/user
parent61e55becf46ce899632bff7ce26a7208094618f0 (diff)
parentef8751468b998baddbc6d5827a392ed6e12e5548 (diff)
Merge remote branch 'gallery3/master'
Conflicts: themes/admin_wind/css/screen.css themes/wind/css/screen.css
Diffstat (limited to 'modules/user')
-rw-r--r--modules/user/controllers/admin_users.php8
-rw-r--r--modules/user/models/group.php2
2 files changed, 4 insertions, 6 deletions
diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php
index c22fcc2e..23032ab3 100644
--- a/modules/user/controllers/admin_users.php
+++ b/modules/user/controllers/admin_users.php
@@ -381,8 +381,8 @@ class Admin_Users_Controller extends Admin_Controller {
$form_group->inputs["name"]->error_messages("conflict", t("There is already a group with that name"))
->error_messages("required", t("You must enter a group name"))
->error_messages("length",
- t("The group name must be between %min_length and %max_length characters",
- array("min_length" => 4, "max_length" => 255)));
+ t("The group name must be less than %max_length characters",
+ array("max_length" => 255)));
$form_group->submit("")->value(t("Save"));
return $form;
}
@@ -392,9 +392,7 @@ class Admin_Users_Controller extends Admin_Controller {
$form_group = $form->group("add_group")->label(t("Add group"));
$form_group->input("name")->label(t("Name"))->id("g-name");
$form_group->inputs["name"]->error_messages("conflict", t("There is already a group with that name"))
- ->error_messages("required", t("You must enter a group name"))
- ->error_messages("length", t("The group name must be at least %min_length characters",
- array("min_length" => 4)));
+ ->error_messages("required", t("You must enter a group name"));
$form_group->submit("")->value(t("Add group"));
return $form;
}
diff --git a/modules/user/models/group.php b/modules/user/models/group.php
index 57b12963..b27c7250 100644
--- a/modules/user/models/group.php
+++ b/modules/user/models/group.php
@@ -41,7 +41,7 @@ class Group_Model extends ORM implements Group_Definition {
// validate() is recursive, only modify the rules on the outermost call.
if (!$array) {
$this->rules = array(
- "name" => array("rules" => array("required", "length[4,255]"),
+ "name" => array("rules" => array("required", "length[1,255]"),
"callbacks" => array(array($this, "valid_name"))));
}