server/apps/calendar/ajax/changeview.php

23 lines
562 B
PHP
Raw Normal View History

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