fix merge
[Pman.Core] / DataObjects / Core_holiday.php
index 742a240..3a2e9d5 100644 (file)
@@ -73,13 +73,19 @@ 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)){
                 continue;
             }
-            
+            //DB_DataObject::DebugLevel(1);
             //var_dump($start_dt); var_dump($end_dt); exit;
             
             for ($i = strtotime($start_dt); $i < strtotime($end_dt) ; $i += (60 * 60 * 24)) {
@@ -89,6 +95,14 @@ 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
                 }