@@ -23,13 +23,13 @@ discard block |
||
23 | 23 | * |
24 | 24 | * Constants defining some album properties |
25 | 25 | */ |
26 | - const PUBLIC_ALBUM = 0; |
|
26 | + const PUBLIC_ALBUM = 0; |
|
27 | 27 | |
28 | - const TYPE_CAT = 0; |
|
29 | - const TYPE_UPLOAD = 1; |
|
28 | + const TYPE_CAT = 0; |
|
29 | + const TYPE_UPLOAD = 1; |
|
30 | 30 | const TYPE_CONTEST = 2; |
31 | 31 | |
32 | - const ALBUM_OPEN = 0; |
|
32 | + const ALBUM_OPEN = 0; |
|
33 | 33 | const ALBUM_LOCKED = 1; |
34 | 34 | |
35 | 35 | /** |
@@ -58,22 +58,22 @@ discard block |
||
58 | 58 | /** |
59 | 59 | * Only visible for moderators. |
60 | 60 | */ |
61 | - const STATUS_UNAPPROVED = 0; |
|
61 | + const STATUS_UNAPPROVED = 0; |
|
62 | 62 | |
63 | 63 | /** |
64 | 64 | * Visible for everyone with the i_view-permissions |
65 | 65 | */ |
66 | - const STATUS_APPROVED = 1; |
|
66 | + const STATUS_APPROVED = 1; |
|
67 | 67 | |
68 | 68 | /** |
69 | 69 | * Visible for everyone with the i_view-permissions, but only moderators can comment. |
70 | 70 | */ |
71 | - const STATUS_LOCKED = 2; |
|
71 | + const STATUS_LOCKED = 2; |
|
72 | 72 | |
73 | 73 | /** |
74 | 74 | * Orphan files are only visible for their author, because they're not yet ready uploaded. |
75 | 75 | */ |
76 | - const STATUS_ORPHAN = 3; |
|
76 | + const STATUS_ORPHAN = 3; |
|
77 | 77 | |
78 | 78 | /** |
79 | 79 | * Constants regarding the image contest relation |
@@ -316,7 +316,7 @@ |
||
316 | 316 | |
317 | 317 | public function generate_image_src() |
318 | 318 | { |
319 | - $this->image_src = $this->path . $this->data['image_filename']; |
|
319 | + $this->image_src = $this->path . $this->data['image_filename']; |
|
320 | 320 | |
321 | 321 | if ($this->data['image_filemissing'] || !file_exists($this->path_source . $this->data['image_filename'])) |
322 | 322 | { |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | 'U_IMAGENAME' => ($last_image['image_id'] > 0) ? $last_image['image_name'] : false, |
160 | 160 | 'U_IMAGE_ACTION' => $action_image, |
161 | 161 | 'U_IMAGENAME_ACTION' => $this->helper->route('phpbbgallery_core_image', array('image_id' => $last_image['image_id'])), |
162 | - 'U_TIME' => ($last_image['image_id'] > 0) ? $this->user->format_date($last_image['image_time']) : false, |
|
162 | + 'U_TIME' => ($last_image['image_id'] > 0) ? $this->user->format_date($last_image['image_time']) : false, |
|
163 | 163 | 'U_UPLOADER' => ($last_image['image_id'] > 0) ? get_username_string('full', $last_image['image_user_id'], $last_image['image_username'], $last_image['image_user_colour']) : false, |
164 | 164 | )); |
165 | 165 | $this->gallery_user->set_user_id($this->user->data['user_id']); |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | 'TOTAL_IMAGES' => ($this->gallery_config->get('disp_statistic')) ? $this->language->lang('TOTAL_IMAGES_SPRINTF', $this->gallery_config->get('num_images')) : '', |
319 | 319 | 'TOTAL_COMMENTS' => ($this->gallery_config->get('allow_comments')) ? $this->language->lang('TOTAL_COMMENTS_SPRINTF', $this->gallery_config->get('num_comments')) : '', |
320 | 320 | 'TOTAL_PGALLERIES' => ($this->gallery_auth->acl_check('a_list', \phpbbgallery\core\auth\auth::PERSONAL_ALBUM)) ? $this->language->lang('TOTAL_PEGAS_SPRINTF', $this->gallery_config->get('num_pegas')) : '', |
321 | - 'NEWEST_PGALLERIES' => ($this->gallery_config->get('num_pegas')) ? sprintf($this->language->lang('NEWEST_PGALLERY'), '<a href="' . $this->helper->route('phpbbgallery_core_album', array('album_id' => $this->gallery_config->get('newest_pega_album_id'))) . '" '. ($this->gallery_config->get('newest_pega_user_colour') ? 'class="username-coloured" style="color: #' . $this->gallery_config->get('newest_pega_user_colour') . ';"' : 'class="username"') . '>' . $this->gallery_config->get('newest_pega_username') . '</a>') : '', |
|
321 | + 'NEWEST_PGALLERIES' => ($this->gallery_config->get('num_pegas')) ? sprintf($this->language->lang('NEWEST_PGALLERY'), '<a href="' . $this->helper->route('phpbbgallery_core_album', array('album_id' => $this->gallery_config->get('newest_pega_album_id'))) . '" ' . ($this->gallery_config->get('newest_pega_user_colour') ? 'class="username-coloured" style="color: #' . $this->gallery_config->get('newest_pega_user_colour') . ';"' : 'class="username"') . '>' . $this->gallery_config->get('newest_pega_username') . '</a>') : '', |
|
322 | 322 | )); |
323 | 323 | |
324 | 324 | $this->template->assign_vars(array( |
@@ -416,9 +416,9 @@ discard block |
||
416 | 416 | |
417 | 417 | while ($row = $this->db->sql_fetchrow($result)) |
418 | 418 | { |
419 | - $birthday_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']); |
|
420 | - $birthday_year = (int) substr($row['user_birthday'], -4); |
|
421 | - $birthday_age = ($birthday_year) ? max(0, $now['year'] - $birthday_year) : ''; |
|
419 | + $birthday_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']); |
|
420 | + $birthday_year = (int) substr($row['user_birthday'], -4); |
|
421 | + $birthday_age = ($birthday_year) ? max(0, $now['year'] - $birthday_year) : ''; |
|
422 | 422 | |
423 | 423 | $this->template->assign_block_vars('birthdays', array( |
424 | 424 | 'USERNAME' => $birthday_username, |
@@ -197,8 +197,8 @@ discard block |
||
197 | 197 | include_once($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext); |
198 | 198 | } |
199 | 199 | |
200 | - $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
201 | - $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
200 | + $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
201 | + $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
202 | 202 | $img_status = ($bbcode_status) ? true : false; |
203 | 203 | $url_status = ($this->config['allow_post_links']) ? true : false; |
204 | 204 | $flash_status = false; |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | } |
306 | 306 | |
307 | 307 | $message_parser = new \parse_message(); |
308 | - $message_parser->message = utf8_normalize_nfc($comment_plain); |
|
308 | + $message_parser->message = utf8_normalize_nfc($comment_plain); |
|
309 | 309 | if ($message_parser->message) |
310 | 310 | { |
311 | 311 | $message_parser->parse(true, true, true, true, false, true, true, true); |
@@ -464,8 +464,8 @@ discard block |
||
464 | 464 | include_once($this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext); |
465 | 465 | } |
466 | 466 | |
467 | - $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
468 | - $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
467 | + $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
468 | + $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
469 | 469 | $img_status = ($bbcode_status) ? true : false; |
470 | 470 | $url_status = ($this->config['allow_post_links']) ? true : false; |
471 | 471 | $flash_status = false; |
@@ -678,8 +678,8 @@ discard block |
||
678 | 678 | include_once($this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext); |
679 | 679 | } |
680 | 680 | |
681 | - $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
682 | - $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
681 | + $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
682 | + $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
683 | 683 | $img_status = ($bbcode_status) ? true : false; |
684 | 684 | $url_status = ($this->config['allow_post_links']) ? true : false; |
685 | 685 | $flash_status = false; |
@@ -759,7 +759,7 @@ discard block |
||
759 | 759 | 'IMAGE_NAME' => $image_data['image_name'], |
760 | 760 | |
761 | 761 | 'S_SIGNATURE_CHECKED' => (isset($sig_checked) && $sig_checked) ? ' checked="checked"' : '', |
762 | - 'S_ALBUM_ACTION' => append_sid($this->url->path('full') . 'comment/' . (int) $image_id . '/edit/'. (int) $comment_id), |
|
762 | + 'S_ALBUM_ACTION' => append_sid($this->url->path('full') . 'comment/' . (int) $image_id . '/edit/' . (int) $comment_id), |
|
763 | 763 | )); |
764 | 764 | |
765 | 765 | if ($submit && !$error) |
@@ -808,8 +808,8 @@ discard block |
||
808 | 808 | include_once($this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext); |
809 | 809 | } |
810 | 810 | |
811 | - $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
812 | - $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
811 | + $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
812 | + $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
813 | 813 | $img_status = ($bbcode_status) ? true : false; |
814 | 814 | $url_status = ($this->config['allow_post_links']) ? true : false; |
815 | 815 | $flash_status = false; |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | } |
167 | 167 | else |
168 | 168 | { |
169 | - $contest_data['contest_start'] = gmmktime((int) $m[4], (int) $m[5], 0, (int) $m[2], (int) $m[3], (int) $m[1]) - $time->getOffset();// - $offset; |
|
169 | + $contest_data['contest_start'] = gmmktime((int) $m[4], (int) $m[5], 0, (int) $m[2], (int) $m[3], (int) $m[1]) - $time->getOffset(); // - $offset; |
|
170 | 170 | } |
171 | 171 | if (!preg_match('#(\\d{4})-(\\d{1,2})-(\\d{1,2}) (\\d{1,2}):(\\d{2})#', $contest_data['contest_rating'], $m)) |
172 | 172 | { |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | } |
176 | 176 | else if (!$start_date_error) |
177 | 177 | { |
178 | - $contest_data['contest_rating'] = gmmktime($m[4], $m[5], 0, $m[2], $m[3], $m[1]) - $contest_data['contest_start'] - $time->getOffset();//- $offset; |
|
178 | + $contest_data['contest_rating'] = gmmktime($m[4], $m[5], 0, $m[2], $m[3], $m[1]) - $contest_data['contest_start'] - $time->getOffset(); //- $offset; |
|
179 | 179 | } |
180 | 180 | if (!preg_match('#(\\d{4})-(\\d{1,2})-(\\d{1,2}) (\\d{1,2}):(\\d{2})#', $contest_data['contest_end'], $m)) |
181 | 181 | { |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | } |
185 | 185 | else if (!$start_date_error) |
186 | 186 | { |
187 | - $contest_data['contest_end'] = gmmktime($m[4], $m[5], 0, $m[2], $m[3], $m[1]) - $contest_data['contest_start'] - $time->getOffset();//- $offset; |
|
187 | + $contest_data['contest_end'] = gmmktime($m[4], $m[5], 0, $m[2], $m[3], $m[1]) - $contest_data['contest_start'] - $time->getOffset(); //- $offset; |
|
188 | 188 | } |
189 | 189 | if (!$start_date_error && !$date_error) |
190 | 190 | { |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | $album_data = $this->gallery_album->get_info($album_id); |
711 | 711 | |
712 | 712 | $sql = 'UPDATE ' . $this->albums_table . ' |
713 | - SET parent_id = ' . (int) $subalbums_to_id .' |
|
713 | + SET parent_id = ' . (int) $subalbums_to_id . ' |
|
714 | 714 | WHERE parent_id = ' . (int) $album_id . ' |
715 | 715 | AND album_user_id = ' . (int) $this->user_id; |
716 | 716 | $this->db->sql_query($sql); |
@@ -738,13 +738,13 @@ discard block |
||
738 | 738 | // Resync tree |
739 | 739 | $sql = 'UPDATE ' . $this->albums_table . ' |
740 | 740 | SET right_id = right_id - ' . (int) $diff . ' |
741 | - WHERE left_id < ' . (int) $album_data['right_id'] . ' AND right_id > ' . (int) $album_data['right_id']. ' |
|
741 | + WHERE left_id < ' . (int) $album_data['right_id'] . ' AND right_id > ' . (int) $album_data['right_id'] . ' |
|
742 | 742 | AND album_user_id = ' . (int) $this->user_id; |
743 | 743 | $this->db->sql_query($sql); |
744 | 744 | |
745 | 745 | $sql = 'UPDATE ' . $this->albums_table . ' |
746 | 746 | SET left_id = left_id - ' . (int) $diff . ', right_id = right_id - ' . (int) $diff . ' |
747 | - WHERE left_id > ' . (int) $album_data['right_id']. ' |
|
747 | + WHERE left_id > ' . (int) $album_data['right_id'] . ' |
|
748 | 748 | AND album_user_id = ' . (int) $this->user_id; |
749 | 749 | $this->db->sql_query($sql); |
750 | 750 | |
@@ -1037,7 +1037,7 @@ discard block |
||
1037 | 1037 | // Now do the dirty job |
1038 | 1038 | $sql = 'UPDATE ' . $this->albums_table . ' |
1039 | 1039 | SET left_id = left_id + CASE |
1040 | - WHEN left_id BETWEEN ' . (int) $move_up_left . ' AND ' . (int) $move_up_right . ' THEN -' .(int) $diff_up . ' |
|
1040 | + WHEN left_id BETWEEN ' . (int) $move_up_left . ' AND ' . (int) $move_up_right . ' THEN -' . (int) $diff_up . ' |
|
1041 | 1041 | ELSE ' .(int) $diff_down . ' |
1042 | 1042 | END, |
1043 | 1043 | right_id = right_id + CASE |
@@ -294,13 +294,13 @@ |
||
294 | 294 | |
295 | 295 | if (($this->image_size['height'] / $max_height) > ($this->image_size['width'] / $max_width)) |
296 | 296 | { |
297 | - $this->thumb_height = $max_height; |
|
298 | - $this->thumb_width = round($max_width * (($this->image_size['width'] / $max_width) / ($this->image_size['height'] / $max_height))); |
|
297 | + $this->thumb_height = $max_height; |
|
298 | + $this->thumb_width = round($max_width * (($this->image_size['width'] / $max_width) / ($this->image_size['height'] / $max_height))); |
|
299 | 299 | } |
300 | 300 | else |
301 | 301 | { |
302 | - $this->thumb_height = round($max_height * (($this->image_size['height'] / $max_height) / ($this->image_size['width'] / $max_width))); |
|
303 | - $this->thumb_width = $max_width; |
|
302 | + $this->thumb_height = round($max_height * (($this->image_size['height'] / $max_height) / ($this->image_size['width'] / $max_width))); |
|
303 | + $this->thumb_width = $max_width; |
|
304 | 304 | } |
305 | 305 | |
306 | 306 | $image_copy = (($this->gd_version == self::GDLIB1) ? @imagecreate($this->thumb_width, $this->thumb_height + $additional_height) : @imagecreatetruecolor($this->thumb_width, $this->thumb_height + $additional_height)); |
@@ -122,13 +122,13 @@ |
||
122 | 122 | } |
123 | 123 | if ($recent) |
124 | 124 | { |
125 | - $block_name = $this->language->lang('RECENT_IMAGES'); |
|
125 | + $block_name = $this->language->lang('RECENT_IMAGES'); |
|
126 | 126 | $u_block = ' '; |
127 | 127 | $this->gallery_search->recent($this->gallery_config->get('rrc_profile_items'), -1, $event['member']['user_id'], 'rrc_profile_display', $block_name, $u_block); |
128 | 128 | } |
129 | 129 | if ($random) |
130 | 130 | { |
131 | - $block_name = $this->language->lang('RANDOM_IMAGES'); |
|
131 | + $block_name = $this->language->lang('RANDOM_IMAGES'); |
|
132 | 132 | $u_block = ' '; |
133 | 133 | $this->gallery_search->random($this->gallery_config->get('rrc_profile_items'), $event['member']['user_id'], 'rrc_profile_display', $block_name, $u_block); |
134 | 134 | } |
@@ -94,7 +94,7 @@ |
||
94 | 94 | 'comment_time' => time(), |
95 | 95 | ); |
96 | 96 | |
97 | - $this->db->sql_query('INSERT INTO ' .$this->comments_table .' ' . $this->db->sql_build_array('INSERT', $data)); |
|
97 | + $this->db->sql_query('INSERT INTO ' . $this->comments_table . ' ' . $this->db->sql_build_array('INSERT', $data)); |
|
98 | 98 | $newest_comment_id = (int) $this->db->sql_nextid(); |
99 | 99 | $this->config->inc('num_comments', 1); |
100 | 100 |
@@ -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)) |