X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2FEditPage.php;h=49341c5e7e8546c9d9033c8e1d6355bc63296f03;hb=c05926bc7ce57cbea42e90053ef799fa58b9da1e;hp=9d83fbd91dfb4042af43d2dff8db11b9e1a05399;hpb=cd4130790a4a72de7c5b3a81399de0c3f0c66d03;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/EditPage.php b/includes/EditPage.php index 9d83fbd91d..49341c5e7e 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -852,7 +852,7 @@ class EditPage { /** * 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 ) { @@ -1080,7 +1080,7 @@ class EditPage { * 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 ) { @@ -1432,7 +1432,7 @@ class EditPage { /** * Make sure the form isn't faking a user's credentials. * - * @param WebRequest $request + * @param WebRequest &$request * @return bool * @private */ @@ -1475,7 +1475,7 @@ class EditPage { /** * 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. */ @@ -1721,7 +1721,7 @@ class EditPage { /** * 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. @@ -3225,16 +3225,13 @@ class EditPage { protected function showFormBeforeText() { global $wgOut; - $section = htmlspecialchars( $this->section ); - $wgOut->addHTML( << - - - - - -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' ) ); } @@ -3498,8 +3495,8 @@ HTML } /** - * 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; @@ -4205,7 +4202,7 @@ HTML * 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 */ @@ -4263,7 +4260,7 @@ HTML * 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 * @@ -4336,7 +4333,7 @@ HTML $newPage = !$this->mTitle->exists(); if ( $labelAsPublish ) { - $buttonLabelKey = $newPage ? 'publishpage' : 'publishchanges'; + $buttonLabelKey = $newPage ? 'publishpage' : 'publishchanges'; } else { $buttonLabelKey = $newPage ? 'savearticle' : 'savechanges'; } @@ -4348,7 +4345,7 @@ HTML * 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 */