From: Alan Date: Tue, 9 Apr 2024 06:43:19 +0000 (+0800) Subject: fix holiday X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=e7de390be9d57ea19985f163f00d514fee7e80db fix holiday --- diff --git a/DataObjects/Core_holiday.php b/DataObjects/Core_holiday.php index 3a2e9d50..76e0b8ba 100644 --- a/DataObjects/Core_holiday.php +++ b/DataObjects/Core_holiday.php @@ -73,13 +73,9 @@ class Pman_Core_DataObjects_Core_holiday extends DB_DataObject $fmt = substr($matches[1], 0, 4) . "-" . substr($matches[1], 4, 2) . "-" . substr($matches[1], 6, 2); $end_dt = date('Y-m-d', strtotime($fmt)); } -<<<<<<< Updated upstream - -======= if(preg_match('/^SUMMARY[^:]*:(.*)/', $line, $matches)){ $name = trim($matches[1]); } ->>>>>>> Stashed changes } if(empty($start_dt) || empty($end_dt)){ @@ -95,15 +91,13 @@ class Pman_Core_DataObjects_Core_holiday extends DB_DataObject $d->holiday_date = date('Y-m-d', $i); if (!$d->count()) { $d->insert(); -<<<<<<< Updated upstream -======= + } else { $d->find(true); $dd = clone($d); $d->name = $name; $d->update($dd); ->>>>>>> Stashed changes - } + } }