[ticket/11104] Fixed message prpending issue.

Added a separate variable to keep track to test weather extra
option is added in confirm box before setting the confirm box
message in core.js. Formatted code according to coding guidelines.
Formatted core.js changes according to coding guidelines.

PHPBB3-11104