Ticket #129: rejected.patch

File rejected.patch, 1.3 KB (added by haniball, 3 years ago)

The fix for this ticked

  • gp-includes/things/translation.php

     
    7979                if ( 'yes' == gp_array_get( $filters, 'translated' ) ) { 
    8080                        $where[] = 't.translation_0 IS NOT NULL'; 
    8181                } elseif ( 'no' == gp_array_get( $filters, 'translated' ) ) { 
    82                         $where[] = 't.translation_0 IS NULL'; 
     82                        // rejected are untranslated too 
     83                        $where[] = "(t.translation_0 IS NULL OR t.status = 'rejected')"; 
    8384                } 
    8485                if ( gp_array_get( $filters, 'before_date_added' ) ) { 
    8586                        $where[] = $gpdb->prepare( 't.date_added > %s', gp_array_get( $filters, 'before_date_added' ) ); 
     
    192193                                array('original_id' => $this->original_id, 'translation_set_id' => $this->translation_set_id, 'status' => 'waiting') ) 
    193194            && $this->update( array('status' => 'old'), 
    194195                        array('original_id' => $this->original_id, 'translation_set_id' => $this->translation_set_id, 'status' => 'fuzzy') ) 
    195                 && $this->update( array('status' => 'current') ); 
     196                && $this->update( array('status' => 'old'), 
     197                        array('original_id' => $this->original_id, 'translation_set_id' => $this->translation_set_id, 'status' => 'rejected') ) 
     198                && $this->update( array('status' => 'current') );                
    196199        } 
    197200         
    198201        function reject() {