overwriting existing files; default is the old behavior (allowed).
* Use strval() to make sure we don't accidentally get null on bad revision
text loads or other fields mucking up XML export output
+* Add UploadVerification hook for custom file upload validation/security checks
=== Caveats ===
$user: user that was watching
$article: article object removed
+'UploadVerification': additional chances to reject an uploaded file
+string $saveName: destination file name
+string $tempName: filesystem path to the temporary file for checks
+string &$error: output: HTML error to show if upload canceled by returning false
+
'UserLoginComplete': after a user has logged in
$user: the user object that was created on login
return $this->uploadError( $veri->toString() );
}
}
+
+ /**
+ * Provide an opportunity for extensions to add futher checks
+ */
+ $error = '';
+ if( !wfRunHooks( 'UploadVerification',
+ array( $this->mUploadSaveName, $this->mUploadTempName, &$error ) ) ) {
+ return $this->uploadError( $error );
+ }
/**
* Check for non-fatal conditions