]> git.mxchange.org Git - friendica-addons.git/blobdiff - dav/friendica/main.php
Revert to stable version 3.5.4
[friendica-addons.git] / dav / friendica / main.php
index f0af57c91727ef5924067805b739b9602ea20c31..05f6f71406164b5fcf22764e2352980605e4cebb 100644 (file)
@@ -1,8 +1,5 @@
 <?php
 
-use Friendica\Module\Login;
-use Friendica\Util\Emailer;
-
 require_once('include/security.php');
 
 function dav_install()
@@ -150,7 +147,7 @@ function dav_content()
 {
        $a = get_app();
        if (!isset($a->user["uid"]) || $a->user["uid"] == 0) {
-               return Login::form();
+               return login();
        }
 
        $x = "";
@@ -166,7 +163,7 @@ function dav_content()
                                                $ret = wdcal_postEditPage("new", "", $a->user["uid"], $a->timezone, $a->get_baseurl() . "/dav/wdcal/");
                                                if ($ret["ok"]) notice($ret["msg"]);
                                                else info($ret["msg"]);
-                                               goaway('dav/wdcal/');
+                                               goaway($a->get_baseurl() . "/dav/wdcal/");
                                        }
                                        $o .= wdcal_getNewPage();
                                        return $o;
@@ -184,7 +181,7 @@ function dav_content()
                                                                $ret = wdcal_postEditPage($a->argv[3], $a->user["uid"], $a->timezone, $a->get_baseurl() . "/dav/wdcal/");
                                                                if ($ret["ok"]) notice($ret["msg"]);
                                                                else info($ret["msg"]);
-                                                               goaway('dav/wdcal/');
+                                                               goaway($a->get_baseurl() . "/dav/wdcal/");
                                                        }
                                                        $o .= wdcal_getEditPage($calendar_id, $a->argv[3]);
                                                        return $o;
@@ -288,6 +285,7 @@ function dav_cron(&$a, &$b)
                                                'textVersion'          => $text_text,
                                                'additionalMailHeader' => "",
                                        );
+                                       require_once('include/Emailer.php');
                                        Emailer::send($params);
                                }
                                break;