Ticket #85: filter_context_comment.patch
| File filter_context_comment.patch, 1.7 KB (added by dimadin, 17 months ago) |
|---|
-
gp-includes/things/translation.php
99 99 } elseif ( 'no' == gp_array_get( $filters, 'warnings' ) ) { 100 100 $where[] = 't.warnings IS NULL'; 101 101 } 102 102 if ( 'yes' == gp_array_get( $filters, 'with_context' ) ) { 103 $where[] = 'o.context IS NOT NULL'; 104 } 105 if ( 'yes' == gp_array_get( $filters, 'with_comment' ) ) { 106 $where[] = 'o.comment IS NOT NULL AND o.comment <> ""'; 107 } 108 103 109 if ( gp_array_get( $filters, 'user_login' ) ) { 104 110 $user = GP::$user->by_login( $filters['user_login'] ); 105 111 // do not return any entries if the user doesn't exist -
gp-templates/translations.php
68 68 ), gp_array_get( $filters, 'translated', 'either' ) ); 69 69 ?> 70 70 </dd> 71 71 72 <dd> 73 <input type="checkbox" name="filters[with_comment]" value="yes" id="filters[with_comment][yes]" <?php gp_checked( 'yes' == gp_array_get( $filters, 'with_comment' ) ); ?>><label for='filters[with_comment][yes]'><?php _e( 'With comment' ); ?></label><br /> 74 <input type="checkbox" name="filters[with_context]" value="yes" id="filters[with_context][yes]" <?php gp_checked( 'yes' == gp_array_get( $filters, 'with_context' ) ); ?>><label for='filters[with_context][yes]'><?php _e( 'With context' ); ?></label> 75 </dd> 76 72 77 <dt><label><?php _e('Status:'); ?></label></dt> 73 78 <dd> 74 79 <?php echo gp_radio_buttons('filters[status]', //TODO: show only these, which user is allowed to see afterwards
