Commit graph

487 commits

Author SHA1 Message Date
Derk-Jan Hartman
287c78dea8 (bug 39538) SVG filepages do not need the file-nohires message.
Change-Id: I88b75079d09cc3ab1904a0a2d716fe2df57b7be6
2012-09-11 23:48:01 +02:00
Aaron
a73d0df62a Revert "(bug 27111) Make cascading foreign repo's fetch description properly"
The combination of $out->addHTML() and the super call cause action=render for
File pages to have the text rendered twice. Wikis get commons descriptions via
action=render, so they were showing the description text twice.

This reverts commit ca13fde652.

Conflicts:

	RELEASE-NOTES-1.20

Change-Id: Ib1072fd1d109c0d6706215ccad1413dd72cb201d
2012-09-05 12:22:14 -07:00
Hashar
89a055491c Merge "'lang' attrib in #mw-content-text should be set to variant code." 2012-09-04 15:04:52 +00:00
Liangent
da43314022 'lang' attrib in #mw-content-text should be set to variant code.
Change-Id: I15cd8c102991c5007b43e06939a0c1a7593d0933
2012-09-04 17:00:27 +02:00
Brian Wolff
ca13fde652 (bug 27111) Make cascading foreign repo's fetch description properly
This changes action=render on file pages to include the shared image
description (if it exists). The reasons for this are two fold:

*Logically, most users would consider the shared description part of
  the content of the page, and not part of the site chrome, so it
  should be on action=render
*Foreign file repos use action=render to get image descriptions.
  if you use say en.wikipedia.org as your file repo, commons images
  get cascasively included, but all their descriptions end up
  being the noarticletext message, which is bad. This makes
  the shared image descriptions work.

Some notes on the implementation:
* on action=render the div containing the shared description
  doesn't have the id that the one on normal page view has.
  This is to prevent duplicate ids in the cascading repo scenario.
  I added a class so people can identify them if they want, and this
  allows people to easily identify the "outermost" shared description
  as it would be the only one with the id.
* This doesn't include the "shareddescriptionfollows" message
  (which is disabled by default) that would normally separate the
  local from the non-local description. I wasn't sure, but thought
  that would be considered part of the site chrome.

Patchset 2/3: trailing space/spelling mistake
Patchset 4: rebase

Change-Id: I18bdf29de62526d699740607b5015da4b01fd43d
2012-08-23 15:44:23 -03:00
Siebrand Mazeland
bb17f98644 (bug 39563) Fatal error: Inaccessible function via __call(): msg
Change-Id: I706ce99400edb86740afc5ce8b205030be7f3c68
2012-08-22 20:54:38 +02:00
Alex Monk
d04502b698 (bug 24491) Don't show reupload link if the user can't upload because of protection
Instead, show some text explaining that they cannot upload here.

Also remove a linebreak which someone complained about recently.

Change-Id: I92ab8ad5eebcdd38c0d5d9f7bab7d11e5c844586
2012-08-21 19:06:42 -07:00
Brian Wolff
876128f8c9 (bug 39297) Show a warning if thumbnails won't be animated
This shows a warning on the image description page if the image
is animated, but thumbnails won't be. This includes
gif images that are too big, but also svg images that are animated,
and APNG files.

The message used is file-no-thumb-animation, but will also
check for file-no-thumb-animation-<image extension> so that
admins can do per image type explanations. Gif files have a built-in
explanation that is slightly different (Since its do to resolution).
Ideally one would pass the resolution limit to the gif message,
but I couldn't think of a clean way of doing that. (Also might be
complex to explain to user. They aren't used to resolution as a single
number but as a width x height type thing).

Moves isAnimatedImage from ImageHandler to MediaHandler, so I could
safely use it from any handler class.

Change-Id: I42ee11d889e0c41de53d0951f55a4338ca55311d
2012-08-21 18:31:51 -07:00
Siebrand Mazeland
6fe1f0509b Replace deprecated wfMsg* calls with Message class calls.
Doing this in steps of roughly 100 changes per commit, so that it remains reviewable.

Change-Id: Ib15e670badd3f6aecae8b60e2f9129a31341ce16
2012-08-21 18:38:44 +02:00
Derk-Jan Hartman
8fa160aadb bug 36073 Use mw-imagepage-linkstoimage-ns as a class instead of an ID
This avoids multiple defines of the same ID on a File page.

Change-Id: I0f8ae37d74f2ec519361b2af164e115f6efa4ac6
2012-08-01 21:34:34 +02:00
Siebrand
7ab935b039 Merge "Use local context to get messages and time formatting methods of Language class." 2012-07-29 20:46:40 +00:00
Siebrand
e516a54238 Merge "'lang' attrib in #mw-imagepage-content should use ->getHtmlCode()" 2012-07-13 20:36:30 +00:00
Alexandre Emsenhuber
65a0b35bd4 Use local context to get messages and time formatting methods of Language class.
Only updated the code in the ImageHistoryList class.

Change-Id: I75bbbcb5c93f3c35c347ec8a0156cbb4b7c10142
2012-07-11 22:54:43 +02:00
Alexandre Emsenhuber
905d83e3ad Use Linker::linkKnown() instead of Linker::link() with options at the end in ImagePage.php
Change-Id: I15848983bb675aac4cd017ab7712f884b928d708
2012-07-11 09:18:07 +02:00
Liangent
e7ddfcf22e replace whitespace with 'word-separator' message
Change-Id: I34e099af74196579f20685e45d81b00ed8f76461
2012-06-11 19:59:45 +02:00
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
Liangent
4181ceb9f3 'lang' attrib in #mw-imagepage-content should use ->getHtmlCode()
Change-Id: If960182af9324307e509ad3bdd31a68844f121b5
2012-06-03 02:46:21 +08: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