Commit a283770d authored by Robert Rollins's avatar Robert Rollins

Date iCal now supports iCalcreator v2.22+.

parent e45f7aab
......@@ -16,10 +16,10 @@ Date iCal has several required dependencies, and an optional one:
- The Feeds module is optional. It's needed only if you you wish to import iCal
feeds from other sites.
To install the iCalcreator library, download the project's v2.20.2 zip file:
https://github.com/iCalcreator/iCalcreator/archive/e3dbec2cb3bb91a8bde989e467567ae8831a4026.zip
Extract it, and copy iCalcreator.class.php to a folder in your Drupal site
named sites/all/libraries/iCalcreator (you'll need to create that folder).
To install the iCalcreator library, download the latest release from ths url:
https://github.com/iCalcreator/iCalcreator/archive/master.zip
Extract it, and copy the contents to a folder in your Drupal site named
sites/all/libraries/iCalcreator (you'll need to create that folder).
Or, if you have drush, you can install iCalcreator by running this command from
your site's root directory:
......@@ -243,6 +243,5 @@ The libraries/windowsZones.json file, which Date iCal uses to map Windows-style
timezone names to real timezone IDs, is from Version24 of the Unicode CLDR:
http://cldr.unicode.org/.
The author of iCalcreator made backwards incompatible changes to the library
in the v2.22 release. Thus Date iCal does not currently support any version of
iCalcreator after v2.20.2.
For some time, Date iCal did not support the 2.22+ of the iCalcreator library.
This has been corrected, and any version should now function normally.
......@@ -2,6 +2,6 @@ core = 7.x
api = 2
libraries[iCalcreator][download][type] = "get"
libraries[iCalcreator][download][url] = "https://github.com/iCalcreator/iCalcreator/archive/e3dbec2cb3bb91a8bde989e467567ae8831a4026.zip"
libraries[iCalcreator][download][url] = "https://github.com/iCalcreator/iCalcreator/archive/master.zip"
libraries[iCalcreator][directory_name] = "iCalcreator"
libraries[iCalcreator][destination] = "libraries"
......@@ -165,13 +165,18 @@ function date_ical_libraries_info() {
'name' => 'iCalcreator',
'vendor url' => 'http://github.com/iCalcreator/iCalcreator',
'download url' => 'http://github.com/iCalcreator/iCalcreator',
'version arguments' => array(
'file' => 'iCalcreator.class.php',
'pattern' => "/define.*?ICALCREATOR_VERSION.*?([\d\.]+)/",
'lines' => 100,
),
'files' => array(
'php' => array('iCalcreator.class.php'),
'version callback' => '_date_ical_detect_icalcreator_version',
'versions' => array(
'2.20' => array(
'files' => array(
'php' => array('iCalcreator.class.php'),
),
),
'2.22+' => array(
'files' => array(
'php' => array('iCalcreator.php'),
),
),
),
);
......@@ -492,3 +497,16 @@ function _date_ical_convert_rrule_for_icalcreator($rrule) {
}
return $new_rrule;
}
function _date_ical_detect_icalcreator_version() {
$path = libraries_get_path('iCalcreator');
if (file_exists(DRUPAL_ROOT . "/$path/iCalcreator.class.php")) {
return '2.20';
}
else if (file_exists(DRUPAL_ROOT . "/$path//iCalcreator.php")) {
return '2.22+';
}
else {
return FALSE;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment