function gauth_libraries_info in Google Auth 7
Same name and namespace in other branches
- 7.2 gauth.module \gauth_libraries_info()
Implements hook_libraries_info().
File
- ./
gauth.module, line 101 - Google Auth Api for drupal.
Code
function gauth_libraries_info() {
$config_dir = conf_path();
$lib_path = 'sites/all/libraries/google-api-php-client';
if (file_exists(DRUPAL_ROOT . '/' . $config_dir . '/libraries')) {
$lib_path = $config_dir . '/libraries/google-api-php-client';
}
$file_path = 'src/Google/Client.php';
$include_path = 'vendor/autoload.php';
$line_number = 42;
if (!file_exists(DRUPAL_ROOT . '/' . $lib_path . '/vendor')) {
// Composer install;
$file_path = 'google/apiclient/src/Google/Client.php';
$include_path = 'autoload.php';
$line_number = 40;
}
$libraries['google-api-php-client'] = array(
'name' => 'Google OAuth2 Library',
'vendor url' => 'http://code.google.com/p/google-api-php-client',
'download url' => 'https://github.com/google/google-api-php-client/releases',
'version arguments' => array(
'file' => $file_path,
'pattern' => '/LIBVER = "([0-9\\.a-z\\-]+)/',
'lines' => $line_number,
),
'files' => array(
'php' => array(
$include_path,
),
),
);
return $libraries;
}