diff -u includes/project_maintainers.inc includes/project_maintainers.inc --- includes/project_maintainers.inc +++ includes/project_maintainers.inc 17 Aug 2010 16:31:46 -0000 @@ -7,7 +7,33 @@ */ /** - * Build the form for the + * Build the form for the node/N/maintainers tab on project nodes. + * + * This form uses project_permission_load() which in turn invokes + * hook_project_permission_info() to gather information about all the + * per-project permissions defined by any enabled modules on the site. It + * loops over all the current maintainers of the project and provides a + * checkbox for each user/permission pair. As a special-case, the owner of the + * project is automatically granted all permissions, so the row for them + * includes all the checkboxes pre-selected and disabled. Finally, there's an + * auto-complete username text box and a set of checkboxes to allow the user + * of this form to add a new maintainer and select their permissions. + * + * @param $form_state + * The Form API state of the form (set by drupal_get_form()). + * @param $project + * The fully-loaded node object for the project to build the maintainers + * form for. + * + * @return + * A form definition array for use by the Form API. + * + * @see theme_project_maintainers_form() + * @see project_maintainers_form_validate() + * @see project_maintainers_form_submit() + * @see project_permission_load() + * @see hook_project_permission_info() + * @see drupal_get_form() */ function project_maintainers_form($form_state, $project) { // Load all the info about per-project permissions on this site. @@ -77,6 +103,18 @@ return $form; } +/** + * Render the final markup for the project maintainers form. + * + * @param $form + * The fully-built form array for the project maintainers form. + * + * @return + * String containing the markup to output for the maintainers form. + * + * @see theme() + * @see project_maintainers_form() + */ function theme_project_maintainers_form($form) { $output = ''; diff -u release/project_release.test release/project_release.test --- release/project_release.test +++ release/project_release.test 17 Aug 2010 16:21:04 -0000 @@ -70,11 +70,12 @@ // Add errors to project_release_package_errors and check that they are shown $errors = new stdClass; $errors->nid = $release->nid; - $errors->messages = serialize(array($this->randomName(), $this->randomName(), $this->randomName())); + $error_messages = array($this->randomName(), $this->randomName(), $this->randomName()); + $errors->messages = serialize($error_messages); $success = drupal_write_record('project_release_package_errors', $errors); $this->drupalGet("node/$release->nid"); $this->assertText(t('Packaging error messages'), 'Packaging error messages shown correctly.'); - foreach ($errors->message as $message) { + foreach ($error_messages as $message) { $this->assertText($message); }