diff --git a/includes/SpecialValidate.php b/includes/SpecialValidate.php index 5766a318dbf..1c43c98c56c 100644 --- a/includes/SpecialValidate.php +++ b/includes/SpecialValidate.php @@ -555,7 +555,7 @@ class Validation { # Collecting statistic data $db =& wfGetDB( DB_SLAVE ); - $res = $db->select( 'validate', '*', array( 'val_page' => $this->page_id, val_revision => $revision ), 'SpecialValidate::showDetails' ); + $res = $db->select( 'validate', '*', array( 'val_page' => $this->page_id, 'val_revision' => $revision ), 'SpecialValidate::showDetails' ); while( $x = $db->fetchObject($res) ) { $data[$this->make_user_id($x)][$x->val_type] = $x; $users[$this->make_user_id($x)] = true; @@ -623,11 +623,14 @@ class Validation { # Collecting statistic data $db =& wfGetDB( DB_SLAVE ); - $res = $db->select( 'validate', '*', array( val_page => $this->page_id ), 'SpecialValidate::showList' ); + $res = $db->select( 'validate', '*', array( "val_page" => $this->page_id ), 'SpecialValidate::showList' ); $statistics = array(); while( $vote = $db->fetchObject($res) ) { $ts = $this->getRevisionTimestamp($vote->val_revision); + if ( !isset ( $statistics[$ts] ) ) $statistics[$ts] = array () ; + if ( !isset ( $statistics[$ts][$vote->val_type]->count ) ) $statistics[$ts][$vote->val_type]->count = 0 ; + if ( !isset ( $statistics[$ts][$vote->val_type]->sum ) ) $statistics[$ts][$vote->val_type]->sum = 0 ; $statistics[$ts][$vote->val_type]->count++; $statistics[$ts][$vote->val_type]->sum += $vote->val_value; } diff --git a/languages/Language.php b/languages/Language.php index ff9d724f26a..c520bdecea0 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1505,7 +1505,7 @@ Type the name of the user in the box and press the button to make the user an ad 'val_validation_of' => 'Validation of "$1"', 'val_revision_of' => 'Revision of $1', 'val_revision_changes_ok' => 'Your ratings have been stored!', -'val_rev_stats_link' => 'See the validation statistics for "$1" here', +'val_rev_stats' => 'See the validation statistics for "$1" here', 'val_revision_stats_link' => 'details', 'val_iamsure' => 'Check this box if you really mean it!', 'val_details_th' => 'User \\ Topic',