Skip to content
This repository was archived by the owner on Jun 1, 2024. It is now read-only.

If Automod is installed, Show link after uninstall is complete #24

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions umil/root/umil/language/en/umil.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
'ACTION' => 'Action',
'ADVANCED' => 'Advanced',
'AUTH_CACHE_PURGE' => 'Purging the Auth Cache',
'AUTOMOD' => 'Automod',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be "AutoMOD"


'CACHE_PURGE' => 'Purging your forum’s cache',
'CONFIGURE' => 'Configure',
Expand All @@ -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 <a href="%1$s">%2$s</a>',
'DISPLAY_RESULTS' => 'Display Full Results',
'DISPLAY_RESULTS_EXPLAIN' => 'Select yes to display all of the actions and results during the requested action.',

Expand Down
7 changes: 7 additions & 0 deletions umil/root/umil/style/index_body.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ <h3>{L_WARNING}</h3>
<!-- ENDIF -->

<!-- IF .results -->
<!-- IF S_UNINSTALL_SUCCESS -->
<div class="successbox">
<h3>{L_SUCCESS}</h3>
<p>{U_AUTOMOD_LINK}</p>
</div>
<!-- ENDIF -->

<fieldset>
<legend></legend>
<!-- BEGIN results -->
Expand Down
13 changes: 12 additions & 1 deletion umil/root/umil/umil_frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) : '';
Expand All @@ -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();
Expand Down