From 0f42a747b5145329e2d777e7bc5c47ea6f800e90 Mon Sep 17 00:00:00 2001 From: ramonn <noreply@pandorafms.org> Date: Thu, 27 May 2010 13:55:24 +0000 Subject: [PATCH] 2010-05-27 Ramon Novoa <rnovoa@artica.es> * extensions/update_manager/main.php: Show an error instead of 'updating...' if a non-enterprise user tries to update. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2810 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ .../extensions/update_manager/main.php | 18 +++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 59824a3de1..c13fcbfc1c 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-05-27 Ramon Novoa <rnovoa@artica.es> + + * extensions/update_manager/main.php: Show an error instead of + 'updating...' if a non-enterprise user tries to update. + 2010-05-27 Ramon Novoa <rnovoa@artica.es> * include/fgraph.php: Improved the speed of chart drawing algorithms. diff --git a/pandora_console/extensions/update_manager/main.php b/pandora_console/extensions/update_manager/main.php index c2fb464c30..bd7808f287 100644 --- a/pandora_console/extensions/update_manager/main.php +++ b/pandora_console/extensions/update_manager/main.php @@ -40,13 +40,17 @@ $user_key = get_user_key ($settings); $update_package = (bool) get_parameter_post ('update_package'); if ($update_package) { - echo '<h2>'.__('Updating').'...</h2>'; - flush (); - $force = (bool) get_parameter_post ('force_update'); - - um_client_upgrade_to_latest ($user_key, $force); - /* TODO: Add a new in tnews */ - $settings = um_db_load_settings (); + if ($config['enterprise_installed'] == 1) { + echo '<h2>'.__('Updating').'...</h2>'; + flush (); + $force = (bool) get_parameter_post ('force_update'); + + um_client_upgrade_to_latest ($user_key, $force); + /* TODO: Add a new in tnews */ + $settings = um_db_load_settings (); + } else { + echo '<h5 class="error">' . __('This is an Enterprise feature. Visit %s for more information.', '<a href="http://pandorafms.com">http://pandorafms.com</a>') . '</h5>'; + } } $package = um_client_check_latest_update ($settings, $user_key);