diff --git a/include/utils/RecurringType.php b/include/utils/RecurringType.php index 0d2d56a5805ea86c4367298d81ec7a4dab365acf..f7ce0af3c823f62d4d861ca42e931e305c8c90d7 100644 --- a/include/utils/RecurringType.php +++ b/include/utils/RecurringType.php @@ -31,8 +31,9 @@ class RecurringType { * Constructor for class RecurringType * @param array $repeat_arr - array contains recurring info */ - function RecurringType($repeat_arr) { - + function __construct($repeat_arr) + { + $st_date = explode("-", $repeat_arr["startdate"]); $st_time = explode(":", $repeat_arr["starttime"]); $end_date = explode("-", $repeat_arr["enddate"]); @@ -75,6 +76,12 @@ class RecurringType { $this->recurringdates = $this->_getRecurringDates(); } + function RecurringType($repeat_arr) { + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($repeat_arr); + } public static function fromUserRequest($requestArray) { // All the information from the user is received in User Time zone diff --git a/include/utils/export.php b/include/utils/export.php index 41720fbd11fadaf66df762a3dd9a84a848a75edd..0fb897570e82686e5bff15106e77a6a89f4442b9 100755 --- a/include/utils/export.php +++ b/include/utils/export.php @@ -276,9 +276,16 @@ class ExportUtils{ var $fieldsArr = array(); var $picklistValues = array(); - function ExportUtils($module, $fields_array){ + function __construct($module, $fields_array) + { self::__init($module, $fields_array); } + function ExportUtils($module, $fields_array){ + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct($module, $fields_array); + } function __init($module, $fields_array){