implemented @crti's suggestion to use the calendar/event owners' timezone by default in the link-shared calendar/event display
parent
f3cb94ddae
commit
a97f5fc113
12
lib/app.php
12
lib/app.php
|
@ -343,10 +343,18 @@ class OC_Calendar_App{
|
||||||
if (\OC::$session->exists('public_link_timezone')) {
|
if (\OC::$session->exists('public_link_timezone')) {
|
||||||
// aye, using that
|
// aye, using that
|
||||||
return \OC::$session->get('public_link_timezone');
|
return \OC::$session->get('public_link_timezone');
|
||||||
|
|
||||||
|
// is it a shared calendar or event??
|
||||||
|
} elseif (\OC::$session->exists('public_link_owner')) {
|
||||||
|
// let's try to get the shared calendar
|
||||||
|
return OCP\Config::getUserValue(\OC::$session->get('public_link_owner'),
|
||||||
|
'calendar',
|
||||||
|
'timezone',
|
||||||
|
date_default_timezone_get());
|
||||||
|
|
||||||
// nope!
|
// nope!
|
||||||
} else {
|
} else {
|
||||||
// use the default
|
// use the default already!
|
||||||
return date_default_timezone_get();
|
return date_default_timezone_get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,7 @@ if (isset($rootLinkItem)) {
|
||||||
$url = OCP\Util::linkToPublic('calendar') . '&t=' . $token;
|
$url = OCP\Util::linkToPublic('calendar') . '&t=' . $token;
|
||||||
// let's set the token in the session for further reference
|
// let's set the token in the session for further reference
|
||||||
\OC::$session->set('public_link_token', $token);
|
\OC::$session->set('public_link_token', $token);
|
||||||
|
\OC::$session->set('public_link_owner', $linkItem['uid_owner']);
|
||||||
|
|
||||||
// do we have a password on this share?
|
// do we have a password on this share?
|
||||||
if (isset($linkItem['share_with'])) {
|
if (isset($linkItem['share_with'])) {
|
||||||
|
|
Loading…
Reference in New Issue