Completed
Branch master (31e026)
by Stanislav
06:53
created
core/album/manage.php 3 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -751,8 +751,8 @@  discard block
 block discarded – undo
751 751
 		$log_action = implode('_', array($log_action_images, $log_action_albums));
752 752
 
753 753
 		/**
754
-		* Log what we did
755
-		*/
754
+		 * Log what we did
755
+		 */
756 756
 		switch ($log_action)
757 757
 		{
758 758
 			case 'MOVE_IMAGES_MOVE_ALBUMS':
@@ -842,14 +842,14 @@  discard block
 block discarded – undo
842 842
 		$this->gallery_notification->delete_albums($from_id);
843 843
 
844 844
 		/**
845
-		* Event related to moving album content
846
-		*
847
-		* @event phpbbgallery.core.album.manage.move_album_content
848
-		* @var	int	from_id		Album we are moving from
849
-		* @var	int	to_id		Album we are moving to
850
-		* @var	bool	sync	Should we sync the albums data
851
-		* @since 1.2.0
852
-		*/
845
+		 * Event related to moving album content
846
+		 *
847
+		 * @event phpbbgallery.core.album.manage.move_album_content
848
+		 * @var	int	from_id		Album we are moving from
849
+		 * @var	int	to_id		Album we are moving to
850
+		 * @var	bool	sync	Should we sync the albums data
851
+		 * @since 1.2.0
852
+		 */
853 853
 		$vars = array('from_id', 'to_id', 'sync');
854 854
 		extract($this->dispatcher->trigger_event('phpbbgallery.core.album.manage.move_album_content', compact($vars)));
855 855
 
@@ -951,12 +951,12 @@  discard block
 block discarded – undo
951 951
 		$this->gallery_config->set('num_comments', $row['num_comments']);
952 952
 
953 953
 		/**
954
-		* Event delete album content
955
-		*
956
-		* @event phpbbgallery.core.album.manage.delete_album_content
957
-		* @var	int	album_id		Album we are deleting
958
-		* @since 1.2.0
959
-		*/
954
+		 * Event delete album content
955
+		 *
956
+		 * @event phpbbgallery.core.album.manage.delete_album_content
957
+		 * @var	int	album_id		Album we are deleting
958
+		 * @since 1.2.0
959
+		 */
960 960
 		$vars = array('album_id');
961 961
 		extract($this->dispatcher->trigger_event('phpbbgallery.core.album.manage.delete_album_content', compact($vars)));
962 962
 
@@ -979,11 +979,11 @@  discard block
 block discarded – undo
979 979
 	public function move_album_by($album_row, $action = 'move_up', $steps = 1)
980 980
 	{
981 981
 		/**
982
-		* Fetch all the siblings between the module's current spot
983
-		* and where we want to move it to. If there are less than $steps
984
-		* siblings between the current spot and the target then the
985
-		* module will move as far as possible
986
-		*/
982
+		 * Fetch all the siblings between the module's current spot
983
+		 * and where we want to move it to. If there are less than $steps
984
+		 * siblings between the current spot and the target then the
985
+		 * module will move as far as possible
986
+		 */
987 987
 		$sql = 'SELECT album_id, album_name, left_id, right_id
988 988
 			FROM ' . $this->albums_table . ' 
989 989
 			WHERE parent_id = ' . (int) $album_row['parent_id'] . '
@@ -1005,12 +1005,12 @@  discard block
 block discarded – undo
1005 1005
 		}
1006 1006
 
1007 1007
 		/**
1008
-		* $left_id and $right_id define the scope of the nodes that are affected by the move.
1009
-		* $diff_up and $diff_down are the values to substract or add to each node's left_id
1010
-		* and right_id in order to move them up or down.
1011
-		* $move_up_left and $move_up_right define the scope of the nodes that are moving
1012
-		* up. Other nodes in the scope of ($left_id, $right_id) are considered to move down.
1013
-		*/
1008
+		 * $left_id and $right_id define the scope of the nodes that are affected by the move.
1009
+		 * $diff_up and $diff_down are the values to substract or add to each node's left_id
1010
+		 * and right_id in order to move them up or down.
1011
+		 * $move_up_left and $move_up_right define the scope of the nodes that are moving
1012
+		 * up. Other nodes in the scope of ($left_id, $right_id) are considered to move down.
1013
+		 */
1014 1014
 		if ($action == 'move_up')
1015 1015
 		{
1016 1016
 			$left_id = $target['left_id'];
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
Braces   +26 added lines, -52 removed lines patch added patch discarded remove patch
@@ -150,8 +150,7 @@  discard block
 block discarded – undo
150 150
 			if ($this->user->data['user_timezone'] == '')
151 151
 			{
152 152
 				$timezone = 'UTC';
153
-			}
154
-			else
153
+			} else
155 154
 			{
156 155
 				$timezone = $this->user->data['user_timezone'];
157 156
 			}
@@ -163,8 +162,7 @@  discard block
 block discarded – undo
163 162
 			{
164 163
 				$errors[] = sprintf($this->language->lang('CONTEST_START_INVALID'), $contest_data['contest_start']);
165 164
 				$start_date_error = true;
166
-			}
167
-			else
165
+			} else
168 166
 			{
169 167
 				$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 168
 			}
@@ -172,8 +170,7 @@  discard block
 block discarded – undo
172 170
 			{
173 171
 				$errors[] = sprintf($this->language->lang('CONTEST_RATING_INVALID'), $contest_data['contest_rating']);
174 172
 				$date_error = true;
175
-			}
176
-			else if (!$start_date_error)
173
+			} else if (!$start_date_error)
177 174
 			{
178 175
 				$contest_data['contest_rating'] = gmmktime($m[4], $m[5], 0, $m[2], $m[3], $m[1]) - $contest_data['contest_start'] - $time->getOffset();//- $offset;
179 176
 			}
@@ -181,8 +178,7 @@  discard block
 block discarded – undo
181 178
 			{
182 179
 				$errors[] = sprintf($this->language->lang('CONTEST_END_INVALID'), $contest_data['contest_end']);
183 180
 				$date_error = true;
184
-			}
185
-			else if (!$start_date_error)
181
+			} else if (!$start_date_error)
186 182
 			{
187 183
 				$contest_data['contest_end'] = gmmktime($m[4], $m[5], 0, $m[2], $m[3], $m[1]) - $contest_data['contest_start'] - $time->getOffset();//- $offset;
188 184
 			}
@@ -270,8 +266,7 @@  discard block
 block discarded – undo
270 266
 
271 267
 					$album_data_sql['left_id'] = $row['right_id'];
272 268
 					$album_data_sql['right_id'] = $row['right_id'] + 1;
273
-				}
274
-				else
269
+				} else
275 270
 				{
276 271
 					$sql = 'UPDATE ' . $this->albums_table . ' 
277 272
 						SET left_id = left_id + 2, right_id = right_id + 2
@@ -288,8 +283,7 @@  discard block
 block discarded – undo
288 283
 					$album_data_sql['left_id'] = $row['left_id'] + 1;
289 284
 					$album_data_sql['right_id'] = $row['left_id'] + 2;
290 285
 				}
291
-			}
292
-			else
286
+			} else
293 287
 			{
294 288
 				if (!$add_on_top)
295 289
 				{
@@ -302,8 +296,7 @@  discard block
 block discarded – undo
302 296
 
303 297
 					$album_data_sql['left_id'] = $row['right_id'] + 1;
304 298
 					$album_data_sql['right_id'] = $row['right_id'] + 2;
305
-				}
306
-				else
299
+				} else
307 300
 				{
308 301
 					$sql = 'UPDATE ' . $this->albums_table . ' 
309 302
 						SET left_id = left_id + 2, right_id = right_id + 2
@@ -336,8 +329,7 @@  discard block
 block discarded – undo
336 329
 				$this->db->sql_query($sql);
337 330
 			}
338 331
 			$this->gallery_log->add_log('admin', 'add', $album_data['album_id'], 0, array('LOG_ALBUM_ADD', $album_data['album_name']));
