Robert Leverington
2a30aa1d25
Add new hook ArticlePrepareTextForEdit, called when preparing text to be saved.
...
Add new parser option "PreSaveTransform" that allows the pre-save transformation to be selectively disabled.
2011-01-16 21:12:26 +00:00
Alexandre Emsenhuber
151e665515
Added wfDeprecated() to Article::insertNewArticle() and Article::updateArticle(). The last usage of these two methods was removed in r80402.
2011-01-15 16:07:49 +00:00
Alexandre Emsenhuber
10c8ebb2e7
Added ArticleViewFooter hook to allow extensions adding additional items to the footer of normal views
2011-01-14 21:54:29 +00:00
Daniel Friesen
39ab3cfc9f
Implement Message::isBlank and Message::isDisabled.
...
And while we're at it... update a random assortment of code using wfEmptyMsg to use the new wfMessage class and our exists/isBlank/isDisabled methods.
2011-01-14 10:51:05 +00:00
Alexandre Emsenhuber
67aa77d6b1
Set $mRevision to null by default so we don't need the isset() call
2011-01-12 12:50:46 +00:00
Alexandre Emsenhuber
dd32f9c57d
Be sure to use the latest rev id and not whatever getRevIdFetched() could be
2011-01-10 08:33:19 +00:00
Alexandre Emsenhuber
c52cf288d4
Fix for r79874: only set $mRevIdFetched from fetchContent(), it was overriden by the loadLastEdit() call in getRevIdFetched() for old versions which caused it to be always the latest rev id
2011-01-09 17:41:42 +00:00
Alexandre Emsenhuber
80bbce5524
Kill Article::$mCurID, not set anywhere, not used anywhere (including extensions)
2011-01-09 12:01:58 +00:00
Alexandre Emsenhuber
463b0b3f2c
Fix typo from r79874
2011-01-09 11:48:10 +00:00
Alexandre Emsenhuber
a0d541474d
Changed to calls to Article::getContent() to Article::getRawText():
...
- in Article::insertRedirect(): if this will be saved in the redirect table, it should only be checked with the current text (in fact this is never called when viewing an old revision, but just in case someone breaks this)
- in Article::prepareTextForEdit(): as for Article::doEdit() this should be actual page's contents
2011-01-09 11:46:15 +00:00
Alexandre Emsenhuber
bf31a123db
Only set $mUser, $mUserText, $mComment and $mTimestamp fields in fetchContent() if we have loaded the latests revision
2011-01-08 20:07:18 +00:00
Happy-melon
355717054f
Remove ancient deprecated functions:
...
* Article::getDB(), deprecated in 1.13 (r36334)
* Article::showArticle() - 1.7 (r14809)
* User::SetupSession() - 1.8 (r15823)
* User::isBot() - 1.8 (r15689)
Annotate other deprecated functions with @since <version>
2011-01-06 18:04:04 +00:00
Happy-melon
64038e5f0d
name attribute is invalid on <tr>s, and long-since deprecated generally.
2011-01-06 17:22:38 +00:00
Happy-melon
e6c1611379
More documentation formatting
2011-01-06 15:55:56 +00:00
Alexandre Emsenhuber
625b4216e5
Run preSaveTransform() with the user that did the edit, not unconditionally $wgUser
2011-01-04 19:08:44 +00:00
Tim Starling
ccfe5ad97b
Fix for bug 26561: clickjacking attacks. See the bug report for full documentation.
2011-01-04 06:12:33 +00:00
Alexandre Emsenhuber
03dfa9f60c
* Modified Article::loadPageData() to use a slave database connection and pageDataFromTitle() instead of pageDataFromId() in the default case, as in Wiki.php (this also saves a query since the ID will be fetched with other fileds)
...
* Removed the loadPageData() call for the initial article in Wiki.php, will be triggered by the isRedirect() call 7 lines below if needed (this was not needed if $target is set by the InitializeArticleMaybeRedirect hook), but kept the second one (same as above, Article::exists() triggers Title::getArticleId() that would use one query to get id and a second one is needed to get the complete page data)
* Modified Article::fetchContent() to use common code (loadPageData()) and to only call it if really needed
2011-01-03 19:50:01 +00:00
Alexandre Emsenhuber
5cc90de1a1
Just call loadPageData() if not already done to get the $mIsRedirect flag in Article::isRedirect() instead of doing a lot of useless stuff
2011-01-03 18:15:44 +00:00
Alexandre Emsenhuber
a2653cd21b
no need to set $this->mOldId, this is already done in getOldID()
2011-01-03 17:12:27 +00:00
Sam Reed
102299eb9d
Document getParserOutput() return type in Article
2011-01-01 22:46:23 +00:00
Alexandre Emsenhuber
8d3285fee1
Made the page_count update defered, as for the site_stats update. I just removed Article::incViewCount() since nothing else was calling this function.
2011-01-01 16:58:00 +00:00
Platonides
ed4c31bd4d
(Bug 26458) Section edit links appear on pages that user does not have right to edit (
2010-12-29 16:42:46 +00:00
Platonides
e2e210e2de
Fix bug 14404. The articles are now always saved with the default options.
...
Most importantily, articles with {{int:X}} will now have consistent table
links no matter the language of the last saving user.
Existing articles with broken tables will be updated on a null edit (a purge is not enough).
Test added in r79121.
2010-12-28 18:44:32 +00:00
Platonides
779b87e1df
Play safe and clear the article object internals, too (eg. mTouched).
2010-12-28 18:16:46 +00:00
Platonides
7663fdd44a
Remove ParserOptions clonations, already cloned in getParserOptions().
...
Ref r70783
2010-12-26 19:23:11 +00:00
Happy-melon
6b5d1c1c0e
Revert rollback implementation of r78585, r78599. The way the API is set up, it's not possible to have some tokens on the new system and some on the old.
2010-12-20 19:03:00 +00:00
Happy-melon
ff2f6606b0
Follow-up r78585: Make Token::PERSISTENT the default, so no need to specify it. That will be more usual, I expect.
2010-12-19 15:23:22 +00:00
Happy-melon
e0bec9555e
Merge in Token class from my branch; would like some second opinions on the concept. This seeks to replace the much-abused $wgUser->editToken() token generator, 90% of the uses of which are not for editing but rather general actions.
...
Implemented for rollback mainly as a proof-of-concept; obvious further targets are patrol links and HTMLForm.
2010-12-18 23:07:30 +00:00
Alexandre Emsenhuber
9cb3299aee
Checking permissions for $wgUser while doing an edit with another user is not a good idea
2010-12-14 19:40:27 +00:00
Platonides
f3aabaa1f7
Do not access to mTouched internals of Article from a different module per r70783#c12039
2010-12-14 17:49:01 +00:00
Alexandre Emsenhuber
1b1cd0a8bc
Removed trailing whitespaces
2010-12-13 19:47:34 +00:00
Aaron Schulz
cb7cb19947
Assert that revision timestamp actually matches Article->mTimestamp
2010-12-08 07:10:43 +00:00
Ilmari Karonen
ee341b580a
Fix bug causing rebuildFileCache.php to create inappropriate cache files for redirects. (Actually, it would be better to create _correct_ cache files for them instead, but this doesn't seem to be something the file cache was designed to do, so I'll leave it for later.)
2010-12-06 01:08:17 +00:00
Chad Horohoe
dba889ceba
More useful debug output
2010-12-05 05:14:41 +00:00
Sam Reed
cadc951d15
More reversion of r77297, 1 of 2 commits to keep it readable in CR (hopefully)
2010-11-25 22:24:11 +00:00
Antoine Musso
6fe29c9c30
revert r76464
...
* mixed style changes and variable removing
* logic changes
* useful comments removed
2010-11-25 20:01:34 +00:00
Jack Phoenix
27292e21dc
wrap the redirect message (arrow image + target page name) into a div that has the class "redirectMsg" so that the redirection arrow can be customized with on-wiki CSS instead of having to overwrite skins/common/images/redirect(ltr|rtl).png
2010-11-19 21:23:50 +00:00
Sam Reed
a54a1ee178
Fixup some more documentation
2010-11-13 00:47:51 +00:00
Sam Reed
10ecfeb03b
Various unused variables, add some braces
...
Explicitally define some variables used in hook type calls
2010-11-10 19:49:04 +00:00
Sam Reed
39c005ca79
bug 25517 Assignment in conditions should be avoided/ http://www.mediawiki.org/wiki/Manual:Coding_conventions#Assignment_expressions
2010-11-01 00:07:17 +00:00
Sam Reed
efd8358882
More deprecated method calls
2010-10-31 16:33:48 +00:00
Sam Reed
604ae0ca1c
Update deprecated method calls
...
Remove some unused stuff
2010-10-31 16:20:48 +00:00
Roan Kattouw
e331655cf0
Revert r70640 per CR: don't expose unsalted edit tokens in URLs. Should instead change the API's patrol functionality to salt patrol tokens (coming up shortly)
2010-10-23 16:56:07 +00:00
Sam Reed
a2589ff8c6
Assignment in loop conditions suck
...
while ( $row = $dbw->fetchObject( $res ) ) { to foreach ( $res as $row ) in includes
Add some braces
2010-10-13 23:11:40 +00:00
Siebrand Mazeland
d088f079e3
Remove some references to no longer supported PHP version.
...
Also add a FIXME for a check in DefaultSettings.php and fix indentation in install-utils.inc.
2010-10-02 22:22:12 +00:00
Chad Horohoe
cc6a650bf8
Refactor GAID_FOR_UPDATE into Title::GAID_FOR_UPDATE. Yay less file-scope code (extensions will follow)
2010-09-30 19:13:25 +00:00
Platonides
adf45bb4e1
Tiny changes, fix comment, remove unused globals and throw and exception instead of a fatal if given a wrong langcode.
2010-09-29 15:54:43 +00:00
OverlordQ
170b0536a8
Fix regression caused by r62087 which failed to insert rows into the image table due to null comment.
...
Also correct indefinite/infinite/infinity protection.
2010-09-23 02:59:07 +00:00
Platonides
df8cb36d40
Go back to Status objects after r71805. We return an Ok result if it can give a meaningful result (eg. in fallback).
...
Remove the now unused colonsToAssoc().
Better diffed without whitespaces.
2010-09-15 21:03:07 +00:00
Platonides
e31a27bf25
Follow up r71805: Drop PoolWork from the configuration key, and update DefaultSettings comment, document workers, maxqueue and timeout parameters.
2010-09-15 19:49:40 +00:00