Moritz Schmidt 10 vuotta sitten
vanhempi
commit
fd56cd7ba7
2 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 1 1
      ajax.php
  2. 6 0
      includes/label.inc.php

+ 1 - 1
ajax.php

@@ -332,7 +332,7 @@ switch($_REQUEST['action']) {
         echo json_encode($return);
         echo json_encode($return);
         break;
         break;
     case 'debugTest': // for testing single methods etc.
     case 'debugTest': // for testing single methods etc.
-        pa(Reminder::getUpcomingRemindersByUserID($_REQUEST['userID']), array("id", "userID", "reminderDate", "remindedYet"));
+
         break;
         break;
     default:
     default:
         header("Status: 400 No Action Defined");
         header("Status: 400 No Action Defined");

+ 6 - 0
includes/label.inc.php

@@ -136,8 +136,14 @@ class Label {
 
 
      public static function addLabel($name, $path) {
      public static function addLabel($name, $path) {
          global $db;
          global $db;
+         global $CONFIG;
 
 
          $db->insertQuery("INSERT INTO `labels`(`name`, `path`) VALUES ('" . $name . "', '" . $path . "')");
          $db->insertQuery("INSERT INTO `labels`(`name`, `path`) VALUES ('" . $name . "', '" . $path . "')");
+
+         if(!file_exists($CONFIG['documentPath'] . $path) || !is_dir($CONFIG['documentPath'] . $path)) {
+             mkdir($CONFIG['documentPath'] . $path);
+         }
+
      }
      }
 
 
      /**
      /**