@@ -12,21 +12,21 @@ discard block |
||
12 | 12 | |
13 | 13 | class auth |
14 | 14 | { |
15 | - const SETTING_PERMISSIONS = -39839; |
|
16 | - const PERSONAL_ALBUM = -3; |
|
15 | + const SETTING_PERMISSIONS = -39839; |
|
16 | + const PERSONAL_ALBUM = -3; |
|
17 | 17 | const OWN_ALBUM = -2; |
18 | - const PUBLIC_ALBUM = 0; |
|
18 | + const PUBLIC_ALBUM = 0; |
|
19 | 19 | |
20 | 20 | const ACCESS_ALL = 0; |
21 | - const ACCESS_REGISTERED = 1; |
|
22 | - const ACCESS_NOT_FOES = 2; |
|
23 | - const ACCESS_FRIENDS = 3; |
|
24 | - const ACCESS_SPECIAL_FRIENDS = 4; |
|
21 | + const ACCESS_REGISTERED = 1; |
|
22 | + const ACCESS_NOT_FOES = 2; |
|
23 | + const ACCESS_FRIENDS = 3; |
|
24 | + const ACCESS_SPECIAL_FRIENDS = 4; |
|
25 | 25 | |
26 | 26 | // ACL - slightly different |
27 | - const ACL_NO = 0; |
|
28 | - const ACL_YES = 1; |
|
29 | - const ACL_NEVER = 2; |
|
27 | + const ACL_NO = 0; |
|
28 | + const ACL_YES = 1; |
|
29 | + const ACL_NEVER = 2; |
|
30 | 30 | |
31 | 31 | static protected $_permission_i = array('i_view', 'i_watermark', 'i_upload', 'i_approve', 'i_edit', 'i_delete', 'i_report', 'i_rate'); |
32 | 32 | static protected $_permission_c = array('c_read', 'c_post', 'c_edit', 'c_delete'); |
@@ -167,17 +167,17 @@ discard block |
||
167 | 167 | $sql_select .= " MAX($permission) as $permission,"; |
168 | 168 | } |
169 | 169 | |
170 | - $this->_auth_data[self::OWN_ALBUM] = new \phpbbgallery\core\auth\set(); |
|
170 | + $this->_auth_data[self::OWN_ALBUM] = new \phpbbgallery\core\auth\set(); |
|
171 | 171 | $this->_auth_data_never[self::OWN_ALBUM] = new \phpbbgallery\core\auth\set(); |
172 | 172 | $this->_auth_data[self::PERSONAL_ALBUM] = new \phpbbgallery\core\auth\set(); |
173 | - $this->_auth_data_never[self::PERSONAL_ALBUM] = new \phpbbgallery\core\auth\set(); |
|
173 | + $this->_auth_data_never[self::PERSONAL_ALBUM] = new \phpbbgallery\core\auth\set(); |
|
174 | 174 | |
175 | 175 | foreach ($albums as $album) |
176 | 176 | { |
177 | 177 | if ($album['album_user_id'] == self::PUBLIC_ALBUM) |
178 | 178 | { |
179 | - $this->_auth_data[$album['album_id']] = new \phpbbgallery\core\auth\set(); |
|
180 | - $this->_auth_data_never[$album['album_id']] = new \phpbbgallery\core\auth\set(); |
|
179 | + $this->_auth_data[$album['album_id']] = new \phpbbgallery\core\auth\set(); |
|
180 | + $this->_auth_data_never[$album['album_id']] = new \phpbbgallery\core\auth\set(); |
|
181 | 181 | } |
182 | 182 | } |
183 | 183 | |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | |
356 | 356 | $zebra = null; |
357 | 357 | |
358 | - $albums = array();//@todo $this->cache->obtain_album_list(); |
|
358 | + $albums = array(); //@todo $this->cache->obtain_album_list(); |
|
359 | 359 | foreach ($albums as $album) |
360 | 360 | { |
361 | 361 | if (!$album['album_auth_access'] || ($album['album_user_id'] == self::PUBLIC_ALBUM))# || ($album['album_user_id'] == $user_id)) |
@@ -65,9 +65,9 @@ discard block |
||
65 | 65 | |
66 | 66 | $action = $request->variable('action', ''); |
67 | 67 | $update = (isset($_POST['update'])) ? true : false; |
68 | - $album_id = $request->variable('a', 0); |
|
68 | + $album_id = $request->variable('a', 0); |
|
69 | 69 | |
70 | - $this->parent_id = $request->variable('parent_id', 0); |
|
70 | + $this->parent_id = $request->variable('parent_id', 0); |
|
71 | 71 | $album_data = $errors = array(); |
72 | 72 | if ($update && !check_form_key($form_key)) |
73 | 73 | { |
@@ -81,10 +81,10 @@ discard block |
||
81 | 81 | switch ($action) |
82 | 82 | { |
83 | 83 | case 'delete': |
84 | - $action_subalbums = $request->variable('action_subalbums', ''); |
|
85 | - $subalbums_to_id = $request->variable('subalbums_to_id', 0); |
|
86 | - $action_images = $request->variable('action_images', ''); |
|
87 | - $images_to_id = $request->variable('images_to_id', 0); |
|
84 | + $action_subalbums = $request->variable('action_subalbums', ''); |
|
85 | + $subalbums_to_id = $request->variable('subalbums_to_id', 0); |
|
86 | + $action_images = $request->variable('action_images', ''); |
|
87 | + $images_to_id = $request->variable('images_to_id', 0); |
|
88 | 88 | |
89 | 89 | $errors = $manage_albums->delete_album($album_id, $action_images, $action_subalbums, $images_to_id, $subalbums_to_id); |
90 | 90 | |
@@ -232,12 +232,12 @@ discard block |
||
232 | 232 | $acl_url = '&mode=manage&action=v_mask&album_id[]=' . $album_data['album_id']; |
233 | 233 | |
234 | 234 | $message = ($action == 'add') ? $this->language->lang('ALBUM_CREATED') : $this->language->lang('ALBUM_UPDATED'); |
235 | - $message .= '<br /><br />' . sprintf($this->language->lang('REDIRECT_ACL'), '<a href="' . $phpbb_ext_gallery_core_url->append_sid('admin' , 'index', 'i=-phpbbgallery-core-acp-permissions_module' . $acl_url) . '">', '</a>'); |
|
235 | + $message .= '<br /><br />' . sprintf($this->language->lang('REDIRECT_ACL'), '<a href="' . $phpbb_ext_gallery_core_url->append_sid('admin', 'index', 'i=-phpbbgallery-core-acp-permissions_module' . $acl_url) . '">', '</a>'); |
|
236 | 236 | |
237 | 237 | // Redirect directly to permission settings screen |
238 | 238 | if ($action == 'add' && !$album_perm_from) |
239 | 239 | { |
240 | - meta_refresh(5, $phpbb_ext_gallery_core_url->append_sid('admin' , 'index', 'i=-phpbbgallery-core-acp-permissions_module' . $acl_url)); |
|
240 | + meta_refresh(5, $phpbb_ext_gallery_core_url->append_sid('admin', 'index', 'i=-phpbbgallery-core-acp-permissions_module' . $acl_url)); |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | trigger_error($message . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id)); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | 'misc' => array('a_list', 'i_count', 'i_unlimited', 'a_count', 'a_unlimited', 'a_restrict'), |
71 | 71 | ); |
72 | 72 | $permissions->p_masks[$gallery_auth::OWN_ALBUM] = array_merge($permissions->cats[$gallery_auth::OWN_ALBUM]['i'], $permissions->cats[$gallery_auth::OWN_ALBUM]['c'], $permissions->cats[$gallery_auth::OWN_ALBUM]['m'], $permissions->cats[$gallery_auth::OWN_ALBUM]['misc']); |
73 | - $permissions->p_masks_anti[$gallery_auth::OWN_ALBUM] = array();// Note: we set i_view to 1 as default, so it's not needed on anti array('i_view'); |
|
73 | + $permissions->p_masks_anti[$gallery_auth::OWN_ALBUM] = array(); // Note: we set i_view to 1 as default, so it's not needed on anti array('i_view'); |
|
74 | 74 | |
75 | 75 | // Permissions for personal albums of other users |
76 | 76 | // Note: Do !NOT! hide the i_upload. It's used for the moving-permissions |
@@ -1244,7 +1244,7 @@ discard block |
||
1244 | 1244 | { |
1245 | 1245 | global $user, $phpbb_container; |
1246 | 1246 | |
1247 | - $phpbb_ext_gallery_core_auth = $phpbb_container->get('phpbbgallery.core.auth'); |
|
1247 | + $phpbb_ext_gallery_core_auth = $phpbb_container->get('phpbbgallery.core.auth'); |
|
1248 | 1248 | |
1249 | 1249 | $disabled = false; |
1250 | 1250 | // We submit a "wrong" array on the check (to make it more easy) so we convert it here |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | $sql = 'SELECT album_id |
134 | 134 | FROM ' . $this->track_table . ' |
135 | - WHERE user_id = ' . (int) $this->user->data['user_id'] .' |
|
135 | + WHERE user_id = ' . (int) $this->user->data['user_id'] . ' |
|
136 | 136 | AND ' . $this->db->sql_in_set('album_id', $album_id); |
137 | 137 | $result = $this->db->sql_query($sql); |
138 | 138 | |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | { |
148 | 148 | $sql = 'UPDATE ' . $this->track_table . ' |
149 | 149 | SET mark_time = ' . time() . ' |
150 | - WHERE user_id = '. (int) $this->user->data['user_id'] .' |
|
150 | + WHERE user_id = '. (int) $this->user->data['user_id'] . ' |
|
151 | 151 | AND ' . $this->db->sql_in_set('album_id', $sql_update); |
152 | 152 | $this->db->sql_query($sql); |
153 | 153 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | |
179 | 179 | $sql = 'UPDATE ' . $this->track_table . ' |
180 | 180 | SET mark_time = ' . time() . ' |
181 | - WHERE user_id = ' . (int) $this->user->data['user_id'] .' |
|
181 | + WHERE user_id = ' . (int) $this->user->data['user_id'] . ' |
|
182 | 182 | AND album_id = ' . (int) $album_id; |
183 | 183 | $this->db->sql_query($sql); |
184 | 184 |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | ), |
274 | 274 | 'params' => array( |
275 | 275 | ), |
276 | - ), 'pagination', 'page', $count, $limit, ($page-1) * $limit); |
|
276 | + ), 'pagination', 'page', $count, $limit, ($page - 1) * $limit); |
|
277 | 277 | } |
278 | 278 | else if ($album == -1) |
279 | 279 | { |
@@ -293,9 +293,9 @@ discard block |
||
293 | 293 | { |
294 | 294 | $url_array['sd'] = $additional['sort_dir']; |
295 | 295 | } |
296 | - $url = http_build_query($url_array,'','&'); |
|
296 | + $url = http_build_query($url_array, '', '&'); |
|
297 | 297 | |
298 | - $this->pagination->generate_template_pagination(append_sid('index.php?' . $url), 'pagination', 'page', $count, $limit, ($page-1) * $limit); |
|
298 | + $this->pagination->generate_template_pagination(append_sid('index.php?' . $url), 'pagination', 'page', $count, $limit, ($page - 1) * $limit); |
|
299 | 299 | } |
300 | 300 | else |
301 | 301 | { |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | 'params' => array( |
308 | 308 | 'album_id' => $album, |
309 | 309 | ), |
310 | - ), 'pagination', 'page', $count, $limit, ($page-1) * $limit); |
|
310 | + ), 'pagination', 'page', $count, $limit, ($page - 1) * $limit); |
|
311 | 311 | } |
312 | 312 | } |
313 | 313 | } |
@@ -55,7 +55,7 @@ |
||
55 | 55 | if (($albums = $this->phpbb_cache->get('_albums')) === false) |
56 | 56 | { |
57 | 57 | $sql = 'SELECT a.album_id, a.parent_id, a.album_name, a.album_type, a.left_id, a.right_id, a.album_user_id, a.display_in_rrc, a.album_auth_access |
58 | - FROM ' . $this->table_albums. ' a |
|
58 | + FROM ' . $this->table_albums . ' a |
|
59 | 59 | LEFT JOIN ' . USERS_TABLE . ' u |
60 | 60 | ON (u.user_id = a.album_user_id) |
61 | 61 | ORDER BY u.username_clean, a.album_user_id, a.left_id ASC'; |
@@ -129,12 +129,12 @@ |
||
129 | 129 | |
130 | 130 | if (isset($args[1])) |
131 | 131 | { |
132 | - $args[1] .= '';//@todo: phpbb_gallery::$display_popup; |
|
132 | + $args[1] .= ''; //@todo: phpbb_gallery::$display_popup; |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | $params = $args + array( |
136 | 136 | 0 => '', |
137 | - 1 => '',//@todo: phpbb_gallery::$display_popup, |
|
137 | + 1 => '', //@todo: phpbb_gallery::$display_popup, |
|
138 | 138 | 2 => true, |
139 | 139 | 3 => false, |
140 | 140 | ); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | function import() |
34 | 34 | { |
35 | - global $db, $template, $user, $phpbb_dispatcher, $phpbb_container, $gallery_url, $request, $table_prefix ,$gallery_config, $gallery_album, $request; |
|
35 | + global $db, $template, $user, $phpbb_dispatcher, $phpbb_container, $gallery_url, $request, $table_prefix, $gallery_config, $gallery_album, $request; |
|
36 | 36 | |
37 | 37 | $import_schema = $request->variable('import_schema', ''); |
38 | 38 | $images = $request->variable('images', array(''), true); |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | $album_id = $request->variable('album_id', 0); |
303 | 303 | if (isset($_POST['users_pega'])) |
304 | 304 | { |
305 | - $image_user = $phpbb_container->get('phpbbgallery.core.user'); |
|
305 | + $image_user = $phpbb_container->get('phpbbgallery.core.user'); |
|
306 | 306 | $image_user->set_user_id($user_row['user_id']); |
307 | 307 | if ($user->data['user_id'] != $user_row['user_id']) |
308 | 308 | { |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | } |
261 | 261 | else |
262 | 262 | { |
263 | - $s_hidden_fields = '<input type="hidden" name="action['.$action.']" value="' . $action . '" />'; |
|
263 | + $s_hidden_fields = '<input type="hidden" name="action[' . $action . ']" value="' . $action . '" />'; |
|
264 | 264 | $s_hidden_fields .= '<input type="hidden" name="back_link" value="' . $back_link . '" />'; |
265 | 265 | foreach ($approve_ary as $id => $var) |
266 | 266 | { |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | } |
362 | 362 | else |
363 | 363 | { |
364 | - $s_hidden_fields = '<input type="hidden" name="action['.$action.']" value="' . $action . '" />'; |
|
364 | + $s_hidden_fields = '<input type="hidden" name="action[' . $action . ']" value="' . $action . '" />'; |
|
365 | 365 | $s_hidden_fields .= '<input type="hidden" name="back_link" value="' . $back_link . '" />'; |
366 | 366 | foreach ($report_ary as $var) |
367 | 367 | { |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | case 'reports_close': |
584 | 584 | if (confirm_box(true)) |
585 | 585 | { |
586 | - $back_link = $this->helper->route('phpbbgallery_core_moderate_image', array('image_id' => $image_id)); |
|
586 | + $back_link = $this->helper->route('phpbbgallery_core_moderate_image', array('image_id' => $image_id)); |
|
587 | 587 | $this->report->close_reports_by_image($image_id); |
588 | 588 | $message = $this->language->lang('WAITING_REPORTED_DONE', 1); |
589 | 589 | $this->url->meta_refresh(3, $back_link); |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | 'REPORT_TIME' => $this->user->format_date($var['report_time']), |
680 | 680 | 'REPORT_NOTE' => $var['report_note'], |
681 | 681 | 'STATUS' => $var['report_status'], |
682 | - 'MANAGER' => $var['report_manager'] != 0 ? $this->user_loader->get_username($var['report_manager'], 'full') : false, |
|
682 | + 'MANAGER' => $var['report_manager'] != 0 ? $this->user_loader->get_username($var['report_manager'], 'full') : false, |
|
683 | 683 | )); |
684 | 684 | } |
685 | 685 | return $this->helper->render('gallery/moderate_image_overview.html', $this->language->lang('GALLERY')); |
@@ -804,7 +804,7 @@ discard block |
||
804 | 804 | $image_data = $this->image->get_image_data($image_id); |
805 | 805 | $album_id = $image_data['image_album_id']; |
806 | 806 | //$user_id = $image_data['image_user_id']; |
807 | - $album_data = $this->album->get_info($album_id); |
|
807 | + $album_data = $this->album->get_info($album_id); |
|
808 | 808 | $album_backlink = $this->helper->route('phpbbgallery_core_album', array('album_id' => $album_id)); |
809 | 809 | $image_backlink = $this->helper->route('phpbbgallery_core_image', array('image_id' => $image_id)); |
810 | 810 | $album_loginlink = append_sid($this->root_path . 'ucp.' . $this->php_ext . '?mode=login'); |
@@ -852,7 +852,7 @@ discard block |
||
852 | 852 | $image_data = $this->image->get_image_data($image_id); |
853 | 853 | $album_id = $image_data['image_album_id']; |
854 | 854 | //$user_id = $image_data['image_user_id']; |
855 | - $album_data = $this->album->get_info($album_id); |
|
855 | + $album_data = $this->album->get_info($album_id); |
|
856 | 856 | $album_backlink = $this->helper->route('phpbbgallery_core_album', array('album_id' => $album_id)); |
857 | 857 | $image_backlink = $this->helper->route('phpbbgallery_core_image', array('image_id' => $image_id)); |
858 | 858 | $album_loginlink = append_sid($this->root_path . 'ucp.' . $this->php_ext . '?mode=login'); |
@@ -868,7 +868,7 @@ discard block |
||
868 | 868 | $image_id_ary = array($image_id); |
869 | 869 | $this->image->lock_images($image_id_ary, $album_data['album_id']); |
870 | 870 | // To DO - add notification |
871 | - $message = sprintf($this->language->lang('WAITING_LOCKED_IMAGE',1)); |
|
871 | + $message = sprintf($this->language->lang('WAITING_LOCKED_IMAGE', 1)); |
|
872 | 872 | meta_refresh($meta_refresh_time, $image_backlink); |
873 | 873 | trigger_error($message); |
874 | 874 | } |