Passed
Pull Request — release-2.1 (#5286)
by Mathias
05:15
created
Sources/ManageSettings.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1806,26 +1806,26 @@
 block discarded – undo
1806 1806
 		$fields = array();
1807 1807
 		$new_sort = array();
1808 1808
 		
1809
-		while($row = $smcFunc['db_fetch_assoc']($request))
1809
+		while ($row = $smcFunc['db_fetch_assoc']($request))
1810 1810
 				$fields[$row['id_field']] = $row['field_order'];
1811 1811
 		$smcFunc['db_free_result']($request);
1812 1812
 
1813 1813
 
1814
-		if ($_GET['move'] == 'up' && count($fields) -1 > $context['fid'] )
1814
+		if ($_GET['move'] == 'up' && count($fields) - 1 > $context['fid'])
1815 1815
 		{
1816
-			if( count($fields) -1 > $context['fid'] ) {
1817
-				$new_sort = array_slice($fields ,0 ,$context['fid'] ,true);
1816
+			if (count($fields) - 1 > $context['fid']) {
1817
+				$new_sort = array_slice($fields, 0, $context['fid'], true);
1818 1818
 				$new_sort[] = $fields[$context['fid'] + 1];
1819 1819
 				$new_sort[] = $fields[$context['fid']];
1820
-				$new_sort += array_slice($fields ,$context['fid'] + 2 ,count($fields) ,true);
1820
+				$new_sort += array_slice($fields, $context['fid'] + 2, count($fields), true);
1821 1821
 			}
1822 1822
 		}
1823 1823
 		elseif ($context['fid'] > 0 and $context['fid'] < count($fields))
1824 1824
 		{
1825
-				$new_sort = array_slice($fields ,0 ,($context['fid'] - 1) ,true);
1825
+				$new_sort = array_slice($fields, 0, ($context['fid'] - 1), true);
1826 1826
 				$new_sort[] = $fields[$context['fid']];
1827 1827
 				$new_sort[] = $fields[$context['fid'] - 1];
1828
-				$new_sort += array_slice($fields ,($context['fid'] + 1) ,count($fields) ,true);
1828
+				$new_sort += array_slice($fields, ($context['fid'] + 1), count($fields), true);
1829 1829
 		}
1830 1830
 		else
1831 1831
 			redirectexit('action=admin;area=featuresettings;sa=profile'); // @todo implement an error handler
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1813,7 +1813,8 @@
 block discarded – undo
1813 1813
 
1814 1814
 		if ($_GET['move'] == 'up' && count($fields) -1 > $context['fid'] )
1815 1815
 		{
1816
-			if( count($fields) -1 > $context['fid'] ) {
1816
+			if( count($fields) -1 > $context['fid'] )
1817
+			{
1817 1818
 				$new_sort = array_slice($fields ,0 ,$context['fid'] ,true);
1818 1819
 				$new_sort[] = $fields[$context['fid'] + 1];
1819 1820
 				$new_sort[] = $fields[$context['fid']];
Please login to merge, or discard this patch.