Move new events routes to calendar routes

This commit is contained in:
Philipp 2022-11-02 08:59:46 +01:00
parent 2c90ab69d6
commit 7c4a7bff2e
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
7 changed files with 17 additions and 17 deletions

View file

@ -19,7 +19,7 @@
*
*/
namespace Friendica\Module\Events;
namespace Friendica\Module\Calendar;
use Friendica\App;
use Friendica\BaseModule;
@ -34,7 +34,7 @@ use Friendica\Util\Profiler;
use Psr\Log\LoggerInterface;
/**
* Controller to export calendar
* Controller to export a calendar from a given user
*/
class Export extends BaseModule
{
@ -88,7 +88,7 @@ class Export extends BaseModule
// If nothing went wrong we can echo the export content
if ($evexport["success"]) {
$this->response->setHeader(sprintf('content-disposition: attachment; filename="%s-%s.%s"',
$this->response->setHeader(sprintf('Content-Disposition: attachment; filename="%s-%s.%s"',
$this->t('calendar'),
$this->parameters['nickname'],
$evexport["extension"]

View file

@ -19,7 +19,7 @@
*
*/
namespace Friendica\Module\Events;
namespace Friendica\Module\Calendar;
use Friendica\Core\System;
use Friendica\Database\DBA;
@ -51,17 +51,17 @@ class Json extends \Friendica\BaseModule
$start = sprintf('%d-%d-%d %d:%d:%d', $y, $m, 1, 0, 0, 0);
$finish = sprintf('%d-%d-%d %d:%d:%d', $y, $m, $dim, 23, 59, 59);
if (!empty($_GET['start'])) {
$start = $_GET['start'];
if (!empty($request['start'])) {
$start = $request['start'];
}
if (!empty($_GET['end'])) {
$finish = $_GET['end'];
if (!empty($request['end'])) {
$finish = $request['end'];
}
// put the event parametes in an array so we can better transmit them
$event_params = [
'event_id' => intval($_GET['id'] ?? 0),
'event_id' => intval($request['id'] ?? 0),
'start' => $start,
'finish' => $finish,
'ignore' => 0,