Commit graph

471 commits

Author SHA1 Message Date
awjrichards
c29fd59775 Big oops - merged to wrong branch.
Revert "Revert to arbitrarily old point before initial remote branch creation to help clean up"

This reverts commit ee0d3d330f
2012-06-05 22:58:54 +00:00
awjrichards
ee0d3d330f Revert to arbitrarily old point before initial remote branch creation to help clean up
Change-Id: I41a3d1e55d3ea9dffa42451237fe065f9334361d
2012-06-02 08:43:04 -07:00
Demon
1dc986a90f Merge "[FileRepo] Made getDescription() respect *_deleted fields." 2012-06-04 20:41:52 +00:00
Alexandre Emsenhuber
42fcb726e6 Fix user rights check to display the "revert" link on file histories.
* Don't do expensive checks for display (for the consistency of the interface)
* Removed the logged-in check and changed it for 'upload' right (as the user need this right to execute the action)

Change-Id: Ie5752e5292a953cbcf81ab665365c3efbd4eba6a
2012-05-29 19:09:01 +02:00
Liangent
22b00ec69d (bug 37186) Remove hard coded parentheses in ImagePage.php
Change-Id: Ib516e501953f37a69707a5de3e2ed96004760caa
2012-05-29 16:10:47 +08:00
Aaron
9f6afeab0d [FileRepo] Made getDescription() respect *_deleted fields.
Change-Id: I1dd54611501d6747fb4ad6cbe6b58b0010b1d6d4
2012-05-25 16:00:49 -07:00
Aaron Schulz
1aaac4c915 Avoid extreme performance regression in ImagePage.
* For some reason, when 404 handling is off, all the links for
  $wgImageLimits were still generated but not put into the HTML.
  They still triggered convert() calls - 7 times by default.

Change-Id: I0d12c7ec3c02039c1307a1a1d04d1d1cbd44b547
2012-05-19 22:07:15 -07:00
Aaron
86e2372772 Fixed call to setArticleBodyOnly() on wrong object type.
Change-Id: I492bbdb41aa849a86b162c7cc659dde391874454
2012-05-16 11:15:00 -07:00
Alexandre Emsenhuber
a682b7335a Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I0db3461139284edcb6ac02923eb83d54e6756ffb
2012-05-12 22:33:51 +02:00
Max Semenik
a67d5c46e2 ImagePage refactoring
* Use context everywhere
* Fix comments, including two functions from other files it references
* Remove pointless function return value

Change-Id: I29a0a2a54432c8ef7185a210c7f2f73c64bfb71c
2012-04-30 18:43:56 +04:00
Reedy
2edbe14e39 Normalising return statements
Add/improve parameter documentation

Change-Id: I4c7fa319be60a47b7fcd81131458577bccb009fb
2012-04-27 16:40:14 +01:00
Amir E. Aharoni
a9208a08ab (bug 25277) Moved the space before the dirmark.
If the dirmark is immediately adjacent to the file name, the user
may copy it with and then paste an unneeded dirmark somewhere.
It can be adjacent to the file description, however.

Patch set 2: using getDirMarkEntity, according to MaxSem's suggestion.

Change-Id: I9567a90e9a4b32cdf31af5f26044c8f80961f986
2012-03-31 16:37:43 +03:00
Brian Wolff
162d18a7cb (bug 34863) Make it so an image that was previously deleted and currently does not exist (locally or foreignly), shows a snippet from the deletion (and move) log.
Currently things outside of file namespace display the snippet, so file ns should display snippet for completeness. As far as I can tell, the only reason files don't is because ImagePage class overrides the Article class, and it was unintentional that the snippet was not included in ImagePage class.
2012-03-02 01:02:41 +00:00
Derk-Jan Hartman
3e54e6ba04 Fixes bug 34715 Image redirects show the "redirected from" subtitle twice.
ImagePage no longer needs to set the "redirectedfrom" header by itself. Seems Article.php is taking care of it now. I suspect this was caused by the refactoring of WikiPage, Article, etc.
2012-02-25 20:30:38 +00:00
Sam Reed
76246b9bf5 More return documentation 2012-02-09 21:33:27 +00:00
Sam Reed
5bccf15053 Use accessor method, ping r110179 2012-01-27 23:19:58 +00:00
Bryan Tong Minh
810bb7b79f Follow-up r83791: do not show size links for wikis which do not use a 404 transform, since this is a rather expensive operation, which can delay loading for several seconds. 2012-01-27 22:44:46 +00:00
Aaron Schulz
5a6559d8b1 Reverted r108743 per CR comment. This should at least be discussed first. 2012-01-12 19:41:18 +00:00
Sam Reed
a5c200a25b Kill "* @return void" 2012-01-12 19:12:24 +00:00
Alexandre Emsenhuber
dfbec4385b Fix casing of Language::timeanddate calls 2011-12-20 18:09:21 +00:00
Jeroen De Dauw
3062365928 follow up to r106215 r106218 forgot one >_> 2011-12-14 18:33:51 +00:00
Jeroen De Dauw
2001b88908 follow up to r106215, pass user 2011-12-14 18:32:36 +00:00
Siebrand Mazeland
40df5b1a9e WikiPage::viewUpdates() -> WikiPage::doViewUpdates() 2011-12-14 17:54:13 +00:00
Tim Starling
ddbf20c0ba Add a configuration variable to work around the issue that has been reported at least twice on IRC: pages from MW with a 404 status code have the last block of their body replaced, and their headers appended to, resulting in totally broken output for page views of non-existent pages. BizLand or some reseller is probably at fault. 2011-12-09 04:31:10 +00:00
Platonides
8ebda3b780 Change <br clear="all/left" to <br style="clear: in inline html.
(Bug 13381) Improve the XHTML strictness
2011-11-20 18:57:59 +00:00
Brian Wolff
41f1b6a288 (bug 31535; bug 332) Properly truncate upload summaries (img_description) on the php side.
Before it would get truncated when inserted into the 255 byte db field. This is bad as it can leave dangling multi-byte unicode sequences, additionally, since directly after upload we appearently cache the file object, this can result in the comment in the file history table being super-huge.

