Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eventcalendar3/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ec3_Version
{
var $part; ///< Array of version parts.

function ec3_Version($str)
function __construct($str)
{
$s=preg_replace('/([-a-z]+)([0-9]+)/','\1.\2',$str);
$v=explode('.',$s);
Expand Down
6 changes: 3 additions & 3 deletions eventcalendar3/calendar-basic.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ec3_CalendarDay
var $_events;
var $_events_allday;

function ec3_CalendarDay($date)
function __construct($date)
{
$this->date = $date;
$this->_posts = array();
Expand Down Expand Up @@ -129,7 +129,7 @@ class ec3_BasicCalendar
var $dateobj;

/** $month_date is a string of the form "YYYY-MM..." */
function ec3_BasicCalendar($options=false,$month_date=false)
function __construct($options=false,$month_date=false)
{
// Set options from the $options array, if it's been provided.
// Otherwise set the defaults from the old, global WP options.
Expand Down Expand Up @@ -288,7 +288,7 @@ function generate()

while(True)
{
$this->dateobj = clone($curr_dateobj);
$this->dateobj = cloneDateObj($curr_dateobj);
if($col>6)
{
$monthstr .= $this->wrap_week($weekstr,$curr_dateobj);
Expand Down
4 changes: 2 additions & 2 deletions eventcalendar3/calendar-big.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
/** Renders a big calendar. */
class ec3_BigCalendar extends ec3_SidebarCalendar
{
function ec3_BigCalendar($options=false,$datetime=0)
function __construct($options=false,$datetime=0)
{
// Initialise the parent class.
$this->ec3_SidebarCalendar($options,$datetime);
ec3_SidebarCalendar::__construct($options,$datetime);
}

/** dayobj - ec3_CalendarDay object, may be empty. */
Expand Down
4 changes: 2 additions & 2 deletions eventcalendar3/calendar-sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ec3_SidebarCalendar extends ec3_BasicCalendar
var $disable_popups;


function ec3_SidebarCalendar($options=false,$datetime=false)
function __construct($options=false,$datetime=false)
{
// Set appearance options from the $options array, if it's been provided.
// Otherwise set the defaults from the old, global WP options.
Expand Down Expand Up @@ -67,7 +67,7 @@ function ec3_SidebarCalendar($options=false,$datetime=false)
// END OPTIONS

// Initialise the parent class.
$this->ec3_BasicCalendar($options,$datetime);
ec3_BasicCalendar::__construct($options,$datetime);
}


Expand Down
2 changes: 1 addition & 1 deletion eventcalendar3/clone.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/** Compatibility function for PHP4.
* Don't include this file if you are using PHP5. */
function clone($object)
function cloneDateObj($object)
{
return $object;
}
Expand Down
2 changes: 1 addition & 1 deletion eventcalendar3/date.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ec3_Date
var $_unixdate =0;
var $_days_in_month =0;

function ec3_Date($year_num=0,$month_num=0,$day_num=0)
function __construct($year_num=0,$month_num=0,$day_num=0)
{
global $ec3;
if($year_num>0)
Expand Down
4 changes: 2 additions & 2 deletions eventcalendar3/feed-ec3xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class ec3_ec3xml extends ec3_BasicCalendar
{
var $details = array();

function ec3_ec3xml($options=false,$datetime=0)
function __construct($options=false,$datetime=0)
{
$this->ec3_BasicCalendar($options,$datetime);
ec3_BasicCalendar::__construct($options,$datetime);
}

function wrap_month($monthstr)
Expand Down
2 changes: 1 addition & 1 deletion eventcalendar3/multiwidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function control_form($instance)
* - width
* - height
*/
function MultiWidget(
function __construct(
$id_base,
$name,
$widget_options = array(),
Expand Down
19 changes: 1 addition & 18 deletions eventcalendar3/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ec3_Options
/** Local timezone. */
var $tz;

function ec3_Options()
function __construct()
{
global $table_prefix,$wp_version;

Expand All @@ -82,23 +82,6 @@ function ec3_Options()
$this->myfiles=get_option('siteurl').'/wp-content/plugins/'.$mydir;
$this->schedule=$table_prefix.$this->schedule; // table name

// wp_version < 2.0
if(ereg('^1[.]',$wp_version))
{
$this->wp_user_nicename='user_nickname';
$this->wp_have_dbx=false;
}
// wp_version < 2.1
if(ereg('^(1[.]|2[.]0)',$wp_version))
{
$this->wp_in_category='category-';
}
// wp_version < 2.3
if(ereg('^(1[.]|2[.][012])',$wp_version))
{
$this->wp_have_categories=true;
}

$this->read_event_category();
$this->read_show_event_box();
$this->read_advanced();
Expand Down
2 changes: 1 addition & 1 deletion eventcalendar3/template-functions-new.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ class ec3_EventIterator
/** Parameters are andices into the $ec3->events array.
* 'begin' points to the first event.
* 'limit' is one higher than the last event. */
function ec3_EventIterator($begin=0, $limit=-1)
function __construct($begin=0, $limit=-1)
{
global $ec3;
$this->_begin = $begin;
Expand Down
14 changes: 0 additions & 14 deletions eventcalendar3/tz.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,6 @@ function ec3_tz_pop($tz)
date_default_timezone_set($tz);
}

elseif(ini_get('safe_mode')):

// PHP4 safe mode.
function ec3_tz_push($tz)
{
return $tz;
}
function ec3_tz_pop($tz)
{
// do nothing
}
$ec3->tz_disabled=true;
$ec3->tz=getenv('TZ');

else:

// PHP4 safe mode OFF
Expand Down
8 changes: 4 additions & 4 deletions eventcalendar3/upgrade-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* Otherwise it can be safely ignored. */
function ec3_upgrade_posts()
{
if(!function_exists('__ngettext'))
if(!function_exists('_ngettext'))
{
function __ngettext($single,$plural,$number,$domain='default')
function _ngettext($single,$plural,$number,$domain='default')
{
if($number==1) return __($single,$domain);
else return __($plural,$domain);
Expand All @@ -18,7 +18,7 @@ function __ngettext($single,$plural,$number,$domain='default')
$ec3->advanced=false;
$changed = ec3_upgrade_posts_apply();

$query =& new WP_Query();
$query = new WP_Query();
$query->query( 'nopaging=1&cat=' . $ec3->event_category );

$format = 'Y-m-d H:i:s';
Expand All @@ -30,7 +30,7 @@ function __ngettext($single,$plural,$number,$domain='default')

<div id="message" class="updated fade"><p><strong>
<?php
$msg = __ngettext('Post upgraded.','%d posts upgraded.',$changed,'ec3');
$msg = _ngettext('Post upgraded.','%d posts upgraded.',$changed,'ec3');
echo sprintf($msg,$changed);
?>
</strong></p></div>
Expand Down
4 changes: 2 additions & 2 deletions eventcalendar3/widget-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@

class ec3_EventListWidget extends MultiWidget
{
function ec3_EventListWidget()
function __construct()
{
$this->MultiWidget(
MultiWidget::__construct(
'ec3-event-list', // id_base
__('Upcoming Events','ec3'), // name
array('description' =>
Expand Down