Index: /extensions/UserAdvManager/branches/2.20/GT_del_account.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/GT_del_account.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/GT_del_account.php	(revision 11019)
@@ -21,5 +21,5 @@
 $conf_UAM = unserialize($conf['UserAdvManager']);
 
-if (isset($conf_UAM[24]) and $conf_UAM[24] <> '')
+if (isset($conf_UAM[23]) and $conf_UAM[23] <> '')
 {
   // Management of Extension flags ([mygallery], [myurl]) - [username] flag can't be used here
@@ -31,7 +31,7 @@
   if (function_exists('get_user_language_desc'))
   {
-    $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[24]));
+    $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[23]));
   }
-  else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM[24]));
+  else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM[23]));
 }
     
Index: /extensions/UserAdvManager/branches/2.20/USR_del_account.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/USR_del_account.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/USR_del_account.php	(revision 11019)
@@ -21,5 +21,5 @@
 $conf_UAM = unserialize($conf['UserAdvManager']);
 
-if (isset($conf_UAM[32]) and $conf_UAM[32] <> '')
+if (isset($conf_UAM[31]) and $conf_UAM[31] <> '')
 {
   // Management of Extension flags ([mygallery], [myurl]) - [username] flag can't be used here
@@ -31,7 +31,7 @@
   if (function_exists('get_user_language_desc'))
   {
-    $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[32]));
+    $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[31]));
   }
-  else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM[32]));
+  else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM[31]));
 }
     
Index: /extensions/UserAdvManager/branches/2.20/admin/UAM_admin.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/admin/UAM_admin.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/admin/UAM_admin.php	(revision 11019)
@@ -106,5 +106,5 @@
   case 'global':
 
-	if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_No_Comment_Anonymous']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_GTAutoMail']) and isset($_POST['UAM_CustomPasswRetr']) and isset($_POST['UAM_USRAuto']) and isset($_POST['UAM_USRAutoMail']) and isset($_POST['UAM_Stuffs']) and isset($_POST['UAM_HidePassw']) and isset($_POST['UAM_GroupComm']))
+	if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_GTAutoMail']) and isset($_POST['UAM_CustomPasswRetr']) and isset($_POST['UAM_USRAuto']) and isset($_POST['UAM_USRAutoMail']) and isset($_POST['UAM_Stuffs']) and isset($_POST['UAM_HidePassw']))
   {
 
@@ -149,5 +149,4 @@
       (isset($_POST['UAM_Validated_Group'])?$_POST['UAM_Validated_Group']:''),
       (isset($_POST['UAM_Validated_Status'])?$_POST['UAM_Validated_Status']:''),
-      $_POST['UAM_No_Comment_Anonymous'],
       $_POST['UAM_Username_Char'],
       $_POST['UAM_Username_List'],
@@ -180,18 +179,9 @@
       $_POST['UAM_Stuffs'],
       $_POST['UAM_HidePassw'],
-      $_POST['UAM_GroupComm'],
-      (isset($_POST['UAM_AllowComm_Group'])?$_POST['UAM_AllowComm_Group']:''),
       );
 
     $conf['UserAdvManager'] = serialize($newconf_UAM);
 
-		$query = '
-	  	UPDATE '.CONFIG_TABLE.'
-	  	SET value="'.pwg_db_real_escape_string($conf['UserAdvManager']).'"
-	  	WHERE param="UserAdvManager"
-	  	LIMIT 1
-	  	;';
-		
-		pwg_query($query);
+    conf_update_param('UserAdvManager', pwg_db_real_escape_string($conf['UserAdvManager']));
 
     //Email confirmation settings
@@ -214,13 +204,6 @@
 
     $conf['UserAdvManager_ConfirmMail'] = serialize($newconf_UAM_ConfirmMail);
-    
-	  $query = '
-      UPDATE '.CONFIG_TABLE.'
-			SET value="'.pwg_db_real_escape_string($conf['UserAdvManager_ConfirmMail']).'"
-			WHERE param="UserAdvManager_ConfirmMail"
-			LIMIT 1
-		;';
-
-		pwg_query($query);
+
+    conf_update_param('UserAdvManager_ConfirmMail', pwg_db_real_escape_string($conf['UserAdvManager_ConfirmMail']));
 
 		array_push($page['infos'], l10n('UAM_save_config'));
@@ -259,5 +242,4 @@
   $Valid = -1;
   $Downgrade = -1;
-  $AllowComm = -1;
 	
   //Check groups list in database 
@@ -284,12 +266,7 @@
 		}
     //configuration value for downgrade users
-    if (isset($conf_UAM[26]) and $conf_UAM[26] == $row['id'])
+    if (isset($conf_UAM[25]) and $conf_UAM[25] == $row['id'])
 		{
 	  	$Downgrade = $row['id'];
-		}
-    //configuration value for users group allowed to post comments
-    if (isset($conf_UAM[37]) and $conf_UAM[37] == $row['id'])
-		{
-	  	$AllowComm = $row['id'];
 		}
   }
@@ -319,12 +296,4 @@
 			)
   	);
-  //Template initialization for allowed group for comments
-  $template->assign(
-    'AllowComm_Group',
-		array(
-      'group_options'=> $groups,
-      'group_selected' => $AllowComm
-			)
-  	);
 	
   //Status setting for unvalidated, validated users and downgrade status
