Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
219 commits
Select commit Hold shift + click to select a range
8164f7c
Revert "right parameter name" and "extract debt_ids from params"
runephilosof Oct 4, 2012
c982866
Merge pull request #1 from runephilosof/alma_debt
cableman Oct 8, 2012
4199bb2
Revert "updated holdings information to show department and collectio…
runephilosof Oct 5, 2012
5898133
Revert "Shows detailed holding information according to openRuth"
runephilosof Oct 5, 2012
1f19773
Actually clear the cache when alma_user_clear_cache is called
runephilosof Nov 6, 2012
269b273
Merge pull request #2 from runephilosof/alma_availability
cableman Nov 13, 2012
cfbb8b1
Merge pull request #3 from runephilosof/usercache
cableman Nov 13, 2012
f64e8ea
Updated codeing style to match Drupal
cableman Nov 14, 2012
05a9dfe
Fixes notice when there is no reservation pause in Alma
Arni Dec 10, 2012
2f03e3f
Merge pull request #4 from Arni/reservation-pause-notice-bug
cableman Dec 17, 2012
5f5607f
Added ssl_version to alma https requests
cableman Jan 4, 2013
3f79ea3
Added alma_availability_items function to get more availability infor…
impara Jan 18, 2013
df11c61
isReservable from alma is "true" or "false" not "yes" or "no"
impara Jan 18, 2013
68f18dd
adding flag for displaying if the record is an internet resource
wiredloose Jan 31, 2013
3a60ba1
Added title to alma_availability_holdings for remote loans.
impara Feb 4, 2013
eb26e2e
Fixed preferred branch default selection on reservation pop up.
impara Feb 5, 2013
fb59b68
Merge pull request #9 from odensecentralbibliotek/reservation_popup_d…
wiredloose Feb 11, 2013
471e3af
fixing validation and submit handlers for reservation options followi…
wiredloose Feb 11, 2013
82ce510
Marge alma changes in from artesis
cableman Mar 19, 2013
96070aa
Removed unneeded unserialize im caching
cableman Mar 19, 2013
a02152b
Fixed index error that made PHP go down in alma availability
cableman Mar 19, 2013
9978ad7
Removed un-used holdings index (holdings_available)
cableman Mar 21, 2013
5f43b66
Added missing properties to alma reservarions
cableman Mar 22, 2013
d6fc7b2
Clean up alma presave function and profile2 value handling
cableman Mar 22, 2013
4cdc822
Merge branch 'artesis' into development
cableman Mar 27, 2013
d156009
Fixed login error on new users
cableman Apr 10, 2013
29af875
Added full name and address fields.
cableman Apr 10, 2013
ce2d628
Removed deprecated features.inc file
cableman Apr 10, 2013
0e6bc07
Converted profile2 fields into virtual field, so personal data is not…
cableman Apr 10, 2013
9cc2471
* Remove form alters, hook_profile_init and clean out the main part o…
cableman Apr 10, 2013
309a69c
Change profile2 to use metadata wrappers in all file and basic clean up
cableman Apr 10, 2013
3719e46
Updated field weights
cableman Apr 10, 2013
0e31956
Disabled edit of fields that should not be changed by the user on the…
cableman Apr 10, 2013
1fbf851
Added new email field to the profile2 profile
cableman Apr 11, 2013
7d230a0
Moved mail updateds into the providers hook_profile2_presave()
cableman Apr 11, 2013
d771d72
Moved interest periode back into the DB as alma do not support storin…
cableman Apr 11, 2013
0d84377
Fixed interest period field in update and change mail to use virtual …
cableman Apr 11, 2013
636efd1
Changed the alma reservation pause field to a real datetime field
cableman Apr 12, 2013
f98381b
Added update function to change the reservation pause field type in t…
cableman Apr 12, 2013
473ca75
Added configuration option to enter max pin code lenght and hook to r…
cableman Apr 12, 2013
580d1b3
Updated provider call account_update to update_pincode as it only upd…
cableman Apr 12, 2013
46b03b0
Added update function to remove un-used field database tables after s…
cableman Apr 12, 2013
c0169b7
Added hook_enable to create profile2 type on module activation
cableman Apr 16, 2013
d86584a
Merge branch 'profile2-fixes' into development
cableman Apr 16, 2013
809943e
Catch exception if the user is not logged in. Happens when trying to …
cableman Apr 17, 2013
934095f
Move pin code lenght into ding_user and ensured that presave it not e…
cableman Apr 18, 2013
0f01d46
Updated handling of availability information for periodical and inter…
cableman Apr 18, 2013
c35aaf2
Fixed reservation index error
cableman Apr 18, 2013
0a22592
Added tid to pseudo objects as it is required to display the objects …
cableman Apr 19, 2013
e251dd5
Added new provider populate_pseudo_entity function and removed old re…
cableman Apr 19, 2013
288057c
Added dc:identifier to alma pseudo entity
cableman Apr 19, 2013
a2bd30b
Added makefile to the module
cableman Apr 22, 2013
bbdeeb5
Matched Alma http request to the newest drupal core patch to fix ssl …
cableman Apr 24, 2013
277910c
Exported with features 2 and language as english
zorp Apr 25, 2013
c81c2e5
Fixed variable names and function comments
cableman Apr 30, 2013
1135ee2
Fixed changing reservationpause
Arni Apr 30, 2013
c479848
Merge branch 'reservationpause' into development
Arni Apr 30, 2013
b7fdd84
Merge branch 'release' of github.com:ding2tal/alma into release
Arni Apr 30, 2013
abd441f
Removed space inside t function
cableman Apr 30, 2013
3cbcc0c
Disable sticky header for the availability
cableman May 2, 2013
2b66d2e
Merge branch 'release' into development
cableman May 2, 2013
ae64cba
Merge branch 'development' of github.com:ding2tal/alma into development
cableman May 2, 2013
ec477a4
Added extra check of changed mail address
cableman May 3, 2013
c2e7887
Merge branch 'release' into development
cableman May 3, 2013
634ac62
Added Features_extra to make file, so it's possible to add menu_block…
zorp May 3, 2013
2ae1562
Merge branch 'development' of github.com:ding2tal/alma into development
zorp May 3, 2013
9c0b663
Changed makefile to point to ding2 on github
cableman May 6, 2013
993f81d
Avoid a notice when no absentPeriods have been set.
runephilosof May 15, 2013
2fa2962
Fixed some function comments and typos
cableman May 15, 2013
8c7bb08
Merge branch 'release' into core-pr-3
cableman May 15, 2013
6125cf9
Merge branch 'release' into development
cableman May 15, 2013
7e613e3
Merge pull request #11 from odensecentralbibliotek/d2tdev
cableman May 16, 2013
0575b83
Merge branch 'development' into release
cableman May 16, 2013
9fefc25
Merge branch 'release' into core-pr-3
cableman May 16, 2013
8670c5a
Update drupal users mail after mail have changed in the profile
cableman May 16, 2013
3fcb015
Merge branch 'release' into core-pr-3
cableman May 16, 2013
2859d47
Merge branch 'release' into development
cableman May 16, 2013
a7d752a
Fixed missing absent_id in update of reservation pause
cableman May 16, 2013
5caa7cf
Added option to have a 12 months interest period
cableman May 16, 2013
103a9cf
Added documentation to some of the functions in alma reservation
cableman May 16, 2013
1c179bc
Fixed reservation expire times during creation and update
cableman May 16, 2013
45a2a47
Added support for configurable default interest period
cableman May 16, 2013
d8fd9f2
Removed old pincode length option from alma as global option have bee…
cableman May 16, 2013
47a1945
Merge branch 'release' into core-pr-3
cableman May 16, 2013
726b058
Merge branch 'release' into development
cableman May 16, 2013
b9b5473
Added support for session based caching of parton information
cableman May 16, 2013
7dee5d0
Merge branch 'release' into core-pr-3
cableman May 16, 2013
0bc1118
Added provider session cacheing of user loans
cableman May 30, 2013
5d110f6
Added session cache to alma debts
cableman May 30, 2013
93b7e62
Change reservation to use provider session cache
cableman May 31, 2013
9ef940e
Merge branch 'development' into release
cableman May 31, 2013
a6c005a
Moved profile create into features from hook_enable()
cableman Jun 3, 2013
e1568f9
Removed features extra module as it is not used
cableman Jun 3, 2013
0bd6d0c
Added better description to the code and removed commented out code
cableman Jun 3, 2013
3792325
Fixed function description to match module name
cableman Jun 3, 2013
6868b6b
Fixed reservation date in presave to use php date functions and remov…
cableman Jun 3, 2013
c806dc4
Added watchdog statement in alma_update_provider
cableman Jun 3, 2013
d1c6c53
Updated reservation pause in hook_profile2_load to use date function
cableman Jun 3, 2013
376c9c0
Added better function description in availability callback
cableman Jun 3, 2013
08c9200
Merge branch 'core-pr-3' into release. Based on core code review.
cableman Jun 3, 2013
acfc2b2
Merge branch 'release' into development
cableman Jun 3, 2013
87bf1e4
Added the new hook_default_interest_period()
cableman Jun 4, 2013
159da54
Merge branch 'core-pr-3' into release
cableman Jun 4, 2013
c1381c1
Updated makefile to point to ding2tal
cableman Jun 4, 2013
37cc527
Merge branch 'release' into development
cableman Jun 4, 2013
6c5c15b
Fixed reservation create to use ding_user_provider_profile()
cableman Jun 4, 2013
c2539cc
Added new hook_reservation_deletion_enabled()
cableman Jun 4, 2013
8ed283c
Merge branch 'core-pr-3' into release
cableman Jun 4, 2013
f21af89
Merge branch 'release' into development
cableman Jun 4, 2013
baa9f0a
Merge remote-tracking branch 'origin' into release
cableman Jun 4, 2013
06f8e7b
Removed session based cache, as it do not play nice with drupal
cableman Jun 5, 2013
883a831
Merge branch 'release' into development
cableman Jun 5, 2013
3b5b352
Moved sorting of reservation types into the module
cableman Jun 6, 2013
5eaf4eb
Added support for getting only one type of reservations
cableman Jun 6, 2013
4707184
Fixed undefined indexes for ill records in hook_populate_pseudo_entity()
cableman Jun 6, 2013
1b793a0
Added session cache to alma reservations
cableman Jun 6, 2013
79b1c0b
Added ding session cache to loans
cableman Jun 6, 2013
509ebe4
Added session cache clear for loans
cableman Jun 6, 2013
d08b0b7
Merge remote-tracking branch 'origin' into release
cableman Jun 6, 2013
da632e5
Merge branch 'release' into development
cableman Jun 6, 2013
ac9e5c1
Merge remote-tracking branch 'origin' into release
cableman Jun 10, 2013
4f3e963
Fixed already reservated (move return statement outside foreach)
cableman Jun 10, 2013
b8d5abb
Merge remote-tracking branch 'origin' into release
cableman Jun 11, 2013
a4bb4de
Changed default interest period to 6 months
cableman Jun 11, 2013
2b7c02a
Merge branch 'development' into release
cableman Jun 11, 2013
eab1d5c
Changed watchdog statements to watchdog exception statements
cableman Jun 20, 2013
942d8ac
Added constants for the date formats used by alma
cableman Jun 20, 2013
b6a9c82
Merge pull request #8 from odensecentralbibliotek/title_for_remote_loan
cableman Jun 20, 2013
5a2e3cb
Merge pull request #5 from odensecentralbibliotek/feature
cableman Jun 20, 2013
779079c
Resolved merge conflict in alma reservation
cableman Jun 20, 2013
0b3d6c5
Merge branch 'development' of github.com:ding2tal/alma into development
cableman Jun 20, 2013
0833137
Changed makefile to use development branch
cableman Jun 24, 2013
b168a21
Merge pull request #8 from ding2tal/core-pr-3
kasperg Jul 3, 2013
1540a39
Resolved merge conflict with core
cableman Jul 3, 2013
f5ecd05
Updated makefile to point to development branch and ding2tal
cableman Jul 3, 2013
bfffc49
Merge branch 'release' into development
cableman Jul 3, 2013
ef920e3
Merge remote-tracking branch 'origin' into release
cableman Jul 3, 2013
2ac9fa9
Fixed coding styles
cableman Sep 9, 2013
a9d0762
Removed material number form display name in debts
cableman Sep 10, 2013
1f4a199
Updated coding style
cableman Sep 10, 2013
4523c19
Removed legacy function "alma_reservation_set_preferred_branch"
cableman Sep 10, 2013
424ab34
Added a litter more documentation to the reservation part of the code
cableman Sep 11, 2013
e742f5a
Added even more function documentation to the reservation code
cableman Sep 11, 2013
31505df
Reworked the reserve process to handle better branch seletion and bet…
cableman Sep 11, 2013
85dd417
Fixed logic in reservation options submit
cableman Sep 11, 2013
f81635a
Added default_value to override provider options defaults
cableman Sep 11, 2013
9a16c78
Updated coding style in alma.loan.inc
cableman Sep 12, 2013
30b4d96
Added translation of ALMA fee types in to english text strings
cableman Sep 12, 2013
a55968c
Added inter-library status to ready-for-pickup
cableman Sep 20, 2013
a076f04
Merge remote-tracking branch 'origin' into release
cableman Sep 20, 2013
0436c94
Fixed default interest period selector in the administration interface
cableman Oct 7, 2013
3ed9c02
Added missing clear cache that is called after dibs payment is accepted
cableman Oct 8, 2013
28526f5
Display name in debts from alma is not always mat. no. and title
cableman Oct 8, 2013
d17c60a
Added cache expire to alma organisation information
cableman Oct 16, 2013
1c58330
Speeded up holdings on page reloads
cableman Oct 20, 2013
2a89e68
Added a total count to the holdings information
cableman Oct 20, 2013
31b6910
Ensured that total_count key exists in alma responce
cableman Oct 22, 2013
927c07b
Removed HTML holdings table generation - moved to ding availability
cableman Oct 30, 2013
e444526
Show periodicals reservation button based on showReservationButton
cableman Oct 30, 2013
a91abc3
Added collection to holdings data
cableman Nov 1, 2013
eed3d18
Merge remote-tracking branch 'origin' into release
cableman Nov 4, 2013
89f22a6
Updated makefile to point to tag 7.x-1.0-beta2
cableman Nov 4, 2013
5f12f34
Updated makefile to point to tag 7.x-1.0-beta3
cableman Nov 26, 2013
1a1212f
Updated coding style
cableman Nov 28, 2013
59b1b02
Added support for the new datawell 3 PIDs
cableman Dec 2, 2013
5390dbc
Removed extra function call on cache reset
cableman Dec 3, 2013
1498ced
Added reservation type to reservation to have more information in din…
cableman Dec 3, 2013
7b5baf8
Merge branch 'development' into datawell-3
cableman Dec 5, 2013
85cb965
Merge branch 'datawell-3' into development
cableman Dec 5, 2013
24881f0
Added support for WAYF in alma
cableman Dec 10, 2013
0854e54
Removed version number from info file as it do not match release
cableman Dec 12, 2013
ce9a2f1
Merge remote-tracking branch 'origin' into release
cableman Dec 12, 2013
a68dbd1
Updated makefile to point to tag 7.x-1.0-beta4
cableman Dec 12, 2013
1b419b7
Added requirements to alma in relation to WAYF
cableman Dec 13, 2013
aa7dfc9
Merge remote-tracking branch 'origin' into release
cableman Dec 18, 2013
5080654
Updated makefile to point to tag 7.x-1.0-beta5
cableman Dec 18, 2013
e9c4a23
Updated makefile to point to tag 7.x-1.0-rc1
cableman Dec 20, 2013
923123a
Updated makefile to point to tag 7.x-1.0-rc2
cableman Jan 8, 2014
7dbab31
Updated coding style in alma client
cableman Jan 15, 2014
2f8944f
Merge remote-tracking branch 'origin' into release
cableman Jan 20, 2014
08ed20c
Updated makefile to point to tag 7.x-1.0-rc3
cableman Jan 20, 2014
b0cb915
Updated makefile to point to ding2 master branches
cableman Feb 3, 2014
1612421
Added check to see if not is FALSE
Mar 17, 2014
1577406
Removed WAYF requirement (move to ding_wayf)
cableman Apr 29, 2014
c3be612
Fixed makefile with right branch name
cableman Apr 29, 2014
8360489
Fixed typo in results variable name in alma_debt_list
cableman Apr 29, 2014
4e0f865
Updated debt status texts to work better with module such as potx
cableman Apr 29, 2014
a726da3
Updated comment about inter library loans
cableman Apr 29, 2014
e9df7b0
Added check for ding_session cache in alma reservation cache clear
cableman Apr 29, 2014
5f349ae
Updated virtual field to version 1.2
cableman May 6, 2014
1cb5f80
Updated features to version 2.0
cableman May 6, 2014
02cc6f4
Updated email to version 1.3
cableman May 6, 2014
03ad808
Updated date to version 2.7
cableman May 6, 2014
c4460bb
Issue #140 cableman: Added block status vaiable on user authentication
cableman May 19, 2014
c24d9f9
Issue #339 cableman: Added SMS and phone number to alma
cableman May 20, 2014
a83bdb4
Added alma code about sms number from ding_user
cableman May 20, 2014
490373b
Issue #354 cableman: Updated alma reservations to display the status …
cableman May 20, 2014
5d34657
Updated SMS tax naming to SMS fee
cableman May 22, 2014
ab724d2
Merge pull request #9 from ding2tal/core-pr-4
kasperg May 22, 2014
dbbe684
Ensured that alma parton cache is refreshed on save
cableman Jun 25, 2014
cf97641
Updated date to 2.8
cableman Sep 8, 2014
fae4ec8
Added user category and blocks code to the user information
cableman Sep 23, 2014
d58239e
Merge branch 'master' into development
cableman Oct 6, 2014
44f6a0b
Updated makefile to point to development branch
cableman Oct 6, 2014
e22dcd6
Updated make file to point to master branch
cableman Oct 6, 2014
00a8576
Issue #534 by pjohans: Make interest_period required to avoid --none-…
pjohans Oct 10, 2014
794e19d
Issue #534 by pjohans: Get default_interest period for reservations
pjohans Oct 10, 2014
8c1155c
Issue #534 by pjohans: More correct use method alma_reservation_defau…
pjohans Oct 10, 2014
678a5f9
Issue #534 by pjohans: Undo make interest_period field required.
pjohans Oct 10, 2014
7932da7
Merge pull request #17 from pjohans/development
cableman Oct 14, 2014
837b39f
Merge pull request #10 from ding2tal/core-pr-5
kasperg Oct 22, 2014
77ca0fe
Merge pull request #11 from ding2tal/development
kasperg Dec 17, 2014
80b0864
Support pickup numbers which are not integers.
kasperg Mar 23, 2015
2477112
Merge pull request #19 from kdb/1119-support-pickup-number-strings
cableman Apr 23, 2015
9912f4b
Issue #761 by Inlead: Consider denial of deniedRenewal a success.
Sep 4, 2015
932e8ae
Merge branch 'DDBCMS-11'
Sep 4, 2015
2218f8a
Merge pull request #20 from inleadmedia/DDBCMS-11
cableman Oct 28, 2015
6b39311
Issue #1337 by Inlead: Encode special characters in item id.
Nov 18, 2015
9d526d3
Merge pull request #21 from inleadmedia/DDBCMS-1
kasperg Jan 26, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
404 changes: 0 additions & 404 deletions alma.features.field.inc