339
-		}
340
-		else
332
+		} else
341 333
 		{
342 334
 			$row = $this->gallery_album->get_info($album_data_sql['album_id']);
343 335
 			$reset_marked_images = false;
@@ -348,22 +340,19 @@  discard block
 block discarded – undo
348 340
 				// Changing a contest to category? No!
349 341
 				$errors[] = $this->language->lang('ALBUM_WITH_CONTEST_NO_TYPE_CHANGE');
350 342
 				return $errors;
351
-			}
352
-			else if ($row['album_type'] != \phpbbgallery\core\block::TYPE_CONTEST && $album_data_sql['album_type'] == \phpbbgallery\core\block::TYPE_CONTEST)
343
+			} else if ($row['album_type'] != \phpbbgallery\core\block::TYPE_CONTEST && $album_data_sql['album_type'] == \phpbbgallery\core\block::TYPE_CONTEST)
353 344
 			{
354 345
 				// Changing a album to contest? No!
355 346
 				// Changing a category to contest? No!
356 347
 				$errors[] = $this->language->lang('ALBUM_NO_TYPE_CHANGE_TO_CONTEST');
357 348
 				return $errors;
358
-			}
359
-			else if ($row['album_type'] == \phpbbgallery\core\block::TYPE_CAT && $album_data_sql['album_type'] == \phpbbgallery\core\block::TYPE_UPLOAD)
349
+			} else if ($row['album_type'] == \phpbbgallery\core\block::TYPE_CAT && $album_data_sql['album_type'] == \phpbbgallery\core\block::TYPE_UPLOAD)
360 350
 			{
361 351
 				// Changing a category to a album? Yes!
362 352
 				// Reset the data (you couldn't upload directly in a cat, you must use a album)
363 353
 				$album_data_sql['album_images'] = $album_data_sql['album_images_real'] = $album_data_sql['album_last_image_id'] = $album_data_sql['album_last_user_id'] = $album_data_sql['album_last_image_time'] = $album_data_sql['album_contest'] = 0;
364 354
 				$album_data_sql['album_last_username'] = $album_data_sql['album_last_user_colour'] = $album_data_sql['album_last_image_name'] = '';
365
-			}
366
-			else if ($row['album_type'] == \phpbbgallery\core\block::TYPE_UPLOAD && $album_data_sql['album_type'] == \phpbbgallery\core\block::TYPE_CAT)
355
+			} else if ($row['album_type'] == \phpbbgallery\core\block::TYPE_UPLOAD && $album_data_sql['album_type'] == \phpbbgallery\core\block::TYPE_CAT)
367 356
 			{
368 357
 				// Changing a album to a category? Yes!
369 358
 				// we're turning a uploadable album into a non-uploadable album
@@ -374,22 +363,18 @@  discard block
 block discarded – undo
374 363
 					if ($to_album_id)
375 364
 					{
376 365
 						$errors = $this->move_album_content($album_data_sql['album_id'], $to_album_id);
377
-					}
378
-					else
366
+					} else
379 367
 					{
380 368
 						return array($this->language->lang('NO_DESTINATION_ALBUM'));
381 369
 					}
382
-				}
383
-				else if ($album_data_sql['type_action'] == 'delete')
370
+				} else if ($album_data_sql['type_action'] == 'delete')
384 371
 				{
385 372
 					$errors = $this->delete_album_content($album_data_sql['album_id']);
386
-				}
387
-				else
373
+				} else
388 374
 				{
389 375
 					return array($this->language->lang('NO_ALBUM_ACTION'));
390 376
 				}
391
-			}
392
-			else if ($row['album_type'] == \phpbbgallery\core\block::TYPE_CONTEST && $album_data_sql['album_type'] == \phpbbgallery\core\block::TYPE_CONTEST)
377
+			} else if ($row['album_type'] == \phpbbgallery\core\block::TYPE_CONTEST && $album_data_sql['album_type'] == \phpbbgallery\core\block::TYPE_CONTEST)
393 378
 			{
394 379
 				// Changing a contest to contest? Yes!
395 380
 				// We need to check for the contest_data
@@ -417,8 +402,7 @@  discard block
 block discarded – undo
417 402
 				if ($row['album_id'] != $album_data_sql['parent_id'])
418 403
 				{
419 404
 					$errors = $this->move_album($album_data_sql['album_id'], $album_data_sql['parent_id']);
420
-				}
421
-				else
405
+				} else
422 406
 				{
423 407
 					$album_data_sql['parent_id'] = $row['parent_id'];
424 408
 				}
@@ -561,13 +545,11 @@  discard block
 block discarded – undo
561 545
 			if ($to_data['right_id'] > $from_data['right_id'])
562 546
 			{
563 547
 				$diff = '+ ' . ($to_data['right_id'] - $from_data['right_id'] - 1);
564
-			}
565
-			else
548
+			} else
566 549
 			{
567 550
 				$diff = '- ' . abs($to_data['right_id'] - $from_data['right_id'] - 1);
568 551
 			}
569
-		}
570
-		else
552
+		} else
571 553
 		{
572 554
 			$sql = 'SELECT MAX(right_id) AS right_id
573 555
 				FROM ' . $this->albums_table . ' 
@@ -613,14 +595,12 @@  discard block
 block discarded – undo
613 595
 		{
614 596
 			$log_action_images = 'IMAGES';
615 597
 			$errors = array_merge($errors, $this->delete_album_content($album_id));
616
-		}
617
-		else if ($action_images == 'move')
598
+		} else if ($action_images == 'move')
618 599
 		{
619 600
 			if (!$images_to_id)
620 601
 			{
621 602
 				$errors[] = $this->language->lang('NO_DESTINATION_ALBUM');
622
-			}
623
-			else
603
+			} else
624 604
 			{
625 605
 				$log_action_images = 'MOVE_IMAGES';
626 606
 
@@ -634,8 +614,7 @@  discard block
 block discarded – undo
634 614
 				if (!$row)
635 615
 				{
636 616
 					$errors[] = $this->language->lang('NO_ALBUM');
637
-				}
638
-				else
617
+				} else
639 618
 				{
640 619
 					$images_to_name = $row['album_name'];
641 620
 					$errors = array_merge($errors, $this->move_album_content($album_id, $images_to_id));
@@ -669,14 +648,12 @@  discard block
 block discarded – undo
669 648
 			$sql = 'DELETE FROM ' . $this->albums_table . ' 
670 649
 				WHERE ' . $this->db->sql_in_set('album_id', $album_ids);
671 650
 			$this->db->sql_query($sql);
672
-		}
673
-		else if ($action_subalbums == 'move')
651
+		} else if ($action_subalbums == 'move')
674 652
 		{
675 653
 			if (!$subalbums_to_id)
676 654
 			{
677 655
 				$errors[] = $this->language->lang('NO_DESTINATION_ALBUM');
678
-			}
679
-			else
656
+			} else
680 657
 			{
681 658
 				$log_action_albums = 'MOVE_ALBUMS';
682 659
 
@@ -690,8 +667,7 @@  discard block
 block discarded – undo
690 667
 				if (!$row)
691 668
 				{
692 669
 					$errors[] = $this->language->lang('NO_ALBUM');
693
-				}
694
-				else
670
+				} else
695 671
 				{
696 672
 					$subalbums_to_name = $row['album_name'];
697 673
 
@@ -726,8 +702,7 @@  discard block
 block discarded – undo
726 702
 			{
727 703
 				return $errors;
728 704
 			}
729
-		}
730
-		else
705
+		} else
731 706
 		{
732 707
 			$diff = 2;
733 708
 			$sql = 'DELETE FROM ' . $this->albums_table . '  
@@ -1021,8 +996,7 @@  discard block
 block discarded – undo
1021 996
 
1022 997
 			$move_up_left = $album_row['left_id'];
1023 998
 			$move_up_right = $album_row['right_id'];
1024
-		}
1025
-		else
999
+		} else
1026 1000
 		{
1027 1001
 			$left_id = $album_row['left_id'];
1028 1002
 			$right_id = $target['right_id'];
Please login to merge, or discard this patch.
core/search.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -213,9 +213,9 @@
 block discarded – undo
213 213
 	}
214 214
 
215 215
 	/**
216
-	* Get all recent images the user has access to
217
-	* return (int) $images_count
218
-	*/
216
+	 * Get all recent images the user has access to
217
+	 * return (int) $images_count
218
+	 */
219 219
 	public function recent_count()
