@@ -10,20 +10,20 @@ discard block |
||
10 | 10 | class phpbbgallery_image_not_approved extends \phpbb\notification\type\base |
11 | 11 | { |
12 | 12 | /** |
13 | - * Get notification type name |
|
14 | - * |
|
15 | - * @return string |
|
16 | - */ |
|
13 | + * Get notification type name |
|
14 | + * |
|
15 | + * @return string |
|
16 | + */ |
|
17 | 17 | public function get_type() |
18 | 18 | { |
19 | 19 | return 'phpbbgallery.core.notification.image_not_approved'; |
20 | 20 | } |
21 | 21 | /** |
22 | - * Notification option data (for outputting to the user) |
|
23 | - * |
|
24 | - * @var bool|array False if the service should use it's default data |
|
25 | - * Array of data (including keys 'id', 'lang', and 'group') |
|
26 | - */ |
|
22 | + * Notification option data (for outputting to the user) |
|
23 | + * |
|
24 | + * @var bool|array False if the service should use it's default data |
|
25 | + * Array of data (including keys 'id', 'lang', and 'group') |
|
26 | + */ |
|
27 | 27 | public static $notification_option = array( |
28 | 28 | 'lang' => 'NOTIFICATION_TYPE_PHPBBGALLERY_IMAGE_NOT_APPROVED', |
29 | 29 | ); |
@@ -45,10 +45,10 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
48 | - * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
49 | - * |
|
50 | - * @return bool True/False whether or not this is available to the user |
|
51 | - */ |
|
48 | + * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
49 | + * |
|
50 | + * @return bool True/False whether or not this is available to the user |
|
51 | + */ |
|
52 | 52 | public function is_available() |
53 | 53 | { |
54 | 54 | return true; |
@@ -139,10 +139,10 @@ discard block |
||
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
142 | - * Users needed to query before this notification can be displayed |
|
143 | - * |
|
144 | - * @return array Array of user_ids |
|
145 | - */ |
|
142 | + * Users needed to query before this notification can be displayed |
|
143 | + * |
|
144 | + * @return array Array of user_ids |
|
145 | + */ |
|
146 | 146 | public function users_to_query() |
147 | 147 | { |
148 | 148 | return array(); |
@@ -150,14 +150,14 @@ discard block |
||
150 | 150 | |
151 | 151 | |
152 | 152 | /** |
153 | - * Function for preparing the data for insertion in an SQL query |
|
154 | - * (The service handles insertion) |
|
155 | - * |
|
156 | - * @param array $data The data for the updated rules |
|
157 | - * @param array $pre_create_data Data from pre_create_insert_array() |
|
158 | - * |
|
159 | - * @return array Array of data ready to be inserted into the database |
|
160 | - */ |
|
153 | + * Function for preparing the data for insertion in an SQL query |
|
154 | + * (The service handles insertion) |
|
155 | + * |
|
156 | + * @param array $data The data for the updated rules |
|
157 | + * @param array $pre_create_data Data from pre_create_insert_array() |
|
158 | + * |
|
159 | + * @return array Array of data ready to be inserted into the database |
|
160 | + */ |
|
161 | 161 | public function create_insert_array($data, $pre_create_data = array()) |
162 | 162 | { |
163 | 163 | $this->set_data('album_name', $data['album_name']); |
@@ -11,20 +11,20 @@ discard block |
||
11 | 11 | class phpbbgallery_image_approved extends \phpbb\notification\type\base |
12 | 12 | { |
13 | 13 | /** |
14 | - * Get notification type name |
|
15 | - * |
|
16 | - * @return string |
|
17 | - */ |
|
14 | + * Get notification type name |
|
15 | + * |
|
16 | + * @return string |
|
17 | + */ |
|
18 | 18 | public function get_type() |
19 | 19 | { |
20 | 20 | return 'phpbbgallery.core.notification.image_approved'; |
21 | 21 | } |
22 | 22 | /** |
23 | - * Notification option data (for outputting to the user) |
|
24 | - * |
|
25 | - * @var bool|array False if the service should use it's default data |
|
26 | - * Array of data (including keys 'id', 'lang', and 'group') |
|
27 | - */ |
|
23 | + * Notification option data (for outputting to the user) |
|
24 | + * |
|
25 | + * @var bool|array False if the service should use it's default data |
|
26 | + * Array of data (including keys 'id', 'lang', and 'group') |
|
27 | + */ |
|
28 | 28 | public static $notification_option = array( |
29 | 29 | 'lang' => 'NOTIFICATION_TYPE_PHPBBGALLERY_IMAGE_APPROVED', |
30 | 30 | ); |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
49 | - * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
50 | - * |
|
51 | - * @return bool True/False whether or not this is available to the user |
|
52 | - */ |
|
49 | + * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
50 | + * |
|
51 | + * @return bool True/False whether or not this is available to the user |
|
52 | + */ |
|
53 | 53 | public function is_available() |
54 | 54 | { |
55 | 55 | return true; |
@@ -140,10 +140,10 @@ discard block |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
143 | - * Users needed to query before this notification can be displayed |
|
144 | - * |
|
145 | - * @return array Array of user_ids |
|
146 | - */ |
|
143 | + * Users needed to query before this notification can be displayed |
|
144 | + * |
|
145 | + * @return array Array of user_ids |
|
146 | + */ |
|
147 | 147 | public function users_to_query() |
148 | 148 | { |
149 | 149 | return array(); |
@@ -151,14 +151,14 @@ discard block |
||
151 | 151 | |
152 | 152 | |
153 | 153 | /** |
154 | - * Function for preparing the data for insertion in an SQL query |
|
155 | - * (The service handles insertion) |
|
156 | - * |
|
157 | - * @param array $data The data for the updated rules |
|
158 | - * @param array $pre_create_data Data from pre_create_insert_array() |
|
159 | - * |
|
160 | - * @return array Array of data ready to be inserted into the database |
|
161 | - */ |
|
154 | + * Function for preparing the data for insertion in an SQL query |
|
155 | + * (The service handles insertion) |
|
156 | + * |
|
157 | + * @param array $data The data for the updated rules |
|
158 | + * @param array $pre_create_data Data from pre_create_insert_array() |
|
159 | + * |
|
160 | + * @return array Array of data ready to be inserted into the database |
|
161 | + */ |
|
162 | 162 | public function create_insert_array($data, $pre_create_data = array()) |
163 | 163 | { |
164 | 164 | $this->set_data('album_name', $data['album_name']); |
@@ -235,11 +235,11 @@ |
||
235 | 235 | } |
236 | 236 | |
237 | 237 | /** |
238 | - * Remove albums from watch-list |
|
239 | - * |
|
240 | - * @param mixed $album_ids Array or integer with album_id where we delete from the watch-list. |
|
241 | - * @param mixed $user_ids If not set, it uses the currents user_id |
|
242 | - */ |
|
238 | + * Remove albums from watch-list |
|
239 | + * |
|
240 | + * @param mixed $album_ids Array or integer with album_id where we delete from the watch-list. |
|
241 | + * @param mixed $user_ids If not set, it uses the currents user_id |
|
242 | + */ |
|
243 | 243 | public function remove_albums($album_ids, $user_ids = false) |
244 | 244 | { |
245 | 245 | $album_ids = $this->cast_mixed_int2array($album_ids); |
@@ -244,8 +244,7 @@ |
||
244 | 244 | if (is_array($ids)) |
245 | 245 | { |
246 | 246 | return array_map('intval', $ids); |
247 | - } |
|
248 | - else |
|
247 | + } else |
|
249 | 248 | { |
250 | 249 | return array((int) $ids); |
251 | 250 | } |
@@ -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 |
@@ -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 | { |
@@ -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); |
@@ -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 | } |
@@ -204,8 +204,7 @@ discard block |
||
204 | 204 | $sql_array['GROUP_BY'] = 'l.description, l.log_id, i.image_id'; |
205 | 205 | break; |
206 | 206 | } |
207 | - } |
|
208 | - else |
|
207 | + } else |
|
209 | 208 | { |
210 | 209 | $sql_array['ORDER_BY'] = 'l.log_time ' . (isset($additional['sort_dir']) ? 'ASC' : 'DESC'); |
211 | 210 | $sql_array['GROUP_BY'] = 'l.log_time, l.log_id, i.image_id'; |
@@ -219,8 +218,7 @@ discard block |
||
219 | 218 | if ($row) |
220 | 219 | { |
221 | 220 | $count = $row['count']; |
222 | - } |
|
223 | - else |
|
221 | + } else |
|
224 | 222 | { |
225 | 223 | $count = 0; |
226 | 224 | } |
@@ -281,8 +279,7 @@ discard block |
||
281 | 279 | 'params' => array( |
282 | 280 | ), |
283 | 281 | ), 'pagination', 'page', $count, $limit, ($page-1) * $limit); |
284 | - } |
|
285 | - else if ($album == -1) |
|
282 | + } else if ($album == -1) |
|
286 | 283 | { |
287 | 284 | $url_array = array( |
288 | 285 | 'i' => '-phpbbgallery-core-acp-gallery_logs_module', |
@@ -303,8 +300,7 @@ discard block |
||
303 | 300 | $url = http_build_query($url_array,'','&'); |
304 | 301 | |
305 | 302 | $this->pagination->generate_template_pagination(append_sid('index.php?' . $url), 'pagination', 'page', $count, $limit, ($page-1) * $limit); |
306 | - } |
|
307 | - else |
|
303 | + } else |
|
308 | 304 | { |
309 | 305 | $this->pagination->generate_template_pagination(array( |
310 | 306 | 'routes' => array( |
@@ -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'; |
@@ -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 | } |
@@ -19,12 +19,12 @@ discard block |
||
19 | 19 | protected $table_images; |
20 | 20 | |
21 | 21 | /** |
22 | - * cache constructor. |
|
23 | - * @param \phpbb\cache\service $cache |
|
24 | - * @param \phpbb\db\driver\driver_interface $db |
|
25 | - * @param $albums_table |
|
26 | - * @param $images_table |
|
27 | - */ |
|
22 | + * cache constructor. |
|
23 | + * @param \phpbb\cache\service $cache |
|
24 | + * @param \phpbb\db\driver\driver_interface $db |
|
25 | + * @param $albums_table |
|
26 | + * @param $images_table |
|
27 | + */ |
|
28 | 28 | public function __construct(\phpbb\cache\service $cache, \phpbb\db\driver\driver_interface $db, |
29 | 29 | $albums_table, $images_table) |
30 | 30 | { |
@@ -155,18 +155,18 @@ discard block |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | /** |
158 | - * Destroy images cache - if we had updated image information or we want other set - we will have to destroy cache |
|
159 | - */ |
|
158 | + * Destroy images cache - if we had updated image information or we want other set - we will have to destroy cache |
|
159 | + */ |
|
160 | 160 | public function destroy_images() |
161 | 161 | { |
162 | 162 | $this->phpbb_cache->destroy('_images'); |
163 | 163 | } |
164 | 164 | |
165 | 165 | /** |
166 | - * Destroy album cache |
|
167 | - * Basicly some tests fail due album cache not destroyed ... |
|
168 | - * So lets try it now? |
|
169 | - */ |
|
166 | + * Destroy album cache |
|
167 | + * Basicly some tests fail due album cache not destroyed ... |
|
168 | + * So lets try it now? |
|
169 | + */ |
|
170 | 170 | public function destroy_albums() |
171 | 171 | { |
172 | 172 | $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 |
@@ -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 . ' |
@@ -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']; |
@@ -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 | ); |
@@ -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 | } |
@@ -22,28 +22,28 @@ discard block |
||
22 | 22 | private $config; |
23 | 23 | |
24 | 24 | /** |
25 | - * Path from the gallery root, back to phpbb's root |
|
26 | - */ |
|
25 | + * Path from the gallery root, back to phpbb's root |
|
26 | + */ |
|
27 | 27 | private $phpbb_root_path = '../'; |
28 | 28 | |
29 | 29 | /** |
30 | - * Path from the phpbb root, into admin's root |
|
31 | - */ |
|
30 | + * Path from the phpbb root, into admin's root |
|
31 | + */ |
|
32 | 32 | private $phpbb_admin_path = 'adm/'; |
33 | 33 | |
34 | 34 | /** |
35 | - * Path from the phpbb root, into gallery's file root |
|
36 | - */ |
|
35 | + * Path from the phpbb root, into gallery's file root |
|
36 | + */ |
|
37 | 37 | private $phpbb_gallery_file_path = 'files/phpbbgallery/'; |
38 | 38 | |
39 | 39 | /** |
40 | - * Path from the phpbb root, into gallery's root |
|
41 | - */ |
|
40 | + * Path from the phpbb root, into gallery's root |
|
41 | + */ |
|
42 | 42 | private $phpbb_gallery_path = 'gallery/'; |
43 | 43 | |
44 | 44 | /** |
45 | - * PHP file extension (e.g. .php) |
|
46 | - */ |
|
45 | + * PHP file extension (e.g. .php) |
|
46 | + */ |
|
47 | 47 | private $php_ext; |
48 | 48 | |
49 | 49 | const IMAGE_PATH = 'images/'; |
@@ -237,16 +237,16 @@ discard block |
||
237 | 237 | } |
238 | 238 | |
239 | 239 | /** |
240 | - * Creates beautiful relative path from ugly relative path |
|
241 | - * Resolves .. (up directory) |
|
242 | - * |
|
243 | - * @author bantu based on phpbb_own_realpath() by Chris Smith |
|
244 | - * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
|
245 | - * |
|
246 | - * @param string ugly path e.g. "../community/../gallery/" |
|
247 | - * @param bool is it a full url, so we need to fix teh http:// at the beginning? |
|
248 | - * @return string beautiful path e.g. "../gallery/" |
|
249 | - */ |
|
240 | + * Creates beautiful relative path from ugly relative path |
|
241 | + * Resolves .. (up directory) |
|
242 | + * |
|
243 | + * @author bantu based on phpbb_own_realpath() by Chris Smith |
|
244 | + * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
|
245 | + * |
|
246 | + * @param string ugly path e.g. "../community/../gallery/" |
|
247 | + * @param bool is it a full url, so we need to fix teh http:// at the beginning? |
|
248 | + * @return string beautiful path e.g. "../gallery/" |
|
249 | + */ |
|
250 | 250 | static public function beautiful_path($path, $is_full_url = false) |
251 | 251 | { |
252 | 252 | // Remove any repeated slashes |
@@ -288,10 +288,10 @@ discard block |
||
288 | 288 | } |
289 | 289 | |
290 | 290 | /** |
291 | - * Custom meta_refresh implementation |
|
292 | - * @param int $time Time in seconds. |
|
293 | - * @param string $route Route generated by $helper->route |
|
294 | - */ |
|
291 | + * Custom meta_refresh implementation |
|
292 | + * @param int $time Time in seconds. |
|
293 | + * @param string $route Route generated by $helper->route |
|
294 | + */ |
|
295 | 295 | public function meta_refresh($time, $route) |
296 | 296 | { |
297 | 297 | // For XHTML compatibility we change back & to & |