Added HTML Purifier 4.8.0 library using standard location

This commit is contained in:
Manuel Cillero 2017-08-02 16:01:02 +02:00
parent 05c7e47866
commit 570dc80359
371 changed files with 31752 additions and 40 deletions

View file

@ -65,18 +65,18 @@ function htmlpurifier_requirements($phase) {
if (function_exists('libraries_get_path')) {
$library_path = libraries_get_path('htmlpurifier');
$using_libraries = true;
if (!file_exists("$library_path/library/HTMLPurifier.auto.php")) {
$library_path = dirname(__FILE__);
if (!file_exists("$library_path/htmlpurifier/HTMLPurifier.auto.php")) {
$library_path = 'sites/all/libraries';
$complain_loc = true;
$using_libraries = false;
}
} else {
$library_path = dirname(__FILE__);
$library_path = 'sites/all/libraries';
$using_libraries = false;
}
$s = DIRECTORY_SEPARATOR;
if (!file_exists("$library_path/library/HTMLPurifier.auto.php")) {
if (!file_exists("$library_path/htmlpurifier/HTMLPurifier.auto.php")) {
$requirements['htmlpurifier_library'] = array (
'title' => $t('HTML Purifier library'),
'severity' => REQUIREMENT_ERROR,
@ -85,7 +85,7 @@ function htmlpurifier_requirements($phase) {
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
<a href=\"http://htmlpurifier.org/download.html\">htmlpurifier.org</a>.", array('@path' => "$library_path{$s}library")
<a href=\"http://htmlpurifier.org/download.html\">htmlpurifier.org</a>.", array('@path' => "$library_path{$s}htmlpurifier")
),
);
return $requirements;
@ -105,9 +105,9 @@ function htmlpurifier_requirements($phase) {
new HTML Purifier tarball unzips to (you'll be reminded in an
update notification).",
array(
'@oldpath' => dirname(__FILE__) . '/library',
'@newpath' => libraries_get_path('htmlpurifier') . '/library',
'@somefile' => libraries_get_path('htmlpurifier') . '/library/HTMLPurifier.auto.php',
'@oldpath' => dirname(__FILE__) . '/htmlpurifier',
'@newpath' => libraries_get_path('htmlpurifier') . '/htmlpurifier',
'@somefile' => libraries_get_path('htmlpurifier') . '/htmlpurifier/HTMLPurifier.auto.php',
)),
);
}
@ -121,7 +121,7 @@ function htmlpurifier_requirements($phase) {
if (!$ours || version_compare($ours, $req_version, '<')) {
// Can't use _htmlpurifier_load(), since it assumes a later
// version
require_once "$library_path/library/HTMLPurifier.auto.php";
require_once "$library_path/htmlpurifier/HTMLPurifier.auto.php";
if (defined('HTMLPurifier::VERSION')) {
$version = HTMLPurifier::VERSION;
} else {
@ -181,13 +181,13 @@ function htmlpurifier_requirements($phase) {
array('%path' => libraries_get_path('htmlpurifier')));
} else {
$how_to_update = $t('To update, replace
<code>%path/library/</code> with the <code>library/</code>
<code>%path/htmlpurifier/</code> with the <code>library/</code>
directory from the downloaded archive. ',
array('%path' => dirname(__FILE__)));
}
$warning = $t('If you do not perform this operation correctly,
your Drupal installation will stop working. Ensure that
<code>%path/library/HTMLPurifier.auto.php</code> exists after
<code>%path/htmlpurifier/HTMLPurifier.auto.php</code> exists after
the upgrade.',
array('%path' => $library_path));
$requirements['htmlpurifier_version'] = array(
@ -205,7 +205,7 @@ function htmlpurifier_requirements($phase) {
);
}
}
return $requirements;
}
@ -232,7 +232,7 @@ function htmlpurifier_update_6200() {
}
variable_set("htmlpurifier_config_$format", $config_data);
}
return array();
}