better var name in changeview.php
This commit is contained in:
parent
8dff0fb58d
commit
1cf7fc261f
|
@ -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();
|
||||
?>
|
Loading…
Reference in New Issue