@@ -106,9 +106,9 @@ |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
109 | - * Delete logs |
|
110 | - * @param array $mark Logs selected for deletion |
|
111 | - **/ |
|
109 | + * Delete logs |
|
110 | + * @param array $mark Logs selected for deletion |
|
111 | + **/ |
|
112 | 112 | public function delete_logs($mark) |
113 | 113 | { |
114 | 114 | $sql = 'DELETE FROM ' . $this->log_table . ' WHERE ' . $this->db->sql_in_set('log_id', $mark); |
@@ -17,12 +17,12 @@ discard block |
||
17 | 17 | private $phpbb_db; |
18 | 18 | |
19 | 19 | /** |
20 | - * cache constructor. |
|
21 | - * @param \phpbb\cache\service $cache |
|
22 | - * @param \phpbb\db\driver\driver_interface $db |
|
23 | - * @param $albums_table |
|
24 | - * @param $images_table |
|
25 | - */ |
|
20 | + * cache constructor. |
|
21 | + * @param \phpbb\cache\service $cache |
|
22 | + * @param \phpbb\db\driver\driver_interface $db |
|
23 | + * @param $albums_table |
|
24 | + * @param $images_table |
|
25 | + */ |
|
26 | 26 | public function __construct(\phpbb\cache\service $cache, \phpbb\db\driver\driver_interface $db, |
27 | 27 | $albums_table, $images_table) |
28 | 28 | { |
@@ -153,18 +153,18 @@ discard block |
||
153 | 153 | } |
154 | 154 | |
155 | 155 | /** |
156 | - * Destroy images cache - if we had updated image information or we want other set - we will have to destroy cache |
|
157 | - */ |
|
156 | + * Destroy images cache - if we had updated image information or we want other set - we will have to destroy cache |
|
157 | + */ |
|
158 | 158 | public function destroy_images() |
159 | 159 | { |
160 | 160 | $this->phpbb_cache->destroy('_images'); |
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
164 | - * Destroy album cache |
|
165 | - * Basicly some tests fail due album cache not destroyed ... |
|
166 | - * So lets try it now? |
|
167 | - */ |
|
164 | + * Destroy album cache |
|
165 | + * Basicly some tests fail due album cache not destroyed ... |
|
166 | + * So lets try it now? |
|
167 | + */ |
|
168 | 168 | public function destroy_albums() |
169 | 169 | { |
170 | 170 | $this->phpbb_cache->destroy('_albums'); |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | $additional_settings = array(); |
93 | 93 | |
94 | 94 | /** |
95 | - * Event set personal settings |
|
96 | - * |
|
97 | - * @event phpbbgallery.core.ucp.set_settings_submit |
|
98 | - * @var array additional_settings array of additional settings |
|
99 | - * @since 1.2.0 |
|
100 | - */ |
|
95 | + * Event set personal settings |
|
96 | + * |
|
97 | + * @event phpbbgallery.core.ucp.set_settings_submit |
|
98 | + * @var array additional_settings array of additional settings |
|
99 | + * @since 1.2.0 |
|
100 | + */ |
|
101 | 101 | $vars = array('additional_settings'); |
102 | 102 | extract($this->dispatcher->trigger_event('phpbbgallery.core.ucp.set_settings_submit', compact($vars))); |
103 | 103 | |
@@ -118,11 +118,11 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
121 | - * Event no submit personal settings |
|
122 | - * |
|
123 | - * @event phpbbgallery.core.ucp.set_settings_nosubmit |
|
124 | - * @since 1.2.0 |
|
125 | - */ |
|
121 | + * Event no submit personal settings |
|
122 | + * |
|
123 | + * @event phpbbgallery.core.ucp.set_settings_nosubmit |
|
124 | + * @since 1.2.0 |
|
125 | + */ |
|
126 | 126 | $this->dispatcher->dispatch('phpbbgallery.core.ucp.set_settings_nosubmit'); |
127 | 127 | |
128 | 128 | $this->template->assign_vars(array( |
@@ -389,10 +389,10 @@ discard block |
||
389 | 389 | generate_text_for_storage($album_data['album_desc'], $album_data['album_desc_uid'], $album_data['album_desc_bitfield'], $album_data['album_desc_options'], $request->variable('desc_parse_bbcode', false), $request->variable('desc_parse_urls', false), $request->variable('desc_parse_smilies', false)); |
390 | 390 | |
391 | 391 | /** |
392 | - * borrowed from phpBB3 |
|
393 | - * @author: phpBB Group |
|
394 | - * @location: acp_forums->manage_forums |
|
395 | - */ |
|
392 | + * borrowed from phpBB3 |
|
393 | + * @author: phpBB Group |
|
394 | + * @location: acp_forums->manage_forums |
|
395 | + */ |
|
396 | 396 | // Parent should always be filled otherwise we use initialise_album() |
397 | 397 | if ($album_data['parent_id']) |
398 | 398 | { |
@@ -833,13 +833,13 @@ discard block |
||
833 | 833 | } |
834 | 834 | |
835 | 835 | /** |
836 | - * Event delete user albums |
|
837 | - * |
|
838 | - * @event phpbbgallery.core.ucp.delete_album |
|
839 | - * @var int album_id Album ID |
|
840 | - * @var array deleted_albums Deleted album IDs |
|
841 | - * @since 1.2.0 |
|
842 | - */ |
|
836 | + * Event delete user albums |
|
837 | + * |
|
838 | + * @event phpbbgallery.core.ucp.delete_album |
|
839 | + * @var int album_id Album ID |
|
840 | + * @var array deleted_albums Deleted album IDs |
|
841 | + * @since 1.2.0 |
|
842 | + */ |
|
843 | 843 | $vars = array('album_id', 'deleted_albums'); |
844 | 844 | extract($phpbb_dispatcher->trigger_event('phpbbgallery.core.ucp.delete_album', compact($vars))); |
845 | 845 |
@@ -13,23 +13,23 @@ discard block |
||
13 | 13 | class url |
14 | 14 | { |
15 | 15 | /** |
16 | - * Path from the gallery root, back to phpbb's root |
|
17 | - */ |
|
16 | + * Path from the gallery root, back to phpbb's root |
|
17 | + */ |
|
18 | 18 | private $phpbb_root_path = '../'; |
19 | 19 | |
20 | 20 | /** |
21 | - * Path from the phpbb root, into admin's root |
|
22 | - */ |
|
21 | + * Path from the phpbb root, into admin's root |
|
22 | + */ |
|
23 | 23 | private $phpbb_admin_path = 'adm/'; |
24 | 24 | |
25 | 25 | /** |
26 | - * Path from the phpbb root, into gallery's file root |
|
27 | - */ |
|
26 | + * Path from the phpbb root, into gallery's file root |
|
27 | + */ |
|
28 | 28 | private $phpbb_gallery_file_path = 'files/phpbbgallery/'; |
29 | 29 | |
30 | 30 | /** |
31 | - * Path from the phpbb root, into gallery's root |
|
32 | - */ |
|
31 | + * Path from the phpbb root, into gallery's root |
|
32 | + */ |
|
33 | 33 | private $phpbb_gallery_path = 'gallery/'; |
34 | 34 | |
35 | 35 | const IMAGE_PATH = 'images/'; |
@@ -223,16 +223,16 @@ discard block |
||
223 | 223 | } |
224 | 224 | |
225 | 225 | /** |
226 | - * Creates beautiful relative path from ugly relative path |
|
227 | - * Resolves .. (up directory) |
|
228 | - * |
|
229 | - * @author bantu based on phpbb_own_realpath() by Chris Smith |
|
230 | - * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
|
231 | - * |
|
232 | - * @param string ugly path e.g. "../community/../gallery/" |
|
233 | - * @param bool is it a full url, so we need to fix teh http:// at the beginning? |
|
234 | - * @return string beautiful path e.g. "../gallery/" |
|
235 | - */ |
|
226 | + * Creates beautiful relative path from ugly relative path |
|
227 | + * Resolves .. (up directory) |
|
228 | + * |
|
229 | + * @author bantu based on phpbb_own_realpath() by Chris Smith |
|
230 | + * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
|
231 | + * |
|
232 | + * @param string ugly path e.g. "../community/../gallery/" |
|
233 | + * @param bool is it a full url, so we need to fix teh http:// at the beginning? |
|
234 | + * @return string beautiful path e.g. "../gallery/" |
|
235 | + */ |
|
236 | 236 | static public function beautiful_path($path, $is_full_url = false) |
237 | 237 | { |
238 | 238 | // Remove any repeated slashes |
@@ -274,10 +274,10 @@ discard block |
||
274 | 274 | } |
275 | 275 | |
276 | 276 | /** |
277 | - * Custom meta_refresh implementation |
|
278 | - * @param int $time Time in seconds. |
|
279 | - * @param string $route Route generated by $helper->route |
|
280 | - */ |
|
277 | + * Custom meta_refresh implementation |
|
278 | + * @param int $time Time in seconds. |
|
279 | + * @param string $route Route generated by $helper->route |
|
280 | + */ |
|
281 | 281 | public function meta_refresh($time, $route) |
282 | 282 | { |
283 | 283 | // For XHTML compatibility we change back & to & |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | foreach ($images as $image_src) |
59 | 59 | { |
60 | 60 | /** |
61 | - * Import the images |
|
62 | - */ |
|
61 | + * Import the images |
|
62 | + */ |
|
63 | 63 | |
64 | 64 | $image_src = str_replace("{{$import_schema}}", "'", $image_src); |
65 | 65 | $image_src_full = $gallery_url->path('import') . utf8_decode($image_src); |
@@ -153,21 +153,21 @@ discard block |
||
153 | 153 | $file_link = $gallery_url->path('upload') . $image_filename; |
154 | 154 | |
155 | 155 | /** |
156 | - * Event to trigger before mass update |
|
157 | - * |
|
158 | - * @event phpbbgallery.acpimport.update_image_before |
|
159 | - * @var array additional_sql_data array of additional sql_data |
|
160 | - * @var string file_link String with real file link |
|
161 | - * @since 1.2.0 |
|
162 | - */ |
|
156 | + * Event to trigger before mass update |
|
157 | + * |
|
158 | + * @event phpbbgallery.acpimport.update_image_before |
|
159 | + * @var array additional_sql_data array of additional sql_data |
|
160 | + * @var string file_link String with real file link |
|
161 | + * @since 1.2.0 |
|
162 | + */ |
|
163 | 163 | $vars = array('additional_sql_data', 'file_link'); |
164 | 164 | extract($phpbb_dispatcher->trigger_event('phpbbgallery.acpimport.update_image_before', compact($vars))); |
165 | 165 | |
166 | 166 | if (($filetype[0] > $gallery_config->get('max_width')) || ($filetype[1] > $gallery_config->get('max_height'))) |
167 | 167 | { |
168 | 168 | /** |
169 | - * Resize overside images |
|
170 | - */ |
|
169 | + * Resize overside images |
|
170 | + */ |
|
171 | 171 | if ($gallery_config->get('allow_resize')) |
172 | 172 | { |
173 | 173 | $image_tools->resize_image($gallery_config->get('max_width'), $gallery_config->get('max_height')); |
@@ -180,13 +180,13 @@ discard block |
||
180 | 180 | $file_updated = (bool) $image_tools->resized; |
181 | 181 | |
182 | 182 | /** |
183 | - * Event to trigger before mass update |
|
184 | - * |
|
185 | - * @event phpbbgallery.acpimport.update_image |
|
186 | - * @var array additional_sql_data array of additional sql_data |
|
187 | - * @var bool file_updated is file resized |
|
188 | - * @since 1.2.0 |
|
189 | - */ |
|
183 | + * Event to trigger before mass update |
|
184 | + * |
|
185 | + * @event phpbbgallery.acpimport.update_image |
|
186 | + * @var array additional_sql_data array of additional sql_data |
|
187 | + * @var bool file_updated is file resized |
|
188 | + * @since 1.2.0 |
|
189 | + */ |
|
190 | 190 | $vars = array('additional_sql_data', 'file_updated'); |
191 | 191 | extract($phpbb_dispatcher->trigger_event('phpbbgallery.acpimport.update_image', compact($vars))); |
192 | 192 |
@@ -89,11 +89,11 @@ discard block |
||
89 | 89 | } |
90 | 90 | |
91 | 91 | /** |
92 | - * Delete source files without a database entry. |
|
93 | - * |
|
94 | - * @param array $filenames An array of filenames |
|
95 | - * @return string Language key for the success message. |
|
96 | - */ |
|
92 | + * Delete source files without a database entry. |
|
93 | + * |
|
94 | + * @param array $filenames An array of filenames |
|
95 | + * @return string Language key for the success message. |
|
96 | + */ |
|
97 | 97 | public function delete_files($filenames) |
98 | 98 | { |
99 | 99 | foreach ($filenames as $file) |
@@ -106,11 +106,11 @@ discard block |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
109 | - * Delete images, where the source file is missing. |
|
110 | - * |
|
111 | - * @param mixed $image_ids Either an array of integers or an integer. |
|
112 | - * @return string Language key for the success message. |
|
113 | - */ |
|
109 | + * Delete images, where the source file is missing. |
|
110 | + * |
|
111 | + * @param mixed $image_ids Either an array of integers or an integer. |
|
112 | + * @return string Language key for the success message. |
|
113 | + */ |
|
114 | 114 | public function delete_images($image_ids) |
115 | 115 | { |
116 | 116 | $this->log->add_log('admin', 'clean_deleteentries', 0, 0, array('LOG_CLEANUP_DELETE_ENTRIES', count($image_ids))); |
@@ -120,11 +120,11 @@ discard block |
||
120 | 120 | } |
121 | 121 | |
122 | 122 | /** |
123 | - * Delete images, where the author is missing. |
|
124 | - * |
|
125 | - * @param mixed $image_ids Either an array of integers or an integer. |
|
126 | - * @return string Language key for the success message. |
|
127 | - */ |
|
123 | + * Delete images, where the author is missing. |
|
124 | + * |
|
125 | + * @param mixed $image_ids Either an array of integers or an integer. |
|
126 | + * @return string Language key for the success message. |
|
127 | + */ |
|
128 | 128 | public function delete_author_images($image_ids) |
129 | 129 | { |
130 | 130 | $this->log->add_log('admin', 'clean_deletenoauthors', 0, 0, array('LOG_CLEANUP_DELETE_NO_AUTHOR', count($image_ids))); |
@@ -134,11 +134,11 @@ discard block |
||
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
137 | - * Delete comments, where the author is missing. |
|
138 | - * |
|
139 | - * @param mixed $comment_ids Either an array of integers or an integer. |
|
140 | - * @return string Language key for the success message. |
|
141 | - */ |
|
137 | + * Delete comments, where the author is missing. |
|
138 | + * |
|
139 | + * @param mixed $comment_ids Either an array of integers or an integer. |
|
140 | + * @return string Language key for the success message. |
|
141 | + */ |
|
142 | 142 | public function delete_author_comments($comment_ids) |
143 | 143 | { |
144 | 144 | $this->log->add_log('admin', 'clean_deletecna', 0, 0, array('LOG_CLEANUP_COMMENT_DELETE_NO_AUTHOR', count($comment_ids))); |
@@ -148,12 +148,12 @@ discard block |
||
148 | 148 | } |
149 | 149 | |
150 | 150 | /** |
151 | - * Delete unwanted and obsolent personal galleries. |
|
152 | - * |
|
153 | - * @param array $unwanted_pegas User IDs we want to delete the pegas. |
|
154 | - * @param array $obsolent_pegas User IDs we want to delete the pegas. |
|
155 | - * @return array Language keys for the success messages. |
|
156 | - */ |
|
151 | + * Delete unwanted and obsolent personal galleries. |
|
152 | + * |
|
153 | + * @param array $unwanted_pegas User IDs we want to delete the pegas. |
|
154 | + * @param array $obsolent_pegas User IDs we want to delete the pegas. |
|
155 | + * @return array Language keys for the success messages. |
|
156 | + */ |
|
157 | 157 | public function delete_pegas($unwanted_pegas, $obsolent_pegas) |
158 | 158 | { |
159 | 159 | |
@@ -284,8 +284,8 @@ discard block |
||
284 | 284 | } |
285 | 285 | |
286 | 286 | /** |
287 | - * |
|
288 | - */ |
|
287 | + * |
|
288 | + */ |
|
289 | 289 | public function prune($pattern) |
290 | 290 | { |
291 | 291 | $sql_where = ''; |
@@ -329,8 +329,8 @@ discard block |
||
329 | 329 | } |
330 | 330 | |
331 | 331 | /** |
332 | - * |
|
333 | - */ |
|
332 | + * |
|
333 | + */ |
|
334 | 334 | public function lang_prune_pattern($pattern) |
335 | 335 | { |
336 | 336 | if (isset($pattern['image_album_id'])) |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | $action = $request->variable('action', ''); |
42 | 42 | |
43 | 43 | /** |
44 | - * All our beautiful permissions |
|
45 | - */ |
|
44 | + * All our beautiful permissions |
|
45 | + */ |
|
46 | 46 | if (!isset($permissions)) |
47 | 47 | { |
48 | 48 | $permissions = new \stdClass(); |
@@ -698,12 +698,12 @@ discard block |
||
698 | 698 | $coal = $gallery_cache->get('albums'); |
699 | 699 | |
700 | 700 | /** |
701 | - * Grab the permissions |
|
702 | - * |
|
703 | - * includes/acp/acp_permissions.php says: |
|
704 | - * // We obtain and check $_POST['setting'][$ug_id][$forum_id] directly and not using request_var() because request_var() |
|
705 | - * // currently does not support the amount of dimensions required. ;) |
|
706 | - */ |
|
701 | + * Grab the permissions |
|
702 | + * |
|
703 | + * includes/acp/acp_permissions.php says: |
|
704 | + * // We obtain and check $_POST['setting'][$ug_id][$forum_id] directly and not using request_var() because request_var() |
|
705 | + * // currently does not support the amount of dimensions required. ;) |
|
706 | + */ |
|
707 | 707 | // $auth_settings = request_var('setting', array(0 => array(0 => array('' => 0)))); |
708 | 708 | $requests = $request->variable('setting', array(0 => array(0 => array('' => 0)))); |
709 | 709 | $p_mask_count = 0; |
@@ -757,8 +757,8 @@ discard block |
||
757 | 757 | } |
758 | 758 | } |
759 | 759 | /** |
760 | - * Inherit the permissions |
|
761 | - */ |
|
760 | + * Inherit the permissions |
|
761 | + */ |
|
762 | 762 | $inherit = $request->variable('setting', array(0 => array('' => 0))); |
763 | 763 | foreach ($inherit as $c_mask => $v_sets) |
764 | 764 | { |
@@ -988,8 +988,8 @@ discard block |
||
988 | 988 | } |
989 | 989 | |
990 | 990 | /** |
991 | - * Handles copying permissions from one album to others |
|
992 | - */ |
|
991 | + * Handles copying permissions from one album to others |
|
992 | + */ |
|
993 | 993 | function copy_album_permissions() |
994 | 994 | { |
995 | 995 | global $cache, $db, $template, $user, $table_prefix, $phpbb_dispatcher, $table_name, $users_table, $phpbb_container; |
@@ -125,51 +125,51 @@ discard block |
||
125 | 125 | protected $profile_fields_data; |
126 | 126 | protected $can_receive_pm_list; |
127 | 127 | |
128 | - /** |
|
129 | - * Constructor |
|
130 | - * |
|
131 | - * @param \phpbb\request\request $request |
|
132 | - * @param \phpbb\auth\auth $auth Gallery auth object |
|
133 | - * @param \phpbb\config\config $config Config object |
|
134 | - * @param \phpbb\controller\helper $helper Controller helper object |
|
135 | - * @param \phpbb\db\driver\driver|\phpbb\db\driver\driver_interface $db Database object |
|
136 | - * @param \phpbb\event\dispatcher $dispatcher Event dispatcher object |
|
137 | - * @param \phpbb\pagination $pagination Pagination object |
|
138 | - * @param \phpbb\template\template $template Template object |
|
139 | - * @param \phpbb\user $user User object |
|
140 | - * @param manager $cpf_manager |
|
141 | - * @param \phpbb\language\language $language |
|
142 | - * @param \phpbbgallery\core\album\display $display Albums display object |
|
143 | - * @param \phpbbgallery\core\album\loader $loader Albums display object |
|
144 | - * @param \phpbbgallery\core\album\album $album |
|
145 | - * @param \phpbbgallery\core\image\image $image |
|
146 | - * @param \phpbbgallery\core\auth\auth $gallery_auth |
|
147 | - * @param \phpbbgallery\core\user $gallery_user |
|
148 | - * @param \phpbbgallery\core\config $gallery_config |
|
149 | - * @param \phpbbgallery\core\auth\level $auth_level Gallery auth level object |
|
150 | - * @param \phpbbgallery\core\url $url |
|
151 | - * @param \phpbbgallery\core\misc $misc |
|
152 | - * @param \phpbbgallery\core\comment $comment |
|
153 | - * @param \phpbbgallery\core\report $report |
|
154 | - * @param \phpbbgallery\core\notification\helper $notification_helper |
|
155 | - * @param \phpbbgallery\core\log $gallery_log |
|
156 | - * @param \phpbbgallery\core\moderate $moderate |
|
157 | - * @param \phpbbgallery\core\rating $gallery_rating |
|
158 | - * @param \phpbbgallery\core\block $block |
|
159 | - * @param ContainerInterface $phpbb_container |
|
160 | - * @param string $albums_table Gallery albums table |
|
161 | - * @param string $images_table Gallery images table |
|
162 | - * @param string $users_table Gallery users table |
|
163 | - * @param $table_comments |
|
164 | - * @param $phpbb_root_path |
|
165 | - * @param $php_ext |
|
166 | - * @internal param \phpbbgallery\core\comment $gallery_comment Gallery comment class |
|
167 | - */ |
|
128 | + /** |
|
129 | + * Constructor |
|
130 | + * |
|
131 | + * @param \phpbb\request\request $request |
|
132 | + * @param \phpbb\auth\auth $auth Gallery auth object |
|
133 | + * @param \phpbb\config\config $config Config object |
|
134 | + * @param \phpbb\controller\helper $helper Controller helper object |
|
135 | + * @param \phpbb\db\driver\driver|\phpbb\db\driver\driver_interface $db Database object |
|
136 | + * @param \phpbb\event\dispatcher $dispatcher Event dispatcher object |
|
137 | + * @param \phpbb\pagination $pagination Pagination object |
|
138 | + * @param \phpbb\template\template $template Template object |
|
139 | + * @param \phpbb\user $user User object |
|
140 | + * @param manager $cpf_manager |
|
141 | + * @param \phpbb\language\language $language |
|
142 | + * @param \phpbbgallery\core\album\display $display Albums display object |
|
143 | + * @param \phpbbgallery\core\album\loader $loader Albums display object |
|
144 | + * @param \phpbbgallery\core\album\album $album |
|
145 | + * @param \phpbbgallery\core\image\image $image |
|
146 | + * @param \phpbbgallery\core\auth\auth $gallery_auth |
|
147 | + * @param \phpbbgallery\core\user $gallery_user |
|
148 | + * @param \phpbbgallery\core\config $gallery_config |
|
149 | + * @param \phpbbgallery\core\auth\level $auth_level Gallery auth level object |
|
150 | + * @param \phpbbgallery\core\url $url |
|
151 | + * @param \phpbbgallery\core\misc $misc |
|
152 | + * @param \phpbbgallery\core\comment $comment |
|
153 | + * @param \phpbbgallery\core\report $report |
|
154 | + * @param \phpbbgallery\core\notification\helper $notification_helper |
|
155 | + * @param \phpbbgallery\core\log $gallery_log |
|
156 | + * @param \phpbbgallery\core\moderate $moderate |
|
157 | + * @param \phpbbgallery\core\rating $gallery_rating |
|
158 | + * @param \phpbbgallery\core\block $block |
|
159 | + * @param ContainerInterface $phpbb_container |
|
160 | + * @param string $albums_table Gallery albums table |
|
161 | + * @param string $images_table Gallery images table |
|
162 | + * @param string $users_table Gallery users table |
|
163 | + * @param $table_comments |
|
164 | + * @param $phpbb_root_path |
|
165 | + * @param $php_ext |
|
166 | + * @internal param \phpbbgallery\core\comment $gallery_comment Gallery comment class |
|
167 | + */ |
|
168 | 168 | public function __construct(\phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\config\config $config, |
169 | 169 | \phpbb\controller\helper $helper, \phpbb\db\driver\driver_interface $db, |
170 | 170 | \phpbb\event\dispatcher $dispatcher, \phpbb\pagination $pagination, |
171 | 171 | \phpbb\template\template $template, \phpbb\user $user, \phpbb\profilefields\manager $cpf_manager, |
172 | - \phpbb\language\language $language, \phpbbgallery\core\album\display $display, |
|
172 | + \phpbb\language\language $language, \phpbbgallery\core\album\display $display, |
|
173 | 173 | \phpbbgallery\core\album\loader $loader, \phpbbgallery\core\album\album $album, |
174 | 174 | \phpbbgallery\core\image\image $image, \phpbbgallery\core\auth\auth $gallery_auth, |
175 | 175 | \phpbbgallery\core\user $gallery_user, \phpbbgallery\core\config $gallery_config, |
@@ -428,15 +428,15 @@ discard block |
||
428 | 428 | $image_data = $this->data; |
429 | 429 | |
430 | 430 | /** |
431 | - * Event view image |
|
432 | - * |
|
433 | - * @event phpbbgallery.core.viewimage |
|
434 | - * @var int image_id id of the image we are viewing |
|
435 | - * @var array image_data All the data related to the image |
|
436 | - * @var array album_data All the data related to the album image is part of |
|
437 | - * @var string page_title Page title |
|
438 | - * @since 1.2.0 |
|
439 | - */ |
|
431 | + * Event view image |
|
432 | + * |
|
433 | + * @event phpbbgallery.core.viewimage |
|
434 | + * @var int image_id id of the image we are viewing |
|
435 | + * @var array image_data All the data related to the image |
|
436 | + * @var array album_data All the data related to the album image is part of |
|
437 | + * @var string page_title Page title |
|
438 | + * @since 1.2.0 |
|
439 | + */ |
|
440 | 440 | $vars = array('image_id', 'image_data', 'album_data', 'page_title'); |
441 | 441 | extract($this->dispatcher->trigger_event('phpbbgallery.core.viewimage', compact($vars))); |
442 | 442 | |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | |
445 | 445 | $this->users_id_array[$this->data['image_user_id']] = $this->data['image_user_id']; |
446 | 446 | |
447 | - $this->load_users_data(); |
|
447 | + $this->load_users_data(); |
|
448 | 448 | |
449 | 449 | $this->users_data_array[$this->data['image_user_id']]['username'] = ($this->data['image_username']) ? $this->data['image_username'] : $this->language->lang('GUEST'); |
450 | 450 | $this->template->assign_vars(array( |
@@ -499,8 +499,8 @@ discard block |
||
499 | 499 | unset($rating); |
500 | 500 | } |
501 | 501 | /** |
502 | - * Posting comment |
|
503 | - */ |
|
502 | + * Posting comment |
|
503 | + */ |
|
504 | 504 | $comments_disabled = (!$this->gallery_config->get('allow_comments') || ($this->gallery_config->get('comment_user_control') && !$image_data['image_allow_comments'])); |
505 | 505 | if (!$comments_disabled && $this->gallery_auth->acl_check('c_post', $album_id, $album_data['album_user_id']) && ($album_data['album_status'] != $this->block->get_album_status_locked()) && (($image_data['image_status'] != $this->block->get_image_status_locked()) || $this->gallery_auth->acl_check('m_status', $album_id, $album_data['album_user_id']))) |
506 | 506 | { |
@@ -585,13 +585,13 @@ discard block |
||
585 | 585 | $this->template->assign_var('S_COMMENTS_DISABLED', true); |
586 | 586 | } |
587 | 587 | |
588 | - /** |
|
589 | - * Listing comment |
|
590 | - */ |
|
591 | - if (($this->gallery_config->get('allow_comments') && $this->gallery_auth->acl_check('c_read', $album_id, $album_data['album_user_id'])) /*&& (time() > ($album_data['contest_start'] + $album_data['contest_end']))*/) |
|
592 | - { |
|
593 | - $this->display_comments($image_id, $this->data, $album_id, $album_data, ($page - 1) * $this->gallery_config->get('items_per_page'), $this->gallery_config->get('items_per_page')); |
|
594 | - } |
|
588 | + /** |
|
589 | + * Listing comment |
|
590 | + */ |
|
591 | + if (($this->gallery_config->get('allow_comments') && $this->gallery_auth->acl_check('c_read', $album_id, $album_data['album_user_id'])) /*&& (time() > ($album_data['contest_start'] + $album_data['contest_end']))*/) |
|
592 | + { |
|
593 | + $this->display_comments($image_id, $this->data, $album_id, $album_data, ($page - 1) * $this->gallery_config->get('items_per_page'), $this->gallery_config->get('items_per_page')); |
|
594 | + } |
|
595 | 595 | return $this->helper->render('gallery/viewimage_body.html', $page_title); |
596 | 596 | } |
597 | 597 | protected function display_comments($image_id, $image_data, $album_id, $album_data, $start, $limit) |
@@ -625,7 +625,7 @@ discard block |
||
625 | 625 | $this->users_id_array[$row['comment_user_id']] = $row['comment_user_id']; |
626 | 626 | if ($row['comment_edit_count'] > 0) |
627 | 627 | { |
628 | - $this->users_id_array[$row['comment_edit_user_id']] = $row['comment_edit_user_id']; |
|
628 | + $this->users_id_array[$row['comment_edit_user_id']] = $row['comment_edit_user_id']; |
|
629 | 629 | } |
630 | 630 | } |
631 | 631 | $this->db->sql_freeresult($result); |
@@ -655,43 +655,43 @@ discard block |
||
655 | 655 | |
656 | 656 | |
657 | 657 | // Let's deply new profile |
658 | - $poster_id = $row['comment_user_id']; |
|
659 | - |
|
660 | - if ($row['comment_edit_count'] > 0) |
|
661 | - { |
|
662 | - $edit_info = ($row['comment_edit_count'] == 1) ? $this->language->lang('IMAGE_EDITED_TIME_TOTAL') : $this->language->lang('IMAGE_EDITED_TIMES_TOTAL'); |
|
663 | - $edit_info = sprintf($edit_info, get_username_string('full', $row['comment_edit_user_id'], $this->users_data_array[$row['comment_edit_user_id']]['username'], $this->users_data_array[$row['comment_edit_user_id']]['user_colour']), $this->user->format_date($row['comment_edit_time'], false, true), $row['comment_edit_count']); |
|
664 | - } |
|
665 | - $user_deleted = (isset($this->users_data_array[$poster_id]) ? false : true); |
|
666 | - // End signature parsing, only if needed |
|
667 | - if ($this->users_data_array[$poster_id]['sig'] && empty($this->users_data_array[$poster_id]['sig_parsed'])) |
|
668 | - { |
|
669 | - $parse_flags = ($this->users_data_array[$poster_id]['sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; |
|
670 | - $user_cache[$poster_id]['sig'] = generate_text_for_display($this->users_data_array[$poster_id]['sig'], $this->users_data_array[$poster_id]['sig_bbcode_uid'], $this->users_data_array[$poster_id]['sig_bbcode_bitfield'], $parse_flags, true); |
|
671 | - $user_cache[$poster_id]['sig_parsed'] = true; |
|
672 | - } |
|
673 | - |
|
674 | - $cp_row = array(); |
|
675 | - //CPF |
|
676 | - if ($this->config['load_cpf_viewtopic']) |
|
677 | - { |
|
678 | - $cp_row = (isset($this->profile_fields_data[$poster_id])) ? $this->cpf_manager->generate_profile_fields_template_data($this->profile_fields_data[$poster_id]) : array(); |
|
679 | - } |
|
680 | - $can_receive_pm = ( |
|
681 | - // They must be a "normal" user |
|
682 | - $this->users_data_array[$poster_id]['user_type'] != USER_IGNORE && |
|
683 | - // They must not be deactivated by the administrator |
|
684 | - ($this->users_data_array[$poster_id]['user_type'] != USER_INACTIVE || $this->users_data_array[$poster_id]['user_inactive_reason'] != INACTIVE_MANUAL) && |
|
685 | - // They must be able to read PMs |
|
686 | - in_array($poster_id, $this->can_receive_pm_list) && |
|
687 | - // They must allow users to contact via PM |
|
688 | - (($this->auth->acl_gets('a_', 'm_') || $this->auth->acl_getf_global('m_')) || $this->users_data_array[$poster_id]['allow_pm']) |
|
689 | - ); |
|
690 | - $u_pm = ''; |
|
691 | - if ($this->config['allow_privmsg'] && $this->auth->acl_get('u_sendpm') && $can_receive_pm) |
|
692 | - { |
|
693 | - $u_pm = append_sid("{$this->phpbb_root_path}ucp.$this->php_ext", 'i=pm&mode=compose'); |
|
694 | - } |
|
658 | + $poster_id = $row['comment_user_id']; |
|
659 | + |
|
660 | + if ($row['comment_edit_count'] > 0) |
|
661 | + { |
|
662 | + $edit_info = ($row['comment_edit_count'] == 1) ? $this->language->lang('IMAGE_EDITED_TIME_TOTAL') : $this->language->lang('IMAGE_EDITED_TIMES_TOTAL'); |
|
663 | + $edit_info = sprintf($edit_info, get_username_string('full', $row['comment_edit_user_id'], $this->users_data_array[$row['comment_edit_user_id']]['username'], $this->users_data_array[$row['comment_edit_user_id']]['user_colour']), $this->user->format_date($row['comment_edit_time'], false, true), $row['comment_edit_count']); |
|
664 | + } |
|
665 | + $user_deleted = (isset($this->users_data_array[$poster_id]) ? false : true); |
|
666 | + // End signature parsing, only if needed |
|
667 | + if ($this->users_data_array[$poster_id]['sig'] && empty($this->users_data_array[$poster_id]['sig_parsed'])) |
|
668 | + { |
|
669 | + $parse_flags = ($this->users_data_array[$poster_id]['sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; |
|
670 | + $user_cache[$poster_id]['sig'] = generate_text_for_display($this->users_data_array[$poster_id]['sig'], $this->users_data_array[$poster_id]['sig_bbcode_uid'], $this->users_data_array[$poster_id]['sig_bbcode_bitfield'], $parse_flags, true); |
|
671 | + $user_cache[$poster_id]['sig_parsed'] = true; |
|
672 | + } |
|
673 | + |
|
674 | + $cp_row = array(); |
|
675 | + //CPF |
|
676 | + if ($this->config['load_cpf_viewtopic']) |
|
677 | + { |
|
678 | + $cp_row = (isset($this->profile_fields_data[$poster_id])) ? $this->cpf_manager->generate_profile_fields_template_data($this->profile_fields_data[$poster_id]) : array(); |
|
679 | + } |
|
680 | + $can_receive_pm = ( |
|
681 | + // They must be a "normal" user |
|
682 | + $this->users_data_array[$poster_id]['user_type'] != USER_IGNORE && |
|
683 | + // They must not be deactivated by the administrator |
|
684 | + ($this->users_data_array[$poster_id]['user_type'] != USER_INACTIVE || $this->users_data_array[$poster_id]['user_inactive_reason'] != INACTIVE_MANUAL) && |
|
685 | + // They must be able to read PMs |
|
686 | + in_array($poster_id, $this->can_receive_pm_list) && |
|
687 | + // They must allow users to contact via PM |
|
688 | + (($this->auth->acl_gets('a_', 'm_') || $this->auth->acl_getf_global('m_')) || $this->users_data_array[$poster_id]['allow_pm']) |
|
689 | + ); |
|
690 | + $u_pm = ''; |
|
691 | + if ($this->config['allow_privmsg'] && $this->auth->acl_get('u_sendpm') && $can_receive_pm) |
|
692 | + { |
|
693 | + $u_pm = append_sid("{$this->phpbb_root_path}ucp.$this->php_ext", 'i=pm&mode=compose'); |
|
694 | + } |
|
695 | 695 | |
696 | 696 | $comment_row = array( |
697 | 697 | 'U_COMMENT' => $this->helper->route('phpbbgallery_core_image', array('image_id' => $image_id)) . '#comment_' . $row['comment_id'], |
@@ -704,10 +704,10 @@ discard block |
||
704 | 704 | 'U_EDIT' => ($this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id']) || ($this->gallery_auth->acl_check('c_edit', $album_id, $album_data['album_user_id']) && ($row['comment_user_id'] == $this->user->data['user_id']) && $this->user->data['is_registered'])) ? $this->helper->route('phpbbgallery_core_comment_edit', array('image_id' => $image_id, 'comment_id' => $row['comment_id'])) : '', |
705 | 705 | 'U_INFO' => ($this->auth->acl_get('a_')) ? $this->url->append_sid('mcp', 'mode=whois&ip=' . $row['comment_user_ip']) : '', |
706 | 706 | |
707 | - 'POSTER_FULL' => get_username_string('full', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']), |
|
708 | - 'POSTER_COLOUR' => get_username_string('colour', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']), |
|
709 | - 'POSTER_USERNAME' => get_username_string('username', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']), |
|
710 | - 'U_POSTER' => get_username_string('profile', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']), |
|
707 | + 'POSTER_FULL' => get_username_string('full', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']), |
|
708 | + 'POSTER_COLOUR' => get_username_string('colour', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']), |
|
709 | + 'POSTER_USERNAME' => get_username_string('username', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']), |
|
710 | + 'U_POSTER' => get_username_string('profile', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']), |
|
711 | 711 | |
712 | 712 | 'SIGNATURE' => ($row['comment_signature'] && !$user_deleted) ? generate_text_for_display($this->users_data_array[$poster_id]['sig'], $row['comment_uid'], $row['comment_bitfield'], 7) : '', |
713 | 713 | 'RANK_TITLE' => $user_deleted ? '' : $this->users_data_array[$poster_id]['rank_title'], |
@@ -725,60 +725,60 @@ discard block |
||
725 | 725 | 'ONLINE_IMG' => ($poster_id == ANONYMOUS || !$this->config['load_onlinetrack']) ? '' : ($user_deleted ? '' : (($this->users_data_array[$poster_id]['online']) ? $this->user->img('icon_user_online', 'ONLINE') : $this->user->img('icon_user_offline', 'OFFLINE'))), |
726 | 726 | 'S_ONLINE' => ($poster_id == ANONYMOUS || !$this->config['load_onlinetrack']) ? false : ($user_deleted ? '' : (($this->users_data_array[$poster_id]['online']) ? true : false)), |
727 | 727 | |
728 | - 'S_CUSTOM_FIELDS' => (isset($cp_row['row']) && count($cp_row['row'])) ? true : false, |
|
729 | - ); |
|
730 | - if (isset($cp_row['row']) && count($cp_row['row'])) |
|
731 | - { |
|
732 | - $comment_row = array_merge($comment_row, $cp_row['row']); |
|
733 | - } |
|
728 | + 'S_CUSTOM_FIELDS' => (isset($cp_row['row']) && count($cp_row['row'])) ? true : false, |
|
729 | + ); |
|
730 | + if (isset($cp_row['row']) && count($cp_row['row'])) |
|
731 | + { |
|
732 | + $comment_row = array_merge($comment_row, $cp_row['row']); |
|
733 | + } |
|
734 | 734 | $this->template->assign_block_vars('commentrow', $comment_row); |
735 | 735 | |
736 | - $contact_fields = array( |
|
737 | - array( |
|
738 | - 'ID' => 'pm', |
|
739 | - 'NAME' => $this->language->lang('SEND_PRIVATE_MESSAGE'), |
|
740 | - 'U_CONTACT' => $u_pm, |
|
741 | - ), |
|
742 | - array( |
|
743 | - 'ID' => 'email', |
|
744 | - 'NAME' => $this->language->lang('SEND_EMAIL'), |
|
745 | - 'U_CONTACT' => $this->users_data_array[$poster_id]['email'], |
|
746 | - ), |
|
747 | - array( |
|
748 | - 'ID' => 'jabber', |
|
749 | - 'NAME' => $this->language->lang('JABBER'), |
|
750 | - 'U_CONTACT' => $this->users_data_array[$poster_id]['jabber'], |
|
751 | - ), |
|
752 | - ); |
|
753 | - |
|
754 | - foreach ($contact_fields as $field) |
|
755 | - { |
|
756 | - if ($field['U_CONTACT']) |
|
757 | - { |
|
758 | - $this->template->assign_block_vars('commentrow.contact', $field); |
|
759 | - } |
|
760 | - } |
|
761 | - |
|
762 | - if (!empty($cp_row['blockrow'])) |
|
763 | - { |
|
764 | - foreach ($cp_row['blockrow'] as $field_data) |
|
765 | - { |
|
766 | - if ($field_data['S_PROFILE_CONTACT']) |
|
767 | - { |
|
768 | - $this->template->assign_block_vars('commentrow.contact', array( |
|
769 | - 'ID' => $field_data['PROFILE_FIELD_IDENT'], |
|
770 | - 'NAME' => $field_data['PROFILE_FIELD_NAME'], |
|
771 | - 'U_CONTACT' => $field_data['PROFILE_FIELD_CONTACT'], |
|
772 | - )); |
|
773 | - } |
|
774 | - else |
|
775 | - { |
|
776 | - $this->template->assign_block_vars('commentrow.custom_fields', $field_data); |
|
777 | - } |
|
778 | - |
|
779 | - |
|
780 | - } |
|
781 | - } |
|
736 | + $contact_fields = array( |
|
737 | + array( |
|
738 | + 'ID' => 'pm', |
|
739 | + 'NAME' => $this->language->lang('SEND_PRIVATE_MESSAGE'), |
|
740 | + 'U_CONTACT' => $u_pm, |
|
741 | + ), |
|
742 | + array( |
|
743 | + 'ID' => 'email', |
|
744 | + 'NAME' => $this->language->lang('SEND_EMAIL'), |
|
745 | + 'U_CONTACT' => $this->users_data_array[$poster_id]['email'], |
|
746 | + ), |
|
747 | + array( |
|
748 | + 'ID' => 'jabber', |
|
749 | + 'NAME' => $this->language->lang('JABBER'), |
|
750 | + 'U_CONTACT' => $this->users_data_array[$poster_id]['jabber'], |
|
751 | + ), |
|
752 | + ); |
|
753 | + |
|
754 | + foreach ($contact_fields as $field) |
|
755 | + { |
|
756 | + if ($field['U_CONTACT']) |
|
757 | + { |
|
758 | + $this->template->assign_block_vars('commentrow.contact', $field); |
|
759 | + } |
|
760 | + } |
|
761 | + |
|
762 | + if (!empty($cp_row['blockrow'])) |
|
763 | + { |
|
764 | + foreach ($cp_row['blockrow'] as $field_data) |
|
765 | + { |
|
766 | + if ($field_data['S_PROFILE_CONTACT']) |
|
767 | + { |
|
768 | + $this->template->assign_block_vars('commentrow.contact', array( |
|
769 | + 'ID' => $field_data['PROFILE_FIELD_IDENT'], |
|
770 | + 'NAME' => $field_data['PROFILE_FIELD_NAME'], |
|
771 | + 'U_CONTACT' => $field_data['PROFILE_FIELD_CONTACT'], |
|
772 | + )); |
|
773 | + } |
|
774 | + else |
|
775 | + { |
|
776 | + $this->template->assign_block_vars('commentrow.custom_fields', $field_data); |
|
777 | + } |
|
778 | + |
|
779 | + |
|
780 | + } |
|
781 | + } |
|
782 | 782 | |
783 | 783 | } |
784 | 784 | //$this->db->sql_freeresult($result); |
@@ -1219,48 +1219,48 @@ discard block |
||
1219 | 1219 | } |
1220 | 1220 | |
1221 | 1221 | protected function load_users_data() |
1222 | - { |
|
1223 | - |
|
1224 | - $sql = $this->db->sql_build_query('SELECT', array( |
|
1225 | - 'SELECT' => 'u.*, gu.personal_album_id, gu.user_images', |
|
1226 | - 'FROM' => array(USERS_TABLE => 'u'), |
|
1227 | - |
|
1228 | - 'LEFT_JOIN' => array( |
|
1229 | - array( |
|
1230 | - 'FROM' => array($this->table_users => 'gu'), |
|
1231 | - 'ON' => 'gu.user_id = u.user_id' |
|
1232 | - ), |
|
1233 | - ), |
|
1234 | - |
|
1235 | - 'WHERE' => $this->db->sql_in_set('u.user_id', $this->users_id_array), |
|
1236 | - )); |
|
1237 | - $result = $this->db->sql_query($sql); |
|
1238 | - |
|
1239 | - while ($row = $this->db->sql_fetchrow($result)) |
|
1240 | - { |
|
1241 | - $this->gallery_user->add_user_to_cache($this->users_data_array, $row); |
|
1242 | - } |
|
1243 | - $this->db->sql_freeresult($result); |
|
1244 | - |
|
1245 | - |
|
1246 | - // Load CPF's |
|
1247 | - $profile_fields_tmp = $this->cpf_manager->grab_profile_fields_data($this->users_id_array); |
|
1248 | - foreach ($profile_fields_tmp as $profile_user_id => $profile_fields) |
|
1249 | - { |
|
1250 | - $this->profile_fields_data[$profile_user_id] = array(); |
|
1251 | - foreach ($profile_fields as $used_ident => $profile_field) |
|
1252 | - { |
|
1253 | - if ($profile_field['data']['field_show_on_vt']) |
|
1254 | - { |
|
1255 | - $this->profile_fields_data[$profile_user_id][$used_ident] = $profile_field; |
|
1256 | - } |
|
1257 | - } |
|
1258 | - } |
|
1259 | - unset($profile_fields_tmp); |
|
1260 | - |
|
1261 | - // Get the list of users who can receive private messages |
|
1262 | - $this->can_receive_pm_list = $this->auth->acl_get_list(array_keys($this->users_data_array), 'u_readpm'); |
|
1263 | - $this->can_receive_pm_list = (empty($this->can_receive_pm_list) || !isset($this->can_receive_pm_list[0]['u_readpm'])) ? array() : $this->can_receive_pm_list[0]['u_readpm']; |
|
1264 | - |
|
1265 | - } |
|
1222 | + { |
|
1223 | + |
|
1224 | + $sql = $this->db->sql_build_query('SELECT', array( |
|
1225 | + 'SELECT' => 'u.*, gu.personal_album_id, gu.user_images', |
|
1226 | + 'FROM' => array(USERS_TABLE => 'u'), |
|
1227 | + |
|
1228 | + 'LEFT_JOIN' => array( |
|
1229 | + array( |
|
1230 | + 'FROM' => array($this->table_users => 'gu'), |
|
1231 | + 'ON' => 'gu.user_id = u.user_id' |
|
1232 | + ), |
|
1233 | + ), |
|
1234 | + |
|
1235 | + 'WHERE' => $this->db->sql_in_set('u.user_id', $this->users_id_array), |
|
1236 | + )); |
|
1237 | + $result = $this->db->sql_query($sql); |
|
1238 | + |
|
1239 | + while ($row = $this->db->sql_fetchrow($result)) |
|
1240 | + { |
|
1241 | + $this->gallery_user->add_user_to_cache($this->users_data_array, $row); |
|
1242 | + } |
|
1243 | + $this->db->sql_freeresult($result); |
|
1244 | + |
|
1245 | + |
|
1246 | + // Load CPF's |
|
1247 | + $profile_fields_tmp = $this->cpf_manager->grab_profile_fields_data($this->users_id_array); |
|
1248 | + foreach ($profile_fields_tmp as $profile_user_id => $profile_fields) |
|
1249 | + { |
|
1250 | + $this->profile_fields_data[$profile_user_id] = array(); |
|
1251 | + foreach ($profile_fields as $used_ident => $profile_field) |
|
1252 | + { |
|
1253 | + if ($profile_field['data']['field_show_on_vt']) |
|
1254 | + { |
|
1255 | + $this->profile_fields_data[$profile_user_id][$used_ident] = $profile_field; |
|
1256 | + } |
|
1257 | + } |
|
1258 | + } |
|
1259 | + unset($profile_fields_tmp); |
|
1260 | + |
|
1261 | + // Get the list of users who can receive private messages |
|
1262 | + $this->can_receive_pm_list = $this->auth->acl_get_list(array_keys($this->users_data_array), 'u_readpm'); |
|
1263 | + $this->can_receive_pm_list = (empty($this->can_receive_pm_list) || !isset($this->can_receive_pm_list[0]['u_readpm'])) ? array() : $this->can_receive_pm_list[0]['u_readpm']; |
|
1264 | + |
|
1265 | + } |
|
1266 | 1266 | } |