@@ -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'; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $phpbb_gallery_url = $phpbb_container->get('phpbbgallery.core.url'); |
28 | 28 | $phpbb_gallery_url->_include('functions_display', 'phpbb'); |
29 | 29 | |
30 | - $phpbb_ext_gallery_core_album =$phpbb_container->get('phpbbgallery.core.album'); |
|
30 | + $phpbb_ext_gallery_core_album = $phpbb_container->get('phpbbgallery.core.album'); |
|
31 | 31 | |
32 | 32 | $phpbb_ext_gallery_core_auth = $phpbb_container->get('phpbbgallery.core.auth'); |
33 | 33 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | |
152 | 152 | function initialise_album() |
153 | 153 | { |
154 | - global $cache, $db, $user, $phpbb_ext_gallery_core_auth, $phpbb_ext_gallery_core_album, $phpbb_ext_gallery_config, $albums_table, $phpbb_ext_gallery_user; |
|
154 | + global $cache, $db, $user, $phpbb_ext_gallery_core_auth, $phpbb_ext_gallery_core_album, $phpbb_ext_gallery_config, $albums_table, $phpbb_ext_gallery_user; |
|
155 | 155 | global $request, $users_table, $phpbb_container; |
156 | 156 | |
157 | 157 | // we will have to initialse $phpbb_ext_gallery_user |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | |
446 | 446 | $this->language = $phpbb_container->get('language'); |
447 | 447 | |
448 | - $phpbb_gallery_url->_include(array('bbcode','message_parser'), 'phpbb'); |
|
448 | + $phpbb_gallery_url->_include(array('bbcode', 'message_parser'), 'phpbb'); |
|
449 | 449 | |
450 | 450 | $album_id = $request->variable('album_id', 0); |
451 | 451 | $phpbb_ext_gallery_core_album->check_user($album_id); |
@@ -828,7 +828,7 @@ discard block |
||
828 | 828 | $sql = 'UPDATE ' . $albums_table . " |
829 | 829 | SET right_id = right_id - $delete_id |
830 | 830 | WHERE right_id > $right_id |
831 | - AND album_user_id = ". (int) $user->data['user_id']; |
|
831 | + AND album_user_id = " . (int) $user->data['user_id']; |
|
832 | 832 | $db->sql_query($sql); |
833 | 833 | } |
834 | 834 | |
@@ -1012,9 +1012,9 @@ discard block |
||
1012 | 1012 | $db->sql_freeresult($result); |
1013 | 1013 | |
1014 | 1014 | // Subscribed images |
1015 | - $start = $request->variable('start', 0); |
|
1016 | - $images_per_page = $phpbb_ext_gallery_config->get('items_per_page'); |
|
1017 | - $total_images = 0; |
|
1015 | + $start = $request->variable('start', 0); |
|
1016 | + $images_per_page = $phpbb_ext_gallery_config->get('items_per_page'); |
|
1017 | + $total_images = 0; |
|
1018 | 1018 | |
1019 | 1019 | $sql = 'SELECT COUNT(image_id) as images |
1020 | 1020 | FROM ' . $watch_table . ' |
@@ -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 | { |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | 'EXIF_CAM_MODEL' => 'Camera-model', |
31 | 31 | 'EXIF_DATE' => 'Image taken on', |
32 | 32 | 'EXIF_EXPOSURE' => 'Shutter speed', |
33 | - 'EXIF_EXPOSURE_EXP' => '%s Sec',// 'EXIF_EXPOSURE' unit |
|
33 | + 'EXIF_EXPOSURE_EXP' => '%s Sec', // 'EXIF_EXPOSURE' unit |
|
34 | 34 | 'EXIF_EXPOSURE_BIAS' => 'Exposure bias', |
35 | - 'EXIF_EXPOSURE_BIAS_EXP' => '%s EV',// 'EXIF_EXPOSURE_BIAS' unit |
|
35 | + 'EXIF_EXPOSURE_BIAS_EXP' => '%s EV', // 'EXIF_EXPOSURE_BIAS' unit |
|
36 | 36 | 'EXIF_EXPOSURE_PROG' => 'Exposure program', |
37 | 37 | 'EXIF_EXPOSURE_PROG_0' => 'Not defined', |
38 | 38 | 'EXIF_EXPOSURE_PROG_1' => 'Manual', |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | 'EXIF_FLASH_CASE_93' => 'Flash fired, auto mode, return light not detected, red-eye reduction mode', |
73 | 73 | 'EXIF_FLASH_CASE_95' => 'Flash fired, auto mode, return light detected, red-eye reduction mode', |
74 | 74 | 'EXIF_FOCAL' => 'Focus length', |
75 | - 'EXIF_FOCAL_EXP' => '%s mm',// 'EXIF_FOCAL' unit |
|
75 | + 'EXIF_FOCAL_EXP' => '%s mm', // 'EXIF_FOCAL' unit |
|
76 | 76 | 'EXIF_ISO' => 'ISO speed rating', |
77 | 77 | 'EXIF_METERING_MODE' => 'Metering mode', |
78 | 78 | 'EXIF_METERING_MODE_0' => 'Unknown', |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | public function base($image_id, $page = 0) |
229 | 229 | { |
230 | 230 | |
231 | - $this->language->add_lang( array('gallery'), 'phpbbgallery/core'); |
|
231 | + $this->language->add_lang(array('gallery'), 'phpbbgallery/core'); |
|
232 | 232 | try |
233 | 233 | { |
234 | 234 | $sql = 'SELECT * |
@@ -508,8 +508,8 @@ discard block |
||
508 | 508 | $this->language->add_lang('posting'); |
509 | 509 | $this->url->_include('functions_posting', 'phpbb'); |
510 | 510 | |
511 | - $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
512 | - $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
511 | + $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
512 | + $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
513 | 513 | $img_status = ($bbcode_status) ? true : false; |
514 | 514 | $url_status = ($this->config['allow_post_links']) ? true : false; |
515 | 515 | $flash_status = false; |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | if ($this->users_data_array[$poster_id]['sig'] && empty($this->users_data_array[$poster_id]['sig_parsed'])) |
668 | 668 | { |
669 | 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); |
|
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 | 671 | $user_cache[$poster_id]['sig_parsed'] = true; |
672 | 672 | } |
673 | 673 | |
@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | include_once($this->phpbb_root_path . 'includes/message_parser.' . $this->php_ext); |
847 | 847 | } |
848 | 848 | $message_parser = new \parse_message(); |
849 | - $message_parser->message = utf8_normalize_nfc($image_desc); |
|
849 | + $message_parser->message = utf8_normalize_nfc($image_desc); |
|
850 | 850 | if ($message_parser->message) |
851 | 851 | { |
852 | 852 | $message_parser->parse(true, true, true, true, false, true, true, true); |
@@ -1002,8 +1002,8 @@ discard block |
||
1002 | 1002 | { |
1003 | 1003 | include_once($this->phpbb_root_path . 'includes/message_parser.' . $this->php_ext); |
1004 | 1004 | } |
1005 | - $message_parser = new \parse_message(); |
|
1006 | - $message_parser->message = $disp_image_data['image_desc']; |
|
1005 | + $message_parser = new \parse_message(); |
|
1006 | + $message_parser->message = $disp_image_data['image_desc']; |
|
1007 | 1007 | $message_parser->decode_message($disp_image_data['image_desc_uid']); |
1008 | 1008 | |
1009 | 1009 | $page_title = $disp_image_data['image_name']; |
@@ -141,24 +141,24 @@ discard block |
||
141 | 141 | |
142 | 142 | public function base($page = 1) |
143 | 143 | { |
144 | - $search_id = $this->request->variable('search_id', ''); |
|
144 | + $search_id = $this->request->variable('search_id', ''); |
|
145 | 145 | $image_id = $this->request->variable('image_id', 0); |
146 | 146 | |
147 | - $submit = $this->request->variable('submit', false); |
|
147 | + $submit = $this->request->variable('submit', false); |
|
148 | 148 | $keywords = utf8_normalize_nfc($this->request->variable('keywords', '', true)); |
149 | 149 | $add_keywords = utf8_normalize_nfc($this->request->variable('add_keywords', '', true)); |
150 | 150 | $username = $this->request->variable('username', '', true); |
151 | - $user_id = $this->request->variable('user_id', array(0)); |
|
151 | + $user_id = $this->request->variable('user_id', array(0)); |
|
152 | 152 | $search_terms = $this->request->variable('terms', 'all'); |
153 | 153 | $search_album = $this->request->variable('aid', array(0)); |
154 | 154 | $search_child = $this->request->variable('sc', true); |
155 | - $search_fields = $this->request->variable('sf', 'all'); |
|
156 | - $sort_days = $this->request->variable('st', 0); |
|
155 | + $search_fields = $this->request->variable('sf', 'all'); |
|
156 | + $sort_days = $this->request->variable('st', 0); |
|
157 | 157 | $sort_key = $this->request->variable('sk', 't'); |
158 | 158 | $sort_dir = $this->request->variable('sd', 'd'); |
159 | 159 | |
160 | - $start = ($page - 1) * $this->gallery_config->get('items_per_page'); |
|
161 | - if ($keywords != '' && $add_keywords ='' ) |
|
160 | + $start = ($page - 1) * $this->gallery_config->get('items_per_page'); |
|
161 | + if ($keywords != '' && $add_keywords = '') |
|
162 | 162 | { |
163 | 163 | $submit = true; |
164 | 164 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | if ($this->gallery_config->get('allow_rates')) |
175 | 175 | { |
176 | 176 | $sort_by_text['ra'] = $this->language->lang('RATING'); |
177 | - $sort_by_sql['ra'] = 'image_rate_points';//@todo: (phpbb_gallery_contest::$mode == phpbb_gallery_contest::MODE_SUM) ? 'image_rate_points' : 'image_rate_avg'; |
|
177 | + $sort_by_sql['ra'] = 'image_rate_points'; //@todo: (phpbb_gallery_contest::$mode == phpbb_gallery_contest::MODE_SUM) ? 'image_rate_points' : 'image_rate_avg'; |
|
178 | 178 | $sort_by_text['r'] = $this->language->lang('RATES_COUNT'); |
179 | 179 | $sort_by_sql['r'] = 'image_rates'; |
180 | 180 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | { |
206 | 206 | trigger_error(sprintf($this->language->lang('TOO_FEW_AUTHOR_CHARS'), $this->config['min_search_author_chars'])); |
207 | 207 | } |
208 | - $username_parsed = (strpos($username, '*') !== false) ? ' username_clean ' . $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), utf8_clean_string($this->db->sql_escape($username)))) : ' username_clean = \'' . $this->db->sql_escape(utf8_clean_string($username)) .'\''; |
|
208 | + $username_parsed = (strpos($username, '*') !== false) ? ' username_clean ' . $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), utf8_clean_string($this->db->sql_escape($username)))) : ' username_clean = \'' . $this->db->sql_escape(utf8_clean_string($username)) . '\''; |
|
209 | 209 | $sql = 'SELECT user_id |
210 | 210 | FROM ' . USERS_TABLE . ' |
211 | 211 | WHERE ' . $username_parsed . ' |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | if (!empty($user_id)) |
225 | 225 | { |
226 | - $sql_where[] = $this->db->sql_in_set('i.image_user_id', $user_id); |
|
226 | + $sql_where[] = $this->db->sql_in_set('i.image_user_id', $user_id); |
|
227 | 227 | } |
228 | 228 | // if we search in an existing search result just add the additional keywords. But we need to use "all search terms"-mode |
229 | 229 | // so we can keep the old keywords in their old mode, but add the new ones as required words |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | else |
237 | 237 | { |
238 | 238 | $search_terms = 'all'; |
239 | - $keywords = preg_replace('#\s+#u', ' |', $keywords) . ' ' .$add_keywords; |
|
239 | + $keywords = preg_replace('#\s+#u', ' |', $keywords) . ' ' . $add_keywords; |
|
240 | 240 | } |
241 | 241 | } |
242 | 242 | $keywords_ary = ($keywords) ? explode(' ', $keywords) : array(); |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | $match_search_query = ''; |
262 | 262 | foreach ($matches as $match) |
263 | 263 | { |
264 | - $match_search_query .= (($match_search_query) ? ' OR ' : '') . 'LOWER('. $match . ') '; |
|
264 | + $match_search_query .= (($match_search_query) ? ' OR ' : '') . 'LOWER(' . $match . ') '; |
|
265 | 265 | $match_search_query .= $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), $this->db->get_any_char() . mb_strtolower($word) . $this->db->get_any_char())); |
266 | 266 | } |
267 | 267 | $search_query .= ((!$search_query) ? '' : (($search_terms == 'all') ? ' AND ' : ' OR ')) . '(' . $match_search_query . ')'; |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | trigger_error('NO_SEARCH_RESULTS'); |
291 | 291 | } |
292 | 292 | $sql_array['SELECT'] = '*, a.album_name, a.album_status, a.album_user_id, a.album_id'; |
293 | - $sql_array['LEFT_JOIN'] = array( |
|
293 | + $sql_array['LEFT_JOIN'] = array( |
|
294 | 294 | array( |
295 | 295 | 'FROM' => array($this->albums_table => 'a'), |
296 | 296 | 'ON' => 'a.album_id = i.image_album_id', |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | { |
319 | 319 | $this->image->assign_block('imageblock.image', $row, $show_options, $thumbnail_link, $imagename_link); |
320 | 320 | } |
321 | - $current_page = $page*$this->gallery_config->get('items_per_page'); |
|
321 | + $current_page = $page * $this->gallery_config->get('items_per_page'); |
|
322 | 322 | $this->pagination->generate_template_pagination(array( |
323 | 323 | 'routes' => array( |
324 | 324 | 'phpbbgallery_core_search', |