This also removes the parenthesis in the comment field in the table. Its a table, we don't need to use () to visually separate it from the rest of the page content.

This commit also causes '...' (or the i18n'ed equivalent) to be appended when truncated a comment. Previously that didn't happen. Also I changed it to use a method that doesn't check for '*' as a special value to mean no description. I looked at the toolserver db, and even uploads to enwikipedia from 2002 don't use '*' as special no-description marker.
2011-11-16 19:50:59 +00:00
Alexandre Emsenhuber
b63ef8b4de Follow-up r103202: removed unused global declaration 2011-11-16 13:17:53 +00:00
John Du Hart
93e50f7eed Following r100264, update usages in core 2011-11-16 04:37:17 +00:00
Alexandre Emsenhuber
c35b82a036 * Factorise common code in ImagePage::delete() and allow normal page deletion if $wgUploadMaintenance is true
* Moved $wgUploadMaintenance check after permissions and read only, so that the user doesn't think the error is temporary if he both doesn't have the permission and $wgUploadMaintenance is true
* Show normal error page when $wgUploadMaintenance and added a message for the error title
* Moved watchlist updating to FileDeletForm::execute(), it has nothing to do in doDelete() (would also be executed for api requests, etc.)
* Added $user parameter to FileDeletForm::doDelete() to pass the user doing the action
* Use WikiPage instead of Article
2011-11-15 18:08:34 +00:00
Alexandre Emsenhuber
ddb2238bdf Don't pass the count parameter in rawParams() otherwise {{PLURAL:}} won't work (spotted while looking at r102794 but not related to that rev) 2011-11-11 16:09:34 +00:00
Brian Wolff
c317d3feab (bug 32358) Do not display "No higher resolution available" if the file doesn't have dimensions (like an audio file) 2011-11-11 15:59:40 +00:00
Sam Reed
52cd34acf5 More documentation 2011-10-29 01:53:28 +00:00
Alexandre Emsenhuber
b212bace90 Per Nikerabbit's comment on r100621:
* Removed OutputPage::setPageTitleMsg() and OutputPage::setHTMLTitleMsg() and make OutputPage::setPageTitle() and OutputPage::setHTMLTitle() accept a Message object
* Updated core calls (including some that I missed last time because of non-matching case)
* Added Message::setContext() and use it in RequestContext so that I don't need to duplicate the call in OutputPage
* Yes, I'm calling $this->msg() on places and then setting the context one more time in OutputPage::setPageTitle() or OutputPage::setHTMLTitle(), but at least I won't be confused about which objects $
2011-10-27 20:23:16 +00:00
Sam Reed
96641da58e Add, update, tweak documentation
Fix document comment blocks

Tweak some returns
2011-10-26 03:44:47 +00:00
Bryan Tong Minh
ff809e24e1 Revert unrelated changes from r99916 2011-10-15 21:40:30 +00:00
Bryan Tong Minh
cdf224eac1 Follow-up r99911: fix tests
Add NullRepo to autoloader
2011-10-15 21:38:53 +00:00
Raimond Spekking
bdf825cae8 * Move <small> styling from message to shared.css
* Wrap complete section into a div
* Wrap "Other resolutions:" into a span and remove it from printing. Useless on paper.
* Add plural to 'show-big-image-other'
2011-09-12 12:46:20 +00:00
Robin Pepermans
75932b439d * r96737: set OutputPage->addWikiText() as an interface message by default
* r96760: use 'noflip' for $flip in OutputPage->addInlineStyle() so it's always a string
* Add some parameter documentation
2011-09-11 21:07:17 +00:00
Robin Pepermans
8f3ccf52f6 BetterDirectionality fixes:
* SkinTemplate: also set <div class="mw-content-ltr/rtl"> when action = historysubmit, so a diff displays correctly when you clicked on the "compare selected revisions" button on the history page
* ImagePage: set a dir attribute (according to the site content language) for the user comment in the file history
* FlaggedRevs: use CSS class sitedir-ltr/rtl instead of ambiguous rtl class
2011-07-11 00:39:41 +00:00
Alexandre Emsenhuber
d35d8dd82e Changed all dynamic calls to Linker methods into static ones in ImagePage.php.
ImageHistoryList is not used in extension, so I also removed ImageHistoryList::getSkin().
2011-07-06 14:45:19 +00:00
Robin Pepermans
7c624542f0 (bug 6100; follow-up to r91315) Being bold and removing $wgBetterDirectionality (and dependent wfUILang) in core, as most or all work is finished.
Also:
* Introduce classes mw-float-end, mw-float-start so we don't have to use inline css depending on wfUILang()/$wgLang (see HistoryPage and SpecialFileDuplicateSearch)
* Add direction mark to protection log
* Remove specialpageattributes as it is obsoleted by this commit (also fixes bug 28572)
* Add two direction marks in wfSpecialList, which makes ltr links on rtl wiki (and vice versa) display nicely as well (only on those special pages however)
* Revert r91340 partially: use mw-content-ltr/rtl class anyway in shared.css. Both ways have their [dis]advantages...
* Set the direction of input fields by default to the content language direction (except buttons etc.) in shared.css
2011-07-06 02:26:06 +00:00
Aaron Schulz
52968965e3 * Added getFileVersion()/setFileVersion() functions to OutputPage
* Removed getDisplayedFile() from FlaggedPage and simplified getFile()
* Cleaned up getIncludeParams() to just do formatting
* Made template/file IDs mandatory for RevisionReviewFormUI
2011-07-05 05:23:26 +00:00
Aaron Schulz
f6c6ecca6c Removed doPurge() from ImagePage.php, already moved to WikiFilePage 2011-07-04 19:19:36 +00:00
Alexandre Emsenhuber
cf6dd13fac * Changed action=revert to use a subclass of Action
* Added WikiPage::getActionOverrides() to be able to execute different actions depending on the namespace (obviously needed for action=revert). This is only used when the value of $wgActions for the corresponding action is true; so extension can still override this.
* Added Action::getDescription() to ease the change of the page header and the <title> element
2011-07-01 20:07:21 +00:00
Sam Reed
9b850aa604 Minor revert to r91246 2011-07-01 02:28:08 +00:00
Sam Reed
bdc31bb9bc Change usages of $wgUser->getSkin() in special pages to use $this->getSkin()
Fix trailing whitespace
2011-07-01 02:25:19 +00:00
Sam Reed
8c23c2c22d Merge r86683 from 1.17wmf1 2011-06-30 01:24:54 +00:00
Aaron Schulz
930ccf282c * Split off WikiPage class from Article, WikiFilePage class from ImagePage, and WikiCategoryPage from CategoryPage.
* WikiPage functions/fields are "magically" part of Article when accessed for b/c. Magic is kind of ugly but there are too many callers to make breaking changes atm. Some functions are just wrappers for WikiPage ones (were magic won't work).
* Added newFromID() to each WikiPage subclass (works around pre-existing inheritance problem).
* Added Page class for convenient type hinting and changed hints from Article -> Page. This lets things use WikiPage objects without getting type errors.
* Updated FlaggedPage to extend WikiPage. Worked around getOldIdFromRequest().
* Added setTimestamp() to WikiPage and moved some timestamp setting code from ParserCache to Article.
* Removed ampersands from $dbw arguments.
* @TODO: dependency inject user objects for WikiPage

The idea is to migrate things to use WikiPage, as the run-of-the-mill "new Article()" call doesn't care about $oldid and $wgRequest. After that, Article, ImagePage, and CategoryPage can be rewritten as an Action class or something sane (a Viewer class of sorts).
2011-06-29 22:09:51 +00:00
Chad Horohoe
b7c7bd3c95 (bug 29277) MediaWiki:Filepage.css not loaded on foreignwiki itself. Fixup to r68904. Yay Roan finally taught me how to use the resourceloader :D 2011-06-29 00:08:25 +00:00
Robin Pepermans
6f791165b7 Directionality improvements as part of bug 6100 (under $wgBetterDirectionality):
* Add CSS that should fix all LTR/LTR text on both LTR/RTL wikis, for the editsection link, TOC, and lists (ul/ol).
* Add a class mw-content-ltr/rtl for that.
* Change the divs on CategoryPage so it works wit that CSS.
This is the last relatively major issue for bug 6100.
2011-06-24 23:01:49 +00:00