[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /**************************************************************************\ 3 * eGroupWare - Admin * 4 * http://www.egroupware.org * 5 * This application written by Miles Lott <milos@groupwhere.org> * 6 * 04/27/2005 Fixed by Olivier TITECA-BEAUPORT <oliviert@maphilo.com> * 7 * -------------------------------------------- * 8 * This program is free software; you can redistribute it and/or modify it * 9 * under the terms of the GNU General Public License as published by the * 10 * Free Software Foundation; either version 2 of the License, or (at your * 11 * option) any later version. * 12 \**************************************************************************/ 13 14 /* $Id: hook_after_navbar.inc.php 20295 2006-02-15 12:31:25Z $ */ 15 16 /* Check currentapp and API upgrade status */ 17 18 if($GLOBALS['egw_info']['flags']['currentapp'] != 'home' && 19 $GLOBALS['egw_info']['flags']['currentapp'] != 'welcome' && 20 (isset($GLOBALS['egw_info']['server']['checkappversions']) && 21 $GLOBALS['egw_info']['server']['checkappversions'])) 22 { 23 if((isset($GLOBALS['egw_info']['user']['apps']['admin']) && 24 $GLOBALS['egw_info']['user']['apps']['admin']) || 25 $GLOBALS['egw_info']['server']['checkappversions'] == 'All') 26 { 27 $_returnhtml = array(); 28 $app_name = $GLOBALS['egw_info']['flags']['currentapp']; 29 $GLOBALS['egw']->db->query("SELECT app_name,app_version FROM egw_applications WHERE app_name='$app_name' OR app_name='phpgwapi'",__LINE__,__FILE__); 30 while($GLOBALS['egw']->db->next_record()) 31 { 32 $_db_version = $GLOBALS['egw']->db->f('app_version'); 33 $app_name = $GLOBALS['egw']->db->f('app_name'); 34 $_versionfile = $GLOBALS['egw']->common->get_app_dir($app_name) . '/setup/setup.inc.php'; 35 if(file_exists($_versionfile)) 36 { 37 include($_versionfile); 38 $_file_version = $setup_info[$app_name]['version']; 39 unset($setup_info); 40 41 if(amorethanb($_file_version, $_db_version)) 42 { 43 if($app_name == 'phpgwapi' ) 44 { 45 $_returnhtml[$app_name] = lang('The API requires an upgrade'); 46 } 47 else 48 { 49 $_returnhtml[$app_name] = lang('This application requires an upgrade') . ": \n <br />" . lang('Please run setup to become current') . '.' . "\n"; 50 } 51 } 52 else 53 { 54 if($app_name == 'phpgwapi' ) 55 { 56 $_returnhtml[$app_name] = lang('The API is current'); 57 } 58 else 59 { 60 $_returnhtml[$app_name] = lang('This application is current') . "\n"; 61 } 62 } 63 unset($_file_version); 64 } 65 else 66 { 67 // if setup.inc.php do not exist for the app, we assume that the app is current 68 if($app_name == 'phpgwapi' ) 69 { 70 $_returnhtml[$app_name] = lang('The API is current'); 71 } 72 else 73 { 74 $_returnhtml[$app_name] = lang('This application is current') . "\n"; 75 } 76 } 77 unset($_db_version); 78 unset($_versionfile); 79 } 80 echo '<p style="text-align: center;">'.implode('<br />',$_returnhtml)."</p>\n"; 81 82 unset($_returnhtml); 83 unset($_html); 84 } 85 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |