From 0b40a479636c2ee308c11afc8cd04c18b93a80e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 31 May 2016 10:20:18 +0200 Subject: [PATCH] Continued a bit: - added test for required ext-country (needed by user) - fixed mask from previous rewrite - try to set max_execution_time to zero. If this fails and you have it set to e.g. 30 seconds, it is likely that the PHP process aborts with a "time exceeded" message and installation failed --- inc/ajax/ajax_installer.php | 6 ++++++ inc/extensions/user/mode-setup.php | 3 ++- inc/functions.php | 2 +- inc/modules/admin/what-add_tester_user.php | 7 +++++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/inc/ajax/ajax_installer.php b/inc/ajax/ajax_installer.php index d697b58294..77cc42b8f2 100644 --- a/inc/ajax/ajax_installer.php +++ b/inc/ajax/ajax_installer.php @@ -666,6 +666,12 @@ function doAjaxInstallerStepInstallExtensions () { // Make sure ext-sql_patches is first array_unshift($extensions, 'sql_patches'); + // This takes longer + if (ini_set('max_input_time', 0) === FALSE) { + // Something didn't work + logDebugMessage(__FUNCTION__, __LINE__, 'Cannot set max_input_time to 0.'); + } // END - if + // "Walk" through all extensions foreach ($extensions as $key => $ext_name) { // Debug message diff --git a/inc/extensions/user/mode-setup.php b/inc/extensions/user/mode-setup.php index c1d772ad81..d00733f5c6 100644 --- a/inc/extensions/user/mode-setup.php +++ b/inc/extensions/user/mode-setup.php @@ -154,7 +154,8 @@ addAdminMenuSql('user', 'list_refs', 'Referrals anzeigen', 'Mit diesem Menü addAdminMenuSql('user', 'list_links', 'Unbestätigte Mails', 'Mit diesem Menüpunkt können Sie die vom Mitglied nicht bestätigten Mails anzeigen.', 8); addAdminMenuSql('user', 'list_user_cats', 'Kategorien anzeigen', 'Listet die ausgewählten Kategorien eines Mitgliedes auf.', 9); -// Add dependency to ext-other as pool-user requires it +// Add dependency to ext-country/ext-other as pool-user/add_tester_user requires it +addExtensionDependency('country'); addExtensionDependency('other'); // [EOF] diff --git a/inc/functions.php b/inc/functions.php index 07affa858a..0d6c9889ec 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -372,7 +372,7 @@ function generateDereferrerUrl ($url) { // De-refer this URL $url = sprintf( - '{%url=modules.php?module=loader&url=%s&hash=%s&salt=%s%}', + '{%%url=modules.php?module=loader&url=%s&hash=%s&salt=%s%%}', $encodedUrl, encodeHashForCookie($hash), substr($hash, 0, getSaltLength()) diff --git a/inc/modules/admin/what-add_tester_user.php b/inc/modules/admin/what-add_tester_user.php index f8d3ec44b3..588e04a498 100644 --- a/inc/modules/admin/what-add_tester_user.php +++ b/inc/modules/admin/what-add_tester_user.php @@ -43,6 +43,13 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); +// Is ext-country installed? +if (!isExtensionActive('country')) { + // This extension is also required + displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=country%}'); + return; +} // END - if + // Is the form sent or something did go wrong? if (!isNewUserTesterAllowed()) { // No more accounts allowed to create (maximum reached) -- 2.30.2