Index: trunk/extensions/GlobalUsage/GlobalUsage.sql |
— | — | @@ -4,6 +4,7 @@ |
5 | 5 | -- page_id on the local wiki |
6 | 6 | gil_page int unsigned not null, |
7 | 7 | -- Namespace, since the foreign namespaces may not match the local ones |
| 8 | + gil_page_namespace_id int not null, |
8 | 9 | gil_page_namespace varchar(255) not null, |
9 | 10 | -- Page title |
10 | 11 | gil_page_title varchar(255) binary not null, |
Index: trunk/extensions/GlobalUsage/GlobalUsage.pg.sql |
— | — | @@ -1,6 +1,7 @@ |
2 | 2 | CREATE TABLE globalimagelinks ( |
3 | 3 | gil_wiki TEXT NOT NULL, |
4 | 4 | gil_page INTEGER NOT NULL, |
| 5 | + gil_page_namespace_id INTEGER NOT NULL, |
5 | 6 | gil_page_namespace TEXT NOT NULL, |
6 | 7 | gil_page_title TEXT NOT NULL, |
7 | 8 | gil_to TEXT NOT NULL, |
Index: trunk/extensions/GlobalUsage/GlobalUsage_body.php |
— | — | @@ -27,6 +27,7 @@ |
28 | 28 | $insert[] = array( |
29 | 29 | 'gil_wiki' => $this->interwiki, |
30 | 30 | 'gil_page' => $title->getArticleID( $pageIdFlags ), |
| 31 | + 'gil_page_namespace_id' => $title->getNamespace(), |
31 | 32 | 'gil_page_namespace' => $title->getNsText(), |
32 | 33 | 'gil_page_title' => $title->getDBkey(), |
33 | 34 | 'gil_to' => $name |
— | — | @@ -105,6 +106,7 @@ |
106 | 107 | $insert[] = array( |
107 | 108 | 'gil_wiki' => $this->interwiki, |
108 | 109 | 'gil_page' => $row->page_id, |
| 110 | + 'gil_page_namespace_id' => $row->page_namespace, |
109 | 111 | 'gil_page_namespace' => $wgContLang->getNsText( $row->page_namespace ), |
110 | 112 | 'gil_page_title' => $row->page_title, |
111 | 113 | 'gil_to' => $row->il_to, |
— | — | @@ -123,6 +125,7 @@ |
124 | 126 | $this->db->update( |
125 | 127 | 'globalimagelinks', |
126 | 128 | array( |
| 129 | + 'gil_page_namespace_id' => $title->getNamespace(), |
127 | 130 | 'gil_page_namespace' => $title->getNsText(), |
128 | 131 | 'gil_page_title' => $title->getText() |
129 | 132 | ), |