Index: extensions/CommentEditor/classes/ce_comment.class.php
===================================================================
--- extensions/CommentEditor/classes/ce_comment.class.php	(revision 3429)
+++ extensions/CommentEditor/classes/ce_comment.class.php	(revision 3431)
@@ -50,5 +50,6 @@
     function validateAuthor($author) {
         $user_list = self::getUsers();
-        if (array_key_exists(strtolower($author), array_change_key_case($userList, CASE_LOWER))) {
+        if (array_key_exists(   strtolower($author),
+                                array_change_key_case($userList, CASE_LOWER))) {
             // Look in user list to have right case !
             foreach ($user_list as $user) {
Index: extensions/CommentEditor/classes/ce_plugin.class.php
===================================================================
--- extensions/CommentEditor/classes/ce_plugin.class.php	(revision 3429)
+++ extensions/CommentEditor/classes/ce_plugin.class.php	(revision 3431)
@@ -9,4 +9,13 @@
  */
 class CE_Plugin {
+
+    private static $url_prefix = null;
+
+
+    function CE_Plugin() {
+        if (null == self::$url_prefix) {
+            self::$url_prefix = get_root_url() . 'index.php?' . CE_ACTION . '=';
+        }
+    }
 
     /* ************************ */
@@ -26,5 +35,6 @@
                 $comment['U_ID'] =  $this->getCommentId($comment['U_DELETE']);
 
-                $comment['DATE'] .= ' - <a href="' . $this->getEditUrlPrefix() . $comment['U_ID'] . '">';
+                $comment['DATE'] .= ' - <a href="' . $this->getEditUrlPrefix();
+                $comment['DATE'] .= $comment['U_ID'] . '">';
                 $comment['DATE'] .= 'Edit';
                 $comment['DATE'] .= '</a>';
@@ -132,5 +142,6 @@
         } else if (isset($_POST['freeauthorck'])) {
             // Free author
-            $new_author = $comment->validateAuthor(trim(stripslashes($_POST['freeauthor'])));
+            $new_author = trim(stripslashes($_POST['freeauthor']));
+            $new_author = $comment->validateAuthor($new_author);
             $comment->setInfo('author', $new_author);
         }
@@ -158,5 +169,6 @@
         }
         // allow plugins to notify what's going on
-        trigger_action( 'user_comment_insertion', array_merge($comment_array, array('action'=>$comment_action)));
+        trigger_action( 'user_comment_insertion',
+                        array_merge($comment_array, array('action'=>$comment_action)));
         if ($comment_action=='reject') {
             $this->displayError($infos);
@@ -213,5 +225,7 @@
         global $template;
         $template->set_filenames(array('ce_message'=>$this->getTemplate('message.tpl')));
-        $template->block_html_head('', '<link rel="stylesheet" type="text/css" href="'.CE_STYLE.'">', $smarty, $repeat);
+        $template->block_html_head( '',
+                                    '<link rel="stylesheet" type="text/css" href="'.CE_STYLE.'">',
+                                    $smarty, $repeat);
         $begin = 'PLUGIN_INDEX_CONTENT_BEFORE';
         $template->assign('message', $message_array);
@@ -225,5 +239,7 @@
 
         $template->set_filenames(array('ce_edit'=>$this->getTemplate()));
-        $template->block_html_head('', '<link rel="stylesheet" type="text/css" href="'.CE_STYLE.'">', $smarty, $repeat);
+        $template->block_html_head( '',
+                                    '<link rel="stylesheet" type="text/css" href="'.CE_STYLE.'">',
+                                    $smarty, $repeat);
         $begin = 'PLUGIN_INDEX_CONTENT_BEFORE';
         $end = 'PLUGIN_INDEX_CONTENT_AFTER';
@@ -245,9 +261,9 @@
 
     function getEditUrlPrefix() {
-        return get_root_url() . 'index.php?' . CE_ACTION . '=' . CE_ACTION_EDIT . '&' . CE_ID . '=';
+        return self::$url_prefix . CE_ACTION_EDIT . '&' . CE_ID . '=';
     }
 
     function getUpdateUrlPrefix() {
-        return get_root_url() . 'index.php?' . CE_ACTION . '=' . CE_ACTION_UPDATE;
+        return self::$url_prefix . CE_ACTION_UPDATE;
     }
 
Index: extensions/CommentEditor/include/ce_common.inc.php
===================================================================
--- extensions/CommentEditor/include/ce_common.inc.php	(revision 3429)
+++ extensions/CommentEditor/include/ce_common.inc.php	(revision 3431)
@@ -3,5 +3,5 @@
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-define('CE_VERSION',       '1.0.a');
+define('CE_VERSION',       '1.0.b');
 define('CE_INCLUDE_DIR',   'include/');
 define('CE_CLASSES_DIR',   'classes/');
Index: extensions/CommentEditor/main.inc.php
===================================================================
--- extensions/CommentEditor/main.inc.php	(revision 3429)
+++ extensions/CommentEditor/main.inc.php	(revision 3431)
@@ -3,11 +3,19 @@
 /*
  Plugin Name: Comment Editor
- Version: 1.0.a
+ Version: 1.0.b
  Description: Allow to edit comment
- Plugin URI: http://piwigo.org/
+ Plugin URI: http://piwigo.org/ext/extension_view.php?eid=296
  Author: Criss
  Author URI: http://piwigo.org/
 */
 
+/** History **
+
+    2009-06-18 1.0.b
+                        Fix plugin URI to be available in plugin update
+                        check page.
+                        Reduce code line size.
+
+*/
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
@@ -18,6 +26,8 @@
 
 $ce_plugin = new CE_Plugin();
-add_event_handler('loc_begin_page_header',  array(&$ce_plugin, 'loc_begin_page_header'));
-add_event_handler('loc_begin_index',        array(&$ce_plugin, 'loc_end_index'), 1);
+add_event_handler(  'loc_begin_page_header',
+                    array(&$ce_plugin, 'loc_begin_page_header'));
+add_event_handler(  'loc_begin_index',
+                    array(&$ce_plugin, 'loc_end_index'), 1);
 
 set_plugin_data($plugin['id'], $ce_plugin);
