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