-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.1.0-dev
-
Fix Version/s: 3.1.0-a1
-
Component/s: Moderator Control Panel (MCP)
-
Labels:None
-
GitHub Pull Request URL:
The success message after soft-deleting a post through the MCP is "POST_DELETED_SUCCESS" instead of the translated string for that key.
The problem results from this line in mcp_main.php:
$success_msg = (sizeof($post_info) == 1) ? 'POST_DELETED_SUCCESS' : 'POSTS_DELETED_SUCCESS';
|
All the functions in mcp_main.php seem to follow this same structure where $success_msg is ultimately used in the following manner:
trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
|
mcp_delete_post() on the other hand expects $success_msg to have the string translated by the time that trigger_error() is called:
trigger_error($success_msg . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>') . '<br /><br />' . implode('<br /><br />', $return_link));
|