diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3ea10eeef8bb3953ea53a358ac65c991f4fa2acc..4505fba8a0e6bc6b5051206be97becbe7b920000 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,10 +1,10 @@ // $Id$ -Libraries x.x-x.x, xxxx-xx-xx +Libraries 6.x-1.x, xxxx-xx-xx ----------------------------- -Libraries 6.x-1.x, xxxx-xx-xx +Libraries 6.x-1.0, 2010-01-27 ----------------------------- #496732 by tstoeckler, robphillips: Allow placing libraries in root directory. diff --git a/libraries.info b/libraries.info index f135042fd44ef25e991ab0eaef7dd8c78c0852c1..5a5bd6bfd19ad7423c6a2d3fec268e17a24db37e 100644 --- a/libraries.info +++ b/libraries.info @@ -1,4 +1,4 @@ ; $Id$ name = Libraries -description = External library handling for Drupal modules. +description = Allows version dependent and shared usage of external libraries. core = 6.x diff --git a/libraries.module b/libraries.module index d93b26ee994d855bfa4d0d2f18ec11525260b760..c7990ad61f6ce226aabf101a36c41badb1f88c9c 100644 --- a/libraries.module +++ b/libraries.module @@ -9,8 +9,8 @@ /** * Helper function to build paths to libraries. * - * @param $library - * The external library name to return the path for. + * @param $name + * The machine name of a library to return the path for. * @param $base_path * Whether to prefix the resulting path with base_path(). * @@ -19,7 +19,7 @@ * * @ingroup libraries */ -function libraries_get_path($library, $base_path = FALSE) { +function libraries_get_path($name, $base_path = FALSE) { static $libraries; if (!isset($libraries)) { @@ -27,13 +27,13 @@ function libraries_get_path($library, $base_path = FALSE) { } $path = ($base_path ? base_path() : ''); - if (!isset($libraries[$library])) { + if (!isset($libraries[$name])) { // Most often, external libraries can be shared across multiple sites, so // we return sites/all/libraries as the default path. - $path .= 'sites/all/libraries/' . $library; + $path .= 'sites/all/libraries/' . $name; } else { - $path .= $libraries[$library]; + $path .= $libraries[$name]; } return $path;