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.
|
|
|
|
*/
|
2012-05-03 14:23:29 +04:00
|
|
|
OCP\JSON::checkLoggedIn();
|
|
|
|
OCP\JSON::checkAppEnabled('calendar');
|
2012-06-09 16:40:15 +04:00
|
|
|
$view = $_POST['v'];
|
2012-02-20 14:26:43 +04:00
|
|
|
switch($view){
|
|
|
|
case 'agendaWeek':
|
|
|
|
case 'month';
|
|
|
|
case 'list':
|
|
|
|
break;
|
|
|
|
default:
|
2012-05-03 14:23:29 +04:00
|
|
|
OCP\JSON::error(array('message'=>'unexspected parameter: ' . $view));
|
2012-02-20 14:26:43 +04:00
|
|
|
exit;
|
|
|
|
}
|
2012-05-02 17:54:34 +04:00
|
|
|
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'currentview', $view);
|
2012-06-16 11:40:03 +04:00
|
|
|
OCP\JSON::success();
|