better var name in changeview.php

This commit is contained in:
Georg Ehrke 2012-02-20 11:26:43 +01:00
parent 8dff0fb58d
commit 1cf7fc261f
1 changed files with 4 additions and 4 deletions

View File

@ -9,16 +9,16 @@
require_once ('../../../lib/base.php');
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$currentview = $_GET['v'];
switch($currentview){
$view = $_GET['v'];
switch($view){
case 'agendaWeek':
case 'month';
case 'list':
break;
default:
OC_JSON::error();
OC_JSON::error(array('message'=>'unexspected parameter: ' . $view));
exit;
}
OC_Preferences::setValue(OC_USER::getUser(), 'calendar', 'currentview', $currentview);
OC_Preferences::setValue(OC_USER::getUser(), 'calendar', 'currentview', $view);
OC_JSON::success();
?>