mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-04 20:40:14 +01:00
Fixed a few problems with changing the theme with frames and merged in patch for changetheme
This commit is contained in:
parent
d3c59526f0
commit
ef0223f75b
11
index.php
11
index.php
@ -27,6 +27,8 @@
|
|||||||
if (($phpgw_info["user"]["preferences"]["common"]["useframes"] && $phpgw_info["server"]["useframes"] == "allowed")
|
if (($phpgw_info["user"]["preferences"]["common"]["useframes"] && $phpgw_info["server"]["useframes"] == "allowed")
|
||||||
|| ($phpgw_info["server"]["useframes"] == "always")) {
|
|| ($phpgw_info["server"]["useframes"] == "always")) {
|
||||||
|
|
||||||
|
if ($cd == "yes") {
|
||||||
|
|
||||||
if (! $navbarframe && ! $framebody) {
|
if (! $navbarframe && ! $framebody) {
|
||||||
$tpl = new Template($phpgw_info["server"]["template_dir"]);
|
$tpl = new Template($phpgw_info["server"]["template_dir"]);
|
||||||
$tpl->set_file(array("frames" => "frames.tpl",
|
$tpl->set_file(array("frames" => "frames.tpl",
|
||||||
@ -34,8 +36,12 @@
|
|||||||
"frame_navbar" => "frames_navbar.tpl"
|
"frame_navbar" => "frames_navbar.tpl"
|
||||||
));
|
));
|
||||||
|
|
||||||
$tpl->set_var("navbar_link",$phpgw->link("index.php","navbarframe=True"));
|
$tpl->set_var("navbar_link",$phpgw->link("index.php","navbarframe=True&cd=yes"));
|
||||||
$tpl->set_var("body_link",$phpgw->link("index.php","framebody=True"));
|
if ($forward) {
|
||||||
|
$tpl->set_var("body_link",$phpgw->link($phpgw_info["server"]["webserver_url"] . $forward));
|
||||||
|
} else {
|
||||||
|
$tpl->set_var("body_link",$phpgw->link("index.php","framebody=True&cd=yes"));
|
||||||
|
}
|
||||||
|
|
||||||
if ($phpgw_info["user"]["preferences"]["common"]["frame_navbar_location"] == "bottom") {
|
if ($phpgw_info["user"]["preferences"]["common"]["frame_navbar_location"] == "bottom") {
|
||||||
$tpl->set_var("frame_size","*,60");
|
$tpl->set_var("frame_size","*,60");
|
||||||
@ -52,6 +58,7 @@
|
|||||||
$phpgw->common->phpgw_header();
|
$phpgw->common->phpgw_header();
|
||||||
$phpgw->common->navbar(True);
|
$phpgw->common->navbar(True);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$phpgw->common->phpgw_header();
|
$phpgw->common->phpgw_header();
|
||||||
$phpgw->common->navbar();
|
$phpgw->common->navbar();
|
||||||
|
@ -16,14 +16,19 @@
|
|||||||
|
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
|
||||||
if ($ntheme) {
|
if ($theme) {
|
||||||
$phpgw->preferences->change("common","theme",$ntheme);
|
$phpgw->preferences->change("common","theme");
|
||||||
$phpgw->preferences->commit();
|
$phpgw->preferences->commit();
|
||||||
Header("location: " . $phpgw->link("changetheme.php"));
|
if ($phpgw_info["server"]["useframes"] != "never") {
|
||||||
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/index.php","forward=/preferences/changetheme.php&cd=yes"));
|
||||||
|
Header("Window-Target: _top");
|
||||||
|
} else {
|
||||||
|
Header("Location: " . $phpgw->link("changetheme.php"));
|
||||||
|
}
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$dh = opendir($phpgw_info["server"]["server_root"] . "/themes");
|
$dh = opendir($phpgw_info["server"]["api_dir"] . "/themes");
|
||||||
while ($file = readdir($dh)) {
|
while ($file = readdir($dh)) {
|
||||||
if (eregi("\.theme$", $file)) {
|
if (eregi("\.theme$", $file)) {
|
||||||
$installed_themes[] = substr($file,0,strpos($file,"."));
|
$installed_themes[] = substr($file,0,strpos($file,"."));
|
||||||
@ -38,8 +43,13 @@
|
|||||||
echo "<br>";
|
echo "<br>";
|
||||||
|
|
||||||
for ($i=0; $i<count($installed_themes); $i++) {
|
for ($i=0; $i<count($installed_themes); $i++) {
|
||||||
echo "<br><a href=\"" . $phpgw->link("changetheme.php","ntheme="
|
echo '<br><a href="' . $phpgw->link("changetheme.php","theme="
|
||||||
. $installed_themes[$i]) . "\">" . $installed_themes[$i] . "</a>\n";
|
. $installed_themes[$i]) . '">' . $installed_themes[$i] . '</a>';
|
||||||
|
|
||||||
|
if ($phpgw_info["server"]["useframes"] != "never") {
|
||||||
|
// echo '<br><a href="' . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/index.php","ntheme="
|
||||||
|
// . $installed_themes[$i] . "&forward=" . urlencode("preferences/index.php")) . '" target="_new">' . $installed_themes[$i] . '</a>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
|
Loading…
Reference in New Issue
Block a user