Commit 24b04f57 authored by Robert Rollins's avatar Robert Rollins

Reverted Date iCal back to support for only iCalcreator v2.20.2.

I'm a complete idiot, and totally failed to test the iCal import functionality
with iCalcreator v2.22. Turns out, the author made much more significant changes
to the library than I'd thought, and those changes completely broke the import
process. With several hours of work, I could probably re-write Date iCal to
support these changes, but those re-writes would necessarily make Date iCal
incompatible with v2.20.2 of the library, which would break every existing Date
iCal install the next time they update, unless they also update iCalcreator.

Thus, due to my lack of available time, and the update incompatibility problem,
I'm just declaring that Date iCal 7.x will not support iCalcreator v2.22, ever.
If someone comes along to make a Drupal 8 version, they could choose to put in
the time to re-write the guts of the import code to make it v2.22-compatible.
parent 6719cc67
......@@ -11,15 +11,15 @@ INSTALLATION
Date iCal has several required dependencies, and an optional one:
- The Views (version 3.5+), Entity API, Libraries API (version 2.0+), and Date
modules are required.
- The iCalcreator library is required.
- The iCalcreator library v2.20.2 is required.
- PHP 5.3 is required for the iCalcreator library to properly handle timezones.
- 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 latest release from this 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).
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).
Or, if you have drush, you can install iCalcreator by running this command from
your site's root directory:
......@@ -243,5 +243,6 @@ 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/.
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.
The author of iCalcreator made extenside backwards incompatible changes to the
library in the v2.22 release. Thus Date iCal does not support any version of
iCalcreator after v2.20.2.
......@@ -2,6 +2,6 @@ core = 7.x
api = 2
libraries[iCalcreator][download][type] = "get"
libraries[iCalcreator][download][url] = "https://github.com/iCalcreator/iCalcreator/archive/master.zip"
libraries[iCalcreator][download][url] = "https://github.com/iCalcreator/iCalcreator/archive/e3dbec2cb3bb91a8bde989e467567ae8831a4026.zip"
libraries[iCalcreator][directory_name] = "iCalcreator"
libraries[iCalcreator][destination] = "libraries"
......@@ -165,30 +165,13 @@ function date_ical_libraries_info() {
'name' => 'iCalcreator',
'vendor url' => 'http://github.com/iCalcreator/iCalcreator',
'download url' => 'http://github.com/iCalcreator/iCalcreator',
'version callback' => '_date_ical_detect_icalcreator_version',
'versions' => array(
'2.20' => array(
// For versions prior to 2.22, the main file of the library was
// iCalcreator.class.php, so we check for that first.
'version arguments' => array(
'file' => 'iCalcreator.class.php',
'pattern' => "/define.*?ICALCREATOR_VERSION.*?([\d\.]+)/",
'lines' => 100,
),
'files' => array(
'php' => array('iCalcreator.class.php'),
),
),
'2.22' => array(
'version arguments' => array(
'file' => 'iCalcreator.php',
'pattern' => "/define.*?ICALCREATOR_VERSION.*?([\d\.]+)/",
'lines' => 100,
),
'files' => array(
'php' => array('iCalcreator.php'),
),
),
'version arguments' => array(
'file' => 'iCalcreator.class.php',
'pattern' => "/define.*?ICALCREATOR_VERSION.*?([\d\.]+)/",
'lines' => 100,
),
'files' => array(
'php' => array('iCalcreator.class.php'),
),
);
......@@ -509,23 +492,3 @@ function _date_ical_convert_rrule_for_icalcreator($rrule) {
}
return $new_rrule;
}
function _date_ical_detect_icalcreator_version($library) {
// If the user has a version of libraries installed that has the
// libraries_get_version_from_versions() function, use it to find the
// actual version number by inspecting the iCalcreator files.
if (function_exists('libraries_get_version_from_versions')) {
return libraries_get_version_from_versions($library);
}
// Otherwise, provide a "best guess" version number.
if (file_exists(DRUPAL_ROOT . "/{$library['library path']}/iCalcreator.class.php")) {
return '2.20';
}
else if (file_exists(DRUPAL_ROOT . "/{$library['library 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