Code Duplication    Length = 10-10 lines in 2 locations

app/Controller/ProdutoController.php 2 locations

@@ 36-45 (lines=10) @@
33
			$conditions['limit'] = $_GET['iDisplayLength'];
34
		}
35
36
		if ( isset( $_GET['iSortCol_0'] ) )
37
		{
38
			for ( $i=0 ; $i < intval( $_GET['iSortingCols'] ) ; $i++ )
39
			{
40
				if ( $_GET[ 'bSortable_' . intval($_GET['iSortCol_' . $i]) ] == "true" )
41
				{
42
					$conditions['order'] = array('Produto.' . $aColumns[intval($_GET['iSortCol_' . $i])] => $_GET['sSortDir_'.$i]);
43
				}
44
			}
45
		}
46
47
		if ( isset( $_GET['sSearch'] ) && !empty( $_GET['sSearch'] ) )
48
		{
@@ 125-134 (lines=10) @@
122
			$conditions['limit'] = $_GET['iDisplayLength'];
123
		}
124
125
		if ( isset( $_GET['iSortCol_0'] ) )
126
		{
127
			for ( $i=0 ; $i < intval( $_GET['iSortingCols'] ) ; $i++ )
128
			{
129
				if ( $_GET[ 'bSortable_' . intval($_GET['iSortCol_' . $i]) ] == "true" )
130
				{
131
					$conditions['order'] = array('Produto.' . $aColumns[intval($_GET['iSortCol_' . $i])] => $_GET['sSortDir_'.$i]);
132
				}
133
			}
134
		}
135
136
		if ( isset( $_GET['sSearch'] ) && !empty( $_GET['sSearch'] ) )
137
		{