Patchdoq
Categories
Component ID
438440
Component name
Patchdoq
Component type
module
Component security advisory coverage
not-covered
Downloads
2867
Component created
Component changed
Component body
Adds API to patch Drupal core and contributions from code.
Using Patchdoq module
In you own module you should implement hook_patch(). For example:
/**
* Implementation of hook_patch().
*/
function mymodule_patch() {
$path = drupal_get_path('module', 'mymodule');
return array(
//
// Drupal core patches.
//
'simpletest drupal.js' => array(
'name' => t('Simpletest module fix'),
'description' => t('My hacks to simpletest module.'),
'file' => $path .'/drupal/drupal.js.patch',
'patch arguments' => '-u -p1',
),
//
// 3rd party contributed modules patches.
//
'cck content' => array(
'name' => t('CCK content module fix'),
'description' => t('My hacks to CCK content module.'),
'file' => realpath($path .'/modules/cck.patch'),
'patch arguments' => '-u -p0 -d "'. drupal_get_path('module', 'content') .'"',
),
);
}