220 220
 	{
221 221
 		$this->gallery_auth->load_user_premissions($this->user->data['user_id']);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 			$this->template->assign_block_vars('commentrow', array(
311 311
 				'COMMENT_ID'	=> (int) $var['comment_id'],
312 312
 				'U_DELETE'	=> ($this->gallery_auth->acl_check('m_comments', $album_tmp['album_id'], $album_tmp['album_user_id']) || ($this->gallery_auth->acl_check('c_delete', $album_tmp['album_id'], $album_tmp['album_user_id']) && ($var['comment_user_id'] == $this->user->data['user_id']) && $this->user->data['is_registered'])) ? $this->helper->route('phpbbgallery_core_comment_delete', array('image_id' => $var['comment_image_id'], 'comment_id' => $var['comment_id'])) : false,
313
-				'U_EDIT'	=> $this->gallery_auth->acl_check('c_edit', $album_tmp['album_id'], $album_tmp['album_user_id'])? $this->helper->route('phpbbgallery_core_comment_edit', array('image_id'	=> $var['comment_image_id'], 'comment_id'	=> $var['comment_id'])) : false,
313
+				'U_EDIT'	=> $this->gallery_auth->acl_check('c_edit', $album_tmp['album_id'], $album_tmp['album_user_id']) ? $this->helper->route('phpbbgallery_core_comment_edit', array('image_id'	=> $var['comment_image_id'], 'comment_id'	=> $var['comment_id'])) : false,
314 314
 				'U_QUOTE'	=> ($this->gallery_auth->acl_check('c_post', $album_tmp['album_id'], $album_tmp['album_user_id'])) ? $this->helper->route('phpbbgallery_core_comment_add', array('image_id'	=> $var['comment_image_id'], 'comment_id'	=> $var['comment_id'])) : false,
315 315
 				'U_COMMENT'	=> $this->helper->route('phpbbgallery_core_image', array('image_id' => $var['comment_image_id'])) . '#comment_' . $var['comment_id'],
316 316
 				'POST_AUTHOR_FULL'	=> $this->user_loader->get_username($var['comment_user_id'], 'full'),
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 		if ($user > 0)
444 444
 		{
445 445
 			$this->template->assign_block_vars('imageblock', array(
446
-				'BLOCK_NAME'	=> $block_name ? $block_name : '' ,
446
+				'BLOCK_NAME'	=> $block_name ? $block_name : '',
447 447
 				'U_BLOCK'	=> $u_block ? $u_block : $this->helper->route('phpbbgallery_core_search_egosearch'),
448 448
 			));
449 449
 		}
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
 		$this->db->sql_freeresult($result);
544 544
 		$count = $row['count'];
545 545
 		$sql_array['SELECT'] = '* , a.album_name, a.album_status, a.album_user_id, a.album_id';
546
-		$sql_array['LEFT_JOIN']	= array(
546
+		$sql_array['LEFT_JOIN'] = array(
547 547
 			array(
548 548
 				'FROM'		=> array($this->albums_table => 'a'),
549 549
 				'ON'		=> 'a.album_id = i.image_album_id',
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -149,8 +149,7 @@  discard block
 block discarded – undo
149 149
 		if (!$sql_limit)
150 150
 		{
151 151
 			$result = $this->db->sql_query($sql);
152
-		}
153
-		else
152
+		} else
154 153
 		{
155 154
 			$result = $this->db->sql_query_limit($sql, $sql_limit);
156 155
 		}
@@ -446,8 +445,7 @@  discard block
 block discarded – undo
446 445
 				'BLOCK_NAME'	=> $block_name ? $block_name : '' ,
447 446
 				'U_BLOCK'	=> $u_block ? $u_block : $this->helper->route('phpbbgallery_core_search_egosearch'),
448 447
 			));
449
-		}
450
-		else
448
+		} else
451 449
 		{
452 450
 			$this->template->assign_block_vars('imageblock', array(
453 451
 				'BLOCK_NAME'	=>  $block_name ? $block_name : $this->language->lang('RECENT_IMAGES'),
@@ -505,8 +503,7 @@  discard block
 block discarded – undo
505 503
 					'phpbbgallery_core_search_egosearch_page',),
506 504
 					'params' => array()), 'pagination', 'page', $count, $limit, $start
507 505
 			);
508
-		}
509
-		else
506
+		} else
510 507
 		{
511 508
 			$this->template->assign_vars(array(
512 509
 				'TOTAL_IMAGES'				=> $this->language->lang('VIEW_ALBUM_IMAGES', $count),
Please login to merge, or discard this patch.
core/user.php 3 patches
Indentation   +169 added lines, -169 removed lines patch added patch discarded remove patch
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
 	}
104 104
 
105 105
 	/**
106
-	* Load the users data from the database and cast it...
107
-	*/
106
+	 * Load the users data from the database and cast it...
107
+	 */
108 108
 	public function load_data()
109 109
 	{
110 110
 		$this->entry_exists	= false;
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
 	}
135 135
 
136 136
 	/**
137
-	* Some functions need the data to be loaded or at least checked.
138
-	* So here we loaded if it is not laoded yet and we need it ;)
139
-	*/
137
+	 * Some functions need the data to be loaded or at least checked.
138
+	 * So here we loaded if it is not laoded yet and we need it ;)
139
+	 */
140 140
 	public function force_load()
141 141
 	{
142 142
 		if (is_null($this->entry_exists))
@@ -146,12 +146,12 @@  discard block
 block discarded – undo
146 146
 	}
147 147
 
148 148
 	/**
149
-	* Get user-setting, if the user does not have his own settings we fall back to default.
150
-	*
151
-	* @param	string	$key		Column name from the users-table
152
-	* @param	bool	$default	Load default value, if user has no entry
153
-	* @return	mixed			Returns the value of the column, it it does not exist it returns false.
154
-	*/
149
+	 * Get user-setting, if the user does not have his own settings we fall back to default.
150
+	 *
151
+	 * @param	string	$key		Column name from the users-table
152
+	 * @param	bool	$default	Load default value, if user has no entry
153
+	 * @return	mixed			Returns the value of the column, it it does not exist it returns false.
154
+	 */
155 155
 	public function get_data($key, $default = true)
156 156
 	{
157 157
 		if (isset($this->data[$key]))
@@ -217,11 +217,11 @@  discard block
 block discarded – undo
217 217
 	}
218 218
 
219 219
 	/**
220
-	* Updates the users table with the new data.
221
-	*
222
-	* @param	array	$data	Array of data we want to add/update.
223
-	* @return	bool			Returns true if the columns were updated successfully
224
-	*/
220
+	 * Updates the users table with the new data.
221
+	 *
222
+	 * @param	array	$data	Array of data we want to add/update.
223
+	 * @return	bool			Returns true if the columns were updated successfully
224
+	 */
225 225
 	private function update($data)
226 226
 	{
227 227
 		$sql_ary = array_merge($this->validate_data($data), array(
@@ -240,11 +240,11 @@  discard block
 block discarded – undo
240 240
 	}
241 241
 
242 242
 	/**
243
-	* Updates the users table by increasing the values.
244
-	*
245
-	* @param	int		$num	Number of images to add to the counter
246
-	* @return	bool			Returns true if the columns were updated successfully, else false
247
-	*/
243
+	 * Updates the users table by increasing the values.
244
+	 *
245
+	 * @param	int		$num	Number of images to add to the counter
246
+	 * @return	bool			Returns true if the columns were updated successfully, else false
247
+	 */
248 248
 	protected function update_image_count($num)
249 249
 	{
250 250
 		$sql = 'UPDATE ' . $this->gallery_users_table . '
@@ -267,11 +267,11 @@  discard block
 block discarded – undo
267 267
 	}
268 268
 
269 269
 	/**
270
-	* Updates the users table with the new data.
271
-	*
272
-	* @param	array	$data	Array of data we want to insert
273
-	* @return	bool			Returns true if the data was inserted successfully
274
-	*/
270
+	 * Updates the users table with the new data.
271
+	 *
272
+	 * @param	array	$data	Array of data we want to insert
273
+	 * @return	bool			Returns true if the data was inserted successfully
274
+	 */
275 275
 	private function insert($data)
276 276
 	{
277 277
 		$sql_ary = array_merge(self::get_default_values(), $this->validate_data($data), array(
@@ -295,8 +295,8 @@  discard block
 block discarded – undo
295 295
 	}
296 296
 
297 297
 	/**
298
-	* Delete the user from the table.
299
-	*/
298
+	 * Delete the user from the table.
299
+	 */
300 300
 	public function delete()
301 301
 	{
302 302
 		$sql = 'DELETE FROM ' . $this->gallery_users_table . '
@@ -305,10 +305,10 @@  discard block
 block discarded – undo
305 305
 	}
306 306
 
307 307
 	/**
308
-	* Delete the user from the table.
309
-	*
310
-	* @param	mixed	$user_ids	Can either be an array of IDs, one ID or the string 'all' to delete all users.
311
-	*/
308
+	 * Delete the user from the table.
309
+	 *
310
+	 * @param	mixed	$user_ids	Can either be an array of IDs, one ID or the string 'all' to delete all users.
311
+	 */
312 312
 	public function delete_users($user_ids)
313 313
 	{
314 314
 
@@ -320,12 +320,12 @@  discard block
 block discarded – undo
320 320
 	}
321 321
 
322 322
 	/**
323
-	* Updates the users table with new data.
324
-	*
325
-	* @param	mixed	$user_ids	Can either be an array of IDs, one ID or the string 'all' to update all users.
326
-	* @param	array	$data		Array of data we want to add/update.
327
-	* @return	bool				Returns true if the columns were updated successfully
328
-	*/
323
+	 * Updates the users table with new data.
324
+	 *
325
+	 * @param	mixed	$user_ids	Can either be an array of IDs, one ID or the string 'all' to update all users.
326
+	 * @param	array	$data		Array of data we want to add/update.
327
+	 * @return	bool				Returns true if the columns were updated successfully
328
+	 */
329 329
 	public function update_users($user_ids, $data)
330 330
 	{
331 331
 		$sql_ary = array_merge($this->validate_data($data), array(
@@ -344,11 +344,11 @@  discard block
 block discarded – undo
344 344
 	}
345 345
 
346 346
 	/**
347
-	* Builds a valid WHERE-sql-statement, with casted integers, or empty to allow handling all users.
348
-	*
349
-	* @param	mixed	$user_ids	Can either be an array of IDs, one ID or the string 'all' to update all users.
350
-	* @return	string				The WHERE statement with "WHERE " if needed.
351
-	*/
347
+	 * Builds a valid WHERE-sql-statement, with casted integers, or empty to allow handling all users.
348
+	 *
349
+	 * @param	mixed	$user_ids	Can either be an array of IDs, one ID or the string 'all' to update all users.
350
+	 * @return	string				The WHERE statement with "WHERE " if needed.
351
+	 */
352 352
 	public function sql_build_where($user_ids)
353 353
 	{
354 354
 		if (is_array($user_ids) && !empty($user_ids))
@@ -368,12 +368,12 @@  discard block
 block discarded – undo
368 368
 	}
369 369
 
370 370
 	/**
371
-	* Validate user data.
372
-	*
373
-	* @param	array	$data	Array of data we need to validate
374
-	* @param	bool	$inc	Are we incrementing the value
375
-	* @return	array			Array with all allowed keys and their casted and selected values
376
-	*/
371
+	 * Validate user data.
372
+	 *
373
+	 * @param	array	$data	Array of data we need to validate
374
+	 * @param	bool	$inc	Are we incrementing the value
375
+	 * @return	array			Array with all allowed keys and their casted and selected values
376
+	 */
377 377
 	public function validate_data($data, $inc = false)
378 378
 	{
379 379
 		$validated_data = array();
@@ -412,14 +412,14 @@  discard block
 block discarded – undo
412 412
 					$is_validated = false;
413 413
 
414 414
 					/**
415
-					* Event user validat data
416
-					*
417
-					* @event phpbbgallery.core.user.validate_data
418
-					* @var	bool	is_validated	is value validated
419
-					* @var	string	name			value name
420
-					* @var	mixed	value			value of the value
421
-					* @since 1.2.0
422
-					*/
415
+					 * Event user validat data
416
+					 *
417
+					 * @event phpbbgallery.core.user.validate_data
418
+					 * @var	bool	is_validated	is value validated
419
+					 * @var	string	name			value name
420
+					 * @var	mixed	value			value of the value
421
+					 * @since 1.2.0
422
+					 */
423 423
 					$vars = array('is_validated', 'name', 'value');
424 424
 					extract($this->dispatcher->trigger_event('phpbbgallery.core.user.validate_data', compact($vars)));
425 425
 
@@ -457,12 +457,12 @@  discard block
 block discarded – undo
457 457
 		$default_values = self::$default_values;
458 458
 
459 459
 		/**
460
-		* Event user validat data
461
-		*
462
-		* @event phpbbgallery.core.user.get_default_values
463
-		* @var	array	default_values	the default values array
464
-		* @since 1.2.0
465
-		*/
460
+		 * Event user validat data
461
+		 *
462
+		 * @event phpbbgallery.core.user.get_default_values
463
+		 * @var	array	default_values	the default values array
464
+		 * @since 1.2.0
465
+		 */
466 466
 		$vars = array('default_values');
467 467
 		extract($this->dispatcher->trigger_event('phpbbgallery.core.user.get_default_values', compact($vars)));
468 468
 
@@ -470,8 +470,8 @@  discard block
 block discarded – undo
470 470
 	}
471 471
 
472 472
 	/**
473
-	* Default values for new users.
474
-	*/
473
+	 * Default values for new users.
474
+	 */
475 475
 	static protected $default_values = array(
476 476
 		'user_images'		=> 0,
477 477
 		'personal_album_id'	=> 0,
@@ -505,111 +505,111 @@  discard block
 block discarded – undo
505 505
 			include($this->root_path . 'includes/functions_display.' . $this->php_ext);
506 506
 		}
507 507
 
508
-        $now = $this->user->create_datetime();
509
-        $now = phpbb_gmgetdate($now->getTimestamp() + $now->getOffset());
510
-
511
-        // Cache various user specific data ... so we don't have to recompute
512
-        // this each time the same user appears on this page
513
-        if (!isset($user_cache[$user_id])) {
514
-            if ($user_id == ANONYMOUS) {
515
-                $user_cache_data = array(
516
-                    'user_type' => USER_IGNORE,
517
-                    'joined' => '',
518
-                    'posts' => '',
519
-                    'sig' => '',
520
-                    'sig_bbcode_uid' => '',
521
-                    'sig_bbcode_bitfield' => '',
522
-                    'online' => false,
523
-                    'avatar' => ($this->user->optionget('viewavatars')) ? phpbb_get_user_avatar($row) : '',
524
-                    'rank_title' => '',
525
-                    'rank_image' => '',
526
-                    'rank_image_src' => '',
527
-                    'pm' => '',
528
-                    'email' => '',
529
-                    'jabber' => '',
530
-                    'search' => '',
531
-                    'age' => '',
532
-                    'username' => $row['username'],
533
-                    'user_colour' => $row['user_colour'],
534
-                    'contact_user' => '',
535
-                    'warnings' => 0,
536
-                    'allow_pm' => 0,
537
-                );
538
-            } else {
539
-                $user_sig = '';
540
-                // We add the signature to every posters entry because enable_sig is post dependent
541
-                if ($row['user_sig'] && $this->config['allow_sig'] && $this->user->optionget('viewsigs')) {
542
-                    $user_sig = $row['user_sig'];
543
-                }
544
-                $user_cache_data = array(
545
-                    'user_type' => $row['user_type'],
546
-                    'user_inactive_reason' => $row['user_inactive_reason'],
547
-                    'joined' => $this->user->format_date($row['user_regdate']),
548
-                    'posts' => $row['user_posts'],
549
-                    'warnings' => (isset($row['user_warnings'])) ? $row['user_warnings'] : 0,
550
-                    'sig' => $user_sig,
551
-                    'sig_bbcode_uid' => (!empty($row['user_sig_bbcode_uid'])) ? $row['user_sig_bbcode_uid'] : '',
552
-                    'sig_bbcode_bitfield' => (!empty($row['user_sig_bbcode_bitfield'])) ? $row['user_sig_bbcode_bitfield'] : '',
553
-                    'viewonline' => $row['user_allow_viewonline'],
554
-                    'allow_pm' => $row['user_allow_pm'],
555
-                    'avatar' => ($this->user->optionget('viewavatars')) ? phpbb_get_user_avatar($row) : '',
556
-                    'age' => '',
557
-                    'rank_title' => '',
558
-                    'rank_image' => '',
559
-                    'rank_image_src' => '',
560
-                    'username' => $row['username'],
561
-                    'user_colour' => $row['user_colour'],
562
-                    'contact_user' => $this->user->lang('CONTACT_USER', get_username_string('username', $user_id, $row['username'], $row['user_colour'], $row['username'])),
563
-                    'online' => false,
564
-                    'jabber' => ($this->config['jab_enable'] && $row['user_jabber'] && $this->auth->acl_get('u_sendim')) ? append_sid("{$this->root_path}memberlist.$this->php_ext", "mode=contact&amp;action=jabber&amp;u=$user_id") : '',
565
-                    'search' => ($this->config['load_search'] && $this->auth->acl_get('u_search')) ? append_sid("{$this->root_path}search.$this->php_ext", "author_id=$user_id&amp;sr=posts") : '',
566
-                    'author_full' => get_username_string('full', $user_id, $row['username'], $row['user_colour']),
567
-                    'author_colour' => get_username_string('colour', $user_id, $row['username'], $row['user_colour']),
568
-                    'author_username' => get_username_string('username', $user_id, $row['username'], $row['user_colour']),
569
-                    'author_profile' => get_username_string('profile', $user_id, $row['username'], $row['user_colour']),
570
-                );
571
-
572
-                $user_cache[$user_id] = $user_cache_data;
573
-
574
-                $user_rank_data = phpbb_get_user_rank($row, $row['user_posts']);
575
-                $user_cache[$user_id]['rank_title'] = $user_rank_data['title'];
576
-                $user_cache[$user_id]['rank_image'] = $user_rank_data['img'];
577
-                $user_cache[$user_id]['rank_image_src'] = $user_rank_data['img_src'];
578
-
579
-                if ((!empty($row['user_allow_viewemail']) && $this->auth->acl_get('u_sendemail')) || $this->auth->acl_get('a_email'))
580
-                {
581
-                    $user_cache[$user_id]['email'] = ($this->config['board_email_form'] && $this->config['email_enable']) ? append_sid("{$this->root_path}memberlist.$this->php_ext", "mode=email&amp;u=$user_id") : (($this->config['board_hide_emails'] && !$this->auth->acl_get('a_email')) ? '' : 'mailto:' . $row['user_email']);
582
-                }
583
-                else
584
-                {
585
-                    $user_cache[$user_id]['email'] = '';
586
-                }
587
-                if ($this->config['allow_birthdays'] && !empty($row['user_birthday']))
588
-                {
589
-                    list($bday_day, $bday_month, $bday_year) = array_map('intval', explode('-', $row['user_birthday']));
590
-                    if ($bday_year)
591
-                    {
592
-                        $diff = $now['mon'] - $bday_month;
593
-                        if ($diff == 0)
594
-                        {
595
-                            $diff = ($now['mday'] - $bday_day < 0) ? 1 : 0;
596
-                        }
597
-                        else
598
-                        {
599
-                            $diff = ($diff < 0) ? 1 : 0;
600
-                        }
601
-                        $user_cache[$user_id]['age'] = (int) ($now['year'] - $bday_year - $diff);
602
-                    }
603
-                }
604
-            }
605
-        }
508
+		$now = $this->user->create_datetime();
509
+		$now = phpbb_gmgetdate($now->getTimestamp() + $now->getOffset());
510
+
511
+		// Cache various user specific data ... so we don't have to recompute
512
+		// this each time the same user appears on this page
513
+		if (!isset($user_cache[$user_id])) {
514
+			if ($user_id == ANONYMOUS) {
515
+				$user_cache_data = array(
516
+					'user_type' => USER_IGNORE,
517
+					'joined' => '',
518
+					'posts' => '',
519
+					'sig' => '',
520
+					'sig_bbcode_uid' => '',
521
+					'sig_bbcode_bitfield' => '',
522
+					'online' => false,
523
+					'avatar' => ($this->user->optionget('viewavatars')) ? phpbb_get_user_avatar($row) : '',
524
+					'rank_title' => '',
525
+					'rank_image' => '',
526
+					'rank_image_src' => '',
527
+					'pm' => '',
528
+					'email' => '',
529
+					'jabber' => '',
530
+					'search' => '',
531
+					'age' => '',
532
+					'username' => $row['username'],
533
+					'user_colour' => $row['user_colour'],
534
+					'contact_user' => '',
535
+					'warnings' => 0,
536
+					'allow_pm' => 0,
537
+				);
538
+			} else {
539
+				$user_sig = '';
540
+				// We add the signature to every posters entry because enable_sig is post dependent
541
+				if ($row['user_sig'] && $this->config['allow_sig'] && $this->user->optionget('viewsigs')) {
542
+					$user_sig = $row['user_sig'];
543
+				}
544
+				$user_cache_data = array(
545
+					'user_type' => $row['user_type'],
546
+					'user_inactive_reason' => $row['user_inactive_reason'],
547
+					'joined' => $this->user->format_date($row['user_regdate']),
548
+					'posts' => $row['user_posts'],
549
+					'warnings' => (isset($row['user_warnings'])) ? $row['user_warnings'] : 0,
550
+					'sig' => $user_sig,
551
+					'sig_bbcode_uid' => (!empty($row['user_sig_bbcode_uid'])) ? $row['user_sig_bbcode_uid'] : '',
552
+					'sig_bbcode_bitfield' => (!empty($row['user_sig_bbcode_bitfield'])) ? $row['user_sig_bbcode_bitfield'] : '',
553
+					'viewonline' => $row['user_allow_viewonline'],
554
+					'allow_pm' => $row['user_allow_pm'],
555
+					'avatar' => ($this->user->optionget('viewavatars')) ? phpbb_get_user_avatar($row) : '',
556
+					'age' => '',
557
+					'rank_title' => '',
558
+					'rank_image' => '',
559
+					'rank_image_src' => '',
560
+					'username' => $row['username'],
561
+					'user_colour' => $row['user_colour'],
562
+					'contact_user' => $this->user->lang('CONTACT_USER', get_username_string('username', $user_id, $row['username'], $row['user_colour'], $row['username'])),
563
+					'online' => false,
564
+					'jabber' => ($this->config['jab_enable'] && $row['user_jabber'] && $this->auth->acl_get('u_sendim')) ? append_sid("{$this->root_path}memberlist.$this->php_ext", "mode=contact&amp;action=jabber&amp;u=$user_id") : '',
565
+					'search' => ($this->config['load_search'] && $this->auth->acl_get('u_search')) ? append_sid("{$this->root_path}search.$this->php_ext", "author_id=$user_id&amp;sr=posts") : '',
566
+					'author_full' => get_username_string('full', $user_id, $row['username'], $row['user_colour']),
567
+					'author_colour' => get_username_string('colour', $user_id, $row['username'], $row['user_colour']),
568
+					'author_username' => get_username_string('username', $user_id, $row['username'], $row['user_colour']),
569
+					'author_profile' => get_username_string('profile', $user_id, $row['username'], $row['user_colour']),
570
+				);
571
+
572
+				$user_cache[$user_id] = $user_cache_data;
573
+
574
+				$user_rank_data = phpbb_get_user_rank($row, $row['user_posts']);
575
+				$user_cache[$user_id]['rank_title'] = $user_rank_data['title'];
576
+				$user_cache[$user_id]['rank_image'] = $user_rank_data['img'];
577
+				$user_cache[$user_id]['rank_image_src'] = $user_rank_data['img_src'];
578
+
579
+				if ((!empty($row['user_allow_viewemail']) && $this->auth->acl_get('u_sendemail')) || $this->auth->acl_get('a_email'))
580
+				{
581
+					$user_cache[$user_id]['email'] = ($this->config['board_email_form'] && $this->config['email_enable']) ? append_sid("{$this->root_path}memberlist.$this->php_ext", "mode=email&amp;u=$user_id") : (($this->config['board_hide_emails'] && !$this->auth->acl_get('a_email')) ? '' : 'mailto:' . $row['user_email']);
582
+				}
583
+				else
584
+				{
585
+					$user_cache[$user_id]['email'] = '';
586
+				}
587
+				if ($this->config['allow_birthdays'] && !empty($row['user_birthday']))
588
+				{
589
+					list($bday_day, $bday_month, $bday_year) = array_map('intval', explode('-', $row['user_birthday']));
590
+					if ($bday_year)
591
+					{
592
+						$diff = $now['mon'] - $bday_month;
593
+						if ($diff == 0)
594
+						{
595
+							$diff = ($now['mday'] - $bday_day < 0) ? 1 : 0;
596
+						}
597
+						else
598
+						{
599
+							$diff = ($diff < 0) ? 1 : 0;
600
+						}
601
+						$user_cache[$user_id]['age'] = (int) ($now['year'] - $bday_year - $diff);
602
+					}
603
+				}
604
+			}
605
+		}
606 606
 	}
607 607
 
608 608
 	/**
609
-	* Get user personal album
610
-	* Checks and returns users personal album
611
-	* returns (int) $album_id or 0
612
-	*/
609
+	 * Get user personal album
610
+	 * Checks and returns users personal album
611
+	 * returns (int) $album_id or 0
612
+	 */
613 613
 	public function get_own_root_album()
614 614
 	{
615 615
 		$sql = 'SELECT personal_album_id FROM ' . $this->gallery_users_table . ' WHERE user_id = ' . (int) $this->user_id;
@@ -619,8 +619,8 @@  discard block
 block discarded – undo
619 619
 	}
620 620
 
621 621
 	/**
622
-	* Destroy user data and set this class to empty
623
-	*/
622
+	 * Destroy user data and set this class to empty
623
+	 */
624 624
 	public function destroy()
625 625
 	{
626 626
 		$this->user_id = null;
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -62,16 +62,16 @@  discard block
 block discarded – undo
62 62
 	 * @param                                                           $php_ext
63 63
 	 */
64 64
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\event\dispatcher $dispatcher, \phpbb\user $user,
65
-		\phpbb\profilefields\manager $user_cpf,	\phpbb\config\config $config,	\phpbb\auth\auth $auth,
65
+		\phpbb\profilefields\manager $user_cpf, \phpbb\config\config $config, \phpbb\auth\auth $auth,
66 66
 		$table_name, $root_path, $php_ext)
67 67
 	{
68 68
 		$this->db			= $db;
69
-		$this->dispatcher	= $dispatcher;
69
+		$this->dispatcher = $dispatcher;
70 70
 		$this->user = $user;
71 71
 		$this->user_cpf = $user_cpf;
72 72
 		$this->config = $config;
73 73
 		$this->auth = $auth;
74
-		$this->gallery_users_table	= $table_name;
74
+		$this->gallery_users_table = $table_name;
75 75
 		$this->root_path = $root_path;
76 76
 		$this->php_ext = $php_ext;
77 77
 	}
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	 */
85 85
 	public function set_user_id($user_id, $load = true)
86 86
 	{
87
-		$this->user_id		= (int) $user_id;
87
+		$this->user_id = (int) $user_id;
88 88
 		if ($load)
89 89
 		{
90 90
 			$this->load_data();
@@ -107,15 +107,15 @@  discard block
 block discarded – undo
107 107
 	*/
108 108
 	public function load_data()
109 109
 	{
110
-		$this->entry_exists	= false;
110
+		$this->entry_exists = false;
111 111
 		$sql = 'SELECT *
112 112
 			FROM ' . $this->gallery_users_table . '
113 113
 			WHERE user_id = ' . (int) $this->user_id;
114 114
 		$result = $this->db->sql_query($sql, 30);
115 115
 		if ($row = $this->db->sql_fetchrow($result))
116 116
 		{
117
-			$this->data			= $this->validate_data($row);
118
-			$this->entry_exists	= true;
117
+			$this->data = $this->validate_data($row);
118
+			$this->entry_exists = true;
119 119
 		}
120 120
 		$this->db->sql_freeresult($result);
121 121
 
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
 		while ($row = $this->db->sql_fetchrow($result))
647 647
 		{
648 648
 			//var_dump($row);
649
-			if($row['personal_album_id'] > 0)
649
+			if ($row['personal_album_id'] > 0)
650 650
 			{
651 651
 				$set_array[$row['user_id']] = $row['personal_album_id'];
652 652
 			}
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
 		$updated_rows = 0;
656 656
 		if (count($set_array) > 0)
657 657
 		{
658
-			foreach($set_array as $uid => $album_id)
658
+			foreach ($set_array as $uid => $album_id)
659 659
 			{
660 660
 				// Fill album CPF.
661 661
 				$cpf_vars = array(
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -157,8 +157,7 @@  discard block
 block discarded – undo
157 157
 		if (isset($this->data[$key]))
158 158
 		{
159 159
 			return $this->data[$key];
160
-		}
161
-		else if ($default && $this->get_default_value($key) !== null)
160
+		} else if ($default && $this->get_default_value($key) !== null)
162 161
 		{
163 162
 			return $this->get_default_value($key);
164 163
 		}
@@ -354,12 +353,10 @@  discard block
 block discarded – undo
354 353
 		if (is_array($user_ids) && !empty($user_ids))
355 354
 		{
356 355
 			$sql_where = 'WHERE ' . $this->db->sql_in_set('user_id', array_map('intval', $user_ids));
357
-		}
358
-		else if ($user_ids == 'all')
356
+		} else if ($user_ids == 'all')
359 357
 		{
360 358
 			$sql_where = '';
361
-		}
362
-		else
359
+		} else
363 360
 		{
364 361
 			$sql_where = 'WHERE user_id = ' . (int) $user_ids;
365 362
 		}
@@ -390,8 +387,7 @@  discard block
 block discarded – undo
390 387
 					{
391 388
 						// While incrementing, the iamges might be lower than 0.
392 389
 						$validated_data[$name] = (int) $value;
393
-					}
394
-					else
390
+					} else
395 391
 					{
396 392
 						$validated_data[$name] = max(0, (int) $value);
397 393
 					}
@@ -579,8 +575,7 @@  discard block
 block discarded – undo
579 575
                 if ((!empty($row['user_allow_viewemail']) && $this->auth->acl_get('u_sendemail')) || $this->auth->acl_get('a_email'))
580 576
                 {
581 577
                     $user_cache[$user_id]['email'] = ($this->config['board_email_form'] && $this->config['email_enable']) ? append_sid("{$this->root_path}memberlist.$this->php_ext", "mode=email&amp;u=$user_id") : (($this->config['board_hide_emails'] && !$this->auth->acl_get('a_email')) ? '' : 'mailto:' . $row['user_email']);
582
-                }
583
-                else
578
+                } else
584 579
                 {
585 580
                     $user_cache[$user_id]['email'] = '';
586 581
                 }
@@ -593,8 +588,7 @@  discard block
 block discarded – undo
593 588
                         if ($diff == 0)
594 589
                         {
595 590
                             $diff = ($now['mday'] - $bday_day < 0) ? 1 : 0;
596
-                        }
597
-                        else
591
+                        } else
598 592
                         {
599 593
                             $diff = ($diff < 0) ? 1 : 0;
600 594
                         }
Please login to merge, or discard this patch.
core/file/file.php 3 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
 	}
232 232
 
233 233
 	/**
234
-	* We need to disable the "last-modified" caching for guests and in cases of image-errors,
235
-	* so that they can view them, if they logged in or the error was fixed.
236
-	*/
234
+	 * We need to disable the "last-modified" caching for guests and in cases of image-errors,
235
+	 * so that they can view them, if they logged in or the error was fixed.
236
+	 */
237 237
 	public function disable_browser_cache()
238 238
 	{
239 239
 		$this->browser_cache = false;
@@ -460,12 +460,12 @@  discard block
 block discarded – undo
460 460
 	}
461 461
 
462 462
 	/**
463
-	* Delete file from disc.
464
-	*
465
-	* @param	mixed		$files		String with filename or an array of filenames
466
-	*									Array-Format: $image_id => $filename
467
-	* @param	array		$locations	Array of valid url::path()s where the image should be deleted from
468
-	*/
463
+	 * Delete file from disc.
464
+	 *
465
+	 * @param	mixed		$files		String with filename or an array of filenames
466
+	 *									Array-Format: $image_id => $filename
467
+	 * @param	array		$locations	Array of valid url::path()s where the image should be deleted from
468
+	 */
469 469
 	public function delete($files, $locations = array('thumbnail', 'medium', 'upload'))
470 470
 	{
471 471
 		if (!is_array($files))
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -294,13 +294,13 @@
 block discarded – undo
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));
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -161,8 +161,7 @@  discard block
 block discarded – undo
161 161
 		if (isset($this->image_size['file']))
162 162
 		{
163 163
 			$file_size = $this->image_size['file'];
164
-		}
165
-		else if ($force_filesize)
164
+		} else if ($force_filesize)
166 165
 		{
167 166
 			$file_size = @filesize($this->image_source);
168 167
 		}
@@ -296,8 +295,7 @@  discard block
 block discarded – undo
296 295
 		{
297 296
 			$this->thumb_height	= $max_height;
298 297
 			$this->thumb_width	= round($max_width * (($this->image_size['width'] / $max_width) / ($this->image_size['height'] / $max_height)));
299
-		}
300
-		else
298
+		} else
301 299
 		{
302 300
 			$this->thumb_height	= round($max_height * (($this->image_size['height'] / $max_height) / ($this->image_size['width'] / $max_width)));
303 301
 			$this->thumb_width	= $max_width;
@@ -407,8 +405,7 @@  discard block
 block discarded – undo
407 405
 		{
408 406
 			$this->image_source = $get_wm_name;
409 407
 			$this->read_image();
410
-		}
411
-		else
408
+		} else
412 409
 		{
413 410
 			$this->watermark_size = getimagesize($this->watermark_source);
414 411
 			switch ($this->watermark_size['mime'])
@@ -437,16 +434,14 @@  discard block
 block discarded – undo
437 434
 			if ($watermark_position & $phpbb_gallery_constants::WATERMARK_LEFT)
438 435
 			{
439 436
 				$dst_x = 5;
440
-			}
441
-			else if ($watermark_position & $phpbb_gallery_constants::WATERMARK_RIGHT)
437
+			} else if ($watermark_position & $phpbb_gallery_constants::WATERMARK_RIGHT)
442 438
 			{
443 439
 				$dst_x = ($this->image_size['width'] - $this->watermark_size[0] - 5);
444 440
 			}
445 441
 			if ($watermark_position & $phpbb_gallery_constants::WATERMARK_TOP)
446 442
 			{
447 443
 				$dst_y = 5;
448
-			}
449
-			else if ($watermark_position & $phpbb_gallery_constants::WATERMARK_MIDDLE)
444
+			} else if ($watermark_position & $phpbb_gallery_constants::WATERMARK_MIDDLE)
450 445
 			{
451 446
 				$dst_y = (($this->image_size['height'] * 0.5) - ($this->watermark_size[1] * 0.5));
452 447
 			}
Please login to merge, or discard this patch.
core/event/main_listener.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -51,24 +51,24 @@  discard block
 block discarded – undo
51 51
 	protected $target = 0;
52 52
 	protected $albums = array();
53 53
 
54
-    /**
55
-     * Constructor
56
-     *
57
-     * @param \phpbb\controller\helper $helper Newspage helper object
58
-     * @param \phpbb\template\template $template Template object
59
-     * @param \phpbb\user $user User object
60
-     * @param \phpbb\language\language $lang
61
-     * @param \phpbbgallery\core\search $gallery_search
62
-     * @param \phpbbgallery\core\config $gallery_config
63
-     * @param \phpbb\db\driver\driver_interface $db
64
-     * @param $albums_table
65
-     * @param $users_table
66
-     * @param string $php_ext phpEx
67
-     */
54
+	/**
55
+	 * Constructor
56
+	 *
57
+	 * @param \phpbb\controller\helper $helper Newspage helper object
58
+	 * @param \phpbb\template\template $template Template object
59
+	 * @param \phpbb\user $user User object
60
+	 * @param \phpbb\language\language $lang
61
+	 * @param \phpbbgallery\core\search $gallery_search
62
+	 * @param \phpbbgallery\core\config $gallery_config
63
+	 * @param \phpbb\db\driver\driver_interface $db
64
+	 * @param $albums_table
65
+	 * @param $users_table
66
+	 * @param string $php_ext phpEx
67
+	 */
68 68
 	public function __construct(\phpbb\controller\helper $helper, \phpbb\template\template $template, \phpbb\user $user,
69
-                                \phpbb\language\language $lang, \phpbbgallery\core\search $gallery_search,
70
-	                            \phpbbgallery\core\config $gallery_config, \phpbb\db\driver\driver_interface $db,
71
-	                            $albums_table, $users_table, $php_ext)
69
+								\phpbb\language\language $lang, \phpbbgallery\core\search $gallery_search,
70
+								\phpbbgallery\core\config $gallery_config, \phpbb\db\driver\driver_interface $db,
71
+								$albums_table, $users_table, $php_ext)
72 72
 	{
73 73
 		$this->helper = $helper;
74 74
 		$this->template = $template;
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	}
108 108
 	public function user_profile_galleries($event)
109 109
 	{
110
-	    $this->language->add_lang(array('gallery'), 'phpbbgallery/core');
110
+		$this->language->add_lang(array('gallery'), 'phpbbgallery/core');
111 111
 		$this->language->add_lang('search');
112 112
 		$random = $recent = false;
113 113
 		$show_parts = $this->gallery_config->get('rrc_profile_mode');
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,13 +122,13 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -146,8 +146,7 @@
 block discarded – undo
146 146
 					'U_GALLERY_IMAGES_ALLOW'	=> true,
147 147
 					'U_GALLERY_IMAGES'	=> $user_info['user_images'],
148 148
 				));
