[ticket/12270] Corrent post and topic approval notification message

When you submit a post with needed approval (say user A), and then
it gets approved by another user (user B), a subscribed user (user C)
to that forum would receive a notification indicating:
-A has replied to topic 'New Topic' in the forum 'xyz'.
The expected result would be:
-A has posted a new topic 'New topic' in the forum 'xyz'.
This has fixed by adding a TOPIC_ID template variable to
mcp_post.html and, in there, depending if the first post is the topic's
first post or not, add a input's with name topic_id_list[] or
post_id_list[] and then the respective value (TOPIC_ID or POST_ID).

PHPBB3-12270
[ticket/12270] Correct post&topic approval msg, no template changes

Following the previous commits, this patch removes the changes
done to templates to depend only on code, as suggested by
@nickvergessen.
All previous modifications have been removed, with another one
which checks, in the approve_posts() function, if it is sending a
notification for post approval and it is the first one in the
topic, send notification indicating that the topic has been
approved (and not the post). If not the first post in the topic,
do just as before (send a notification about a newly approved
post).

PHPBB3-12270
[ticket/12270] Reverted templates

Some lines in the templates  were not reverted correctly,
so it's done now.

PHPBB3-12270
[ticket/12270] Correct notifications for posts/topics now working

This patch should finally work correctly: Add the correct
notification for post/topic approval without touching templates.

This has been done by calling the function approve_topics()
inside the approve_posts() function. It's the simplest way for
this to work correctly. There may be a call to the DB but other
ways (if any), without touching templates,  would have been too
messy for a function like this.

PHPBB3-12270
[ticket/12270] Better structured code and no debug error message

A variable (that's not essential) has been removed, two if's
has been merged to an if-else control structure. A variable
named topic_ids_list has been renamed to topic_id_list to follow
the naming standard in that file's code.
Also, the debug error has been fixed by changing the topic data
key 'username' to 'post_username' in the array_merge function
in approve_topics().

PHPBB3-12270
[ticket/12270] Correcting to follow phpBB coding standards

I forgot to put the brackets (so it follows the phpBB coding
standards) and changed "count($topic_id_list) > 0"
to "!empty($topic_id_list)", making the syntax more
comprehensible.

PHPBB3-12270
[ticket/12270] Correct confirm approval message for topics

When clicking on approving a topic's first post in the MCP to
approve the topic itself, the confirm box dialog asks whether
to approve the post or not, instead of asking to approve the
topic.
To achieve this fix, we just need to count the topics to be
approved and check if it's greater than zero.

PHPBB3-12270
[ticket/12270] Fixed rebase conflicts

PHPBB3-12270
[ticket/12270] Fixed tests

PHPBB3-12270
[ticket/12270] No quote notif and double poster notification fix

Since a call was added to self::approve_topic(), the poster would
get double-notified about it (even if it was later marked as read).
Also, when creating a new topic with a quote, it would not be
notified, this has also been fixed.

PHPBB3-12270
[ticket/12270] Fixed tests not working

The success message wasn't output correctly if we were approving
topics.

PHPBB3-12270
[ticket/12270] Fixed topic counting bug and tests

Topics was not correctly counted (the counter didn't count topics
that were re-approved, for example, but only the ones that were
unapproved.
This should also fix the test that wasn't working correctly.

PHPBB3-12270
Merge pull request #2134 from marcosbc/ticket/12270

[ticket/12270] Current post and topic approval notification message

* marcosbc/ticket/12270:
  [ticket/12270] Fixed topic counting bug and tests
  [ticket/12270] Fixed tests not working
  [ticket/12270] No quote notif and double poster notification fix
  [ticket/12270] Fixed tests
  [ticket/12270] Fixed rebase conflicts
  [ticket/12270] Correct confirm approval message for topics
  [ticket/12270] Correcting to follow phpBB coding standards
  [ticket/12270] Better structured code and no debug error message
  [ticket/12270] Correct notifications for posts/topics now working
  [ticket/12270] Reverted templates
  [ticket/12270] Correct post&topic approval msg, no template changes
  [ticket/12270] Corrent post and topic approval notification message