fix for default page set to calendar now displays default calendar view

This commit is contained in:
skeeter 2001-01-05 01:38:12 +00:00
parent 13b082b088
commit 891c0f2d6e
4 changed files with 8 additions and 7 deletions

View File

@ -3,7 +3,7 @@
$pref->change("calendar","weekstarts","Monday");
$pref->change("calendar","workdaystarts","9");
$pref->change("calendar","workdayends","17");
$pref->change("common","defaultcalendar","index.php");
$pref->change("calendar","defaultcalendar","index.php");
$pref->change("calendar","defaultfilter","all");
$pref->change("calendar","mainscreen_showevents","Y");
?>

View File

@ -18,7 +18,7 @@
$phpgw->preferences->change("calendar","weekdaystarts");
$phpgw->preferences->change("calendar","workdaystarts");
$phpgw->preferences->change("calendar","workdayends");
$phpgw->preferences->change("common","defaultcalendar");
$phpgw->preferences->change("calendar","defaultcalendar");
$phpgw->preferences->change("calendar","defaultfilter");
if ($mainscreen_showevents) {
$phpgw->preferences->change("calendar","mainscreen_showevents");
@ -109,8 +109,8 @@
<select name="defaultcalendar">
<?php
$selected = array();
$selected[$phpgw_info["user"]["preferences"]["common"]["defaultcalendar"]] = " selected";
if (! isset($phpgw_info["user"]["preferences"]["common"]["defaultcalendar"]) || $phpgw_info["user"]["preferences"]["common"]["defaultcalendar"] == "index.php") {
$selected[$phpgw_info["user"]["preferences"]["calendar"]["defaultcalendar"]] = " selected";
if (! isset($phpgw_info["user"]["preferences"]["calendar"]["defaultcalendar"]) || $phpgw_info["user"]["preferences"]["calendar"]["defaultcalendar"] == "index.php") {
$selected["index.php"] = " selected";
}
?>

View File

@ -62,7 +62,8 @@
} elseif ($cd=="yes" && $phpgw_info["user"]["preferences"]["common"]["default_app"]
&& $phpgw_info["user"]["apps"][$phpgw_info["user"]["preferences"]["common"]["default_app"]]) {
$phpgw->redirect($phpgw->link($phpgw_info["server"]["webserver_url"] . "/"
. $phpgw_info["user"]["preferences"]["common"]["default_app"] . "/"));
. $phpgw_info["user"]["preferences"]["common"]["default_app"] . "/"
. ($phpgw_info["user"]["preferences"]["common"]["default_app"]=="calendar"?$phpgw_info["user"]["preferences"]["calendar"]["defaultcalendar"]:"index.php")));
$phpgw->common->phpgw_exit();
} else {
$phpgw->common->phpgw_header();

View File

@ -372,8 +372,8 @@
// Changed by Skeeter 03 Dec 00 2000 GMT
// This is to allow for the calendar app to have a default page view.
} elseif ($appname == "calendar") {
if (isset($phpgw_info["user"]["preferences"]["common"]["defaultcalendar"])) {
$view = $phpgw_info["user"]["preferences"]["common"]["defaultcalendar"];
if (isset($phpgw_info["user"]["preferences"]["calendar"]["defaultcalendar"])) {
$view = $phpgw_info["user"]["preferences"]["calendar"]["defaultcalendar"];
} else {
$view = "index.php";
}