Commit graph

452 commits

Author SHA1 Message Date
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
Robin Pepermans
28ea73bc3a Directionality improvements as part of bug 6100 (under $wgBetterDirectionality) for the File namespace:
* exclude File namespace from div with lang & dir attributes, since most information on file pages is in the user language
* add <div id="mw-imagepage-content"> around the actual wikitext that is in the content language
2011-06-22 13:10:46 +00:00
Brion Vibber
87786e84dd Revert r86764, r89134, r86827 -- added a second opaque boolean parameter to Linker::commentBlock() which appeared to mostly just turn it into Linker::formatComment().
commentBlock() exists for the sole purpose of embedding a comment into parentheses if it exists so you can append it to a line of text -- if you're not putting stuff in parentheses, don't use commentBlock() because you're not generating a parenthesized comment block.
Opaque boolean parameters are also very poor form, especially when tacking on multiple ones. There was already a nasty optional '$local' boolean param, forcing all uses of this other parameter to add *two* parameters, making illegible stuff like 'false, false'.
2011-06-14 23:50:40 +00:00
Siebrand Mazeland
75c6696aa8 Use consistent notation for "@todo FIXME". Should update http://svn.wikimedia.org/doc/todo.html nicely. 2011-05-17 22:03:20 +00:00
Bryan Tong Minh
41231616b6 (bug 23002) Imagelinks table not updated after imagemove. The actual bug was inconsistent behaviour between imagelinks and pagelinks for redirects.
* Parser now only adds the redirect source to imagelinks, like it does in pagelinks
* ImagePage now shows the file redirects in-line with the normal "The following pages link to this file:"
** Added message linkstoimage-redirect
** Removed the separate file redirects section and removed associated message redirectstofile
** ImagePage::imageLinks will first fetch image links to the file, determine which are redirects, and if there are fewer links than the limit, fetch the redirect target links.
2011-05-14 12:20:45 +00:00
Raimond Spekking
629df89813 Embrace comment with () only when really needed. In Special:ListFiles and ImagePage the comment is shown alone in a table cell -> no () needed 2011-04-23 13:23:08 +00:00
Happy-melon
b7e2cdba69 (bug 28583) chase down and beat to death external calls of functions marked /*private*/, and make those declarations actually binding. Patch by yuvipanda. 2011-04-18 19:03:14 +00:00
Leo Koppelkamm
1e13a6c94f Free metadata toggle script from wikibits.js dependencies; rename to mediawiki.action.view.metadata.js 2011-04-16 11:54:43 +00:00
Brian Wolff
74f16767e7 Merge to trunk everything in img_metadata branch.
Hope I did this in an ok fashion. svn merge --re-integrate was giving me issues
so I just essentially over-wrote my working copy with the version at img_metadata.
2011-04-16 01:23:15 +00:00
Brion Vibber
562c357241 * (bug 28372) Fix bogus link to suppressed file versions in ForeignDBRepo
Based on patch by Umherirrender: https://bugzilla.wikimedia.org/attachment.cgi?id=8361&action=edit
If file is not local, we can't make a link so don't.
2011-04-06 18:45:27 +00:00
Brion Vibber
2073ab9b7f * (bug 28306) Fix exposure of suppressed usernames in ForeignDBRepo
Patch by Umherirrender: https://bugzilla.wikimedia.org/attachment.cgi?id=8360&action=diff
2011-04-06 18:23:07 +00:00
Sam Reed
ea056f5171 Fixup a few undefined variables and alike while checking REL1_17 2011-04-04 21:13:34 +00:00
Jack Phoenix
0a45ed6a91 ImagePage.php: add missing braces + other code style tweaks 2011-04-02 14:50:31 +00:00
Mark A. Hershberger
289c1d7771 Fixes Bug #28214 - When page not found, sends malformed HTTP/1.x instead of HTTP/1.1 in header of respons
Note that there are a few places in the source where headers are sent
with HTTP/1.0 instead of HTTP/1.1 but this patch doesa not address those
2011-03-25 03:36:18 +00:00
Happy-melon
ac5751ee48 Follow-up r84249: reimplement isAllowedAny(), and restore isAllowed() to only-accepting-one-parameter mode for the time being. 2011-03-18 21:07:05 +00:00
Happy-melon
81852ea1a6 Allow User::isAllowed() to take varargs. "is allowed X or Y" is by far the more common multiple permission check in core, so this is now the behaviour of isAllowed( X, Y ); also add isAllowedAll(...) for testing "is allowed X and Y". Has the nice side effect of adding visibility to a very old function. 2011-03-18 14:48:21 +00:00
Bryan Tong Minh
03a00bb732 (bug 2581, bug 6834) Added links to thumbnail in several resolutions to the file description page. The sizes are set by $wgImageLimits.
Not really happy about how it looks, perhaps only the numbers should be linked? See http://www.mediawiki.org/wiki/User:Bryan/Bug_2581 for options.
Removed message show-big-image-thumb, added show-big-image-preview, show-big-image-other, show-big-image-size.
2011-03-12 22:49:31 +00:00
Sam Reed
26a2544ebf Explicit variables, documentation, newlines, braces 2011-03-05 17:01:33 +00:00
Max Semenik
6f18e92bff Partial revert my accidental revert of r82366 in r82445. 2011-02-19 16:25:02 +00:00
Max Semenik
f5377b6d02 Bug 27518: Updater calls PopulateLogSearch before adding logging.log_user_text; populateLogUsertext not called 2011-02-19 11:49:14 +00:00