'site_stats',
array(
'ss_row_id' => 1,
- 'ss_total_views' => 0,
'ss_total_edits' => 0,
'ss_good_articles' => 0,
'ss_total_pages' => 0,
// 1.24
array( 'addField', 'page', 'page_lang', 'patch-page-page_lang.sql'),
+ array( 'dropTable', 'hitcounter' ),
+ array( 'dropField', 'site_stats', 'ss_total_views', 'patch-drop-ss_total_views.sql' ),
+ array( 'dropField', 'page', 'page_counter', 'patch-drop-page_counter.sql' ),
// Constraint updates
array( 'updateConstraints', 'category_types', 'categorylinks', 'cl_type' ),
array( 'updateConstraints', 'major_mime', 'filearchive', 'fa_major_mime' ),
'patch-oi_major_mime-chemical.sql' ),
array( 'modifyField', 'filearchive', 'fa_major_mime',
'patch-fa_major_mime-chemical.sql' ),
+ array( 'dropTable', 'hitcounter' ),
+ array( 'dropField', 'site_stats', 'ss_total_views', 'patch-drop-ss_total_views.sql' ),
+ array( 'dropField', 'page', 'page_counter', 'patch-drop-page_counter.sql' ),
);
}
page_namespace int NOT NULL,
page_title varchar(255) binary NOT NULL,
page_restrictions tinyblob NOT NULL,
- page_counter bigint(20) unsigned NOT NULL default '0',
page_is_redirect tinyint(1) unsigned NOT NULL default '0',
page_is_new tinyint(1) unsigned NOT NULL default '0',
page_random real unsigned NOT NULL,
$this->output( "......Setting up page table.\n" );
$this->db->query(
"INSERT INTO $page (page_id, page_namespace, page_title,
- page_restrictions, page_counter, page_is_redirect, page_is_new, page_random,
+ page_restrictions, page_is_redirect, page_is_new, page_random,
page_touched, page_latest, page_len)
- SELECT cur_id, cur_namespace, cur_title, cur_restrictions, cur_counter,
+ SELECT cur_id, cur_namespace, cur_title, cur_restrictions,
cur_is_redirect, cur_is_new, cur_random, cur_touched, rev_id, LENGTH(cur_text)
FROM $cur,$revision
WHERE cur_id=rev_page AND rev_timestamp=cur_timestamp AND rev_id > {$maxold}",
// 1.24
array( 'addField', 'page', 'page_lang', 'patch-page-page_lang.sql' ),
+ array( 'dropTable', 'hitcounter' ),
+ array( 'dropField', 'site_stats', 'ss_total_views', 'patch-drop-ss_total_views.sql' ),
+ array( 'dropField', 'page', 'page_counter', 'patch-drop-page_counter.sql' ),
// KEEP THIS AT THE BOTTOM!!
array( 'doRebuildDuplicateFunction' ),
'page_id' => 0,
'page_namespace' => 0,
'page_title' => ' ',
- 'page_counter' => 0,
'page_is_redirect' => 0,
'page_is_new' => 0,
'page_random' => 0,
array( 'addPgField', 'pagelinks', 'pl_from_namespace', 'INTEGER NOT NULL DEFAULT 0' ),
array( 'addPgField', 'templatelinks', 'tl_from_namespace', 'INTEGER NOT NULL DEFAULT 0' ),
array( 'addPgField', 'imagelinks', 'il_from_namespace', 'INTEGER NOT NULL DEFAULT 0' ),
+ array( 'dropTable', 'hitcounter' ),
+ array( 'dropField', 'site_stats', 'ss_total_views', 'patch-drop-ss_total_views.sql' ),
+ array( 'dropField', 'page', 'page_counter', 'patch-drop-page_counter.sql' ),
);
}
array( 'addField', 'pagelinks', 'pl_from_namespace', 'patch-pl_from_namespace.sql' ),
array( 'addField', 'templatelinks', 'tl_from_namespace', 'patch-tl_from_namespace.sql' ),
array( 'addField', 'imagelinks', 'il_from_namespace', 'patch-il_from_namespace.sql' ),
+ array( 'dropTable', 'hitcounter' ),
+ array( 'dropField', 'site_stats', 'ss_total_views', 'patch-drop-ss_total_views.sql' ),
+ array( 'dropField', 'page', 'page_counter', 'patch-drop-page_counter.sql' ),
);
}
$opts->add( 'hidetrans', false );
$opts->add( 'hidelinks', false );
$opts->add( 'hideimages', false );
+ $opts->add( 'invert', false );
$opts->fetchValuesFromRequest( $this->getRequest() );
$opts->validateIntBounds( 'limit', 0, 5000 );
$useLinkNamespaceDBFields = $this->getConfig()->get( 'UseLinkNamespaceDBFields' );
$namespace = $this->opts->getValue( 'namespace' );
+ $invert = $this->opts->getValue( 'invert' );
+ $nsComparison = ( $invert ? '!= ' : '= ' ) . $dbr->addQuotes( $namespace );
if ( is_int( $namespace ) ) {
if ( $useLinkNamespaceDBFields ) {
- $conds['pagelinks']['pl_from_namespace'] = $namespace;
- $conds['templatelinks']['tl_from_namespace'] = $namespace;
- $conds['imagelinks']['il_from_namespace'] = $namespace;
+ $conds['pagelinks'][] = "pl_from_namespace $nsComparison";
+ $conds['templatelinks'][] = "tl_from_namespace $nsComparison";
+ $conds['imagelinks'][] = "il_from_namespace $nsComparison";
} else {
- $conds['pagelinks']['page_namespace'] = $namespace;
- $conds['templatelinks']['page_namespace'] = $namespace;
- $conds['imagelinks']['page_namespace'] = $namespace;
+ $conds['pagelinks'][] = "page_namespace $nsComparison";
+ $conds['templatelinks'][] = "page_namespace $nsComparison";
+ $conds['imagelinks'][] = "page_namespace $nsComparison";
}
}
$target = $this->target ? $this->target->getPrefixedText() : '';
$namespace = $this->opts->consumeValue( 'namespace' );
+ $nsinvert = $this->opts->consumeValue( 'invert' );
# Build up the form
$f = Xml::openElement( 'form', array( 'action' => wfScript() ) );
)
);
+ $f .= ' ' .
+ Xml::checkLabel(
+ $this->msg( 'invert' )->text(),
+ 'invert',
+ 'nsinvert',
+ $nsinvert,
+ array( 'title' => $this->msg( 'tooltip-whatlinkshere-invert' )->text() )
+ );
+
$f .= ' ';
# Submit
"namespace": "Namespace:",
"invert": "Invert selection",
"tooltip-invert": "Check this box to hide changes to pages within the selected namespace (and the associated namespace if checked)",
+ "tooltip-whatlinkshere-invert": "Check this box to hide links from pages within the selected namespace.",
"namespace_association": "Associated namespace",
"tooltip-namespace_association": "Check this box to also include the talk or subject namespace associated with the selected namespace",
"blanknamespace": "(Main)",
"namespace": "This message is located at [[Special:Contributions]].\n{{Identical|Namespace}}",
"invert": "Displayed in [[Special:RecentChanges|RecentChanges]], [[Special:RecentChangesLinked|RecentChangesLinked]] and [[Special:Watchlist|Watchlist]].\n\nThis message means \"Invert selection of namespace\".\n\nThis message has a tooltip {{msg-mw|tooltip-invert}}\n{{Identical|Invert selection}}",
"tooltip-invert": "Used in [[Special:Recentchanges]] as a tooltip for the invert checkbox. See also the message {{msg-mw|invert}}",
+ "tooltip-whatlinkshere-invert": "Used in [[Special:Whatlinkshere]] as a tooltip for the invert checkbox.\n\nSee also:\n* {{msg-mw|tooltip-invert}}\n* {{msg-mw|invert}}",
"namespace_association": "Used in [[Special:Recentchanges]] with a checkbox which selects the associated namespace to be added to the selected namespace, so that both are searched (or excluded depending on another checkbox selection). The association is between a namespace and its talk namespace.\n\nThis message has a tooltip {{msg-mw|tooltip-namespace association}}",
"tooltip-namespace_association": "Used in [[Special:Recentchanges]] as a tooltip for the associated namespace checkbox.\n\nSee also:\n* {{msg-mw|Namespace association}}",
"blanknamespace": "Name for main namespace (blank namespace) in drop-down menus at [[Special:RecentChanges]] and other special pages.\n{{Identical|Main}}",
--- /dev/null
+-- field is deprecated and no longer updated as of 1.25
+ALTER TABLE /*_*/page DROP COLUMN page_counter;
--- /dev/null
+-- field is deprecated and no longer updated as of 1.24
+ALTER TABLE /*_*/site_stats DROP COLUMN ss_total_views;
\ No newline at end of file
historywarning
hit
hitcount
-hitcounter
hits
hlist
hmac
page_namespace INT NOT NULL,
page_title NVARCHAR(255) NOT NULL,
page_restrictions NVARCHAR(255) NOT NULL,
- page_counter BIGINT NOT NULL DEFAULT 0,
page_is_redirect BIT NOT NULL DEFAULT 0,
page_is_new BIT NOT NULL DEFAULT 0,
page_random real NOT NULL DEFAULT RAND(),
-- The single row should contain 1 here.
ss_row_id int NOT NULL,
- -- Total number of page views, if hit counters are enabled.
- ss_total_views bigint default 0,
-
-- Total number of edits performed.
ss_total_edits bigint default 0,
CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id);
---
--- Stores an ID for every time any article is visited;
--- depending on $wgHitcounterUpdateFreq, it is
--- periodically cleared and the page_counter column
--- in the page table updated for all the articles
--- that have been visited.)
---
-CREATE TABLE /*_*/hitcounter (
- hc_id int NOT NULL
-);
-
-
--
-- The internet is full of jerks, alas. Sometimes it's handy
-- to block a vandal or troll account.
page_namespace NUMBER DEFAULT 0 NOT NULL,
page_title VARCHAR2(255) NOT NULL,
page_restrictions VARCHAR2(255),
- page_counter NUMBER DEFAULT 0 NOT NULL,
page_is_redirect CHAR(1) DEFAULT '0' NOT NULL,
page_is_new CHAR(1) DEFAULT '0' NOT NULL,
page_random NUMBER(15,14) NOT NULL,
CREATE TABLE &mw_prefix.site_stats (
ss_row_id NUMBER NOT NULL ,
- ss_total_views NUMBER DEFAULT 0,
ss_total_edits NUMBER DEFAULT 0,
ss_good_articles NUMBER DEFAULT 0,
ss_total_pages NUMBER DEFAULT -1,
);
CREATE UNIQUE INDEX &mw_prefix.site_stats_u01 ON &mw_prefix.site_stats (ss_row_id);
-CREATE TABLE &mw_prefix.hitcounter (
- hc_id NUMBER NOT NULL
-);
-
CREATE SEQUENCE ipblocks_ipb_id_seq;
CREATE TABLE &mw_prefix.ipblocks (
ipb_id NUMBER NOT NULL,
ss_good_articles bigint INTEGER
ss_total_edits bigint INTEGER
ss_total_pages bigint INTEGER
-ss_total_views bigint INTEGER
ss_users bigint INTEGER
## True IP - keep an eye on these, coders tend to make textual assumptions
page_namespace SMALLINT NOT NULL,
page_title TEXT NOT NULL,
page_restrictions TEXT,
- page_counter BIGINT NOT NULL DEFAULT 0,
page_is_redirect SMALLINT NOT NULL DEFAULT 0,
page_is_new SMALLINT NOT NULL DEFAULT 0,
page_random NUMERIC(15,14) NOT NULL DEFAULT RANDOM(),
CREATE TABLE site_stats (
ss_row_id INTEGER NOT NULL UNIQUE,
- ss_total_views INTEGER DEFAULT 0,
ss_total_edits INTEGER DEFAULT 0,
ss_good_articles INTEGER DEFAULT 0,
ss_total_pages INTEGER DEFAULT -1,
ss_images INTEGER DEFAULT 0
);
-CREATE TABLE hitcounter (
- hc_id BIGINT NOT NULL
-);
-
CREATE SEQUENCE ipblocks_ipb_id_seq;
CREATE TABLE ipblocks (
page_namespace int NOT NULL,
page_title varchar(255) binary NOT NULL,
page_restrictions tinyblob NOT NULL,
- page_counter bigint unsigned NOT NULL default 0,
page_is_redirect tinyint unsigned NOT NULL default 0,
page_is_new tinyint unsigned NOT NULL default 0,
page_random real unsigned NOT NULL,
CREATE TABLE /*_*/site_stats_tmp (
ss_row_id int unsigned NOT NULL,
- ss_total_views bigint unsigned default 0,
ss_total_edits bigint unsigned default 0,
ss_good_articles bigint unsigned default 0,
ss_total_pages bigint default '-1',
--- /dev/null
+-- field is deprecated and no longer updated as of 1.25
+CREATE TABLE /*_*/page_tmp (
+ page_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ page_namespace int NOT NULL,
+ page_title varchar(255) binary NOT NULL,
+ page_restrictions tinyblob NOT NULL,
+ page_is_redirect tinyint unsigned NOT NULL default 0,
+ page_is_new tinyint unsigned NOT NULL default 0,
+ page_random real unsigned NOT NULL,
+ page_touched binary(14) NOT NULL default '',
+ page_links_updated varbinary(14) NULL default NULL,
+ page_latest int unsigned NOT NULL,
+ page_len int unsigned NOT NULL,
+ page_content_model varbinary(32) DEFAULT NULL,
+ page_lang varbinary(35) DEFAULT NULL
+) /*$wgDBTableOptions*/;
+
+INSERT INTO /*_*/page_tmp
+ SELECT page_id, page_namespace, page_title, page_restrictions, page_is_redirect,
+ page_is_new, page_random, page_touched, page_links_updated, page_latest, page_len,
+ page_content_model, page_lang
+ FROM /*_*/page;
+
+DROP TABLE /*_*/page;
+
+ALTER TABLE /*_*/page_tmp RENAME TO /*_*/page;
+
+CREATE UNIQUE INDEX /*i*/name_title ON /*_*/page (page_namespace,page_title);
+CREATE INDEX /*i*/page_random ON /*_*/page (page_random);
+CREATE INDEX /*i*/page_len ON /*_*/page (page_len);
+CREATE INDEX /*i*/page_redirect_namespace_len ON /*_*/page (page_is_redirect, page_namespace, page_len);
-- field is deprecated and no longer updated as of 1.5
CREATE TABLE /*_*/site_stats_tmp (
ss_row_id int unsigned NOT NULL,
- ss_total_views bigint unsigned default 0,
ss_total_edits bigint unsigned default 0,
ss_good_articles bigint unsigned default 0,
ss_total_pages bigint default '-1',
) /*$wgDBTableOptions*/;
INSERT INTO /*_*/site_stats_tmp
- SELECT ss_row_id, ss_total_views, ss_total_edits, ss_good_articles,
+ SELECT ss_row_id, ss_total_edits, ss_good_articles,
ss_total_pages, ss_users, ss_active_users, ss_images
FROM /*_*/site_stats;
--- /dev/null
+-- field is deprecated and no longer updated as of 1.25
+CREATE TABLE /*_*/site_stats_tmp (
+ ss_row_id int unsigned NOT NULL,
+ ss_total_edits bigint unsigned default 0,
+ ss_good_articles bigint unsigned default 0,
+ ss_total_pages bigint default '-1',
+ ss_users bigint default '-1',
+ ss_active_users bigint default '-1',
+ ss_images int default 0
+) /*$wgDBTableOptions*/;
+
+INSERT INTO /*_*/site_stats_tmp
+ SELECT ss_row_id, ss_total_edits, ss_good_articles, ss_total_pages,
+ ss_users, ss_active_users, ss_images
+ FROM /*_*/site_stats;
+
+DROP TABLE /*_*/site_stats;
+
+ALTER TABLE /*_*/site_stats_tmp RENAME TO /*_*/site_stats;
+
+CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id);
-- can move or edit the page.
page_restrictions tinyblob NOT NULL,
- -- Number of times this page has been viewed.
- page_counter bigint unsigned NOT NULL default 0,
-
-- 1 indicates the article is a redirect.
page_is_redirect tinyint unsigned NOT NULL default 0,
-- The single row should contain 1 here.
ss_row_id int unsigned NOT NULL,
- -- Total number of page views, if hit counters are enabled.
- ss_total_views bigint unsigned default 0,
-
-- Total number of edits performed.
ss_total_edits bigint unsigned default 0,
-- Pointless index to assuage developer superstitions
CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id);
-
---
--- Stores an ID for every time any article is visited;
--- depending on $wgHitcounterUpdateFreq, it is
--- periodically cleared and the page_counter column
--- in the page table updated for all the articles
--- that have been visited.)
---
-CREATE TABLE /*_*/hitcounter (
- hc_id int unsigned NOT NULL
-) ENGINE=MEMORY MAX_ROWS=25000;
-
-
--
-- The internet is full of jerks, alas. Sometimes it's handy
-- to block a vandal or troll account.