From edfb762a71a26021351c80cd3a551a455f24cde1 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 24 Aug 2004 17:56:20 +0000 Subject: [PATCH] Check for validation mode and load validation code if necessary before trying to use it. --- includes/SpecialContributions.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/includes/SpecialContributions.php b/includes/SpecialContributions.php index 9f252d56a4..4f09b7f918 100644 --- a/includes/SpecialContributions.php +++ b/includes/SpecialContributions.php @@ -42,8 +42,9 @@ function wfSpecialContributions( $par = "" ) $userCond = "=" . $id; } $talk = $nt->getTalkPage(); - if( $talk ) + if( $talk ) { $ul .= " (" . $sk->makeLinkObj( $talk, $wgLang->getNsText(Namespace::getTalk(0)) ) . ")"; + } if ( $target == 'newbies' ) { # View the contributions of all recently created accounts @@ -147,10 +148,14 @@ function wfSpecialContributions( $par = "" ) $wgOut->addHTML( "\n" ); # Validations - $val = new Validation ; - $val = $val->countUserValidations ( $id ) ; - $val = wfMsg ( 'val_user_validations', $val ) ; - $wgOut->addHTML( $val ); + global $wgUseValidation; + if( $wgUseValidation ) { + require_once( 'SpecialValidate.php' ); + $val = new Validation ; + $val = $val->countUserValidations ( $id ) ; + $val = wfMsg ( 'val_user_validations', $val ) ; + $wgOut->addHTML( $val ); + } } -- 2.20.1