} else {
// If we receive the last parameter of the request, we can fairly
// claim the POST request has not been truncated.
-
- // TODO: softened the check for cutover. Once we determine
- // that it is safe, we should complete the transition by
- // removing the "edittime" clause.
- $this->incompleteForm = ( !$request->getVal( 'wpUltimateParam' )
- && is_null( $this->edittime ) );
+ $this->incompleteForm = !$request->getVal( 'wpUltimateParam' );
}
if ( $this->incompleteForm ) {
# If the form is incomplete, force to preview.
* Returns the revision that was current at the time editing was initiated on the client,
* even if the edit was based on an old revision.
*
- * @warning: this method is very poorly named. If the user opened the form with ?oldid=X,
+ * @warning this method is very poorly named. If the user opened the form with ?oldid=X,
* one might think of X as the "base revision", which is NOT what this returns,
* see oldid for that. One might further assume that this corresponds to the $baseRevId
* parameter of WikiPage::doEditContent, which is not the case either.
* Builds a standard summary input with a label.
*
* @param string $summary The value of the summary input
- * @param string $labelText The html to place inside the label
- * @param array $inputAttrs Array of attrs to use on the input
+ * @param string|null $labelText The html to place inside the label
+ * @param array|null $inputAttrs Array of attrs to use on the input
*
* @return OOUI\FieldLayout OOUI FieldLayout with Label and Input
*/
* The $textoverride method can be used by subclasses overriding showContentForm
* to pass back to this method.
*
- * @param array $customAttribs Array of html attributes to use in the textarea
- * @param string $textoverride Optional text to override $this->textarea1 with
+ * @param array|null $customAttribs Array of html attributes to use in the textarea
+ * @param string|null $textoverride Optional text to override $this->textarea1 with
*/
protected function showTextbox1( $customAttribs = null, $textoverride = null ) {
if ( $this->wasDeletedSinceLastEdit() && $this->formtype == 'save' ) {
}
$this->showTextbox(
- $textoverride !== null ? $textoverride : $this->textbox1,
+ $textoverride ?? $this->textbox1,
'wpTextbox1',
$attribs
);
* Shows a bulletin board style toolbar for common editing functions.
* It can be disabled in the user preferences.
*
- * @param Title $title Title object for the page being edited (optional)
+ * @param Title|null $title Title object for the page being edited (optional)
* @return string
*/
public static function getEditToolbar( $title = null ) {