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