Skip to content
This repository was archived by the owner on May 2, 2018. It is now read-only.

Commit ab724d2

Browse files
committed
Merge pull request dingproject#9 from ding2tal/core-pr-4
Core pr 4
2 parents b168a21 + c3be612 commit ab724d2

File tree

11 files changed

+745
-590
lines changed

11 files changed

+745
-590
lines changed

alma.features.field_instance.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function alma_field_default_field_instances() {
107107
'bundle' => 'provider_alma',
108108
'default_value' => array(
109109
0 => array(
110-
'value' => 30,
110+
'value' => 180,
111111
),
112112
),
113113
'deleted' => 0,

alma.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ description = Implementation of Axiell’s Alma API for DDELibra.
33
core = 7.x
44
package = Providers
55
php = 5.2.4
6-
version = 7.x-1.0-beta2
76
project = alma
87
dependencies[] = date
98
dependencies[] = ding_provider
109
dependencies[] = ding_reservation
10+
dependencies[] = ding_user
1111
dependencies[] = email
1212
dependencies[] = entity
1313
dependencies[] = features

alma.install

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
<?php
22

3+
/**
4+
* Implements hook_requirements().
5+
*/
6+
function alma_requirements($phase) {
7+
$requirements = array();
8+
// Ensure translations don't break at install time.
9+
$t = get_t();
10+
11+
if (!function_exists('simplexml_load_string')) {
12+
$requirements['simplexml'] = array(
13+
'title' => 'SimpleXML',
14+
'description' => $t('The Alma module requires SimpleXML to function. Please install and/or enable SimpleXML in your PHP configuration.'),
15+
'severity' => REQUIREMENT_ERROR,
16+
);
17+
}
18+
19+
if ($phase == 'runtime') {
20+
$requirements['alma'] = array(
21+
'title' => $t('Alma'),
22+
'value' => $t('Alma configured'),
23+
'severity' => REQUIREMENT_OK,
24+
);
25+
if (!variable_get('alma_base_url', FALSE) || !variable_get('ting_agency', FALSE)) {
26+
$requirements['alma']['value'] = $t('Alma not configured');
27+
$requirements['alma']['description'] = $t('Alma is not properly configured, please visit <a href="@link">the settings page</a>.', array('@link' => url('admin/config/ding/provider/alma')));
28+
$requirements['alma']['severity'] = REQUIREMENT_ERROR;
29+
}
30+
$requirements['alma_wayf'] = array(
31+
'title' => $t('Alma WAYF'),
32+
'value' => $t('Alma WAYF configured'),
33+
'severity' => REQUIREMENT_OK,
34+
);
35+
if (!variable_get('wayf_hash', FALSE)) {
36+
$requirements['alma']['value'] = $t('Alma WAYF not configured');
37+
$requirements['alma']['description'] = $t('Alma WAYF is not properly configured, you need to set $conf[\'wayf_hash\'] in setttings.php.');
38+
$requirements['alma']['severity'] = REQUIREMENT_ERROR;
39+
}
40+
}
41+
42+
return $requirements;
43+
}
344

445
/**
546
* Update system table set alma weight=10 to ensure form_alter hooks are called
@@ -32,7 +73,7 @@ function alma_update_7002() {
3273
function alma_update_7003() {
3374
return db_update('field_config')
3475
->fields(array(
35-
'type' => 'datetime'
76+
'type' => 'datetime',
3677
))
3778
->condition('field_name', 'field_alma_reservation_pause', '=')
3879
->execute();

0 commit comments

Comments
 (0)