/** @var string */
public $edittime = '';
- /** @var integer */
+ /** @var int */
private $editRevId = null;
/** @var string */
/**
* This function collects the form data and uses it to populate various member variables.
- * @param WebRequest $request
+ * @param WebRequest &$request
* @throws ErrorPageError
*/
public function importFormData( &$request ) {
* this method should be overridden and return the page text that will be used
* for saving, preview parsing and so on...
*
- * @param WebRequest $request
+ * @param WebRequest &$request
* @return string|null
*/
protected function importContentFormData( &$request ) {
/**
* Make sure the form isn't faking a user's credentials.
*
- * @param WebRequest $request
+ * @param WebRequest &$request
* @return bool
* @private
*/
/**
* Attempt submission
- * @param array|bool $resultDetails See docs for $result in internalAttemptSave
+ * @param array|bool &$resultDetails See docs for $result in internalAttemptSave
* @throws UserBlockedError|ReadOnlyError|ThrottledError|PermissionsError
* @return Status The resulting status object.
*/
/**
* Attempt submission (no UI)
*
- * @param array $result Array to add statuses to, currently with the
+ * @param array &$result Array to add statuses to, currently with the
* possible keys:
* - spam (string): Spam string from content if any spam is detected by
* matchSpamRegex.
* - sectionanchor (string): Section anchor for a section save.
- * - nullEdit (boolean): Set if doEditContent is OK. True if null edit,
+ * - nullEdit (bool): Set if doEditContent is OK. True if null edit,
* false otherwise.
* - redirect (bool): Set if doEditContent is OK. True if resulting
* revision is a redirect.
protected function showFormBeforeText() {
global $wgOut;
- $section = htmlspecialchars( $this->section );
- $wgOut->addHTML( <<<HTML
-<input type='hidden' value="{$section}" name="wpSection"/>
-<input type='hidden' value="{$this->starttime}" name="wpStarttime" />
-<input type='hidden' value="{$this->edittime}" name="wpEdittime" />
-<input type='hidden' value="{$this->editRevId}" name="editRevId" />
-<input type='hidden' value="{$this->scrolltop}" name="wpScrolltop" id="wpScrolltop" />
-
-HTML
- );
+
+ $wgOut->addHTML( Html::hidden( 'wpSection', htmlspecialchars( $this->section ) ) );
+ $wgOut->addHTML( Html::hidden( 'wpStarttime', $this->starttime ) );
+ $wgOut->addHTML( Html::hidden( 'wpEdittime', $this->edittime ) );
+ $wgOut->addHTML( Html::hidden( 'editRevId', $this->editRevId ) );
+ $wgOut->addHTML( Html::hidden( 'wpScrolltop', $this->scrolltop ) );
+
if ( !$this->checkUnicodeCompliantBrowser() ) {
$wgOut->addHTML( Html::hidden( 'safemode', '1' ) );
}
}
/**
- * Inserts optional text shown below edit and upload forms. Can be used to offer special characters not present on
- * most keyboards for copying/pasting.
+ * Inserts optional text shown below edit and upload forms. Can be used to offer special
+ * characters not present on most keyboards for copying/pasting.
*/
protected function showEditTools() {
global $wgOut;
* Returns an array of html code of the following checkboxes old style:
* minor and watch
*
- * @param int $tabindex Current tabindex
+ * @param int &$tabindex Current tabindex
* @param array $checked See getCheckboxesDefinition()
* @return array
*/
* Returns an array of html code of the following checkboxes:
* minor and watch
*
- * @param int $tabindex Current tabindex
+ * @param int &$tabindex Current tabindex
* @param array $checked Array of checkbox => bool, where bool indicates the checked
* status of the checkbox
*
$newPage = !$this->mTitle->exists();
if ( $labelAsPublish ) {
- $buttonLabelKey = $newPage ? 'publishpage' : 'publishchanges';
+ $buttonLabelKey = $newPage ? 'publishpage' : 'publishchanges';
} else {
$buttonLabelKey = $newPage ? 'savearticle' : 'savechanges';
}
* Returns an array of html code of the following buttons:
* save, diff and preview
*
- * @param int $tabindex Current tabindex
+ * @param int &$tabindex Current tabindex
*
* @return array
*/