Add hook to AFPComputedVariable::compute() so extensions can add lazy-loaded variables.

This commit is contained in:
Andrew Garrett 2009-03-25 05:18:27 +00:00
parent 32c83009e3
commit 2000d06c59

View file

@ -341,9 +341,12 @@ class AFComputedVariable {
$result = '';
break;
default:
throw new AFPException( "Unknown variable compute type ".$this->mMethod );
if ( wfRunHooks( 'AbuseFilter-computeVariable',
array( $this->mMethod, $vars ) ) ) {
throw new AFPException( "Unknown variable compute type ".$this->mMethod );
}
}
return AFPData::newFromPHPVar( $result );
}
}
}