Index: /extensions/UserAdvManager/trunk/admin/UAM_admin.php
===================================================================
--- /extensions/UserAdvManager/trunk/admin/UAM_admin.php	(revision 10975)
+++ /extensions/UserAdvManager/trunk/admin/UAM_admin.php	(revision 10976)
@@ -186,12 +186,5 @@
     $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 +207,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'));
Index: /extensions/UserAdvManager/trunk/changelog.txt.php
===================================================================
--- /extensions/UserAdvManager/trunk/changelog.txt.php	(revision 10975)
+++ /extensions/UserAdvManager/trunk/changelog.txt.php	(revision 10976)
@@ -251,5 +251,5 @@
 -- 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
 */
 ?>
Index: /extensions/UserAdvManager/trunk/include/upgradedb.inc.php
===================================================================
--- /extensions/UserAdvManager/trunk/include/upgradedb.inc.php	(revision 10975)
+++ /extensions/UserAdvManager/trunk/include/upgradedb.inc.php	(revision 10976)
@@ -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,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));
 }
 ?>
