if(
!$this->mTokenOk && !$this->mCancelUpload &&
( $this->mUpload && $this->mUploadClicked )
- )
- {
+ ) {
$form->addPreText( wfMsgExt( 'session_fail_preview', 'parseinline' ) );
}
}
return $form;
-
}
/**
/**
* Show the upload form with error message, but do not stash the file.
*
- * @param $message HTML string
+ * @param $message string HTML string
*/
protected function showUploadError( $message ) {
$message = '<h2>' . wfMsgHtml( 'uploadwarning' ) . "</h2>\n" .
/**
* Get the initial image page text based on a comment and optional file status information
+ * @param $comment string
+ * @param $license string
+ * @param $copyStatus string
+ * @param $source string
+ * @return string
*/
public static function getInitialPageText( $comment = '', $license = '', $copyStatus = '', $source = '' ) {
global $wgUseCopyrightUpload, $wgForceUIMsgAsContentMsg;
$wgForceUIMsgAsContentMsg = (array) $wgForceUIMsgAsContentMsg;
+ $msg = array();
/* These messages are transcluded into the actual text of the description page.
* Thus, forcing them as content messages makes the upload to produce an int: template
* instead of hardcoding it there in the uploader language.
*
* Note that the page target can be changed *on the form*, so our check
* state can get out of sync.
+ * @return Bool|String
*/
protected function getWatchCheck() {
if( $this->getUser()->getOption( 'watchdefault' ) ) {
/**
* Construct a warning and a gallery from an array of duplicate files.
+ * @param $dupes array
+ * @return string
*/
public static function getDupeWarning( $dupes ) {
global $wgOut;
protected $mMaxFileSize = array();
+ protected $mMaxUploadSize = array();
+
public function __construct( array $options = array(), IContextSource $context = null ) {
$this->mWatch = !empty( $options['watch'] );
$this->mForReUpload = !empty( $options['forreupload'] );
* A form field that contains a radio box in the label
*/
class UploadSourceField extends HTMLTextField {
+
+ /**
+ * @param $cellAttributes array
+ * @return string
+ */
function getLabelHtml( $cellAttributes = array() ) {
$id = "wpSourceType{$this->mParams['upload-type']}";
$label = Html::rawElement( 'label', array( 'for' => $id ), $this->mLabel );
return Html::rawElement( 'td', array( 'class' => 'mw-label' ) + $cellAttributes, $label );
}
+ /**
+ * @return int
+ */
function getSize() {
return isset( $this->mParams['size'] )
? $this->mParams['size']