isRedirect() assumes that the LinkCache already contains
information about this title. If that is not the case, it
currently returns false, even though it just doesn't know
whether this link is a redirect.
The new check asserts the assumption that this title
is already known to the link cache.
Amend: use Exception instead of assert()
Change-Id: Id3ad2d4e140b270b1f5ca1f7af9b3320cffff5a2
some old page_restricions entries are move=:edit=,
which result in any empty string as level in the JS var
wgRestrictionEdit
Checking wgRestrictionEdit.length is than not possible
Change-Id: I250b4f9bda60361d4cd8c3139b17b299fec0a718
No idea why mysql_fetch_object() returns string when the field in defined as integer, but it is so on my machine...
Change-Id: I353c6087d20d7a72d6d4b39bdc477b094bc460f6
Title.php at line 4313:
array( 'wl_namespace' => $this->getNamespace(),
'wl_title' => $this->getDBkey(),
'wl_user' => $user->getId()
),
In UserMailer.php at line 438:
array(
'wl_title' => $title->getDBkey(),
'wl_namespace' => $title->getNamespace(),
'wl_user != ' . intval( $editor->getID() ),
'wl_notificationtimestamp IS NULL',
)
And line 455:
array( /* WHERE */
'wl_title' => $title->getDBkey(),
'wl_namespace' => $title->getNamespace(),
'wl_user' => $watchers
)
CREATE TABLE /*_*/watchlist (
-- Key to user.user_id
wl_user int unsigned NOT NULL,
-- Key to page_namespace/page_title
-- Note that users may watch pages which do not exist yet,
-- or existed in the past but have been deleted.
wl_namespace int NOT NULL default 0,
wl_title varchar(255) binary NOT NULL default '',
-- Timestamp when user was last sent a notification e-mail;
-- cleared when the user visits the page.
wl_notificationtimestamp varbinary(14)
) /*$wgDBTableOptions*/;
CREATE UNIQUE INDEX /*i*/wl_user ON /*_*/watchlist (wl_user, wl_namespace, wl_title);
CREATE INDEX /*i*/namespace_title ON /*_*/watchlist (wl_namespace, wl_title);
Change-Id: I633c009b4a1c614b966c69f042f94c2056e03784
LinkBatch can also give subpages to the GenderCache and therefor it is
easier to do it always in GenderCache, than in LinkBatch and Title
Add unit tests for GenderCache
Change-Id: Ia936ff8bb639a197b0b3a8e07c97a66edd57dd10
Means the evaluation of if ( is_array( $err ) ) { is always going to be false
Update the documentation
Change-Id: I0016495563e715a2a1927e227ec2bb5c80b5378b
Namespace existence has to be checked before calling Title::makeName() because otherwise it will fallback to a page with the same name, but in the main namespace which is not what we want here.
Change-Id: I8c087390044c54dd0502c1b8bb9321dfaec6b5f7
$query2 was used to pass a variant. Make that deprecated, the
recommanded way is to use an array as a first parameter. Ex:
$this->getLocalUrl( array( 'variant' => 'foo' ) );
Ping r105919
* WikiPage::$mCounter is now marked as protected
* Call WikiPage::loadPageData() from WikiPage::getCount() if the count is not set intead of loading the page_counter field only
Title objects are meant to be dumb value objects; we shouldn't add to their internal state like this, but should be working to remove the bits already in there like the article ID.
Preloading information like this can make sense, but probably belongs in WikiPage, not Title.
* Added Title::load() to factorise common code that load member variables instead of having each accessor doing it own loading system for its related member variable
* Removed usage of LinkCache::addLinkObj() to do the database query and do this directly in Title::load(). This allows to select the complete database row and populate all member variables; previously, requesting a field not stored in LinkCache (using getCount(), getTouched() or isNewPage()) results in two database query, one to load LinkCache data and the second to load the requested field; now there'll be only one query.
* Added Title::FIELD_IN_LINKCACHE and Title::FIELD_NOT_IN_LINKCACHE to specify whether the requested field is stored in LinkCache or not. LinkCache will be used if possible (i.e. Title::FIELD_IN_LINKCACHE is passed), otherwise a DB query to select the complete row is issued.
* Made Title::loadFromRow() save the row to LinkCache if possible.
* Added $wasFromMaster parameter to Title::loadFromRow() to tell that method whether the row was loaded from the master database or not and pass it from WikiPage::loadPageData()
* Added Title::GAID_USE_MASTER in addition to Title::GAID_FOR_UPDATE to get the row from the master database without having to do a SELECT FROM UPDATE query
* Added Title::selectFields() method to return the fields to select to given Title::loadFromRow() (and methods using it such as Title::newFromRow()) a complete row
* Made Title::$mCounter private since it has only been added recently (in r105790)
* Mark the object as loaded if Title::resetArticleID() is called with as new ID as 0