Ticket #120: fix-incorrect-translation-lists.diff
| File fix-incorrect-translation-lists.diff, 1.1 KB (added by Nightgunner5, 22 months ago) |
|---|
-
translation.php
117 117 } 118 118 if ( $all_in ) { 119 119 $statuses_where = array(); 120 121 if ( !in_array( gp_array_get( $filters, 'translated' ), array( 'yes', 'no' ) ) ) 122 $statuses_where[] = 't.status IS NULL'; 123 120 124 foreach( $statuses as $single_status ) { 121 125 $statuses_where[] = $gpdb->prepare( 't.status = %s', $single_status ); 122 126 } 123 127 $statuses_where = '(' . implode( ' OR ', $statuses_where ) . ')'; 124 $join_where[] = $statuses_where; 125 /* 126 usually we want the status to be part of the ON clause, because we want to include 127 the untranslated strings in the listing. This, however is not the case if the filter 128 explictly forbids untranslated strings 129 */ 130 if ( 'no' == gp_array_get( $filters, 'translated' ) ) { 128 129 if ( 'no' == gp_array_get( $filters, 'translated' ) ) 130 $join_where[] = $statuses_where; 131 else 131 132 $where[] = $statuses_where; 132 }133 133 } 134 134 135 135 $where = implode( ' AND ', $where );
