diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/support_group.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/support_group.php index 005f775c1..c42d12efb 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/support_group.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/support_group.php @@ -60,9 +60,10 @@ class Support_Group{ * @return a string that specifies if it was a success or not (SUCCESS, SIZE_ERROR, NAME_TAKEN or TAG_TAKEN ) */ public static function createSupportGroup( $name, $tag, $groupemail, $imap_mailserver, $imap_username, $imap_password) { - - if(strlen($name) < 21 && strlen($name) > 4 &&strlen($tag) < 8 && strlen($tag) > 1 ){ + error_log( "Error at line " . __LINE__ . " in file " . __FILE__); + if(strlen($name) <= 21 && strlen($name) >= 4 &&strlen($tag) <= 8 && strlen($tag) >= 2 ){ $notExists = self::supportGroup_EntryNotExists($name, $tag); + error_log( "Error at line " . __LINE__ . " in file " . __FILE__); if ( $notExists == "SUCCESS" ){ $sGroup = new self(); $values = array('Name' => $name, 'Tag' => $tag, 'GroupEmail' => $groupemail, 'IMAP_MailServer' => $imap_mailserver, 'IMAP_Username' => $imap_username, 'IMAP_Password' => $imap_password); @@ -79,12 +80,14 @@ class Support_Group{ $sGroup->setIMAP_Password($enc_password); $sGroup->create(); - return "SUCCESS"; + error_log( "Error at line " . __LINE__ . " in file " . __FILE__); }else{ + error_log( "Error at line " . __LINE__ . " in file " . __FILE__); //return NAME_TAKEN or TAG_TAKEN return $notExists; } }else{ + error_log( "Error at line " . __LINE__ . " in file " . __FILE__); //RETURN ERROR that indicates SIZE return "SIZE_ERROR"; } diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/sgroup_list.tpl b/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/sgroup_list.tpl index 3a6dcc52f..3008b320e 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/sgroup_list.tpl +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/sgroup_list.tpl @@ -35,7 +35,7 @@

Add a Support group

-
+
diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/func/add_sgroup.php b/code/ryzom/tools/server/ryzom_ams/www/html/func/add_sgroup.php index 14a9b9f87..22fab8102 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/func/add_sgroup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/func/add_sgroup.php @@ -23,20 +23,20 @@ function add_sgroup(){ //create a new support group $result['RESULT_OF_ADDING'] = Support_Group::createSupportGroup($name, $tag, $groupemail, $imap_mailserver, $imap_username, $imap_password); - //$result['permission'] = unserialize($_SESSION['ticket_user'])->getPermission(); - //$result['no_visible_elements'] = 'FALSE'; - //$result['username'] = $_SESSION['user']; - //global $SITEBASE; - //require($SITEBASE . '/inc/sgroup_list.php'); - //$result= array_merge($result, sgroup_list()); - //return helpers :: loadtemplate( 'sgroup_list', $result, true); - if (Helpers::check_if_game_client()) { + $result['permission'] = unserialize($_SESSION['ticket_user'])->getPermission(); + $result['no_visible_elements'] = 'FALSE'; + $result['username'] = $_SESSION['user']; + global $SITEBASE; + require($SITEBASE . '/inc/sgroup_list.php'); + $result= array_merge($result, sgroup_list()); + return $result; + /*if (Helpers::check_if_game_client()) { header("Location: ".$INGAME_WEBPATH."?page=sgroup_list"); }else{ header("Location: ".$WEBPATH."?page=sgroup_list"); } exit; - + */ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/sgroup_list.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/sgroup_list.tpl index a139aec34..a8df71bd8 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/sgroup_list.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/sgroup_list.tpl @@ -51,7 +51,7 @@
- + Add a support group diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_queue.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_queue.tpl index c47227719..273322db6 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_queue.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_queue.tpl @@ -42,7 +42,7 @@