nextcloud/apps/calendar/ajax/changeview.php

23 lines
558 B
PHP
Raw Normal View History

2011-08-12 16:29:45 +04:00
<?php
2011-09-24 00:59:24 +04:00
/**
2012-02-02 15:18:29 +04:00
* Copyright (c) 2012 Georg Ehrke <ownclouddev at georgswebsite dot de>
2011-09-24 00:59:24 +04:00
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
2012-02-20 14:26:43 +04:00
$view = $_GET['v'];
switch($view){
case 'agendaWeek':
case 'month';
case 'list':
break;
default:
OC_JSON::error(array('message'=>'unexspected parameter: ' . $view));
exit;
}
2012-05-01 20:50:31 +04:00
OC_Preferences::setValue(OCP\USER::getUser(), 'calendar', 'currentview', $view);
OC_JSON::success();
2011-09-24 00:59:24 +04:00
?>