fix merge
authorAlan <alan@roojs.com>
Fri, 5 Apr 2024 04:05:59 +0000 (12:05 +0800)
committerAlan <alan@roojs.com>
Fri, 5 Apr 2024 04:05:59 +0000 (12:05 +0800)
.roobuilder.jcfg [new file with mode: 0644]
DataObjects/Core_holiday.php

diff --git a/.roobuilder.jcfg b/.roobuilder.jcfg
new file mode 100644 (file)
index 0000000..b1099f6
--- /dev/null
@@ -0,0 +1,13 @@
+{
+    "name" : "Pman.Core",
+    "xtype" : "Roo",
+    "fn" : "3ab3f691edabeed20ba58b844cde0cc6",
+    "runhtml" : "<script type=\"text/javascript\">\n Roo.namespace(\"Pman.Dialog\");\n</script>",
+    "rootURL" : "http://localhost/web.Texon/",
+    "base_template" : "roo.builder.html",
+    "html_gen" : "",
+    "DBTYPE" : "",
+    "DBNAME" : "",
+    "DBUSERNAME" : "",
+    "DBPASSWORD" : ""
+}
\ No newline at end of file
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
                 }