]> git.mjollnir.org Git - moodle.git/commitdiff
Scheduled weekdays are now stored in DB
authorstronk7 <stronk7>
Sun, 30 Nov 2003 18:58:37 +0000 (18:58 +0000)
committerstronk7 <stronk7>
Sun, 30 Nov 2003 18:58:37 +0000 (18:58 +0000)
admin/backup.php

index fdab034dc159131bcd61673ee3cbf1fe6a95b16f..bca671524e55c6258741f6137bc5a42387462f66 100644 (file)
 /// If data submitted, then process and store.
 
     if ($config = data_submitted()) {
+        //We need to do some weekdays conversions prior to continue
+        $i = 0;
+        $temp = "";
+        $a_config = (array)$config;
+        while ($i<7) {
+            $tocheck = "dayofweek_".$i;
+            if (isset($a_config[$tocheck])) {
+                $temp .= "1";
+            } else {
+                $temp .= "0"; 
+            }
+            unset($a_config[$tocheck]);
+            $i++;
+        }
+        $a_config['backup_sche_weekdays'] = $temp;
+        $config = (object)$a_config;
+        //weekdays conversions done. Continue
+
         print_header();
         foreach ($config as $name => $value) {
             backup_set_config($name, $value);