mirror of
https://github.com/friendica/friendica
synced 2025-04-22 07:10:24 +00:00
Move new events routes to calendar routes
This commit is contained in:
parent
2c90ab69d6
commit
7c4a7bff2e
7 changed files with 17 additions and 17 deletions
|
@ -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"]
|
|
@ -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,
|
Loading…
Add table
Add a link
Reference in a new issue