Update settings/ajax/creategroup.php
$l->t added to error messages
This commit is contained in:
parent
04033585b0
commit
83575a4436
|
@ -6,7 +6,7 @@ OCP\JSON::callCheck();
|
||||||
|
|
||||||
// Check if we are a user
|
// Check if we are a user
|
||||||
if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )) {
|
if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )) {
|
||||||
OC_JSON::error(array("data" => array( "message" => "Authentication error" )));
|
OC_JSON::error(array("data" => array( "message" => $l->t("Authentication error") )));
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ $groupname = $_POST["groupname"];
|
||||||
|
|
||||||
// Does the group exist?
|
// Does the group exist?
|
||||||
if( in_array( $groupname, OC_Group::getGroups())) {
|
if( in_array( $groupname, OC_Group::getGroups())) {
|
||||||
OC_JSON::error(array("data" => array( "message" => "Group already exists" )));
|
OC_JSON::error(array("data" => array( "message" => $l->t("Group already exists") )));
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,5 +25,5 @@ if( OC_Group::createGroup( $groupname )) {
|
||||||
OC_JSON::success(array("data" => array( "groupname" => $groupname )));
|
OC_JSON::success(array("data" => array( "groupname" => $groupname )));
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
OC_JSON::error(array("data" => array( "message" => "Unable to add group" )));
|
OC_JSON::error(array("data" => array( "message" => $l->t("Unable to add group") )));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue