mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/14159] Hide version info on ACP if we don't have the permission
This also hide a link to an unreachable module (Check phpBB version). We could have simply remove the link to the module, but if the user hasn't the permission to access to the phpBB version check module, I think that he shouldn't view any version information about phpBB. PHPBB3-14159
This commit is contained in:
parent
c166adf3c7
commit
2f4fcee7e8
2 changed files with 25 additions and 11 deletions
|
@ -141,19 +141,24 @@
|
|||
<td>{L_GZIP_COMPRESSION}{L_COLON} </td>
|
||||
<td><strong>{GZIP_COMPRESSION}</strong></td>
|
||||
</tr>
|
||||
<!-- IF S_TOTAL_ORPHAN or S_VERSIONCHECK -->
|
||||
<tr>
|
||||
<!-- IF S_VERSIONCHECK -->
|
||||
<td>{L_BOARD_VERSION}{L_COLON} </td>
|
||||
<td>
|
||||
<strong><a href="{U_VERSIONCHECK}" <!-- IF S_VERSION_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF --> title="{L_MORE_INFORMATION}">{BOARD_VERSION}</a></strong> [ <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a> ]
|
||||
</td>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_TOTAL_ORPHAN -->
|
||||
<td>{L_NUMBER_ORPHAN}{L_COLON} </td>
|
||||
<td><strong>{TOTAL_ORPHAN}</strong></td>
|
||||
<!-- ELSE -->
|
||||
<!-- ENDIF -->
|
||||
<!-- IF not S_TOTAL_ORPHAN or not S_VERSIONCHECK -->
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<!-- ENDIF -->
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -429,6 +429,8 @@ class acp_main
|
|||
));
|
||||
}
|
||||
|
||||
if ($auth->acl_get('a_board'))
|
||||
{
|
||||
$version_helper = $phpbb_container->get('version_helper');
|
||||
try
|
||||
{
|
||||
|
@ -444,6 +446,12 @@ class acp_main
|
|||
'VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== $user->lang('VERSIONCHECK_FAIL')) ? $e->getMessage() : '',
|
||||
));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// We set this template var to true, to not display an outdated version notice.
|
||||
$template->assign_var('S_VERSION_UP_TO_DATE', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notice admin
|
||||
|
@ -553,6 +561,7 @@ class acp_main
|
|||
'U_VERSIONCHECK' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=update&mode=version_check'),
|
||||
'U_VERSIONCHECK_FORCE' => append_sid("{$phpbb_admin_path}index.$phpEx", 'versioncheck_force=1'),
|
||||
|
||||
'S_VERSIONCHECK' => ($auth->acl_get('a_board')) ? true : false,
|
||||
'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false,
|
||||
'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue