better var name in changeview.php
This commit is contained in:
parent
b7de1850a0
commit
8cd1027214
1 changed files with 11 additions and 2 deletions
|
@ -9,7 +9,16 @@
|
|||
require_once ("../../../lib/base.php");
|
||||
OC_JSON::checkLoggedIn();
|
||||
OC_JSON::checkAppEnabled('calendar');
|
||||
$currentview = $_GET["v"];
|
||||
OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", $currentview);
|
||||
$view = $_GET['v'];
|
||||
switch($view){
|
||||
case 'agendaWeek':
|
||||
case 'month';
|
||||
case 'list':
|
||||
break;
|
||||
default:
|
||||
OC_JSON::error(array('message'=>'unexspected parameter: ' . $view));
|
||||
exit;
|
||||
}
|
||||
OC_Preferences::setValue(OC_USER::getUser(), 'calendar', 'currentview', $view);
|
||||
OC_JSON::success();
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue