Index: extensions/Comments_on_Albums/include/functions_comment.inc.php
===================================================================
--- extensions/Comments_on_Albums/include/functions_comment.inc.php	(revision 9624)
+++ extensions/Comments_on_Albums/include/functions_comment.inc.php	(revision 9634)
@@ -3,32 +3,34 @@
 
 //returns string action to perform on a new comment: validate, moderate, reject
-function user_comment_check($action, $comment)
-{
-  global $conf,$user;
-
-  if ($action=='reject')
-    return $action;
-
-  $my_action = $conf['comment_spam_reject'] ? 'reject':'moderate';
-
-  if ($action==$my_action)
-    return $action;
-
-  // we do here only BASIC spam check (plugins can do more)
-  if ( !is_a_guest() )
-    return $action;
-
-  $link_count = preg_match_all( '/https?:\/\//',
-    $comment['content'], $matches);
-
-  if ( strpos($comment['author'], 'http://')!==false )
-  {
-    $link_count++;
-  }
-
-  if ( $link_count>$conf['comment_spam_max_links'] )
-    return $my_action;
-
-  return $action;
+if (!function_exists('user_comment_check')) {
+	function user_comment_check($action, $comment)
+	{
+	  global $conf,$user;
+
+	  if ($action=='reject')
+		return $action;
+
+	  $my_action = $conf['comment_spam_reject'] ? 'reject':'moderate';
+
+	  if ($action==$my_action)
+		return $action;
+
+	  // we do here only BASIC spam check (plugins can do more)
+	  if ( !is_a_guest() )
+		return $action;
+
+	  $link_count = preg_match_all( '/https?:\/\//',
+		$comment['content'], $matches);
+
+	  if ( strpos($comment['author'], 'http://')!==false )
+	  {
+		$link_count++;
+	  }
+
+	  if ( $link_count>$conf['comment_spam_max_links'] )
+		return $my_action;
+
+	  return $action;
+	}
 }
 
@@ -44,5 +46,5 @@
  * @param array infos out array of messages
  */
-function insert_user_comment( &$comm, $key, &$infos )
+function insert_user_comment_albums( &$comm, $key, &$infos )
 {
   global $conf, $user;
@@ -185,5 +187,5 @@
  * @param comment_id
  */
-function delete_user_comment($comment_id) {
+function delete_user_comment_albums($comment_id) {
   $user_where_clause = '';
   if (!is_admin())
@@ -216,5 +218,5 @@
  */
 
-function update_user_comment($comment, $post_key)
+function update_user_comment_albums($comment, $post_key)
 {
   global $conf;
@@ -259,38 +261,40 @@
 }
 
-function email_admin($action, $comment)
-{
-  global $conf;
-
-  if (!in_array($action, array('edit', 'delete'))
-      or (($action=='edit') and !$conf['email_admin_on_comment_edition'])
-      or (($action=='delete') and !$conf['email_admin_on_comment_deletion']))
-  {
-    return;
-  }
-
-  include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
-
-  $keyargs_content = array();
-  $keyargs_content[] = get_l10n_args('Author: %s', $comment['author']);
-  if ($action=='delete')
-  {
-    $keyargs_content[] = get_l10n_args('This author removed the comment with id %d',
-				       $comment['comment_id']
-				       );
-  }
-  else
-  {
-    $keyargs_content[] = get_l10n_args('This author modified following comment:', '');
-    $keyargs_content[] = get_l10n_args('Comment: %s', $comment['content']);
-  }
-
-  pwg_mail_notification_admins(get_l10n_args('Comment by %s',
-					     $comment['author']),
-			       $keyargs_content
-			       );
-}
-
-function get_comment_author_id($comment_id, $die_on_error=true)
+if (!function_exists('email_admin')) {
+	function email_admin($action, $comment)
+	{
+	  global $conf;
+
+	  if (!in_array($action, array('edit', 'delete'))
+		  or (($action=='edit') and !$conf['email_admin_on_comment_edition'])
+		  or (($action=='delete') and !$conf['email_admin_on_comment_deletion']))
+	  {
+		return;
+	  }
+
+	  include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
+
+	  $keyargs_content = array();
+	  $keyargs_content[] = get_l10n_args('Author: %s', $comment['author']);
+	  if ($action=='delete')
+	  {
+		$keyargs_content[] = get_l10n_args('This author removed the comment with id %d',
+						   $comment['comment_id']
+						   );
+	  }
+	  else
+	  {
+		$keyargs_content[] = get_l10n_args('This author modified following comment:', '');
+		$keyargs_content[] = get_l10n_args('Comment: %s', $comment['content']);
+	  }
+
+	  pwg_mail_notification_admins(get_l10n_args('Comment by %s',
+							 $comment['author']),
+					   $keyargs_content
+					   );
+	}
+}
+
+function get_comment_author_id_albums($comment_id, $die_on_error=true)
 {
   $query = '
@@ -318,5 +322,5 @@
 }
 
-function validate_user_comment($comment_id)
+function validate_user_comment_albums($comment_id)
 {
   $query = '
