/**
* Create a form of UploadBase depending on wpSourceType and initializes it
*
- * @param WebRequest $request
+ * @param WebRequest &$request
* @param string|null $type
* @return null|UploadBase
*/
/**
* Initialize from a WebRequest. Override this in a subclass.
*
- * @param WebRequest $request
+ * @param WebRequest &$request
*/
abstract public function initializeFromRequest( &$request );
/**
* @param string $tempPath File system path to temporary file containing the upload
- * @param integer $fileSize
+ * @param int $fileSize
*/
protected function setTempFile( $tempPath, $fileSize = null ) {
$this->mTempPath = $tempPath;
* @return mixed Const self::OK or else an array with error information
*/
public function verifyUpload() {
-
/**
* If there was no filename or a zero size given, give up quick.
*/
* @param string $type PUBLIC or SYSTEM
* @param string $publicId The well-known public identifier for the dtd
* @param string $systemId The url for the external dtd
+ * @return bool|array
*/
public static function checkSvgExternalDTD( $type, $publicId, $systemId ) {
// This doesn't include the XHTML+MathML+SVG doctype since we don't
* @todo Replace this with a whitelist filter!
* @param string $element
* @param array $attribs
+ * @param array $data
* @return bool
*/
public function checkSvgScriptCallback( $element, $attribs, $data = null ) {
-
list( $namespace, $strippedElement ) = $this->splitXmlNamespace( $element );
// We specifically don't include:
* @return bool true if the CSS contains an illegal string, false if otherwise
*/
private static function checkCssFragment( $value ) {
-
# Forbid external stylesheets, for both reliability and to protect viewer's privacy
if ( stripos( $value, '@import' ) !== false ) {
return true;