summaryrefslogtreecommitdiffstats
path: root/apps/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'apps/calendar')
-rw-r--r--apps/calendar/ajax/calendar/edit.form.php2
-rw-r--r--apps/calendar/ajax/changeview.php2
-rw-r--r--apps/calendar/ajax/event/edit.form.php2
-rw-r--r--apps/calendar/ajax/import/import.php4
-rw-r--r--apps/calendar/ajax/settings/guesstimezone.php4
-rw-r--r--apps/calendar/ajax/share/activation.php4
-rw-r--r--apps/calendar/ajax/share/changepermission.php10
-rw-r--r--apps/calendar/ajax/share/dropdown.php2
-rw-r--r--apps/calendar/ajax/share/share.php8
-rw-r--r--apps/calendar/ajax/share/unshare.php8
-rw-r--r--apps/calendar/js/calendar.js17
-rw-r--r--apps/calendar/js/geo.js2
-rw-r--r--apps/calendar/js/loader.js2
-rw-r--r--apps/calendar/lib/object.php3
-rw-r--r--apps/calendar/templates/part.choosecalendar.rowfields.php2
-rw-r--r--apps/calendar/templates/part.import.php3
16 files changed, 41 insertions, 34 deletions
diff --git a/apps/calendar/ajax/calendar/edit.form.php b/apps/calendar/ajax/calendar/edit.form.php
index 77366809311..036ed12bb74 100644
--- a/apps/calendar/ajax/calendar/edit.form.php
+++ b/apps/calendar/ajax/calendar/edit.form.php
@@ -11,7 +11,7 @@ OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar');
$calendarcolor_options = OC_Calendar_Calendar::getCalendarColorOptions();
-$calendar = OC_Calendar_App::getCalendar($_GET['calendarid']);
+$calendar = OC_Calendar_App::getCalendar($_POST['calendarid']);
$tmpl = new OCP\Template("calendar", "part.editcalendar");
$tmpl->assign('new', false);
$tmpl->assign('calendarcolor_options', $calendarcolor_options);
diff --git a/apps/calendar/ajax/changeview.php b/apps/calendar/ajax/changeview.php
index 2c2d09ccb12..0099fd5ec21 100644
--- a/apps/calendar/ajax/changeview.php
+++ b/apps/calendar/ajax/changeview.php
@@ -7,7 +7,7 @@
*/
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar');
-$view = $_GET['v'];
+$view = $_POST['v'];
switch($view){
case 'agendaWeek':
case 'month';
diff --git a/apps/calendar/ajax/event/edit.form.php b/apps/calendar/ajax/event/edit.form.php
index f2ea84dd205..dbb78edb798 100644
--- a/apps/calendar/ajax/event/edit.form.php
+++ b/apps/calendar/ajax/event/edit.form.php
@@ -13,7 +13,7 @@ if(!OCP\User::isLoggedIn()) {
}
OCP\JSON::checkAppEnabled('calendar');
-$id = $_GET['id'];
+$id = $_POST['id'];
$data = OC_Calendar_App::getEventObject($id, true, true);
if(!$data){
diff --git a/apps/calendar/ajax/import/import.php b/apps/calendar/ajax/import/import.php
index a3eaed844a1..6fdad12c085 100644
--- a/apps/calendar/ajax/import/import.php
+++ b/apps/calendar/ajax/import/import.php
@@ -16,9 +16,9 @@ $nl="\r\n";
$comps = array('VEVENT'=>true, 'VTODO'=>true, 'VJOURNAL'=>true);
global $progresskey;
-$progresskey = 'calendar.import-' . $_GET['progresskey'];
+$progresskey = 'calendar.import-' . $_POST['progresskey'];
-if (isset($_GET['progress']) && $_GET['progress']) {
+if (isset($_POST['progress']) && $_POST['progress']) {
echo OC_Cache::get($progresskey);
die;
}
diff --git a/apps/calendar/ajax/settings/guesstimezone.php b/apps/calendar/ajax/settings/guesstimezone.php
index 13092777b78..f36f3bf061f 100644
--- a/apps/calendar/ajax/settings/guesstimezone.php
+++ b/apps/calendar/ajax/settings/guesstimezone.php
@@ -12,8 +12,8 @@ OCP\JSON::checkAppEnabled('calendar');
$l = OC_L10N::get('calendar');
-$lat = $_GET['lat'];
-$lng = $_GET['long'];
+$lat = $_POST['lat'];
+$lng = $_POST['lng'];
$timezone = OC_Geo::timezone($lat, $lng);
diff --git a/apps/calendar/ajax/share/activation.php b/apps/calendar/ajax/share/activation.php
index 7d6b8fcb16e..bce8693577b 100644
--- a/apps/calendar/ajax/share/activation.php
+++ b/apps/calendar/ajax/share/activation.php
@@ -5,7 +5,7 @@
* later.
* See the COPYING-README file.
*/
-$id = strip_tags($_GET['id']);
-$activation = strip_tags($_GET['activation']);
+$id = strip_tags($_POST['id']);
+$activation = strip_tags($_POST['activation']);
OC_Calendar_Share::set_active(OCP\USER::getUser(), $id, $activation);
OCP\JSON::success();
diff --git a/apps/calendar/ajax/share/changepermission.php b/apps/calendar/ajax/share/changepermission.php
index 2737420c94e..e807c164a23 100644
--- a/apps/calendar/ajax/share/changepermission.php
+++ b/apps/calendar/ajax/share/changepermission.php
@@ -6,9 +6,9 @@
* See the COPYING-README file.
*/
-$id = strip_tags($_GET['id']);
-$idtype = strip_tags($_GET['idtype']);
-$permission = (int) strip_tags($_GET['permission']);
+$id = strip_tags($_POST['id']);
+$idtype = strip_tags($_POST['idtype']);
+$permission = (int) strip_tags($_POST['permission']);
switch($idtype){
case 'calendar':
case 'event':
@@ -25,8 +25,8 @@ if($idtype == 'event' && !OC_Calendar_App::getEventObject($id)){
OCP\JSON::error(array('message'=>'permission denied'));
exit;
}
-$sharewith = $_GET['sharewith'];
-$sharetype = strip_tags($_GET['sharetype']);
+$sharewith = $_POST['sharewith'];
+$sharetype = strip_tags($_POST['sharetype']);
switch($sharetype){
case 'user':
case 'group':
diff --git a/apps/calendar/ajax/share/dropdown.php b/apps/calendar/ajax/share/dropdown.php
index a3b0faca4bf..86cf4ac090e 100644
--- a/apps/calendar/ajax/share/dropdown.php
+++ b/apps/calendar/ajax/share/dropdown.php
@@ -7,7 +7,7 @@
*/
$user = OCP\USER::getUser();
-$calid = $_GET['calid'];
+$calid = $_POST['calid'];
$calendar = OC_Calendar_Calendar::find($calid);
if($calendar['userid'] != $user){
OCP\JSON::error();
diff --git a/apps/calendar/ajax/share/share.php b/apps/calendar/ajax/share/share.php
index 629a7b6b79f..838db619f62 100644
--- a/apps/calendar/ajax/share/share.php
+++ b/apps/calendar/ajax/share/share.php
@@ -6,8 +6,8 @@
* See the COPYING-README file.
*/
-$id = strip_tags($_GET['id']);
-$idtype = strip_tags($_GET['idtype']);
+$id = strip_tags($_POST['id']);
+$idtype = strip_tags($_POST['idtype']);
switch($idtype){
case 'calendar':
case 'event':
@@ -24,8 +24,8 @@ if($idtype == 'event' && !OC_Calendar_App::getEventObject($id)){
OCP\JSON::error(array('message'=>'permission denied'));
exit;
}
-$sharewith = $_GET['sharewith'];
-$sharetype = strip_tags($_GET['sharetype']);
+$sharewith = $_POST['sharewith'];
+$sharetype = strip_tags($_POST['sharetype']);
switch($sharetype){
case 'user':
case 'group':
diff --git a/apps/calendar/ajax/share/unshare.php b/apps/calendar/ajax/share/unshare.php
index fe7c98452d7..1ce04677fb1 100644
--- a/apps/calendar/ajax/share/unshare.php
+++ b/apps/calendar/ajax/share/unshare.php
@@ -6,8 +6,8 @@
* See the COPYING-README file.
*/
-$id = strip_tags($_GET['id']);
-$idtype = strip_tags($_GET['idtype']);
+$id = strip_tags($_POST['id']);
+$idtype = strip_tags($_POST['idtype']);
switch($idtype){
case 'calendar':
case 'event':
@@ -24,8 +24,8 @@ if($idtype == 'event' && !OC_Calendar_App::getEventObject($id)){
OCP\JSON::error(array('message'=>'permission denied'));
exit;
}
-$sharewith = $_GET['sharewith'];
-$sharetype = strip_tags($_GET['sharetype']);
+$sharewith = $_POST['sharewith'];
+$sharetype = strip_tags($_POST['sharetype']);
switch($sharetype){
case 'user':
case 'group':
diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js
index b5411d3fd95..7ae4a3a6eb1 100644
--- a/apps/calendar/js/calendar.js
+++ b/apps/calendar/js/calendar.js
@@ -49,6 +49,7 @@ Calendar={
$( "#event" ).tabs({ selected: 0});
$('#event').dialog({
width : 500,
+ height: 600,
close : function(event, ui) {
$(this).dialog('destroy').remove();
}
@@ -77,7 +78,7 @@ Calendar={
$('#event').dialog('destroy').remove();
}else{
Calendar.UI.loading(true);
- $('#dialog_holder').load(OC.filePath('calendar', 'ajax/event', 'edit.form.php') + '?id=' + id, Calendar.UI.startEventDialog);
+ $('#dialog_holder').load(OC.filePath('calendar', 'ajax/event', 'edit.form.php'), {id: id}, Calendar.UI.startEventDialog);
}
},
submitDeleteEventForm:function(url){
@@ -413,7 +414,7 @@ Calendar={
},
edit:function(object, calendarid){
var tr = $(document.createElement('tr'))
- .load(OC.filePath('calendar', 'ajax/calendar', 'edit.form.php') + "?calendarid="+calendarid,
+ .load(OC.filePath('calendar', 'ajax/calendar', 'edit.form.php'), {calendarid: calendarid},
function(){Calendar.UI.Calendar.colorPicker(this)});
$(object).closest('tr').after(tr).hide();
},
@@ -502,14 +503,14 @@ Calendar={
currentid: 'false',
idtype: '',
activation:function(object,owner,id){
- $.getJSON(OC.filePath('calendar', 'ajax/share', 'activation.php'),{id:id, idtype:'calendar', activation:object.checked?1:0});
+ $.post(OC.filePath('calendar', 'ajax/share', 'activation.php'),{id:id, idtype:'calendar', activation:object.checked?1:0});
$('#calendar_holder').fullCalendar('refetchEvents');
},
dropdown:function(userid, calid){
$('.calendar_share_dropdown').remove();
var element = document.getElementById(userid+'_'+calid);
$('<div class="calendar_share_dropdown"></div>').appendTo(element);
- $.get(OC.filePath('calendar', 'ajax/share', 'dropdown.php') + '?calid=' + calid, function(data){
+ $.post(OC.filePath('calendar', 'ajax/share', 'dropdown.php'), {calid: calid}, function(data){
$('.calendar_share_dropdown').html(data);
$('.calendar_share_dropdown').show('blind');
$('#share_user').chosen();
@@ -519,7 +520,7 @@ Calendar={
Calendar.UI.Share.idtype = 'calendar';
},
share:function(id, idtype, sharewith, sharetype){
- $.getJSON(OC.filePath('calendar', 'ajax/share', 'share.php'),{id:id, idtype:idtype, sharewith:sharewith, sharetype:sharetype}, function(data){
+ $.post(OC.filePath('calendar', 'ajax/share', 'share.php'),{id:id, idtype:idtype, sharewith:sharewith, sharetype:sharetype}, function(data){
if(sharetype == 'public'){
$('#public_token').val(parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service=calendar&t='+data.message);
$('#public_token').css('display', 'block');
@@ -527,7 +528,7 @@ Calendar={
});
},
unshare:function(id, idtype, sharewith, sharetype){
- $.getJSON(OC.filePath('calendar', 'ajax/share', 'unshare.php'),{id:id, idtype:idtype, sharewith:sharewith, sharetype:sharetype}, function(){
+ $.post(OC.filePath('calendar', 'ajax/share', 'unshare.php'),{id:id, idtype:idtype, sharewith:sharewith, sharetype:sharetype}, function(){
if(sharetype == 'public'){
$('#public_token').val('');
$('#public_token').css('display', 'none');
@@ -535,7 +536,7 @@ Calendar={
});
},
changepermission:function(id, idtype, sharewith, sharetype, permission){
- $.getJSON(OC.filePath('calendar', 'ajax/share', 'changepermission.php'),{id:id, idtype:idtype, sharewith: sharewith, sharetype:sharetype, permission: (permission?1:0)});
+ $.post(OC.filePath('calendar', 'ajax/share', 'changepermission.php'),{id:id, idtype:idtype, sharewith: sharewith, sharetype:sharetype, permission: (permission?1:0)});
},
init:function(){
$('.calendar_share_dropdown').live('mouseleave', function(){
@@ -846,7 +847,7 @@ $(document).ready(function(){
viewDisplay: function(view) {
$('#datecontrol_date').html(view.title);
if (view.name != defaultView) {
- $.get(OC.filePath('calendar', 'ajax', 'changeview.php') + "?v="+view.name);
+ $.post(OC.filePath('calendar', 'ajax', 'changeview.php'), {v:view.name});
defaultView = view.name;
}
Calendar.UI.setViewActive(view.name);
diff --git a/apps/calendar/js/geo.js b/apps/calendar/js/geo.js
index 092d8547469..99290d940e3 100644
--- a/apps/calendar/js/geo.js
+++ b/apps/calendar/js/geo.js
@@ -6,7 +6,7 @@
*/
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
- $.getJSON(OC.filePath('calendar', 'ajax/settings', 'guesstimezone.php') + '?lat=' + position.coords.latitude + '&long=' + position.coords.longitude,
+ $.post(OC.filePath('calendar', 'ajax/settings', 'guesstimezone.php'), {lat: position.coords.latitude, lng: position.coords.longitude},
function(data){
if (data.status == 'success' && typeof(data.message) != 'undefined'){
$('#notification').html(data.message);
diff --git a/apps/calendar/js/loader.js b/apps/calendar/js/loader.js
index 838521ec7f5..0fc5018e89c 100644
--- a/apps/calendar/js/loader.js
+++ b/apps/calendar/js/loader.js
@@ -63,7 +63,7 @@ Calendar_Import={
});
},
getimportstatus: function(progresskey){
- $.get(OC.filePath('calendar', 'ajax/import', 'import.php') + '?progress=1&progresskey=' + progresskey, function(percent){
+ $.post(OC.filePath('calendar', 'ajax/import', 'import.php'), {progress:1,progresskey: progresskey}, function(percent){
$('#progressbar').progressbar('option', 'value', parseInt(percent));
if(percent < 100){
window.setTimeout('Calendar_Import.getimportstatus(\'' + progresskey + '\')', 500);
diff --git a/apps/calendar/lib/object.php b/apps/calendar/lib/object.php
index 8b0d6093b65..546cc4a509d 100644
--- a/apps/calendar/lib/object.php
+++ b/apps/calendar/lib/object.php
@@ -671,6 +671,9 @@ class OC_Calendar_Object{
$byday .= ',' . $weekofmonth . $days[$day];
}
}
+ if($byday == ''){
+ $byday = 'MO,TU,WE,TH,FR,SA,SU';
+ }
$rrule .= ';BYDAY=' . $byday;
}
break;
diff --git a/apps/calendar/templates/part.choosecalendar.rowfields.php b/apps/calendar/templates/part.choosecalendar.rowfields.php
index bad268897bf..268c3356011 100644
--- a/apps/calendar/templates/part.choosecalendar.rowfields.php
+++ b/apps/calendar/templates/part.choosecalendar.rowfields.php
@@ -2,7 +2,7 @@
echo '<td width="20px"><input id="active_' . $_['calendar']['id'] . '" type="checkbox" onClick="Calendar.UI.Calendar.activation(this,' . $_['calendar']['id'] . ')"' . ($_['calendar']['active'] ? ' checked="checked"' : '') . '></td>';
echo '<td id="' . OCP\USER::getUser() . '_' . $_['calendar']['id'] . '"><label for="active_' . $_['calendar']['id'] . '">' . htmlspecialchars($_['calendar']['displayname']) . '</label></td>';
echo '<td width="20px"><a href="#" onclick="Calendar.UI.Share.dropdown(\'' . OCP\USER::getUser() . '\', \'' . $_['calendar']['id'] . '\');" title="' . $l->t("Share Calendar") . '" class="action"><img class="svg action" src="' . ((!$_['shared']) ? OCP\Util::imagePath('core', 'actions/share.svg') : OCP\Util::imagePath('core', 'actions/shared.svg')) . '"></a></td>';
-echo '<td width="20px"><a href="#" onclick="Calendar.UI.showCalDAVUrl(\'' . OCP\USER::getUser() . '\', \'' . $_['calendar']['uri'] . '\');" title="' . $l->t("CalDav Link") . '" class="action"><img class="svg action" src="'.OCP\Util::imagePath('core', 'actions/public.svg').'"></a></td>';
+echo '<td width="20px"><a href="#" onclick="Calendar.UI.showCalDAVUrl(\'' . OCP\USER::getUser() . '\', \'' . htmlentities($_['calendar']['uri']) . '\');" title="' . $l->t("CalDav Link") . '" class="action"><img class="svg action" src="'.OCP\Util::imagePath('core', 'actions/public.svg').'"></a></td>';
echo '<td width="20px"><a href="?app=calendar&getfile=export.php?calid=' . $_['calendar']['id'] . '" title="' . $l->t('Download') . '" class="action"><img class="svg action" src="'.OCP\Util::imagePath('core', 'actions/download.svg').'"></a></td>';
echo '<td width="20px"><a href="#" title="' . $l->t('Edit') . '" class="action" onclick="Calendar.UI.Calendar.edit(this, ' . $_['calendar']['id'] . ');"><img class="svg action" src="'.OCP\Util::imagePath('core', 'actions/rename.svg').'"></a></td>';
echo '<td width="20px"><a href="#" onclick="Calendar.UI.Calendar.deleteCalendar(\'' . $_['calendar']['id'] . '\');" title="' . $l->t('Delete') . '" class="action"><img class="svg action" src="'.OCP\Util::imagePath('core', 'actions/delete.svg').'"></a></td>';
diff --git a/apps/calendar/templates/part.import.php b/apps/calendar/templates/part.import.php
index 39cda29c20d..b966100cc11 100644
--- a/apps/calendar/templates/part.import.php
+++ b/apps/calendar/templates/part.import.php
@@ -8,6 +8,9 @@
<?php
$calendar_options = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser());
$calendar_options[] = array('id'=>'newcal', 'displayname'=>$l->t('create a new calendar'));
+for($i = 0;$i<count($calendar_options);$i++){
+ $calendar_options[$i]['displayname'] = htmlspecialchars($calendar_options[$i]['displayname']);
+}
echo OCP\html_select_options($calendar_options, $calendar_options[0]['id'], array('value'=>'id', 'label'=>'displayname'));
?>
</select>