From 5a5f0786572f743f44b9c39bbdc61a8ebf555702 Mon Sep 17 00:00:00 2001 From: pertneer Date: Wed, 21 Nov 2012 23:56:01 -0600 Subject: [PATCH 1/2] If Automod is installed, Show link after uninstall is complete --- umil/root/umil/language/en/umil.php | 2 ++ umil/root/umil/style/index_body.html | 7 +++++++ umil/root/umil/umil_frontend.php | 13 ++++++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/umil/root/umil/language/en/umil.php b/umil/root/umil/language/en/umil.php index 3b12969..b1bcf20 100644 --- a/umil/root/umil/language/en/umil.php +++ b/umil/root/umil/language/en/umil.php @@ -42,6 +42,7 @@ 'ACTION' => 'Action', 'ADVANCED' => 'Advanced', 'AUTH_CACHE_PURGE' => 'Purging the Auth Cache', + 'AUTOMOD' => 'Automod', 'CACHE_PURGE' => 'Purging your forum’s cache', 'CONFIGURE' => 'Configure', @@ -51,6 +52,7 @@ 'CONFIG_REMOVE' => 'Removing config variable: %s', 'CONFIG_UPDATE' => 'Updating config variable: %s', + 'DISPLAY_AUTOMOD_LINK' => 'This is only part of the uninstall process, to completely uninstall %3$s proceed to %2$s', 'DISPLAY_RESULTS' => 'Display Full Results', 'DISPLAY_RESULTS_EXPLAIN' => 'Select yes to display all of the actions and results during the requested action.', diff --git a/umil/root/umil/style/index_body.html b/umil/root/umil/style/index_body.html index c91492c..2560dfb 100644 --- a/umil/root/umil/style/index_body.html +++ b/umil/root/umil/style/index_body.html @@ -83,6 +83,13 @@

{L_WARNING}

+ +
+

{L_SUCCESS}

+

{U_AUTOMOD_LINK}

+
+ +
diff --git a/umil/root/umil/umil_frontend.php b/umil/root/umil/umil_frontend.php index ee9102b..6624fea 100644 --- a/umil/root/umil/umil_frontend.php +++ b/umil/root/umil/umil_frontend.php @@ -306,7 +306,14 @@ function display_results($command = '', $result = '') */ function done() { - global $phpbb_root_path, $phpEx, $template, $user; + global $phpbb_root_path, $phpEx, $template, $user, $config; + + //Are we uninstalling? Then show the link to automod + $uninstall_results = false; + if(request_var('action', '') == 'uninstall' && isset($config['automod_version'])) + { + $uninstall_results = true; + } $download_file = ($this->error_file) ? append_sid("{$phpbb_root_path}umil/file.$phpEx", 'file=' . basename($this->error_file, '.txt')) : ''; $filename = ($this->error_file) ? 'umil/error_files/' . basename($this->error_file) : ''; @@ -320,6 +327,10 @@ function done() 'S_RESULTS' => $this->results, 'S_SUCCESS' => ($this->errors) ? false : true, 'S_PERMISSIONS' => $this->permissions_added, + + 'S_UNINSTALL_SUCCESS' => $uninstall_results, + 'U_AUTOMOD_LINK' => sprintf($user->lang['DISPLAY_AUTOMOD_LINK'], append_sid("{$phpbb_root_path}adm/index.$phpEx", 'i=mods&mode=frontend', true, $user->session_id), $user->lang['AUTOMOD'], $this->title), + )); page_footer(); From 062f0e572967282f96f996e53a0fba9a99d61469 Mon Sep 17 00:00:00 2001 From: pertneer Date: Thu, 22 Nov 2012 20:04:24 -0600 Subject: [PATCH 2/2] Address proper Capitalization of AutoMOD --- umil/root/umil/language/en/umil.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umil/root/umil/language/en/umil.php b/umil/root/umil/language/en/umil.php index b1bcf20..1ce0f31 100644 --- a/umil/root/umil/language/en/umil.php +++ b/umil/root/umil/language/en/umil.php @@ -42,7 +42,7 @@ 'ACTION' => 'Action', 'ADVANCED' => 'Advanced', 'AUTH_CACHE_PURGE' => 'Purging the Auth Cache', - 'AUTOMOD' => 'Automod', + 'AUTOMOD' => 'AutoMOD', 'CACHE_PURGE' => 'Purging your forum’s cache', 'CONFIGURE' => 'Configure',