@@ -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"));
+
default:
header("Status: 400 No Action Defined");
@@ -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);
+ }
}
/**