Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-11890

Language key used when soft-deleting in MCP.

XMLWordPrintable

      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));

            bantu Andreas Fischer [X] (Inactive)
            prototech prototech [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: