aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-07-27 18:01:20 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-07-27 18:01:20 -0700
commit3269d4632f180887d5eca96fcfaa03370bbae2a3 (patch)
tree8f67725e77b4565a2cbac7e67de7ff952db01ee9 /mod
parent70a5a7b717955138279f2dd8f2a1de16aa76bd53 (diff)
parent0b232a610cdcbb701dacf8dd661b86b64bb582fc (diff)
downloadvolse-hubzilla-3269d4632f180887d5eca96fcfaa03370bbae2a3.tar.gz
volse-hubzilla-3269d4632f180887d5eca96fcfaa03370bbae2a3.tar.bz2
volse-hubzilla-3269d4632f180887d5eca96fcfaa03370bbae2a3.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts: util/messages.po
Diffstat (limited to 'mod')
-rwxr-xr-xmod/events.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/mod/events.php b/mod/events.php
index c834bf59b..0af81278f 100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -13,6 +13,20 @@ function events_post(&$a) {
if(! local_channel())
return;
+ if(($_FILES) && array_key_exists('userfile',$_FILES) && intval($_FILES['userfile']['size'])) {
+ $src = $_FILES['userfile']['tmp_name'];
+ if($src) {
+ $result = parse_ical_file($src,local_channel());
+ if($result)
+ info( t('Calendar entries imported.') . EOL);
+ else
+ notice( t('No calendar entries found.') . EOL);
+ @unlink($src);
+ }
+ goaway(z_root() . '/events');
+ }
+
+
$event_id = ((x($_POST,'event_id')) ? intval($_POST['event_id']) : 0);
$event_hash = ((x($_POST,'event_hash')) ? $_POST['event_hash'] : '');
@@ -477,8 +491,8 @@ function events_content(&$a) {
'$export' => array($a->get_baseurl()."/events/$y/$m/export",t('Export'),'',''),
'$calendar' => cal($y,$m,$links, ' eventcal'),
'$events' => $events,
-
-
+ '$upload' => t('Upload'),
+ '$submit' => t('Submit')
));
if (x($_GET,'id')){ echo $o; killme(); }