MediaWiki
REL1_20
|
The edit page/HTML interface (split from Article) The actual database and text munging is still in Article, but it should get easier to call those from alternate interfaces. More...
Public Member Functions | |
__construct (Article $article) | |
attemptSave () | |
Attempt submission. | |
blockedPage () | |
Call the stock "user is blocked" page. | |
checkUnicodeCompliantBrowser () | |
Check if the browser is on a blacklist of user-agents known to mangle UTF-8 data on form submission. | |
edit () | |
This is the function that gets called for "action=edit". | |
getArticle () | |
getBaseRevision () | |
getCancelLink () | |
getCheckboxes (&$tabindex, $checked) | |
Returns an array of html code of the following checkboxes: minor and watch. | |
getContent ($def_text= '') | |
Fetch initial editing page content. | |
getContextTitle () | |
Get the context title object. | |
getEditButtons (&$tabindex) | |
Returns an array of html code of the following buttons: save, diff, preview and live. | |
getPreviewText () | |
Get the rendered text for previewing. | |
getSummaryInput ($summary="", $labelText=null, $inputAttrs=null, $spanLabelAttrs=null) | |
Standard summary input and label (wgSummary), abstracted so EditPage subclasses may reorganize the form. | |
getTemplates () | |
getTitle () | |
importFormData (&$request) | |
This function collects the form data and uses it to populate various member variables. | |
initialiseForm () | |
Initialise form fields in the object Called on the first invocation, e.g. | |
internalAttemptSave (&$result, $bot=false) | |
Attempt submission (no UI) | |
livePreview () | |
Output preview text only. | |
makesafe ($invalue) | |
A number of web browsers are known to corrupt non-ASCII characters in a UTF-8 text editing environment. | |
mergeChangesInto (&$editText) | |
noCreatePermission () | |
Show an error page saying to the user that he has insufficient permissions to create a new page. | |
noSuchSectionPage () | |
Creates a basic error page which informs the user that they have attempted to edit a nonexistent section. | |
readOnlyPage ($source=null, $protected=false, $reasons=array(), $action=null) | |
Show a read-only error Parameters are the same as OutputPage:readOnlyPage() Redirect to the article page if redlink=1. | |
safeUnicodeInput ($request, $field) | |
Filter an input field through a Unicode de-armoring process if it came from an old browser with known broken Unicode editing issues. | |
safeUnicodeOutput ($text) | |
Filter an output field through a Unicode armoring process if it is going to an old browser with known broken Unicode editing issues. | |
safeUnicodeText ($request, $text) | |
sectionAnchor ($text) | |
Format an anchor fragment as it would appear for a given section name. | |
setContextTitle ($title) | |
Set the context Title object. | |
setHeaders () | |
setPreloadedText ($text) | |
Use this method before edit() to preload some text into the edit box. | |
showDiff () | |
Get a diff between the current contents of the edit box and the version of the page we're editing from. | |
showEditForm ($formCallback=null) | |
Send the edit form and related headers to $wgOut. | |
spamPageWithContent ($match=false) | |
Show "your edit contains spam" page with your diff and text. | |
submit () | |
tokenOk (&$request) | |
Make sure the form isn't faking a user's credentials. | |
unmakesafe ($invalue) | |
Reverse the previously applied transliteration of non-ASCII characters back to UTF-8. | |
userNotLoggedInPage () | |
Produce the stock "please login to edit pages" page. | |
Static Public Member Functions | |
static | extractSectionTitle ($text) |
Extract the section title from current section text, if any. | |
static | getCopyrightWarning ($title) |
static | getEditToolbar () |
Shows a bulletin board style toolbar for common editing functions. | |
static | matchSpamRegex ($text) |
Check given input text against $wgSpamRegex, and return the text of the first match. | |
static | matchSummarySpamRegex ($text) |
Check given input text against $wgSpamRegex, and return the text of the first match. | |
static | spamPage ($match=false) |
Produce the stock "your edit contains spam" page. | |
Public Attributes | |
$action = 'submit' | |
$allowBlankSummary = false | |
$autoSumm = '' | |
$bot = true | |
$deletedSinceEdit | |
$didSave = false | |
$diff = false | |
$editFormPageTop = '' | |
$editFormTextAfterContent = '' | |
$editFormTextAfterTools = '' | |
$editFormTextAfterWarn = '' | |
$editFormTextBeforeContent = '' | |
$editFormTextBottom = '' | |
$editFormTextTop = '' | |
$editintro = '' | |
$edittime = '' | |
$firsttime | |
$formtype | |
Bool | $hasPresetSummary = false |
Has a summary been preset using GET parameter &summary= ? | |
$hookError = '' | |
$incompleteForm = false | |
$isConflict = false | |
$isCssJsSubpage = false | |
$isCssSubpage = false | |
$isJsSubpage = false | |
$isNew = false | |
$isWrongCaseCssJsPage = false | |
$kblength = false | |
$lastDelete | |
Article | $mArticle |
$mBaseRevision = false | |
$minoredit = false | |
$missingComment = false | |
$missingSummary = false | |
ParserOutput | $mParserOutput |
$mPreloadText = '' | |
$mShowSummaryField = true | |
Title | $mTitle |
$mTokenOk = false | |
$mTokenOkExceptSuffix = false | |
$mTriedSave = false | |
$nosummary = false | |
$oldid = 0 | |
$preview = false | |
$previewTextAfterContent = '' | |
$recreate = false | |
$save = false | |
$scrolltop = null | |
$section = '' | |
$sectiontitle = '' | |
$starttime = '' | |
$summary = '' | |
$suppressIntro = false | |
$textbox1 = '' | |
$textbox2 = '' | |
$tooBig = false | |
$undidRev = 0 | |
$watchthis = false | |
const | AS_ARTICLE_WAS_DELETED = 222 |
Status: article was deleted while editting and param wpRecreate == false or form was not posted. | |
const | AS_BLANK_ARTICLE = 224 |
Status: user tried to create a blank page. | |
const | AS_BLOCKED_PAGE_FOR_USER = 215 |
Status: User is blocked from editting this page. | |
const | AS_CONFLICT_DETECTED = 225 |
Status: (non-resolvable) edit conflict. | |
const | AS_CONTENT_TOO_BIG = 216 |
Status: Content too big (> $wgMaxArticleSize) | |
const | AS_END = 231 |
Status: WikiPage::doEdit() was unsuccessfull. | |
const | AS_HOOK_ERROR = 210 |
Status: Article update aborted by a hook function. | |
const | AS_HOOK_ERROR_EXPECTED = 212 |
Status: A hook function returned an error. | |
const | AS_IMAGE_REDIRECT_ANON = 233 |
Status: anonymous user is not allowed to upload (User::isAllowed('upload') == false) | |
const | AS_IMAGE_REDIRECT_LOGGED = 234 |
Status: logged in user is not allowed to upload (User::isAllowed('upload') == false) | |
const | AS_MAX_ARTICLE_SIZE_EXCEEDED = 229 |
Status: article is too big (> $wgMaxArticleSize), after merging in the new section. | |
const | AS_NO_CREATE_PERMISSION = 223 |
Status: user tried to create this page, but is not allowed to do that ( Title->usercan('create') == false ) | |
const | AS_OK = 230 |
not used | |
const | AS_RATE_LIMITED = 221 |
Status: rate limiter for action 'edit' was tripped. | |
const | AS_READ_ONLY_PAGE = 220 |
Status: wiki is in readonly mode (wfReadOnly() == true) | |
const | AS_READ_ONLY_PAGE_ANON = 218 |
Status: this anonymous user is not allowed to edit this page. | |
const | AS_READ_ONLY_PAGE_LOGGED = 219 |
Status: this logged in user is not allowed to edit this page. | |
const | AS_SPAM_ERROR = 232 |
Status: summary contained spam according to one of the regexes in $wgSummarySpamRegex. | |
const | AS_SUCCESS_NEW_ARTICLE = 201 |
Status: Article successfully created. | |
const | AS_SUCCESS_UPDATE = 200 |
Status: Article successfully updated. | |
const | AS_SUMMARY_NEEDED = 226 |
Status: no edit summary given and the user has forceeditsummary set and the user is not editting in his own userspace or talkspace and wpIgnoreBlankSummary == false. | |
const | AS_TEXTBOX_EMPTY = 228 |
Status: user tried to create a new section without content. | |
const | AS_USER_CANNOT_EDIT = 217 |
Status: User cannot edit? (not used) | |
const | EDITFORM_ID = 'editform' |
HTML id and name for the beginning of the edit form. | |
Protected Member Functions | |
commitWatch () | |
Commit the change of watch status. | |
displayPermissionsError (array $permErrors) | |
Display a permissions error page, like OutputPage::showPermissionsErrorPage(), but with the following differences: | |
displayPreviewArea ($previewOutput, $isOnTop=false) | |
getActionURL (Title $title) | |
Returns the URL to use in the form's action attribute. | |
getCopywarn () | |
Get the copyright warning. | |
getEditPermissionErrors () | |
getLastDelete () | |
getPreloadedText ($preload) | |
Get the contents to be preloaded into the box, either set by an earlier setPreloadText() or by loading the given page. | |
getSummaryPreview ($isSubjectPreview, $summary="") | |
importContentFormData (&$request) | |
Subpage overridable method for extracting the page content data from the posted form to be placed in $this->textbox1, if using customized input this method should be overrided and return the page text that will be used for saving, preview parsing and so on... | |
isSectionEditSupported () | |
Does this EditPage class support section editing? This is used by EditPage subclasses to indicate their ui cannot handle section edits. | |
isWrongCaseCssJsPage () | |
Checks whether the user entered a skin name in uppercase, e.g. | |
previewOnOpen () | |
Should we show a preview when the edit form is first shown? | |
showConflict () | |
Show an edit conflict. | |
showContentForm () | |
Subpage overridable method for printing the form for page content editing By default this simply outputs wpTextbox1 Subclasses can override this to provide a custom UI for editing; be it a form, or simply wpTextbox1 with a modified content that will be reverse modified when extracted from the post data. | |
showCustomIntro () | |
Attempt to show a custom editing introduction, if supplied. | |
showEditTools () | |
showFormAfterText () | |
showFormBeforeText () | |
showHeader () | |
showHeaderCopyrightWarning () | |
Show the header copyright warning. | |
showIntro () | |
Show all applicable editing introductions. | |
showPreview ($text) | |
Append preview output to $wgOut. | |
showStandardInputs (&$tabindex=2) | |
showSummaryInput ($isSubjectPreview, $summary="") | |
showTextbox ($content, $name, $customAttribs=array()) | |
showTextbox1 ($customAttribs=null, $textoverride=null) | |
Method to output wpTextbox1 The $textoverride method can be used by subclasses overriding showContentForm to pass back to this method. | |
showTextbox2 () | |
showTosSummary () | |
Give a chance for site and per-namespace customizations of terms of service summary link that might exist separately from the copyright notice. | |
wasDeletedSinceLastEdit () | |
Check if a page was deleted while the user was editing it, before submit. | |
Static Protected Member Functions | |
static | matchSpamRegexInternal ($text, $regexes) |
Private Member Functions | |
getCurrentText () | |
Get the actual text of the page. | |
getOriginalContent () | |
Get the content of the wanted revision, without section extraction. | |
Private Attributes | |
$mContextTitle = null |
The edit page/HTML interface (split from Article) The actual database and text munging is still in Article, but it should get easier to call those from alternate interfaces.
EditPage cares about two distinct titles: $this->mContextTitle is the page that forms submit to, links point to, redirects go to, etc. $this->mTitle (as well as $mArticle) is the page in the database that is actually being edited. These are usually the same, but they are now allowed to be different.
Surgeon General's Warning: prolonged exposure to this class is known to cause headaches, which may be fatal.
Definition at line 38 of file EditPage.php.
EditPage::__construct | ( | Article $ | article | ) |
$article | Article |
Definition at line 235 of file EditPage.php.
References Article\getTitle().
Attempt submission.
Definition at line 976 of file EditPage.php.
Call the stock "user is blocked" page.
Definition at line 3018 of file EditPage.php.
Check if the browser is on a blacklist of user-agents known to mangle UTF-8 data on form submission.
Returns true if Unicode should make it through, false if it's known to be a problem.
Definition at line 3134 of file EditPage.php.
EditPage::commitWatch | ( | ) | [protected] |
Commit the change of watch status.
Definition at line 1474 of file EditPage.php.
References $wgUser, WatchAction\doUnwatch(), WatchAction\doWatch(), and wfGetDB().
EditPage::displayPermissionsError | ( | array $ | permErrors | ) | [protected] |
Display a permissions error page, like OutputPage::showPermissionsErrorPage(), but with the following differences:
$permErrors | Array of permissions errors, as returned by Title::getUserPermissionsErrors(). |
Definition at line 438 of file EditPage.php.
EditPage::displayPreviewArea | ( | $ | previewOutput, |
$ | isOnTop = false |
||
) | [protected] |
Definition at line 2281 of file EditPage.php.
EditPage::edit | ( | ) |
This is the function that gets called for "action=edit".
It sets up various member variables, then passes execution to another function, usually showEditForm()
The edit form is self-submitting, so that when things like preview and edit conflicts occur, we get the same form back with the extra stuff added. Only when the final submission is made and all is well do we actually save and redirect to the newly-edited page.
Definition at line 295 of file EditPage.php.
static EditPage::extractSectionTitle | ( | $ | text | ) | [static] |
Extract the section title from current section text, if any.
string | $text |
Definition at line 1891 of file EditPage.php.
Referenced by EditPageTest\testExtractSectionTitle().
EditPage::getActionURL | ( | Title $ | title | ) | [protected] |
Returns the URL to use in the form's action attribute.
This is used by EditPage subclasses when simply customizing the action variable in the constructor is not enough. This can be used when the EditPage lives inside of a Special page rather than a custom page action.
$title | Title object for which is being edited (where we go to for &action= links) |
Definition at line 2513 of file EditPage.php.
Definition at line 243 of file EditPage.php.
Definition at line 1531 of file EditPage.php.
References Revision\loadFromTimestamp(), and wfGetDB().
Definition at line 2490 of file EditPage.php.
References getContextTitle(), Linker\linkKnown(), and wfMessage().
EditPage::getCheckboxes | ( | &$ | tabindex, |
$ | checked | ||
) |
Returns an array of html code of the following checkboxes: minor and watch.
$tabindex | int Current tabindex |
$checked | Array of checkbox => bool, where bool indicates the checked status of the checkbox |
Definition at line 2892 of file EditPage.php.
EditPage::getContent | ( | $ | def_text = '' | ) |
Fetch initial editing page content.
$def_text | string |
Definition at line 776 of file EditPage.php.
Get the context title object.
If not set, $wgTitle will be returned. This behavior might changed in the future to return $this->mTitle instead.
Definition at line 271 of file EditPage.php.
Referenced by getCancelLink().
static EditPage::getCopyrightWarning | ( | $ | title | ) | [static] |
Definition at line 2415 of file EditPage.php.
EditPage::getCopywarn | ( | ) | [protected] |
Get the copyright warning.
Renamed to getCopyrightWarning(), old name kept around for backwards compatibility
Definition at line 2411 of file EditPage.php.
EditPage::getCurrentText | ( | ) | [private] |
Get the actual text of the page.
This is basically similar to WikiPage::getRawText() except that when the page doesn't exist an empty string is returned instead of false.
Definition at line 901 of file EditPage.php.
EditPage::getEditButtons | ( | &$ | tabindex | ) |
Returns an array of html code of the following buttons: save, diff, preview and live.
$tabindex | int Current tabindex |
Definition at line 2941 of file EditPage.php.
EditPage::getEditPermissionErrors | ( | ) | [protected] |
static EditPage::getEditToolbar | ( | ) | [static] |
Shows a bulletin board style toolbar for common editing functions.
It can be disabled in the user preferences. The necessary JavaScript code can be found in skins/common/edit.js.
Definition at line 2723 of file EditPage.php.
EditPage::getLastDelete | ( | ) | [protected] |
Definition at line 2543 of file EditPage.php.
EditPage::getOriginalContent | ( | ) | [private] |
Get the content of the wanted revision, without section extraction.
The result of this function can be used to compare user's input with section replaced in its context (using WikiPage::replaceSection()) to the original text of the edit.
This difers from Article::getContent() that when a missing revision is encountered the result will be an empty string and not the 'missing-revision' message.
Definition at line 882 of file EditPage.php.
EditPage::getPreloadedText | ( | $ | preload | ) | [protected] |
Get the contents to be preloaded into the box, either set by an earlier setPreloadText() or by loading the given page.
$preload | String: representing the title to preload from. |
Definition at line 926 of file EditPage.php.
EditPage::getSummaryInput | ( | $ | summary = "" , |
$ | labelText = null , |
||
$ | inputAttrs = null , |
||
$ | spanLabelAttrs = null |
||
) |
Standard summary input and label (wgSummary), abstracted so EditPage subclasses may reorganize the form.
Note that you do not need to worry about the label's for=, it will be inferred by the id given to the input. You can remove them both by passing array( 'id' => false ) to $userInputAttrs.
$summary | string The value of the summary input |
$labelText | string The html to place inside the label |
$inputAttrs | array of attrs to use on the input |
$spanLabelAttrs | array of attrs to use on the span inside the label |
Definition at line 2087 of file EditPage.php.
EditPage::getSummaryPreview | ( | $ | isSubjectPreview, |
$ | summary = "" |
||
) | [protected] |
$isSubjectPreview | Boolean: true if this is the section subject/title up top, or false if this is the comment summary down below the textarea |
$summary | String: the text of the summary to display |
Definition at line 2146 of file EditPage.php.
EditPage::importContentFormData | ( | &$ | request | ) | [protected] |
Subpage overridable method for extracting the page content data from the posted form to be placed in $this->textbox1, if using customized input this method should be overrided and return the page text that will be used for saving, preview parsing and so on...
$request | WebRequest |
Definition at line 734 of file EditPage.php.
EditPage::importFormData | ( | &$ | request | ) |
This function collects the form data and uses it to populate various member variables.
$request | WebRequest |
Definition at line 566 of file EditPage.php.
Initialise form fields in the object Called on the first invocation, e.g.
when a user clicks an edit link
Definition at line 743 of file EditPage.php.
EditPage::internalAttemptSave | ( | &$ | result, |
$ | bot = false |
||
) |
Attempt submission (no UI)
$result | |
$bot | bool |
FIXME: This interface is TERRIBLE, but hard to get rid of due to various error display idiosyncrasies. There are also lots of cases where error metadata is set in the object and retrieved later instead of being returned, e.g. AS_CONTENT_TOO_BIG and AS_BLOCKED_PAGE_FOR_USER. All that stuff needs to be cleaned up some time.
Definition at line 1077 of file EditPage.php.
EditPage::isSectionEditSupported | ( | ) | [protected] |
Does this EditPage class support section editing? This is used by EditPage subclasses to indicate their ui cannot handle section edits.
Definition at line 558 of file EditPage.php.
EditPage::isWrongCaseCssJsPage | ( | ) | [protected] |
Checks whether the user entered a skin name in uppercase, e.g.
"User:Example/Monobook.css" instead of "monobook.css"
Definition at line 538 of file EditPage.php.
Output preview text only.
This can be sucked into the edit page via JavaScript, and saves the server time rendering the skin as well as theoretically being more robust on the client (doesn't disturb the edit box's undo history, won't eat your text on failure, etc).
Definition at line 2995 of file EditPage.php.
EditPage::makesafe | ( | $ | invalue | ) |
A number of web browsers are known to corrupt non-ASCII characters in a UTF-8 text editing environment.
To protect against this, detected browsers will be served an armored version of the text, with non-ASCII chars converted to numeric HTML character references.
Preexisting such character references will have a 0 added to them to ensure that round-trips do not alter the original data.
$invalue | String |
Definition at line 3208 of file EditPage.php.
static EditPage::matchSpamRegex | ( | $ | text | ) | [static] |
Check given input text against $wgSpamRegex, and return the text of the first match.
$text | string |
Definition at line 1549 of file EditPage.php.
static EditPage::matchSpamRegexInternal | ( | $ | text, |
$ | regexes | ||
) | [static, protected] |
$text | string |
$regexes | array |
Definition at line 1574 of file EditPage.php.
static EditPage::matchSummarySpamRegex | ( | $ | text | ) | [static] |
Check given input text against $wgSpamRegex, and return the text of the first match.
$text | string |
Definition at line 1563 of file EditPage.php.
Referenced by Title\isValidMoveOperation().
EditPage::mergeChangesInto | ( | &$ | editText | ) |
$editText | string |
Definition at line 1496 of file EditPage.php.
Show an error page saying to the user that he has insufficient permissions to create a new page.
Definition at line 3041 of file EditPage.php.
Creates a basic error page which informs the user that they have attempted to edit a nonexistent section.
Definition at line 3051 of file EditPage.php.
EditPage::previewOnOpen | ( | ) | [protected] |
Should we show a preview when the edit form is first shown?
Definition at line 507 of file EditPage.php.
EditPage::readOnlyPage | ( | $ | source = null , |
$ | protected = false , |
||
$ | reasons = array() , |
||
$ | action = null |
||
) |
Show a read-only error Parameters are the same as OutputPage:readOnlyPage() Redirect to the article page if redlink=1.
Definition at line 488 of file EditPage.php.
EditPage::safeUnicodeInput | ( | $ | request, |
$ | field | ||
) |
Filter an input field through a Unicode de-armoring process if it came from an old browser with known broken Unicode editing issues.
$request | WebRequest |
$field | String |
Definition at line 3160 of file EditPage.php.
EditPage::safeUnicodeOutput | ( | $ | text | ) |
Filter an output field through a Unicode armoring process if it is going to an old browser with known broken Unicode editing issues.
$text | String |
Definition at line 3187 of file EditPage.php.
EditPage::safeUnicodeText | ( | $ | request, |
$ | text | ||
) |
$request | WebRequest |
$text | string |
Definition at line 3172 of file EditPage.php.
EditPage::sectionAnchor | ( | $ | text | ) |
Format an anchor fragment as it would appear for a given section name.
$text | String |
Definition at line 3122 of file EditPage.php.
EditPage::setContextTitle | ( | $ | title | ) |
Set the context Title object.
$title | Title object or null |
Definition at line 260 of file EditPage.php.
Definition at line 1584 of file EditPage.php.
EditPage::setPreloadedText | ( | $ | text | ) |
Use this method before edit() to preload some text into the edit box.
$text | string |
Definition at line 915 of file EditPage.php.
EditPage::showConflict | ( | ) | [protected] |
Show an edit conflict.
textbox1 is already shown in showEditForm(). If you want to use another entry point to this function, be careful.
Definition at line 2469 of file EditPage.php.
EditPage::showContentForm | ( | ) | [protected] |
Subpage overridable method for printing the form for page content editing By default this simply outputs wpTextbox1 Subclasses can override this to provide a custom UI for editing; be it a form, or simply wpTextbox1 with a modified content that will be reverse modified when extracted from the post data.
Note that this is basically the inverse for importContentFormData
Definition at line 2202 of file EditPage.php.
EditPage::showCustomIntro | ( | ) | [protected] |
Attempt to show a custom editing introduction, if supplied.
Definition at line 1702 of file EditPage.php.
Referenced by showIntro().
Get a diff between the current contents of the edit box and the version of the page we're editing from.
If this is a section edit, we'll replace the section as for final save and then make a comparison.
Definition at line 2332 of file EditPage.php.
EditPage::showEditForm | ( | $ | formCallback = null | ) |
Send the edit form and related headers to $wgOut.
$formCallback | Callback that takes an OutputPage parameter; will be called during form output near the top, for captchas and the like. |
Definition at line 1723 of file EditPage.php.
EditPage::showEditTools | ( | ) | [protected] |
Definition at line 2399 of file EditPage.php.
EditPage::showFormAfterText | ( | ) | [protected] |
Definition at line 2177 of file EditPage.php.
EditPage::showFormBeforeText | ( | ) | [protected] |
Definition at line 2162 of file EditPage.php.
EditPage::showHeader | ( | ) | [protected] |
Definition at line 1901 of file EditPage.php.
EditPage::showHeaderCopyrightWarning | ( | ) | [protected] |
Show the header copyright warning.
Definition at line 2371 of file EditPage.php.
References $wgOut, and wfMessage().
EditPage::showIntro | ( | ) | [protected] |
Show all applicable editing introductions.
Definition at line 1620 of file EditPage.php.
References $file, $user, $wgOut, $wgUser, User\isIP(), User\newFromName(), showCustomIntro(), LogEventsList\showLogExtract(), wfEscapeWikiText(), and wfFindFile().
EditPage::showPreview | ( | $ | text | ) | [protected] |
Append preview output to $wgOut.
Includes category rendering if this is a category page.
$text | String: the HTML to be output for the preview. |
Definition at line 2311 of file EditPage.php.
EditPage::showStandardInputs | ( | &$ | tabindex = 2 | ) | [protected] |
Definition at line 2432 of file EditPage.php.
EditPage::showSummaryInput | ( | $ | isSubjectPreview, |
$ | summary = "" |
||
) | [protected] |
$isSubjectPreview | Boolean: true if this is the section subject/title up top, or false if this is the comment summary down below the textarea |
$summary | String: The text of the summary to display |
Definition at line 2120 of file EditPage.php.
EditPage::showTextbox | ( | $ | content, |
$ | name, | ||
$ | customAttribs = array() |
||
) | [protected] |
Definition at line 2254 of file EditPage.php.
EditPage::showTextbox1 | ( | $ | customAttribs = null , |
$ | textoverride = null |
||
) | [protected] |
Method to output wpTextbox1 The $textoverride method can be used by subclasses overriding showContentForm to pass back to this method.
$customAttribs | array of html attributes to use in the textarea |
$textoverride | String: optional text to override $this->textarea1 with |
Definition at line 2214 of file EditPage.php.
EditPage::showTextbox2 | ( | ) | [protected] |
Definition at line 2250 of file EditPage.php.
EditPage::showTosSummary | ( | ) | [protected] |
Give a chance for site and per-namespace customizations of terms of service summary link that might exist separately from the copyright notice.
This will display between the save button and the edit tools, so should remain short!
Definition at line 2388 of file EditPage.php.
static EditPage::spamPage | ( | $ | match = false | ) | [static] |
Produce the stock "your edit contains spam" page.
$match | string Text which triggered one or more filters |
Definition at line 3069 of file EditPage.php.
EditPage::spamPageWithContent | ( | $ | match = false | ) |
Show "your edit contains spam" page with your diff and text.
$match | string|Array|bool Text (or array of texts) which triggered one or more filters |
Definition at line 3091 of file EditPage.php.
EditPage::submit | ( | ) |
Definition at line 280 of file EditPage.php.
EditPage::tokenOk | ( | &$ | request | ) |
Make sure the form isn't faking a user's credentials.
$request | WebRequest |
Definition at line 964 of file EditPage.php.
EditPage::unmakesafe | ( | $ | invalue | ) |
Reverse the previously applied transliteration of non-ASCII characters back to UTF-8.
Used to protect data from corruption by broken web browsers as listed in $wgBrowserBlackList.
$invalue | String |
Definition at line 3250 of file EditPage.php.
Produce the stock "please login to edit pages" page.
Definition at line 3030 of file EditPage.php.
EditPage::wasDeletedSinceLastEdit | ( | ) | [protected] |
Check if a page was deleted while the user was editing it, before submit.
Note that we rely on the logging table, which hasn't been always there, but that doesn't matter, because this only applies to brand new deletes.
Definition at line 2523 of file EditPage.php.
EditPage::$action = 'submit' |
Definition at line 171 of file EditPage.php.
EditPage::$allowBlankSummary = false |
Definition at line 190 of file EditPage.php.
EditPage::$autoSumm = '' |
Definition at line 191 of file EditPage.php.
EditPage::$bot = true |
Definition at line 212 of file EditPage.php.
EditPage::$deletedSinceEdit |
Definition at line 178 of file EditPage.php.
EditPage::$didSave = false |
Definition at line 227 of file EditPage.php.
EditPage::$diff = false |
Definition at line 208 of file EditPage.php.
EditPage::$editFormPageTop = '' |
Definition at line 216 of file EditPage.php.
EditPage::$editFormTextAfterContent = '' |
Definition at line 222 of file EditPage.php.
EditPage::$editFormTextAfterTools = '' |
Definition at line 220 of file EditPage.php.
EditPage::$editFormTextAfterWarn = '' |
Definition at line 219 of file EditPage.php.
EditPage::$editFormTextBeforeContent = '' |
Definition at line 218 of file EditPage.php.
EditPage::$editFormTextBottom = '' |
Definition at line 221 of file EditPage.php.
EditPage::$editFormTextTop = '' |
Definition at line 217 of file EditPage.php.
EditPage::$editintro = '' |
Definition at line 212 of file EditPage.php.
EditPage::$edittime = '' |
Definition at line 211 of file EditPage.php.
EditPage::$firsttime |
Definition at line 180 of file EditPage.php.
EditPage::$formtype |
Definition at line 179 of file EditPage.php.
Bool EditPage::$hasPresetSummary = false |
Has a summary been preset using GET parameter &summary= ?
Definition at line 202 of file EditPage.php.
EditPage::$hookError = '' |
Definition at line 192 of file EditPage.php.
EditPage::$incompleteForm = false |
Definition at line 185 of file EditPage.php.
EditPage::$isConflict = false |
Definition at line 172 of file EditPage.php.
EditPage::$isCssJsSubpage = false |
Definition at line 173 of file EditPage.php.
EditPage::$isCssSubpage = false |
Definition at line 174 of file EditPage.php.
EditPage::$isJsSubpage = false |
Definition at line 175 of file EditPage.php.
EditPage::$isNew = false |
Definition at line 177 of file EditPage.php.
EditPage::$isWrongCaseCssJsPage = false |
Definition at line 176 of file EditPage.php.
EditPage::$kblength = false |
Definition at line 187 of file EditPage.php.
EditPage::$lastDelete |
Definition at line 181 of file EditPage.php.
Article EditPage::$mArticle |
Definition at line 165 of file EditPage.php.
EditPage::$mBaseRevision = false |
Definition at line 204 of file EditPage.php.
EditPage::$mContextTitle = null [private] |
Definition at line 170 of file EditPage.php.
EditPage::$minoredit = false |
Definition at line 209 of file EditPage.php.
EditPage::$missingComment = false |
Definition at line 188 of file EditPage.php.
EditPage::$missingSummary = false |
Definition at line 189 of file EditPage.php.
ParserOutput EditPage::$mParserOutput |
Definition at line 197 of file EditPage.php.
EditPage::$mPreloadText = '' |
Definition at line 224 of file EditPage.php.
EditPage::$mShowSummaryField = true |
Definition at line 205 of file EditPage.php.
Title EditPage::$mTitle |
Definition at line 169 of file EditPage.php.
EditPage::$mTokenOk = false |
Definition at line 182 of file EditPage.php.
EditPage::$mTokenOkExceptSuffix = false |
Definition at line 183 of file EditPage.php.
EditPage::$mTriedSave = false |
Definition at line 184 of file EditPage.php.
EditPage::$nosummary = false |
Definition at line 210 of file EditPage.php.
EditPage::$oldid = 0 |
Definition at line 212 of file EditPage.php.
EditPage::$preview = false |
Definition at line 208 of file EditPage.php.
EditPage::$previewTextAfterContent = '' |
Definition at line 223 of file EditPage.php.
EditPage::$recreate = false |
Definition at line 209 of file EditPage.php.
EditPage::$save = false |
Definition at line 208 of file EditPage.php.
EditPage::$scrolltop = null |
Definition at line 212 of file EditPage.php.
EditPage::$section = '' |
Definition at line 211 of file EditPage.php.
EditPage::$sectiontitle = '' |
Definition at line 211 of file EditPage.php.
EditPage::$starttime = '' |
Definition at line 211 of file EditPage.php.
EditPage::$summary = '' |
Definition at line 210 of file EditPage.php.
EditPage::$suppressIntro = false |
Definition at line 230 of file EditPage.php.
EditPage::$textbox1 = '' |
Definition at line 210 of file EditPage.php.
EditPage::$textbox2 = '' |
Definition at line 210 of file EditPage.php.
EditPage::$tooBig = false |
Definition at line 186 of file EditPage.php.
EditPage::$undidRev = 0 |
Definition at line 228 of file EditPage.php.
EditPage::$watchthis = false |
Definition at line 209 of file EditPage.php.
const EditPage::AS_ARTICLE_WAS_DELETED = 222 |
Status: article was deleted while editting and param wpRecreate == false or form was not posted.
Definition at line 99 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_BLANK_ARTICLE = 224 |
Status: user tried to create a blank page.
Definition at line 110 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_BLOCKED_PAGE_FOR_USER = 215 |
Status: User is blocked from editting this page.
Definition at line 63 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_CONFLICT_DETECTED = 225 |
Status: (non-resolvable) edit conflict.
Definition at line 115 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_CONTENT_TOO_BIG = 216 |
Status: Content too big (> $wgMaxArticleSize)
Definition at line 68 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_END = 231 |
Status: WikiPage::doEdit() was unsuccessfull.
Definition at line 141 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_HOOK_ERROR = 210 |
Status: Article update aborted by a hook function.
Definition at line 53 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_HOOK_ERROR_EXPECTED = 212 |
Status: A hook function returned an error.
Definition at line 58 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_IMAGE_REDIRECT_ANON = 233 |
Status: anonymous user is not allowed to upload (User::isAllowed('upload') == false)
Definition at line 151 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_IMAGE_REDIRECT_LOGGED = 234 |
Status: logged in user is not allowed to upload (User::isAllowed('upload') == false)
Definition at line 156 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_MAX_ARTICLE_SIZE_EXCEEDED = 229 |
Status: article is too big (> $wgMaxArticleSize), after merging in the new section.
Definition at line 131 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_NO_CREATE_PERMISSION = 223 |
Status: user tried to create this page, but is not allowed to do that ( Title->usercan('create') == false )
Definition at line 105 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_OK = 230 |
not used
Definition at line 136 of file EditPage.php.
const EditPage::AS_RATE_LIMITED = 221 |
Status: rate limiter for action 'edit' was tripped.
Definition at line 93 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_READ_ONLY_PAGE = 220 |
Status: wiki is in readonly mode (wfReadOnly() == true)
Definition at line 88 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_READ_ONLY_PAGE_ANON = 218 |
Status: this anonymous user is not allowed to edit this page.
Definition at line 78 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_READ_ONLY_PAGE_LOGGED = 219 |
Status: this logged in user is not allowed to edit this page.
Definition at line 83 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_SPAM_ERROR = 232 |
Status: summary contained spam according to one of the regexes in $wgSummarySpamRegex.
Definition at line 146 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_SUCCESS_NEW_ARTICLE = 201 |
Status: Article successfully created.
Definition at line 48 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_SUCCESS_UPDATE = 200 |
Status: Article successfully updated.
Definition at line 43 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_SUMMARY_NEEDED = 226 |
Status: no edit summary given and the user has forceeditsummary set and the user is not editting in his own userspace or talkspace and wpIgnoreBlankSummary == false.
Definition at line 121 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_TEXTBOX_EMPTY = 228 |
Status: user tried to create a new section without content.
Definition at line 126 of file EditPage.php.
Referenced by ApiEditPage\execute().
const EditPage::AS_USER_CANNOT_EDIT = 217 |
Status: User cannot edit? (not used)
Definition at line 73 of file EditPage.php.
const EditPage::EDITFORM_ID = 'editform' |
HTML id and name for the beginning of the edit form.
Definition at line 161 of file EditPage.php.