1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-13 20:28:44 +01:00

[ticket/12201] Add link to resync file stats after error.

PHPBB3-12201
This commit is contained in:
Cesar G 2014-04-15 14:19:47 -07:00
parent 52251acefa
commit b73e22ae71
3 changed files with 15 additions and 14 deletions

View File

@ -1115,11 +1115,6 @@ class acp_attachments
if ($stats_error)
{
$error[] = $stats_error;
// Show option to resync stats
$this->template->assign_vars(array(
'S_ACTION_OPTIONS' => $auth->acl_get('a_board'),
));
}
$template->assign_vars(array(
@ -1321,7 +1316,15 @@ class acp_attachments
if (($num_files != $stats['num_files']) || ($total_size != $stats['upload_dir_size']))
{
return $this->user->lang('FILES_STATS_WRONG', (int) $stats['num_files'], get_formatted_filesize($stats['upload_dir_size']));
$u_resync = $this->u_action . '&action=stats';
return $this->user->lang(
'FILES_STATS_WRONG',
(int) $stats['num_files'],
get_formatted_filesize($stats['upload_dir_size']),
'<a href="' . $u_resync . '">',
'</a>'
);
}
return false;
}

View File

@ -107,6 +107,9 @@ $lang = array_merge($lang, array(
'EXT_GROUP_REAL_MEDIA' => 'Real Media',
'EXT_GROUP_WINDOWS_MEDIA' => 'Windows Media',
'FILES_GONE' => 'Some of the attachments you selected for deletion do not exist. They may have been already deleted. Attachments that did exist were deleted.',
'FILES_STATS_WRONG' => 'Your file statistics are likely inaccurate and need to be resynchronised. Actual values: number of attachments = %1$d, total size of attachments = %2$s.<br />Click %3$shere%4$s to resynchronise them.',
'GO_TO_EXTENSIONS' => 'Go to extension management screen',
'GROUP_NAME' => 'Group name',
@ -144,8 +147,9 @@ $lang = array_merge($lang, array(
'ORDER_ALLOW_DENY' => 'Allow',
'ORDER_DENY_ALLOW' => 'Deny',
'REMOVE_ALLOWED_IPS' => 'Remove or un-exclude <em>allowed</em> IPs/hostnames',
'REMOVE_DISALLOWED_IPS' => 'Remove or un-exclude <em>disallowed</em> IPs/hostnames',
'REMOVE_ALLOWED_IPS' => 'Remove or un-exclude <em>allowed</em> IPs/hostnames',
'REMOVE_DISALLOWED_IPS' => 'Remove or un-exclude <em>disallowed</em> IPs/hostnames',
'RESYNC_FILES_STATS_CONFIRM' => 'Are you sure you wish to resynchronise file statistics?',
'SEARCH_IMAGICK' => 'Search for Imagemagick',
'SECURE_ALLOW_DENY' => 'Allow/Deny list',

View File

@ -241,9 +241,6 @@ $lang = array_merge($lang, array(
'EXPORT_DOWNLOAD' => 'Download',
'EXPORT_STORE' => 'Store',
'FILES_GONE' => 'Some of the attachments you selected for deletion do not exist. They may have been already deleted. Attachments that did exist were deleted.',
'FILES_STATS_WRONG' => 'Your file statistics are likely inaccurate and need to be resynchronised. Actual values: number of attachments = %1$d, total size of attachments = %2$s.',
'GENERAL_OPTIONS' => 'General options',
'GENERAL_SETTINGS' => 'General settings',
'GLOBAL_MASK' => 'Global permission mask',
@ -286,8 +283,6 @@ $lang = array_merge($lang, array(
'REMIND' => 'Remind',
'RESYNC' => 'Resynchronise',
'RESYNC_FILES_STATS' => 'Resynchronise file statistics',
'RESYNC_FILES_STATS_EXPLAIN' => 'Recalculates the total number and size of files attached to posts and private messages.',
'SELECT_ANONYMOUS' => 'Select anonymous user',
'SELECT_OPTION' => 'Select option',
@ -388,7 +383,6 @@ $lang = array_merge($lang, array(
'RESET_ONLINE' => 'Reset most users ever online',
'RESET_ONLINE_CONFIRM' => 'Are you sure you wish to reset the most users ever online counter?',
'RESET_ONLINE_SUCCESS' => 'Most users ever online reset',
'RESYNC_FILES_STATS_CONFIRM' => 'Are you sure you wish to resynchronise file statistics?',
'RESYNC_POSTCOUNTS' => 'Resynchronise post counts',
'RESYNC_POSTCOUNTS_EXPLAIN' => 'Only existing posts will be taken into consideration. Pruned posts will not be counted.',
'RESYNC_POSTCOUNTS_CONFIRM' => 'Are you sure you wish to resynchronise post counts?',