@@ -338,5 +307,5 @@
   {
 	  $status_options[$status] = l10n('user_status_'.$status);
-	  if (isset($conf_UAM[8]) and $conf_UAM[8] == $status)
+	  if (isset($conf_UAM[7]) and $conf_UAM[7] == $status)
 	  {
 	    $No_Valid_Status = $status;
@@ -376,5 +345,5 @@
   {
 	  $status_options[$status] = l10n('user_status_'.$status);
-	  if (isset($conf_UAM[27]) and $conf_UAM[27] == $status)
+	  if (isset($conf_UAM[26]) and $conf_UAM[26] == $status)
 		{
 		  $Downgrade_Status = $status;
@@ -412,60 +381,55 @@
 		'UAM_MAIL_INFO_TRUE'             => $conf_UAM[0]=='true' ?  'checked="checked"' : '' ,
 		'UAM_MAIL_INFO_FALSE'            => $conf_UAM[0]=='false' ?  'checked="checked"' : '' ,
-		'UAM_MAILINFO_TEXT'              => $conf_UAM[9],
-		'UAM_USERNAME_CHAR_TRUE'         => $conf_UAM[6]=='true' ?  'checked="checked"' : '' ,
-		'UAM_USERNAME_CHAR_FALSE'        => $conf_UAM[6]=='false' ?  'checked="checked"' : '' ,
-		'UAM_USERNAME_CHAR_LIST'         => $conf_UAM[7],
+		'UAM_MAILINFO_TEXT'              => $conf_UAM[8],
+		'UAM_USERNAME_CHAR_TRUE'         => $conf_UAM[5]=='true' ?  'checked="checked"' : '' ,
+		'UAM_USERNAME_CHAR_FALSE'        => $conf_UAM[5]=='false' ?  'checked="checked"' : '' ,
+		'UAM_USERNAME_CHAR_LIST'         => $conf_UAM[6],
 		'UAM_CONFIRM_MAIL_TRUE'          => $conf_UAM[1]=='true' ?  'checked="checked"' : '' ,
 		'UAM_CONFIRM_MAIL_FALSE'         => $conf_UAM[1]=='false' ?  'checked="checked"' : '' ,
     'UAM_CONFIRM_MAIL_LOCAL'         => $conf_UAM[1]=='local' ?  'checked="checked"' : '' ,
-		'UAM_CONFIRMMAIL_TEXT'           => $conf_UAM[10],
+		'UAM_CONFIRMMAIL_TEXT'           => $conf_UAM[9],
 		'UAM_No_Confirm_Group'           => $conf_UAM[2],
 		'UAM_Validated_Group'            => $conf_UAM[3],
-		'UAM_No_Confirm_Status'          => $conf_UAM[8],
+		'UAM_No_Confirm_Status'          => $conf_UAM[7],
 		'UAM_Validated_Status'           => $conf_UAM[4],
-		'UAM_NO_COMMENT_ANO_TRUE'        => $conf_UAM[5]=='true' ?  'checked="checked"' : '' ,
-		'UAM_NO_COMMENT_ANO_FALSE'       => $conf_UAM[5]=='false' ?  'checked="checked"' : '' ,
-		'UAM_MAILEXCLUSION_TRUE'         => $conf_UAM[11]=='true' ?  'checked="checked"' : '' ,
-		'UAM_MAILEXCLUSION_FALSE'        => $conf_UAM[11]=='false' ?  'checked="checked"' : '' ,
-		'UAM_MAILEXCLUSION_LIST'         => $conf_UAM[12],
-		'UAM_PASSWORDENF_TRUE'           => $conf_UAM[13]=='true' ?  'checked="checked"' : '' ,
-		'UAM_PASSWORDENF_FALSE'          => $conf_UAM[13]=='false' ?  'checked="checked"' : '' ,
-		'UAM_PASSWORD_SCORE'             => $conf_UAM[14],
-    'UAM_ADMINPASSWENF_TRUE'         => $conf_UAM[15]=='true' ?  'checked="checked"' : '' ,
-		'UAM_ADMINPASSWENF_FALSE'        => $conf_UAM[15]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GHOSTRACKER_TRUE'           => $conf_UAM[16]=='true' ?  'checked="checked"' : '' ,
-		'UAM_GHOSTRACKER_FALSE'          => $conf_UAM[16]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GHOSTRACKER_DAYLIMIT'       => $conf_UAM[17],
-    'UAM_GHOSTRACKER_REMINDERTEXT'   => $conf_UAM[18],
-    'UAM_ADDLASTVISIT_TRUE'          => $conf_UAM[19]=='true' ?  'checked="checked"' : '' ,
-    'UAM_ADDLASTVISIT_FALSE'         => $conf_UAM[19]=='false' ?  'checked="checked"' : '' ,
-    'UAM_ADMINCONFMAIL_TRUE'         => $conf_UAM[20]=='true' ?  'checked="checked"' : '' ,
-    'UAM_ADMINCONFMAIL_FALSE'        => $conf_UAM[20]=='false' ?  'checked="checked"' : '' ,
-    'UAM_REDIRTOPROFILE_TRUE'        => $conf_UAM[21]=='true' ?  'checked="checked"' : '' ,
-    'UAM_REDIRTOPROFILE_FALSE'       => $conf_UAM[21]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GTAUTO_TRUE'                => $conf_UAM[22]=='true' ?  'checked="checked"' : '' ,
-    'UAM_GTAUTO_FALSE'               => $conf_UAM[22]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GTAUTOMAIL_TRUE'            => $conf_UAM[23]=='true' ?  'checked="checked"' : '' ,
-    'UAM_GTAUTOMAIL_FALSE'           => $conf_UAM[23]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GTAUTODEL_TEXT'             => $conf_UAM[24],
-    'UAM_GTAUTOMAILTEXT'             => $conf_UAM[25],
-		'UAM_Downgrade_Group'            => $conf_UAM[26],
-		'UAM_Downgrade_Status'           => $conf_UAM[27],
-    'UAM_ADMINVALIDATIONMAIL_TEXT'   => $conf_UAM[28],
-    'UAM_CUSTOMPASSWRETR_TRUE'       => $conf_UAM[29]=='true' ?  'checked="checked"' : '' ,
-    'UAM_CUSTOMPASSWRETR_FALSE'      => $conf_UAM[29]=='false' ?  'checked="checked"' : '' ,
-    'UAM_CUSTOMPASSWRETR_TEXT'       => $conf_UAM[30],
-    'UAM_USRAUTO_TRUE'               => $conf_UAM[31]=='true' ?  'checked="checked"' : '' ,
-    'UAM_USRAUTO_FALSE'              => $conf_UAM[31]=='false' ?  'checked="checked"' : '' ,
-    'UAM_USRAUTODEL_TEXT'            => $conf_UAM[32],
-    'UAM_USRAUTOMAIL_TRUE'           => $conf_UAM[33]=='true' ?  'checked="checked"' : '' ,
-    'UAM_USRAUTOMAIL_FALSE'          => $conf_UAM[33]=='false' ?  'checked="checked"' : '' ,
-    'UAM_STUFFS_TRUE'                => $conf_UAM[34]=='true' ?  'checked="checked"' : '' ,
-    'UAM_STUFFS_FALSE'               => $conf_UAM[34]=='false' ?  'checked="checked"' : '' ,
-    'UAM_HIDEPASSW_TRUE'             => $conf_UAM[35]=='true' ?  'checked="checked"' : '' ,
-    'UAM_HIDEPASSW_FALSE'            => $conf_UAM[35]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GROUPCOMM_TRUE'             => $conf_UAM[36]=='true' ?  'checked="checked"' : '' ,
-    'UAM_GROUPCOMM_FALSE'            => $conf_UAM[36]=='false' ?  'checked="checked"' : '' ,
-    'UAM_ALLOWCOMM_GROUP'            => $conf_UAM[37],
+		'UAM_MAILEXCLUSION_TRUE'         => $conf_UAM[10]=='true' ?  'checked="checked"' : '' ,
+		'UAM_MAILEXCLUSION_FALSE'        => $conf_UAM[10]=='false' ?  'checked="checked"' : '' ,
+		'UAM_MAILEXCLUSION_LIST'         => $conf_UAM[11],
+		'UAM_PASSWORDENF_TRUE'           => $conf_UAM[12]=='true' ?  'checked="checked"' : '' ,
+		'UAM_PASSWORDENF_FALSE'          => $conf_UAM[12]=='false' ?  'checked="checked"' : '' ,
+		'UAM_PASSWORD_SCORE'             => $conf_UAM[13],
+    'UAM_ADMINPASSWENF_TRUE'         => $conf_UAM[14]=='true' ?  'checked="checked"' : '' ,
+		'UAM_ADMINPASSWENF_FALSE'        => $conf_UAM[14]=='false' ?  'checked="checked"' : '' ,
+    'UAM_GHOSTRACKER_TRUE'           => $conf_UAM[15]=='true' ?  'checked="checked"' : '' ,
+		'UAM_GHOSTRACKER_FALSE'          => $conf_UAM[15]=='false' ?  'checked="checked"' : '' ,
+    'UAM_GHOSTRACKER_DAYLIMIT'       => $conf_UAM[16],
+    'UAM_GHOSTRACKER_REMINDERTEXT'   => $conf_UAM[17],
+    'UAM_ADDLASTVISIT_TRUE'          => $conf_UAM[18]=='true' ?  'checked="checked"' : '' ,
+    'UAM_ADDLASTVISIT_FALSE'         => $conf_UAM[18]=='false' ?  'checked="checked"' : '' ,
+    'UAM_ADMINCONFMAIL_TRUE'         => $conf_UAM[19]=='true' ?  'checked="checked"' : '' ,
+    'UAM_ADMINCONFMAIL_FALSE'        => $conf_UAM[19]=='false' ?  'checked="checked"' : '' ,
+    'UAM_REDIRTOPROFILE_TRUE'        => $conf_UAM[20]=='true' ?  'checked="checked"' : '' ,
+    'UAM_REDIRTOPROFILE_FALSE'       => $conf_UAM[20]=='false' ?  'checked="checked"' : '' ,
+    'UAM_GTAUTO_TRUE'                => $conf_UAM[21]=='true' ?  'checked="checked"' : '' ,
+    'UAM_GTAUTO_FALSE'               => $conf_UAM[21]=='false' ?  'checked="checked"' : '' ,
+    'UAM_GTAUTOMAIL_TRUE'            => $conf_UAM[22]=='true' ?  'checked="checked"' : '' ,
+    'UAM_GTAUTOMAIL_FALSE'           => $conf_UAM[22]=='false' ?  'checked="checked"' : '' ,
+    'UAM_GTAUTODEL_TEXT'             => $conf_UAM[23],
+    'UAM_GTAUTOMAILTEXT'             => $conf_UAM[24],
+		'UAM_Downgrade_Group'            => $conf_UAM[25],
+		'UAM_Downgrade_Status'           => $conf_UAM[26],
+    'UAM_ADMINVALIDATIONMAIL_TEXT'   => $conf_UAM[27],
+    'UAM_CUSTOMPASSWRETR_TRUE'       => $conf_UAM[28]=='true' ?  'checked="checked"' : '' ,
+    'UAM_CUSTOMPASSWRETR_FALSE'      => $conf_UAM[28]=='false' ?  'checked="checked"' : '' ,
+    'UAM_CUSTOMPASSWRETR_TEXT'       => $conf_UAM[29],
+    'UAM_USRAUTO_TRUE'               => $conf_UAM[30]=='true' ?  'checked="checked"' : '' ,
+    'UAM_USRAUTO_FALSE'              => $conf_UAM[30]=='false' ?  'checked="checked"' : '' ,
+    'UAM_USRAUTODEL_TEXT'            => $conf_UAM[31],
+    'UAM_USRAUTOMAIL_TRUE'           => $conf_UAM[32]=='true' ?  'checked="checked"' : '' ,
+    'UAM_USRAUTOMAIL_FALSE'          => $conf_UAM[32]=='false' ?  'checked="checked"' : '' ,
+    'UAM_STUFFS_TRUE'                => $conf_UAM[33]=='true' ?  'checked="checked"' : '' ,
+    'UAM_STUFFS_FALSE'               => $conf_UAM[33]=='false' ?  'checked="checked"' : '' ,
+    'UAM_HIDEPASSW_TRUE'             => $conf_UAM[34]=='true' ?  'checked="checked"' : '' ,
+    'UAM_HIDEPASSW_FALSE'            => $conf_UAM[34]=='false' ?  'checked="checked"' : '' ,
 		'UAM_PASSWORD_TEST_SCORE'        => $UAM_Password_Test_Score,
     'UAM_ERROR_REPORTS4'             => $UAM_Exclusionlist_Error,
@@ -487,5 +451,5 @@
 		
     //Username without forbidden keys
-    if ( isset($conf_UAM[6]) and $conf_UAM[6] == 'true' )
+    if ( isset($conf_UAM[5]) and $conf_UAM[5] == 'true' )
 	  {
 			$query = "
@@ -506,5 +470,5 @@
 		
     //Email without forbidden domain
-    if ( isset($conf_UAM[11]) and $conf_UAM[11] == 'true' )
+    if ( isset($conf_UAM[10]) and $conf_UAM[10] == 'true' )
 	  {
 			$query = "
@@ -517,5 +481,5 @@
 		  while($row = pwg_db_fetch_assoc($result))
 		  {
-			  $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[12]);
+			  $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[11]);
 			  for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++)
 			  {
@@ -572,5 +536,5 @@
   $conf_UAM = unserialize($conf['UserAdvManager']);
   
-  if (isset($conf_UAM[19]) and $conf_UAM[19]=='true')
+  if (isset($conf_UAM[18]) and $conf_UAM[18]=='true')
   {
 // +-----------------------------------------------------------------------+
@@ -621,17 +585,17 @@
       $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days
       
-      if (isset($conf_UAM[16]) and $conf_UAM[16]=='true' and $conf_UAM[17] <> '')
+      if (isset($conf_UAM[15]) and $conf_UAM[15]=='true' and $conf_UAM[16] <> '')
       {
-        if ($deltadays <= ($conf_UAM[17]/2))
+        if ($deltadays <= ($conf_UAM[16]/2))
         {
           $display = 'green';
         }
         
-        if (($deltadays > ($conf_UAM[17]/2)) and ($deltadays < $conf_UAM[17]))
+        if (($deltadays > ($conf_UAM[16]/2)) and ($deltadays < $conf_UAM[16]))
         {
           $display = 'orange';
         }
         
-        if ($deltadays >= $conf_UAM[17])
+        if ($deltadays >= $conf_UAM[16])
         {
           $display = 'red';
@@ -695,5 +659,5 @@
   $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
 	
-  if (isset($conf_UAM[1]) and ($conf_UAM[1]=='true' or $conf_UAM[1]=='local') and ((isset($conf_UAM[2]) and $conf_UAM[2] <> '-1') or (isset($conf_UAM[8]) and $conf_UAM[8] <> '-1')))
+  if (isset($conf_UAM[1]) and ($conf_UAM[1]=='true' or $conf_UAM[1]=='local') and ((isset($conf_UAM[2]) and $conf_UAM[2] <> '-1') or (isset($conf_UAM[7]) and $conf_UAM[7] <> '-1')))
   {
 // +-----------------------------------------------------------------------+
@@ -1209,5 +1173,5 @@
   $conf_UAM = unserialize($conf['UserAdvManager']);
 	
-  if (isset($conf_UAM[16]) and $conf_UAM[16]=='true')
+  if (isset($conf_UAM[16]) and $conf_UAM[15]=='true')
   {
 // +-----------------------------------------------------------------------+
Index: /extensions/UserAdvManager/branches/2.20/admin/template/global.tpl
===================================================================
--- /extensions/UserAdvManager/branches/2.20/admin/template/global.tpl	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/admin/template/global.tpl	(revision 11019)
@@ -666,42 +666,4 @@
 
             <li>
-              <label class="cluetip" title="{'UAM_commentTitle'|translate}|{'UAM_commentTitle_d'|translate}">
-                {'UAM_No_Comment_Anonymous'|@translate}
-              </label>
-            <br><br>
-              <input type="radio" value="false" {$UAM_NO_COMMENT_ANO_FALSE} name="UAM_No_Comment_Anonymous">
-                {'UAM_Disable'|@translate}
-            <br>
-              <input type="radio" value="true" {$UAM_NO_COMMENT_ANO_TRUE} name="UAM_No_Comment_Anonymous">
-                {'UAM_Enable'|@translate}
-            <br><br>
-            </li>
-
-            <li>
-              <label class="cluetip" title="{'UAM_GroupCommTitle'|translate}|{'UAM_GroupCommTitle_d'|translate}">
-                {'UAM_Group_Comments'|@translate}
-              </label>
-            <br><br>
-              <input type="radio" value="false" {$UAM_GROUPCOMM_FALSE} name="UAM_GroupComm">
-                {'UAM_Disable'|@translate}
-            <br>
-              <input type="radio" value="true" {$UAM_GROUPCOMM_TRUE} name="UAM_GroupComm">
-                {'UAM_Enable'|@translate}
-            <br><br>
-              <ul>
-                <li>
-                  <label>
-                    {'UAM_AllowedComm_Group'|@translate}
-                  </label>
-                <br><br>
-                  <div id="uam_leftmargin">
-                    {html_options name="UAM_AllowComm_Group" options=$AllowComm_Group.group_options selected=$AllowComm_Group.group_selected}
-                  </div>
-                </li>
-              </ul>
-            <br><br>
-            </li>
-
-            <li>
               <label class="cluetip" title="{'UAM_RedirTitle'|translate}|{'UAM_RedirTitle_d'|translate}">
                 {'UAM_RedirToProfile'|@translate}
Index: /extensions/UserAdvManager/branches/2.20/changelog.txt.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/changelog.txt.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/changelog.txt.php	(revision 11019)
@@ -251,5 +251,7 @@
 -- 2.20.7 : Use pwg_db_real_escape_string() instead of addslashes()
             Database upgrade process simplied (using version_compare() and code refactoring)
-            Bug 2253 fixed - New feature to allow comments on pictures only for specific users (who belong to a group) when "comments for all" is set
+            Bug 2253 fixed - New feature to allow comments on pictures only for specific users (who belong to a group) when "comments for all" is disabled
+
+-- 2.20.8 : Remove all options related to comments because they are processed in new "Comments Access Manager" plugin.
 */
 ?>
Index: /extensions/UserAdvManager/branches/2.20/include/functions.inc.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/include/functions.inc.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/include/functions.inc.php	(revision 11019)
@@ -42,5 +42,5 @@
   if (!is_admin() and !is_a_guest() and $user['username'] != "16" and $user['username'] != "18")
   {
-    if ((isset($conf_UAM[16]) and $conf_UAM[16] == 'true') or (isset($conf_UAM[19]) and $conf_UAM[19] == 'true'))
+    if ((isset($conf_UAM[15]) and $conf_UAM[15] == 'true') or (isset($conf_UAM[18]) and $conf_UAM[18] == 'true'))
     {
 
@@ -116,10 +116,10 @@
     elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true' or $conf_UAM[0] == 'false') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'true'))
     {
-      if (is_admin() and isset($conf_UAM[20]) and $conf_UAM[20] == 'true')
+      if (is_admin() and isset($conf_UAM[19]) and $conf_UAM[19] == 'true')
       {
         $passwd = (isset($_POST['password'])) ? $_POST['password'] : '';
         SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true); 
       }
-      elseif (is_admin() and isset($conf_UAM[20]) and $conf_UAM[20] == 'false')
+      elseif (is_admin() and isset($conf_UAM[19]) and $conf_UAM[19] == 'false')
       {
         $passwd = (isset($_POST['password'])) ? $_POST['password'] : '';
@@ -171,5 +171,5 @@
 
     // Password enforcement control
-    if (isset($conf_UAM[13]) and $conf_UAM[13] == 'true' and !empty($conf_UAM[14]))
+    if (isset($conf_UAM[12]) and $conf_UAM[12] == 'true' and !empty($conf_UAM[13]))
     {
       if (!empty($user['password']) and !is_admin())
@@ -177,19 +177,19 @@
         $PasswordCheck = testpassword($user['password']);
   
-        if ($PasswordCheck < $conf_UAM[14])
+        if ($PasswordCheck < $conf_UAM[13])
         {
           $message = get_l10n_args('UAM_reg_err_login4_%s', $PasswordCheck);
-          $lang['reg_err_pass'] = l10n_args($message).$conf_UAM[14];
+          $lang['reg_err_pass'] = l10n_args($message).$conf_UAM[13];
           array_push($errors, $lang['reg_err_pass']);
         }
       }
-      else if (!empty($user['password']) and is_admin() and isset($conf_UAM[15]) and $conf_UAM[15] == 'true')
+      else if (!empty($user['password']) and is_admin() and isset($conf_UAM[14]) and $conf_UAM[14] == 'true')
       {
         $PasswordCheck = testpassword($user['password']);
   
-        if ($PasswordCheck < $conf_UAM[14])
+        if ($PasswordCheck < $conf_UAM[13])
         {
           $message = get_l10n_args('UAM_reg_err_login4_%s', $PasswordCheck);
-          $lang['reg_err_pass'] = l10n_args($message).$conf_UAM[14];
+          $lang['reg_err_pass'] = l10n_args($message).$conf_UAM[13];
           array_push($errors, $lang['reg_err_pass']);
         }
@@ -198,14 +198,14 @@
 
     // Username without forbidden keys
-    if (isset($conf_UAM[6]) and $conf_UAM[6] == 'true' and !empty($user['username']) and ValidateUsername($user['username']) and !is_admin())
-    {
-      $lang['reg_err_login1'] = l10n('UAM_reg_err_login2')."'".$conf_UAM[7]."'";
+    if (isset($conf_UAM[5]) and $conf_UAM[5] == 'true' and !empty($user['username']) and ValidateUsername($user['username']) and !is_admin())
+    {
+      $lang['reg_err_login1'] = l10n('UAM_reg_err_login2')."'".$conf_UAM[6]."'";
       array_push($errors, $lang['reg_err_login1']);
     }
 
     // Email without forbidden domains
-    if (isset($conf_UAM[11]) and $conf_UAM[11] == 'true' and !empty($user['email']) and ValidateEmailProvider($user['email']) and !is_admin())
-    {
-      $lang['reg_err_login1'] = l10n('UAM_reg_err_login5')."'".$conf_UAM[12]."'";
+    if (isset($conf_UAM[10]) and $conf_UAM[10] == 'true' and !empty($user['email']) and ValidateEmailProvider($user['email']) and !is_admin())
+    {
+      $lang['reg_err_login1'] = l10n('UAM_reg_err_login5')."'".$conf_UAM[11]."'";
       array_push($errors, $lang['reg_err_login1']);
     }
@@ -224,5 +224,5 @@
   $conf_UAM = unserialize($conf['UserAdvManager']);
     
-  if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true'))
+  if ((isset($conf_UAM[20]) and $conf_UAM[20] == 'true'))
   {
     $user_idsOK = array();
@@ -243,9 +243,9 @@
   {
     // Email without forbidden domains
-    if (isset($conf_UAM[11]) and $conf_UAM[11] == 'true' and !empty($_POST['mail_address']))
+    if (isset($conf_UAM[10]) and $conf_UAM[10] == 'true' and !empty($_POST['mail_address']))
     {
       if (ValidateEmailProvider($_POST['mail_address']))
       {
-        $template->append('errors', l10n('UAM_reg_err_login5')."'".$conf_UAM[12]."'");
+        $template->append('errors', l10n('UAM_reg_err_login5')."'".$conf_UAM[11]."'");
         unset($_POST['validate']);
       }
@@ -259,12 +259,12 @@
 
       // Password enforcement control
-      if (isset($conf_UAM[13]) and $conf_UAM[13] == 'true' and !empty($conf_UAM[14]))
+      if (isset($conf_UAM[12]) and $conf_UAM[12] == 'true' and !empty($conf_UAM[13]))
       {
         $PasswordCheck = testpassword($_POST['use_new_pwd']);
 
-        if ($PasswordCheck < $conf_UAM[14])
+        if ($PasswordCheck < $conf_UAM[13])
         {
           $message = get_l10n_args('UAM_reg_err_login4_%s', $PasswordCheck);
-          $template->append('errors', l10n_args($message).$conf_UAM[14]);
+          $template->append('errors', l10n_args($message).$conf_UAM[13]);
           unset($_POST['use_new_pwd']);
           unset($_POST['validate']);
@@ -330,5 +330,5 @@
   
   // Performing GhostTracker scheduled tasks
-  if ((isset($conf_UAM[22]) and $conf_UAM[22] == 'true'))
+  if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true'))
   {
     UAM_GT_ScheduledTasks();
@@ -336,10 +336,10 @@
 
   // Performing User validation scheduled tasks
-  if ((isset($conf_UAM[31]) and $conf_UAM[31] == 'true'))
+  if ((isset($conf_UAM[30]) and $conf_UAM[30] == 'true'))
   {
     UAM_USR_ScheduledTasks();
   }
 
-  if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true'))
+  if ((isset($conf_UAM[20]) and $conf_UAM[20] == 'true'))
   {
     // Performing redirection  
@@ -408,5 +408,5 @@
 
   // Ghost accounts auto group or status downgrade with or without information email sending and autodeletion if user already reminded
-  if ((isset($conf_UAM[22]) and $conf_UAM[22] == 'true') and ((isset($conf_UAM[26]) and $conf_UAM[26] <> -1) or (isset($conf_UAM[27]) and $conf_UAM[27] <> -1)))
+  if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true') and ((isset($conf_UAM[25]) and $conf_UAM[25] <> -1) or (isset($conf_UAM[26]) and $conf_UAM[26] <> -1)))
   {
     if (count($collection) > 0)
@@ -492,9 +492,9 @@
 
             // Change user status
-            if ($conf_UAM[27] <> -1)
+            if ($conf_UAM[26] <> -1)
             {
               $query = "
 UPDATE ".USER_INFOS_TABLE."
-SET status = '".$conf_UAM[27]."'
+SET status = '".$conf_UAM[26]."'
 WHERE user_id = '".$user_id."'
 ;";
@@ -503,5 +503,5 @@
 
             // Change user group
-            if ($conf_UAM[26] <> -1)
+            if ($conf_UAM[25] <> -1)
             {
               $query = "
@@ -509,5 +509,5 @@
   (user_id, group_id)
 VALUES
-  ('".$user_id."', '".$conf_UAM[26]."')
+  ('".$user_id."', '".$conf_UAM[25]."')
 ;";
               pwg_query($query);
@@ -515,5 +515,5 @@
 
             // Auto send email notification on group / status downgrade
-            if (isset($conf_UAM[23]) and $conf_UAM[23] == 'true')
+            if (isset($conf_UAM[22]) and $conf_UAM[22] == 'true')
             {
               // Set reminder true
@@ -586,5 +586,5 @@
 
   // Unvalidated accounts auto email sending and autodeletion if user already reminded
-  if ((isset($conf_UAM[31]) and $conf_UAM[31] == 'true'))
+  if ((isset($conf_UAM[30]) and $conf_UAM[30] == 'true'))
   {
     if (count($collection) > 0)
@@ -611,5 +611,5 @@
 
         // If never reminded before, send reminder and set reminder True
-        if (!$reminder and isset($conf_UAM[33]) and $conf_UAM[33] == 'true')
+        if (!$reminder and isset($conf_UAM[32]) and $conf_UAM[32] == 'true')
         {
      		  $typemail = 1;
@@ -660,5 +660,5 @@
 
           // If never reminded before, send reminder and set reminder True
-          if (!$reminder and isset($conf_UAM[33]) and $conf_UAM[33] == 'true')
+          if (!$reminder and isset($conf_UAM[32]) and $conf_UAM[32] == 'true')
           {
             $typemail = 1;
@@ -704,7 +704,7 @@
     {
       // Email without forbidden domains
-      if (isset($conf_UAM[11]) and $conf_UAM[11] == 'true' and !empty($_POST['email']) and ValidateEmailProvider($_POST['email']))
+      if (isset($conf_UAM[10]) and $conf_UAM[10] == 'true' and !empty($_POST['email']) and ValidateEmailProvider($_POST['email']))
       {
-        $template->append('errors', l10n('UAM_reg_err_login5')."'".$conf_UAM[12]."'");
+        $template->append('errors', l10n('UAM_reg_err_login5')."'".$conf_UAM[11]."'");
         unset($_POST['submit_add']);
       }
@@ -733,5 +733,5 @@
   $conf_UAM = unserialize($conf['UserAdvManager']);
   
-  if (isset($conf_UAM[29]) and $conf_UAM[29] == 'true')
+  if (isset($conf_UAM[28]) and $conf_UAM[28] == 'true')
   {
     // Management of Extension flags ([mygallery], [myurl])
@@ -743,50 +743,7 @@
     $replacements[] = $conf['gallery_url'];
     
-    $infos = preg_replace($patterns, $replacements, $conf_UAM[30])."\n"."\n".$infos;
+    $infos = preg_replace($patterns, $replacements, $conf_UAM[29])."\n"."\n".$infos;
   }
   return $infos;
-}
-
-
-/**
- * Triggered on user_comment_check
- * 
- * checks if author is mandatory and set on comments post when comments for all is set
- * 
- * cheks if author is in an allowed group to post comment when comments for all is not set
- *
- * @param : comment action, comment
- * 
- * @return : comment action
- * 
- */
-function UAM_CheckEmptyCommentAuthor($comment_action, $comm)
-{
-  load_language('plugin.lang', UAM_PATH);
-  global $infos, $conf, $user;
-
-  $conf_UAM = unserialize($conf['UserAdvManager']);
-
-// Does not allow empty author name on comments for all
-  if (isset($conf_UAM[5]) and $conf_UAM[5] == 'true' and $comm['author'] == 'guest' and $conf['comments_forall'])
-  {
-    $comment_action = 'reject';
-
-    array_push($infos, l10n('UAM_Empty Author'));
-  }
-
-
-// Do not allow comments if user is not in an allowed group
-  if (isset($conf_UAM[36]) and $conf_UAM[36] == 'true' and !$conf['comments_forall'])
-  {
-    if (!UAM_CheckAuthor($comm['author']))
-    {
-      $comment_action = 'reject';
-
-      array_push($infos, l10n('UAM_Not_Allowed_Author'));
-    }
-  }
-
-  return $comment_action;
 }
 
@@ -838,5 +795,5 @@
       $password = $password <> '' ? $password : l10n('UAM_empty_pwd');
       
-      if (isset($conf_UAM[9]) and $conf_UAM[9] <> '')
+      if (isset($conf_UAM[8]) and $conf_UAM[8] <> '')
       {
         // Management of Extension flags ([username], [mygallery], [myurl])
@@ -850,7 +807,7 @@
         if (function_exists('get_user_language_desc'))
         {
-          $infos1_perso = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[9]))."\n\n";
+          $infos1_perso = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[8]))."\n\n";
         }
-        else $infos1_perso = l10n(preg_replace($patterns, $replacements, $conf_UAM[9]))."\n\n"; 
+        else $infos1_perso = l10n(preg_replace($patterns, $replacements, $conf_UAM[8]))."\n\n"; 
       }
       
@@ -872,5 +829,5 @@
   if (isset($conf_UAM[0]) and $conf_UAM[0] == 'true')
   {
-    if (isset($conf_UAM[35]) and $conf_UAM[35] == 'true') // Allow display of clear password in email
+    if (isset($conf_UAM[34]) and $conf_UAM[34] == 'true') // Allow display of clear password in email
     {
       $infos1 = array(
@@ -901,5 +858,5 @@
     );
 
-    if (isset($conf_UAM[10]) and $conf_UAM[10] <> '')
+    if (isset($conf_UAM[9]) and $conf_UAM[9] <> '')
     {
       // Management of Extension flags ([username], [mygallery], [myurl])
@@ -913,7 +870,7 @@
       if (function_exists('get_user_language_desc'))
       {
-        $infos2_perso = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[10]))."\n\n";
+        $infos2_perso = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[9]))."\n\n";
       }
-      else $infos2_perso = l10n(preg_replace($patterns, $replacements, $conf_UAM[10]))."\n\n";
+      else $infos2_perso = l10n(preg_replace($patterns, $replacements, $conf_UAM[9]))."\n\n";
     }
   }
@@ -1096,5 +1053,5 @@
   $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Ghost_reminder_of_%s', $username));     
 
-  if (isset($conf_UAM[18]) and $conf_UAM[18] <> '' and isset($conf_UAM[16]) and $conf_UAM[16] == 'true')
+  if (isset($conf_UAM[17]) and $conf_UAM[17] <> '' and isset($conf_UAM[15]) and $conf_UAM[15] == 'true')
   {
     // Management of Extension flags ([username], [mygallery], [myurl])
@@ -1108,9 +1065,9 @@
     if (function_exists('get_user_language_desc'))
     {
-      $infos1 = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[18]))."\n\n";
+      $infos1 = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[17]))."\n\n";
     }
     else
     {
-      $infos1 = l10n(preg_replace($patterns, $replacements, $conf_UAM[18]))."\n\n";
+      $infos1 = l10n(preg_replace($patterns, $replacements, $conf_UAM[17]))."\n\n";
     }
 
@@ -1169,5 +1126,5 @@
   $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Demotion of %s', stripslashes($username)));
       
-  if (isset($conf_UAM[25]) and $conf_UAM[25] <> '')
+  if (isset($conf_UAM[24]) and $conf_UAM[24] <> '')
   {
     // Management of Extension flags ([username], [mygallery], [myurl])
@@ -1181,7 +1138,7 @@
     if (function_exists('get_user_language_desc'))
     {
-      $custom_txt = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[25]))."\n\n";
-    }
-    else $custom_txt = l10n(preg_replace($patterns, $replacements, $conf_UAM[25]))."\n\n"; 
+      $custom_txt = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[24]))."\n\n";
+    }
+    else $custom_txt = l10n(preg_replace($patterns, $replacements, $conf_UAM[24]))."\n\n"; 
   }
 
@@ -1260,5 +1217,5 @@
   $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Validation of %s', stripslashes($result['username'])));
       
-  if (isset($conf_UAM[28]) and $conf_UAM[28] <> '')
+  if (isset($conf_UAM[27]) and $conf_UAM[27] <> '')
   {
     // Management of Extension flags ([username], [mygallery], [myurl])
@@ -1272,7 +1229,7 @@
     if (function_exists('get_user_language_desc'))
     {
-      $custom_txt = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[28]))."\n\n";
-    }
-    else $custom_txt = l10n(preg_replace($patterns, $replacements, $conf_UAM[28]))."\n\n"; 
+      $custom_txt = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[27]))."\n\n";
+    }
+    else $custom_txt = l10n(preg_replace($patterns, $replacements, $conf_UAM[27]))."\n\n"; 
   }
 
@@ -1365,9 +1322,9 @@
 
     // Set user unvalidated status
-    if (!is_admin() and $conf_UAM[8] <> -1)
+    if (!is_admin() and $conf_UAM[7] <> -1)
     {
       $query = "
 UPDATE ".USER_INFOS_TABLE."
-SET status = '".$conf_UAM[8]."'
+SET status = '".$conf_UAM[7]."'
 WHERE user_id = '".$user_id."'
 ;";
@@ -1416,9 +1373,9 @@
   pwg_query($query);
 
-  if (!is_admin() and $conf_UAM[8] <> -1)
+  if (!is_admin() and $conf_UAM[7] <> -1)
   {
     $query = "
 UPDATE ".USER_INFOS_TABLE."
-SET status = '".$conf_UAM[8]."'
+SET status = '".$conf_UAM[7]."'
 WHERE user_id = '".$user_id."'
 ;";
@@ -1852,7 +1809,7 @@
   $conf_UAM = unserialize($conf['UserAdvManager']);
 
-  if (isset($login) and isset($conf_UAM[7]) and $conf_UAM[7] <> '')
-  {
-    $conf_CharExclusion = preg_split("/,/",$conf_UAM[7]);
+  if (isset($login) and isset($conf_UAM[6]) and $conf_UAM[6] <> '')
+  {
+    $conf_CharExclusion = preg_split("/,/",$conf_UAM[6]);
     for ($i = 0 ; $i < count($conf_CharExclusion) ; $i++)
     {
@@ -1886,7 +1843,7 @@
   $conf_UAM = unserialize($conf['UserAdvManager']);
   
-	if (isset($email) and isset($conf_UAM[12]) and $conf_UAM[12] <> '')
+	if (isset($email) and isset($conf_UAM[11]) and $conf_UAM[11] <> '')
 	{
-		$conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[12]);
+		$conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[11]);
 		for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++)
 		{
@@ -1940,15 +1897,15 @@
   OR TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) < "'.$conf_UAM_ConfirmMail[1].'")';
 
-	if ($conf_UAM[2] <> '-1' and $conf_UAM[8] == '-1')
+	if ($conf_UAM[2] <> '-1' and $conf_UAM[7] == '-1')
   {
     $query.= '
   AND ug.group_id = '.$conf_UAM[2];
   }
-  if ($conf_UAM[2] == '-1' and $conf_UAM[8] <> '-1')
+  if ($conf_UAM[2] == '-1' and $conf_UAM[7] <> '-1')
   {
     $query.= '
-  AND ui.status = \''.$conf_UAM[8]."'";
-  }
-  if ($conf_UAM[2] <> '-1' and $conf_UAM[8] <> '-1')
+  AND ui.status = \''.$conf_UAM[7]."'";
+  }
+  if ($conf_UAM[2] <> '-1' and $conf_UAM[7] <> '-1')
   {
     $query.= '
@@ -2063,5 +2020,5 @@
   INNER JOIN '.USER_LASTVISIT_TABLE.' AS lv
     ON u.'.$conf['user_fields']['id'].' = lv.user_id
-WHERE (TO_DAYS(NOW()) - TO_DAYS(lv.lastvisit) >= "'.$conf_UAM[17].'")
+WHERE (TO_DAYS(NOW()) - TO_DAYS(lv.lastvisit) >= "'.$conf_UAM[16].'")
 ORDER BY lv.lastvisit ASC;';
 
@@ -2108,5 +2065,5 @@
   INNER JOIN '.USER_LASTVISIT_TABLE.' AS lv
     ON u.'.$conf['user_fields']['id'].' = lv.user_id
-WHERE (TO_DAYS(NOW()) - TO_DAYS(lv.lastvisit) >= "'.$conf_UAM[17].'")
+WHERE (TO_DAYS(NOW()) - TO_DAYS(lv.lastvisit) >= "'.$conf_UAM[16].'")
 ORDER BY lv.lastvisit ASC;';
 
@@ -2540,46 +2497,4 @@
 
 /**
- * Called from UAM_CheckEmptyCommentAuthor()
- * Checks if comment's author name is in the allowed group
- * 
- * @author   : author's name
- * 
- * @returns  : Boolean (true is user is allowed to post / false if not allowed)
- * 
- */
-function UAM_CheckAuthor($author)
-{
-  global $conf;
-  
-	// Get UAM configuration
-  $conf_UAM = unserialize($conf['UserAdvManager']);
-  
-  if (isset($conf_UAM[37]) and $conf_UAM[37] <> -1)
-  {
-    $query = '
-SELECT u.id,
-       u.username,
-       ug.user_id,
-       ug.group_id
-FROM '.USERS_TABLE.' AS u
-  INNER JOIN '.USER_GROUP_TABLE.' AS ug
-    ON u.id = ug.user_id
-WHERE u.username LIKE "'.$author.'"
-  AND ug.group_id = '.$conf_UAM[37].'
-;';
-
-    $count = pwg_db_num_rows(pwg_query($query));
-
-    if (is_null($count) or $count == 0)
-    {
-      return false;
-    }
-    else
-      return true;
-  }
-}
-
-
-/**
  * Useful for debugging - 4 vars can be set
  * Output result to log.txt file
Index: /extensions/UserAdvManager/branches/2.20/include/upgradedb.inc.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/include/upgradedb.inc.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/include/upgradedb.inc.php	(revision 11019)
@@ -110,12 +110,6 @@
 
 The admin of the gallery.';
-		
-		$query = '
-UPDATE '.CONFIG_TABLE.'
-SET value="'.$upgrade_UAM.'"
-WHERE param="nbc_UserAdvManager"
-LIMIT 1
-;';
-		pwg_query($query);
+
+    conf_update_param('nbc_UserAdvManager', pwg_db_real_escape_string($upgrade_UAM));
   }
   
@@ -155,11 +149,5 @@
     $upgrade_UAM = $conf_UAM[0].';'.$conf_UAM[1].';'.$conf_UAM[2].';'.$conf_UAM[3].';'.$conf_UAM[4].';'.$conf_UAM[5].';'.$conf_UAM[6].';'.$conf_UAM[7].';'.$conf_UAM[8].';'.$conf_UAM[9].';'.$conf_UAM[10].';'.$conf_UAM[11].';'.$conf_UAM[12].';'.$conf_UAM[13].';'.$conf_UAM[14].';'.$conf_UAM[15].';'.$conf_UAM[16].';'.$conf_UAM[17].';'.$conf_UAM[18].';'.$conf_UAM[19].';false';
 		
-		$query = '
-UPDATE '.CONFIG_TABLE.'
-SET value="'.$upgrade_UAM.'"
-WHERE param="nbc_UserAdvManager"
-LIMIT 1
-;';
-		pwg_query($query);
+		conf_update_param('nbc_UserAdvManager', pwg_db_real_escape_string($upgrade_UAM));
     
     upgrade_213_214();
@@ -189,10 +177,5 @@
     $data = explode(';', $conf['nbc_UserAdvManager_ConfirmMail']);
 
-    $query = '
-UPDATE '.CONFIG_TABLE.'
-  SET value = "'.pwg_db_real_escape_string(serialize($data)).'"
-  WHERE param = "nbc_UserAdvManager_ConfirmMail"
-;';
-    pwg_query($query);
+    conf_update_param('nbc_UserAdvManager_ConfirmMail', pwg_db_real_escape_string(serialize($data)));
     
     upgrade_214_215();
@@ -238,15 +221,8 @@
   
   $update_conf = serialize($conf_ConfirmMail);
-    
-  $query = '
-      UPDATE '.CONFIG_TABLE.'
-			SET value="'.pwg_db_real_escape_string($update_conf).'"
-			WHERE param="UserAdvManager_ConfirmMail"
-			LIMIT 1
-		;';
-
-		pwg_query($query);
-    
-    upgrade_2153_2154();
+  
+  conf_update_param('UserAdvManager_ConfirmMail', pwg_db_real_escape_string($update_conf));
+    
+  upgrade_2153_2154();
 }
 
@@ -294,13 +270,6 @@
   
   $update_conf = serialize($Newconf_UAM);
-    
-  $query = '
-      UPDATE '.CONFIG_TABLE.'
-			SET value="'.pwg_db_real_escape_string($update_conf).'"
-			WHERE param="UserAdvManager"
-			LIMIT 1
-		;';
-
-	pwg_query($query);
+  
+  conf_update_param('UserAdvManager', pwg_db_real_escape_string($update_conf));
 
   $query = '
@@ -340,13 +309,6 @@
   
   $update_conf = serialize($Newconf_UAM);
-    
-  $query = '
-      UPDATE '.CONFIG_TABLE.'
-			SET value="'.pwg_db_real_escape_string($update_conf).'"
-			WHERE param="UserAdvManager"
-			LIMIT 1
-		;';
-
-	pwg_query($query);
+  
+  conf_update_param('UserAdvManager', pwg_db_real_escape_string($update_conf));
 
   // Insert a new config entry for futur plugin's version check
@@ -386,13 +348,6 @@
   
   $update_conf = serialize($Newconf_UAM);
-    
-  $query = '
-UPDATE '.CONFIG_TABLE.'
-SET value="'.pwg_db_real_escape_string($update_conf).'"
-WHERE param="UserAdvManager"
-LIMIT 1
-;';
-
-	pwg_query($query);
+  
+  conf_update_param('UserAdvManager', pwg_db_real_escape_string($update_conf));
 
   // Create new UAM entry in plugins table
@@ -443,13 +398,6 @@
   
   $update_conf = serialize($Newconf_UAM);
-    
-  $query = '
-UPDATE '.CONFIG_TABLE.'
-SET value="'.pwg_db_real_escape_string($update_conf).'"
-WHERE param="UserAdvManager"
-LIMIT 1
-;';
-
-	pwg_query($query);
+  
+  conf_update_param('UserAdvManager', pwg_db_real_escape_string($update_conf));
 }
 
@@ -476,13 +424,71 @@
   
   $update_conf = serialize($Newconf_UAM);
-    
-  $query = '
-UPDATE '.CONFIG_TABLE.'
-SET value="'.pwg_db_real_escape_string($update_conf).'"
-WHERE param="UserAdvManager"
-LIMIT 1
-;';
-
-	pwg_query($query);
+
+  conf_update_param('UserAdvManager', pwg_db_real_escape_string($update_conf));
+}
+
+/* upgrade from 2.20.7 to 2.20.8 */
+/* ***************************** */
+function upgrade_2207_2208()
+{
+  global $conf;
+
+  // Upgrading options
+  $query = '
+SELECT value
+  FROM '.CONFIG_TABLE.'
+WHERE param = "UserAdvManager"
+;';
+
+  $result = pwg_query($query);
+  $conf_UAM = pwg_db_fetch_assoc($result);
+    
+  $Newconf_UAM = unserialize($conf_UAM['value']);
+
+  // Refactoring all configuration options
+  $Newconf_UAM[0] = $Newconf_UAM[0];
+  $Newconf_UAM[1] = $Newconf_UAM[1];
+  $Newconf_UAM[2] = $Newconf_UAM[2];
+  $Newconf_UAM[3] = $Newconf_UAM[3];
+  $Newconf_UAM[4] = $Newconf_UAM[4];
+  $Newconf_UAM[5] = $Newconf_UAM[6]; //remove osolete anonymus comments option
+  $Newconf_UAM[6] = $Newconf_UAM[7];
+  $Newconf_UAM[7] = $Newconf_UAM[8];
+  $Newconf_UAM[8] = $Newconf_UAM[9];
+  $Newconf_UAM[9] = $Newconf_UAM[10];
+  $Newconf_UAM[10] = $Newconf_UAM[11];
+  $Newconf_UAM[11] = $Newconf_UAM[12];
+  $Newconf_UAM[12] = $Newconf_UAM[13];
+  $Newconf_UAM[13] = $Newconf_UAM[14];
+  $Newconf_UAM[14] = $Newconf_UAM[15];
+  $Newconf_UAM[15] = $Newconf_UAM[16];
+  $Newconf_UAM[16] = $Newconf_UAM[17];
+  $Newconf_UAM[17] = $Newconf_UAM[18];
+  $Newconf_UAM[18] = $Newconf_UAM[19];
+  $Newconf_UAM[19] = $Newconf_UAM[20];
+  $Newconf_UAM[20] = $Newconf_UAM[21];
+  $Newconf_UAM[21] = $Newconf_UAM[22];
+  $Newconf_UAM[22] = $Newconf_UAM[23];
+  $Newconf_UAM[23] = $Newconf_UAM[24];
+  $Newconf_UAM[24] = $Newconf_UAM[25];
+  $Newconf_UAM[25] = $Newconf_UAM[26];
+  $Newconf_UAM[26] = $Newconf_UAM[27];
+  $Newconf_UAM[27] = $Newconf_UAM[28];
+  $Newconf_UAM[28] = $Newconf_UAM[29];
+  $Newconf_UAM[29] = $Newconf_UAM[30];
+  $Newconf_UAM[30] = $Newconf_UAM[31];
+  $Newconf_UAM[31] = $Newconf_UAM[32];
+  $Newconf_UAM[32] = $Newconf_UAM[33];
+  $Newconf_UAM[33] = $Newconf_UAM[34];
+  $Newconf_UAM[34] = $Newconf_UAM[35];
+  
+  // unset obsolete conf
+  unset ($Newconf_UAM[35]);
+  unset ($Newconf_UAM[36]);
+  unset ($Newconf_UAM[37]);
+  
+  $update_conf = serialize($Newconf_UAM);
+
+  conf_update_param('UserAdvManager', pwg_db_real_escape_string($update_conf));
 }
 ?>
Index: /extensions/UserAdvManager/branches/2.20/language/de_DE/help/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/language/de_DE/help/plugin.lang.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/language/de_DE/help/plugin.lang.php	(revision 11019)
@@ -47,6 +47,4 @@
 $lang['UAM_lastvisitTitle'] = 'Tracking registrierte Benutzer';
 $lang['UAM_lastvisitTitle_d'] = 'Dies aktiviert einen Tisch in der &quot;Tracking users&quot;-Reiter, die Mitglieder der Galerie aufgef&uuml;hrt sind und zum Zeitpunkt ihres letzten Besuch und verbrachte Zeit (Tage) seit ihrem letzten Besuch. Die &Uuml;berwachung ist rein informativ f&uuml;r den Administrator der Galerie.';
-$lang['UAM_commentTitle'] = 'Nickname obligatorisch für Gäste Kommentare';
-$lang['UAM_commentTitle_d'] = 'Wenn &quot;Kommentare f&uuml;r alle&quot; aktiv ist (Beh&ouml;rde f&uuml;r unregistrierte Besucher Kommentare post), erm&ouml;glicht diese Option, um den nicht registrierten Besucher zu zwingen, ein Spitzname, der Kommentar ist willkommen in Kraft.';
 $lang['UAM_tipsTitle'] = 'Tipps und Beispiele';
 $lang['UAM_tipsTitle_d'] = 'Tipps und verschiedene Anwendungsbeispiele';
@@ -285,11 +283,3 @@
 /*TODO*/$lang['UAM_HidePasswTitle_d'] = 'Choose here if you want to display the password chosen by the visitor in the information email. If you enable the option, the password will then appear in clear text. If you disable the password will not appear at all.';
 // --------- End: New or revised $lang ---- from version 2.20.4
-
-
-// --------- Starting below: New or revised $lang ---- from version 2.20.7
-$lang['UAM_GroupCommTitle'] = 'Kommentare zulassen, um eine Gruppe von Benutzern';
-/*TODO*/$lang['UAM_GroupCommTitle_d'] = 'This option lets you specify a group of users who will allowed to post comments when the gallery is configured to not allow comments for all.
-<br><br>
-By default, when &quot;comments for all&quot; option is disabled, only registered users can post comments. With this option, you can restrict this behavior by specifying a user group. Thus, only registered users and members of this group may post comments.';
-// --------- End: New or revised $lang ---- from version 2.20.7
 ?>
Index: /extensions/UserAdvManager/branches/2.20/language/de_DE/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/language/de_DE/plugin.lang.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/language/de_DE/plugin.lang.php	(revision 11019)
@@ -28,5 +28,4 @@
 $lang['UAM_Err_audit_email_forbidden'] = '<b>Dieses Konto verwendet eine E-Mail-Anbieter sind untersagt:</b> ';
 $lang['UAM_Err_audit_advise'] = '<b>Sie müssen Korrekturen an mit neuen Regeln die Sie aktiviert haben, nachzukommen durchzuführen.<br>Verwenden Sie ein Datenbank-Management-Dienstprogramm, um Benutzer-Accounts direkt in der Tabelle richtig ###_USERS';
-$lang['UAM_Empty Author'] = 'Der Autor Feld müssen ausgefüllt werden um einen Kommentar zu schicken.';
 $lang['UAM_reg_err_login2'] = 'Benutzername muss nicht die folgenden Zeichen übereinstimmen: ';
 $lang['UAM_reg_err_login5'] = 'Ihre E-Mail-Anbieter für die Registrierung ist verboten. Gebannten E-Mail-Anbieter sind: ';
@@ -144,5 +143,4 @@
 $lang['UAM_GhostTracker_ReminderText'] = 'Anpassen der Geist Tracker Erinnerungs-Nachricht';
 $lang['UAM_LastVisit'] = ' Tracking registrierte Benutzer';
-$lang['UAM_No_Comment_Anonymous'] = 'Nickname obligatorisch für Gäste Kommentare';
 
 $lang['UAM_Tab_UserManager'] = 'Tracking Validierungen';
@@ -330,10 +328,3 @@
 $lang['UAM_HidePassw'] = 'Passwort im Klartext in der Informations-E-Mail';
 // --------- End: New or revised $lang ---- from version 2.20.4
-
-
-// --------- Starting below: New or revised $lang ---- from version 2.20.7
-$lang['UAM_Group_Comments'] = 'Kommentare zulassen um eine Gruppe von Benutzern';
-$lang['UAM_AllowedComm_Group'] = 'Wählen Sie die Gruppe von Benutzern gestattet Kommentare anzulegen:';
-$lang['UAM_Not_Allowed_Author'] = 'Entschuldigung, Sie sind nicht befugt einen Kommentar abzugeben. Bitte kontaktieren Sie den Administrator der Website.';
-// --------- End: New or revised $lang ---- from version 2.20.7
 ?>
Index: /extensions/UserAdvManager/branches/2.20/language/en_UK/help/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/language/en_UK/help/plugin.lang.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/language/en_UK/help/plugin.lang.php	(revision 11019)
@@ -47,6 +47,4 @@
 $lang['UAM_lastvisitTitle'] = 'Tracking registered users';
 $lang['UAM_lastvisitTitle_d'] = 'This activates a table in the &quot;Tracking users&quot; tab which are registered users listed on the gallery and the date of their last visit and time spent (in days) since their last visit. Monitoring is purely informative for the administrator of the gallery.';
-$lang['UAM_commentTitle'] = 'Nickname mandatory for guests comments';
-$lang['UAM_commentTitle_d'] = 'If &quot;Comments for All&quot; is active (authority to unregistered visitors to post comments), this option allows to force the non-registered visitor to enter a nickname that the comment is accepted.';
 $lang['UAM_tipsTitle'] = 'Tips and Examples';
 $lang['UAM_tipsTitle_d'] = 'Tips and various examples of use';
@@ -285,11 +283,3 @@
 $lang['UAM_HidePasswTitle_d'] = 'Choose here if you want to display the password chosen by the visitor in the information email. If you enable the option, the password will then appear in clear text. If you disable the password will not appear at all.';
 // --------- End: New or revised $lang ---- from version 2.20.4
-
-
-// --------- Starting below: New or revised $lang ---- from version 2.20.7
-$lang['UAM_GroupCommTitle'] = 'Allow comments to a group of users';
-$lang['UAM_GroupCommTitle_d'] = 'This option lets you specify a group of users who will allowed to post comments when the gallery is configured to not allow comments for all.
-<br><br>
-By default, when &quot;comments for all&quot; option is disabled, only registered users can post comments. With this option, you can restrict this behavior by specifying a user group. Thus, only registered users and members of this group may post comments.';
-// --------- End: New or revised $lang ---- from version 2.20.7
 ?>
Index: /extensions/UserAdvManager/branches/2.20/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/language/en_UK/plugin.lang.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/language/en_UK/plugin.lang.php	(revision 11019)
@@ -27,5 +27,4 @@
 $lang['UAM_Err_audit_email_forbidden'] = '<b>This account uses a forbidden email provider :</b> ';
 $lang['UAM_Err_audit_advise'] = '<b>you have to perform corrections to comply with new rules that you have activated.<br>Use a database management utility to correct user accounts directly in the table ###_USERS';
-$lang['UAM_Empty Author'] = 'The author field have to be filled to send a comment.';
 $lang['UAM_reg_err_login2'] = 'Username does not have to match the following characters: ';
 $lang['UAM_reg_err_login5'] = 'Your email provider is banned for registration. Banned email providers are: ';
@@ -143,5 +142,4 @@
 $lang['UAM_GhostTracker_ReminderText'] = 'Customizing Ghost Tracker\'s reminder message';
 $lang['UAM_LastVisit'] = ' Tracking registered users';
-$lang['UAM_No_Comment_Anonymous'] = 'Nickname mandatory for guests comments';
 
 $lang['UAM_Tab_UserManager'] = 'Tracking validations';
@@ -332,10 +330,3 @@
 $lang['UAM_HidePassw'] = 'Password in clear text in the information email';
 // --------- End: New or revised $lang ---- from version 2.20.4
-
-
-// --------- Starting below: New or revised $lang ---- from version 2.20.7
-$lang['UAM_Group_Comments'] = 'Allow comments to a group of users';
-$lang['UAM_AllowedComm_Group'] = 'Select the group of users allowed to post comments:';
-$lang['UAM_Not_Allowed_Author'] = 'Sorry, you are not authorized to post a comment. Please contact the site administrator.';
-// --------- End: New or revised $lang ---- from version 2.20.7
 ?>
Index: /extensions/UserAdvManager/branches/2.20/language/es_ES/help/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/language/es_ES/help/plugin.lang.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/language/es_ES/help/plugin.lang.php	(revision 11019)
@@ -47,6 +47,4 @@
 $lang['UAM_lastvisitTitle'] = 'Seguimiento de usuarios registrados';
 $lang['UAM_lastvisitTitle_d'] = 'Esto activa una tabla de &quot;Seguimiento de los usuarios&quot; ficha de matriculaci&oacute;n de los usuarios que aparecen en la galer&iacute;a y la fecha de su &uacute;ltima visita y el tiempo (en d&iacute;as) desde su &uacute;ltima visita. El seguimiento es meramente informativo para el administrador de la galer&iacute;a.';
-$lang['UAM_commentTitle'] = 'Nickname obligatorio para los comentarios de los huéspedes';
-$lang['UAM_commentTitle_d'] = 'Si &quot;Comentarios para Todos&quot; est&aacute; activo (a los visitantes no registrados para enviar comentarios), esta opci&oacute;n permite forzar el visitante no registrado para ingresar un apodo para que se acepta el comentario.';
 $lang['UAM_tipsTitle'] = 'Consejos y ejemplos';
 $lang['UAM_tipsTitle_d'] = 'Consejos y diversos ejemplos de uso de';
@@ -281,11 +279,3 @@
 /*TODO*/$lang['UAM_HidePasswTitle_d'] = 'Choose here if you want to display the password chosen by the visitor in the information email. If you enable the option, the password will then appear in clear text. If you disable the password will not appear at all.';
 // --------- End: New or revised $lang ---- from version 2.20.4
-
-
-// --------- Starting below: New or revised $lang ---- from version 2.20.7
-/*TODO*/$lang['UAM_GroupCommTitle'] = 'Allow comments to a group of users';
-/*TODO*/$lang['UAM_GroupCommTitle_d'] = 'This option lets you specify a group of users who will allowed to post comments when the gallery is configured to not allow comments for all.
-<br><br>
-By default, when &quot;comments for all&quot; option is disabled, only registered users can post comments. With this option, you can restrict this behavior by specifying a user group. Thus, only registered users and members of this group may post comments.';
-// --------- End: New or revised $lang ---- from version 2.20.7
 ?>
Index: /extensions/UserAdvManager/branches/2.20/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/language/es_ES/plugin.lang.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/language/es_ES/plugin.lang.php	(revision 11019)
@@ -28,5 +28,4 @@
 $lang['UAM_Err_audit_email_forbidden'] = '<b>Esta cuenta utiliza un proveedor de correo electrónico  prohibido:</b> ';
 $lang['UAM_Err_audit_advise'] = '<b>Usted tiene que realizar correcciones para cumplir con las nuevas normas que ha activado.<br>Use una herramienta de gestión de base de datos para corregir las cuentas de usuario directamente en la tabla ###_USERS';
-$lang['UAM_Empty Author'] = 'El campo de autor tienen que ser llenados para enviar un comentario.';
 $lang['UAM_reg_err_login2'] = 'El nombre de usuario no puede coincidir con los siguientes caracteres: ';
 $lang['UAM_reg_err_login5'] = 'Su proveedor de correo electrónico está prohibido para el registro. Proveedores de correo electrónico en veda son: ';
@@ -145,5 +144,4 @@
 $lang['UAM_GhostTracker_ReminderText'] = 'Personalización del mensaje recordatorio de Ghost Tracker';
 $lang['UAM_LastVisit'] = ' Seguimiento de usuarios registrados';
-$lang['UAM_No_Comment_Anonymous'] = 'Nickname obligatorio para los comentarios de los huéspedes';
 
 $lang['UAM_Tab_UserManager'] = 'Seguimiento de las validaciones';
@@ -370,10 +368,3 @@
 $lang['UAM_HidePassw'] = 'Contraseña en texto claro en la información del correo electrónico';
 // --------- End: New or revised $lang ---- from version 2.20.4
-
-
-// --------- Starting below: New or revised $lang ---- from version 2.20.7
-/*TODO*/$lang['UAM_Group_Comments'] = 'Allow comments to a group of users';
-/*TODO*/$lang['UAM_AllowedComm_Group'] = 'Select the group of users allowed to post comments:';
-/*TODO*/$lang['UAM_Not_Allowed_Author'] = 'Sorry, you are not authorized to post a comment. Please contact the site administrator.';
-// --------- End: New or revised $lang ---- from version 2.20.7
 ?>
Index: /extensions/UserAdvManager/branches/2.20/language/fr_FR/help/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/language/fr_FR/help/plugin.lang.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/language/fr_FR/help/plugin.lang.php	(revision 11019)
@@ -46,6 +46,4 @@
 $lang['UAM_lastvisitTitle'] = 'Suivi des utilisateurs inscrits';
 $lang['UAM_lastvisitTitle_d'] = 'Cette option active, dans l\'onglet &quot;Suivi des utilisateurs&quot;, un tableau recensant les utilisateurs inscrits, la date de leur dernière visite et le nombre de jours écoulés depuis leur dernière visite. Il s\'agit d\'un suivi purement informatif pour l\'administrateur de la galerie.';
-$lang['UAM_commentTitle'] = 'Commentaires : pseudo obligatoire pour les non-inscrits.';
-$lang['UAM_commentTitle_d'] = 'Lorsque les visiteurs non inscrits sont autorisés à poster des commentaires (&quot;Commentaires pour tous&quot; actif), cette option oblige le visiteur non inscrit à saisir un pseudo pour que le commentaire soit accepté.';
 $lang['UAM_tipsTitle'] = 'Astuces et exemples';
 $lang['UAM_tipsTitle_d'] = 'Astuces et exemples divers d\'utilisation';
@@ -281,11 +279,3 @@
 $lang['UAM_HidePasswTitle_d'] = 'Choisissez ici si vous souhaitez faire afficher le mot de passe choisi par le visiteur dans le mail d\'information. Si vous activez l\'option, le mot de passe apparaitra alors en clair. Si vous la désactivez, le mot de passe n\'apparaitra pas du tout.';
 // --------- End: New or revised $lang ---- from version 2.20.4
-
-
-// --------- Starting below: New or revised $lang ---- from version 2.20.7
-$lang['UAM_GroupCommTitle'] = 'Autoriser les commentaires pour un groupe d\'utilisateurs';
-$lang['UAM_GroupCommTitle_d'] = 'Cette option permet de spécifier un groupe d\'utilisateurs qui seront autorisés à poster des commentaires lorsque la galerie est configurée pour ne pas autoriser les commentaires pour tous.
-<br><br>
-Par défaut, lorsque les &quot;commentaires pour tous&quot; sont désactivés, seuls les utilisateurs inscrits peuvent poster des commentaires. Avec cette option, vous pouvez restreindre d\'avantage ce fonctionnement en précisant un groupe d\'utilisateurs. Ainsi, seuls les utilisateurs inscrits et faisant partie de ce groupe pourront poster des commentaires.';
-// --------- End: New or revised $lang ---- from version 2.20.7
 ?>
Index: /extensions/UserAdvManager/branches/2.20/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/language/fr_FR/plugin.lang.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/language/fr_FR/plugin.lang.php	(revision 11019)
@@ -27,5 +27,4 @@
 $lang['UAM_Err_audit_email_forbidden'] = '<b>Ce compte contient des domaines de messagerie interdit :</b> ';
 $lang['UAM_Err_audit_advise'] = '<b>Vous avez des corrections a faire pour respecter les nouvelles règles que vous avez activées.<br>Utilisez un utilitaire de gestion de base de données pour corriger les comptes utilisateurs directement dans la table ###_USERS si nécessaire.</b><br><br>';
-$lang['UAM_Empty Author'] = 'Le champs auteur doit être rempli pour enregistrer un commentaire.';
 $lang['UAM_reg_err_login2'] = 'le nom utilisateur ne doit pas contenir les caractère suivants : ';
 $lang['UAM_reg_err_login5'] = 'L\'adresse email est issue d\'un prestataire interdit. Les prestataires d\'adresses email interdits à l\'inscription sont : ';
@@ -144,5 +143,4 @@
 $lang['UAM_GhostTracker_ReminderText'] = 'Texte de rappel personnalisé';
 $lang['UAM_LastVisit'] = ' Suivi des utilisateurs inscrits';
-$lang['UAM_No_Comment_Anonymous'] = 'Commentaires : pseudo obligatoire pour les non-inscrits';
 
 $lang['UAM_Tab_UserManager'] = 'Suivi des validations';
@@ -331,10 +329,3 @@
 $lang['UAM_HidePassw'] = 'Mot de passe en clair dans le mail d\'information';
 // --------- End: New or revised $lang ---- from version 2.20.4
-
-
-// --------- Starting below: New or revised $lang ---- from version 2.20.7
-$lang['UAM_Group_Comments'] = 'Autoriser les commentaires pour un groupe d\'utilisateurs';
-$lang['UAM_AllowedComm_Group'] = 'Sélectionnez le groupe d\'utilisateurs autorisé à poster des commentaires :';
-$lang['UAM_Not_Allowed_Author'] = 'Désolé, vous n\'êtes pas autorisé à poster un commentaire. Veuillez contacter l\'administrateur du site.';
-// --------- End: New or revised $lang ---- from version 2.20.7
 ?>
Index: /extensions/UserAdvManager/branches/2.20/language/it_IT/help/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/language/it_IT/help/plugin.lang.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/language/it_IT/help/plugin.lang.php	(revision 11019)
@@ -47,6 +47,4 @@
 /* TODO */$lang['UAM_lastvisitTitle'] = 'Tracking registered users';
 /* TODO */$lang['UAM_lastvisitTitle_d'] = 'This activates a table in the &quot;Tracking users&quot; tab which are registered users listed on the gallery and the date of their last visit and time spent (in days) since their last visit. Monitoring is purely informative for the administrator of the gallery.';
-/* TODO */$lang['UAM_commentTitle'] = 'Nickname mandatory for guests comments';
-/* TODO */$lang['UAM_commentTitle_d'] = 'If &quot;Comments for All&quot; is active (authority to unregistered visitors to post comments), this option allows to force the non-registered visitor to enter a nickname that the comment is accepted.';
 /* TODO */$lang['UAM_tipsTitle'] = 'Tips and Examples';
 /* TODO */$lang['UAM_tipsTitle_d'] = 'Tips and various examples of use';
@@ -272,11 +270,3 @@
 /*TODO*/$lang['UAM_HidePasswTitle_d'] = 'Choose here if you want to display the password chosen by the visitor in the information email. If you enable the option, the password will then appear in clear text. If you disable the password will not appear at all.';
 // --------- End: New or revised $lang ---- from version 2.20.4
-
-
-// --------- Starting below: New or revised $lang ---- from version 2.20.7
-/*TODO*/$lang['UAM_GroupCommTitle'] = 'Allow comments to a group of users';
-/*TODO*/$lang['UAM_GroupCommTitle_d'] = 'This option lets you specify a group of users who will allowed to post comments when the gallery is configured to not allow comments for all.
-<br><br>
-By default, when &quot;comments for all&quot; option is disabled, only registered users can post comments. With this option, you can restrict this behavior by specifying a user group. Thus, only registered users and members of this group may post comments.';
-// --------- End: New or revised $lang ---- from version 2.20.7
 ?>
Index: /extensions/UserAdvManager/branches/2.20/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/language/it_IT/plugin.lang.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/language/it_IT/plugin.lang.php	(revision 11019)
@@ -27,5 +27,4 @@
 $lang['UAM_Err_audit_email_forbidden'] = '<b>Questo conto utente usa un dominio d\'Email proibito:</b> ';
 $lang['UAM_Err_audit_advise'] = '<b>Dovete eseguire delle correzioni per rispettare le nuove impostazzioni che avete attivato.<br> Utilizzare un programma per la gestione della base dati per correggere i conti utente direttamente nella tabella ###_USERS';
-$lang['UAM_Empty Author'] = 'Il campo autore deve essere riempito per potere inviare un commento.';
 $lang['UAM_reg_err_login2'] = 'Nome utente non deve contenere in caratteri seguenti: ';
 $lang['UAM_reg_err_login5'] = 'Il tuo provider di posta usa dominio d\'Email proibito. I domini preibiti sono i seguenti: ';
@@ -145,5 +144,4 @@
 $lang['UAM_GhostTracker_ReminderText'] = 'Testo di rilancio personalizzato';
 $lang['UAM_LastVisit'] = ' Tracciamento utenti registrati';
-$lang['UAM_No_Comment_Anonymous'] = 'Commenti : Pseudo obbligatorio per gli ospiti';
 
 $lang['UAM_Tab_UserManager'] = 'Tracciamento convalide';
@@ -329,10 +327,3 @@
 $lang['UAM_HidePassw'] = 'Password in chiaro nelle informazioni e-mail';
 // --------- End: New or revised $lang ---- from version 2.20.4
-
-
-// --------- Starting below: New or revised $lang ---- from version 2.20.7
-/*TODO*/$lang['UAM_Group_Comments'] = 'Allow comments to a group of users';
-/*TODO*/$lang['UAM_AllowedComm_Group'] = 'Select the group of users allowed to post comments:';
-/*TODO*/$lang['UAM_Not_Allowed_Author'] = 'Sorry, you are not authorized to post a comment. Please contact the site administrator.';
-// --------- End: New or revised $lang ---- from version 2.20.7
 ?>
Index: /extensions/UserAdvManager/branches/2.20/language/lv_LV/help/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/language/lv_LV/help/plugin.lang.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/language/lv_LV/help/plugin.lang.php	(revision 11019)
@@ -53,6 +53,4 @@
 $lang['UAM_lastvisitTitle'] = 'Reģistrēto lietotāju izsekošana (Tracking)';
 $lang['UAM_lastvisitTitle_d'] = 'Šis aktivē tabulu &quot;Tracking users&quot; iezīmē (tabā), kurā reģistrēti galeriju apmeklējušie lietotāji, viņu pēdējā apmeklējuma datums, kā arī galerijā pavadītais laiks (dienās) kopš pēdējā apmeklējuma. Monitoringam ir tīri informatīvs raksturs galerijas administratora vajadzībām.';
-$lang['UAM_commentTitle'] = 'Viesa komentāriem obligāts Nickname (segvārds)';
-$lang['UAM_commentTitle_d'] = 'Ja &quot;Comments for All&quot; (komentāri visiem) ir aktīvs (pilnvaras neriģestrētiem lietotājiem pievienot komentārus), šī opcija dod iespēju piespiest nereģistrētos apmeklētājus lietot segvārdu, lai akceptētu savu komentāru.';
 $lang['UAM_tipsTitle'] = 'Padomi un Piemēri';
 $lang['UAM_tipsTitle_d'] = 'Padomi un dažādi izmantošanas piemēri';
@@ -307,11 +305,3 @@
 /*TODO*/$lang['UAM_HidePasswTitle_d'] = 'Choose here if you want to display the password chosen by the visitor in the information email. If you enable the option, the password will then appear in clear text. If you disable the password will not appear at all.';
 // --------- End: New or revised $lang ---- from version 2.20.4
-
-
-// --------- Starting below: New or revised $lang ---- from version 2.20.7
-/*TODO*/$lang['UAM_GroupCommTitle'] = 'Allow comments to a group of users';
-/*TODO*/$lang['UAM_GroupCommTitle_d'] = 'This option lets you specify a group of users who will allowed to post comments when the gallery is configured to not allow comments for all.
-<br><br>
-By default, when &quot;comments for all&quot; option is disabled, only registered users can post comments. With this option, you can restrict this behavior by specifying a user group. Thus, only registered users and members of this group may post comments.';
-// --------- End: New or revised $lang ---- from version 2.20.7
 ?>
Index: /extensions/UserAdvManager/branches/2.20/language/lv_LV/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/language/lv_LV/plugin.lang.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/language/lv_LV/plugin.lang.php	(revision 11019)
@@ -27,5 +27,4 @@
 $lang['UAM_Err_audit_email_forbidden'] = '<b>Šinī kontā izmanots neatļauts e-pasta pakalpojuma sniedzējs :</b> ';
 $lang['UAM_Err_audit_advise'] = '<b>Jums ir jāveic korekcijas, lai panāktu atbilstību jaunajiem nosacījumiem, ko esat aktivizējuši.<br> Izmantojiet datu bāzes pārvaldības rīku, lai koriģētu lietotāja kontus tieši tabulā ###_USERS';
-$lang['UAM_Empty Author'] = 'Lai nosūtītu komentāru, ir jābūt aizpildītam autora laukam.';
 $lang['UAM_reg_err_login2'] = 'Lietotājvārdam nav jāsakrīt ar sekojošām rakstzīmēm: ';
 $lang['UAM_reg_err_login5'] = 'Jūsu e-pasta pakalpojumu sniedzējam aizliegta reģistrācija. Aizniegtie e-pasta pakalpojumu sniedzēji ir: ';
@@ -143,5 +142,4 @@
 $lang['UAM_GhostTracker_ReminderText'] = 'Ghost Tracker atgadinājuma ziņojuma pielāgošana';
 $lang['UAM_LastVisit'] = ' Reģistrēto lietotāju izsekošana';
-$lang['UAM_No_Comment_Anonymous'] = 'Viesu komentāriem iesauka (Nickname) obligāta';
 
 $lang['UAM_Tab_UserManager'] = 'Apstiprinājumu izsekošana';
@@ -367,10 +365,3 @@
 /*TODO*/$lang['UAM_HidePassw'] = 'Clear password in information email';
 // --------- End: New or revised $lang ---- from version 2.20.4
-
-
-// --------- Starting below: New or revised $lang ---- from version 2.20.7
-/*TODO*/$lang['UAM_Group_Comments'] = 'Allow comments to a group of users';
-/*TODO*/$lang['UAM_AllowedComm_Group'] = 'Select the group of users allowed to post comments:';
-/*TODO*/$lang['UAM_Not_Allowed_Author'] = 'Sorry, you are not authorized to post a comment. Please contact the site administrator.';
-// --------- End: New or revised $lang ---- from version 2.20.7
 ?>
Index: /extensions/UserAdvManager/branches/2.20/main.inc.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/main.inc.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/main.inc.php	(revision 11019)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: UserAdvManager
-Version: 2.20.7
+Version: 2.20.8
 Description: Renforcer la gestion des utilisateurs - Enforce users management
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=216
@@ -57,9 +57,6 @@
 add_event_handler('init', 'UAM_InitPage');
 
-// Comment without author
-add_event_handler('user_comment_check', 'UAM_CheckEmptyCommentAuthor', 50, 2);
-
 // PWG_Stuffs module
-if ((isset($conf_UAM[34]) and $conf_UAM[34] == 'true'))
+if ((isset($conf_UAM[33]) and $conf_UAM[33] == 'true'))
 {
   add_event_handler('get_stuffs_modules', 'register_UAM_stuffs_module');
Index: /extensions/UserAdvManager/branches/2.20/maintain.inc.php
===================================================================
--- /extensions/UserAdvManager/branches/2.20/maintain.inc.php	(revision 11018)
+++ /extensions/UserAdvManager/branches/2.20/maintain.inc.php	(revision 11019)
@@ -14,5 +14,5 @@
 	global $conf;
 	
-  $default1 = array('false','false',-1,-1,-1,'false','false','',-1,'','','false','','false',100,'false','false',10,'Hello [username].
+  $default1 = array('false','false',-1,-1,-1,'false','',-1,'','','false','','false',100,'false','false',10,'Hello [username].
 	
 This is a reminder because a very long time passed since your last visit on our gallery [mygallery]. If you do not want anymore to use your access account, please let us know by replying to this email. Your account will be deleted.
@@ -259,4 +259,11 @@
       upgrade_2204_2207();
     }
+
+    if (version_compare($conf['UserAdvManager_Version'], '2.20.8') < 0)
+    {
+    /* upgrade from version 2.20.7 to 2.20.8 */
+    /* ************************************* */
+      upgrade_2207_2208();
+    }
   }
 
