Moritz Schmidt 10 năm trước cách đây
mục cha
commit
fd56cd7ba7
2 tập tin đã thay đổi với 7 bổ sung1 xóa
  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);
         break;
     case 'debugTest': // for testing single methods etc.
-        pa(Reminder::getUpcomingRemindersByUserID($_REQUEST['userID']), array("id", "userID", "reminderDate", "remindedYet"));
+
         break;
     default:
         header("Status: 400 No Action Defined");

+ 6 - 0
includes/label.inc.php

@@ -136,8 +136,14 @@ class Label {
 
      public static function addLabel($name, $path) {
          global $db;
+         global $CONFIG;
 
          $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);
+         }
+
      }
 
      /**