Ran the coder (code review) module and it guided me through some changes.

There are some remaining issues.

      Line 305: new hook_theme() function is required to register theme_ functions (Drupal Docs)
      function theme_legal_administration($form) {

      severity: criticalLine 32: The menu system has been completely over-hauled in 6.x. (Drupal Docs)
        if ($may_cache) {      

      severity: criticalLine 34: The menu system has been completely over-hauled in 6.x. (Drupal Docs)
           $items[] = array('path' => 'admin/settings/legal', 

      severity: criticalLine 41: The menu system has been completely over-hauled in 6.x. (Drupal Docs)
          $items[] = array('path' => 'legal',

      severity: criticalLine 49: The menu system has been completely over-hauled in 6.x. (Drupal Docs)
          $items[] = array('path' => 'legal_accept',

legal.install

      severity: criticalclick to read moreLine 15: A new schema API has been added in 6.x (Drupal Docs)
       switch ($GLOBALS['db_type']) {

      Explanation: This patch caused changes to the format of hook_install(), hook_uninstall(), and hook_update_N(). No longer are switch statements done on $GLOBALS['db_type']; instead, use the variety of schema API functions to perform table manipulation.
      severity: criticalclick to read moreLine 59: A new schema API has been added in 6.x (Drupal Docs)
        switch ($GLOBALS['db_type']) {

      Explanation: This patch caused changes to the format of hook_install(), hook_uninstall(), and hook_update_N(). No longer are switch statements done on $GLOBALS['db_type']; instead, use the variety of schema API functions to perform table manipulation.

      severity: criticalclick to read moreLine 115: db_num_rows has been deprecated (Drupal Docs)
        if (db_num_rows($result) == $limit) {
CommentFileSizeAuthor
legal.diff10.65 KBreikiman

Comments

zilla’s picture

i'd love to see this wrap up for drupal6 as well - is somebody patching or porting completely?

zilla’s picture

any update on this?

robert castelo’s picture

Version: 5.x-1.x-dev » 6.x-7.x-dev
Status: Active » Closed (duplicate)

I've added a development snapshot of work so far (will be available in the next 12 hours).

There's a weird issue whereby checkboxes which are set to required don't trigger a error if not clicked, I noticed that checkboxes created with Profile have the same problem. We'll have to add our own validation code, which I've already done for the 'accept' checkbox on user/registration page.

By the way I've also added a SimpleTest file for testing registration accept/not accepted, works if T&Cs have already been set up (ideally I'd like to automate that bit as well).

Note: The dev version should not be used on a live site.

Closing this issue as it's a duplicate: http://drupal.org/node/235023