diff -urp ../htmlpurifier/htmlpurifier.info ./htmlpurifier.info --- ../htmlpurifier/htmlpurifier.info 2009-12-13 03:30:38.000000000 +0200 +++ ./htmlpurifier.info 2010-02-08 17:11:55.562417000 +0200 @@ -3,6 +3,7 @@ name = "HTML Purifier" description = "Filter that removes malicious HTML and ensures standards compliant output." core = 6.x php = 5.0.5 +dependencies[] = libraries ; Information added by drupal.org packaging script on 2009-12-13 version = "6.x-2.1" diff -urp ../htmlpurifier/htmlpurifier.install ./htmlpurifier.install --- ../htmlpurifier/htmlpurifier.install 2009-10-22 18:40:01.000000000 +0300 +++ ./htmlpurifier.install 2010-02-08 19:09:31.065630000 +0200 @@ -38,11 +38,16 @@ function htmlpurifier_requirements($phas // This version of HTML Purifier is required static $req_version = '4.0.0'; $requirements = array(); - - // Can't use drupal_get_path, since module may not have been installed. - $module_path = dirname(__FILE__); + + // Make sure libraries_get_path available + if (!function_exists('libraries_get_path')) { + // Can't use drupal_get_path, since module may not have been installed. + require_once dirname(__FILE__) . '/../libraries/libraries.module'; + } + + $library_path = libraries_get_path('htmlpurifier'); $s = DIRECTORY_SEPARATOR; - if (!file_exists("$module_path/library/HTMLPurifier.auto.php")) { + if (!file_exists("$library_path/library/HTMLPurifier.auto.php")) { $requirements['htmlpurifier'] = array ( 'severity' => REQUIREMENT_ERROR, 'description' => t("Could not find HTML Purifier @@ -50,12 +55,12 @@ function htmlpurifier_requirements($phas of the library folder in the HTML Purifier tarball or zip to this folder or ensure HTMLPurifier.auto.php exists. You can download HTML Purifier at - htmlpurifier.org.", array('@path' => "$module_path{$s}library") + htmlpurifier.org.", array('@path' => "$library_path{$s}library") ), ); } else { - require_once "$module_path/library/HTMLPurifier.auto.php"; + require_once "$library_path/library/HTMLPurifier.auto.php"; if (!defined('HTMLPurifier::VERSION') || version_compare($old = HTMLPurifier::VERSION, $req_version, '<')) { $requirements['htmlpurifier'] = array ( Only in ./: htmlpurifier-library.patch diff -urp ../htmlpurifier/htmlpurifier.module ./htmlpurifier.module --- ../htmlpurifier/htmlpurifier.module 2009-12-13 03:10:18.000000000 +0200 +++ ./htmlpurifier.module 2010-02-08 17:15:30.925618000 +0200 @@ -157,7 +157,8 @@ function _htmlpurifier_process($text, $f function _htmlpurifier_load() { if (class_exists('HTMLPurifier')) return; $module_path = drupal_get_path('module', 'htmlpurifier'); - require_once "$module_path/library/HTMLPurifier.auto.php"; + $library_path = libraries_get_path('htmlpurifier'); + require_once "$library_path/library/HTMLPurifier.auto.php"; require_once "$module_path/HTMLPurifier_DefinitionCache_Drupal.php"; $factory = HTMLPurifier_DefinitionCacheFactory::instance(); $factory->register('Drupal', 'HTMLPurifier_DefinitionCache_Drupal');