aboutsummaryrefslogtreecommitdiffstats
path: root/mod/events.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/events.php')
-rwxr-xr-xmod/events.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/mod/events.php b/mod/events.php
index 8e3b3e06b..30cf5f303 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);
@@ -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(
- '$baseurl' => $a->get_baseurl(),
+ 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))
@@ -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() . '/' . App::$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) {
@@ -641,7 +641,7 @@ function events_content(&$a) {
killme();
}
- if ($a->argv[1] === 'json'){
+ if (App::$argv[1] === 'json'){
echo json_encode($events); killme();
}
@@ -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'),