Hi,
I need help adding patch to pathauto module. This is the patch file: http://drupal.org/files/issues/pathauto_generate_aliases_for_all_languag...
(or see #44 on this thread: http://drupal.org/node/321848)
On pathauto/pathauto.inc file, I see that line 283 is:
* For modules which provided pattern items in hook_pathauto(),
* the relevant identifier for the specific item to be aliased
* (e.g., $node->type).
* @param $language
* A string specify the path's language.
* @return
* The alias that was created.
....
....
....
but the patch looks like this:
--- pathauto.orig/pathauto.inc
+++ pathauto/pathauto.inc
@@ -283,6 +283,16 @@
}
}
+ if ($module == 'node') {
+ $alias_for_all_languages = variable_get('pathauto_node_enable_alias_for_all_languages', 'default_handling');
+ $lang_pattern = trim(variable_get('pathauto_'. $module .'_'. $type .'_'. $language .'_pattern', ''));
+
+ if ((empty($lang_pattern) && $alias_for_all_languages == 'no_lang_pattern_all_langs') ||
+ $alias_for_all_languages == 'all_aliases_all_langs') {
+ $language = '';
+ }
+ }
+
// Special handling when updating an item which is already aliased.
$pid = NULL;
$old_alias = NULL;
I mean they are quite different (original text looks more like comments and the patch does not) It looks like to me that the patch is asking me to remove 6 lines starting from line 283 and add 16 new lines from the patch; but doing so I will be adding the patch in between comment lines...
Can someone please help me figure out the best way to get this done?
I was using netbeans but it looks like netbeans only add the second part of the patch which is for pathauto/pathauto.inc file and do nothing to the first part of the patch which I guess is for pathauto/pathauto.admin.inc file.. How do I separate one patch file like this into two so that I can apply the patches separately?
Many thanks for your help.
BB
Comments
Patched
I patched them and pasted them in http://drupalbin.com
Patched pathauto.admin.inc
http://drupalbin.com/14101
and
Patched pathauto.inc
http://drupalbin.com/14102
Thank you so much!!
JPSH,
You made my day!! Thanks a lot =D
BB