Completed
Push — develop ( 29a8b4...c1397e )
by Gennady
17:18
created
future/includes/class-gv-template-view-table.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -70,22 +70,22 @@  discard block
 block discarded – undo
70 70
 			'dir' => 'asc',
71 71
 		);
72 72
 
73
-		if ( ! empty( $sorting['key'] ) && (string) $sort_field_id === (string) $sorting['key'] ) {
73
+		if ( ! empty( $sorting[ 'key' ] ) && (string)$sort_field_id === (string)$sorting[ 'key' ] ) {
74 74
 			//toggle sorting direction.
75
-			if ( 'asc' === $sorting['direction'] ) {
76
-				$sort_args['dir'] = 'desc';
75
+			if ( 'asc' === $sorting[ 'direction' ] ) {
76
+				$sort_args[ 'dir' ] = 'desc';
77 77
 				$class .= ' gv-icon-sort-desc';
78 78
 			} else {
79
-				$sort_args['dir'] = 'asc';
79
+				$sort_args[ 'dir' ] = 'asc';
80 80
 				$class .= ' gv-icon-sort-asc';
81 81
 			}
82 82
 		} else {
83 83
 			$class .= ' gv-icon-caret-up-down';
84 84
 		}
85 85
 
86
-		$url = add_query_arg( $sort_args, remove_query_arg( array('pagenum') ) );
86
+		$url = add_query_arg( $sort_args, remove_query_arg( array( 'pagenum' ) ) );
87 87
 
88
-		return '<a href="'. esc_url_raw( $url ) .'" class="'. $class .'" ></a>&nbsp;'. $column_label;
88
+		return '<a href="' . esc_url_raw( $url ) . '" class="' . $class . '" ></a>&nbsp;' . $column_label;
89 89
 	}
90 90
 
91 91
 	/**
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
                 do_action( 'gravityview_table_cells_before', \GravityView_View::getInstance() );
218 218
 
219 219
                 foreach ( $fields->all() as $field ) {
220
-					if ( isset( $this->view->unions[ $entry['form_id'] ] ) ) {
221
-						if ( isset( $this->view->unions[ $entry['form_id'] ][ $field->ID ] ) ) {
222
-							$field = $this->view->unions[ $entry['form_id'] ][ $field->ID ];
220
+					if ( isset( $this->view->unions[ $entry[ 'form_id' ] ] ) ) {
221
+						if ( isset( $this->view->unions[ $entry[ 'form_id' ] ][ $field->ID ] ) ) {
222
+							$field = $this->view->unions[ $entry[ 'form_id' ] ][ $field->ID ];
223 223
 						} else {
224 224
 							if ( ! $field instanceof Internal_Field ) {
225 225
 								$field = Internal_Field::from_configuration( array( 'id' => 'custom' ) );
Please login to merge, or discard this patch.