Skip to content

Commit 0bf4bdc

Browse files
committed
Convert to twig, bump version/date and remote add_lang_ext
1 parent 7922b18 commit 0bf4bdc

File tree

5 files changed

+27
-22
lines changed

5 files changed

+27
-22
lines changed

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"type": "phpbb-extension",
44
"description": "Adds messages into viewtopic when a topic was moved.",
55
"homepage": "https://github.com/phpbb-de/phpbb-ext-movemessage",
6-
"version": "1.0.0",
7-
"time": "2015-04-29",
8-
"license": "GPL-2.0",
6+
"version": "1.1.0",
7+
"time": "2020-01-18",
8+
"license": "GPL-2.0-only",
99
"authors": [
1010
{
1111
"name": "Joas Schilling",
@@ -21,16 +21,16 @@
2121
}
2222
],
2323
"require": {
24-
"php": ">=5.3.3"
24+
"php": ">=5.4.7"
2525
},
2626
"require-dev": {
2727
"phpbb/epv": "dev-master",
28-
"phpbb/translation-validator": "1.3.*"
28+
"phpbb/translation-validator": "1.5.*"
2929
},
3030
"extra": {
3131
"display-name": "phpBB.de - Move Message",
3232
"soft-require": {
33-
"phpbb/phpbb": "3.1.*@dev"
33+
"phpbb/phpbb": ">=3.2.8"
3434
}
3535
}
3636
}

config/services.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ services:
22
phpbbde.movemessage.listener:
33
class: phpbbde\movemessage\event\main_listener
44
arguments:
5-
- @auth
6-
- @content.visibility
7-
- @dbal.conn
8-
- @template
9-
- @user
10-
- %core.root_path%
11-
- %core.php_ext%
5+
- '@auth'
6+
- '@content.visibility'
7+
- '@dbal.conn'
8+
- '@template'
9+
- '@user'
10+
- '%core.root_path%'
11+
- '%core.php_ext%'
1212
tags:
13-
- { name: event.listener }
13+
- {name: event.listener}

event/main_listener.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ static public function getSubscribedEvents()
5858
/** @var \phpbb\template\template */
5959
protected $template;
6060

61+
/** @var \phpbb\language\language $language */
62+
protected $language;
63+
6164
/** @var \phpbb\user */
6265
protected $user;
6366

@@ -68,16 +71,18 @@ static public function getSubscribedEvents()
6871
* @param \phpbb\content_visibility $content_visibility
6972
* @param \phpbb\db\driver\driver_interface $db
7073
* @param \phpbb\template\template $template
74+
* @param \phpbb\language\language $language
7175
* @param \phpbb\user $user
7276
* @param string $phpbb_root_path
7377
* @param string $phpEx
7478
*/
75-
public function __construct(\phpbb\auth\auth $auth, \phpbb\content_visibility $content_visibility, \phpbb\db\driver\driver_interface $db, \phpbb\template\template $template, \phpbb\user $user, $phpbb_root_path, $phpEx)
79+
public function __construct(\phpbb\auth\auth $auth, \phpbb\content_visibility $content_visibility, \phpbb\db\driver\driver_interface $db, \phpbb\template\template $template, \phpbb\language\language $language, \phpbb\user $user, $phpbb_root_path, $phpEx)
7680
{
7781
$this->auth = $auth;
7882
$this->content_visibility = $content_visibility;
7983
$this->db = $db;
8084
$this->template = $template;
85+
$this->language = $language;
8186
$this->user = $user;
8287
$this->root_path = $phpbb_root_path;
8388
$this->php_ext = $phpEx;
@@ -135,7 +140,7 @@ public function load_move_message_data($event)
135140

136141
if (!empty($this->move_messages))
137142
{
138-
$this->user->add_lang_ext('phpbbde/movemessage', 'movemessage');
143+
$this->language->add_lang('movemessage', 'phpbbde/movemessage');
139144
}
140145
}
141146

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<!-- BEGIN postrow.post_message_after -->
1+
{% for post_message_after in postrow.post_message_after %}
22
<div class="panel">
3-
<div class="inner">{postrow.post_message_after.MESSAGE}</div>
3+
<div class="inner">{{ post_message_after.MESSAGE }}</div>
44
</div>
55

66
<hr class="divider" />
7-
<!-- END postrow.post_message_after -->
7+
{% endfor %}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<!-- BEGIN postrow.post_message_before -->
1+
{% for post_message_before in postrow.post_message_before %}
22
<div class="panel">
3-
<div class="inner">{postrow.post_message_before.MESSAGE}</div>
3+
<div class="inner">{{ post_message_before.MESSAGE }}</div>
44
</div>
55

66
<hr class="divider" />
7-
<!-- END postrow.post_message_before -->
7+
{% endfor %}

0 commit comments

Comments
 (0)