mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/16345] Small improvements
PHPBB3-16346
This commit is contained in:
@@ -70,8 +70,6 @@ class manager
|
||||
* @param \phpbb\user $user
|
||||
* @param string $notification_types_table
|
||||
* @param string $user_notifications_table
|
||||
*
|
||||
* @return \phpbb\notification\manager
|
||||
*/
|
||||
public function __construct($notification_types, $notification_methods, ContainerInterface $phpbb_container, \phpbb\user_loader $user_loader, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\db\driver\driver_interface $db, \phpbb\cache\service $cache, \phpbb\language\language $language, \phpbb\user $user, $notification_types_table, $user_notifications_table)
|
||||
{
|
||||
@@ -919,6 +917,8 @@ class manager
|
||||
*/
|
||||
public function get_notification_type_id($notification_type_name)
|
||||
{
|
||||
$notification_type_ids = [];
|
||||
|
||||
$sql = 'SELECT notification_type_id, notification_type_name
|
||||
FROM ' . $this->notification_types_table;
|
||||
$result = $this->db->sql_query($sql, 604800); // cache for one week
|
||||
|
@@ -69,7 +69,7 @@ class email extends \phpbb\notification\method\messenger_base
|
||||
* Is this method available for the user?
|
||||
* This is checked on the notifications options
|
||||
*
|
||||
* @param type_interface $notification_type An optional instance of a notification type. If provided, this
|
||||
* @param type_interface|null $notification_type An optional instance of a notification type. If provided, this
|
||||
* method additionally checks if the type provides an email template.
|
||||
* @return bool
|
||||
*/
|
||||
|
@@ -59,7 +59,7 @@ class jabber extends \phpbb\notification\method\messenger_base
|
||||
* Is this method available for the user?
|
||||
* This is checked on the notifications options
|
||||
*
|
||||
* @param type_interface $notification_type An optional instance of a notification type. If provided, this
|
||||
* @param type_interface|null $notification_type An optional instance of a notification type. If provided, this
|
||||
* method additionally checks if the type provides an email template.
|
||||
* @return bool
|
||||
*/
|
||||
|
@@ -48,7 +48,7 @@ abstract class messenger_base extends \phpbb\notification\method\base
|
||||
* Is this method available for the user?
|
||||
* This is checked on the notifications options
|
||||
*
|
||||
* @param type_interface $notification_type An optional instance of a notification type. This method returns false
|
||||
* @param type_interface|null $notification_type An optional instance of a notification type. This method returns false
|
||||
* only if the type is provided and if it doesn't provide an email template.
|
||||
* @return bool
|
||||
*/
|
||||
@@ -73,7 +73,7 @@ abstract class messenger_base extends \phpbb\notification\method\base
|
||||
}
|
||||
|
||||
// Load all users we want to notify (we need their email address)
|
||||
$user_ids = $users = array();
|
||||
$user_ids = array();
|
||||
foreach ($this->queue as $notification)
|
||||
{
|
||||
$user_ids[] = $notification->user_id;
|
||||
|
@@ -175,7 +175,6 @@ abstract class base implements \phpbb\notification\type\type_interface
|
||||
*
|
||||
* @param string $name Name of the variable to set
|
||||
* @param mixed $value Value to set to the variable
|
||||
* @return mixed
|
||||
*/
|
||||
protected function set_data($name, $value)
|
||||
{
|
||||
|
Reference in New Issue
Block a user