Index: cvs.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cvslog/cvs.module,v
retrieving revision 1.106.2.19.2.32
diff -u -r1.106.2.19.2.32 cvs.module
--- cvs.module	3 Dec 2006 01:56:05 -0000	1.106.2.19.2.32
+++ cvs.module	3 Dec 2006 19:00:01 -0000
@@ -1,6 +1,6 @@
 <?php
 // $Id: cvs.module,v 1.106.2.19.2.32 2006/12/03 01:56:05 dww Exp $
-// $Name:  $
+// $Name: DRUPAL-4-7--2 $
 
 /**
  * @file
@@ -528,6 +528,13 @@
     '#collapsed' => FALSE,
   );
   if (user_access('administer CVS')) {
+    // Due to the workaround being used in hook_menu to allow CVS administrators
+    // access to the user's account/edit section, the page title is incorrect.
+    if ($uid != $user->uid) {
+      $account = user_load(array('uid' => $uid));
+      drupal_set_title(check_plain($account->name));
+    }
+
     $form['cvs']['cvs_name'] = array(
       '#type' => 'textfield',
       '#title' => t('CVS username'),
@@ -1205,10 +1212,9 @@
   return $output;
 }
 
-
 function cvs_page() {
   _cvs_styles();
-  print theme('page', cvs_show_messages());
+  return cvs_show_messages();
 }
 
 function cvs_page_search() {
@@ -1261,7 +1267,7 @@
     $output .= theme('box', t('Search results'), cvs_show_messages());
   }
   
-  print theme('page', $output);
+  return $output;
 }
 
 /**
@@ -1309,7 +1315,7 @@
     _cvs_styles();
     $_REQUEST['uid'] = $account->uid; 
     drupal_set_title($account->name);
-    print theme('page', cvs_show_messages());
+    return cvs_show_messages();
   }
   else {
     drupal_not_found();
@@ -1330,7 +1336,7 @@
       '%manage-cvs-account-url' => url("user/$account->uid/edit/cvs", NULL, NULL, TRUE),
       '%cvs-admin-message' => $extra,
       '%cvs-admin-name' => $user->name,
-      '%motivation-message' =>  wordwrap(check_plain($account->motivation), 72)
+      '%motivation-message' => wordwrap($account->motivation, 72)
     );
     switch ($account->status) {
       case CVS_APPROVED:
@@ -1537,7 +1543,7 @@
     $output .= '<ul>'. implode($warnings) .'</ul>';
   }
  
-  print theme('page', $output);
+  return $output;
 }
 
 function cvs_repository() {
@@ -1569,7 +1575,7 @@
 
   $output = theme('table', $header, $rows);
 
-  print theme('page', $output);
+  return $output;
 }
 
 function cvs_repository_fetch($rid) {
@@ -1636,7 +1642,7 @@
       drupal_goto('admin/cvs/repositories');
     }
     
-    print theme('page', cvs_repository_form($repo));
+    return cvs_repository_form($repo);
   }
   else {
     drupal_not_found();
@@ -1660,7 +1666,7 @@
     drupal_goto('admin/cvs/repositories');
   }
 
-  print theme('page', cvs_repository_form($repo));
+  return cvs_repository_form($repo);
 }
 
 function cvs_repository_form($repo = 0) {
@@ -1728,7 +1734,6 @@
   $form['submit'] = array('#type' => 'submit', '#value' => t('Save repository'));
 
   return drupal_get_form('cvs_repository_add',$form);
-  print theme('page', $output);
 }
 
 function cvs_explode($text, $delim = ':') {
@@ -2053,7 +2058,7 @@
   $message_variables = array(
     '%account-name' => $user->name,
     '%user-account-url' => url("user/$user->uid", NULL, NULL, TRUE),
-    '%motivation-message' => wordwrap(check_plain($form_values['motivation']), 72),
+    '%motivation-message' => wordwrap($form_values['motivation'], 72),
     '%client-information' => implode("\n", $client_information)
   );
 
