mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 21:01:30 +02:00
Add additional config to show currentapp and api upgrade status
This commit is contained in:
parent
01ef0bdc8b
commit
477991e9f4
72
admin/inc/hook_after_navbar.inc.php
Normal file
72
admin/inc/hook_after_navbar.inc.php
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
/**************************************************************************\
|
||||||
|
* phpGroupWare - Admin *
|
||||||
|
* http://www.phpgroupware.org *
|
||||||
|
* This application written by Miles Lott <milosch@phpgroupware.org> *
|
||||||
|
* -------------------------------------------- *
|
||||||
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
|
* under the terms of the GNU General Public License as published by the *
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
|
* option) any later version. *
|
||||||
|
\**************************************************************************/
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Check currentapp and API upgrade status */
|
||||||
|
|
||||||
|
if ($GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' &&
|
||||||
|
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'welcome' &&
|
||||||
|
(isset($GLOBALS['phpgw_info']['server']['checkappversions']) &&
|
||||||
|
$GLOBALS['phpgw_info']['server']['checkappversions']))
|
||||||
|
{
|
||||||
|
if ((isset($GLOBALS['phpgw_info']['user']['apps']['admin']) &&
|
||||||
|
$GLOBALS['phpgw_info']['user']['apps']['admin']) ||
|
||||||
|
$GLOBALS['phpgw_info']['server']['checkappversions'] == 'All')
|
||||||
|
{
|
||||||
|
$_found = False;
|
||||||
|
$app_name = $GLOBALS['phpgw_info']['flags']['currentapp'];
|
||||||
|
$GLOBALS['phpgw']->db->query("SELECT app_version FROM phpgw_applications WHERE app_name='$app_name' OR app_name='phpgwapi'",__LINE__,__FILE__);
|
||||||
|
while($GLOBALS['phpgw']->db->next_record())
|
||||||
|
{
|
||||||
|
$_db_version = $GLOBALS['phpgw']->db->f('app_version');
|
||||||
|
$app_name = $GLOBALS['phpgw']->db->f('app_name');
|
||||||
|
$_versionfile = $GLOBALS['phpgw']->common->get_app_dir($app_name) . '/setup/setup.inc.php';
|
||||||
|
if(file_exists($_versionfile))
|
||||||
|
{
|
||||||
|
include($_versionfile);
|
||||||
|
$_file_version = $setup_info[$app_name]['version'];
|
||||||
|
$_app_title = $setup_info[$app_name]['title'];
|
||||||
|
unset($setup_info);
|
||||||
|
|
||||||
|
$api_str = '<br>' . lang('The API is current');
|
||||||
|
if($GLOBALS['phpgw']->common->cmp_version_long($_db_version,$_file_version))
|
||||||
|
{
|
||||||
|
$_found = True;
|
||||||
|
if($app_name == 'phpgwapi')
|
||||||
|
{
|
||||||
|
$api_str = '<br>' . lang('The API requires an upgrade');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unset($_file_version);
|
||||||
|
unset($_app_title);
|
||||||
|
}
|
||||||
|
unset($_db_version);
|
||||||
|
unset($_versionfile);
|
||||||
|
}
|
||||||
|
if($_found)
|
||||||
|
{
|
||||||
|
echo '<center>';
|
||||||
|
echo $api_str;
|
||||||
|
echo '<br>' . lang('This application requires an upgrade') . ':' . "\n";
|
||||||
|
echo '<br>' . lang('Please run setup to become current') . '.' . "\n";
|
||||||
|
echo '</center>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo '<center>';
|
||||||
|
echo $api_str;
|
||||||
|
echo '<br>' . lang('This application is current') . "\n";
|
||||||
|
echo '</center>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -89,6 +89,16 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr bgcolor="{row_off}">
|
<tr bgcolor="{row_off}">
|
||||||
|
<td>{lang_Would_you_like_to_show_each_application's_upgrade_status_?}:</td><td>
|
||||||
|
<select name="newsettings[checkappversions]">
|
||||||
|
<option value="">No</option>
|
||||||
|
<option value="Admin"{selected_checkappversions_Admin}>{lang_Admins}</option>
|
||||||
|
<option value="All"{selected_checkappversions_All}>{lang_All_Users}</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr bgcolor="{row_on}">
|
||||||
<td>{lang_Would_you_like_phpGroupWare_to_cache_the_phpgw_info_array ?}:</td>
|
<td>{lang_Would_you_like_phpGroupWare_to_cache_the_phpgw_info_array ?}:</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="newsettings[cache_phpgw_info]">
|
<select name="newsettings[cache_phpgw_info]">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user