From 49e4016ba2a4827cca16138071b8c21278058066 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Fri, 1 Jan 2016 05:53:29 -0500 Subject: Misspelled Titel should be Title --- mod/events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/events.php') diff --git a/mod/events.php b/mod/events.php index 74b44906c..ed9f0f2e3 100755 --- a/mod/events.php +++ b/mod/events.php @@ -434,7 +434,7 @@ function events_content(&$a) { '$xchan' => $event_xchan, '$mid' => $mid, '$event_hash' => $event_id, - '$summary' => array('summary', (($event_id) ? t('Edit event titel') : t('Event titel')), $t_orig, t('Required'), '*'), + '$summary' => array('summary', (($event_id) ? t('Edit event title') : t('Event title')), $t_orig, t('Required'), '*'), '$catsenabled' => $catsenabled, '$placeholdercategory' => t('Categories (comma-separated list)'), '$c_text' => (($event_id) ? t('Edit Category') : t('Category')), -- cgit v1.2.3 From a9711895cf254a0ca34b1e3f7c8e75bb832e6973 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sat, 20 Feb 2016 19:39:54 +1100 Subject: move accesslist class to namespace --- mod/events.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod/events.php') diff --git a/mod/events.php b/mod/events.php index ed9f0f2e3..b07ffa184 100755 --- a/mod/events.php +++ b/mod/events.php @@ -118,7 +118,7 @@ function events_post(&$a) { $channel = $a->get_channel(); - $acl = new AccessList(false); + $acl = new Zotlabs\Access\AccessList(false); if($event_id) { $x = q("select * from event where id = %d and uid = %d limit 1", @@ -422,7 +422,7 @@ function events_content(&$a) { require_once('include/acl_selectors.php'); - $acl = new AccessList($channel); + $acl = new Zotlabs\Access\AccessList($channel); $perm_defaults = $acl->get(); $tpl = get_markup_template('event_form.tpl'); -- cgit v1.2.3 From dfbe2eaf9856140de84f4d891fd442cdd6872545 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sat, 20 Feb 2016 00:49:37 -0800 Subject: Revert "move accesslist class to namespace" This reverts commit a9711895cf254a0ca34b1e3f7c8e75bb832e6973. --- mod/events.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod/events.php') diff --git a/mod/events.php b/mod/events.php index b07ffa184..ed9f0f2e3 100755 --- a/mod/events.php +++ b/mod/events.php @@ -118,7 +118,7 @@ function events_post(&$a) { $channel = $a->get_channel(); - $acl = new Zotlabs\Access\AccessList(false); + $acl = new AccessList(false); if($event_id) { $x = q("select * from event where id = %d and uid = %d limit 1", @@ -422,7 +422,7 @@ function events_content(&$a) { require_once('include/acl_selectors.php'); - $acl = new Zotlabs\Access\AccessList($channel); + $acl = new AccessList($channel); $perm_defaults = $acl->get(); $tpl = get_markup_template('event_form.tpl'); -- cgit v1.2.3 From f1564b4cff5a584d37b12000f68014df49e683d9 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 21 Feb 2016 16:49:49 -0800 Subject: retry the move of AccessList to composer format (one or more third-party plugins will likely break as a result) --- mod/events.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod/events.php') diff --git a/mod/events.php b/mod/events.php index ed9f0f2e3..b07ffa184 100755 --- a/mod/events.php +++ b/mod/events.php @@ -118,7 +118,7 @@ function events_post(&$a) { $channel = $a->get_channel(); - $acl = new AccessList(false); + $acl = new Zotlabs\Access\AccessList(false); if($event_id) { $x = q("select * from event where id = %d and uid = %d limit 1", @@ -422,7 +422,7 @@ function events_content(&$a) { require_once('include/acl_selectors.php'); - $acl = new AccessList($channel); + $acl = new Zotlabs\Access\AccessList($channel); $perm_defaults = $acl->get(); $tpl = get_markup_template('event_form.tpl'); -- cgit v1.2.3 From c95d7c69eb3135f137390323a09eb105776ce29c Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 24 Feb 2016 18:54:52 -0800 Subject: issue #216 - calendar sharing --- mod/events.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mod/events.php') diff --git a/mod/events.php b/mod/events.php index b07ffa184..be39902aa 100755 --- a/mod/events.php +++ b/mod/events.php @@ -283,6 +283,8 @@ function events_content(&$a) { $htpl = get_markup_template('event_head.tpl'); $a->page['htmlhead'] .= replace_macros($htpl,array( '$baseurl' => $a->get_baseurl(), + '$module_url' => '/events', + '$modparams' => 1, '$lang' => $a->language, '$first_day' => $first_day )); @@ -296,6 +298,11 @@ function events_content(&$a) { $m = 0; $ignored = ((x($_REQUEST,'ignored')) ? " and ignored = " . intval($_REQUEST['ignored']) . " " : ''); + +logger('args: ' . print_r($a->argv,true)); + + + if(argc() > 1) { if(argc() > 2 && argv(1) === 'add') { $mode = 'add'; -- cgit v1.2.3 From ebfa1a12b9cc3d939ed49a7f66e5687267a409d3 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 25 Feb 2016 00:36:35 -0800 Subject: when creating an event from a post in our stream, if the original post was private, set the event permissions to "just me". If it was a public event, set the event permissions to the channel default permissions. --- mod/events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/events.php') diff --git a/mod/events.php b/mod/events.php index be39902aa..8e3b3e06b 100755 --- a/mod/events.php +++ b/mod/events.php @@ -299,7 +299,7 @@ function events_content(&$a) { $ignored = ((x($_REQUEST,'ignored')) ? " and ignored = " . intval($_REQUEST['ignored']) . " " : ''); -logger('args: ' . print_r($a->argv,true)); + // logger('args: ' . print_r($a->argv,true)); -- cgit v1.2.3 From 1cd3b4182595b838a535dd6b6990251db05d49e6 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 30 Mar 2016 22:13:24 -0700 Subject: deprecate $a->get_baseurl() --- mod/events.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'mod/events.php') diff --git a/mod/events.php b/mod/events.php index 8e3b3e06b..30c083e4f 100755 --- a/mod/events.php +++ b/mod/events.php @@ -93,8 +93,8 @@ function events_post(&$a) { //$action = ($event_hash == '') ? 'new' : "event/" . $event_hash; //fixme: this url gives a wsod if there is a linebreak detected in one of the variables ($desc or $location) - //$onerror_url = $a->get_baseurl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish&type=$type"; - $onerror_url = $a->get_baseurl() . "/events"; + //$onerror_url = z_root() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish&type=$type"; + $onerror_url = z_root() . "/events"; if(strcmp($finish,$start) < 0 && !$nofinish) { notice( t('Event can not end before it has started.') . EOL); @@ -282,7 +282,7 @@ function events_content(&$a) { $htpl = get_markup_template('event_head.tpl'); $a->page['htmlhead'] .= replace_macros($htpl,array( - '$baseurl' => $a->get_baseurl(), + '$baseurl' => z_root(), '$module_url' => '/events', '$modparams' => 1, '$lang' => $a->language, @@ -435,7 +435,7 @@ function events_content(&$a) { $tpl = get_markup_template('event_form.tpl'); $form = replace_macros($tpl,array( - '$post' => $a->get_baseurl() . '/events', + '$post' => z_root() . '/events', '$eid' => $eid, '$type' => $type, '$xchan' => $event_xchan, @@ -571,7 +571,7 @@ function events_content(&$a) { foreach($r as $rr) { $j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], 'j') : datetime_convert('UTC','UTC',$rr['start'],'j')); if(! x($links,$j)) - $links[$j] = $a->get_baseurl() . '/' . $a->cmd . '#link-' . $j; + $links[$j] = z_root() . '/' . $a->cmd . '#link-' . $j; } } @@ -600,9 +600,9 @@ function events_content(&$a) { $last_date = $d; - $edit = ((local_channel() && $rr['author_xchan'] == get_observer_hash()) ? array($a->get_baseurl().'/events/'.$rr['event_hash'].'?expandform=1',t('Edit event'),'','') : false); + $edit = ((local_channel() && $rr['author_xchan'] == get_observer_hash()) ? array(z_root().'/events/'.$rr['event_hash'].'?expandform=1',t('Edit event'),'','') : false); - $drop = array($a->get_baseurl().'/events/drop/'.$rr['event_hash'],t('Delete event'),'',''); + $drop = array(z_root().'/events/drop/'.$rr['event_hash'],t('Delete event'),'',''); $title = strip_tags(html_entity_decode(bbcode($rr['summary']),ENT_QUOTES,'UTF-8')); if(! $title) { @@ -654,11 +654,11 @@ function events_content(&$a) { } $o = replace_macros($tpl, array( - '$baseurl' => $a->get_baseurl(), - '$new_event' => array($a->get_baseurl().'/events',(($event_id) ? t('Edit Event') : t('Create Event')),'',''), - '$previus' => array($a->get_baseurl()."/events/$prevyear/$prevmonth",t('Previous'),'',''), - '$next' => array($a->get_baseurl()."/events/$nextyear/$nextmonth",t('Next'),'',''), - '$export' => array($a->get_baseurl()."/events/$y/$m/export",t('Export'),'',''), + '$baseurl' => z_root(), + '$new_event' => array(z_root().'/events',(($event_id) ? t('Edit Event') : t('Create Event')),'',''), + '$previus' => array(z_root()."/events/$prevyear/$prevmonth",t('Previous'),'',''), + '$next' => array(z_root()."/events/$nextyear/$nextmonth",t('Next'),'',''), + '$export' => array(z_root()."/events/$y/$m/export",t('Export'),'',''), '$calendar' => cal($y,$m,$links, ' eventcal'), '$events' => $events, '$upload' => t('Import'), -- cgit v1.2.3 From 9abd95fad3784a10fc48bc40f9b8a75d7d74edda Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 31 Mar 2016 16:06:03 -0700 Subject: static App --- mod/events.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'mod/events.php') diff --git a/mod/events.php b/mod/events.php index 30c083e4f..30cf5f303 100755 --- a/mod/events.php +++ b/mod/events.php @@ -116,7 +116,7 @@ function events_post(&$a) { $share = ((intval($_POST['share'])) ? intval($_POST['share']) : 0); - $channel = $a->get_channel(); + $channel = App::get_channel(); $acl = new Zotlabs\Access\AccessList(false); @@ -158,7 +158,7 @@ function events_post(&$a) { } $post_tags = array(); - $channel = $a->get_channel(); + $channel = App::get_channel(); $ac = $acl->get(); if(strlen($categories)) { @@ -281,17 +281,17 @@ function events_content(&$a) { $first_day = (($first_day) ? $first_day : 0); $htpl = get_markup_template('event_head.tpl'); - $a->page['htmlhead'] .= replace_macros($htpl,array( + App::$page['htmlhead'] .= replace_macros($htpl,array( '$baseurl' => z_root(), '$module_url' => '/events', '$modparams' => 1, - '$lang' => $a->language, + '$lang' => App::$language, '$first_day' => $first_day )); $o = ''; - $channel = $a->get_channel(); + $channel = App::get_channel(); $mode = 'view'; $y = 0; @@ -299,7 +299,7 @@ function events_content(&$a) { $ignored = ((x($_REQUEST,'ignored')) ? " and ignored = " . intval($_REQUEST['ignored']) . " " : ''); - // logger('args: ' . print_r($a->argv,true)); + // logger('args: ' . print_r(App::$argv,true)); @@ -340,7 +340,7 @@ function events_content(&$a) { $orig_event = $r[0]; } - $channel = $a->get_channel(); + $channel = App::get_channel(); // Passed parameters overrides anything found in the DB if(!x($orig_event)) @@ -571,7 +571,7 @@ function events_content(&$a) { foreach($r as $rr) { $j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], 'j') : datetime_convert('UTC','UTC',$rr['start'],'j')); if(! x($links,$j)) - $links[$j] = z_root() . '/' . $a->cmd . '#link-' . $j; + $links[$j] = z_root() . '/' . App::$cmd . '#link-' . $j; } } @@ -641,7 +641,7 @@ function events_content(&$a) { killme(); } - if ($a->argv[1] === 'json'){ + if (App::$argv[1] === 'json'){ echo json_encode($events); killme(); } -- cgit v1.2.3