[EventCalendar] Changes to work with PHP 5.3

Chris Janton face at CentosPrime.COM
Mon Aug 3 12:07:32 UTC 2009


I'm still wondering why the filter arguments are specified as being  
passed by reference (they are being passed by value in PHP 5.3).

Here's the changes made to get things to work for me.

face at mac:event-calendar:131 $ svn diff eventcalendar3.php
Index: eventcalendar3.php
===================================================================
--- eventcalendar3.php	(revision 123882)
+++ eventcalendar3.php	(working copy)
@@ -111,7 +111,7 @@


  /** In advanced mode, exclude events from the archive. */
-function ec3_filter_getarchives_where(&$where)
+function ec3_filter_getarchives_where($where)
  {
    global $ec3,$wpdb;
    if($ec3->advanced)
@@ -121,7 +121,7 @@


  /** In advanced mode, exclude events from the archive. */
-function ec3_filter_getarchives_join(&$join)
+function ec3_filter_getarchives_join($join)
  {
    global $ec3;
    if($ec3->advanced)
@@ -132,7 +132,7 @@

  /** In advanced mode, exclude events from the archive,
   *  Otherwise, disbale EC's normal query filtering, for archive  
links. */
-function ec3_filter_get_archives_link(&$link_html)
+function ec3_filter_get_archives_link($link_html)
  {
    global $ec3;
    $re='/(<a[^>]* href=[\'"]|<option[^>]* value=[\'"])([^\'"]+) 
([\'"])/';
@@ -154,7 +154,7 @@


  /** Rewrite date restrictions if the query is day- or category-  
specific. */
-function ec3_filter_posts_where(&$where)
+function ec3_filter_posts_where($where)
  {
    global $ec3,$wpdb;

@@ -283,7 +283,7 @@
  }

  /** */
-function ec3_filter_posts_join(&$join)
+function ec3_filter_posts_join($join)
  {
    global $ec3,$wpdb;
    // The necessary joins are decided upon in ec3_filter_posts_where().
@@ -297,7 +297,7 @@
  }

  /** Change the order of event listings. */
-function ec3_filter_posts_orderby(&$orderby)
+function ec3_filter_posts_orderby($orderby)
  {
    global $ec3, $wpdb;
    if($ec3->order_by_start)
@@ -321,7 +321,7 @@


  /** Eliminate double-listings for posts with >1 scheduled event. */
-function ec3_filter_posts_groupby(&$groupby)
+function ec3_filter_posts_groupby($groupby)
  {
    global $ec3,$wpdb;
    if($ec3->join_ec3_sch || $ec3->order_by_start)
@@ -334,7 +334,7 @@


  /** Add a sched_id field, if we want a listing. */
-function ec3_filter_posts_fields(&$fields)
+function ec3_filter_posts_fields($fields)
  {
    global $ec3,$wpdb;
    if($ec3->join_ec3_sch || $ec3->order_by_start)
@@ -348,7 +348,7 @@


  /** Remove limts when we are making an ec3xml feed. */
-function ec3_filter_post_limits(&$limits)
+function ec3_filter_post_limits($limits)
  {
    global $ec3;
    if( $ec3->query->is_feed &&
@@ -515,7 +515,7 @@
  }


-function ec3_filter_the_content(&$post_content)
+function ec3_filter_the_content($post_content)
  {
    global $ec3;
    switch($ec3->show_event_box)
@@ -529,7 +529,7 @@

  /** Page (not post) content can contain a tag like  
[EC3BigCalendar:<options>]
   *  which gets replaced by a full-page calendar. */
-function ec3_filter_the_content_bigcal(&$post_content)
+function ec3_filter_the_content_bigcal($post_content)
  {
    if(is_page())
    {


8)
----------------------------------
Chris Janton  - face at CentosPrime dot COM
Netminder for Opus1.COM





More information about the EventCalendar mailing list