l(t('here'), 'http://drupal.org/node/394070'), '!help' => l(t('help'), 'admin/help/coder_upgrade'))); case 'admin/help#coder_upgrade': return tp('The purpose of this module is to automate as much as possible the task of updating a contributed module for Drupal API changes.' . ' This particular module helps update the 6.x version of a contributed module to the 7.x version API.' . ' Relative to the Drupal core APIs, the list of automated conversions to be applied is indicated !link.' . ' Contributed modules that define an API may add their own list of automated conversions to be applied by utilizing the Upgrade API provided by this module.' . ' The Upgrade API is documented in coder_upgrade.api.php.', array('!link' => l(t('here'), 'http://drupal.org/node/394070'))) . tp('The primary conversion process involves parsing the module files (i.e., those files with extensions of .info, .install, .module, .inc, .profile, .theme, and .php) using the !link, iterating the list of core functions and hooks for those that have been modified, and programmatically upgrading these items based on the 7.x equivalent.' . ' The grammar structure and editing API provided by the grammar parser allow for more precise manipulation of the code than do regular expressions.' . ' To learn more about how to write upgrade routines, read the !link2.', array('!link' => l(t('Grammar Parser Library'), 'http://drupal.org/project/grammar_parser'), '!link2' => l(t('automated updates documentation'), 'http://drupal.org/node/712078'))) . tp('The secondary conversion process involves searching the module files for 6.x syntax and replacing the text with the 7.x equivalent.' . ' Because regular expressions may generate false positives, this type of change is only used in limited situations.') . tp(' In many cases, the API changes can be made in an automated fashion. ' . ' However, there are usually some changes that do not easily lend themselves to automated upgrade.' . ' In those cases, and when a conversion routine has not been provided, manual intervention by the module maintainer is required.' . ' As a convenience, this module wiil place TODO comments in the code where manual intervention is likely required.') . tp('Conversion Process') . tp('Begin the conversion process by uploading your module\'s files to a directory beneath the module input directory (currently set to !input).' . ' A directory (with the same name) for the converted files will automatically be created for you beneath the module output directory (currently set to !output).' . ' You may define the name of the module input and output directories !link.' . ' You may also upload your module to a modules directory beneath the sites directory (e.g. sites/all/modules).', array('!input' => $input, '!output' => $output, '!link' => l(t('here'), 'admin/config/development/coder/upgrade/settings'))) . tp('To apply the conversions, go to the !link page, select the appropriate runtime parameters based on the instructions below, and click the Convert files button.' . ' In the instructions below, references to checkboxes and other interface items apply to the development page.', array('!input' => $input, '!link' => l(t('Conversions Development'), 'admin/config/development/coder/upgrade'))) . tp('To convert 6.x files to 7.x files do the following:') . t('
  1. On the Upgrades tab, select the conversion (or upgrade) categories to apply by checking the appropriate boxes in the list.
  2. On the Extensions tab, select the file types to convert by checking the appropriate boxes in the list.
  3. On the Directories tab, select the directories containing the files to be converted.
  4. On the Modules tab, select the modules containing the files to be converted.
  5. Click the Convert files button.
The conversions will be done as follows for each of the directories and modules selected in steps 3 and 4 above:
  1. The selected directory or module will be copied to the module output directory (!output).
  2. Files in the output directory will be reviewed one at a time and the selected conversions applied.
After the automated conversions are applied:
  1. In the Directories and Modules tab, a patch file link is added to the names of each converted directory or module.
  2. Click on the patch file link to review the changes made for each directory or module.
  3. Otherwise, review the changes using your favorite directory or file comparison utility.
  4. Rerun the !coder to highlight the areas in your module\'s code needing manual review.
  5. Copy the directory from the module output directory to the 7.x installation directory for your contributed modules (e.g., sites/all/modules or sites/default/modules).
  6. Install the module through the !install and test it.
', array('!input' => $input, '!output' => $output, '!coder' => l(t('Coder Review'), 'admin/config/development/coder/review'), '!install' => l(t('Drupal interface'), 'admin/structure/modules'))) . tp('Manual Changes') . tp('After applying the automated conversions to your module, rerun the !coder to highlight the areas in your module\'s code needing manual review.', array('!coder' => l(t('Coder Review'), 'admin/config/development/coder/review'))) . tp('Feedback') . tp('If any of the automated conversions are not successful with your module and you believe the conversion code could be changed to handle your module\'s code, please submit a project issue to the !issue specifying "Coder Upgrade" as the Component.' . ' If you can also supply a patch for the change, that would be greatly appreciated too.', array('!issue' => l(t('Coder Module'), 'http://drupal.org/node/add/project-issue/coder'))); } }