diff --git a/README.md b/README.md index 1faf2d1..18b7642 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ To install the extension you have to do the following steps: ## Requirements * php 5.3.3 or newer -* phpBB 3.1.* +* phpBB 3.1.* or newer ## External links [phpBB extension database](https://www.phpbb.com/customise/db/extension/pmnamesuggestions/ "Show extension entry on phpBB.com") diff --git a/pcgf/pmnamesuggestions/acp/pmnamesuggestions_info.php b/pcgf/pmnamesuggestions/acp/pmnamesuggestions_info.php index 4694138..f07bd41 100644 --- a/pcgf/pmnamesuggestions/acp/pmnamesuggestions_info.php +++ b/pcgf/pmnamesuggestions/acp/pmnamesuggestions_info.php @@ -8,7 +8,7 @@ namespace pcgf\pmnamesuggestions\acp; -/** @version 1.1.0 */ +/** @version 1.1.1 */ class pmnamesuggestions_info { /** @@ -23,7 +23,6 @@ public function module() return array( 'filename' => '\pcgf\pmnamesuggestions\acp\pmnamesuggestions_module', 'title' => 'ACP_PCGF_PMNAMESUGGESTIONS', - 'version' => '1.1.0', 'modes' => array( 'settings' => array( 'title' => 'ACP_PCGF_PMNAMESUGGESTIONS', diff --git a/pcgf/pmnamesuggestions/acp/pmnamesuggestions_module.php b/pcgf/pmnamesuggestions/acp/pmnamesuggestions_module.php index a75a9b4..afb7bd4 100644 --- a/pcgf/pmnamesuggestions/acp/pmnamesuggestions_module.php +++ b/pcgf/pmnamesuggestions/acp/pmnamesuggestions_module.php @@ -27,9 +27,7 @@ class pmnamesuggestions_module * @since 1.1.0 * * @param int $id The module id - * @param string $mode The mode the module is beeing called with - * - * @return null + * @param string $mode The mode the module is being called with */ public function main($id, $mode) { diff --git a/pcgf/pmnamesuggestions/composer.json b/pcgf/pmnamesuggestions/composer.json index 7e6b061..4145ac9 100644 --- a/pcgf/pmnamesuggestions/composer.json +++ b/pcgf/pmnamesuggestions/composer.json @@ -3,8 +3,8 @@ "type": "phpbb-extension", "description": "An extension that suggests usernames when selecting a recipient of a private message", "homepage": "https://github.com/MarkusWME/phpBB---PM-Name-Suggestions", - "version": "1.1.0", - "time": "2016-12-11", + "version": "1.1.1", + "time": "2017-01-27", "keywords": ["pm", "private message", "recipient", "username", "suggestion"], "license": "GPL-2.0", "authors": [ diff --git a/pcgf/pmnamesuggestions/config/services.yml b/pcgf/pmnamesuggestions/config/services.yml index c042968..df76985 100644 --- a/pcgf/pmnamesuggestions/config/services.yml +++ b/pcgf/pmnamesuggestions/config/services.yml @@ -2,17 +2,17 @@ services: pcgf.pmnamesuggestions.listener: class: pcgf\pmnamesuggestions\event\listener arguments: - - @template - - @controller.helper - - @config + - '@template' + - '@controller.helper' + - '@config' tags: - { name: event.listener } pcgf.pmnamesuggestions.controller: class: pcgf\pmnamesuggestions\controller\controller arguments: - - @request - - @dbal.conn - - @auth - - @user - - @config - - %core.root_path% \ No newline at end of file + - '@request' + - '@dbal.conn' + - '@auth' + - '@user' + - '@config' + - '%core.root_path%' \ No newline at end of file diff --git a/pcgf/pmnamesuggestions/controller/controller.php b/pcgf/pmnamesuggestions/controller/controller.php index 5156e3d..6c5ddd0 100644 --- a/pcgf/pmnamesuggestions/controller/controller.php +++ b/pcgf/pmnamesuggestions/controller/controller.php @@ -8,24 +8,29 @@ namespace pcgf\pmnamesuggestions\controller; -use Symfony\Component\HttpFoundation\Response; +use phpbb\auth\auth; +use phpbb\config\config; +use phpbb\db\driver\factory; +use phpbb\json_response; +use phpbb\request\request; +use phpbb\user; -/** @version 1.1.0 */ +/** @version 1.1.1 */ class controller { - /** @var \phpbb\request\request $request Request object */ + /** @var request $request Request object */ protected $request; - /** @var \phpbb\db\driver\factory $db Database object */ + /** @var factory $db Database object */ protected $db; - /** @var \phpbb\auth\auth $auth Authenticator object */ + /** @var auth $auth Authenticator object */ protected $auth; - /** @var \phpbb\user $user User object */ + /** @var user $user User object */ protected $user; - /** @var \phpbb\config\config $config Configuration object */ + /** @var config $config Configuration object */ protected $config; /** @var string $phpbb_root_path The forum root path */ @@ -37,16 +42,14 @@ class controller * @access public * @since 1.0.0 * - * @param \phpbb\request\request\ $request Request object - * @param \phpbb\db\driver\factory $db Database object - * @param \phpbb\auth\auth $auth Authenticator object - * @param \phpbb\user $user User object - * @param \phpbb\config\config $config Configuration object - * @param string $phpbb_root_path The forum root path - * - * @return \pcgf\pmnamesuggestions\controller\controller The controller object of the extension + * @param request $request Request object + * @param factory $db Database object + * @param auth $auth Authenticator object + * @param user $user User object + * @param config $config Configuration object + * @param string $phpbb_root_path The forum root path */ - public function __construct(\phpbb\request\request $request, \phpbb\db\driver\factory $db, \phpbb\auth\auth $auth, \phpbb\user $user, \phpbb\config\config $config, $phpbb_root_path) + public function __construct(request $request, factory $db, auth $auth, user $user, config $config, $phpbb_root_path) { $this->request = $request; $this->db = $db; @@ -61,11 +64,10 @@ public function __construct(\phpbb\request\request $request, \phpbb\db\driver\fa * * @access public * @since 1.0.0 - * @return null */ public function getNameSuggestions() { - $response = new \phpbb\json_response(); + $response = new json_response(); $users = array(); // Only allow JSON requests if ($this->request->is_ajax()) diff --git a/pcgf/pmnamesuggestions/event/listener.php b/pcgf/pmnamesuggestions/event/listener.php index b78be6f..e8eae4f 100644 --- a/pcgf/pmnamesuggestions/event/listener.php +++ b/pcgf/pmnamesuggestions/event/listener.php @@ -8,18 +8,21 @@ namespace pcgf\pmnamesuggestions\event; +use phpbb\config\config; +use phpbb\controller\helper; +use phpbb\template\template; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -/** @version 1.1.0 */ +/** @version 1.1.1 */ class listener implements EventSubscriberInterface { - /** @var \phpbb\template\template $template Template object */ + /** @var template $template Template object */ protected $template; - /** @var \phpbb\controller\helper $helper Helper object */ + /** @var helper $helper Helper object */ protected $helper; - /** @var \phpbb\config\config $config Configuration object */ + /** @var config $config Configuration object */ protected $config; /** @@ -28,13 +31,11 @@ class listener implements EventSubscriberInterface * @access public * @since 1.0.0 * - * @param \phpbb\template\template $template Template object - * @param \phpbb\controller\helper $helper Helper object - * @param \phpbb\config\config $config Configuration object - * - * @return \pcgf\pmnamesuggestions\event\listener The listener object of the extension + * @param template $template Template object + * @param helper $helper Helper object + * @param config $config Configuration object */ - public function __construct(\phpbb\template\template $template, \phpbb\controller\helper $helper, \phpbb\config\config $config) + public function __construct(template $template, helper $helper, config $config) { $this->template = $template; $this->helper = $helper; @@ -60,14 +61,13 @@ static public function getSubscribedEvents() * * @access public * @since 1.0.0 - * @return null */ - public function add_pmnamesuggestion_css($event) + public function add_pmnamesuggestion_css() { $this->template->assign_vars(array( 'PM_NAME_SUGGESTIONS' => true, 'PCGF_PM_NAME_SUGGESTION_URL' => $this->helper->route('pcgf_pmnamesuggestions_controller'), - 'PCGF_PM_NAME_SOGGESTION_IMAGE_SIZE' => $this->config['pcgf_pmnamesuggestions_avatar_image_size'], + 'PCGF_PM_NAME_SUGGESTION_IMAGE_SIZE' => $this->config['pcgf_pmnamesuggestions_avatar_image_size'], )); } } diff --git a/pcgf/pmnamesuggestions/styles/all/template/event/posting_pm_layout_include_pm_header_after.html b/pcgf/pmnamesuggestions/styles/all/template/event/posting_pm_layout_include_pm_header_after.html index 4ef8d08..b8efcf4 100644 --- a/pcgf/pmnamesuggestions/styles/all/template/event/posting_pm_layout_include_pm_header_after.html +++ b/pcgf/pmnamesuggestions/styles/all/template/event/posting_pm_layout_include_pm_header_after.html @@ -1,6 +1,6 @@
\ No newline at end of file