summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@pardus.de>2010-09-13 13:02:42 (GMT)
committerGunnar Wrobel <wrobel@pardus.de>2010-09-13 13:02:42 (GMT)
commit3786fe6b0a3bcd8b1542143e1d545b08f7f32877 (patch)
tree77bef8f0f229725ebd0e1c5f7ac7bd7bdbc914dd
parent42235552b8c245a9d5723909f719ff56c3c343ed (diff)
downloadkolab-webadmin-3786fe6b0a3bcd8b1542143e1d545b08f7f32877.tar.gz
Remove dist_conf from page.tpl and logout.php.
-rw-r--r--Makefile.am18
-rw-r--r--lib/KolabAdmin/include/mysmarty.php8
-rwxr-xr-xphp/admin/templates/page.tpl (renamed from php/admin/templates/page.tpl.in)4
-rw-r--r--www/admin/logout.php (renamed from www/admin/logout.php.in)4
4 files changed, 15 insertions, 19 deletions
diff --git a/Makefile.am b/Makefile.am
index cae24f5..e77f507 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,7 +29,9 @@ WSKOLAB_FILES = www/admin/index.php \
wskolabdir = $(webserver_document_root)$(kolab_wui)
wskolab_DATA = $(WSKOLAB_FILES)
EXTRA_DIST += www/admin/style.css \
- www/admin/print.css
+ www/admin/print.css \
+ www/admin/logout.php
+
EXTRA_DIST += $(WSKOLAB_FILES)
WSADDRESSBOOK_FILES = www/admin/addressbook/addr.php \
@@ -168,6 +170,7 @@ PHP_TEMPLATES = php/admin/templates/maintainerdeleted.tpl \
php/admin/templates/userlistall.tpl \
php/admin/templates/userlisterror.tpl \
php/admin/templates/settings.tpl \
+ php/admin/templates/page.tpl \
php/admin/templates/welcome.tpl \
php/admin/templates/systemaliasnagscreen.tpl \
php/admin/templates/intevation.tpl \
@@ -178,7 +181,6 @@ PHP_TEMPLATES = php/admin/templates/maintainerdeleted.tpl \
phptemplatesdir = $(phpkolabdir)/templates
phptemplates_DATA = $(PHP_TEMPLATES) \
- php/admin/templates/page.tpl \
php/admin/templates/versions.tpl
EXTRA_DIST += $(PHP_TEMPLATES)
@@ -246,24 +248,12 @@ EXTRA_DIST += dist_conf/common \
dist_conf/suse
-php/admin/templates/page.tpl: php/admin/templates/page.tpl.in
- @$(mkinstalldirs) php/admin/templates
- $(do_subst) <$(srcdir)/php/admin/templates/page.tpl.in >$@
-CLEANFILES += php/admin/templates/page.tpl
-EXTRA_DIST += php/admin/templates/page.tpl.in
-
php/admin/templates/versions.tpl: php/admin/templates/versions.tpl.in
@$(mkinstalldirs) php/admin/templates
$(w_or_wo_openpkg) <$(srcdir)/php/admin/templates/versions.tpl.in >$@
CLEANFILES += php/admin/templates/versions.tpl
EXTRA_DIST += php/admin/templates/versions.tpl.in
-www/admin/logout.php: www/admin/logout.php.in
- @$(mkinstalldirs) www/admin
- $(do_subst) <$(srcdir)/www/admin/logout.php.in >$@
-CLEANFILES += www/admin/logout.php
-EXTRA_DIST += www/admin/logout.php.in
-
www/admin/kolab/versions.php: www/admin/kolab/versions.php.in
@$(mkinstalldirs) www/admin/kolab
$(do_subst) <$(srcdir)/www/admin/kolab/versions.php.in >$@
diff --git a/lib/KolabAdmin/include/mysmarty.php b/lib/KolabAdmin/include/mysmarty.php
index 0e27fa5..a7dba5c 100644
--- a/lib/KolabAdmin/include/mysmarty.php
+++ b/lib/KolabAdmin/include/mysmarty.php
@@ -33,6 +33,8 @@ class MySmarty extends Smarty {
global $language;
global $basedir;
global $smarty_compiledir;
+ global $webserver_web_prefix;
+ global $params;
$this->Smarty();
$this->config_dir = $basedir.'configs/';
@@ -45,8 +47,10 @@ class MySmarty extends Smarty {
//$this->register_outputfilter("count_bytes");
- $this->assign( 'topdir', $topdir );
- $this->assign( 'self_url', $_SERVER['REQUEST_URI'] );
+ $this->assign('webserver_web_prefix', $webserver_web_prefix);
+ $this->assign('kolab_wui', $params['kolab_wui']);
+ $this->assign('topdir', $topdir);
+ $this->assign('self_url', $_SERVER['REQUEST_URI']);
$cleanurl = preg_replace('/(\?|&)lang=(.*)(&|$)/', '', $_SERVER['REQUEST_URI']);
$this->assign( 'lang_url',
diff --git a/php/admin/templates/page.tpl.in b/php/admin/templates/page.tpl
index b0128b6..9b53c53 100755
--- a/php/admin/templates/page.tpl.in
+++ b/php/admin/templates/page.tpl
@@ -9,7 +9,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>{$page_title}</title>
-<link rel="shortcut icon" type="image/png" href="@webserver_web_prefix@/favicon.png" />
+<link rel="shortcut icon" type="image/png" href="${webserver_web_prefix}/favicon.png" />
<meta name="robots" content="noindex" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="{$currentlang}" />
@@ -30,7 +30,7 @@ function changeLanguage(combobox) {ldelim}
</head>
<body>
<div id="topbar">
- <a href="@kolab_wui@"><span id="toplogo"></span></a>
+ <a href="${kolab_wui}"><span id="toplogo"></span></a>
<div id="toptitle">{$page_title}</div>
</div>
<div id="topuserinfo">
diff --git a/www/admin/logout.php.in b/www/admin/logout.php
index 57b59c6..cba1546 100644
--- a/www/admin/logout.php.in
+++ b/www/admin/logout.php
@@ -18,10 +18,12 @@
* Project's homepage; see <http://www.gnu.org/licenses/gpl.html>.
*/
+require_once('KolabAdmin/include/mysmarty.php');
+
session_start();
session_destroy();
session_unset();
-header('Location: @kolab_wui@/');
+header('Location: $params['kolab_wui']/');
/*
Local variables: