Skip to content

Commit

Permalink
Fix mismatched method signatures.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jan 7, 2016
1 parent 9bed54d commit c856087
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions kronolith/lib/Event/Horde.php
Expand Up @@ -328,16 +328,31 @@ public function getDeleteUrl($params = array(), $full = false)
* Returns a simple object suitable for json transport representing this
* event.
*
* @param boolean $allDay If not null, overrides whether the event is
* an all-day event.
* @param boolean $full Whether to return all event details.
* @param string $time_format The date() format to use for time formatting.
* @param array $options An array of options:
*
* @return object A simple object.
* - all_day: (boolean) If not null, overrides whether the event is an
* all-day event.
* DEFAULT: null (Do not override).
* - full: (boolean) Whether to return all event details.
* DEFAULT: false (Do not return all details).
* - time_format: (string) The date() format to use for time formatting.
* DEFAULT: 'H:i'
* - history: (boolean) If true, ensures that this event's history is
* loaded from the History backend.
* DEFAULT: false (Do not ensure history is loaded).
*
* @return stdClass A simple object.
*/
public function toJson($allDay = null, $full = false, $time_format = 'H:i')
public function toJson(array $options = array())
{
$json = parent::toJson($allDay, $full, $time_format);
$options = array_merge(array(
'all_day' => null,
'full' => false,
'time_format' => 'H:i',
'history' => false),
$options
);
$json = parent::toJson($options);
if ($this->_ajaxLink) {
$json->aj = $this->_ajaxLink;
} elseif ($link = (string)$this->getViewUrl(array(), true, false)) {
Expand Down

0 comments on commit c856087

Please sign in to comment.