diff options
-rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 37 | ||||
-rw-r--r-- | phpBB/install/index.php | 7 | ||||
-rw-r--r-- | phpBB/language/en/common.php | 2 | ||||
-rw-r--r-- | phpBB/language/en/ucp.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/notification/type/approve_post.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/notification/type/approve_topic.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/notification/type/bookmark.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/notification/type/post.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/notification/type/post_in_queue.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/notification/type/quote.php | 4 | ||||
-rw-r--r-- | phpBB/phpbb/notification/type/report_pm.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/notification/type/topic_in_queue.php | 2 |
12 files changed, 24 insertions, 42 deletions
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 85a69a6b0f..f6e9acc8c4 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -195,37 +195,12 @@ class ucp_profile if ($config['require_activation'] == USER_ACTIVATION_ADMIN) { - // Grab an array of user_id's with a_user permissions ... these users can activate a user - $admin_ary = $auth->acl_get_list(false, 'a_user', false); - $admin_ary = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array(); - - // Also include founders - $where_sql = ' WHERE user_type = ' . USER_FOUNDER; - - if (sizeof($admin_ary)) - { - $where_sql .= ' OR ' . $db->sql_in_set('user_id', $admin_ary); - } - - $sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type - FROM ' . USERS_TABLE . ' ' . - $where_sql; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $messenger->template('admin_activate', $row['user_lang']); - $messenger->set_addresses($row); - - $messenger->assign_vars(array( - 'USERNAME' => htmlspecialchars_decode($data['username']), - 'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u={$user->data['user_id']}", - 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user->data['user_id']}&k=$user_actkey") - ); - - $messenger->send($row['user_notify_type']); - } - $db->sql_freeresult($result); + $notifications_manager = $phpbb_container->get('notification_manager'); + $notifications_manager->add_notifications('notification.type.admin_activate_user', array( + 'user_id' => $user->data['user_id'], + 'user_actkey' => $user_actkey, + 'user_regdate' => time(), // Notification time + )); } user_active_flip('deactivate', $user->data['user_id'], INACTIVE_PROFILE); diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 6320b14947..a578e664cd 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -243,6 +243,8 @@ $sub = $request->variable('sub', ''); set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler'); $lang_service = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)); +$lang_service->add_lang($load_lang_files); +$lang_service->set_user_language($language); $user = new \phpbb\user($lang_service, '\phpbb\datetime'); $auth = new \phpbb\auth\auth(); @@ -303,6 +305,11 @@ $template = new \phpbb\template\twig\twig( array($phpbb_container->get('template.twig.extensions.phpbb')) ); +/** @var \phpbb\language\language $lang_service */ +$lang_service = $phpbb_container->get('language'); +$lang_service->add_lang($load_lang_files); +$lang_service->set_user_language($language); + $paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style'); $paths = array_filter($paths, 'is_dir'); $template->set_custom_style(array( diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index a0dda19df9..20458dd3c1 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -472,7 +472,7 @@ $lang = array_merge($lang, array( 'NOTIFICATION_TOPIC_DISAPPROVED' => '<strong>Topic disapproved</strong>:', 'NOTIFICATION_TOPIC_IN_QUEUE' => '<strong>Topic approval</strong> request by %1$s:', 'NOTIFICATION_TYPE_NOT_EXIST' => 'The notification type "%s" is missing from the file system.', - 'NOTIFICATION_ADMIN_ACTIVATE_USER' => '<strong>Activation required</strong> for newly registered user: ā%1$sā', + 'NOTIFICATION_ADMIN_ACTIVATE_USER' => '<strong>Activation required</strong> for deactivated or newly registered user: ā%1$sā', // Used in conjuction with NOTIFICATION_BOOKMARK and NOTIFICATION_POST. 'NOTIFICATION_MANY_OTHERS' => 'others', 'NOTIFICATION_X_OTHERS' => array( diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index b346051108..6063f71d98 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -340,7 +340,7 @@ $lang = array_merge($lang, array( 'NOTIFICATION_TYPE_QUOTE' => 'Someone quotes you in a post', 'NOTIFICATION_TYPE_REPORT' => 'Someone reports a post', 'NOTIFICATION_TYPE_TOPIC' => 'Someone creates a topic in a forum to which you are subscribed', - 'NOTIFICATION_TYPE_ADMIN_ACTIVATE_USER' => 'Newly registered user requiring activation', + 'NOTIFICATION_TYPE_ADMIN_ACTIVATE_USER' => 'User requiring activation', 'NOTIFY_METHOD' => 'Notification method', 'NOTIFY_METHOD_BOTH' => 'Both', diff --git a/phpBB/phpbb/notification/type/approve_post.php b/phpBB/phpbb/notification/type/approve_post.php index 9666647bd8..e4b111e4da 100644 --- a/phpBB/phpbb/notification/type/approve_post.php +++ b/phpBB/phpbb/notification/type/approve_post.php @@ -82,7 +82,7 @@ class approve_post extends \phpbb\notification\type\post $users[$post['poster_id']] = $this->notification_manager->get_default_methods(); return $this->get_authorised_recipients(array_keys($users), $post['forum_id'], array_merge($options, array( - 'item_type' => self::$notification_option['id'], + 'item_type' => static::$notification_option['id'], ))); } diff --git a/phpBB/phpbb/notification/type/approve_topic.php b/phpBB/phpbb/notification/type/approve_topic.php index e9f4c32852..f8a3fdec6f 100644 --- a/phpBB/phpbb/notification/type/approve_topic.php +++ b/phpBB/phpbb/notification/type/approve_topic.php @@ -82,7 +82,7 @@ class approve_topic extends \phpbb\notification\type\topic $users[$post['poster_id']] = $this->notification_manager->get_default_methods(); return $this->get_authorised_recipients(array_keys($users), $post['forum_id'], array_merge($options, array( - 'item_type' => self::$notification_option['id'], + 'item_type' => static::$notification_option['id'], ))); } diff --git a/phpBB/phpbb/notification/type/bookmark.php b/phpBB/phpbb/notification/type/bookmark.php index 5b3fc3a1f2..ebbb961c57 100644 --- a/phpBB/phpbb/notification/type/bookmark.php +++ b/phpBB/phpbb/notification/type/bookmark.php @@ -92,7 +92,7 @@ class bookmark extends \phpbb\notification\type\post // Try to find the users who already have been notified about replies and have not read the topic since and just update their notifications $notified_users = $this->notification_manager->get_notified_users($this->get_type(), array( - 'item_parent_id' => self::get_item_parent_id($post), + 'item_parent_id' => static::get_item_parent_id($post), 'read' => 0, )); diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php index f3dd6d531a..b16014ff74 100644 --- a/phpBB/phpbb/notification/type/post.php +++ b/phpBB/phpbb/notification/type/post.php @@ -148,7 +148,7 @@ class post extends \phpbb\notification\type\base // Try to find the users who already have been notified about replies and have not read the topic since and just update their notifications $notified_users = $this->notification_manager->get_notified_users($this->get_type(), array( - 'item_parent_id' => self::get_item_parent_id($post), + 'item_parent_id' => static::get_item_parent_id($post), 'read' => 0, )); diff --git a/phpBB/phpbb/notification/type/post_in_queue.php b/phpBB/phpbb/notification/type/post_in_queue.php index 8b21d77cdd..2d556fc9c8 100644 --- a/phpBB/phpbb/notification/type/post_in_queue.php +++ b/phpBB/phpbb/notification/type/post_in_queue.php @@ -108,7 +108,7 @@ class post_in_queue extends \phpbb\notification\type\post } return $this->check_user_notification_options($auth_read[$post['forum_id']]['f_read'], array_merge($options, array( - 'item_type' => self::$notification_option['id'], + 'item_type' => static::$notification_option['id'], ))); } diff --git a/phpBB/phpbb/notification/type/quote.php b/phpBB/phpbb/notification/type/quote.php index 1cd879579a..2edf37efc7 100644 --- a/phpBB/phpbb/notification/type/quote.php +++ b/phpBB/phpbb/notification/type/quote.php @@ -110,7 +110,7 @@ class quote extends \phpbb\notification\type\post public function update_notifications($post) { $old_notifications = $this->notification_manager->get_notified_users($this->get_type(), array( - 'item_id' => self::get_item_id($post), + 'item_id' => static::get_item_id($post), )); // Find the new users to notify @@ -132,7 +132,7 @@ class quote extends \phpbb\notification\type\post // Remove the necessary notifications if (!empty($remove_notifications)) { - $this->notification_manager->delete_notifications($this->get_type(), self::get_item_id($post), false, $remove_notifications); + $this->notification_manager->delete_notifications($this->get_type(), static::get_item_id($post), false, $remove_notifications); } // return true to continue with the update code in the notifications service (this will update the rest of the notifications) diff --git a/phpBB/phpbb/notification/type/report_pm.php b/phpBB/phpbb/notification/type/report_pm.php index 0f7dce0a68..4be4705d05 100644 --- a/phpBB/phpbb/notification/type/report_pm.php +++ b/phpBB/phpbb/notification/type/report_pm.php @@ -120,7 +120,7 @@ class report_pm extends \phpbb\notification\type\pm } return $this->check_user_notification_options($auth_approve[$post['forum_id']][$this->permission], array_merge($options, array( - 'item_type' => self::$notification_option['id'], + 'item_type' => static::$notification_option['id'], ))); } diff --git a/phpBB/phpbb/notification/type/topic_in_queue.php b/phpBB/phpbb/notification/type/topic_in_queue.php index ad2961525e..2d732b9cd7 100644 --- a/phpBB/phpbb/notification/type/topic_in_queue.php +++ b/phpBB/phpbb/notification/type/topic_in_queue.php @@ -108,7 +108,7 @@ class topic_in_queue extends \phpbb\notification\type\topic } return $this->check_user_notification_options($auth_read[$topic['forum_id']]['f_read'], array_merge($options, array( - 'item_type' => self::$notification_option['id'], + 'item_type' => static::$notification_option['id'], ))); } |