149
-			}
150
-			else
149
+			} else
151 150
 			{
152 151
 				$this->template->assign_vars(array(
153 152
 					'U_GALLERY_IMAGES_ALLOW'	=> true,
Please login to merge, or discard this patch.
core/language/en/gallery_acp.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@
 block discarded – undo
27 27
 	'ACP_GALLERY_OVERVIEW'			=> 'phpBB Gallery',
28 28
 	'ACP_GALLERY_OVERVIEW_EXPLAIN'	=> 'Here are some statistics about your gallery.',
29 29
 
30
-    // File dirs states
31
-    'ACP_FILES_DIR_STATE'           => '<strong>./files/</strong> state',
32
-    'ACP_CORE_DIR_STATE'    => '<strong>./files/phpbbgallery/core/</strong> state',
33
-    'ACP_SOURCE_DIR_STATE'    => '<strong>./files/phpbbgallery/core/source/</strong> state',
34
-    'ACP_MEDIUM_DIR_STATE'    => '<strong>./files/phpbbgallery/core/meduim/</strong> state',
35
-    'ACP_MINI_DIR_STATE'    => '<strong>./files/phpbbgallery/core/mini/</strong> state',
30
+	// File dirs states
31
+	'ACP_FILES_DIR_STATE'           => '<strong>./files/</strong> state',
32
+	'ACP_CORE_DIR_STATE'    => '<strong>./files/phpbbgallery/core/</strong> state',
33
+	'ACP_SOURCE_DIR_STATE'    => '<strong>./files/phpbbgallery/core/source/</strong> state',
34
+	'ACP_MEDIUM_DIR_STATE'    => '<strong>./files/phpbbgallery/core/meduim/</strong> state',
35
+	'ACP_MINI_DIR_STATE'    => '<strong>./files/phpbbgallery/core/mini/</strong> state',
36 36
 
37 37
 	'ADD_ALBUM_ON_TOP'				=> 'Add album at the top',
38 38
 	'ADD_PERMISSIONS'				=> 'Add Permissions',
Please login to merge, or discard this patch.
core/language/en/info_acp_gallery.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,10 +39,10 @@
 block discarded – undo
39 39
 	'GALLERY_POPUP'						=> 'Gallery',
40 40
 	'GALLERY_POPUP_HELPLINE'			=> 'Open a popup where you can select your recent images and upload new images.',
41 41
 
42
-    // Please do not change the copyright.
43
-    'GALLERY_COPYRIGHT'	=> 'Powered by <a href="http://www.anavaro.com/">phpBB Gallery</a> &copy; 2016 <a href="http://www.anavaro.com/">Lucifer</a>',
42
+	// Please do not change the copyright.
43
+	'GALLERY_COPYRIGHT'	=> 'Powered by <a href="http://www.anavaro.com/">phpBB Gallery</a> &copy; 2016 <a href="http://www.anavaro.com/">Lucifer</a>',
44 44
 
45
-    // A little line where you can give yourself some credits on the translation.
45
+	// A little line where you can give yourself some credits on the translation.
46 46
 	//'GALLERY_TRANSLATION_INFO'			=> 'English “phpBB Gallery“-Translation by <a href="http://www.flying-bits.org/">nickvergessen</a>',
47 47
 	'GALLERY_TRANSLATION_INFO'			=> '',
48 48
 
Please login to merge, or discard this patch.
core/language/en/gallery.php 1 patch
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -24,56 +24,56 @@  discard block
 block discarded – undo
24 24
 }
25 25
 
26 26
 $lang = array_merge($lang, array(
27
-    'ADD_UPLOAD_FIELD'				=> 'Add more upload fields',
28
-    'ALBUM'							=> 'Album',
29
-    'ALBUM_IS_CATEGORY'				=> 'The album you cheated to, is a category-album.<br />You can’t upload to categories.',
30
-    'ALBUM_LOCKED'					=> 'Locked',
31
-    'ALBUM_NAME'					=> 'Album name',
32
-    'ALBUM_NOT_EXIST'				=> 'This album does not exist',
33
-    'ALBUM_PERMISSIONS'				=> 'Album Permissions',
34
-    'ALBUM_REACHED_QUOTA'			=> 'This album has reached the quota of images. You cannot upload images anymore.<br />Please contact the administrator for more information.',
35
-    'ALBUM_UPLOAD_NEED_APPROVAL'		=> 'Your images have been uploaded successfully.<br /><br />But your image must be approved by a administrator or a moderator before they are public visible.',
36
-    'ALBUM_UPLOAD_NEED_APPROVAL_ERROR'	=> 'Some of your images have been uploaded successfully.<br /><br />But your images must be approved by a administrator or a moderator before they are public visible.<br /><br /><p class="error">%s</p>',
37
-    'ALBUM_UPLOAD_SUCCESSFUL'		=> 'Your images have been uploaded successfully.',
38
-    'ALBUM_UPLOAD_SUCCESSFUL_ERROR'	=> 'Some of your images have been uploaded successfully.<br /><br /><span class="error">%s</span>',
39
-    'ALBUMS_MARKED'					=> 'All albums have been marked read.',
40
-    'ALL'							=> 'All',
41
-    'ALL_IMAGES'					=> 'All image',
42
-    'ALLOW_COMMENTS'				=> 'Allow comments for this image.',
43
-    'ALLOW_COMMENTS_ARY'			=> array(
44
-        0	=> 'Allow comments for this image.',
45
-        2	=> 'Allow comments for these images.',
46
-    ),
47
-    'ALLOWED_FILETYPES'				=> 'Allowed filetypes',
48
-    'APPROVE'						=> 'Approve',
49
-    'DISAPPROVE'					=> 'Dissaprove',
50
-    'APPROVE_IMAGE'					=> 'Approve image',
27
+	'ADD_UPLOAD_FIELD'				=> 'Add more upload fields',
28
+	'ALBUM'							=> 'Album',
29
+	'ALBUM_IS_CATEGORY'				=> 'The album you cheated to, is a category-album.<br />You can’t upload to categories.',
30
+	'ALBUM_LOCKED'					=> 'Locked',
31
+	'ALBUM_NAME'					=> 'Album name',
32
+	'ALBUM_NOT_EXIST'				=> 'This album does not exist',
33
+	'ALBUM_PERMISSIONS'				=> 'Album Permissions',
34
+	'ALBUM_REACHED_QUOTA'			=> 'This album has reached the quota of images. You cannot upload images anymore.<br />Please contact the administrator for more information.',
35
+	'ALBUM_UPLOAD_NEED_APPROVAL'		=> 'Your images have been uploaded successfully.<br /><br />But your image must be approved by a administrator or a moderator before they are public visible.',
36
+	'ALBUM_UPLOAD_NEED_APPROVAL_ERROR'	=> 'Some of your images have been uploaded successfully.<br /><br />But your images must be approved by a administrator or a moderator before they are public visible.<br /><br /><p class="error">%s</p>',
37
+	'ALBUM_UPLOAD_SUCCESSFUL'		=> 'Your images have been uploaded successfully.',
38
+	'ALBUM_UPLOAD_SUCCESSFUL_ERROR'	=> 'Some of your images have been uploaded successfully.<br /><br /><span class="error">%s</span>',
39
+	'ALBUMS_MARKED'					=> 'All albums have been marked read.',
40
+	'ALL'							=> 'All',
41
+	'ALL_IMAGES'					=> 'All image',
42
+	'ALLOW_COMMENTS'				=> 'Allow comments for this image.',
43
+	'ALLOW_COMMENTS_ARY'			=> array(
44
+		0	=> 'Allow comments for this image.',
45
+		2	=> 'Allow comments for these images.',
46
+	),
47
+	'ALLOWED_FILETYPES'				=> 'Allowed filetypes',
48
+	'APPROVE'						=> 'Approve',
49
+	'DISAPPROVE'					=> 'Dissaprove',
50
+	'APPROVE_IMAGE'					=> 'Approve image',
51 51
 
52
-    //@todo
53
-    'ALBUM_COMMENT_CAN'			=> 'You <strong>can</strong> post comments to images in this album',
54
-    'ALBUM_COMMENT_CANNOT'		=> 'You <strong>cannot</strong> post comments to images in this album',
55
-    'ALBUM_DELETE_CAN'			=> 'You <strong>can</strong> delete your images in this album',
56
-    'ALBUM_DELETE_CANNOT'		=> 'You <strong>cannot</strong> delete your images in this album',
57
-    'ALBUM_EDIT_CAN'			=> 'You <strong>can</strong> edit your images in this album',
58
-    'ALBUM_EDIT_CANNOT'			=> 'You <strong>cannot</strong> edit your images in this album',
59
-    'ALBUM_RATE_CAN'			=> 'You <strong>can</strong> rate images in this album',
60
-    'ALBUM_RATE_CANNOT'			=> 'You <strong>cannot</strong> rate images in this album',
61
-    'ALBUM_UPLOAD_CAN'			=> 'You <strong>can</strong> upload new images in this album',
62
-    'ALBUM_UPLOAD_CANNOT'		=> 'You <strong>cannot</strong> upload new images in this album',
63
-    'ALBUM_VIEW_CAN'			=> 'You <strong>can</strong> view images in this album',
64
-    'ALBUM_VIEW_CANNOT'			=> 'You <strong>cannot</strong> view images in this album',
52
+	//@todo
53
+	'ALBUM_COMMENT_CAN'			=> 'You <strong>can</strong> post comments to images in this album',
54
+	'ALBUM_COMMENT_CANNOT'		=> 'You <strong>cannot</strong> post comments to images in this album',
55
+	'ALBUM_DELETE_CAN'			=> 'You <strong>can</strong> delete your images in this album',
56
+	'ALBUM_DELETE_CANNOT'		=> 'You <strong>cannot</strong> delete your images in this album',
57
+	'ALBUM_EDIT_CAN'			=> 'You <strong>can</strong> edit your images in this album',
58
+	'ALBUM_EDIT_CANNOT'			=> 'You <strong>cannot</strong> edit your images in this album',
59
+	'ALBUM_RATE_CAN'			=> 'You <strong>can</strong> rate images in this album',
60
+	'ALBUM_RATE_CANNOT'			=> 'You <strong>cannot</strong> rate images in this album',
61
+	'ALBUM_UPLOAD_CAN'			=> 'You <strong>can</strong> upload new images in this album',
62
+	'ALBUM_UPLOAD_CANNOT'		=> 'You <strong>cannot</strong> upload new images in this album',
63
+	'ALBUM_VIEW_CAN'			=> 'You <strong>can</strong> view images in this album',
64
+	'ALBUM_VIEW_CANNOT'			=> 'You <strong>cannot</strong> view images in this album',
65 65
 
66
-    'BAD_UPLOAD_FILE_SIZE'			=> 'Your uploaded file is too large',
67
-    'BBCODES'						=> 'BBCodes',
68
-    'BROWSING_ALBUM'				=> 'Users browsing this album: %1$s',
69
-    'BROWSING_ALBUM_GUEST'			=> 'Users browsing this album: %1$s and %2$d guest',
70
-    'BROWSING_ALBUM_GUESTS'			=> 'Users browsing this album: %1$s and %2$d guests',
66
+	'BAD_UPLOAD_FILE_SIZE'			=> 'Your uploaded file is too large',
67
+	'BBCODES'						=> 'BBCodes',
68
+	'BROWSING_ALBUM'				=> 'Users browsing this album: %1$s',
69
+	'BROWSING_ALBUM_GUEST'			=> 'Users browsing this album: %1$s and %2$d guest',
70
+	'BROWSING_ALBUM_GUESTS'			=> 'Users browsing this album: %1$s and %2$d guests',
71 71
 
72
-    'CHANGE_AUTHOR'					=> 'Change author',
73
-    'CHANGE_IMAGE_STATUS'			=> 'Change image-status',
74
-    'CLICK_RETURN_ALBUM'			=> 'Click %shere%s to return to the album',
75
-    'CLICK_RETURN_IMAGE'			=> 'Click %shere%s to return to the image',
76
-    'CLICK_RETURN_INDEX'			=> 'Click %shere%s to return to the index',
72
+	'CHANGE_AUTHOR'					=> 'Change author',
73
+	'CHANGE_IMAGE_STATUS'			=> 'Change image-status',
74
+	'CLICK_RETURN_ALBUM'			=> 'Click %shere%s to return to the album',
75
+	'CLICK_RETURN_IMAGE'			=> 'Click %shere%s to return to the image',
76
+	'CLICK_RETURN_INDEX'			=> 'Click %shere%s to return to the index',
77 77
 	'COMMENT'						=> 'Comment',
78 78
 	'COMMENT_IMAGE'					=> 'Posting a comment on an image in album %s',
79 79
 	'COMMENT_LENGTH'				=> 'Enter your comment here, it may contain no more than <strong>%d</strong> characters.',
@@ -362,8 +362,8 @@  discard block
 block discarded – undo
362 362
 
363 363
 	'QUICK_MOD'	=> 'Select moderator action',
364 364
 	'WRONG_FILESIZE'	=> 'Image is bigger then the limit!',
365
-    'UNREAD_IMAGES'		=> 'Unviewed images',
366
-    'NO_UNREAD_IMAGES'	=> 'No unviewed images',
365
+	'UNREAD_IMAGES'		=> 'Unviewed images',
366
+	'NO_UNREAD_IMAGES'	=> 'No unviewed images',
367 367
 
368 368
 	// Versions 1.2.1 additions
369 369
 	'GALLERY_DROP'		=> 'Drop your images here',
Please login to merge, or discard this patch.
core/language/ru/gallery_acp.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,14 +28,14 @@
 block discarded – undo
28 28
 	'ACP_GALLERY_OVERVIEW'			=> 'Обзор',
29 29
 	'ACP_GALLERY_OVERVIEW_EXPLAIN'	=> '',
30 30
 
31
-    // File dirs states
32
-    'ACP_FILES_DIR_STATE'           => '<strong>./files/</strong> state',
33
-    'ACP_CORE_DIR_STATE'    => '<strong>./files/phpbbgallery/core/</strong> state',
34
-    'ACP_SOURCE_DIR_STATE'    => '<strong>./files/phpbbgallery/core/source/</strong> state',
35
-    'ACP_MEDIUM_DIR_STATE'    => '<strong>./files/phpbbgallery/core/meduim/</strong> state',
36
-    'ACP_MINI_DIR_STATE'    => '<strong>./files/phpbbgallery/core/mini/</strong> state',
31
+	// File dirs states
32
+	'ACP_FILES_DIR_STATE'           => '<strong>./files/</strong> state',
33
+	'ACP_CORE_DIR_STATE'    => '<strong>./files/phpbbgallery/core/</strong> state',
34
+	'ACP_SOURCE_DIR_STATE'    => '<strong>./files/phpbbgallery/core/source/</strong> state',
35
+	'ACP_MEDIUM_DIR_STATE'    => '<strong>./files/phpbbgallery/core/meduim/</strong> state',
36
+	'ACP_MINI_DIR_STATE'    => '<strong>./files/phpbbgallery/core/mini/</strong> state',
37 37
 
38
-    'ADD_ALBUM_ON_TOP'				=> 'Сделать альбом первым в списке',
38
+	'ADD_ALBUM_ON_TOP'				=> 'Сделать альбом первым в списке',
39 39
 	'ADD_PERMISSIONS'				=> 'Добавить права доступа',
40 40
 	'ALBUM_ADMIN'					=> 'Администрирование альбомов',
41 41
 	'ALBUM_ADMIN_EXPLAIN'			=> 'Каждый альбом может содержать неограниченное количество вложенных альбомов. Здесь можно добавлять, редактировать, удалять, закрывать и открывать альбомы, а также управлять их дополнительными свойствами. Также, если тебуется, можно произвести ресинхронизацию альбома. Чтобы вновь созданный альбом стал виден, необходимо установить или скопировать соответствующие права доступа.',
Please login to merge, or discard this patch.