Make ::setCategory() consistent with the corresponding singular method,
which is ::addCategory(), not ::addCategoryLink(). Also, don't return
a value.
This renaming is in preparation for factoring out a write-only base
class from ParserOutput suitable to be used by Parsoid.
Note that OutputPage does distinguish a 'category link' from a
'category list', and there are separate OutputPage::getCategories()
and OutputPage::getCategoryLinks() methods. However, the category
map in ParserOutput isn't exactly the same as either of these:
it's actually a map (or list of pairs) of category name to sort key.
Rename ParserOutput::getCategoryLinks() to ::getCategoryNames()
in order to clarify that the concept involved is not the same as
the OutputPage "category links" methods.
Code search:
https://codesearch.wmcloud.org/deployed/?q=-%3E(get%7Cset)CategoryLinks%5C(&i=nope&files=&excludeFiles=&repos=
(Note that many of the code search matches are for the methods in
OutputPage, which we are trying to disambiguate here.)
Bug: T287216
Change-Id: Idb383d3d9ef7b76f8a0208a057a3cb8c639465c9
The non-strict conditions in if/while are true/false without the check.
In some situation the true/false is removed, because it is known to be a
bool (by is_bool check or type hint)
Change-Id: I5ca4c4771af25d2e785e82732df204a73653886e
Each files' changes can be reviewed independently
There may be places in the files that I didn't catch -
this is not meant to be an exhaustive replacement
Even where it may make sense to use Html::element,
Html::rawElement is used in this patch to avoid changing
any behavior.
Change-Id: I26eaacc65106f10a5066c31d82f6594a59ff1281
Replace deprecated Language::convertNamespace
Necessary services in SpecialSearch already injected
Explicit pass content language to existing call to make different more
visible between both calls
Bug: T252095
Change-Id: I4d4bd6e1246e57d952b73cb99a4a129028d7ff5b
Added to the release notes as a breaking change,
no deprecation period because there are no known
uses anywhere on codesearch
Bug: T248215
Change-Id: If7368ffdd09ab69f7a40501ef9d8a90660db7f58
Updates for the removal of the Revision class itself
and the various methods/hooks/variables removed in the
process, including:
- Update some documentation removing most references
to the Revision class and updating the MCR migration
notes to reflect the past tense for Revision methods.
- Change some capitalization from "Revision" to "revision"
to make it clear comments are about revisions in general,
not the Revision class in particular.
- Minor code tweaks including removing unused variables that
were around for the old hooks that were removed, and
removing the use of DeprecatablePropertyArray where no
longer needed for anything.
- Fix incorrect documentation for PageUpdater::getStatus(),
the status value changed a while ago to have revision-record
in addition to revision, and recently to only have the
revision-record, but ironically PageUpdater was never updated.
- Removed Parser::$mRevisionObject, used to be a Revision object
and was deprecated in 1.35, missed earlier because it was no
longer being set to Revision objects, always null.
- Add RevisionRecord typehints in DummyLinker to match those
in the corresponding Linker methods
This should be a no-op in terms of functionality.
Bug: T247143
Change-Id: I03bbb94fc29085855448780b1a5ad9063911ecc4
… including PHPDoc tags like `@return <type> $variableName`.
A return value doesn't have a variable name. I can see that
some people do this intentionally, repeating the variable
name that was used in the final `return $var;` at the end
of a method. This can indeed be helpful. I leave a lot of
these untouched and removed them only when it's obviously
wrong, or does not provide any additional information in
addition to what the code already says.
Change-Id: Ia18cd9f25ef658b08ad25b97a744897e2a8deffc
As of now, an input like "[" that contains nothing but invalid
characters behaves odd: The prefixsearch API returns the entire
database, alphabetically ordered.
This behavior exists ever since this code was introduced in
Iaffe30a (2014).
While this might be used as a "feature", I really don't think it
is intentional:
* The way the code is arranged executes an SQL query with a
pointless `LIKE '%'` that doesn't do anything but possibly
wasting CPU resources. This doesn't look intentional.
* There are much better APIs when you really want to list all
pages.
* I would expect an input like "*", "%", or "" to return all
pages. But neither of these inputs does this. Only some very
strange inputs like "[" do.
* I would argue that "[" should behave the same as "", i.e. as
if no useful input is given.
* Since I877297f (2020) we normalize e.g. "[[foo]]" to "foo",
for convenience. Since then such an input works as expected,
instead of returning the entire database. This leaves titles
that contain nothing but invalid characters as the only
edge-case.
Change-Id: Ib2cbf315ed7c3736391362be6d69599c58e690db
This is micro-optimization of closure code to avoid binding the closure
to $this where it is not needed.
Created by I25a17fb22b6b669e817317a0f45051ae9c608208
Change-Id: I0ffc6200f6c6693d78a3151cb8cea7dce7c21653
- Remove or clarify ancient comments referencing MySQL 4.
- Oracle can't afford to host small HTML files for longer than two
years, as such they make a point to break their URLs after a while.
Update our references to the last 5.x release for now, where the same
information resides (instead 404 or redirect to MySQL 8 docs).
Bug: T34217
Change-Id: I322cc8936f96c2545c63e7c9c1f5fa241e2b8c18
For MySQL/Sqlite, drop the table options, they are for MySQL < 5.0 which
was released in 2003 and not any use today.
For Postgres, rename pagecontent table to text, approved as part of the
RFC. Swap order of creating auto-generated tables and manual tables.
Bug: T230428
Bug: T164898
Change-Id: Id7510b80beed7a7297353094a57d5e2d4f12fc64
Search suggestions are picked from the main namespace only,
with this change pages from other namespaces such as Category:
can also be suggested when prefixing searches with a namespace
Bug: T213842
Change-Id: Ia4bd36efaca4595815c676ad1985e8a80c054471
This includes fixing some mistakes, as well as removing
redundant text that doesn't add new information, either because
it literally repeats what the code already says, or is actually
duplicated.
Change-Id: I3a8dd8ce57192deda8916cc444c87d7ab1a36515