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-02-02 15:18:29 +04:00
|
|
|
require_once ('../../../lib/base.php');
|
2011-11-30 02:11:42 +04:00
|
|
|
OC_JSON::checkLoggedIn();
|
2011-10-01 01:05:10 +04:00
|
|
|
OC_JSON::checkAppEnabled('calendar');
|
2012-02-02 15:18:29 +04:00
|
|
|
$currentview = $_GET['v'];
|
|
|
|
switch($currentview){
|
|
|
|
case 'agendaWeek':
|
|
|
|
case 'month';
|
|
|
|
case 'list':
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
OC_JSON::error();
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
OC_Preferences::setValue(OC_USER::getUser(), 'calendar', 'currentview', $currentview);
|
2011-11-30 02:11:42 +04:00
|
|
|
OC_JSON::success();
|
2012-02-02 15:18:29 +04:00
|
|
|
?>
|