* Fixed bug where even using Swift/Azure on Windows
would disallow non-ASCII file names.
bug: 1780
Change-Id: I19ed72da0b099d35cae74fb08eeb22c113da1065
displayname is used in user interface texts to tell the user what
is the source of a file so returning null does not make sense
here.
Bug: 64800
Change-Id: Iafbc1a8e63b512d1515215fa1295e5b7434f1861
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I8804ebe0922d3a414863b162a2110e0b9e49b80f
* The preloadFileStat() call acts as a good canary for whether all
affected servers are up. If anything failed in it, then it's not
worth bothering to send the actual write requests.
* Also made FileBackend::preloadFileStat abstract while at it since
the two subclasses implemented it and so should any others.
* Fixed a silly comment typo.
Change-Id: I5bd427f654aa4a9d6bfe4ed7566276e8ac520b30
Previously only content-disposition headers were allowed.
This is needed so that TimedMediaHandler can put
X-Content-Duration headers on ogg transcodes.
Bug: 62928
Change-Id: Ic053be63b3edf348da95a88fc494fcf334430265
Callers may want to test visibility for a user other than $wgUser when
specifying the 'private' option. It seems a natural extension to allow
'private' to be a User object, with boolean true retaining its old
meaning of $wgUser.
Change-Id: Idbed0f3055c0135b5c11068de1bf1ef668e13456
This is needed by MultimediaViewer to show a relevant icon next
to the local and foreign db repo link in the description area
The setting ends up in configuration for foreign DB, because the
favicon value is stored in the configuration of a wiki, not in its
database.
Change-Id: I3d0599c1afa13e1d8540ff3c8bc34129a55792c5
* This now returns a (final DB key, timestamp) map for each file.
This makes proper redirect handling easier for callers.
* Also fixed the case where ucfirst normalization is different in the
repo versus the local wiki.
* Also added $flags to RepoGroup::findFiles() as expected.
Change-Id: I978a1cc0a0589179c46e477cfd06c8bff4c08fa9
Set visibility of $fetchDescription and $descriptionCacheExpiry to public.
These two class properties are directly referenced outside an inheritance
scope.
Bug: 57535
Change-Id: I4e91418f1e2374ebe83ea4310d13ad254fc3dac1
The API's meta=filerepoinfo could use some additional information, most
pressingly a way to determine the MW API endpoint of the associated
repo. Since FileRepo already has scriptDirUrl (to which "/api.php" could
be appended), let's just add that.
And for good measure, we may as well include various other bits of
information that people might find useful.
Change-Id: I6d5aa6cf44ef1d9bdfd9b2f36f184e5fdc0900dd
We currently only return the image repository name for imageinfo, which
is not particularly useful, especially since image repositories aren't
accessible via the API. This patch adds meta=filerepoinfo, which will
return a list of repositories and relevant information (like the API URL
for ForeignAPIRepo ones)
Also returns the local repo now, and defaults to "all" in a more useful
fashion.
Change-Id: I1aaed0895d2a0bc224c82e93975ecf6afd8cb6b8
Added a MWTimestamp::format method to format a timestamp object in the
given pattern. This avoids date(), which needs the local time
zone corretly set on the server, which is assumed at the moment in
Setup.php
Added MWTimestamp::getInstance for gmdate() and
MWTimestamp::getLocalInstance for date() to create a MWTimestamp object
and use it as inline statement.
Also MWTimestamp::setTimezone and MWTimestamp::getTimzone was added for
timezone handling.
Change-Id: I812aa013be2f4380e0cf10dc465202756fe8347b
hphpc has been superseded by hhvm, so support for hphpc is no longer
needed.
* Continue to use Preprocessor_Hash under HipHop since it is still
faster under hhvm
* Keep $wgCompiledFiles for now, so that wikihiero doesn't give an error
before Ic9d1e795 is merged
* Migrate the run-server script and associated configuration file to
hhvm. Enable EnableStaticContentFromDisk since it doesn't seem
ridiculously inefficient at first glance. Run from $IP rather than
$IP/.. since hhvm is apparently not picky about sourcing files from
outside of the current directory.
Change-Id: Ic3e769f1fbad4f7ad26dd819406796fee48c6b45
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !
Fixed windows newline style
Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.
Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments
Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
uploading
Added FileRepo::findFilesByPrefix( $prefix ), which does a img_name LIKE
'$prefix%' search and use this in UploadBase::getExistsWarning().
Change-Id: I21eddc5d08ca3c23b342ebc1c6947e36c4201a45
to allow different storage strategies for thumbnails
and audio/video derivatives, add a new zone "transcoded".
Change-Id: I204c843dae4966b02f4807f15e6b0bac672f34dc
* Clients can send the last chunk with 'async' to get an immediate
response and then check the status of the upload by polling the API
using the 'checkstatus' parameter.
* Pass the User object along to stash functions within UploadFromChunks.
Change-Id: Ie2ad4c7e94862a728e8a687c3195306e16a5059e
This gives updates for the faster part (local FS file changes) and not
the slow GETs that really need this. This should be re-done to use a
byte based read progress callback (that handles the parallel GETs).
This reverts commit 6c9f13b547
Change-Id: Id8d739e1d5048e7f38c68eda4f9a008682707cba
* For backends that support it, custom HTTP headers can be set on files.
* Added a getStreamHeaders() function to MediaHandler to let subclasses
recommend header name/value pairs to be used for responses to GET/HEAD
requests. For example, an OGG handler could set "X-Content-Duration".
* Made LocalFile use this function to set HTTP headers of new uploads.
Change-Id: I1b017e1342513f0097fe6d142aae18e819403293
* This lets callers update the cache/db with the operation progress so that
APIs can be made to use this and expose this information to client polling.
Change-Id: I9a86c1c5ffccf029be5a150e5998c3ce4740ec62