Index: libraries.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/libraries/libraries.module,v
retrieving revision 1.16
diff -u -p -r1.16 libraries.module
--- libraries.module	15 Dec 2010 21:09:52 -0000	1.16
+++ libraries.module	12 Jan 2011 10:39:41 -0000
@@ -56,16 +56,8 @@ function libraries_get_path($name, $base
  * @ingroup libraries
  */
 function libraries_get_libraries() {
-  global $profile;
-
-  // When this function is called during Drupal's initial installation process,
-  // the name of the profile that is about to be installed is stored in the
-  // global $profile variable. At all other times, the regular system variable
-  // contains the name of the current profile, and we can call variable_get()
-  // to determine the profile.
-  if (!isset($profile)) {
-    $profile = variable_get('install_profile', 'standard');
-  }
+  // Get the name of the currently active install profile.
+  $profile = drupal_get_profile();
 
   $directory = 'libraries';
   $searchdir = array();
@@ -127,10 +119,7 @@ function libraries_get_libraries() {
  *   the files.
  */
 function libraries_scan_info_files() {
-  global $profile;
-  if (!isset($profile)) {
-    $profile = variable_get('install_profile', 'standard');
-  }
+  $profile = drupal_get_profile();
   $config = conf_path();
 
   // Build a list of directories.