This file was deleted.

512 changes: 512 additions & 0 deletions alma.features.field_base.inc

Large diffs are not rendered by default.

462 changes: 462 additions & 0 deletions alma.features.field_instance.inc

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions alma.features.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* @file
* alma.features.inc
*/

/**
* Implements hook_default_profile2_type().
*/
function alma_default_profile2_type() {
$items = array();
$items['provider_alma'] = entity_import('profile2_type', '{
"userCategory" : true,
"userView" : true,
"type" : "provider_alma",
"label" : "Profile for Alma",
"weight" : "0",
"data" : { "registration" : 0 }
}');
return $items;
}
74 changes: 51 additions & 23 deletions alma.info
Original file line number Diff line number Diff line change
@@ -1,23 +1,51 @@
core = "7.x"
dependencies[] = "date"
dependencies[] = "ding_provider"
dependencies[] = "features"
dependencies[] = "list"
description = "Implementation of Axiell’s Alma API for DDELibra."
features[field][] = "profile2-provider_alma-field_absent_id"
features[field][] = "profile2-provider_alma-field_alma_interest_period"
features[field][] = "profile2-provider_alma-field_alma_mobile_phone"
features[field][] = "profile2-provider_alma-field_alma_phone_id"
features[field][] = "profile2-provider_alma-field_alma_preferred_branch"
features[field][] = "profile2-provider_alma-field_alma_reservation_pause"
files[] = "alma.module"
files[] = "includes/alma.availability.inc"
files[] = "includes/alma.debt.inc"
files[] = "includes/alma.reservation.inc"
files[] = "includes/alma.user.inc"
files[] = "lib/AlmaClient/AlmaClient.class.php"
name = "Alma"
package = "Ding!"
php = "5.2.4"
project = "alma"
version = "7.x-0.12"
name = Alma
description = Implementation of Axiell’s Alma API for DDELibra.
core = 7.x
package = Providers
project = alma
dependencies[] = date
dependencies[] = ding_provider
dependencies[] = ding_reservation
dependencies[] = ding_user
dependencies[] = email
dependencies[] = entity
dependencies[] = features
dependencies[] = list
dependencies[] = options
dependencies[] = profile2
dependencies[] = text
dependencies[] = virtual_field
features[features_api][] = api:2
features[field_base][] = field_alma_absent_id
features[field_base][] = field_alma_city
features[field_base][] = field_alma_full_name
features[field_base][] = field_alma_interest_period
features[field_base][] = field_alma_mail
features[field_base][] = field_alma_mobile_phone
features[field_base][] = field_alma_phone_id
features[field_base][] = field_alma_postal_code
features[field_base][] = field_alma_preferred_branch
features[field_base][] = field_alma_reservation_pause
features[field_base][] = field_alma_sms
features[field_base][] = field_alma_sms_id
features[field_base][] = field_alma_street_name
features[field_instance][] = profile2-provider_alma-field_alma_absent_id
features[field_instance][] = profile2-provider_alma-field_alma_city
features[field_instance][] = profile2-provider_alma-field_alma_full_name
features[field_instance][] = profile2-provider_alma-field_alma_interest_period
features[field_instance][] = profile2-provider_alma-field_alma_mail
features[field_instance][] = profile2-provider_alma-field_alma_mobile_phone
features[field_instance][] = profile2-provider_alma-field_alma_phone_id
features[field_instance][] = profile2-provider_alma-field_alma_postal_code
features[field_instance][] = profile2-provider_alma-field_alma_preferred_branch
features[field_instance][] = profile2-provider_alma-field_alma_reservation_pause
features[field_instance][] = profile2-provider_alma-field_alma_sms
features[field_instance][] = profile2-provider_alma-field_alma_sms_id
features[field_instance][] = profile2-provider_alma-field_alma_street_name
features[profile2_type][] = provider_alma
files[] = alma.module
files[] = includes/alma.availability.inc
files[] = includes/alma.debt.inc
files[] = includes/alma.reservation.inc
files[] = includes/alma.user.inc
files[] = lib/AlmaClient/AlmaClient.class.php
98 changes: 88 additions & 10 deletions alma.install
Original file line number Diff line number Diff line change
@@ -1,22 +1,100 @@
<?php

