diff options
| -rw-r--r-- | admin_users.php | 4 | ||||
| -rw-r--r-- | includes/functions/functions_db.php | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/admin_users.php b/admin_users.php index 7517f58e53..aec8887719 100644 --- a/admin_users.php +++ b/admin_users.php @@ -199,7 +199,9 @@ if ($action=='createuser' || $action=='edituser2') { } } else { print_header(WT_I18N::translate('User administration')); -// if ($ENABLE_AUTOCOMPLETE) require WT_ROOT.'js/autocomplete.js.htm'; Removed becasue it doesn't work here for multiple GEDCOMs. Can be reinstated when fixed (https://bugs.launchpad.net/webtrees/+bug/613235) + if (get_gedcom_count()==1) { //Removed becasue it doesn't work here for multiple GEDCOMs. Can be reinstated when fixed (https://bugs.launchpad.net/webtrees/+bug/613235) + if ($ENABLE_AUTOCOMPLETE) require WT_ROOT.'js/autocomplete.js.htm'; + } } // Print the form to edit a user diff --git a/includes/functions/functions_db.php b/includes/functions/functions_db.php index 6bf59b717e..f34c7e6755 100644 --- a/includes/functions/functions_db.php +++ b/includes/functions/functions_db.php @@ -2053,6 +2053,12 @@ function get_all_gedcoms() { ->fetchAssoc(); } +function get_gedcom_count() { + return + WT_DB::prepare("SELECT COUNT(*) FROM `##gedcom` WHERE gedcom_id>0") + ->fetchOne(); +} + function get_gedcom_titles() { return WT_DB::prepare( |
