aboutsummaryrefslogtreecommitdiffstats
path: root/mod/cal.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-04-03 21:36:29 -0400
committerAndrew Manning <tamanning@zoho.com>2016-04-03 21:36:29 -0400
commit0523b4b2f1012a8b5f3bffb7f136a20dc9a4e43f (patch)
treea92197de4503ec52889dc05483493f4df1a305b8 /mod/cal.php
parent99d9456b3addc651a68874ddd391d25684252c4d (diff)
parentb4c1baada1fba46d4d75f40a7e78111d70d54e7a (diff)
downloadvolse-hubzilla-0523b4b2f1012a8b5f3bffb7f136a20dc9a4e43f.tar.gz
volse-hubzilla-0523b4b2f1012a8b5f3bffb7f136a20dc9a4e43f.tar.bz2
volse-hubzilla-0523b4b2f1012a8b5f3bffb7f136a20dc9a4e43f.zip
Merge branch 'master' of https://github.com/redmatrix/hubzilla into contextual-help
Diffstat (limited to 'mod/cal.php')
-rwxr-xr-xmod/cal.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/mod/cal.php b/mod/cal.php
index 453f46f69..b58f3a1f1 100755
--- a/mod/cal.php
+++ b/mod/cal.php
@@ -5,7 +5,7 @@ require_once('include/bbcode.php');
require_once('include/datetime.php');
require_once('include/event.php');
require_once('include/items.php');
-require_once('Contact.php');
+require_once('include/Contact.php');
function cal_init(&$a) {
@@ -25,16 +25,16 @@ function cal_init(&$a) {
if(! $channelx)
return;
- $a->data['channel'] = $channelx;
+ App::$data['channel'] = $channelx;
- $observer = $a->get_observer();
- $a->data['observer'] = $observer;
+ $observer = App::get_observer();
+ App::$data['observer'] = $observer;
$observer_xchan = (($observer) ? $observer['xchan_hash'] : '');
- head_set_icon($a->data['channel']['xchan_photo_s']);
+ head_set_icon(App::$data['channel']['xchan_photo_s']);
- $a->page['htmlhead'] .= "<script> var ispublic = '" . t('everybody') . "'; var profile_uid = " . (($a->data['channel']) ? $a->data['channel']['channel_id'] : 0) . "; </script>" ;
+ App::$page['htmlhead'] .= "<script> var ispublic = '" . t('everybody') . "'; var profile_uid = " . ((App::$data['channel']) ? App::$data['channel']['channel_id'] : 0) . "; </script>" ;
}
@@ -70,11 +70,11 @@ function cal_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' => '/cal/' . $channel['channel_address'],
'$modparams' => 2,
- '$lang' => $a->language,
+ '$lang' => App::$language,
'$first_day' => $first_day
));
@@ -87,7 +87,7 @@ function cal_content(&$a) {
$m = 0;
$ignored = ((x($_REQUEST,'ignored')) ? " and ignored = " . intval($_REQUEST['ignored']) . " " : '');
- // logger('args: ' . print_r($a->argv,true));
+ // logger('args: ' . print_r(App::$argv,true));
if(argc() > 3 && intval(argv(2)) && intval(argv(3))) {
$mode = 'view';
@@ -243,7 +243,7 @@ function cal_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;
}
}
@@ -321,11 +321,11 @@ function cal_content(&$a) {
$nick = $channel['channel_address'];
$o = replace_macros($tpl, array(
- '$baseurl' => $a->get_baseurl(),
- '$new_event' => array($a->get_baseurl().'/cal',(($event_id) ? t('Edit Event') : t('Create Event')),'',''),
- '$previus' => array($a->get_baseurl()."/cal/$nick/$prevyear/$prevmonth",t('Previous'),'',''),
- '$next' => array($a->get_baseurl()."/cal/$nick/$nextyear/$nextmonth",t('Next'),'',''),
- '$export' => array($a->get_baseurl()."/cal/$nick/$y/$m/export",t('Export'),'',''),
+ '$baseurl' => z_root(),
+ '$new_event' => array(z_root().'/cal',(($event_id) ? t('Edit Event') : t('Create Event')),'',''),
+ '$previus' => array(z_root()."/cal/$nick/$prevyear/$prevmonth",t('Previous'),'',''),
+ '$next' => array(z_root()."/cal/$nick/$nextyear/$nextmonth",t('Next'),'',''),
+ '$export' => array(z_root()."/cal/$nick/$y/$m/export",t('Export'),'',''),
'$calendar' => cal($y,$m,$links, ' eventcal'),
'$events' => $events,
'$upload' => t('Import'),