// Installation and update hooks for Openruth.
/**
* @file
* Handles requirements, installation and uninstall for the module.
*/

/**
* Implements hook_update_N.
* update system table set alma weight=10
* to ensure form_alter hooks are called AFTER ding_user and ding_provider
* Implements hook_requirements().
*/
function alma_requirements($phase) {
$requirements = array();
// Ensure translations don't break at install time.
$t = get_t();

if (!function_exists('simplexml_load_string')) {
$requirements['simplexml'] = array(
'title' => 'SimpleXML',
'description' => $t('The Alma module requires SimpleXML to function. Please install and/or enable SimpleXML in your PHP configuration.'),
'severity' => REQUIREMENT_ERROR,
);
}

if ($phase == 'runtime') {
$requirements['alma'] = array(
'title' => $t('Alma'),
'value' => $t('Alma configured'),
'severity' => REQUIREMENT_OK,
);
if (!variable_get('alma_base_url', FALSE) || !variable_get('ting_agency', FALSE)) {
$requirements['alma']['value'] = $t('Alma not configured');
$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')));
$requirements['alma']['severity'] = REQUIREMENT_ERROR;
}
}

return $requirements;
}

/**
* Update system table set alma weight=10 to ensure form_alter hooks are called
* AFTER ding_user and ding_provider
*/
function alma_update_7001() {
$num_upd = db_update('system')
->fields(array('weight' => 10))
->condition('name', 'alma', '=')
->execute();
}

