mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-24 15:56:22 +00:00
Changed DB so a reply has a Hidden field, to make it only show up for admins. Also made it only possible to add mods/admins to the support groups!
This commit is contained in:
parent
e7f83761ec
commit
5608185e1d
8 changed files with 14 additions and 1 deletions
|
@ -36,6 +36,7 @@ add_to_group_success = "The user has been added to the group!"
|
|||
user_already_added = "The user is already part of the group!"
|
||||
group_not_existing = "The group doesn't exist!"
|
||||
user_not_existing = "The user doesn't seem to exist"
|
||||
not_mod_or_admin = "You can only add Moderators or Admins!"
|
||||
|
||||
[sgroup_list]
|
||||
group_success = "The group has been created!"
|
||||
|
|
|
@ -36,6 +36,7 @@ add_to_group_success = "ce user est ajoute sur la groupe!"
|
|||
user_already_added = "cet user est deja membre de la groupe!"
|
||||
group_not_existing = "cet Groupe n' existe pas!"
|
||||
user_not_existing = "cet user n'existe pas"
|
||||
not_mod_or_admin = "C'est possible d'ajoute seulement des mods et admins!"
|
||||
|
||||
[sgroup_list]
|
||||
group_success = "le group est cree!"
|
||||
|
|
|
@ -9,7 +9,12 @@ function add_user_to_sgroup(){
|
|||
$id = filter_var($_POST['target_id'],FILTER_SANITIZE_NUMBER_INT);
|
||||
$user_id = WebUsers::getId($name);
|
||||
if ($user_id != ""){
|
||||
$result['RESULT_OF_ADDING'] = Support_Group::addUserToSupportGroup($user_id, $id);
|
||||
if (Ticket_User::constr_ExternId($user_id)->getPermission()>1){
|
||||
$result['RESULT_OF_ADDING'] = Support_Group::addUserToSupportGroup($user_id, $id);
|
||||
}else{
|
||||
$result['RESULT_OF_ADDING'] = "NOT_MOD_OR_ADMIN";
|
||||
}
|
||||
|
||||
}else{
|
||||
$result['RESULT_OF_ADDING'] = "USER_NOT_EXISTING";
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 124 KiB |
|
@ -186,6 +186,7 @@
|
|||
`Author` INT UNSIGNED NOT NULL ,
|
||||
`Content` INT UNSIGNED NOT NULL ,
|
||||
`Timestamp` TIMESTAMP NULL ,
|
||||
`Hidden` TINYINT(1) NULL DEFAULT 0 ,
|
||||
PRIMARY KEY (`TReplyId`) ,
|
||||
INDEX `fk_ticket_reply_ticket_idx` (`Ticket` ASC) ,
|
||||
INDEX `fk_ticket_reply_ams_user_idx` (`Author` ASC) ,
|
||||
|
|
|
@ -145,6 +145,7 @@ CREATE TABLE IF NOT EXISTS `mydb`.`ticket_reply` (
|
|||
`Author` INT UNSIGNED NOT NULL ,
|
||||
`Content` INT UNSIGNED NOT NULL ,
|
||||
`Timestamp` TIMESTAMP NULL ,
|
||||
`Hidden` TINYINT(1) NULL DEFAULT 0 ,
|
||||
PRIMARY KEY (`TReplyId`) ,
|
||||
INDEX `fk_ticket_reply_ticket_idx` (`Ticket` ASC) ,
|
||||
INDEX `fk_ticket_reply_ams_user_idx` (`Author` ASC) ,
|
||||
|
|
Binary file not shown.
|
@ -86,6 +86,10 @@
|
|||
<div class="alert alert-error">
|
||||
{$user_not_existing}
|
||||
</div>
|
||||
{else if isset($RESULT_OF_ADDING) and $RESULT_OF_ADDING eq "NOT_MOD_OR_ADMIN"}
|
||||
<div class="alert alert-error">
|
||||
{$not_mod_or_admin}
|
||||
</div>
|
||||
{/if}
|
||||
</form>
|
||||
|
||||
|
|
Loading…
Reference in a new issue