BlueSpice MediaWiki master
|
Once support for MediaWiki < 1.25 is dropped, just use ApiBase::PARAM_HELP_MSG directly
Once support for MediaWiki < 1.25 is dropped, just use ApiBase::PARAM_HELP_MSG directly
Once support for MediaWiki < 1.25 is dropped, just use ApiBase::PARAM_HELP_MSG directly
Once support for MediaWiki < 1.25 is dropped, just use ApiBase::PARAM_HELP_MSG directly
Exception | $e |
Port the other Upload tests, and other API tests to this framework
Broken test, reports false errors from time to time. See https://phabricator.wikimedia.org/T28169
This is pretty sucky... needs to be prettified.
string | $reason | Prefilled reason |
Implement JSON encoding, as is required by the Avro spec.
Refactor AvroNamedSchema to use an AvroName instance to store name information.
Check validity of $default value
Check validity of $order value
Other image formats.
document
will now be reported as risky when the
–disallow-todo-testsoption is used or
beStrictAboutTodoAnnotatedTests=trueis set in the configuration file
- TheatLeast()
and
atMost()` invocation count matchers were added
` annotated tests are counted twice
Way too many public functions, most of them should be protected
This should handle options returned by getDefaultOptions().
Not called by anything in this class (but is in subclasses), should be called by something… doHeader() maybe?
Use the job queue for tag deletion to avoid this restriction
Abstract out a base class for this and RevDelLogItem, similar to the RevisionItem class but specifically for log items. - Since
- 1.25
document
Find a way to retrieve this information from the DBAL
Test that this actually works
Make sure this also works with LuceneSearch / WikiSearch
Allow native handling, bypassing wikitext representation, like for includable special pages.
Allow transclusion into other content models than Wikitext!
Used in WikiPage and MessageCache to get message text. Not so nice. What should we use instead?!
&$hasHistory is extremely ugly, it's here because WikiPage::getAutoDeleteReason() and Article::generateReason() have it / want it.
Expose title, redirect, namespace, text, source_text, text_bytes field mappings here. (see T142670 and T143409)
This would probably look a lot nicer in a table. - Parameters
-
object $row
- Returns
- string
fixme fails to detect 3-letter top-level domains
fixme fails to detect 2-letter top-level domains for single-domain use (probably not a big problem in practice, but there are test cases)
break Parser::renderImageGallery out here too.
Currently only checks list of tables
: this should be removed once we got rid of all the static newFromArray() methods.
Move this constant next to GlobeCoordinateValue::GLOBE_EARTH?
preferences, OutputPage
: inject some kind of connection manager that is aware of the target wiki, instead of injecting a LoadBalancer.
This would probably look a lot nicer in a table. - Parameters
-
stdClass $row
- Returns
- string
This would probably look a lot nicer in a table. - Parameters
-
stdClass $row
- Returns
- string
More efficient cleanup of text records
document
move this to TextDifferenceEngine, make DifferenceEngine abstract. At some point.
tests for the rest of DifferenceEngine!
document
Should this be in the parent class?
Make this more useful, right now just dumps $wgContLang
add a unit test case - Parameters
-
string $notificationType
- Returns
- string
Expand recognisable actions.
name?
write this test
Check if the desired model is allowed in this namespace, and if a transition from the page's current model to the new model is allowed.
FIXME: This interface is TERRIBLE, but hard to get rid of due to various error display idiosyncrasies. There are also lots of cases where error metadata is set in the object and retrieved later instead of being returned, e.g. AS_CONTENT_TOO_BIG and AS_BLOCKED_PAGE_FOR_USER. All that stuff needs to be cleaned up some time.
Add some settings examples to code
use rc_source to group, if set; fallback to rc_type
more tests for actual formatting, this is more of a smoke test
more tests
Maybe add some simple logging
FIXME: The following are broke: SubjectArea. Need to test the more obscure tags. DigitalZoomRatio = 0/0 is rejected. need to determine if that's valid. Possibly should treat 0/0 = 0. need to read exif spec on that.
FIXME: Orientation can include flipping as well; see if this is an issue!
In the future, this should be done via Config interfaces
In the future, this should be done via Config interfaces
Search method in file contents for func_get_args() to replace factoryVarArgs.
This badly needs some examples and tests :) The usage in SpecialRecentchanges class is a good ersatz in the meantime.
maybe this should use a formal JSON schema validator or something
: Kill this case along with ApiBase::$messageMap
Add unit tests
Replace $property with a matcher and iterate all property names.
handle NOTABTOC, TABTOC, FORCETABTOC here (2011-12-12, ofb)
handle TOC, FORCETOC, NOTOC here (2011-12-12, ofb)
insert the toc after the first paragraph, maybe we can steal the location from formatHeadings despite the changed html? (2011-12-12, ofb)
see if we can't add the SMW factbox stuff back in (2011-12-12, ofb)
handle NOEDITTAB here (2011-12-12, ofb)
we might be able to only load our js and styles if we are rendering tabs, speeding up pages that don't use it? but what about cached pages? (2011-12-12, ofb)
Move title texts to javascript
document some more, and maybe clean up the code (some params redundant?)
do some useful escaping as well, like if $contents contains literal "</script>" or (for XML) literal "]]>".
Document 'section' / 'subsection' stuff
Document
Currently only used for the "<fieldset>" legend on forms with multiple sections; should be used elsewhere?
FIXME: Integrity of $t is not validated - Returns
- HTMLForm $this for chaining calls (since 1.20)
FIXME: If made 'required', only the text field should be compulsory.
FIXME this is wildly inaccurate and fails to actually check most stuff
tests for HttpError::report
document
Define the exact license of this file.
tests below for findIE6Extension should be split into... ...a dataprovider and test method.
FIXME: Bad interface, see note on MediaHandler::formatMetadata().
Test methods in this call should be split into a method and a dataprovider.
Implement this test
Create a ScriptContentHandler base class, do highlighting stuff there?
Could use a test of extended XMP segments. Hard to find programs that create example files, and creating my own in vim propbably wouldn't serve as a very good "test". (Adobe photoshop probably creates such files but it costs money). The implementation of it currently in MediaWiki is based solely on reading the standard, without any real world test files.
covers tags
this should get integrated somewhere sane
check if it's viable to use localeconv() for the decimal separator thing. - Parameters
-
int | float $number The string to be formatted, should be an integer or a floating point number.
bool $nocommafy Set to true for special numbers like dates
- Returns
- string
There may be other gender namespace than NS_USER & NS_USER_TALK in the future
handling of "o" format character for Iranian, Hebrew, Hijri & Thai?
Maybe translate block durations. Note that this function is somewhat misnamed: it deals with translating the duration ("1 week", "4 days", etc), not the expiry time (which is an absolute timestamp). Please note: do NOT add this blindly, as it is used on old expiry lengths recorded in log entries. You'd need to provide the start date to match up with it.
FIXME: This is language-specific for now only to avoid the negative performance impact of enabling it for all languages.
split into a test and a dataprovider
Move some of the code-related static methods out of Language into this class
FIXME: This is language-specific for now only to avoid the negative performance impact of enabling it for all languages.
split into a test and a dataprovider
methods in test class should be tidied:
- Should be split into separate test methods and data providers
- Tests for LanguageConverter and Language should probably be separate..
methods in test class should be tidied:
- Should be split into separate test methods and data providers
- Tests for LanguageConverter and Language should probably be separate..
FIXME: Only do this for Han characters...
FIXME: Only do this for Han characters...
Someday someone who knows about authenticating against LDAP should write an extension that doesn't have craziness like a global "domain" variable where we have to guess at the correct value in half the entry points.
turn this into a legacy interface for HtmlPageLinkRenderer and similar services.
FIXME: Doesn't handle sub-links as in image thumb texts like the main parser
Handle invalid or missing images better.
implement the filter. Currently these are just some functions to help maintenance/cleanupSpam.php remove links to a single specified domain. The next thing is to implement functions for checking a given page against a big list of domains.
FIXME This special page should not use LIMIT for paging - Returns
- int
Split tests into providers and test methods
Document
- Returns
- string
document
FIXME: This interface is not very flexible. The media handler should generate HTML instead. It can do all the formatting according to some standard. That makes it possible to do things like visual indication of grouped and chained streams in ogg container files. - Parameters
-
File $image
bool | IContextSource $context Context to use (optional)
- Returns
- array|bool
Possibly could add a message here explaining what the different types are. not sure if it is needed though.
Check to be sure this really should have number formatting
Check to be sure this really should have number formatting
: Because we're currently using User, which uses the global config...
Inject user Language instead of using context. - Parameters
-
User $user
IContextSource $context
array &$defaultPreferences
bool $canIPUseHTTPS Whether the user's IP is likely to be able to access the wiki via HTTPS.
- Returns
- void
When we drop support for Zend PHP 5, this can be removed. - Returns
- bool|int
$blobStore should be allowed to be any BlobStore!
This is overly specific, so move or kill this method.
move this somewhere else?
remove when unused! there seem to be no callers of Revision::loadFromId
remove when unused!
remove when unused!
remove when unused!
Introduce newFromParentRevision(). newNullRevision can then be based on that (or go away).
make this private, there should be no need to use this method outside this class.
make this private, there should be no need to use this method outside this class.
make this private, there should be no need to use this method outside this class.
this method is only exposed as a temporary measure to ease refactoring. It was copied with minimal changes from Title::secureAndSplit().
This method should be split up and an appropriate interface defined for use by the Title class.
if all versions of page A are moved to B and then a user tries to do a reverse-merge via the "unmerge" log link, then page A will still be a redirect (as it was after the original merge), though it will have the old revisions back from before (as expected). The user may have to "undo" the redirect manually to finish the "unmerge". Maybe this should delete redirects at the source page of merges?
this should use the Database group
- test, can we have tests?
- this documentation needs to be extended
FIXME: Merge with isDisabled()?
analyse file if need be
look at multiple extension, separately and together.
Be more accurate when using fancy MIME detector plugins; right now this is the bare minimum getimagesize() list. - Parameters
-
string $extension
- Returns
- bool
FIXME: A specific error message should be given in this case.
document
overload the args param
instead of this, use a ServiceContainer for managing the different implementations.
split groups of assertions in autonomous testing functions MWNamespace::isCapitalized
Write more texts, handle $wgAllowImageMoving setting MWNamespace::isMovable
add tests to cover article link, timestamp, character difference, log entry, user tool links, direction marks, tags, rollback, watching users, and date header.
FIXME: Another class handles sending the whole page to the client.
document
this should be given a more accurate name
factor tests in this class into providers and test methods
Does this belong in Image for fuller encapsulation?
better document or deprecate this
document
Migrate some code to TrackingCategories
Make this more independent of the configuration (and if possible the database)
: This is basically an unrefactored copy of MediaWikiTestCase::setupAllTestDBs. They should be factored out somehow.
Sort out xdebug in vagrant so that this works in all sandboxes For now, it is safer to test for it rather then remove it.
Support for the optional a1 parameter introduced in Excel 2010
Cumulative distribution function
Warning. This implementation differs from the algorithm detailed on the MS web site in that $CumPGuessMinus1 = $CumPGuess - 1 rather than $CumPGuess - $PGuess This eliminates a potential endless loop error, but may have an adverse affect on the accuracy of the function (although all my tests have so far returned correct results).
Try implementing P J Acklam's refinement algorithm for greater accuracy if I can get my head round the mathematics (as described at) http://home.online.no/~pjacklam/notes/invnorm/
FIXME: Postgres should use sequential updates like Mysql, Sqlite and everybody else. It never got refactored like it should've. - Returns
- array
: Consider replacing descriptor arrays with objects of a new class. Benchmark and measure resulting memory impact.
FIXME: i18n issue, should use formatted number.
should this be final? Extending classes should be sure to either use afterTraverse or call parent::beforeTraverse() when overloading.
should this be final? Extending classes should be sure to either use leaveNode or call parent::enterNode() when overloading
Detect constants defined in the current code snippet? ... Might not be worth it, since it would need to both be defining and referencing a namespaced constant, which doesn't seem like that big of a target for failure
extract this to somewhere it makes more sense
Implement self-update
Implement prompt to start update
handle assigning by reference
move this elsewhere
Document
document
Deprecate access to mAttribs (direct or via getAttributes). Right now we're having to include both rc_comment and rc_comment_text/rc_comment_data so random crap works right.
: Make deferral configurable.
: Measure performance improvement, assess whether the LazyAttributes feature is warranted.
This code is a duplicate of Renameuser and GlobalRename
api siteinfo prop testmodulenames modulenames
: drop this, the format is irrelevant to the revision!
: drop this, with MCR, there no longer is a single model associated with a revision.
Essentially a copy of RevDelRevisionItem::getDiffLink. That class should inherit from this one, and implement an appropriate interface instead of extending RevDelItem - Returns
- string
Essentially a copy of RevDelRevisionItem::getHTML. That class should inherit from this one, and implement an appropriate interface instead of extending RevDelItem - Returns
- string
Essentially a copy of RevDelRevisionItem::getRevisionLink. That class should inherit from this one, and implement an appropriate interface instead of extending RevDelItem - Returns
- string
For extra validity, input should be validated UTF-8.
remove $options completely in 1.32
implement merging for other attributes such as style - Parameters
-
array $a
array $b
- Returns
- array
Check for legal values where the DTD limits things.
Check for unique id attribute :P
Check for legal values where the DTD limits things.
Check for unique id attribute :P
Tests covering decodeCharReferences can be refactored into a single method and dataprovider.
all test methods in this class should be refactored and... use a single test method and a single data provider...
: Clean up when support for MW < 1.27 is dropped
: Clean up when support for MW < 1.27 is dropped
This isn't ideal, we'd really like to have content-specific handling here
- Returns
- string
FIXME: Dummy class should probably try something at least mildly useful, such as a LIKE search through titles.
document - Parameters
-
string $filteredText
bool $fulltext
- Returns
- string
FIXME: This class is horribly factored. It would probably be better to have a useful base class to which you pass some standard information, then let the fancy self-highlighters extend that.
UGLY UGLY
Give examples for, suffixes: $conf->suffixes = [ 'wiki' ]; localVHosts callbacks!
delete
Currently only asserts that $actual is a string. Need to parse and validate,
: Currently only supports 'tag' and 'class'
Put this whole stuff in a and just call assertThat
Needs some serious refactoring into functions that correspond to the computations individual esi snippets need. Most importantly no body parsing for most of those of course.
is this even used? - Parameters
-
string $name
string $urlaction
- Returns
- array
Internationalize the CE and BCE strings.
The inner lists of values per field should use different separators.
Some spaces are hard-coded here; should probably be part of separators.
$rawParams should be of IParameterFormatter QueryParameterFormatter class
Implement caching for SMW query pages
SPARQL endpoints sometimes return errors if no (valid) query is posted. The current implementation tries to catch this, but this might not be entirely correct. Especially, the SPARQL 1.1 HTTP error codes for Update are not defined yet (April 15 2011).
The case of nominal classes (top-level ValueDescription) still makes some assumptions about the table structure, especially about the name of the joinfield (o_id). Better extend compilePropertyValueDescription to deal with this case.
I might be better to keep the tables and possibly reuse them later on. Being temporary, the tables will vanish with the session anyway.
Be more careful with unserialization. It can create E_NOTICEs. - Returns
- SMWDIError
Implement more validation here.
Implement more validation here.
This should be changed to the spelling getUri().
Consider dropping the $revisiondate filtering and all associated functionality. Is anybody using this?
An improved mechanism for selecting property types here is needed.
Take into account whether the wiki page belongs to a builtin property, and ensure URI alignment/type declaration in this case.
Wiki-HTML-conversion for unit strings must be revisited, as the current solution might be unsafe.
Accept/enforce property namespace.
The function should be extended to take into account whether or not we are in inline mode (not critical, since offsets are usually not applicable inline).
Enforce limitation of maximal number of values.
Enforce uniqueness of properties in declaration.
Complete internationalisation.
Allowed values for multi-valued properties are not supported yet.
I18N for error message.
This is not a full reset yet (the case that property is changed after a value was set does not occur in the normal flow of things, hence this has low priority).
This documentation is out of date. Right now, the special interwiki is used only for special properties without a label, i.e., which cannot be shown to a user. This allows us to filter such cases from all queries that retrieve lists of properties. It should be checked that this is really the only use that this has throughout the code.
This method is neither efficient nor very convincing architecturally; it should be redesigned.
This method cannot retrieve subjects for sortkeys, i.e., for property _SKEY. Only empty arrays will be returned there.
Retrieving all sortkeys (values for _SKEY with $subject null) is not supported. An empty array will be given.
Currently the sortkey is not moved with the remaining data. It is not possible to move it reliably in all cases: we cannot distinguish an unset sortkey from one that was set to the name of oldtitle. Maybe use update jobs right away?
Clean up this code.
Rather parse input to obtain properly formatted HTML. - See Also
- DataValue::getLongHTMLText
Theparsing process can encounter many kinds of well-defined problems but uses only one error message. More detailed reporting should be done.
Try to reuse more of MediaWiki's records, e.g. to obtain month names or to format dates. The problem is that MW is based on SIO timestamps that don't extend to very ancient or future dates, and that MW uses PHP functions that are bound to UNIX time.
The preferred caption may not be suitable as a wiki value (i.e. not parsable). - See Also
- SMWDataValue::getLongHTMLText
This method in principle allows date parsing to be internationalized further. Should be done.
Rewrite using IndexPager
FIXME: This uses a rather odd syntax for the options, should it be converted to the standard "**<duration>|<displayname>" format? - Parameters
-
Language | null $lang The language to get the durations in, or null to use the wiki's content language
- Returns
- array
Should be in Block.php? - Parameters
-
string $par Subpage parameter passed to setup, or data value from the HTMLForm
WebRequest $request Optionally try and get data from a request too
- Returns
- array [ User|string|null, Block::TYPE_ constant|null ]
strtotime() only accepts English strings. This means the expiry input can only be specified in English.
FIXME: Almost the same as getSubTitle in SpecialDeletedContributions.php. Could be combined.
FIXME: This can lead to hitting memory limit for very large categories. Ideally we would do the lookup synchronously during the export in a single query.
if all versions of page A are moved to B and then a user tries to do a reverse-merge via the "unmerge" log link, then page A will still be a redirect (as it was after the original merge), though it will have the old revisions back from before (as expected). The user may have to "undo" the redirect manually to finish the "unmerge". Maybe this should delete redirects at the target page of merges?
give this test a real name explaining what is being tested here
The bolding needs to be fixed for regular expressions.
FIXME: Wikimedia-specific policy text
Mostly copied from Special:Undelete. Refactor. - Parameters
-
string $archiveName
- Exceptions
-
MWException
PermissionsError
What about non-BitmapHandler handled files? - Returns
- bool
Use some variant of Pager or something; the pagination here is lousy.
Is there some other way to check the data value directly for being the page title or not? SMWs behavior could change on mainlabel handling...
Split up megamoth
document, briefly.
caching support (APC/memcached) - Since
- 1.23
Fixme: Make this more generic
It would be nice if this were a non-static method of TestUser instead, but that doesn't seem possible without friends?
check if needed (used only in SpecialBrokenRedirects.php, and should use redirect table in this case).
FIXME: This does not check throttles (User::pingLimiter()).
move this to MovePage - Parameters
-
Title $nt Target title
- Returns
- array List of errors
Move this to a separate interface
This test method should be split up into separate test methods and data providers Title::checkActionPermissions
This test method should be split up into separate test methods and data providers Title::checkUserConfigPermissions
This test method should be split up into separate test methods and data providers Title::checkUserConfigPermissions
This test method should be split up into separate test methods and data providers Title::checkUserConfigPermissions
This test method should be split up into separate test methods and data providers Title::checkUserConfigPermissions
This test method should be split up into separate test methods and data providers Title::checkUserConfigPermissions
This test method should be split up into separate test methods and data providers Title::checkUserConfigPermissions
This test method should be split up into separate test methods and data providers Title::checkUserConfigPermissions
This test method should be split up into separate test methods and data providers Title::checkPageRestrictions
This test method should be split up into separate test methods and data providers Title::checkQuickPermissions
This test method should be split up into separate test methods and data providers Title::checkSpecialsAndNSPermissions
Handle $wgNamespacesWithSubpages cases provideSubpageTitleCases Title::getSubpageText
FIXME: No rotation support
: move to MW-specific factory class and inject temp dir - Returns
- UIDGenerator
FIXME: Use an instance of UncategorizedPagesPage or something
FIXME: Make $requestedNamespace selectable, unify all subclasses into one
Currently it doesn't really work in the repository role, there are lots of functions missing. It is used by the WebStore extension in the standalone role.
document
document
Replace this with a whitelist filter! - Parameters
-
string $element
array $attribs
array $data
- Returns
- bool
Return a status object to a closure in XmlTypeCheck, for MW1.21+
FIXME: Convert from UTF-16 if necessary!
Just make uploads work with storage paths UploadFromStash loads files via virtual URLs.
If it's a bitmap, make sure PHP or ImageMagick resp. can handle it!
Look into UnregisteredLocalFile and find out why the rv here is sometimes wrong (false when file was removed). For now, ignore.
give this test a real name explaining what is being tested here
Only rarely do all these fields need to be set!
Stop using this deprecated format
Stop using this deprecated format
Remove fixture from test class
Split up in separate tests
This test does not really test functionality of PHPUnit_Util_Test
Not sure what this test tests (name is misleading at least)
Need to integrate this into wfExpandUrl (see T34168)
handle punycode domains too
this won't work with current-path-relative URLs like "subdir/foo.html", etc.
Replace calls to wfGetDB with calls to LoadBalancer::getConnection() on an injected instance of LoadBalancer.
document
Move logic to MediaWiki.php
FIXME: Doesn't handle params like 'text/plain; charset=UTF-8' XXX: generalize to negotiate other stuff
Need to integrate this into wfExpandUrl (see T34168)
document
We can give more info than just the wiki id! - Parameters
-
string $wikiID Wiki'd id (generally database name)
- Returns
- string|int Wiki's name or $wiki_id if the wiki was not found
: If additional type parameters are present, ignore them cleanly. At present, they often confuse the result.
FIXME: Implement this a little better (seperate select/insert)?
Check if it should be true like parent class
Separate the business/permission stuff out from backend code
Remove $token parameter. Already verified by RollbackAction and ApiRollback.
Move this UI stuff somewhere else
The skin should check this and not offer section functionality if sections are not supported.
The EditPage should check this and not offer section functionality if sections are not supported.
In serious need of testing - See Also
- http://www.adobe.ge/devnet/xmp/pdfs/XMPSpecificationPart3.pdf XMP spec part 3 page 20
- Parameters
-
string $content XMPExtended block minus the namespace signature
- Returns
- bool If it succeeded.
This is based on what the standard says. Need to find a real world example file to double check the support for this is right.