drupal-module-misc/drupal-module-misc.patch

Tue, 28 Aug 2012 18:29:00 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:29:00 +0200
changeset 532
e5f1af644b30
parent 531
e3f92ea19d16
permissions
-rw-r--r--

Massively update modules from Drupal 6.x to 7.x, and add diverse OpenID modules.
Unfortunately many modules available to Drupal 6.x installations have not been
since maintained or ported to 7.x causing this package to diminish in both size
and utility.

     1 Since PHP 5.3 calling functions with objects and having the function
     2 declare the object parameter as a reference causes a runtime error.
     3 The "call by reference" indicator "&" has to be removed from parameters
     4 which are known to be passed as objects (by reference.)
     6 Index: sites/all/modules/diff/diff.module
     7 --- sites/all/modules/diff/diff.module.orig	2010-08-12 18:34:08.000000000 +0200
     8 +++ sites/all/modules/diff/diff.module	2010-08-13 14:18:26.000000000 +0200
     9 @@ -78,7 +78,7 @@
    10  /**
    11   * Implementation of hook_menu_alter().
    12   */
    13 -function diff_menu_alter(&$callbacks) {
    14 +function diff_menu_alter($callbacks) {
    15    // Overwrite the default 'Revisions' page
    16    $callbacks['node/%node/revisions']['page callback'] = 'diff_diffs_overview';
    17    $callbacks['node/%node/revisions']['module'] = 'diff';
    18 @@ -128,7 +128,7 @@
    19  /**
    20   * Implementation of hook_nodeapi().
    21   */
    22 -function diff_node_view_alter(&$build) {
    23 +function diff_node_view_alter($build) {
    24    $node = $build['#node'];
    25    if (user_access('view revisions') && variable_get('show_diff_inline_'. $node->type, FALSE)) {
    26      // Ugly but cheap way to check that we are viewing a node's revision page.
    27 @@ -146,7 +146,7 @@
    28  /**
    29   * Implements hook_form_alter().
    30   */
    31 -function diff_form_alter(&$form, $form_state, $form_id) {
    32 +function diff_form_alter($form, $form_state, $form_id) {
    33    if (!empty($form['#node_edit_form'])) {
    34      // Add a 'View changes' button on the node edit form.
    35      if (variable_get('show_preview_changes_'. $form['type']['#value'], TRUE) && $form['nid']['#value'] > 0) {
    36 @@ -163,7 +163,7 @@
    37  /**
    38   * Implements hook_form_alter() for node_type_form.
    39   */
    40 -function diff_form_node_type_form_alter(&$form, $form_state) {
    41 +function diff_form_node_type_form_alter($form, $form_state) {
    42    if (isset($form['type'])) {
    43      // Node type edit form.
    44      // Add checkbox to activate 'View changes' button per node type.
    45 @@ -198,7 +198,7 @@
    46  /**
    47   * Callback if 'View changes' is pressed.
    48   */
    49 -function diff_node_form_build_preview_changes($form, &$form_state) {
    50 +function diff_node_form_build_preview_changes($form, $form_state) {
    51    module_load_include('inc', 'diff', 'diff.pages');
    52    $old_node = clone node_load($form_state['values']['nid']);
    53    $node = node_form_submit_build_node($form, $form_state);
    54 @@ -342,7 +342,7 @@
    55  /**
    56   * Form submission handler for diff_inline_form() for JS-disabled clients.
    57   */
    58 -function diff_inline_form_submit(&$form, &$form_state) {
    59 +function diff_inline_form_submit($form, $form_state) {
    60    if (isset($form_state['values']['revision'], $form_state['values']['node'])) {
    61      $node = $form_state['values']['node'];
    62      $vid = $form_state['values']['revision'];

mercurial