Index: modules/cvslog/cvs.info =================================================================== RCS file: modules/cvslog/cvs.info diff -N modules/cvslog/cvs.info --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ modules/cvslog/cvs.info 20 Dec 2006 04:18:44 -0000 @@ -0,0 +1,5 @@ +; $Id$ +name = "CVS integration" +description = "Provides access to commit logs, account management, and access control for the Concurrent Versions System (CVS)." +package = Project +version = "$Name$" Index: modules/cvslog/cvs.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/cvslog/cvs.module,v retrieving revision 1.131 diff -u -p -r1.131 cvs.module --- modules/cvslog/cvs.module 5 Dec 2006 21:52:41 -0000 1.131 +++ modules/cvslog/cvs.module 20 Dec 2006 04:18:46 -0000 @@ -30,10 +30,10 @@ if (file_exists("$path/cvs_local.inc")) */ function cvs_help($section) { switch ($section) { - case 'admin/modules#description': - return t('Provides access to CVS commit logs.'); case 'cvs': - case 'admin/cvs': + case 'admin/project/cvs-accounts': + case 'admin/project/cvs-repositories': + case 'admin/project/cvs-settings': return t('CVS (Concurrent Versions System) is a code management system used by developers to collaborate and track modifications of code.'); } } @@ -85,110 +85,132 @@ function cvs_menu($may_cache) { 'weight' => 2, ); */ - + } + else { // Admin pages: $access = user_access('administer CVS'); + + // If for some reason someone is using this module without + // project.module (which is technically legitimate, though hard to + // imagine), we need to define our own version of /admin/project + // so the rest of our admin pages all work. + if (!module_exists('project')) { + $items[] = array( + 'path' => 'admin/project', + 'title' => t('Project administration'), + 'description' => t('Administrative interface for project management and related modules.'), + 'callback' => 'system_admin_menu_block_page', + 'access' => $access, + 'type' => MENU_NORMAL_ITEM, + ); + } + $items[] = array( - 'path' => 'admin/cvs', - 'title' => t('CVS'), - 'callback' => 'cvs_account', + 'path' => 'admin/project/cvs-settings', + 'description' => t('Modify CVS management settings, such as how it integrates with projects on your site, the text used on the CVS account application form, and the default wording for emails sent when CVS accounts are approved or denied.'), + 'title' => t('CVS settings'), + 'callback' => 'drupal_get_form', + 'callback arguments' => array('cvs_settings_form'), 'access' => $access, 'type' => MENU_NORMAL_ITEM, ); // Accounts: $items[] = array( - 'path' => 'admin/cvs/list', - 'title' => t('list'), + 'path' => 'admin/project/cvs-accounts', + 'title' => t('CVS accounts'), + 'description' => t('Approve or deny requests from the !application_url, import CVS users from an existing CVSROOT/password file, or export a CVSROOT/passwd file to install in any of your CVS repositories.', array('!application_url' => l(t('CVS application'), '/cvs-application'))), + 'callback' => 'cvs_account', + 'access' => $access, + 'type' => MENU_NORMAL_ITEM, + ); + $items[] = array( + 'path' => 'admin/project/cvs-accounts/list', + 'title' => t('List'), 'callback' => 'cvs_account', 'access' => $access, 'type' => MENU_DEFAULT_LOCAL_TASK, ); $items[] = array( - 'path' => 'admin/cvs/import', - 'title' => t('import'), - 'callback' => 'cvs_account_import', + 'path' => 'admin/project/cvs-accounts/import', + 'title' => t('Import'), + 'callback' => 'drupal_get_form', + 'callback arguments' => array('cvs_account_import'), 'access' => $access, 'type' => MENU_LOCAL_TASK, 'weight' => 2, ); - $items[] = array('path' => 'admin/cvs/export', - 'title' => t('export'), + $items[] = array( + 'path' => 'admin/project/cvs-accounts/export', + 'title' => t('Export'), 'callback' => 'cvs_account_export', 'access' => $access, 'type' => MENU_LOCAL_TASK, 'weight' => 3, ); $items[] = array( - 'path' => 'admin/cvs/status', - 'title' => t('status'), + 'path' => 'admin/project/cvs-accounts/status', + 'title' => t('Status'), 'callback' => 'cvs_account_status', 'access' => $access, 'type' => MENU_LOCAL_TASK, 'weight' => 4, ); - $items[] = array( - 'path' => 'admin/cvs/edit', - 'title' => t('edit account'), - 'callback' => 'cvs_account_edit', - 'access' => $access, - 'type' => MENU_CALLBACK, - ); // Repositories: $items[] = array( - 'path' => 'admin/cvs/repositories', - 'title' => t('repositories'), + 'path' => 'admin/project/cvs-repositories', + 'title' => t('CVS repositories'), + 'description' => t('Define and configure what CVS repositories are connected to your site, how CVS log messages should be saved, and how to integrate each repository with a source browsing tool such as ViewCVS.'), 'callback' => 'cvs_repository', 'access' => $access, 'type' => MENU_NORMAL_ITEM, ); $items[] = array( - 'path' => 'admin/cvs/repositories/list', - 'title' => t('list'), + 'path' => 'admin/project/cvs-repositories/list', + 'title' => t('List'), 'callback' => 'cvs_repository', 'access' => $access, 'type' => MENU_DEFAULT_LOCAL_TASK, ); $items[] = array( - 'path' => 'admin/cvs/repositories/add', - 'title' => t('add repository'), - 'callback' => 'cvs_repository_add', + 'path' => 'admin/project/cvs-repositories/add', + 'title' => t('Add repository'), + 'callback' => 'drupal_get_form', + 'callback arguments' => array('cvs_repository_form'), 'access' => $access, 'type' => MENU_LOCAL_TASK, 'weight' => 2, ); $items[] = array( - 'path' => 'admin/cvs/repositories/edit', - 'title' => t('edit repository'), + 'path' => 'admin/project/cvs-repositories/edit', + 'title' => t('Edit repository'), 'callback' => 'cvs_repository_edit', 'access' => $access, 'type' => MENU_CALLBACK, ); $items[] = array( - 'path' => 'admin/cvs/repositories/delete', - 'title' => t('delete'), + 'path' => 'admin/project/cvs-repositories/delete', + 'title' => t('Delete'), 'callback' => 'cvs_repository_delete', 'access' => $access, 'type' => MENU_CALLBACK, ); $items[] = array( - 'path' => 'admin/cvs/repositories/fetch', - 'title' => t('fetch log'), + 'path' => 'admin/project/cvs-repositories/fetch', + 'title' => t('Fetch log'), 'callback' => 'cvs_repository_fetch', 'access' => $access, 'type' => MENU_CALLBACK, ); - } - else { if (arg(0) == 'user' && is_numeric(arg(1))) { $result = db_query('SELECT uid, status FROM {cvs_accounts} WHERE uid = %d', arg(1)); if ($account = db_fetch_object($result)) { // If the user has a CVS account, add a 'track CVS messages' tab to the tracker page. $items[] = array( 'path' => 'user/'. arg(1) .'/track/code', - 'title' => t('track code'), + 'title' => t('Track code'), 'callback' => 'cvs_account_tracker', 'access' => user_access('access CVS messages') && $account->status == CVS_APPROVED, 'type' => MENU_LOCAL_TASK, @@ -203,8 +225,8 @@ function cvs_menu($may_cache) { $items[] = array( 'path' => 'user/'. arg(1) .'/edit/cvs', 'title' => t('CVS'), - 'callback' => 'cvs_user_edit_form', - 'callback arguments' => array($account->uid), + 'callback' => 'drupal_get_form', + 'callback arguments' => array('cvs_user_edit_form', $account->uid), 'access' => ($user->uid == $account->uid && $account->status == CVS_APPROVED) || user_access('administer CVS'), 'type' => MENU_LOCAL_TASK, 'weight' => 3, @@ -223,7 +245,8 @@ function cvs_menu($may_cache) { $items[] = array( 'path' => 'node/'. arg(1) .'/cvs-access', 'title' => t('CVS access'), - 'callback' => 'cvs_project_access_form', + 'callback' => 'drupal_get_form', + 'callback arguments' => array('cvs_project_access_form'), 'access' => TRUE, 'type' => MENU_LOCAL_TASK, 'weight' => 4, @@ -239,7 +262,7 @@ function cvs_menu($may_cache) { } } } - + drupal_set_message("adding cvs menu"); return $items; } @@ -261,9 +284,9 @@ function cvs_cron() { } /** - * Implementation of hook_settings(). + * Form builder function for system settings. */ -function cvs_settings() { +function cvs_settings_form() { $strings = _cvs_get_strings(); $form['cvs_email_address'] = array( @@ -303,25 +326,25 @@ function cvs_settings() { '#default_value' => variable_get('cvs_restrict_project_creation', 1), '#description' => t('If this box is checked, only users with CVS accounts will be allowed to create project nodes.'), ); - if (module_exist('project') && project_use_taxonomy()) { + if (module_exists('project') && project_use_taxonomy()) { $form['cvs_directory_validate_by_type'] = array( - '#title' => t('Validate %cvs_dir using %type', array('%cvs_dir' => theme('placeholder', 'CVS directory'), '%type' => theme('placeholder', 'Project type'))), + '#title' => t('Validate %cvs_dir using %type', array('%cvs_dir' => 'CVS directory', '%type' => 'Project type')), '#type' => 'checkbox', '#default_value' => variable_get('cvs_directory_validate_by_type', 1), - '#description' => t("If this box is checked, the first element of the path specified in the %cvs_dir field must match the selected %type for project nodes. Note: this is a case insensitive comparison, and spaces in the %type field will be converted to hypens ('-') for the purpose of the comparison.", array('%cvs_dir' => theme('placeholder', 'CVS directory'), '%type' => theme('placeholder', 'Project type'))), + '#description' => t("If this box is checked, the first element of the path specified in the %cvs_dir field must match the selected %type for project nodes. Note: this is a case insensitive comparison, and spaces in the %type field will be converted to hypens ('-') for the purpose of the comparison.", array('%cvs_dir' => 'CVS directory', '%type' => 'Project type')), ); } $form['cvs_validate_by_short_name'] = array( - '#title' => t('Validate %cvs_dir using %short_name', array('%cvs_dir' => theme('placeholder', 'CVS directory'), '%short_name' => theme('placeholder', 'Project short name'))), + '#title' => t('Validate %cvs_dir using %short_name', array('%cvs_dir' => 'CVS directory', '%short_name' => 'Project short name')), '#type' => 'checkbox', '#default_value' => variable_get('cvs_validate_by_short_name', 1), - '#description' => t("If this box is checked, the last element of the path specified in the %cvs_dir field must match the %short_name field for project nodes.", array('%cvs_dir' => theme('placeholder', 'CVS directory'), '%short_name' => theme('placeholder', 'Project short name'))), + '#description' => t("If this box is checked, the last element of the path specified in the %cvs_dir field must match the %short_name field for project nodes.", array('%cvs_dir' => 'CVS directory', '%short_name' => 'Project short name')), ); $form['cvs_directory_validate_dir_root_by_case'] = array( - '#title' => t('Ensure lowercase for first element of %cvs_dir', array('%cvs_dir' => theme('placeholder', 'CVS directory'))), + '#title' => t('Ensure lowercase for first element of %cvs_dir', array('%cvs_dir' => 'CVS directory')), '#type' => 'checkbox', '#default_value' => variable_get('cvs_directory_validate_dir_root_by_case', 1), - '#description' => t("If this box is checked, the first element of the path specified in the %cvs_dir field must be lowercase.", array('%cvs_dir' => theme('placeholder', 'CVS directory'))), + '#description' => t("If this box is checked, the first element of the path specified in the %cvs_dir field must be lowercase.", array('%cvs_dir' => 'CVS directory')), ); $form['cvs_list_per_page'] = array( '#title' => t('Number of CVS accounts listed per page'), @@ -403,7 +426,7 @@ function cvs_settings() { '#description' => t('The message to send to users whose accounts have been declined.'), ); - if (module_exist('project_release')) { + if (module_exists('project_release')) { $form['cvs_message_new_release_branch'] = array( '#title' => t('Message when new releases are added from a branch'), '#type' => 'textarea', @@ -417,7 +440,7 @@ function cvs_settings() { '#description' => t('Message to show to project maintainers when they add a new official release from a tag.'), ); } - return $form; + return system_settings_form($form); } /** @@ -466,21 +489,21 @@ function cvs_nodeapi(&$node, $op, $arg = $path_elems = array_filter($path_elems); if (variable_get('cvs_directory_validate_dir_root_by_case', 1)) { if ($path_elems[1] != drupal_strtolower($path_elems[1])) { - form_set_error('cvs_directory', t("The root of the CVS directory (%root) must be lowercase.", array('%root' => theme('placeholder', $path_elems[1])))); + form_set_error('cvs_directory', t("The root of the CVS directory (%root) must be lowercase.", array('%root' => $path_elems[1]))); } } if (project_use_taxonomy() && variable_get('cvs_directory_validate_by_type', 1)) { $tree = taxonomy_get_term($node->project_type); $path_equiv = drupal_strtolower(str_replace(' ', '-', $tree->name)); if (drupal_strtolower($path_elems[1]) != $path_equiv) { - form_set_error('cvs_directory', t("The root of the CVS directory (%root) does not match the selected project type (%type). Spaces in the type name are converted to hyphens in the path, so given the current project type, the first element of the directory path should be: %goal.", array('%root' => theme('placeholder', $path_elems[1]), '%type' => theme('placeholder', $tree->name), '%goal' => theme('placeholder', $path_equiv)))); + form_set_error('cvs_directory', t("The root of the CVS directory (%root) does not match the selected project type (%type). Spaces in the type name are converted to hyphens in the path, so given the current project type, the first element of the directory path should be: %goal.", array('%root' => $path_elems[1], '%type' => $tree->name, '%goal' => $path_equiv))); } } if (variable_get('cvs_validate_by_short_name', 1)) { $last_elem = array_pop($path_elems); if ($last_elem != $node->uri) { - form_set_error('cvs_directory', t("The last part of the CVS directory (%last) does not match the short project name (%short).", array('%last' => theme('placeholder', $last_elem), '%short' => theme('placeholder', $node->uri)))); - form_set_error('uri', t("The short project name (%short) does not match the last part of the CVS directory (%last).", array('%last' => theme('placeholder', $last_elem), '%short' => theme('placeholder', $node->uri)))); + form_set_error('cvs_directory', t("The last part of the CVS directory (%last) does not match the short project name (%short).", array('%last' => $last_elem, '%short' => $node->uri))); + form_set_error('uri', t("The short project name (%short) does not match the last part of the CVS directory (%last).", array('%last' => $last_elem, '%short' => $node->uri))); } } } @@ -512,6 +535,7 @@ function cvs_form_alter($form_id, &$form /** * Menu Callback: Display the CVS account edit form. + * Form builder function for cvs_user_edit_form() */ function cvs_user_edit_form($uid) { global $user; @@ -605,7 +629,7 @@ function cvs_user_edit_form($uid) { $form['cvs']['cvs_uid'] = array('#type' => 'value', '#value' => $uid); $form['submit'] = array('#type' => 'submit', '#value' => t('Submit')); - return drupal_get_form('cvs_user_edit_form', $form); + return $form; } /** @@ -616,11 +640,11 @@ function cvs_user_edit_form_validate($fo // Check for duplicates: $id = db_result(db_query("SELECT uid FROM {cvs_accounts} WHERE name = '%s' AND uid != %d", $form_values['cvs_name'], $form_values['cvs_uid'])); if ($id != 0) { - form_set_error('cvs_name', t('The specified CVS username is already in use by user #%id.', array('%id' => $id))); + form_set_error('cvs_name', t('The specified CVS username is already in use by user #!id.', array('!id' => $id))); } } if (!empty($form_values['cvs_pass']) && strlen($form_values['cvs_pass']) < CVS_MIN_PASS_LENGTH) { - form_set_error('cvs_pass', t('The CVS password you have chosen is too short (it must be at least %min characters long).', array('%min' => CVS_MIN_PASS_LENGTH))); + form_set_error('cvs_pass', t('The CVS password you have chosen is too short (it must be at least !min characters long).', array('!min' => CVS_MIN_PASS_LENGTH))); } } @@ -651,8 +675,8 @@ function cvs_user_edit_form_submit($form if ($form_values['send_mail']) { cvs_mail_user($form_values['cvs_uid'], $form_values['message']); } - drupal_set_message(t('The CVS account %account has been updated successfully.', array('%account' => theme('placeholder', $form_values['cvs_name'])))); - return 'admin/cvs'; + drupal_set_message(t('The CVS account %account has been updated successfully.', array('%account' => $form_values['cvs_name']))); + return 'admin/project/cvs-accounts'; } elseif (strlen($cvs_name) && $form_values['cvs_uid'] == $user->uid && isset($form_values['cvs_pass']) && strlen($form_values['cvs_pass'])) { if($cvs_status) { @@ -720,8 +744,8 @@ function cvs_alter_project_release_form( $fields = array('version_major', 'version_minor', 'version_patch'); - if (isset($_POST['edit']['tag'])) { - $tag_name = $_POST['edit']['tag']; + if (isset($_POST['tag'])) { + $tag_name = $_POST['tag']; // We have to validate this here, since we're getting called // before a validate callback would be invoked... if (!isset($tag_name)) { @@ -733,6 +757,10 @@ function cvs_alter_project_release_form( $tag->tag = 'HEAD'; $tag->branch = 1; $tag->nid = $project->nid; + // form_builder() expects $_POST to already be in '#post', so we + // manually shove it in there. form_builder() is presumably more + // safe than inspecting $_POST directly... + $form['version']['#post'] = $_POST; $form['version'] = form_builder('project_release_node_form', $form['version']); foreach ($fields as $field) { $form_val = $form['version']['num'][$field]['#value']; @@ -755,11 +783,11 @@ function cvs_alter_project_release_form( // API selector has already been set and use that in our $version. $needs_api_none = true; if (isset($form['taxonomy'][$vid])) { - $post_val = $_POST['edit']['taxonomy'][$vid]; + $post_val = $_POST['taxonomy'][$vid]; if (isset($post_val)) { if (is_numeric($post_val) && !empty($post_val) && db_result(db_query('SELECT COUNT(*) FROM {term_data} WHERE tid = %d AND vid = %d', $post_val, $vid))) { $version->version_api_tid = $post_val; - $options[$post_val] = $form['taxonomy'][$vid]['#options'][$post_val]; + $options[$post_val] = _cvs_get_option_from_taxo($form, $vid, $post_val); $form['taxonomy'][$vid]['#options'] = $options; $form['taxonomy'][$vid]['#default_value'] = $post_val; $needs_api_none = false; @@ -834,6 +862,10 @@ function cvs_alter_project_release_form( '#type' => 'hidden', '#value' => $tag->branch, ); + // form_builder() expects $_POST to already be in '#post', so we + // manually shove it in there. form_builder() is presumably more + // safe than inspecting $_POST directly... + $form['cvs_tag']['#post'] = $_POST; $form['cvs_tag'] = form_builder('project_release_node_form', $form['cvs_tag']); unset($form['version']['version']); if (isset($version_str)) { @@ -868,7 +900,7 @@ function cvs_alter_project_release_form( } if (isset($form['taxonomy'][$vid])) { $tid = $version->version_api_tid; - $options[$tid] = $form['taxonomy'][$vid]['#options'][$tid]; + $options[$tid] = _cvs_get_option_from_taxo($form, $vid, $tid); $form['taxonomy'][$vid]['#options'] = $options; $form['taxonomy'][$vid]['#default_value'] = $tid; } @@ -924,7 +956,7 @@ function cvs_alter_project_release_form( // TODO: make this a setting or generate the text in some other way? $err = t('ERROR: There are no CVS tags for this module that do not already have a release associated with them.'); $err .= '
' . t('To create a release, you must first create either a new CVS tag on one of the existing branches for this project, or you must add a new CVS branch.'); - $err .= '
' . t('Once you have created a tag or branch that should be used for your new release, try pressing the %retry link to continue.', array('%retry' => theme('placeholder', t('Retry')))); + $err .= '
' . t('Once you have created a tag or branch that should be used for your new release, try pressing the %retry link to continue.', array('%retry' => t('Retry'))); drupal_set_message($err); unset($form['preview']); $form['retry'] = array( @@ -991,6 +1023,7 @@ function _cvs_alter_project_release_form unset($form['menu']); unset($form['options']); unset($form['path']); + unset($form['log']); // Change preview to next and hide submit $form['preview'] = array( @@ -1005,6 +1038,19 @@ function _cvs_alter_project_release_form $form['#redirect'] = FALSE; } +function _cvs_get_option_from_taxo($form, $vid, $tid) { + if (!isset($form['taxonomy'][$vid])) { + return NULL; + } + foreach ($form['taxonomy'][$vid]['#options'] as $key => $obj) { + if (isset($obj->option[$tid])) { + return $obj; + } + } + return NULL; +} + + /** * pre_render callback for the project_release node form. We use this * to set the required form attribute back to TRUE on the body field, @@ -1084,7 +1130,7 @@ function theme_cvs_commit_message($commi $output .= "
$commit->message
passwd-file, found in the CVSROOT-directory of a repository. Copy/paste the contents of the passwd-file (or parts thereof) into the form below to mass import existing CVS accounts.'));
$form['data'] = array(
@@ -1440,10 +1504,9 @@ function cvs_account_import() {
'#required' => TRUE,
);
$form['submit'] = array('#type' => 'submit', '#value' => t('Import accounts'));
-
- return drupal_get_form('cvs_account_import', $form);
-}
-
+ return $form;
+}
+
/**
* Process cvs_account_import form submissions.
*/
@@ -1454,12 +1517,12 @@ function cvs_account_import_submit($form
if ($name && $pass && $user) {
if (db_result(db_query("SELECT name FROM {cvs_accounts} WHERE name = '%s'", $name))) {
db_query("UPDATE {cvs_accounts} SET pass = '%s', status = %d WHERE name = '%s'", $pass, CVS_APPROVED, $name);
- $names[] = t('updated %name', array('%name' => $name));
+ $names[] = t('updated !name', array('!name' => $name));
}
else {
$uid = db_result(db_query("SELECT uid FROM {users} WHERE name = '%s'", $name));
db_query("INSERT INTO {cvs_accounts} (uid, name, pass, status) VALUES (%d, '%s', '%s', %d)", $uid, $name, $pass, CVS_APPROVED);
- $names[] = t('added %name', array('%name' => $name));
+ $names[] = t('added !name', array('!name' => $name));
}
}
}
@@ -1471,7 +1534,7 @@ function cvs_account_import_submit($form
drupal_set_message(t('Failed to import CVS accounts.'), 'error');
}
- return 'admin/cvs';
+ return 'admin/project/cvs-accounts';
}
function cvs_account_export() {
@@ -1502,7 +1565,7 @@ function cvs_account_status() {
foreach ($options as $opt => $opt_name) {
$count = db_result(db_query('SELECT COUNT(*) FROM {cvs_accounts} WHERE status = %d', $opt));
if ($count) {
- $output .= ''. t('%option CVS accounts: %count', array('%option' => $opt_name, '%count' => $count)) .'
'; + $output .= ''. t('!option CVS accounts: !count', array('!option' => $opt_name, '!count' => $count)) .'
'; } } @@ -1522,23 +1585,23 @@ function cvs_account_status() { $count = db_result(db_query('SELECT COUNT(*) FROM {cvs_messages}')); if ($count) { - $output .= ''. t('There have been %count commits.', array('%count' => $count)) .'
'; + $output .= ''. t('There have been !count commits.', array('!count' => $count)) .'
'; } $warnings = array(); $count = db_result(db_query('SELECT COUNT(*) FROM {cvs_messages} WHERE uid = 0')); if ($count) { - $warnings[] = '{cvs_messages}-table have no user ID associated with them.', array('%count' => $count)) .'{cvs_messages}-table have no user ID associated with them.', array('!count' => $count)) .'{cvs_files}-table have no user ID associated with them.', array('%count' => $count)) .'{cvs_files}-table have no user ID associated with them.', array('!count' => $count)) .'{cvs_files}-table have no project associated with them.', array('%count' => $count)) .'{cvs_files}-table have no project associated with them.', array('!count' => $count)) .'' . t("This page controls CVS access for the %title project. All users listed in this table have permission to commit and tag files in this project's directory in the CVS repository (%cvs_dir). The project owner is listed first and always has full access.", array('%cvs_dir' => theme('placeholder', '/contributions' . $node->cvs_directory), '%title' => theme('placeholder', $node->title))) . '
'; + $output = '' . t("This page controls CVS access for the %title project. All users listed in this table have permission to commit and tag files in this project's directory in the CVS repository (%cvs_dir). The project owner is listed first and always has full access.", array('%cvs_dir' => '/contributions' . $node->cvs_directory, '%title' => $node->title)) . '
'; $rows = array(); $header = array(); @@ -2224,9 +2289,9 @@ function theme_cvs_project_access($form) l(t('delete'), "node/$nid/cvs-access/delete/$user->uid")); } - $rows[] = array(form_render($form['user']), form_render($form['submit'])); + $rows[] = array(drupal_render($form['user']), drupal_render($form['submit'])); $output .= theme('table', $header, $rows); - $output .= form_render($form); + $output .= drupal_render($form); return $output; } @@ -2247,7 +2312,7 @@ function cvs_project_access_form() { '#value' => 0, ); $form['submit'] = array('#type' => 'submit', '#value' => t('Grant access')); - return drupal_get_form('cvs_project_access', $form); + return $form; } function cvs_project_access_validate($form_id, $form_values, $form) { @@ -2257,15 +2322,15 @@ function cvs_project_access_validate($fo } $user = $form_values['user']; if (!$user_result = db_fetch_object(db_query("SELECT name, uid FROM {users} WHERE name = '%s'", $user))) { - form_set_error('user', t('%user is not a valid user on this site.', array('%user' => theme('placeholder', $user))), 'error'); + form_set_error('user', t('%user is not a valid user on this site.', array('%user' => $user)), 'error'); return; } if (!db_num_rows(db_query("SELECT * FROM {cvs_accounts} WHERE status = %d AND uid = %d", CVS_APPROVED, $user_result->uid))) { - form_set_error('user', t('%user does not have a CVS account.', array('%user' => theme('placeholder',$user))), 'error'); + form_set_error('user', t('%user does not have a CVS account.', array('%user' => $user)), 'error'); } if (db_num_rows(db_query("SELECT * FROM {cvs_project_maintainers} WHERE uid = %d AND nid = %d", $user_result->uid, arg(1))) || (($node = node_load(arg(1))) && $user == $node->name)) { - form_set_error('user', t('%user already has CVS access for this project.', array('%user' => theme('placeholder', $user))), 'error'); + form_set_error('user', t('%user already has CVS access for this project.', array('%user' => $user)), 'error'); } // save the uid in the form so we don't have to look it up again in @@ -2281,7 +2346,7 @@ function cvs_project_access_submit($form $user->uid = $form_values['uid']; $user->name = $form_values['user']; - drupal_set_message(t('CVS access has been granted to %user.', array('%user' => theme('username', $user)))); + drupal_set_message(t('CVS access has been granted to !user.', array('!user' => theme('username', $user)))); } /** @@ -2294,8 +2359,8 @@ function cvs_project_delete_access($nid, $form['user'] = array('#type' => 'value', '#value' => $user); return confirm_form('cvs_project_delete_access_confirm', $form, - t('Are you sure you want to delete CVS access for %user?', - array('%user' => theme('username', $user))), + t('Are you sure you want to delete CVS access for !user?', + array('!user' => theme('username', $user))), "node/$nid/cvs-access/", t('This action cannot be undone.'), t('Delete'), @@ -2311,7 +2376,7 @@ function cvs_project_delete_access_confi $uid = $form_values['uid']; $user = $form_values['user']; db_query("DELETE FROM {cvs_project_maintainers} WHERE nid = %d AND uid = %d", $nid, $uid); - drupal_set_message(t('CVS access for %user has been deleted.', array('%user' => theme('username', $user)))); + drupal_set_message(t('CVS access for !user has been deleted.', array('!user' => theme('username', $user)))); drupal_goto("node/$nid/cvs-access"); } @@ -2351,9 +2416,9 @@ function _cvs_get_strings() { $strings['cvs_message_anon'] = t('The Concurrent Versioning System (CVS) is a software development tool available to volunteers with experience in software development, translation, theming, or documentation who wish to participate in the Drupal project. -To request access to the Drupal CVS repository you must create -an account and login. Come back to this page after you have -logged on.
', array('%register' => url('user/register'), '%login' => url('user/login'))); +To request access to the Drupal CVS repository you must create +an account and login. Come back to this page after you have +logged on.
', array('!register' => url('user/register'), '!login' => url('user/login'))); $strings['cvs_message_auth'] = t('The Concurrent Versioning System (CVS) is a software development tool used to manage programs and files for the Drupal project. It is available to volunteers with experience in software development, translation, theming @@ -2361,15 +2426,15 @@ or documentation who wish to participateA CVS account is not required to contribute patches to the Drupal project or community contributed projects. Anonymous access to the Drupal CVS repository is available which can be used to accomplish this. Please peruse the -CVS handbookand patch guide for more +CVS handbookand patch guide for more information.
If you are an open source software developer, themer, translator or documentation writer, please use the form below to request access to Drupal\'s CVS repository. Prior to applying, please ensure that: