コード例 #1
0
ファイル: load_calendar.php プロジェクト: derekyu1437/davical
        }
        $this->username = $principal->username();
        $this->principal_id = $principal->principal_id();
        $this->email = $principal->email();
        $this->dav_name = $principal->dav_name();
        $this->principal = $principal;
        $this->logged_in = true;
    }
    function AllowedTo($do_something)
    {
        return $this->logged_in;
    }
}
$session = new FakeSession();
$dest = new DAVResource($target);
$session = new FakeSession($dest->user_no());
if ($mode == 'append' && !$dest->Exists()) {
    printf("The target '%s' does not exist.\n", $target);
    exit(1);
}
if (!$dest->IsCollection()) {
    printf("The target '%s' is not a collection.\n", $target);
    exit(1);
}
$user_no = $dest->user_no();
$username = $session->username;
param_to_global('mode');
include_once 'caldav-PUT-functions.php';
controlRequestContainer($session->username, $dest->user_no(), $target, false, $dest->IsPublic() ? true : false);
import_collection($ics, $dest->user_no(), $target, $session->user_no, $mode == 'append');
printf(translate("Calendar '%s' was loaded from file.\n"), $target);