Show a more useful error if no package or update system was found https://sourceforge.net/p/webadmin/bugs/4615/

This commit is contained in:
Jamie Cameron
2015-06-20 22:43:45 -07:00
parent 61322d3ccb
commit d195ccbbf2
2 changed files with 6 additions and 2 deletions

View File

@@ -8,12 +8,14 @@ require './software-lib.pl';
"man", "doc"));
# Validate the package and update systems
$err = &check_package_system();
$err = !defined(&check_package_system) ? $text{'index_echeckpackage'}
: &check_package_system();
if ($err) {
&ui_print_endpage(&text('index_epackagecheck', $err,
"../config.cgi?$module_name"));
}
$err = &check_update_system();
$err = !defined(&check_update_system) ? $text{'index_echeckupdate'}
: &check_update_system();
if ($err) {
&ui_print_endpage(&text('index_eupdatecheck', $err,
"../config.cgi?$module_name"));

View File

@@ -20,6 +20,8 @@ index_epackagecmd=The $1 package system requires the $2 command
index_eupdatecmd=The $1 update system requires the $2 command
index_epackagecheck=The selected package management system is not valid : $1.<br>You may need to select a different system on the <a href='$2'>module configuration</a> page.
index_eupdatecheck=The selected update system is not valid : $1.<br>You may need to select a different update method on the <a href='$2'>module configuration</a> page.
index_echeckpackage=No package system was detected!
index_echeckupdate=No update system was detected!
search_title=Package Search
search_nomatch=No packages matched $1