/**
* Convert field storage to virtual field.
*/
function alma_update_7002() {
return db_update('field_config')
->fields(array(
'weight'=>10,
'storage_type' => 'virtual_field',
'storage_module' => 'virtual_field',
))
->condition('name','alma','=')
->execute();
->condition('field_name', '%alma%', 'LIKE')
->condition('field_name', 'field_alma_interest_period', '!=')
->execute();
}

/**
* Covert reservation field form data to datetime.
*/
function alma_update_7003() {
return db_update('field_config')
->fields(array(
'type' => 'datetime',
))
->condition('field_name', 'field_alma_reservation_pause', '=')
->execute();
}

/**
* Remove old field_sql_storage file data from the database as they are using
* virtual fields now and don't need a database table.
*/
function alma_update_7004() {
// Absent id have been renamed to field_alma_absent_id as virtual field.
field_delete_field('field_absent_id');
field_purge_batch(100);

// Mobile phone.
db_drop_table('field_data_field_alma_mobile_phone');
db_drop_table('field_revision_field_alma_mobile_phone');

// Mobile phone id.
db_drop_table('field_data_field_alma_phone_id');
db_drop_table('field_revision_field_alma_phone_id');

// Preferred branch.
db_drop_table('field_data_field_alma_preferred_branch');
db_drop_table('field_revision_field_alma_preferred_branch');

echo $num_upd;
return t('system weight for alma updated to 10');
// Reservation pause.
db_drop_table('field_data_field_alma_reservation_pause');
db_drop_table('field_revision_field_alma_reservation_pause');
}
26 changes: 24 additions & 2 deletions alma.make
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
api = 2
core = 7.x

; Contrib

projects[date][subdir] = "contrib"
projects[date][version] = "2.8"

projects[email][subdir] = "contrib"
projects[email][version] = "1.3"

projects[features][subdir] = "contrib"
projects[features][version] = "2.0"

projects[profile2][subdir] = "contrib"
projects[profile2][version] = "1.3"

projects[virtual_field][subdir] = "contrib"
projects[virtual_field][version] = "1.2"

; Ding! modules

projects[ding_provider][type] = "module"
projects[ding_provider][download][type] = "git"
projects[ding_provider][download][url] = "git@github.com:ding2tal/ding_provider.git"
projects[ding_provider][download][branch] = "development"
projects[ding_provider][download][url] = "git@github.com:ding2/ding_provider.git"
projects[ding_provider][download][branch] = "master"

projects[ding_reservation][type] = "module"
projects[ding_reservation][download][type] = "git"
projects[ding_reservation][download][url] = "git@github.com:ding2/ding_reservation.git"
projects[ding_reservation][download][branch] = "master"
Loading