summaryrefslogtreecommitdiff
path: root/www/admin/kolab/versions.php.in
blob: 94671b1c7761b018d3a53649174cd2fe513717b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/*
 (c) 2004 Klarälvdalens Datakonsult AB
 (c) 2003 Tassilo Erlewein <tassilo.erlewein@erfrakon.de>
 (c) 2003-2006 Martin Konold <martin.konold@erfrakon.de>
 (c) 2007 Intevation GmbH
 This program is Free Software under the GNU General Public License (>=v2).
 Read the file COPYING that comes with this packages for details.
*/

require_once('@kolab_php_module_prefix@admin/include/mysmarty.php');
require_once('@kolab_php_module_prefix@admin/include/headers.php');
require_once('@kolab_php_module_prefix@admin/include/locale.php');
require_once('@kolab_php_module_prefix@admin/include/authenticate.php');

/**** Authentication etc. ***/
$sidx = 'about';

require_once('@kolab_php_module_prefix@admin/include/menu.php');

/**** Submenu for current page ***/
$menuitems[$sidx]['selected'] = 'selected';

/**** Page logic ****/

// Remember to keep this list up to date when patching packages!
// The variable 'kolab_pkgs' is used to collect a packages that make up the
// kolab groupware server.
$kolabversions = shell_exec('
  @RPM@ -q --qf "%{NAME}: %{VERSION}-%{RELEASE}\n" \
    @kolab_pkgs@ \
    | sort
');

$pearhordeversions = shell_exec('
  @RPM@ -q --qf "%{NAME}: %{VERSION}-%{RELEASE}\n" \
    @pear_horde_pkgs@ \
    | sort
');


# This is an openpkg test, difficult to see after make.
# but visible in the vanilla sources.
if ("@WITHOPENPKG@" == "yes") {
  $openpkgversion = shell_exec("@RPM@ -q openpkg");
  $kolabpatchedversions = shell_exec("@RPM@ -qa|grep 'kolab[0-9]*$'" );
}

$kolabversion = '@kolab_version@';
if( $kolabversion[0] == '@' ) {
  // Unofficial/non-openpkg package
  $kolabversion = 'unknown';
}

/**** Insert into template and output ***/
$smarty = new MySmarty();
$smarty->assign( 'topdir', $topdir );
$smarty->assign( 'uid', $auth->uid() );
$smarty->assign( 'group', $auth->group() );
$smarty->assign( 'page_title', $menuitems[$sidx]['title'] );
$smarty->assign( 'menuitems', $menuitems );
$smarty->assign( 'submenuitems', $menuitems[$sidx]['submenu'] );
$smarty->assign( 'kolabversion',  $kolabversion );
$smarty->assign( 'kolabversions', $kolabversions );
$smarty->assign( 'pearhordeversions', $pearhordeversions );
$smarty->assign( 'kolabpatchedversions', $kolabpatchedversions );
$smarty->assign( 'openpkgversion', $openpkgversion );
$smarty->assign( 'maincontent', 'versions.tpl' );
$smarty->display('page.tpl');

/*
  Local variables:
  mode: php
  indent-tabs-mode: t
  tab-width: 4
  coding: utf-8
  End:
*/
 ?>