@@ -95,8 +95,7 @@ discard block |
||
95 | 95 | 'U_SOURCE_DIR_STATE' => $this->language->lang('NO_WRITE_ACCESS'), |
96 | 96 | 'U_SOURCE_DIR_STATE_ERROR' => 1, |
97 | 97 | )); |
98 | - } |
|
99 | - else |
|
98 | + } else |
|
100 | 99 | { |
101 | 100 | $template->assign_vars(array( |
102 | 101 | 'U_FILE_DIR_STATE' => $this->language->lang('WRITE_ACCESS'), |
@@ -109,15 +108,13 @@ discard block |
||
109 | 108 | 'U_CORE_DIR_STATE' => $this->language->lang('DIR_CREATED'), |
110 | 109 | 'U_CORE_DIR_STATE_ERROR' => 0, |
111 | 110 | )); |
112 | - } |
|
113 | - else if (is_writable($phpbbgallery_core_file)) |
|
111 | + } else if (is_writable($phpbbgallery_core_file)) |
|
114 | 112 | { |
115 | 113 | $template->assign_vars(array( |
116 | 114 | 'U_CORE_DIR_STATE' => $this->language->lang('WRITE_ACCESS'), |
117 | 115 | 'U_CORE_DIR_STATE_ERROR' => 0, |
118 | 116 | )); |
119 | - } |
|
120 | - else |
|
117 | + } else |
|
121 | 118 | { |
122 | 119 | $template->assign_vars(array( |
123 | 120 | 'U_CORE_DIR_STATE' => $this->language->lang('NO_WRITE_ACCESS'), |
@@ -131,15 +128,13 @@ discard block |
||
131 | 128 | 'U_MEDIUM_DIR_STATE' => $this->language->lang('DIR_CREATED'), |
132 | 129 | 'U_MEDIUM_DIR_STATE_ERROR' => 0, |
133 | 130 | )); |
134 | - } |
|
135 | - else if (is_writable($phpbbgallery_core_file_medium)) |
|
131 | + } else if (is_writable($phpbbgallery_core_file_medium)) |
|
136 | 132 | { |
137 | 133 | $template->assign_vars(array( |
138 | 134 | 'U_MEDIUM_DIR_STATE' => $this->language->lang('WRITE_ACCESS'), |
139 | 135 | 'U_MEDIUM_DIR_STATE_ERROR' => 0, |
140 | 136 | )); |
141 | - } |
|
142 | - else |
|
137 | + } else |
|
143 | 138 | { |
144 | 139 | $template->assign_vars(array( |
145 | 140 | 'U_MEDIUM_DIR_STATE' => $this->language->lang('NO_WRITE_ACCESS'), |
@@ -153,15 +148,13 @@ discard block |
||
153 | 148 | 'U_MINI_DIR_STATE' => $this->language->lang('DIR_CREATED'), |
154 | 149 | 'U_MINI_DIR_STATE_ERROR' => 0, |
155 | 150 | )); |
156 | - } |
|
157 | - else if (is_writable($phpbbgallery_core_file_mini)) |
|
151 | + } else if (is_writable($phpbbgallery_core_file_mini)) |
|
158 | 152 | { |
159 | 153 | $template->assign_vars(array( |
160 | 154 | 'U_MINI_DIR_STATE' => $this->language->lang('WRITE_ACCESS'), |
161 | 155 | 'U_MINI_DIR_STATE_ERROR' => 0, |
162 | 156 | )); |
163 | - } |
|
164 | - else |
|
157 | + } else |
|
165 | 158 | { |
166 | 159 | $template->assign_vars(array( |
167 | 160 | 'U_MINI_DIR_STATE' => $this->language->lang('NO_WRITE_ACCESS'), |
@@ -175,15 +168,13 @@ discard block |
||
175 | 168 | 'U_SOURCE_DIR_STATE' => $this->language->lang('DIR_CREATED'), |
176 | 169 | 'U_SOURCE_DIR_STATE_ERROR' => 0, |
177 | 170 | )); |
178 | - } |
|
179 | - else if (is_writable($phpbbgallery_core_file_source)) |
|
171 | + } else if (is_writable($phpbbgallery_core_file_source)) |
|
180 | 172 | { |
181 | 173 | $template->assign_vars(array( |
182 | 174 | 'U_SOURCE_DIR_STATE' => $this->language->lang('WRITE_ACCESS'), |
183 | 175 | 'U_SOURCE_DIR_STATE_ERROR' => 0, |
184 | 176 | )); |
185 | - } |
|
186 | - else |
|
177 | + } else |
|
187 | 178 | { |
188 | 179 | $template->assign_vars(array( |
189 | 180 | 'U_SOURCE_DIR_STATE' => $this->language->lang('NO_WRITE_ACCESS'), |
@@ -282,8 +273,7 @@ discard block |
||
282 | 273 | 'reset_album_id' => $album_id, |
283 | 274 | ))); |
284 | 275 | } |
285 | - } |
|
286 | - else |
|
276 | + } else |
|
287 | 277 | { |
288 | 278 | switch ($action) |
289 | 279 | { |
@@ -42,8 +42,7 @@ |
||
42 | 42 | if (confirm_box(true)) |
43 | 43 | { |
44 | 44 | $log->delete_logs($marked); |
45 | - } |
|
46 | - else |
|
45 | + } else |
|
47 | 46 | { |
48 | 47 | confirm_box(false, $this->language->lang('CONFIRM_OPERATION'), build_hidden_fields(array( |
49 | 48 | 'page' => $page, |
@@ -72,14 +72,12 @@ discard block |
||
72 | 72 | if ($login_explain && isset($this->user->lang[$login_explain])) |
73 | 73 | { |
74 | 74 | $login_explain = $this->user->lang($login_explain); |
75 | - } |
|
76 | - else |
|
75 | + } else |
|
77 | 76 | { |
78 | 77 | $login_explain = ''; |
79 | 78 | } |
80 | 79 | login_box($loginlink, $login_explain); |
81 | - } |
|
82 | - else |
|
80 | + } else |
|
83 | 81 | { |
84 | 82 | $this->url->meta_refresh(3, $backlink); |
85 | 83 | trigger_error('NOT_AUTHORISED'); |
@@ -121,8 +119,7 @@ discard block |
||
121 | 119 | } |
122 | 120 | |
123 | 121 | return; |
124 | - } |
|
125 | - else if ($mode == 'albums') |
|
122 | + } else if ($mode == 'albums') |
|
126 | 123 | { |
127 | 124 | // Mark album read |
128 | 125 | if (!is_array($album_id)) |
@@ -168,8 +165,7 @@ discard block |
||
168 | 165 | } |
169 | 166 | |
170 | 167 | return; |
171 | - } |
|
172 | - else if ($mode == 'album') |
|
168 | + } else if ($mode == 'album') |
|
173 | 169 | { |
174 | 170 | if ($album_id === false) |
175 | 171 | { |
@@ -180,8 +180,7 @@ |
||
180 | 180 | if ($subtarget) |
181 | 181 | { |
182 | 182 | $this->phpbb_cache->destroy($target, $subtarget); |
183 | - } |
|
184 | - else |
|
183 | + } else |
|
185 | 184 | { |
186 | 185 | $this->phpbb_cache->destroy($target); |
187 | 186 | } |
@@ -108,8 +108,7 @@ discard block |
||
108 | 108 | if (!$phpbb_ext_gallery_user->get_data('personal_album_id')) |
109 | 109 | { |
110 | 110 | $this->info(); |
111 | - } |
|
112 | - else |
|
111 | + } else |
|
113 | 112 | { |
114 | 113 | $this->manage_albums(); |
115 | 114 | } |
@@ -142,8 +141,7 @@ discard block |
||
142 | 141 | 'L_TITLE' => $this->language->lang('UCP_GALLERY_PERSONAL_ALBUMS'), |
143 | 142 | 'L_TITLE_EXPLAIN' => $this->language->lang('NO_PERSONAL_ALBUM'), |
144 | 143 | )); |
145 | - } |
|
146 | - else |
|
144 | + } else |
|
147 | 145 | { |
148 | 146 | $phpbb_gallery_url->redirect('phpbb', 'ucp', 'i=-phpbbgallery-core-ucp-main_module&mode=manage_albums&action=manage'); |
149 | 147 | } |
@@ -230,8 +228,7 @@ discard block |
||
230 | 228 | if (!$parent_id) |
231 | 229 | { |
232 | 230 | $navigation = $this->language->lang('PERSONAL_ALBUM'); |
233 | - } |
|
234 | - else |
|
231 | + } else |
|
235 | 232 | { |
236 | 233 | $navigation = $this->language->lang('PERSONAL_ALBUM'); |
237 | 234 | |
@@ -241,8 +238,7 @@ discard block |
||
241 | 238 | if ($row['album_id'] == $parent_id) |
242 | 239 | { |
243 | 240 | $navigation .= ' » ' . $row['album_name']; |
244 | - } |
|
245 | - else |
|
241 | + } else |
|
246 | 242 | { |
247 | 243 | $navigation .= ' » <a href="' . $this->u_action . '&action=manage&parent_id=' . $row['album_id'] . '">' . $row['album_name'] . '</a>'; |
248 | 244 | } |
@@ -357,8 +353,7 @@ discard block |
||
357 | 353 | 'S_AUTH_ACCESS_OPTIONS' => $s_access_options, |
358 | 354 | 'L_ALBUM_ACCESS_EXPLAIN' => $this->language->lang('ALBUM_ACCESS_EXPLAIN', '<a href="' . $phpbb_gallery_url->append_sid('phpbb', 'faq') . '#f6r0">', '</a>'), |
359 | 355 | )); |
360 | - } |
|
361 | - else |
|
356 | + } else |
|
362 | 357 | { |
363 | 358 | if (!check_form_key('ucp_gallery')) |
364 | 359 | { |
@@ -506,8 +501,7 @@ discard block |
||
506 | 501 | |
507 | 502 | 'S_MODE' => 'edit', |
508 | 503 | )); |
509 | - } |
|
510 | - else |
|
504 | + } else |
|
511 | 505 | { |
512 | 506 | // Is it salty ? |
513 | 507 | if (!check_form_key('ucp_gallery')) |
@@ -591,8 +585,7 @@ discard block |
||
591 | 585 | WHERE album_user_id = ' . (int) $row['album_user_id'] . ' |
592 | 586 | AND right_id >= ' . (int) $row['left_id']; |
593 | 587 | $db->sql_query($sql); |
594 | - } |
|
595 | - else |
|
588 | + } else |
|
596 | 589 | { |
597 | 590 | $sql = 'UPDATE ' . $albums_table . ' |
598 | 591 | SET left_id = left_id - ' . $moving_ids . ' |
@@ -638,8 +631,7 @@ discard block |
||
638 | 631 | if ($album_data['album_name'] == '') |
639 | 632 | { |
640 | 633 | $album_data['album_name'] = $row['album_name']; |
641 | - } |
|
642 | - else if ($row['album_name'] != $album_data['album_name']) |
|
634 | + } else if ($row['album_name'] != $album_data['album_name']) |
|
643 | 635 | { |
644 | 636 | $sql = 'UPDATE ' . $albums_table . " |
645 | 637 | SET album_parents = ''"; |
@@ -650,8 +642,7 @@ discard block |
||
650 | 642 | if (isset($config['zebra_enhance_version'])) |
651 | 643 | { |
652 | 644 | $album_data['album_auth_access'] = min(4, max(0, $album_data['album_auth_access'])); |
653 | - } |
|
654 | - else |
|
645 | + } else |
|
655 | 646 | { |
656 | 647 | $album_data['album_auth_access'] = min(3, max(0, $album_data['album_auth_access'])); |
657 | 648 | } |
@@ -804,8 +795,7 @@ discard block |
||
804 | 795 | $phpbb_ext_gallery_config->set('newest_pega_username', $newest_pgallery['username']); |
805 | 796 | $phpbb_ext_gallery_config->set('newest_pega_user_colour', $newest_pgallery['user_colour']); |
806 | 797 | $phpbb_ext_gallery_config->set('newest_pega_album_id', $newest_pgallery['album_id']); |
807 | - } |
|
808 | - else |
|
798 | + } else |
|
809 | 799 | { |
810 | 800 | $phpbb_ext_gallery_config->set('newest_pega_user_id', 0); |
811 | 801 | $phpbb_ext_gallery_config->set('newest_pega_username', ''); |
@@ -813,8 +803,7 @@ discard block |
||
813 | 803 | $phpbb_ext_gallery_config->set('newest_pega_album_id', 0); |
814 | 804 | } |
815 | 805 | } |
816 | - } |
|
817 | - else |
|
806 | + } else |
|
818 | 807 | { |
819 | 808 | // Solve the left_id right_id problem |
820 | 809 | $delete_id = $right_id - ($left_id - 1); |
@@ -855,8 +844,7 @@ discard block |
||
855 | 844 | |
856 | 845 | trigger_error($this->language->lang('DELETED_ALBUMS') . '<br /><br /> |
857 | 846 | <a href="' . (($parent_id) ? $phpbb_gallery_url->append_sid('phpbb', 'ucp', 'i=-phpbbgallery-core-ucp-main_module&mode=manage_albums&action=manage&parent_id=' . $parent_id) : $phpbb_gallery_url->append_sid('phpbb', 'ucp', 'i=-phpbbgallery-core-ucp-main_module&mode=manage_albums')) . '">' . $this->language->lang('BACK_TO_PREV') . '</a>'); |
858 | - } |
|
859 | - else |
|
847 | + } else |
|
860 | 848 | { |
861 | 849 | $album_id = $request->variable('album_id', 0); |
862 | 850 | $phpbb_ext_gallery_core_album->check_user($album_id); |
@@ -899,8 +887,7 @@ discard block |
||
899 | 887 | |
900 | 888 | $move_up_left = $moving['left_id']; |
901 | 889 | $move_up_right = $moving['right_id']; |
902 | - } |
|
903 | - else |
|
890 | + } else |
|
904 | 891 | { |
905 | 892 | $left_id = $moving['left_id']; |
906 | 893 | $right_id = $target['right_id']; |
@@ -121,8 +121,7 @@ discard block |
||
121 | 121 | { |
122 | 122 | $mode = array_shift($args); |
123 | 123 | $args[0] = $this->path($mode) . $this->phpEx_file($args[0]); |
124 | - } |
|
125 | - else |
|
124 | + } else |
|
126 | 125 | { |
127 | 126 | $args[0] = $this->path() . $this->phpEx_file($args[0]); |
128 | 127 | } |
@@ -197,8 +196,7 @@ discard block |
||
197 | 196 | if (!is_array($file)) |
198 | 197 | { |
199 | 198 | include($this->path($path) . $sub_directory . $this->phpEx_file($file)); |
200 | - } |
|
201 | - else |
|
199 | + } else |
|
202 | 200 | { |
203 | 201 | foreach ($file as $real_file) |
204 | 202 | { |
@@ -244,8 +242,7 @@ discard block |
||
244 | 242 | if (strpos($path, 'https:/') === 0) |
245 | 243 | { |
246 | 244 | $path = 'https://' . substr($path, 7); |
247 | - } |
|
248 | - else if (strpos($path, 'http:/') === 0) |
|
245 | + } else if (strpos($path, 'http:/') === 0) |
|
249 | 246 | { |
250 | 247 | $path = 'http://' . substr($path, 6); |
251 | 248 | } |
@@ -300,15 +297,13 @@ discard block |
||
300 | 297 | if ($this->config['force_server_vars'] == 1) |
301 | 298 | { |
302 | 299 | $url = $this->config['server_protocol'] . $url; |
303 | - } |
|
304 | - else |
|
300 | + } else |
|
305 | 301 | { |
306 | 302 | $is_secure = $this->request->server('HTTPS', ''); |
307 | 303 | if ($is_secure == 'on') |
308 | 304 | { |
309 | 305 | $url = 'https://' . $url; |
310 | - } |
|
311 | - else |
|
306 | + } else |
|
312 | 307 | { |
313 | 308 | $url = 'http://' . $url; |
314 | 309 | } |
@@ -69,8 +69,7 @@ |
||
69 | 69 | if (is_dir($file)) |
70 | 70 | { |
71 | 71 | recursiveRemoveDirectory($file); |
72 | - } |
|
73 | - else |
|
72 | + } else |
|
74 | 73 | { |
75 | 74 | unlink($file); |
76 | 75 | } |
@@ -47,8 +47,7 @@ discard block |
||
47 | 47 | // Replace the md5 with the ' again and remove the space at the end to prevent \' troubles |
48 | 48 | $user_data['username'] = utf8_substr(str_replace("{{$import_schema}}", "'", $user_data['username']), 0, -1); |
49 | 49 | $image_name = utf8_substr(str_replace("{{$import_schema}}", "'", $image_name), 0, -1); |
50 | - } |
|
51 | - else |
|
50 | + } else |
|
52 | 51 | { |
53 | 52 | global $phpEx; |
54 | 53 | trigger_error($user->lang('MISSING_IMPORT_SCHEMA', ($import_schema . '.' . $phpEx)), E_USER_WARNING); |
@@ -198,8 +197,7 @@ discard block |
||
198 | 197 | if ($filename || ($image_name == '')) |
199 | 198 | { |
200 | 199 | $sql_ary['image_name'] = str_replace("_", " ", utf8_substr($image_src, 0, utf8_strrpos($image_src, '.'))); |
201 | - } |
|
202 | - else |
|
200 | + } else |
|
203 | 201 | { |
204 | 202 | $sql_ary['image_name'] = str_replace('{NUM}', $num_offset + $done_images, $image_name); |
205 | 203 | } |
@@ -239,14 +237,12 @@ discard block |
||
239 | 237 | if (!$errors) |
240 | 238 | { |
241 | 239 | trigger_error(sprintf($user->lang['IMPORT_FINISHED'], $done_images) . adm_back_link($this->u_action)); |
242 | - } |
|
243 | - else |
|
240 | + } else |
|
244 | 241 | { |
245 | 242 | $errors = explode("\n", $errors); |
246 | 243 | trigger_error(sprintf($user->lang['IMPORT_FINISHED_ERRORS'], $done_images - sizeof($errors)) . implode('<br />', $errors) . adm_back_link($this->u_action), E_USER_WARNING); |
247 | 244 | } |
248 | - } |
|
249 | - else |
|
245 | + } else |
|
250 | 246 | { |
251 | 247 | // Write the new list |
252 | 248 | $this->create_import_schema($import_schema, $album_id, $user_data, $start_time, $num_offset, $done_images, $todo_images, $image_name, $filename, $images); |
@@ -256,8 +252,7 @@ discard block |
||
256 | 252 | meta_refresh(1, $forward_url); |
257 | 253 | trigger_error(sprintf($user->lang['IMPORT_DEBUG_MES'], $done_images, $todo_images)); |
258 | 254 | } |
259 | - } |
|
260 | - else if ($submit) |
|
255 | + } else if ($submit) |
|
261 | 256 | { |
262 | 257 | if (!check_form_key('acp_gallery')) |
263 | 258 | { |
@@ -313,8 +308,7 @@ discard block |
||
313 | 308 | $album_id = $gallery_album->generate_personal_album($user_row['username'], $user_row['user_id'], $user_row['user_colour'], $image_user); |
314 | 309 | } |
315 | 310 | unset($image_user); |
316 | - } |
|
317 | - else |
|
311 | + } else |
|
318 | 312 | { |
319 | 313 | $album_id = $image_user->get_data('personal_album_id'); |
320 | 314 | if (!$album_id) |
@@ -196,8 +196,7 @@ discard block |
||
196 | 196 | if (isset($user_image_count[(int) $row['image_user_id']])) |
197 | 197 | { |
198 | 198 | $user_image_count[(int) $row['image_user_id']]++; |
199 | - } |
|
200 | - else |
|
199 | + } else |
|
201 | 200 | { |
202 | 201 | $user_image_count[(int) $row['image_user_id']] = 1; |
203 | 202 | } |
@@ -246,8 +245,7 @@ discard block |
||
246 | 245 | $this->gallery_config->set('newest_pega_username', $newest_pega['username']); |
247 | 246 | $this->gallery_config->set('newest_pega_user_colour', $newest_pega['user_colour']); |
248 | 247 | $this->gallery_config->set('newest_pega_album_id', $newest_pega['album_id']); |
249 | - } |
|
250 | - else |
|
248 | + } else |
|
251 | 249 | { |
252 | 250 | $this->gallery_config->set('newest_pega_user_id', 0); |
253 | 251 | $this->gallery_config->set('newest_pega_username', ''); |