Skip to content
This repository has been archived by the owner on Jan 9, 2021. It is now read-only.

Commit

Permalink
Fix for enhancement #2
Browse files Browse the repository at this point in the history
Appending original time of recurring event to newly assigned date.
  • Loading branch information
Cosmo Mathieu committed Nov 1, 2015
1 parent 38989fc commit e20a19b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions application/modules/calendar/plugin.php
Expand Up @@ -20,10 +20,10 @@
*
* Provides the ability to execute code via template tags.
*
* @package CodeIgniter
* @subpackage codeigniter
* @package pagestudio
* @subpackage modules
* @category Common Functions
* @author ExpressionEngine Dev Team
* @author Cosmo Mathieu
* @link http://codeigniter.com/user_guide/
*/
class Calendar_plugin extends Plugin
Expand Down Expand Up @@ -104,7 +104,8 @@ public function events()
foreach($options as $o_key => $o_value) {
$key_to_check = (in_array($o_value, $recurrence['dow'])) ? $o_key : false;
if(isset($next_seven_days[$key_to_check])){
$key->start = $next_seven_days[$key_to_check];
// Add new date and append the time from original date.
$key->start = $next_seven_days[$key_to_check] . ' ' . substr($key->start, -8);
}
}
$events[] = (array) $key;
Expand Down Expand Up @@ -133,7 +134,8 @@ public function events()
foreach($options as $o_key => $o_value) {
$key_to_check = (in_array($o_value, $recurrence['dow'])) ? $o_key : false;
if(isset($next_seven_days[$key_to_check])){
$key->start = $next_seven_days[$key_to_check];
// Add new date and append the time from original date.
$key->start = $next_seven_days[$key_to_check] . ' ' . substr($key->start, -8);
}
}
$events[] = (array) $key;
Expand Down

0 comments on commit e20a19b

Please sign in to comment.