Change-Id: I37964663fc8cb63575c1e0be9c5ced489d69136e
*
* @param string[] $ext
* @param string[] $list
*
* @param string[] $ext
* @param string[] $list
*/
public static function checkFileExtensionList( $ext, $list ) {
return array_intersect( array_map( 'strtolower', $ext ), $list );
*/
public static function checkFileExtensionList( $ext, $list ) {
return array_intersect( array_map( 'strtolower', $ext ), $list );
/**
* @param string $filename
* @param bool $partial
/**
* @param string $filename
* @param bool $partial
- * @return mixed False of the file is verified (does not contain scripts), array otherwise.
*/
protected function detectScriptInSvg( $filename, $partial ) {
$this->mSVGNSError = false;
*/
protected function detectScriptInSvg( $filename, $partial ) {
$this->mSVGNSError = false;
* Callback to filter SVG Processing Instructions.
* @param string $target Processing instruction name
* @param string $data Processing instruction attribute and value
* Callback to filter SVG Processing Instructions.
* @param string $target Processing instruction name
* @param string $data Processing instruction attribute and value
- * @return bool (true if the filter identified something bad)
*/
public static function checkSvgPICallback( $target, $data ) {
// Don't allow external stylesheets (T59550)
*/
public static function checkSvgPICallback( $target, $data ) {
// Don't allow external stylesheets (T59550)
* @param string $element
* @param array $attribs
* @param array|null $data
* @param string $element
* @param array $attribs
* @param array|null $data
*/
public function checkSvgScriptCallback( $element, $attribs, $data = null ) {
list( $namespace, $strippedElement ) = $this->splitXmlNamespace( $element );
*/
public function checkSvgScriptCallback( $element, $attribs, $data = null ) {
list( $namespace, $strippedElement ) = $this->splitXmlNamespace( $element );
* $wgAntivirusRequired may be used to deny upload if the scan fails.
*
* @param string $file Pathname to the temporary upload file
* $wgAntivirusRequired may be used to deny upload if the scan fails.
*
* @param string $file Pathname to the temporary upload file
- * @return mixed False if not virus is found, null if the scan fails or is disabled,
+ * @return bool|null|string False if not virus is found, null if the scan fails or is disabled,
* or a string containing feedback from the virus scanner if a virus was found.
* If textual feedback is missing but a virus was found, this function returns true.
*/
* or a string containing feedback from the virus scanner if a virus was found.
* If textual feedback is missing but a virus was found, this function returns true.
*/
- * @return mixed True on success, array on failure
*/
private function checkOverwrite( $user ) {
// First check whether the local file can be overwritten
*/
private function checkOverwrite( $user ) {
// First check whether the local file can be overwritten