Index: branches/wmf-deployment/extensions/GlobalUsage/GlobalUsageHooks.php |
— | — | @@ -1,22 +1,40 @@ |
2 | 2 | <?php |
3 | 3 | class GlobalUsageHooks { |
4 | 4 | private static $gu = null; |
5 | | - |
| 5 | + |
6 | 6 | /** |
7 | 7 | * Hook to LinksUpdateComplete |
8 | 8 | * Deletes old links from usage table and insert new ones. |
9 | 9 | */ |
10 | 10 | public static function onLinksUpdateComplete( $linksUpdater ) { |
11 | 11 | $title = $linksUpdater->getTitle(); |
12 | | - |
| 12 | + |
13 | 13 | // Create a list of locally existing images |
14 | 14 | $images = array_keys( $linksUpdater->getImages() ); |
15 | 15 | $localFiles = array_keys( RepoGroup::singleton()->getLocalRepo()->findFiles( $images ) ); |
16 | | - |
| 16 | + $missingFiles = array_diff( $images, $localFiles ); |
| 17 | + |
| 18 | + global $wgUseDumbLinkUpdate; |
17 | 19 | $gu = self::getGlobalUsage(); |
18 | | - $gu->deleteFrom( $title->getArticleId( GAID_FOR_UPDATE ) ); |
19 | | - $gu->setUsage( $title, array_diff( $images, $localFiles ) ); |
20 | | - |
| 20 | + if ( $wgUseDumbLinkUpdate ) { |
| 21 | + // Delete all entries to the page |
| 22 | + $gu->deleteLinksFromPage( $title->getArticleId( GAID_FOR_UPDATE ) ); |
| 23 | + // Re-insert new usage for the page |
| 24 | + $gu->insertLinks( $title, $missingFiles ); |
| 25 | + } else { |
| 26 | + $articleId = $title->getArticleId( GAID_FOR_UPDATE ); |
| 27 | + $existing = $gu->getLinksFromPage( $articleId ); |
| 28 | + |
| 29 | + // Calculate changes |
| 30 | + $added = array_diff( $missingFiles, $existing ); |
| 31 | + $removed = array_diff( $existing, $missingFiles ); |
| 32 | + |
| 33 | + // Add new usages and delete removed |
| 34 | + $gu->insertLinks( $title, $added ); |
| 35 | + if ( $removed ) |
| 36 | + $gu->deleteLinksFromPage( $articleId, $removed ); |
| 37 | + } |
| 38 | + |
21 | 39 | return true; |
22 | 40 | } |
23 | 41 | /** |
— | — | @@ -36,9 +54,9 @@ |
37 | 55 | public static function onArticleDeleteComplete( $article, $user, $reason, $id ) { |
38 | 56 | $title = $article->getTitle(); |
39 | 57 | $gu = self::getGlobalUsage(); |
40 | | - $gu->deleteFrom( $id ); |
| 58 | + $gu->deleteLinksFromPage( $id ); |
41 | 59 | if ( $title->getNamespace() == NS_FILE ) { |
42 | | - $gu->copyFromLocal( $title ); |
| 60 | + $gu->copyLocalImagelinks( $title ); |
43 | 61 | } |
44 | 62 | return true; |
45 | 63 | } |
— | — | @@ -47,9 +65,9 @@ |
48 | 66 | * Hook to FileUndeleteComplete |
49 | 67 | * Deletes the file from the global link table. |
50 | 68 | */ |
51 | | - public static function onFileUndeleteComplete( $title, $versions, $user, $reason ) { |
| 69 | + public static function onFileUndeleteComplete( $title, $versions, $user, $reason ) { |
52 | 70 | $gu = self::getGlobalUsage(); |
53 | | - $gu->deleteTo( $title ); |
| 71 | + $gu->deleteLinksToFile( $title ); |
54 | 72 | return true; |
55 | 73 | } |
56 | 74 | /** |
— | — | @@ -58,23 +76,22 @@ |
59 | 77 | */ |
60 | 78 | public static function onUploadComplete( $upload ) { |
61 | 79 | $gu = self::getGlobalUsage(); |
62 | | - $gu->deleteTo( $upload->getTitle() ); |
| 80 | + $gu->deleteLinksToFile( $upload->getTitle() ); |
63 | 81 | return true; |
64 | 82 | } |
65 | | - |
| 83 | + |
66 | 84 | /** |
67 | 85 | * Initializes a GlobalUsage object for the current wiki. |
68 | 86 | */ |
69 | 87 | private static function getGlobalUsage() { |
70 | 88 | global $wgGlobalUsageDatabase; |
71 | 89 | if ( is_null( self::$gu ) ) { |
72 | | - self::$gu = new GlobalUsage( wfWikiId(), |
73 | | - wfGetDB( DB_MASTER, array(), $wgGlobalUsageDatabase ) |
| 90 | + self::$gu = new GlobalUsage( wfWikiId(), |
| 91 | + wfGetDB( DB_MASTER, array(), $wgGlobalUsageDatabase ) |
74 | 92 | ); |
75 | 93 | } |
76 | | - |
| 94 | + |
77 | 95 | return self::$gu; |
78 | 96 | } |
79 | | - |
80 | 97 | |
81 | 98 | } |
\ No newline at end of file |
Index: branches/wmf-deployment/extensions/GlobalUsage/GlobalUsageQuery.php |
— | — | @@ -0,0 +1,163 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * A helper class to query the globalimagelinks table |
| 5 | + * |
| 6 | + * Should maybe simply resort to offset/limit query rather |
| 7 | + */ |
| 8 | +class GlobalUsageQuery { |
| 9 | + private $limit = 50; |
| 10 | + private $offset = 0; |
| 11 | + private $hasMore = false; |
| 12 | + private $filterLocal = false; |
| 13 | + private $result; |
| 14 | + private $continue; |
| 15 | + |
| 16 | + |
| 17 | + public function __construct( $target ) { |
| 18 | + global $wgGlobalUsageDatabase; |
| 19 | + $this->db = wfGetDB( DB_SLAVE, array(), $wgGlobalUsageDatabase ); |
| 20 | + if ( $target instanceof Title ) |
| 21 | + $this->target = $target->getDBKey(); |
| 22 | + else |
| 23 | + $this->target = $target; |
| 24 | + $this->offset = array( '', '', '' ); |
| 25 | + |
| 26 | + } |
| 27 | + |
| 28 | + /** |
| 29 | + * Set the offset parameter |
| 30 | + * |
| 31 | + * @param $offset int offset |
| 32 | + */ |
| 33 | + public function setOffset( $offset ) { |
| 34 | + if ( !is_array( $offset ) ) |
| 35 | + $offset = explode( '|', $offset ); |
| 36 | + |
| 37 | + if ( count( $offset ) == 3 ) { |
| 38 | + $this->offset = $offset; |
| 39 | + return true; |
| 40 | + } else { |
| 41 | + return false; |
| 42 | + } |
| 43 | + } |
| 44 | + /** |
| 45 | + * Return the offset set by the user |
| 46 | + * |
| 47 | + * @return array offset |
| 48 | + */ |
| 49 | + public function getOffsetString() { |
| 50 | + return implode( '|', $this->offset ); |
| 51 | + } |
| 52 | + /** |
| 53 | + * |
| 54 | + */ |
| 55 | + public function getContinueString() { |
| 56 | + return "{$this->lastRow->gil_to}|{$this->lastRow->gil_wiki}|{$this->lastRow->gil_page}"; |
| 57 | + } |
| 58 | + |
| 59 | + /** |
| 60 | + * Set the maximum amount of items to return. Capped at 500. |
| 61 | + * |
| 62 | + * @param $limit int The limit |
| 63 | + */ |
| 64 | + public function setLimit( $limit ) { |
| 65 | + $this->limit = min( $limit, 500 ); |
| 66 | + } |
| 67 | + public function getLimit() { |
| 68 | + return $this->limit; |
| 69 | + } |
| 70 | + |
| 71 | + /** |
| 72 | + * Set whether to filter out the local usage |
| 73 | + */ |
| 74 | + public function filterLocal( $value = true ) { |
| 75 | + $this->filterLocal = $value; |
| 76 | + } |
| 77 | + |
| 78 | + |
| 79 | + /** |
| 80 | + * Executes the query |
| 81 | + */ |
| 82 | + public function execute() { |
| 83 | + $where = array( 'gil_to' => $this->target ); |
| 84 | + if ( $this->filterLocal ) |
| 85 | + $where[] = 'gil_wiki != ' . $this->db->addQuotes( wfWikiId() ); |
| 86 | + |
| 87 | + $qTo = $this->db->addQuotes( $this->offset[0] ); |
| 88 | + $qWiki = $this->db->addQuotes( $this->offset[1] ); |
| 89 | + $qPage = intval( $this->offset[2] ); |
| 90 | + |
| 91 | + $where[] = "(gil_to > $qTo) OR " . |
| 92 | + "(gil_to = $qTo AND gil_wiki > $qWiki) OR " . |
| 93 | + "(gil_to = $qTo AND gil_wiki = $qWiki AND gil_page >= $qPage )"; |
| 94 | + |
| 95 | + |
| 96 | + $res = $this->db->select( 'globalimagelinks', |
| 97 | + array( |
| 98 | + 'gil_to', |
| 99 | + 'gil_wiki', |
| 100 | + 'gil_page', |
| 101 | + 'gil_page_namespace', |
| 102 | + 'gil_page_title' |
| 103 | + ), |
| 104 | + $where, |
| 105 | + __METHOD__, |
| 106 | + array( |
| 107 | + 'ORDER BY' => 'gil_to, gil_wiki, gil_page', |
| 108 | + 'LIMIT' => $this->limit + 1, |
| 109 | + ) |
| 110 | + ); |
| 111 | + |
| 112 | + $count = 0; |
| 113 | + $this->hasMore = false; |
| 114 | + $this->result = array(); |
| 115 | + foreach ( $res as $row ) { |
| 116 | + $count++; |
| 117 | + if ( $count > $this->limit ) { |
| 118 | + $this->hasMore = true; |
| 119 | + $this->lastRow = $row; |
| 120 | + break; |
| 121 | + } |
| 122 | + |
| 123 | + if ( !isset( $this->result[$row->gil_to] ) ) |
| 124 | + $this->result[$row->gil_to] = array(); |
| 125 | + if ( !isset( $this->result[$row->gil_to][$row->gil_wiki] ) ) |
| 126 | + $this->result[$row->gil_to][$row->gil_wiki] = array(); |
| 127 | + |
| 128 | + $this->result[$row->gil_to][$row->gil_wiki][] = array( |
| 129 | + 'image' => $row->gil_to, |
| 130 | + 'id' => $row->gil_page, |
| 131 | + 'namespace' => $row->gil_page_namespace, |
| 132 | + 'title' => $row->gil_page_title, |
| 133 | + 'wiki' => $row->gil_wiki, |
| 134 | + ); |
| 135 | + } |
| 136 | + } |
| 137 | + public function getResult() { |
| 138 | + return $this->result; |
| 139 | + } |
| 140 | + public function getSingleImageResult() { |
| 141 | + if ( $this->result ) |
| 142 | + return current( $this->result ); |
| 143 | + else |
| 144 | + return array(); |
| 145 | + } |
| 146 | + |
| 147 | + /** |
| 148 | + * Returns whether there are more results |
| 149 | + * |
| 150 | + * @return bool |
| 151 | + */ |
| 152 | + public function hasMore() { |
| 153 | + return $this->hasMore; |
| 154 | + } |
| 155 | + |
| 156 | + /** |
| 157 | + * Returns the result length |
| 158 | + * |
| 159 | + * @return int |
| 160 | + */ |
| 161 | + public function count() { |
| 162 | + return count( $this->result ); |
| 163 | + } |
| 164 | +} |
Property changes on: branches/wmf-deployment/extensions/GlobalUsage/GlobalUsageQuery.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 165 | + native |
Index: branches/wmf-deployment/extensions/GlobalUsage/GlobalUsage.sql |
— | — | @@ -1,20 +1,19 @@ |
2 | | -CREATE TABLE /*$wgDBprefix*/globalimagelinks ( |
| 2 | +CREATE TABLE /*_*/globalimagelinks ( |
3 | 3 | -- Wiki id |
4 | 4 | gil_wiki varchar(32) not null, |
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 | | - gil_page_title varchar(255) not null, |
| 11 | + gil_page_title varchar(255) binary not null, |
11 | 12 | -- Image name |
12 | | - gil_to varchar(255) not null, |
13 | | - |
14 | | - |
15 | | - -- Note: You might want to shorten the gil_wiki part of the indices. |
16 | | - -- If the domain format is used, only the "en.wikip" part is needed for an |
17 | | - -- unique lookup |
18 | | - |
19 | | - PRIMARY KEY (gil_to, gil_wiki, gil_page), |
20 | | - INDEX (gil_wiki, gil_page) |
| 13 | + gil_to varchar(255) binary not null |
21 | 14 | ) /*$wgDBTableOptions*/; |
| 15 | + |
| 16 | +CREATE UNIQUE INDEX globalimagelinks_to_wiki_page |
| 17 | + ON /*_*/globalimagelinks (gil_to, gil_wiki, gil_page); |
| 18 | +CREATE INDEX globalimagelinks_wiki |
| 19 | + ON /*_*/globalimagelinks (gil_wiki, gil_page); |
| 20 | + |
Index: branches/wmf-deployment/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: branches/wmf-deployment/extensions/GlobalUsage/GlobalUsage_body.php |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | |
8 | 8 | /** |
9 | 9 | * Construct a GlobalUsage instance for a certain wiki. |
10 | | - * |
| 10 | + * |
11 | 11 | * @param $interwiki string Interwiki prefix of the wiki |
12 | 12 | * @param $db mixed Database object |
13 | 13 | */ |
— | — | @@ -14,19 +14,20 @@ |
15 | 15 | $this->interwiki = $interwiki; |
16 | 16 | $this->db = $db; |
17 | 17 | } |
18 | | - |
| 18 | + |
19 | 19 | /** |
20 | 20 | * Sets the images used by a certain page |
21 | | - * |
| 21 | + * |
22 | 22 | * @param $title Title Title of the page |
23 | 23 | * @param $images array Array of db keys of images used |
24 | 24 | */ |
25 | | - public function setUsage( $title, $images, $pageIdFlags = GAID_FOR_UPDATE ) { |
| 25 | + public function insertLinks( $title, $images, $pageIdFlags = GAID_FOR_UPDATE ) { |
26 | 26 | $insert = array(); |
27 | 27 | foreach ( $images as $name ) { |
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 |
— | — | @@ -35,26 +36,46 @@ |
36 | 37 | $this->db->insert( 'globalimagelinks', $insert, __METHOD__ ); |
37 | 38 | } |
38 | 39 | /** |
39 | | - * Deletes all entries from a certain page |
40 | | - * |
41 | | - * @param $id int Page id of the page |
| 40 | + * Get all global images from a certain page |
42 | 41 | */ |
43 | | - public function deleteFrom( $id ) { |
44 | | - $this->db->delete( |
45 | | - 'globalimagelinks', |
| 42 | + public function getLinksFromPage( $id ) { |
| 43 | + $res = $this->db->select( |
| 44 | + 'globalimagelinks', |
| 45 | + 'gil_to', |
46 | 46 | array( |
47 | 47 | 'gil_wiki' => $this->interwiki, |
48 | | - 'gil_page' => $id |
| 48 | + 'gil_page' => $id, |
49 | 49 | ), |
50 | | - __METHOD__ |
| 50 | + __METHOD__ |
51 | 51 | ); |
| 52 | + |
| 53 | + $images = array(); |
| 54 | + foreach ( $res as $row ) |
| 55 | + $images[] = $row->gil_to; |
| 56 | + return $images; |
52 | 57 | } |
53 | 58 | /** |
| 59 | + * Deletes all entries from a certain page to certain files |
| 60 | + * |
| 61 | + * @param $id int Page id of the page |
| 62 | + * @param $to mixed File name(s) |
| 63 | + */ |
| 64 | + public function deleteLinksFromPage( $id, $to = null ) { |
| 65 | + $where = array( |
| 66 | + 'gil_wiki' => $this->interwiki, |
| 67 | + 'gil_page' => $id |
| 68 | + ); |
| 69 | + if ( $to ) { |
| 70 | + $where['gil_to'] = $to; |
| 71 | + } |
| 72 | + $this->db->delete( 'globalimagelinks', $where, __METHOD__ ); |
| 73 | + } |
| 74 | + /** |
54 | 75 | * Deletes all entries to a certain image |
55 | | - * |
| 76 | + * |
56 | 77 | * @param $title Title Title of the file |
57 | 78 | */ |
58 | | - public function deleteTo( $title ) { |
| 79 | + public function deleteLinksToFile( $title ) { |
59 | 80 | $this->db->delete( |
60 | 81 | 'globalimagelinks', |
61 | 82 | array( |
— | — | @@ -62,20 +83,20 @@ |
63 | 84 | 'gil_to' => $title->getDBkey() |
64 | 85 | ), |
65 | 86 | __METHOD__ |
66 | | - ); |
| 87 | + ); |
67 | 88 | } |
68 | | - |
| 89 | + |
69 | 90 | /** |
70 | 91 | * Copy local links to global table |
71 | | - * |
| 92 | + * |
72 | 93 | * @param $title Title Title of the file to copy entries from. |
73 | 94 | */ |
74 | | - public function copyFromLocal( $title ) { |
| 95 | + public function copyLocalImagelinks( $title ) { |
75 | 96 | global $wgContLang; |
76 | | - |
| 97 | + |
77 | 98 | $dbr = wfGetDB( DB_SLAVE ); |
78 | | - $res = $dbr->select( |
79 | | - array( 'imagelinks', 'page' ), |
| 99 | + $res = $dbr->select( |
| 100 | + array( 'imagelinks', 'page' ), |
80 | 101 | array( 'il_to', 'page_id', 'page_namespace', 'page_title' ), |
81 | 102 | array( 'il_from = page_id', 'il_to' => $title->getDBkey() ), |
82 | 103 | __METHOD__ |
— | — | @@ -85,6 +106,7 @@ |
86 | 107 | $insert[] = array( |
87 | 108 | 'gil_wiki' => $this->interwiki, |
88 | 109 | 'gil_page' => $row->page_id, |
| 110 | + 'gil_page_namespace_id' => $row->page_namespace, |
89 | 111 | 'gil_page_namespace' => $wgContLang->getNsText( $row->page_namespace ), |
90 | 112 | 'gil_page_title' => $row->page_title, |
91 | 113 | 'gil_to' => $row->il_to, |
— | — | @@ -92,7 +114,7 @@ |
93 | 115 | } |
94 | 116 | $this->db->insert( 'globalimagelinks', $insert, __METHOD__ ); |
95 | 117 | } |
96 | | - |
| 118 | + |
97 | 119 | /** |
98 | 120 | * Changes the page title |
99 | 121 | * |
— | — | @@ -102,7 +124,8 @@ |
103 | 125 | public function moveTo( $id, $title ) { |
104 | 126 | $this->db->update( |
105 | 127 | 'globalimagelinks', |
106 | | - array( |
| 128 | + array( |
| 129 | + 'gil_page_namespace_id' => $title->getNamespace(), |
107 | 130 | 'gil_page_namespace' => $title->getNsText(), |
108 | 131 | 'gil_page_title' => $title->getText() |
109 | 132 | ), |
— | — | @@ -113,9 +136,4 @@ |
114 | 137 | __METHOD__ |
115 | 138 | ); |
116 | 139 | } |
117 | | - |
118 | | - |
119 | | - |
120 | | - |
121 | | - |
122 | 140 | } |
Index: branches/wmf-deployment/extensions/GlobalUsage/GlobalUsage.i18n.php |
— | — | @@ -16,7 +16,8 @@ |
17 | 17 | 'globalusage-desc' => '[[Special:GlobalUsage|Special page]] to view global file usage', |
18 | 18 | 'globalusage-ok' => 'Search', |
19 | 19 | 'globalusage-text' => 'Search global file usage', |
20 | | - 'globalusage-on-wiki' => 'Usage of [[:File:$1|$1]] on $2', |
| 20 | + 'globalusage-no-results' => '[[:$1]] is not used on other wikis.', |
| 21 | + 'globalusage-on-wiki' => 'Usage on $2', |
21 | 22 | 'globalusage-of-file' => 'The following other wikis use this file:', |
22 | 23 | 'globalusage-more' => 'View [[{{#Special:GlobalUsage}}/$1|more global usage]] of this file.', |
23 | 24 | 'globalusage-filterlocal' => 'Do not show local usage', |
— | — | @@ -24,11 +25,30 @@ |
25 | 26 | |
26 | 27 | /** Message documentation (Message documentation) |
27 | 28 | * @author Jon Harald Søby |
| 29 | + * @author Nghtwlkr |
28 | 30 | * @author Purodha |
| 31 | + * @author Raymond |
| 32 | + * @author Umherirrender |
| 33 | + * @author Vriullop |
29 | 34 | */ |
30 | 35 | $messages['qqq'] = array( |
| 36 | + 'globalusage-for' => 'Tittel på [[Special:GlobalUsage]] |
| 37 | +* $1 - navn på den ettersøkte filen, med navnerom', |
31 | 38 | 'globalusage-desc' => 'Short description of this extension, shown on [[Special:Version]]. Do not translate or change links.', |
32 | | - 'globalusage-ok' => '{{Identical|Search}}', |
| 39 | + 'globalusage-ok' => '{{Identical|Search}} |
| 40 | +Button on [[Special:GlobalUsage]]', |
| 41 | + 'globalusage-text' => 'Label on [[Special:GlobalUsage]]', |
| 42 | + 'globalusage-no-results' => 'Brukt for tomme resultat på [[Special:GlobalUsage]] |
| 43 | +* $1 - navn på filen (med navnerom)', |
| 44 | + 'globalusage-on-wiki' => 'Vist i listen over global bruk. Eksempel: [[Commons:Special:GlobalUsage/Example.jpg]] og [[Commons:File:Example.jpg]] |
| 45 | + |
| 46 | +* $1 filnavnet, men ikke brukt i denne meldingen |
| 47 | +* $2 prosjektnavnet', |
| 48 | + 'globalusage-of-file' => 'Brukt på en bildeside. |
| 49 | +Antallet følgende wikier er ukjent. Ved tomt resultat vises ingen melding.', |
| 50 | + 'globalusage-more' => 'Brukt på en bildeside når flere globale bruksresultat er tilgjengelige. Eksempel: [[Commons:File:Example.jpg]] |
| 51 | +* $1 - navn på filen (uten navnerom)', |
| 52 | + 'globalusage-filterlocal' => 'Filtervalg for [[Special:GlobalUsage]]', |
33 | 53 | ); |
34 | 54 | |
35 | 55 | /** Karelian (Karjala) |
— | — | @@ -52,6 +72,8 @@ |
53 | 73 | $messages['af'] = array( |
54 | 74 | 'globalusage' => 'Globale lêergebruik', |
55 | 75 | 'globalusage-ok' => 'Soek', |
| 76 | + 'globalusage-no-results' => "[[:$1]] word nie in ander wiki's gebruik nie.", |
| 77 | + 'globalusage-on-wiki' => 'Gebruik in $2', |
56 | 78 | ); |
57 | 79 | |
58 | 80 | /** Amharic (አማርኛ) |
— | — | @@ -72,7 +94,11 @@ |
73 | 95 | 'globalusage-desc' => '[[Special:GlobalUsage|صفحة خاصة]] لرؤية استخدام الملف العام', |
74 | 96 | 'globalusage-ok' => 'بحث', |
75 | 97 | 'globalusage-text' => 'بحث استخدام الملف العام', |
76 | | - 'globalusage-on-wiki' => 'استخدام [[:File:$1|$1]] في $2', |
| 98 | + 'globalusage-no-results' => '[[:$1]] غير مستخدم في ويكيات أخرى.', |
| 99 | + 'globalusage-on-wiki' => 'الاستخدام في $2', |
| 100 | + 'globalusage-of-file' => 'الويكيات الأخرى التالية تستخدم هذا الملف:', |
| 101 | + 'globalusage-more' => 'عرض [[{{#Special:GlobalUsage}}/$1|المزيد من الاستخدام العام]] لهذا الملف.', |
| 102 | + 'globalusage-filterlocal' => 'لا تعرض الاستخدام المحلي', |
77 | 103 | ); |
78 | 104 | |
79 | 105 | /** Aramaic (ܐܪܡܝܐ) |
— | — | @@ -119,17 +145,27 @@ |
120 | 146 | 'globalusage-desc' => '[[Special:GlobalUsage|Спэцыяльная старонка]] для прагляду глябальнага выкарыстаньня файла', |
121 | 147 | 'globalusage-ok' => 'Пошук', |
122 | 148 | 'globalusage-text' => 'Пошук глябальнага выкарыстаньня файла.', |
123 | | - 'globalusage-on-wiki' => 'Выкарыстаньне [[:File:$1|$1]] у $2', |
| 149 | + 'globalusage-no-results' => '[[:$1]] не выкарыстоўваецца ў іншых вікі.', |
| 150 | + 'globalusage-on-wiki' => 'Выкарыстаньне ў $2', |
| 151 | + 'globalusage-of-file' => 'Гэты файл выкарыстоўваецца ў наступных вікі:', |
| 152 | + 'globalusage-more' => 'Паказаць [[{{#Special:GlobalUsage}}/$1|поўны сьпіс глябальнага выкарыстаньня]] гэтага файла.', |
| 153 | + 'globalusage-filterlocal' => 'Не паказваць лякальнае выкарыстаньне', |
124 | 154 | ); |
125 | 155 | |
126 | 156 | /** Bulgarian (Български) |
127 | 157 | * @author DCLXVI |
| 158 | + * @author Turin |
128 | 159 | */ |
129 | 160 | $messages['bg'] = array( |
130 | 161 | 'globalusage' => 'Глобално използване на файл', |
| 162 | + 'globalusage-for' => 'Обща употреба на "$1"', |
131 | 163 | 'globalusage-desc' => '[[Special:GlobalUsage|Специална страница]] за преглед на глобалното използване на файл', |
132 | 164 | 'globalusage-ok' => 'Търсене', |
133 | 165 | 'globalusage-text' => 'Търсене за глобалното използване на файл.', |
| 166 | + 'globalusage-no-results' => '[[:$1]] не се използва в други уикита.', |
| 167 | + 'globalusage-on-wiki' => 'Употреба в $2', |
| 168 | + 'globalusage-of-file' => 'Този файл се използва от следните други уикита:', |
| 169 | + 'globalusage-filterlocal' => 'Без показване на локалната употреба', |
134 | 170 | ); |
135 | 171 | |
136 | 172 | /** Bengali (বাংলা) |
— | — | @@ -148,7 +184,11 @@ |
149 | 185 | 'globalusage-desc' => '[[Special:GlobalUsage|Pajenn dibar]] da welet implij hollek ur skeudenn', |
150 | 186 | 'globalusage-ok' => 'Klask', |
151 | 187 | 'globalusage-text' => 'Klask implij hollek ar restr', |
152 | | - 'globalusage-on-wiki' => 'Implij eus [[:File:$1|$1]] war $2', |
| 188 | + 'globalusage-no-results' => 'Ne reer ket gant [[:$1]] war wikioù all.', |
| 189 | + 'globalusage-on-wiki' => 'Implij war $2', |
| 190 | + 'globalusage-of-file' => 'Ober a ra ar wikioù da-heul gant ar restr-mañ :', |
| 191 | + 'globalusage-more' => 'Gwelet [[{{#Special:GlobalUsage}}/$1|implijoù hollek all]] esu ar restr-mañ.', |
| 192 | + 'globalusage-filterlocal' => "Arabat diskouez an implij lec'hel", |
153 | 193 | ); |
154 | 194 | |
155 | 195 | /** Bosnian (Bosanski) |
— | — | @@ -160,18 +200,29 @@ |
161 | 201 | 'globalusage-desc' => '[[Special:GlobalUsage|Posebna stranica]] za pregled globalne upotrebe datoteke', |
162 | 202 | 'globalusage-ok' => 'Traži', |
163 | 203 | 'globalusage-text' => 'Pretraga globalne upotrebe datoteke.', |
164 | | - 'globalusage-on-wiki' => 'Upotreba [[:File:$1|$1]] na $2', |
| 204 | + 'globalusage-no-results' => '[[:$1]] nije korištena na drugim wikijima.', |
| 205 | + 'globalusage-on-wiki' => 'Upotreba na $2', |
| 206 | + 'globalusage-of-file' => 'Slijedeći wikiji koriste ovu datoteku:', |
| 207 | + 'globalusage-more' => 'Pogledajte [[{{#Special:GlobalUsage}}/$1|sve globalne upotrebe]] ove datoteke.', |
| 208 | + 'globalusage-filterlocal' => 'Ne prikazuj lokalnu upotrebu', |
165 | 209 | ); |
166 | 210 | |
167 | 211 | /** Catalan (Català) |
168 | 212 | * @author Jordi Roqué |
169 | 213 | * @author SMP |
| 214 | + * @author Vriullop |
170 | 215 | */ |
171 | 216 | $messages['ca'] = array( |
172 | | - 'globalusage' => 'Ús global de fitxar', |
| 217 | + 'globalusage' => 'Ús global del fitxer', |
| 218 | + 'globalusage-for' => 'Ús global per «$1»', |
173 | 219 | 'globalusage-desc' => "[[Special:GlobalUsage|Pàgina especial]] per a veure l'ús global del fitxer", |
174 | 220 | 'globalusage-ok' => 'Cerca', |
175 | 221 | 'globalusage-text' => "Cerca l'ús global del fitxer.", |
| 222 | + 'globalusage-no-results' => "[[:$1]] no s'utilitza en altres wikis.", |
| 223 | + 'globalusage-on-wiki' => 'Utilització a $2', |
| 224 | + 'globalusage-of-file' => "Utilització d'aquest fitxer en altres wikis:", |
| 225 | + 'globalusage-more' => "Vegeu [[{{#Special:GlobalUsage}}/$1|més usos globals]] d'aquest fitxer.", |
| 226 | + 'globalusage-filterlocal' => "No mostris l'ús local", |
176 | 227 | ); |
177 | 228 | |
178 | 229 | /** Chamorro (Chamoru) |
— | — | @@ -181,6 +232,22 @@ |
182 | 233 | 'globalusage-ok' => 'Aligao', |
183 | 234 | ); |
184 | 235 | |
| 236 | +/** Czech (Česky) |
| 237 | + * @author Mormegil |
| 238 | + */ |
| 239 | +$messages['cs'] = array( |
| 240 | + 'globalusage' => 'Globální využití souboru', |
| 241 | + 'globalusage-for' => 'Globální využití „$1“', |
| 242 | + 'globalusage-desc' => '[[Special:GlobalUsage|Speciální stránka]] zobrazující globální využití souboru', |
| 243 | + 'globalusage-ok' => 'Hledat', |
| 244 | + 'globalusage-text' => 'Hledání globálního využití souboru', |
| 245 | + 'globalusage-no-results' => '[[:$1]] se na ostatních wiki nepoužívá.', |
| 246 | + 'globalusage-on-wiki' => 'Využití na $2', |
| 247 | + 'globalusage-of-file' => 'Tento soubor využívají následující wiki:', |
| 248 | + 'globalusage-more' => 'Zobrazit [[{{#Special:GlobalUsage}}/$1|další globální využití]] tohoto souboru.', |
| 249 | + 'globalusage-filterlocal' => 'Nezobrazovat místní využití', |
| 250 | +); |
| 251 | + |
185 | 252 | /** Church Slavic (Словѣ́ньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ) |
186 | 253 | * @author ОйЛ |
187 | 254 | */ |
— | — | @@ -205,12 +272,29 @@ |
206 | 273 | 'globalusage-desc' => '[[Special:GlobalUsage|Spezialseite]] zur Anzeige, in welchen Projekten die Dateien eines gemeinsam genutzten Repositoriums verwendet werden', |
207 | 274 | 'globalusage-ok' => 'Suchen', |
208 | 275 | 'globalusage-text' => 'Globale Suche nach Dateinutzungen', |
209 | | - 'globalusage-on-wiki' => 'Nutzung von [[:File:$1|$1]] auf $2', |
| 276 | + 'globalusage-no-results' => '[[:$1]] wird nicht auf anderen Wikis genutzt.', |
| 277 | + 'globalusage-on-wiki' => 'Nutzung auf $2', |
210 | 278 | 'globalusage-of-file' => 'Die nachfolgenden anderen Wikis nutzen diese Datei:', |
211 | 279 | 'globalusage-more' => '[[{{#Special:GlobalUsage}}/$1|Weitere globale Dateinutzung]] für dieser Datei anschauen.', |
212 | 280 | 'globalusage-filterlocal' => 'Zeige keine lokale Dateinutzung', |
213 | 281 | ); |
214 | 282 | |
| 283 | +/** Zazaki (Zazaki) |
| 284 | + * @author Xoser |
| 285 | + */ |
| 286 | +$messages['diq'] = array( |
| 287 | + 'globalusage' => 'Karo dosyayê globali', |
| 288 | + 'globalusage-for' => "Dosyayê globali ser ''$1''", |
| 289 | + 'globalusage-desc' => '[[Special:GlobalUsage|Pelo xas]] ke karo dosyayê globali bivine', |
| 290 | + 'globalusage-ok' => 'Bigêre', |
| 291 | + 'globalusage-text' => 'Karo dosyayê globali bigêre', |
| 292 | + 'globalusage-no-results' => '[[:$1]] wikiyanê binan de çini yo.', |
| 293 | + 'globalusage-on-wiki' => 'Kar ser $2i de', |
| 294 | + 'globalusage-of-file' => 'Wikiyanê ke ena dosya est o:', |
| 295 | + 'globalusage-more' => 'Karo [[{{#Special:GlobalUsage}}/$1|dosyayo global]]ê ena dosya bivine.', |
| 296 | + 'globalusage-filterlocal' => 'Karo local nimocne', |
| 297 | +); |
| 298 | + |
215 | 299 | /** Lower Sorbian (Dolnoserbski) |
216 | 300 | * @author Michawiki |
217 | 301 | */ |
— | — | @@ -220,7 +304,8 @@ |
221 | 305 | 'globalusage-desc' => '[[Special:GlobalUsage|Specialny bok]], aby se globalne wužywanje datajow woglědało', |
222 | 306 | 'globalusage-ok' => 'Pytaś', |
223 | 307 | 'globalusage-text' => 'Za globalnym wužywanim datajow pytaś', |
224 | | - 'globalusage-on-wiki' => 'Wužywanje dataje [[:File:$1|$1]] na $2', |
| 308 | + 'globalusage-no-results' => '[[:$1]] njewužywa se w drugich wikijach.', |
| 309 | + 'globalusage-on-wiki' => 'Wužywanje na $2', |
225 | 310 | 'globalusage-of-file' => 'Slědujuce druge wikije wužywaju toś ten wobraz:', |
226 | 311 | 'globalusage-more' => '[[{{#Special:GlobalUsage}}/$1|Dalšne globalne wužywanje]] toś teje dataje pokazaś', |
227 | 312 | 'globalusage-filterlocal' => 'Lokalne wužywanje njepokazaś', |
— | — | @@ -229,10 +314,16 @@ |
230 | 315 | /** Greek (Ελληνικά) |
231 | 316 | * @author Crazymadlover |
232 | 317 | * @author Omnipaedista |
| 318 | + * @author ZaDiak |
| 319 | + * @author Απεργός |
233 | 320 | */ |
234 | 321 | $messages['el'] = array( |
235 | | - 'globalusage' => 'Χρήση καθολικού αρχείου', |
| 322 | + 'globalusage' => 'Καθολική χρήση αρχείου', |
| 323 | + 'globalusage-for' => 'Καθολική χρήση για "$1"', |
236 | 324 | 'globalusage-ok' => 'Αναζήτηση', |
| 325 | + 'globalusage-text' => 'Αναζήτηση καθολικής χρήσης αρχείου', |
| 326 | + 'globalusage-no-results' => 'Το αρχείο [[:$1]] δεν χρησιμοποιείται σε άλλα wiki', |
| 327 | + 'globalusage-on-wiki' => 'Χρήση σε $2', |
237 | 328 | ); |
238 | 329 | |
239 | 330 | /** Esperanto (Esperanto) |
— | — | @@ -240,29 +331,50 @@ |
241 | 332 | */ |
242 | 333 | $messages['eo'] = array( |
243 | 334 | 'globalusage' => 'Ĝenerala dosier-uzado', |
| 335 | + 'globalusage-for' => 'Ĝenerala uzado por "$1"', |
244 | 336 | 'globalusage-desc' => '[[Special:GlobalUsage|Speciala paĝo]] por rigardi uzadon de ĝeneralaj dosieroj', |
245 | 337 | 'globalusage-ok' => 'Serĉi', |
246 | 338 | 'globalusage-text' => 'Serĉi uzadon de ĝeneralaj dosieroj.', |
| 339 | + 'globalusage-no-results' => '[[:$1]] ne estas uzata en aliaj vikioj.', |
| 340 | + 'globalusage-on-wiki' => 'Uzado en $2', |
| 341 | + 'globalusage-of-file' => 'La jenaj aliaj vikioj utiligas ĉi tiun dosieron:', |
| 342 | + 'globalusage-more' => 'Vidi [[{{#Special:GlobalUsage}}/$1|plian ĝeneralan uzadon]] de ĉi tiu dosiero.', |
| 343 | + 'globalusage-filterlocal' => 'Ne montri lokan uzadon', |
247 | 344 | ); |
248 | 345 | |
249 | 346 | /** Spanish (Español) |
250 | 347 | * @author Crazymadlover |
251 | 348 | * @author Jatrobat |
| 349 | + * @author Translationista |
252 | 350 | */ |
253 | 351 | $messages['es'] = array( |
254 | 352 | 'globalusage' => 'Uso de archivo global', |
| 353 | + 'globalusage-for' => 'Uso global para "$1"', |
255 | 354 | 'globalusage-desc' => '[[Special:GlobalUsage|Página especial]] para ver uso de archivo global', |
256 | 355 | 'globalusage-ok' => 'Buscar', |
257 | 356 | 'globalusage-text' => 'Buscar uso de archivo global', |
| 357 | + 'globalusage-no-results' => '[[:$1]] no es usado en otros wikis.', |
| 358 | + 'globalusage-on-wiki' => 'Uso en $2', |
| 359 | + 'globalusage-of-file' => 'Los siguientes otros wiki usan este archivo:', |
| 360 | + 'globalusage-more' => 'Ver [[{{#Special:GlobalUsage}}/$1|más uso global]] de este archivo.', |
| 361 | + 'globalusage-filterlocal' => 'Páginas externas', |
258 | 362 | ); |
259 | 363 | |
260 | 364 | /** Estonian (Eesti) |
261 | 365 | * @author Avjoska |
| 366 | + * @author Pikne |
262 | 367 | */ |
263 | 368 | $messages['et'] = array( |
264 | 369 | 'globalusage' => 'Globaalne failikasutus', |
| 370 | + 'globalusage-for' => 'Faili "$1" globaalne kasutus', |
| 371 | + 'globalusage-desc' => '[[Special:GlobalUsage|Erilehekülg]] faili globaalse kasutuse vaatamiseks', |
265 | 372 | 'globalusage-ok' => 'Otsi', |
266 | | - 'globalusage-text' => 'Otsi globaalset failikasutust.', |
| 373 | + 'globalusage-text' => 'Faili globaalse kasutuse otsimine', |
| 374 | + 'globalusage-no-results' => '[[:$1]] pole muudes vikides kasutusel.', |
| 375 | + 'globalusage-on-wiki' => 'Faili kasutus vikis $2', |
| 376 | + 'globalusage-of-file' => 'Järgmised muud vikid kasutavad seda faili:', |
| 377 | + 'globalusage-more' => 'Vaata veel selle faili [[{{#Special:GlobalUsage}}/$1|globaalset kasutust]].', |
| 378 | + 'globalusage-filterlocal' => 'Ära näita kohalikku kasutust', |
267 | 379 | ); |
268 | 380 | |
269 | 381 | /** Basque (Euskara) |
— | — | @@ -276,16 +388,27 @@ |
277 | 389 | ); |
278 | 390 | |
279 | 391 | /** Finnish (Suomi) |
| 392 | + * @author Crt |
280 | 393 | * @author ZeiP |
281 | 394 | */ |
282 | 395 | $messages['fi'] = array( |
| 396 | + 'globalusage' => 'Tiedoston käyttö globaalisti', |
| 397 | + 'globalusage-for' => 'Globaali käyttö tiedostolle ”$1”', |
| 398 | + 'globalusage-desc' => '[[Special:GlobalUsage|Toimintosivu]] globaalin tiedostokäytön näyttämiseen', |
283 | 399 | 'globalusage-ok' => 'Hae', |
| 400 | + 'globalusage-text' => 'Globaali haku tiedoston käytöstä', |
| 401 | + 'globalusage-no-results' => '[[:$1]] ei ole käytössä muissa wikeissä.', |
| 402 | + 'globalusage-on-wiki' => 'Käyttö kohteessa $2', |
| 403 | + 'globalusage-of-file' => 'Seuraavat muut wikit käyttävät tätä tiedostoa:', |
| 404 | + 'globalusage-more' => 'Näytä [[{{#Special:GlobalUsage}}/$1|lisää tiedoston globaalia käyttöä.]]', |
| 405 | + 'globalusage-filterlocal' => 'Älä näytä paikallista käyttöä', |
284 | 406 | ); |
285 | 407 | |
286 | 408 | /** French (Français) |
287 | 409 | * @author Grondin |
288 | 410 | * @author IAlex |
289 | 411 | * @author Meithal |
| 412 | + * @author Peter17 |
290 | 413 | * @author PieRRoMaN |
291 | 414 | * @author Verdy p |
292 | 415 | */ |
— | — | @@ -295,12 +418,29 @@ |
296 | 419 | 'globalusage-desc' => '[[Special:GlobalUsage|Page spéciale]] pour voir l’usage global d’une image', |
297 | 420 | 'globalusage-ok' => 'Rechercher', |
298 | 421 | 'globalusage-text' => "Rechercher l'usage global du fichier", |
299 | | - 'globalusage-on-wiki' => 'Utilisation de [[:File:$1|$1]] sur $2', |
| 422 | + 'globalusage-no-results' => "[[:$1]] n'est pas utilisé sur d'autres wikis.", |
| 423 | + 'globalusage-on-wiki' => 'Utilisation sur $2', |
300 | 424 | 'globalusage-of-file' => 'Les autres wikis suivants utilisent cette image :', |
301 | 425 | 'globalusage-more' => "Voir [[{{#Special:GlobalUsage}}/$1|d'autres utilisations globales]] de ce fichier.", |
302 | 426 | 'globalusage-filterlocal' => "Ne pas montrer l'utilisation locale", |
303 | 427 | ); |
304 | 428 | |
| 429 | +/** Franco-Provençal (Arpetan) |
| 430 | + * @author ChrisPtDe |
| 431 | + */ |
| 432 | +$messages['frp'] = array( |
| 433 | + 'globalusage' => 'Usâjo globâl du fichiér', |
| 434 | + 'globalusage-for' => 'Usâjo globâl por « $1 »', |
| 435 | + 'globalusage-desc' => '[[Special:GlobalUsage|Pâge spèciâla]] por vêre l’usâjo globâl d’un fichiér.', |
| 436 | + 'globalusage-ok' => 'Rechèrchiér', |
| 437 | + 'globalusage-text' => 'Rechèrchiér l’usâjo globâl du fichiér', |
| 438 | + 'globalusage-no-results' => '[[:$1]] est pas utilisâ sur d’ôtros vouiquis.', |
| 439 | + 'globalusage-on-wiki' => 'Usâjo dessus $2', |
| 440 | + 'globalusage-of-file' => 'Cetos ôtros vouiquis utilisont ceti fichiér :', |
| 441 | + 'globalusage-more' => 'Vêre d’[[{{#Special:GlobalUsage}}/$1|ôtros usâjos globâls]] de ceti fichiér.', |
| 442 | + 'globalusage-filterlocal' => 'Pas montrar l’usâjo local', |
| 443 | +); |
| 444 | + |
305 | 445 | /** Western Frisian (Frysk) |
306 | 446 | * @author Snakesteuben |
307 | 447 | */ |
— | — | @@ -318,7 +458,8 @@ |
319 | 459 | 'globalusage-desc' => '[[Special:GlobalUsage|Páxina especial]] para ver o uso global do ficheiro', |
320 | 460 | 'globalusage-ok' => 'Procurar', |
321 | 461 | 'globalusage-text' => 'Procurar o uso global do ficheiro.', |
322 | | - 'globalusage-on-wiki' => 'Uso de "[[:File:$1|$1]]" en $2', |
| 462 | + 'globalusage-no-results' => '[[:$1]] non se emprega noutros wikis.', |
| 463 | + 'globalusage-on-wiki' => 'Uso en $2', |
323 | 464 | 'globalusage-of-file' => 'Os seguintes wikis empregan esta imaxe:', |
324 | 465 | 'globalusage-more' => 'Ver [[{{#Special:GlobalUsage}}/$1|máis usos globais]] deste ficheiro.', |
325 | 466 | 'globalusage-filterlocal' => 'Non mostrar o uso local', |
— | — | @@ -340,7 +481,11 @@ |
341 | 482 | 'globalusage-desc' => '[[Special:GlobalUsage|Spezialsyte]] zu Aazeige, in welene Projäkt d Dateien vun eme gmeinsam gnutzte Repositoriums verwändet wäre', |
342 | 483 | 'globalusage-ok' => 'Sueche', |
343 | 484 | 'globalusage-text' => 'Wältwyt no Dateinutzige sueche', |
344 | | - 'globalusage-on-wiki' => 'Gebruch vu [[:File:$1|$1]] uf $2', |
| 485 | + 'globalusage-no-results' => '[[:$1]] wird nit in andere Wiki brucht.', |
| 486 | + 'globalusage-on-wiki' => 'Gebruch uf $2', |
| 487 | + 'globalusage-of-file' => 'Die andere Wikis bruche die Datei:', |
| 488 | + 'globalusage-more' => '[[{{#Special:GlobalUsage}}/$1|Wygteri wältwyti Verwändig]] vu däre Datei aaluege.', |
| 489 | + 'globalusage-filterlocal' => 'Kei lokali Dateiverwändig zeige', |
345 | 490 | ); |
346 | 491 | |
347 | 492 | /** Gujarati (ગુજરાતી) |
— | — | @@ -381,7 +526,10 @@ |
382 | 527 | 'globalusage-desc' => '[[Special:GlobalUsage|דף מיוחד]] להצגת השימוש הגלובלי בקבצים', |
383 | 528 | 'globalusage-ok' => 'חיפוש', |
384 | 529 | 'globalusage-text' => 'חיפוש בשימוש הגלובלי בקבצים.', |
| 530 | + 'globalusage-no-results' => '[[:$1]] אינו בשימוש באתרי ויקי אחרים.', |
385 | 531 | 'globalusage-on-wiki' => '[[:File:$1|$1]] בשימוש באתר $2', |
| 532 | + 'globalusage-of-file' => 'אתרי הוויקי השונים הבאים משתמשים בקובץ זה:', |
| 533 | + 'globalusage-filterlocal' => 'אין להציג שימוש מקומי', |
386 | 534 | ); |
387 | 535 | |
388 | 536 | /** Hindi (हिन्दी) |
— | — | @@ -410,7 +558,8 @@ |
411 | 559 | 'globalusage-desc' => '[[Special:GlobalUsage|Specialna strona]], zo by globalne wužiwanje wobraza widźał', |
412 | 560 | 'globalusage-ok' => 'Podać', |
413 | 561 | 'globalusage-text' => 'Globalne wužiwanje dataje pytać.', |
414 | | - 'globalusage-on-wiki' => 'Wužiwanje dataje [[:File:$1|$1]] na $2', |
| 562 | + 'globalusage-no-results' => '[[:$1]] njewužiwa so w druhich wikijach.', |
| 563 | + 'globalusage-on-wiki' => 'Wužiwanje na $2', |
415 | 564 | 'globalusage-of-file' => 'Slědowace druhe wikije wužiwaja tutón wobraz:', |
416 | 565 | 'globalusage-more' => '[[{{#Special:GlobalUsage}}/$1|Dalše globalne wužiwanje]] tuteje dataje pokazać', |
417 | 566 | 'globalusage-filterlocal' => 'Lokalne wužiwanje njepokazać', |
— | — | @@ -421,12 +570,16 @@ |
422 | 571 | * @author Glanthor Reviol |
423 | 572 | */ |
424 | 573 | $messages['hu'] = array( |
425 | | - 'globalusage' => 'Globális fájl-használat megjelenítése', |
| 574 | + 'globalusage' => 'Globális fájlhasználat', |
426 | 575 | 'globalusage-for' => '„$1” globális használata', |
427 | 576 | 'globalusage-desc' => '[[Special:GlobalUsage|Speciális lap]] globális fájlhasználat megjelenítésére', |
428 | 577 | 'globalusage-ok' => 'Keresés', |
429 | 578 | 'globalusage-text' => 'Fájlhasználat globális keresése', |
430 | | - 'globalusage-on-wiki' => '[[:File:$1|$1]] használata itt: $2', |
| 579 | + 'globalusage-no-results' => 'A(z) [[:$1]] fájl nincs más wikiken használva.', |
| 580 | + 'globalusage-on-wiki' => 'Használata itt: $2', |
| 581 | + 'globalusage-of-file' => 'A következő wikik használják ezt a fájlt:', |
| 582 | + 'globalusage-more' => 'A fájl [[{{#Special:GlobalUsage}}/$1|globális használatának]] megtekintése', |
| 583 | + 'globalusage-filterlocal' => 'Ne mutassa a helyi használatot', |
431 | 584 | ); |
432 | 585 | |
433 | 586 | /** Armenian (Հայերեն) |
— | — | @@ -445,7 +598,8 @@ |
446 | 599 | 'globalusage-desc' => '[[Special:GlobalUsage|Pagina special]] pro vider le uso global de files', |
447 | 600 | 'globalusage-ok' => 'Cercar', |
448 | 601 | 'globalusage-text' => 'Cercar uso global de files.', |
449 | | - 'globalusage-on-wiki' => 'Uso de [[:File:$1|$1]] in $2', |
| 602 | + 'globalusage-no-results' => '[[:$1]] non es usate in altere wikis.', |
| 603 | + 'globalusage-on-wiki' => 'Uso in $2', |
450 | 604 | 'globalusage-of-file' => 'Le altere wikis sequente usa iste imagine:', |
451 | 605 | 'globalusage-more' => 'Vider [[{{#Special:GlobalUsage}}/$1|ulterior uso global]] de iste file.', |
452 | 606 | 'globalusage-filterlocal' => 'Non monstrar uso local', |
— | — | @@ -462,7 +616,8 @@ |
463 | 617 | 'globalusage-desc' => '[[Special:GlobalUsage|Halaman istimewa]] untuk melihat penggunaan berkas secara global', |
464 | 618 | 'globalusage-ok' => 'Cari', |
465 | 619 | 'globalusage-text' => 'Cari penggunaan berkas secara global.', |
466 | | - 'globalusage-on-wiki' => 'Penggunaan [[:File:$1|$1]] pada $2', |
| 620 | + 'globalusage-no-results' => '[[:$1]] tidak digunakan di wiki lain.', |
| 621 | + 'globalusage-on-wiki' => 'Penggunaan pada $2', |
467 | 622 | 'globalusage-of-file' => 'Wiki lain berikut menggunakan berkas ini:', |
468 | 623 | 'globalusage-more' => 'Lihat [[{{#Special:GlobalUsage}}/$1|penggunaan global lain]] dari berkas ini.', |
469 | 624 | 'globalusage-filterlocal' => 'Jangan tunjukkan penggunaan lokal', |
— | — | @@ -494,7 +649,8 @@ |
495 | 650 | 'globalusage-desc' => 'グローバルなファイル使用状況を見るための[[Special:GlobalUsage|特別ページ]]', |
496 | 651 | 'globalusage-ok' => '検索', |
497 | 652 | 'globalusage-text' => 'グローバルなファイル使用状況を検索する', |
498 | | - 'globalusage-on-wiki' => '$2での[[:File:$1|$1]]の利用状況', |
| 653 | + 'globalusage-no-results' => '[[:$1]] は他のウィキでは使われていません。', |
| 654 | + 'globalusage-on-wiki' => '$2 での使用状況', |
499 | 655 | 'globalusage-of-file' => '以下に挙げる他のウィキがこの画像を使っています:', |
500 | 656 | 'globalusage-more' => 'このファイルの[[{{#Special:GlobalUsage}}/$1|グローバル使用状況]]をさらに表示する。', |
501 | 657 | 'globalusage-filterlocal' => 'ローカル使用状況を表示しない', |
— | — | @@ -510,6 +666,14 @@ |
511 | 667 | 'globalusage-text' => 'Golèk panggunan global berkas.', |
512 | 668 | ); |
513 | 669 | |
| 670 | +/** Georgian (ქართული) |
| 671 | + * @author BRUTE |
| 672 | + */ |
| 673 | +$messages['ka'] = array( |
| 674 | + 'globalusage' => 'ფაილის გლობალური გამოყენება', |
| 675 | + 'globalusage-ok' => 'ძიება', |
| 676 | +); |
| 677 | + |
514 | 678 | /** Khmer (ភាសាខ្មែរ) |
515 | 679 | * @author Chhorran |
516 | 680 | * @author Lovekhmer |
— | — | @@ -522,6 +686,22 @@ |
523 | 687 | 'globalusage-text' => 'ស្វែងរកបម្រើបម្រាស់ឯកសារជាសាកល។', |
524 | 688 | ); |
525 | 689 | |
| 690 | +/** Korean (한국어) |
| 691 | + * @author Kwj2772 |
| 692 | + */ |
| 693 | +$messages['ko'] = array( |
| 694 | + 'globalusage' => '특정 파일을 사용하고 있는 모든 위키의 문서 목록', |
| 695 | + 'globalusage-for' => '"$1" 파일을 사용하고 있는 모든 위키의 문서 목록', |
| 696 | + 'globalusage-desc' => '특정 파일을 사용하고 있는 모든 위키의 문서의 목록을 보여주는 [[Special:GlobalUsage|특수 문서]]를 추가', |
| 697 | + 'globalusage-ok' => '찾기', |
| 698 | + 'globalusage-text' => '특정 파일이 사용되고 있는 모든 위키의 문서 찾기', |
| 699 | + 'globalusage-no-results' => '[[:$1]]은 다른 위키에서 사용되지 않고 있습니다.', |
| 700 | + 'globalusage-on-wiki' => '$2에서 이 파일을 사용하고 있는 문서 목록', |
| 701 | + 'globalusage-of-file' => '다음 위키에서 이 파일을 사용하고 있습니다:', |
| 702 | + 'globalusage-more' => '이 파일을 사용하고 있는 [[{{#Special:GlobalUsage}}/$1|다른 위키의 더 많은 문서]]를 보기', |
| 703 | + 'globalusage-filterlocal' => '이 위키에서 이 파일을 사용하고 있는 문서를 보이지 않기', |
| 704 | +); |
| 705 | + |
526 | 706 | /** Krio (Krio) |
527 | 707 | * @author Jose77 |
528 | 708 | */ |
— | — | @@ -545,10 +725,14 @@ |
546 | 726 | 'globalusage-desc' => '[[Special:GlobalUsage|Söndersigg]] för jemeinsam jebruch Dateie ze zeije.', |
547 | 727 | 'globalusage-ok' => 'Söhk!', |
548 | 728 | 'globalusage-text' => 'Söhk noh jemeinsam jebruch Datteie.', |
549 | | - 'globalusage-on-wiki' => 'Dä Jebruch vun dä Dattei „[[:File:$1|$1]]“ op $2', |
| 729 | + 'globalusage-no-results' => '[[:$1]] weed in ander Wikis nit jebruch.', |
| 730 | + 'globalusage-on-wiki' => 'Dä Jebruch op $2', |
| 731 | + 'globalusage-of-file' => 'Heh di ander Wikis bruche di Dattei:', |
| 732 | + 'globalusage-more' => 'Loor noh [[{{#Special:GlobalUsage}}/$1|mieh övver dä Jebruch]] vun heh dä Dattei.', |
| 733 | + 'globalusage-filterlocal' => 'Donn nix aanzeije doh drövver, wi di Dattei heh em Wiki jebruch weed', |
550 | 734 | ); |
551 | 735 | |
552 | | -/** Kurdish (Latin) (Kurdî / كوردی (Latin)) |
| 736 | +/** Kurdish (Latin) (Kurdî (Latin)) |
553 | 737 | * @author Bangin |
554 | 738 | */ |
555 | 739 | $messages['ku-latn'] = array( |
— | — | @@ -565,7 +749,11 @@ |
566 | 750 | 'globalusage-desc' => "[[Special:GlobalUsage|Spezialsäit]] fir d'globaalt Benotze vun engem Fichier ze gesinn", |
567 | 751 | 'globalusage-ok' => 'Sichen', |
568 | 752 | 'globalusage-text' => 'Nom globale Benotze vum Fichier sichen.', |
569 | | - 'globalusage-on-wiki' => 'Notzung vu(n) [[:File:$1|$1]] op $2', |
| 753 | + 'globalusage-no-results' => '[[:$1]] gëtt net op anere Wikie benotzt.', |
| 754 | + 'globalusage-on-wiki' => 'Notzen op $2', |
| 755 | + 'globalusage-of-file' => 'Dës aner Wikien benotzen dëse Fichier:', |
| 756 | + 'globalusage-more' => '[[{{#Special:GlobalUsage}}/$1|Méi global Notzunge]] vun dësem Fichier weisen.', |
| 757 | + 'globalusage-filterlocal' => 'Déi lokal Notzung net weisen', |
570 | 758 | ); |
571 | 759 | |
572 | 760 | /** Lingua Franca Nova (Lingua Franca Nova) |
— | — | @@ -600,17 +788,28 @@ |
601 | 789 | 'globalusage-desc' => '[[Special:GlobalUsage|Специјална страница]] за преглед на употребата на глобални податотеки', |
602 | 790 | 'globalusage-ok' => 'Пребарај', |
603 | 791 | 'globalusage-text' => 'Пребарување на глобална употреба на податотеки.', |
604 | | - 'globalusage-on-wiki' => 'Користење на [[:File:$1|$1]] на $2', |
| 792 | + 'globalusage-no-results' => '[[:$1]] не се користи во други викија..', |
| 793 | + 'globalusage-on-wiki' => 'Искористеност на $2', |
| 794 | + 'globalusage-of-file' => 'Оваа податотека ја користат и следниве викија:', |
| 795 | + 'globalusage-more' => 'Преглед на [[{{#Special:GlobalUsage}}/$1|уште глобално користење]] на оваа податотека.', |
| 796 | + 'globalusage-filterlocal' => 'Не прикажувај локално користење', |
605 | 797 | ); |
606 | 798 | |
607 | 799 | /** Malayalam (മലയാളം) |
| 800 | + * @author Praveenp |
608 | 801 | * @author Shijualex |
609 | 802 | */ |
610 | 803 | $messages['ml'] = array( |
611 | 804 | 'globalusage' => 'പ്രമാണത്തിന്റെ ആഗോള ഉപയോഗം', |
| 805 | + 'globalusage-for' => '"$1" ആഗോള ഉപയോഗം', |
612 | 806 | 'globalusage-desc' => 'പ്രമാണത്തിന്റെ ആഗോള ഉപയോഗം കാണിക്കുവാനുള്ള [[Special:GlobalUsage|പ്രത്യേക താള്]]', |
613 | 807 | 'globalusage-ok' => 'തിരയൂ', |
614 | 808 | 'globalusage-text' => 'പ്രമാണത്തിന്റെ ആഗോള ഉപയോഗം തിരയുക', |
| 809 | + 'globalusage-no-results' => '[[:$1]] മറ്റു വിക്കികളിൽ ഉപയോഗിക്കുന്നില്ല.', |
| 810 | + 'globalusage-on-wiki' => '$2 സംരംഭത്തിലെ ഉപയോഗം', |
| 811 | + 'globalusage-of-file' => 'താഴെ കൊടുക്കുന്ന വിക്കികളും ഈ പ്രമാണം ഉപയോഗിക്കുന്നു:', |
| 812 | + 'globalusage-more' => 'ഈ പ്രമാണത്തിന്റെ [[{{#Special:GlobalUsage}}/$1|കൂടുതൽ ആഗോള ഉപയോഗം]] കാണുക.', |
| 813 | + 'globalusage-filterlocal' => 'പ്രാദേശിക ഉപയോഗം പ്രദർശിപ്പിക്കരുത്', |
615 | 814 | ); |
616 | 815 | |
617 | 816 | /** Mongolian (Монгол) |
— | — | @@ -654,7 +853,11 @@ |
655 | 854 | 'globalusage-desc' => '[[Special:GlobalUsage|Speciale pagina]] voor het bekijken van globaal bestandsgebruik', |
656 | 855 | 'globalusage-ok' => 'Zoeken', |
657 | 856 | 'globalusage-text' => 'Globaal bestandsgebruik bekijken', |
658 | | - 'globalusage-on-wiki' => 'Gebruik van [[:File:$1|$1]] in $2', |
| 857 | + 'globalusage-no-results' => "[[:$1]] wordt niet gebruikt in andere wiki's.", |
| 858 | + 'globalusage-on-wiki' => 'Gebruik in $2', |
| 859 | + 'globalusage-of-file' => "De volgende andere wiki's gebruiken dit bestand:", |
| 860 | + 'globalusage-more' => '[[{{#Special:GlobalUsage}}/$1|Meer globaal gebruik]] van dit bestand bekijken.', |
| 861 | + 'globalusage-filterlocal' => 'Lokaal gebruik niet weergeven', |
659 | 862 | ); |
660 | 863 | |
661 | 864 | /** Norwegian Nynorsk (Norsk (nynorsk)) |
— | — | @@ -670,12 +873,19 @@ |
671 | 874 | |
672 | 875 | /** Norwegian (bokmål) (Norsk (bokmål)) |
673 | 876 | * @author Jon Harald Søby |
| 877 | + * @author Nghtwlkr |
674 | 878 | */ |
675 | 879 | $messages['no'] = array( |
676 | 880 | 'globalusage' => 'Global filbruk', |
| 881 | + 'globalusage-for' => 'Global bruk av "$1"', |
677 | 882 | 'globalusage-desc' => '[[Special:GlobalUsage|Spesialside]] for å vise bruken av en fil globalt', |
678 | 883 | 'globalusage-ok' => 'Søk', |
679 | 884 | 'globalusage-text' => 'Søk global filbruk.', |
| 885 | + 'globalusage-no-results' => '[[:$1]] er ikke brukt på andre wikier.', |
| 886 | + 'globalusage-on-wiki' => 'Bruk i $2', |
| 887 | + 'globalusage-of-file' => 'Følgende andre wikier bruker denne filen:', |
| 888 | + 'globalusage-more' => 'Vis [[{{#Special:GlobalUsage}}/$1|mer global bruk]] av denne filen', |
| 889 | + 'globalusage-filterlocal' => 'Ikke vis lokal bruk', |
680 | 890 | ); |
681 | 891 | |
682 | 892 | /** Occitan (Occitan) |
— | — | @@ -687,7 +897,11 @@ |
688 | 898 | 'globalusage-desc' => '[[Special:GlobalUsage|Pagina especiala]] per veire l’usatge global d’un imatge', |
689 | 899 | 'globalusage-ok' => 'Recèrca', |
690 | 900 | 'globalusage-text' => "Recercar l'usatge global del fichièr", |
691 | | - 'globalusage-on-wiki' => 'Utilizacion de [[:File:$1|$1]] sus $2', |
| 901 | + 'globalusage-no-results' => "[[:$1]] es pas utilizat sus d'autres wikis.", |
| 902 | + 'globalusage-on-wiki' => 'Utilizacion sus $2', |
| 903 | + 'globalusage-of-file' => 'Los autres wikis seguents utilizan aqueste imatge :', |
| 904 | + 'globalusage-more' => "Veire [[{{#Special:GlobalUsage}}/$1|d'autras utilizacions globalas]] d'aqueste fichièr.", |
| 905 | + 'globalusage-filterlocal' => "Far pas veire l'utilizacion locala", |
692 | 906 | ); |
693 | 907 | |
694 | 908 | /** Oriya (ଓଡ଼ିଆ) |
— | — | @@ -704,21 +918,33 @@ |
705 | 919 | 'globalusage-ok' => 'Агур', |
706 | 920 | ); |
707 | 921 | |
| 922 | +/** Deitsch (Deitsch) |
| 923 | + * @author Xqt |
| 924 | + */ |
| 925 | +$messages['pdc'] = array( |
| 926 | + 'globalusage-ok' => 'Uffgucke', |
| 927 | +); |
| 928 | + |
708 | 929 | /** Polish (Polski) |
709 | 930 | * @author Leinad |
710 | 931 | * @author Maikking |
711 | 932 | * @author Sp5uhe |
712 | 933 | */ |
713 | 934 | $messages['pl'] = array( |
714 | | - 'globalusage' => 'Globalne użycie pliku', |
715 | | - 'globalusage-for' => 'Globalne użycie „$1”', |
716 | | - 'globalusage-desc' => '[[Special:GlobalUsage|Strona specjalna]] raportująca globalnie wykorzystanie pliku', |
| 935 | + 'globalusage' => 'Globalne wykorzystanie pliku', |
| 936 | + 'globalusage-for' => 'Globalne wykorzystanie „$1”', |
| 937 | + 'globalusage-desc' => '[[Special:GlobalUsage|Strona specjalna]] pokazująca globalne wykorzystanie pliku', |
717 | 938 | 'globalusage-ok' => 'Szukaj', |
718 | 939 | 'globalusage-text' => 'Globalne wyszukiwanie wykorzystania pliku', |
719 | | - 'globalusage-on-wiki' => 'Wykorzystanie [[:File:$1|$1]] w {{GRAMMAR:MS.lp:$2}}', |
| 940 | + 'globalusage-no-results' => '[[:$1]] nie jest wykorzystywany w inny projektach wiki.', |
| 941 | + 'globalusage-on-wiki' => 'Wykorzystanie w $2', |
| 942 | + 'globalusage-of-file' => 'Ten plik jest wykorzystywany także w innych projektach wiki:', |
| 943 | + 'globalusage-more' => 'Pokaż [[{{#Special:GlobalUsage}}/$1|pełną listę globalnego wykorzystania]] tego pliku.', |
| 944 | + 'globalusage-filterlocal' => 'Nie pokazuj lokalnego wykorzystania', |
720 | 945 | ); |
721 | 946 | |
722 | 947 | /** Piedmontese (Piemontèis) |
| 948 | + * @author Borichèt |
723 | 949 | * @author Dragonòt |
724 | 950 | */ |
725 | 951 | $messages['pms'] = array( |
— | — | @@ -727,7 +953,11 @@ |
728 | 954 | 'globalusage-desc' => '[[Special:GlobalUsage|Pàgina special]] për vëdde ël dovragi global dël file', |
729 | 955 | 'globalusage-ok' => 'Serca', |
730 | 956 | 'globalusage-text' => 'Serca ël dovragi global dël file.', |
731 | | - 'globalusage-on-wiki' => 'Usagi ëd [[:File:$1|$1]] dzora $2', |
| 957 | + 'globalusage-no-results' => "[[:$1]] a l'é pa dovrà dzora d'àutre wiki.", |
| 958 | + 'globalusage-on-wiki' => 'Usagi dzora $2', |
| 959 | + 'globalusage-of-file' => "J'àutre wiki sì sota a deuvro st'archivi-sì:", |
| 960 | + 'globalusage-more' => "Varda l'[[{{#Special:GlobalUsage}}/$1|usagi global]] dë st'archivi-sì.", |
| 961 | + 'globalusage-filterlocal' => "Mosta nen l'usagi local.", |
732 | 962 | ); |
733 | 963 | |
734 | 964 | /** Pashto (پښتو) |
— | — | @@ -735,20 +965,33 @@ |
736 | 966 | */ |
737 | 967 | $messages['ps'] = array( |
738 | 968 | 'globalusage' => 'د نړېوالې دوتنې کارېدنګ', |
| 969 | + 'globalusage-for' => 'د "$1" لپاره نړېوالې کارېدنې', |
739 | 970 | 'globalusage-desc' => 'د نړېوالې دوتنې د کارېدنګ د مخليدنې لپاره [[Special:GlobalUsage|ځانګړی مخ]]', |
740 | 971 | 'globalusage-ok' => 'پلټل', |
741 | 972 | 'globalusage-text' => 'د نړېوالې دوتنې کارېدنګ پلټل', |
| 973 | + 'globalusage-no-results' => '[[:$1]] په نورو ويکي ګانو نه کارېږي.', |
| 974 | + 'globalusage-on-wiki' => 'په $2 کارونې', |
| 975 | + 'globalusage-of-file' => 'همدا دوتنه لاندينۍ نورې ويکي ګانې کاروي:', |
| 976 | + 'globalusage-more' => 'د همدې دوتنې [[{{#Special:GlobalUsage}}/$1|نورې نړېوالې کارونې]] کتل.', |
| 977 | + 'globalusage-filterlocal' => 'سيمه ايزې کارونې مه ښکاره کوه', |
742 | 978 | ); |
743 | 979 | |
744 | 980 | /** Portuguese (Português) |
| 981 | + * @author Hamilton Abreu |
745 | 982 | * @author Lijealso |
746 | 983 | * @author Malafaya |
747 | 984 | */ |
748 | 985 | $messages['pt'] = array( |
749 | | - 'globalusage' => 'Utilização global de ficheiro', |
| 986 | + 'globalusage' => 'Utilização global de ficheiros', |
| 987 | + 'globalusage-for' => 'Utilização global de "$1"', |
750 | 988 | 'globalusage-desc' => '[[Special:GlobalUsage|Página especial]] para consultar a utilização global de ficheiros', |
751 | | - 'globalusage-ok' => 'Busca', |
752 | | - 'globalusage-text' => 'Pesquisar utilização global de ficheiro.', |
| 989 | + 'globalusage-ok' => 'Pesquisar', |
| 990 | + 'globalusage-text' => 'Pesquisar utilização global de ficheiros.', |
| 991 | + 'globalusage-no-results' => '[[:$1]] não é usado noutras wikis.', |
| 992 | + 'globalusage-on-wiki' => 'Uso de [[:File:$1|$1]] na $2', |
| 993 | + 'globalusage-of-file' => 'As seguintes wikis usam este ficheiro:', |
| 994 | + 'globalusage-more' => 'Ver [[{{#Special:GlobalUsage}}/$1|mais utilizações globais]] deste ficheiro.', |
| 995 | + 'globalusage-filterlocal' => 'Não mostrar utilizações locais', |
753 | 996 | ); |
754 | 997 | |
755 | 998 | /** Brazilian Portuguese (Português do Brasil) |
— | — | @@ -770,16 +1013,35 @@ |
771 | 1014 | |
772 | 1015 | /** Romanian (Română) |
773 | 1016 | * @author KlaudiuMihaila |
| 1017 | + * @author Minisarm |
774 | 1018 | */ |
775 | 1019 | $messages['ro'] = array( |
| 1020 | + 'globalusage' => 'Utilizarea globală a fişierului', |
| 1021 | + 'globalusage-for' => 'Utilizarea globală a fişierului „$1”', |
| 1022 | + 'globalusage-desc' => '[[Special:GlobalUsage|Pagină specială]] pentru vizualizarea utilizării globale a fişierului', |
776 | 1023 | 'globalusage-ok' => 'Caută', |
| 1024 | + 'globalusage-text' => 'Caută utilizările globale ale fişierului', |
| 1025 | + 'globalusage-no-results' => 'Fişierul „[[:$1]]” nu este folosit la alte proiecte de tip wiki.', |
| 1026 | + 'globalusage-on-wiki' => 'Utilizarea fişierului „[[:File:$1|$1]]” la $2', |
| 1027 | + 'globalusage-of-file' => 'Următoarele alte proiecte de tip wiki folosesc acest fişier:', |
| 1028 | + 'globalusage-more' => 'Vizualizaţi [[{{#Special:GlobalUsage}}/$1|mai multe utilizări globale]] ale acestui fişier.', |
| 1029 | + 'globalusage-filterlocal' => 'Nu afişa utilizările locale.', |
777 | 1030 | ); |
778 | 1031 | |
779 | 1032 | /** Tarandíne (Tarandíne) |
780 | 1033 | * @author Joetaras |
781 | 1034 | */ |
782 | 1035 | $messages['roa-tara'] = array( |
| 1036 | + 'globalusage' => "Ause d'u file globale", |
| 1037 | + 'globalusage-for' => 'Ause globale pe "$1"', |
| 1038 | + 'globalusage-desc' => "[[Special:GlobalUsage|Pàgena speciale]] pe vedè l'ause de le file globale", |
783 | 1039 | 'globalusage-ok' => 'Cirche', |
| 1040 | + 'globalusage-text' => 'Cirche le file de ause globale', |
| 1041 | + 'globalusage-no-results' => "[[:$1]] non g'è ausate jndr'à otre Uicchi.", |
| 1042 | + 'globalusage-on-wiki' => 'Ause sus a $2', |
| 1043 | + 'globalusage-of-file' => 'Le seguende Uicchi ausane stu file:', |
| 1044 | + 'globalusage-more' => 'Vide [[{{#Special:GlobalUsage}}/$1|otre ause globale]] de stu file.', |
| 1045 | + 'globalusage-filterlocal' => "No fà vedè l'ause locale", |
784 | 1046 | ); |
785 | 1047 | |
786 | 1048 | /** Russian (Русский) |
— | — | @@ -791,9 +1053,20 @@ |
792 | 1054 | 'globalusage-desc' => '[[Special:GlobalUsage|Служебная страница]] для просмотра общего использования файла', |
793 | 1055 | 'globalusage-ok' => 'Найти', |
794 | 1056 | 'globalusage-text' => 'Поиск глобального использования файла.', |
| 1057 | + 'globalusage-no-results' => '[[:$1]] не используется в других вики.', |
795 | 1058 | 'globalusage-on-wiki' => 'Использование [[:File:$1|$1]] в $2', |
| 1059 | + 'globalusage-of-file' => 'Данный файл используется в следующих вики:', |
| 1060 | + 'globalusage-more' => 'Просмотреть [[{{#Special:GlobalUsage}}/$1|подробнее глобальное использование]] этого файла.', |
| 1061 | + 'globalusage-filterlocal' => 'Не показывать локальное использование', |
796 | 1062 | ); |
797 | 1063 | |
| 1064 | +/** Yakut (Саха тыла) |
| 1065 | + * @author HalanTul |
| 1066 | + */ |
| 1067 | +$messages['sah'] = array( |
| 1068 | + 'globalusage-ok' => 'Буларга', |
| 1069 | +); |
| 1070 | + |
798 | 1071 | /** Slovak (Slovenčina) |
799 | 1072 | * @author Helix84 |
800 | 1073 | */ |
— | — | @@ -803,17 +1076,22 @@ |
804 | 1077 | 'globalusage-desc' => '[[Special:GlobalUsage|Špeciálna stránka]] na zobrazenie celkového využitia súborov', |
805 | 1078 | 'globalusage-ok' => 'Hľadať', |
806 | 1079 | 'globalusage-text' => 'Hľadať globálne využitie súborov.', |
| 1080 | + 'globalusage-no-results' => '[[:$1]] sa nepoužíva na iných wiki.', |
807 | 1081 | 'globalusage-on-wiki' => 'Použitie [[:File:$1|$1]] na $2', |
| 1082 | + 'globalusage-of-file' => 'Nasledovné ďalšie wiki používajú tento súbor:', |
| 1083 | + 'globalusage-more' => 'Zobraziť [[{{#Special:GlobalUsage}}/$1|ďalšie globálne použitie]] tohto súboru.', |
| 1084 | + 'globalusage-filterlocal' => 'Nezobrazovať lokálne použitie', |
808 | 1085 | ); |
809 | 1086 | |
810 | 1087 | /** Lower Silesian (Schläsch) |
811 | 1088 | * @author Jonny84 |
| 1089 | + * @author Schläsinger |
812 | 1090 | */ |
813 | 1091 | $messages['sli'] = array( |
814 | 1092 | 'globalusage' => 'Globale Dateinutzung', |
815 | | - 'globalusage-desc' => '[[Special:GlobalUsage|Spezialseite]] zur Anzeige, ei welchen Projekten de Dateien eines gemeinsam genutzten Repositoriums verwendet werde', |
816 | | - 'globalusage-ok' => 'Suchen', |
817 | | - 'globalusage-text' => 'Globale Suche nach Dateinutzungen.', |
| 1093 | + 'globalusage-desc' => '[[Special:GlobalUsage|Spezialseyte]] zur Oazeige, ei welchen Projekten de Dateien annes gemeinsam genutzten Repositoriums verwendet waan', |
| 1094 | + 'globalusage-ok' => 'Sicha', |
| 1095 | + 'globalusage-text' => 'Globale Siche noach Dateinutzungen.', |
818 | 1096 | ); |
819 | 1097 | |
820 | 1098 | /** Serbian Cyrillic ekavian (Српски (ћирилица)) |
— | — | @@ -855,14 +1133,21 @@ |
856 | 1134 | ); |
857 | 1135 | |
858 | 1136 | /** Swedish (Svenska) |
| 1137 | + * @author Boivie |
859 | 1138 | * @author Lejonel |
860 | 1139 | * @author M.M.S. |
861 | 1140 | */ |
862 | 1141 | $messages['sv'] = array( |
863 | 1142 | 'globalusage' => 'Global filanvändning', |
| 1143 | + 'globalusage-for' => 'Globalt användande av "$1"', |
864 | 1144 | 'globalusage-desc' => '[[Special:GlobalUsage|Specialsida]] för att visa på vilka projekt filer från den gemensamma filservern används.', |
865 | 1145 | 'globalusage-ok' => 'Sök', |
866 | 1146 | 'globalusage-text' => 'Sök global filanvändning.', |
| 1147 | + 'globalusage-no-results' => '[[:$1]] används inte på andra wikier.', |
| 1148 | + 'globalusage-on-wiki' => 'Användande av [[:File:$1|$1]] på $2', |
| 1149 | + 'globalusage-of-file' => 'Följande andra wikier använder denna fil:', |
| 1150 | + 'globalusage-more' => 'Visa [[{{#Special:GlobalUsage}}/$1|mer globalt användande]] av denna fil.', |
| 1151 | + 'globalusage-filterlocal' => 'Visa inte lokalt användande', |
867 | 1152 | ); |
868 | 1153 | |
869 | 1154 | /** Silesian (Ślůnski) |
— | — | @@ -884,9 +1169,15 @@ |
885 | 1170 | */ |
886 | 1171 | $messages['te'] = array( |
887 | 1172 | 'globalusage' => 'సార్వత్రిక ఫైలు వాడుక', |
| 1173 | + 'globalusage-for' => '"$1" యొక్క సార్వత్రిక వాడుక', |
888 | 1174 | 'globalusage-desc' => 'సార్వత్రిక ఫైలు వాడుకని చూడడానికి [[Special:GlobalUsage|ప్రత్యేక పేజీ]]', |
889 | 1175 | 'globalusage-ok' => 'వెతుకు', |
890 | 1176 | 'globalusage-text' => 'సార్వత్రిక ఫైళ్ళ వాడుకలో వెతకండి.', |
| 1177 | + 'globalusage-no-results' => '[[:$1]]ని ఇతర వికీలలో ఉపయోగించట్లేదు.', |
| 1178 | + 'globalusage-on-wiki' => '$2 లో వాడుక', |
| 1179 | + 'globalusage-of-file' => 'ఈ ఫైలుని క్రింది ఇతర వికీలు ఉపయోగిస్తున్నాయి:', |
| 1180 | + 'globalusage-more' => 'ఈ ఫైలు యొక్క [[{{#Special:GlobalUsage}}/$1|మరింత సార్వత్రిక వాడుకని]] చూడండి.', |
| 1181 | + 'globalusage-filterlocal' => 'స్థానిక వాడుకని చూపించకు', |
891 | 1182 | ); |
892 | 1183 | |
893 | 1184 | /** Tetum (Tetun) |
— | — | @@ -906,6 +1197,16 @@ |
907 | 1198 | 'globalusage-text' => 'Ҷустуҷӯи истифодаи саросарии парванда.', |
908 | 1199 | ); |
909 | 1200 | |
| 1201 | +/** Tajik (Latin) (Тоҷикӣ (Latin)) |
| 1202 | + * @author Liangent |
| 1203 | + */ |
| 1204 | +$messages['tg-latn'] = array( |
| 1205 | + 'globalusage' => 'Istifodai sarosariji parvanda', |
| 1206 | + 'globalusage-desc' => '[[Special:GlobalUsage|Sahifai viƶa]] baroi didani istifodai sarosariji parvanda', |
| 1207 | + 'globalusage-ok' => 'Çustuçū', |
| 1208 | + 'globalusage-text' => 'Çustuçūi istifodai sarosariji parvanda.', |
| 1209 | +); |
| 1210 | + |
910 | 1211 | /** Thai (ไทย) |
911 | 1212 | * @author Octahedron80 |
912 | 1213 | */ |
— | — | @@ -913,6 +1214,22 @@ |
914 | 1215 | 'globalusage-ok' => 'สืบค้น', |
915 | 1216 | ); |
916 | 1217 | |
| 1218 | +/** Turkmen (Türkmençe) |
| 1219 | + * @author Hanberke |
| 1220 | + */ |
| 1221 | +$messages['tk'] = array( |
| 1222 | + 'globalusage' => 'Global faýl ulanyşy', |
| 1223 | + 'globalusage-for' => '"$1" üçin global ulanyş', |
| 1224 | + 'globalusage-desc' => 'Global faýl ulanyşyny görmek üçin [[Special:GlobalUsage|ýörite sahypa]]', |
| 1225 | + 'globalusage-ok' => 'Gözle', |
| 1226 | + 'globalusage-text' => 'Global faýl ulanyşyny gözle', |
| 1227 | + 'globalusage-no-results' => '[[:$1]] başga wikilerde ulanylmaýar.', |
| 1228 | + 'globalusage-on-wiki' => '$2 sahypasynda ulanyş', |
| 1229 | + 'globalusage-of-file' => 'Bu faýl aşakdaky beýleki wikiler tarapyndan ulanylýar:', |
| 1230 | + 'globalusage-more' => 'Bu faýlyň [[{{#Special:GlobalUsage}}/$1|global ulanyşyny]] görkez.', |
| 1231 | + 'globalusage-filterlocal' => 'Ýerli ulanyşy görkezme', |
| 1232 | +); |
| 1233 | + |
917 | 1234 | /** Tagalog (Tagalog) |
918 | 1235 | * @author AnakngAraw |
919 | 1236 | */ |
— | — | @@ -925,20 +1242,51 @@ |
926 | 1243 | |
927 | 1244 | /** Turkish (Türkçe) |
928 | 1245 | * @author Joseph |
| 1246 | + * @author Vito Genovese |
929 | 1247 | */ |
930 | 1248 | $messages['tr'] = array( |
931 | 1249 | 'globalusage' => 'Küresel dosya kullanımı', |
| 1250 | + 'globalusage-for' => '"$1" için küresel kullanım', |
932 | 1251 | 'globalusage-desc' => 'Küresel dosya kullanımını görmek için [[Special:GlobalUsage|özel sayfa]]', |
933 | 1252 | 'globalusage-ok' => 'Ara', |
934 | 1253 | 'globalusage-text' => 'Küresel dosya kullanımını ara.', |
| 1254 | + 'globalusage-no-results' => '[[:$1]] diğer vikilerde kullanılmıyor.', |
| 1255 | + 'globalusage-on-wiki' => '$2 üzerinde [[:File:$1|$1]] adlı dosyanın kullanımı', |
| 1256 | + 'globalusage-of-file' => 'Bu dosya aşağıdaki diğer vikiler tarafından kullanılmaktadır:', |
| 1257 | + 'globalusage-more' => 'Bu dosyanın [[{{#Special:GlobalUsage}}/$1|küresel kullanımını]] gör.', |
| 1258 | + 'globalusage-filterlocal' => 'Yerel kullanımı gösterme', |
935 | 1259 | ); |
936 | 1260 | |
| 1261 | +/** Ukrainian (Українська) |
| 1262 | + * @author NickK |
| 1263 | + */ |
| 1264 | +$messages['uk'] = array( |
| 1265 | + 'globalusage' => 'Глобальне використання файлу', |
| 1266 | + 'globalusage-for' => 'Глобальне використання «$1»', |
| 1267 | + 'globalusage-desc' => '[[Special:GlobalUsage|Спеціальна сторінка]] для перегляду глобального використання файлу', |
| 1268 | + 'globalusage-ok' => 'Пошук', |
| 1269 | + 'globalusage-text' => 'Пошук глобального використання файлу', |
| 1270 | + 'globalusage-no-results' => '[[:$1]] не використовується в інших вікі.', |
| 1271 | + 'globalusage-on-wiki' => 'Використання [[:File:$1|$1]] в $2', |
| 1272 | + 'globalusage-of-file' => 'Цей файл використовують такі інші вікі:', |
| 1273 | + 'globalusage-more' => 'Переглянути [[{{#Special:GlobalUsage}}/$1|повний список глобального використання]] цього файлу.', |
| 1274 | + 'globalusage-filterlocal' => 'Не показувати локальне використання', |
| 1275 | +); |
| 1276 | + |
937 | 1277 | /** Vèneto (Vèneto) |
938 | 1278 | * @author Candalua |
939 | 1279 | */ |
940 | 1280 | $messages['vec'] = array( |
| 1281 | + 'globalusage' => 'Utilizo globale de file', |
| 1282 | + 'globalusage-for' => 'Utilizo globale de "$1"', |
| 1283 | + 'globalusage-desc' => "[[Special:GlobalUsage|Pagina special]] par védar l'utilizo globale dei file", |
941 | 1284 | 'globalusage-ok' => 'Serca', |
942 | 1285 | 'globalusage-text' => 'Serca utilizo globale file', |
| 1286 | + 'globalusage-no-results' => '[[:$1]] no xe mia doparà su de altre wiki.', |
| 1287 | + 'globalusage-on-wiki' => 'Utilizo de [[:File:$1|$1]] su $2', |
| 1288 | + 'globalusage-of-file' => "St'altre wiki qua le dòpara sto file:", |
| 1289 | + 'globalusage-more' => 'Varda i [[{{#Special:GlobalUsage}}/$1|altri utilizi globali]] de sto file.', |
| 1290 | + 'globalusage-filterlocal' => "No stà mostrar l'utilizo local", |
943 | 1291 | ); |
944 | 1292 | |
945 | 1293 | /** Veps (Vepsan kel') |
— | — | @@ -958,7 +1306,11 @@ |
959 | 1307 | 'globalusage-desc' => '[[Special:GlobalUsage|Trang đặc biệt]] để xem tập tin này đang dùng ở đâu trên toàn hệ thống', |
960 | 1308 | 'globalusage-ok' => 'Tìm kiếm', |
961 | 1309 | 'globalusage-text' => 'Tìm cách dùng tập tin toàn cục.', |
962 | | - 'globalusage-on-wiki' => 'Sử dụng [[:File:$1|$1]] tại $2', |
| 1310 | + 'globalusage-no-results' => '[[:$1]] không được sử dụng tại các wiki khác.', |
| 1311 | + 'globalusage-on-wiki' => '$2 sử dụng tại:', |
| 1312 | + 'globalusage-of-file' => 'Các wiki sau đang sử dụng tập tin này:', |
| 1313 | + 'globalusage-more' => 'Xem tập tin này [[{{#Special:GlobalUsage}}/$1|đang dùng ở đâu toàn hệ thống]].', |
| 1314 | + 'globalusage-filterlocal' => 'Ẩn trang nội bộ sử dụng', |
963 | 1315 | ); |
964 | 1316 | |
965 | 1317 | /** Volapük (Volapük) |
— | — | @@ -980,16 +1332,36 @@ |
981 | 1333 | ); |
982 | 1334 | |
983 | 1335 | /** Simplified Chinese (中文(简体)) |
| 1336 | + * @author Gaoxuewei |
984 | 1337 | * @author Gzdavidwong |
985 | 1338 | */ |
986 | 1339 | $messages['zh-hans'] = array( |
| 1340 | + 'globalusage' => '全域文件使用情况', |
| 1341 | + 'globalusage-for' => "全域 ''$1'' 使用情况", |
| 1342 | + 'globalusage-desc' => '[[Special:GlobalUsage|特殊页面]]查看全域文件使用情况', |
987 | 1343 | 'globalusage-ok' => '搜索', |
| 1344 | + 'globalusage-text' => '搜索全域文件使用情况', |
| 1345 | + 'globalusage-no-results' => '[[:$1]]未在其他维基中使用。', |
| 1346 | + 'globalusage-on-wiki' => '$2的使用情况', |
| 1347 | + 'globalusage-of-file' => '本文件也在如下其他维基中使用:', |
| 1348 | + 'globalusage-more' => '查看本文件的[[{{#Special:GlobalUsage}}/$1|更多全域使用情况]]。', |
| 1349 | + 'globalusage-filterlocal' => '不要显示本地使用情况', |
988 | 1350 | ); |
989 | 1351 | |
990 | 1352 | /** Traditional Chinese (中文(繁體)) |
| 1353 | + * @author Gaoxuewei |
991 | 1354 | * @author Wrightbus |
992 | 1355 | */ |
993 | 1356 | $messages['zh-hant'] = array( |
| 1357 | + 'globalusage' => '全域文件使用情況', |
| 1358 | + 'globalusage-for' => "全域 ''$1'' 使用情況", |
| 1359 | + 'globalusage-desc' => '[[Special:GlobalUsage|特殊頁面]]查看全域文件使用情況', |
994 | 1360 | 'globalusage-ok' => '搜尋', |
| 1361 | + 'globalusage-text' => '搜索全域文件使用情況', |
| 1362 | + 'globalusage-no-results' => '[[:$1]]未在其他維基中使用。', |
| 1363 | + 'globalusage-on-wiki' => '$2的使用情況', |
| 1364 | + 'globalusage-of-file' => '本文件也在如下其他維基中使用:', |
| 1365 | + 'globalusage-more' => '查看本文件的[[{{#Special:GlobalUsage}}/$1|更多全域使用情況]]。', |
| 1366 | + 'globalusage-filterlocal' => '不要顯示本地使用情況', |
995 | 1367 | ); |
996 | 1368 | |
Index: branches/wmf-deployment/extensions/GlobalUsage/refreshGlobalimagelinks.php |
— | — | @@ -1,6 +1,12 @@ |
2 | 2 | <?php |
3 | | -require_once( '../../maintenance/Maintenance.php' ); |
| 3 | +$path = '../..'; |
4 | 4 | |
| 5 | +if ( getenv('MW_INSTALL_PATH') !== false ) { |
| 6 | + $path = getenv('MW_INSTALL_PATH'); |
| 7 | +} |
| 8 | + |
| 9 | +require_once( $path.'/maintenance/Maintenance.php' ); |
| 10 | + |
5 | 11 | class RefreshGlobalImageLinks extends Maintenance { |
6 | 12 | public function __construct() { |
7 | 13 | parent::__construct(); |
— | — | @@ -8,23 +14,23 @@ |
9 | 15 | $this->addOption( 'start-image', 'il_to of the image to start with' ); |
10 | 16 | $this->addOption( 'maxlag', 'Maximum replication lag', false, true ); |
11 | 17 | } |
12 | | - |
| 18 | + |
13 | 19 | public function execute() { |
14 | 20 | global $wgGlobalUsageDatabase; |
15 | | - |
| 21 | + |
16 | 22 | $dbr = wfGetDB( DB_SLAVE ); |
17 | | - $gu = new GlobalUsage( wfWikiId(), |
18 | | - wfGetDB( DB_MASTER, array(), $wgGlobalUsageDatabase ) ); |
19 | | - |
| 23 | + $dbw = wfGetDB( DB_MASTER, array(), $wgGlobalUsageDatabase ); |
| 24 | + $gu = new GlobalUsage( wfWikiId(), $dbw ); |
| 25 | + |
20 | 26 | $lastPageId = intval( $this->getOption( 'start-page', 0 ) ); |
21 | 27 | $lastIlTo = $this->getOption( 'start-image' ); |
22 | 28 | $limit = 500; |
23 | | - $maxlag = intval( $this->getOption( 'maxlag', 0 ) ); |
24 | | - |
| 29 | + $maxlag = intval( $this->getOption( 'maxlag', 5 ) ); |
| 30 | + |
25 | 31 | do |
26 | 32 | { |
27 | 33 | $this->output( "Querying links after (page_id, il_to) = ($lastPageId, $lastIlTo)\n" ); |
28 | | - |
| 34 | + |
29 | 35 | # Query all pages and any imagelinks associated with that |
30 | 36 | $quotedLastIlTo = $dbr->addQuotes( $lastIlTo ); |
31 | 37 | $res = $dbr->select( |
— | — | @@ -45,45 +51,48 @@ |
46 | 52 | # from all images, even if they don't have images anymore |
47 | 53 | 'imagelinks' => array( 'LEFT JOIN', 'page_id = il_from' ), |
48 | 54 | # Check to see if images exist locally |
49 | | - 'image' => array( 'LEFT JOIN', 'il_to = img_name' ) |
| 55 | + 'image' => array( 'LEFT JOIN', 'il_to = img_name' ) |
50 | 56 | ) |
51 | 57 | ); |
52 | | - |
| 58 | + |
53 | 59 | # Build up a tree per pages |
54 | 60 | $pages = array(); |
55 | 61 | $lastRow = null; |
56 | 62 | foreach ( $res as $row ) { |
57 | 63 | if ( !isset( $pages[$row->page_id] ) ) |
58 | 64 | $pages[$row->page_id] = array(); |
59 | | - # Add the imagelinks entry to the pages array if the image |
60 | | - # does not exist locally |
| 65 | + # Add the imagelinks entry to the pages array if the image |
| 66 | + # does not exist locally |
61 | 67 | if ( !is_null( $row->il_to ) && is_null( $row->img_name ) ) { |
62 | 68 | $pages[$row->page_id][$row->il_to] = $row; |
63 | 69 | } |
64 | 70 | $lastRow = $row; |
65 | 71 | } |
66 | | - |
| 72 | + |
67 | 73 | # Insert the imagelinks data to the global table |
68 | 74 | foreach ( $pages as $pageId => $rows ) { |
69 | 75 | # Delete all original links if this page is not a continuation |
70 | 76 | # of last iteration. |
71 | 77 | if ( $pageId != $lastPageId ) |
72 | | - $gu->deleteFrom( $pageId ); |
| 78 | + $gu->deleteLinksFromPage( $pageId ); |
73 | 79 | if ( $rows ) { |
74 | 80 | $title = Title::newFromRow( reset( $rows ) ); |
75 | 81 | $images = array_keys( $rows ); |
76 | | - # Since we have a pretty accurate page_id, don't specify |
| 82 | + # Since we have a pretty accurate page_id, don't specify |
77 | 83 | # GAID_FOR_UPDATE |
78 | | - $gu->setUsage( $title, $images, /* $flags */ 0 ); |
| 84 | + $gu->insertLinks( $title, $images, /* $flags */ 0 ); |
79 | 85 | } |
80 | 86 | } |
81 | | - |
| 87 | + |
82 | 88 | if ( $lastRow ) { |
83 | | - # We've processed some rows in this iteration, so save |
| 89 | + # We've processed some rows in this iteration, so save |
84 | 90 | # continuation variables |
85 | 91 | $lastPageId = $lastRow->page_id; |
86 | 92 | $lastIlTo = $lastRow->il_to; |
87 | | - wfWaitForSlaves( $maxlag ); |
| 93 | + |
| 94 | + # Be nice to the database |
| 95 | + $dbw->immediateCommit(); |
| 96 | + wfWaitForSlaves( $maxlag, $wgGlobalUsageDatabase ); |
88 | 97 | } |
89 | 98 | } while ( !is_null( $lastRow ) ); |
90 | 99 | } |
Index: branches/wmf-deployment/extensions/GlobalUsage/ApiQueryGlobalUsage.php |
— | — | @@ -0,0 +1,136 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Created on November 8, 2009 |
| 5 | + * |
| 6 | + * API for MediaWiki 1.8+ |
| 7 | + * |
| 8 | + * Copyright (C) 2009 Bryan Tong Minh <bryan.tongminh@gmail.com> |
| 9 | + * |
| 10 | + * This program is free software; you can redistribute it and/or modify |
| 11 | + * it under the terms of the GNU General Public License as published by |
| 12 | + * the Free Software Foundation; either version 2 of the License, or |
| 13 | + * (at your option) any later version. |
| 14 | + * |
| 15 | + * This program is distributed in the hope that it will be useful, |
| 16 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | + * GNU General Public License for more details. |
| 19 | + * |
| 20 | + * You should have received a copy of the GNU General Public License along |
| 21 | + * with this program; if not, write to the Free Software Foundation, Inc., |
| 22 | + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 23 | + * http://www.gnu.org/copyleft/gpl.html |
| 24 | + */ |
| 25 | + |
| 26 | +if (!defined('MEDIAWIKI')) { |
| 27 | + // Eclipse helper - will be ignored in production |
| 28 | + require_once ( "ApiQueryBase.php" ); |
| 29 | +} |
| 30 | + |
| 31 | +class ApiQueryGlobalUsage extends ApiQueryBase { |
| 32 | + public function __construct( $query, $moduleName ) { |
| 33 | + parent :: __construct( $query, $moduleName, 'gu' ); |
| 34 | + } |
| 35 | + |
| 36 | + public function execute() { |
| 37 | + $params = $this->extractRequestParams(); |
| 38 | + |
| 39 | + $pageIds = $this->getPageSet()->getAllTitlesByNamespace(); |
| 40 | + if ( !empty( $pageIds[NS_FILE] ) ) { |
| 41 | + # Create a query and set parameters |
| 42 | + $pageIds = $pageIds[NS_FILE]; |
| 43 | + $query = new GlobalUsageQuery( array_keys( $pageIds ) ); |
| 44 | + if ( !is_null( $params['continue'] ) ) { |
| 45 | + if ( !$query->setOffset( $params['continue'] ) ) |
| 46 | + $this->dieUsage( 'Invalid continue parameter', 'badcontinue' ); |
| 47 | + } |
| 48 | + $query->setLimit( $params['limit'] ); |
| 49 | + $query->filterLocal( $params['filterlocal'] ); |
| 50 | + |
| 51 | + # Execute the query |
| 52 | + $query->execute(); |
| 53 | + |
| 54 | + # Create the result |
| 55 | + $apiResult = $this->getResult(); |
| 56 | + foreach ( $query->getResult() as $image => $wikis ) { |
| 57 | + $pageId = intval( $pageIds[$image] ); |
| 58 | + foreach ( $wikis as $wiki => $result ) { |
| 59 | + foreach ( $result as $item ) { |
| 60 | + if ( $item['namespace'] ) |
| 61 | + $title = "{$item['namespace']}:{$item['title']}"; |
| 62 | + else |
| 63 | + $title = $item['title']; |
| 64 | + $url = WikiMap::getForeignUrl( $item['wiki'], $title ); |
| 65 | + $fit = $apiResult->addValue( array( |
| 66 | + 'query', 'pages', $pageId, 'globalusage' |
| 67 | + ), null, array( |
| 68 | + 'title' => $title, |
| 69 | + 'url' => $url, |
| 70 | + 'wiki' => WikiMap::getWikiName( $wiki ) |
| 71 | + ) ); |
| 72 | + |
| 73 | + if ( !$fit ) { |
| 74 | + $continue = "{$item['image']}|{$item['wiki']}|{$item['id']}"; |
| 75 | + $this->setIndexedTagName(); |
| 76 | + $this->setContinueEnumParameter( 'continue', $continue ); |
| 77 | + return; |
| 78 | + } |
| 79 | + } |
| 80 | + } |
| 81 | + } |
| 82 | + $this->setIndexedTagName(); |
| 83 | + |
| 84 | + if ( $query->hasMore() ) { |
| 85 | + $this->setContinueEnumParameter( 'continue', $query->getContinueString() ); |
| 86 | + } |
| 87 | + } |
| 88 | + } |
| 89 | + |
| 90 | + private function setIndexedTagName() { |
| 91 | + $result = $this->getResult(); |
| 92 | + $pageIds = $this->getPageSet()->getAllTitlesByNamespace(); |
| 93 | + foreach ( $pageIds[NS_FILE] as $id ) { |
| 94 | + $result->setIndexedTagName_internal( |
| 95 | + array( 'query', 'pages', $id, 'globalusage' ), |
| 96 | + 'gu' |
| 97 | + ); |
| 98 | + } |
| 99 | + } |
| 100 | + |
| 101 | + public function getAllowedParams() { |
| 102 | + return array( |
| 103 | + 'limit' => array( |
| 104 | + ApiBase :: PARAM_DFLT => 10, |
| 105 | + ApiBase :: PARAM_TYPE => 'limit', |
| 106 | + ApiBase :: PARAM_MIN => 1, |
| 107 | + ApiBase :: PARAM_MAX => ApiBase :: LIMIT_BIG1, |
| 108 | + ApiBase :: PARAM_MAX2 => ApiBase :: LIMIT_BIG2 |
| 109 | + ), |
| 110 | + 'continue' => null, |
| 111 | + 'filterlocal' => false, |
| 112 | + ); |
| 113 | + } |
| 114 | + |
| 115 | + public function getParamDescription () { |
| 116 | + return array( |
| 117 | + 'limit' => 'How many links to return', |
| 118 | + 'continue' => 'When more results are available, use this to continue', |
| 119 | + 'filterlocal' => 'Filter local usage of the file', |
| 120 | + ); |
| 121 | + } |
| 122 | + |
| 123 | + public function getDescription() { |
| 124 | + return 'Returns global image usage for a certain image'; |
| 125 | + } |
| 126 | + |
| 127 | + protected function getExamples() { |
| 128 | + return array ( |
| 129 | + "Get usage of File:Example.jpg:", |
| 130 | + " api.php?action=query&prop=globalusage&titles=File:Example.jpg", |
| 131 | + ); |
| 132 | + } |
| 133 | + |
| 134 | + public function getVersion() { |
| 135 | + return __CLASS__ . ': $Id$'; |
| 136 | + } |
| 137 | +} |
\ No newline at end of file |
Property changes on: branches/wmf-deployment/extensions/GlobalUsage/ApiQueryGlobalUsage.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 138 | + native |
Name: svn:keywords |
2 | 139 | + Id |
Index: branches/wmf-deployment/extensions/GlobalUsage/GlobalUsage.php |
— | — | @@ -50,9 +50,12 @@ |
51 | 51 | $wgAutoloadClasses['GlobalUsage'] = $dir . 'GlobalUsage_body.php'; |
52 | 52 | $wgAutoloadClasses['GlobalUsageHooks'] = $dir . 'GlobalUsageHooks.php'; |
53 | 53 | $wgAutoloadClasses['SpecialGlobalUsage'] = $dir . 'SpecialGlobalUsage.php'; |
| 54 | +$wgAutoloadClasses['GlobalUsageQuery'] = $dir . 'GlobalUsageQuery.php'; |
| 55 | +$wgAutoloadClasses['ApiQueryGlobalUsage'] = $dir . 'ApiQueryGlobalUsage.php'; |
54 | 56 | $wgExtensionMessageFiles['GlobalUsage'] = $dir . 'GlobalUsage.i18n.php'; |
55 | 57 | $wgExtensionAliasesFiles['GlobalUsage'] = $dir . 'GlobalUsage.alias.php'; |
56 | 58 | $wgSpecialPages['GlobalUsage'] = 'SpecialGlobalUsage'; |
| 59 | +$wgAPIPropModules['globalusage'] = 'ApiQueryGlobalUsage'; |
57 | 60 | |
58 | 61 | /* Things that can cause link updates: |
59 | 62 | * - Local LinksUpdate |
— | — | @@ -66,6 +69,7 @@ |
67 | 70 | $wgHooks['UploadComplete'][] = 'GlobalUsageHooks::onUploadComplete'; |
68 | 71 | $wgHooks['TitleMoveComplete'][] = 'GlobalUsageHooks::onTitleMoveComplete'; |
69 | 72 | $wgHooks['ImagePageAfterImageLinks'][] = 'SpecialGlobalUsage::onImagePageAfterImageLinks'; |
| 73 | +$wgHooks['ImagePageShowTOC'][] = 'SpecialGlobalUsage::onImagePageShowTOC'; |
70 | 74 | |
71 | 75 | |
72 | 76 | // If set to false, the local database contains the globalimagelinks table |
Index: branches/wmf-deployment/extensions/GlobalUsage/SpecialGlobalUsage.php |
— | — | @@ -6,33 +6,33 @@ |
7 | 7 | class SpecialGlobalUsage extends SpecialPage { |
8 | 8 | public function __construct() { |
9 | 9 | parent::__construct( 'GlobalUsage', 'globalusage' ); |
10 | | - |
| 10 | + |
11 | 11 | wfLoadExtensionMessages( 'globalusage' ); |
12 | 12 | } |
13 | | - |
| 13 | + |
14 | 14 | /** |
15 | 15 | * Entry point |
16 | 16 | */ |
17 | 17 | public function execute( $par ) { |
18 | 18 | global $wgOut, $wgRequest; |
19 | | - |
| 19 | + |
20 | 20 | $target = $par ? $par : $wgRequest->getVal( 'target' ); |
21 | | - $this->target = Title::newFromText( $target, NS_FILE ); |
22 | | - |
| 21 | + $this->target = Title::makeTitleSafe( NS_FILE, $target ); |
| 22 | + |
23 | 23 | $this->filterLocal = $wgRequest->getCheck( 'filterlocal' ); |
24 | | - |
| 24 | + |
25 | 25 | $this->setHeaders(); |
26 | | - |
| 26 | + |
27 | 27 | $this->showForm(); |
28 | | - |
| 28 | + |
29 | 29 | if ( is_null( $this->target ) ) |
30 | 30 | { |
31 | 31 | $wgOut->setPageTitle( wfMsg( 'globalusage' ) ); |
32 | | - return; |
| 32 | + return; |
33 | 33 | } |
34 | | - |
| 34 | + |
35 | 35 | $wgOut->setPageTitle( wfMsg( 'globalusage-for', $this->target->getPrefixedText() ) ); |
36 | | - |
| 36 | + |
37 | 37 | $this->showResult(); |
38 | 38 | } |
39 | 39 | |
— | — | @@ -41,60 +41,76 @@ |
42 | 42 | */ |
43 | 43 | private function showForm() { |
44 | 44 | global $wgScript, $wgOut; |
45 | | - |
| 45 | + |
46 | 46 | $html = Xml::openElement( 'form', array( 'action' => $wgScript ) ) . "\n"; |
47 | 47 | $html .= Xml::hidden( 'title', $this->getTitle()->getPrefixedText() ) . "\n"; |
48 | | - $formContent = "\t" . Xml::input( 'target', 40, is_null( $this->target ) ? '' |
49 | | - : $this->target->getPrefixedText() ) |
50 | | - . "\n\t" . Xml::element( 'input', array( |
51 | | - 'type' => 'submit', |
| 48 | + $formContent = "\t" . Xml::input( 'target', 40, is_null( $this->target ) ? '' |
| 49 | + : $this->target->getPrefixedText() ) |
| 50 | + . "\n\t" . Xml::element( 'input', array( |
| 51 | + 'type' => 'submit', |
52 | 52 | 'value' => wfMsg( 'globalusage-ok' ) |
53 | 53 | ) ) |
54 | 54 | . "\n\t<p>" . Xml::checkLabel( wfMsg( 'globalusage-filterlocal' ), |
55 | | - 'filterlocal', 'mw-filterlocal', $this->filterLocal ) . '</p>'; |
| 55 | + 'filterlocal', 'mw-filterlocal', $this->filterLocal ) . '</p>'; |
| 56 | + if ( !is_null( $this->target ) && wfFindFile( $this->target ) ) { |
| 57 | + global $wgUser, $wgContLang; |
| 58 | + $skin = $wgUser->getSkin(); |
| 59 | + |
| 60 | + $html .= $skin->makeImageLinkObj( $this->target, |
| 61 | + $this->target->getPrefixedText(), |
| 62 | + /* $alt */ '', /* $align */ $wgContLang->alignEnd(), |
| 63 | + /* $handlerParams */ array(), /* $framed */ false, |
| 64 | + /* $thumb */ true ); |
| 65 | + } |
56 | 66 | $html .= Xml::fieldSet( wfMsg( 'globalusage-text' ), $formContent ) . "\n</form>"; |
57 | | - |
| 67 | + |
58 | 68 | $wgOut->addHtml( $html ); |
59 | 69 | } |
60 | | - |
| 70 | + |
61 | 71 | /** |
62 | 72 | * Creates as queryer and executes it based on $wgRequest |
63 | 73 | */ |
64 | 74 | private function showResult() { |
65 | 75 | global $wgRequest; |
66 | | - |
| 76 | + |
67 | 77 | $query = new GlobalUsageQuery( $this->target ); |
68 | | - |
| 78 | + |
69 | 79 | // Extract params from $wgRequest |
70 | | - $query->setContinue( $wgRequest->getInt( 'offset', 0 ) ); |
| 80 | + $query->setOffset( $wgRequest->getText( 'offset' ) ); |
71 | 81 | $query->setLimit( $wgRequest->getInt( 'limit', 50 ) ); |
72 | 82 | $query->filterLocal( $this->filterLocal ); |
73 | | - |
| 83 | + |
74 | 84 | // Perform query |
75 | 85 | $query->execute(); |
76 | | - |
| 86 | + |
77 | 87 | // Show result |
78 | 88 | global $wgOut; |
79 | | - |
80 | | - $navbar = wfViewPrevNext( $query->getOffset(), $query->getLimit(), $this->getTitle(), |
81 | | - 'target=' . $this->target->getPrefixedText(), !$query->hasMore() ); |
| 89 | + |
| 90 | + // Don't show form element if there is no data |
| 91 | + if ( $query->count() == 0 ) { |
| 92 | + $wgOut->addWikiMsg( 'globalusage-no-results', $this->target->getPrefixedText() ); |
| 93 | + return; |
| 94 | + } |
| 95 | + |
| 96 | + $offset = $query->getOffsetString(); |
| 97 | + $navbar = $this->getNavBar( $query ); |
82 | 98 | $targetName = $this->target->getText(); |
83 | | - |
| 99 | + |
84 | 100 | $wgOut->addHtml( $navbar ); |
85 | | - |
| 101 | + |
86 | 102 | $wgOut->addHtml( '<div id="mw-globalusage-result">' ); |
87 | | - foreach ( $query->getResult() as $wiki => $result ) { |
88 | | - $wgOut->addHtml( |
89 | | - '<h2>' . wfMsgExt( |
| 103 | + foreach ( $query->getSingleImageResult() as $wiki => $result ) { |
| 104 | + $wgOut->addHtml( |
| 105 | + '<h2>' . wfMsgExt( |
90 | 106 | 'globalusage-on-wiki', 'parseinline', |
91 | | - $targetName, $wiki ) |
| 107 | + $targetName, WikiMap::getWikiName( $wiki ) ) |
92 | 108 | . "</h2><ul>\n" ); |
93 | 109 | foreach ( $result as $item ) |
94 | 110 | $wgOut->addHtml( "\t<li>" . self::formatItem( $item ) . "</li>\n" ); |
95 | 111 | $wgOut->addHtml( "</ul>\n" ); |
96 | 112 | } |
97 | 113 | $wgOut->addHtml( '</div>' ); |
98 | | - |
| 114 | + |
99 | 115 | $wgOut->addHtml( $navbar ); |
100 | 116 | } |
101 | 117 | /** |
— | — | @@ -106,154 +122,128 @@ |
107 | 123 | $page = $item['title']; |
108 | 124 | else |
109 | 125 | $page = "{$item['namespace']}:{$item['title']}"; |
110 | | - |
111 | | - $wiki = WikiMap::getWiki( $item['wiki'] ); |
112 | | - |
113 | | - return WikiMap::makeForeignLink( $item['wiki'], |
| 126 | + |
| 127 | + return WikiMap::makeForeignLink( $item['wiki'], $page, |
114 | 128 | str_replace( '_', ' ', $page ) ); |
115 | 129 | } |
| 130 | + |
| 131 | + |
| 132 | + private static $queryCache = array(); |
| 133 | + /** |
| 134 | + * Get an executed query for use on image pages |
| 135 | + * |
| 136 | + * @param Title $title File to query for |
| 137 | + * @return GlobalUsageQuery Query object, already executed |
| 138 | + */ |
| 139 | + private static function getImagePageQuery( $title ) { |
| 140 | + $name = $title->getDBkey(); |
| 141 | + if ( !isset( self::$queryCache[$name] ) ) { |
| 142 | + $query = new GlobalUsageQuery( $title ); |
| 143 | + $query->filterLocal(); |
| 144 | + $query->execute(); |
| 145 | + |
| 146 | + self::$queryCache[$name] = $query; |
| 147 | + |
| 148 | + // Limit cache size to 100 |
| 149 | + if ( count( self::$queryCache ) > 100 ) |
| 150 | + array_shift( self::$queryCache ); |
| 151 | + } |
| 152 | + |
| 153 | + return self::$queryCache[$name]; |
| 154 | + } |
116 | 155 | |
117 | 156 | public static function onImagePageAfterImageLinks( $imagePage, &$html ) { |
118 | 157 | $title = $imagePage->getFile()->getTitle(); |
119 | 158 | $targetName = $title->getText(); |
120 | | - |
121 | | - $query = new GlobalUsageQuery( $title ); |
122 | | - $query->filterLocal(); |
123 | | - $query->execute(); |
124 | | - |
| 159 | + |
| 160 | + $query = self::getImagePageQuery( $title ); |
| 161 | + |
125 | 162 | $guHtml = ''; |
126 | | - foreach ( $query->getResult() as $wiki => $result ) { |
| 163 | + foreach ( $query->getSingleImageResult() as $wiki => $result ) { |
127 | 164 | $guHtml .= '<li>' . wfMsgExt( |
128 | 165 | 'globalusage-on-wiki', 'parseinline', |
129 | | - $targetName, $wiki ) . "\n<ul>"; |
| 166 | + $targetName, WikiMap::getWikiName( $wiki ) ) . "\n<ul>"; |
130 | 167 | foreach ( $result as $item ) |
131 | 168 | $guHtml .= "\t<li>" . self::formatItem( $item ) . "</li>\n"; |
132 | 169 | $guHtml .= "</ul></li>\n"; |
133 | 170 | } |
134 | | - |
| 171 | + |
135 | 172 | if ( $guHtml ) { |
136 | | - $html .= "<h2>" . wfMsgHtml( 'globalusage' ) . "</h2>\n" |
| 173 | + $html .= '<h2 id="globalusage">' . wfMsgHtml( 'globalusage' ) . "</h2>\n" |
137 | 174 | . wfMsgExt( 'globalusage-of-file', 'parse' ) |
138 | 175 | . "<ul>\n" . $guHtml . "</ul>\n"; |
139 | 176 | if ( $query->hasMore() ) |
140 | 177 | $html .= wfMsgExt( 'globalusage-more', 'parse', $targetName ); |
141 | 178 | } |
142 | 179 | |
143 | | - |
| 180 | + |
144 | 181 | return true; |
145 | 182 | } |
146 | | -} |
147 | 183 | |
148 | | - |
149 | | - |
150 | | -/** |
151 | | - * A helper class to query the globalimagelinks table |
152 | | - * |
153 | | - * Should maybe simply resort to offset/limit query rather |
154 | | - */ |
155 | | -class GlobalUsageQuery { |
156 | | - private $limit = 50; |
157 | | - private $offset = 0; |
158 | | - private $hasMore = false; |
159 | | - private $filterLocal = false; |
160 | | - private $result; |
161 | | - |
162 | | - |
163 | | - public function __construct( $target ) { |
164 | | - global $wgGlobalUsageDatabase; |
165 | | - $this->db = wfGetDB( DB_SLAVE, array(), $wgGlobalUsageDatabase ); |
166 | | - $this->target = $target; |
167 | | - |
168 | | - } |
169 | | - |
170 | 184 | /** |
171 | | - * Set the offset parameter |
172 | | - * |
173 | | - * @param $offset int offset |
| 185 | + * Show a link to the global image links in the TOC if there are any results available. |
174 | 186 | */ |
175 | | - public function setContinue( $offset ) { |
176 | | - $this->offset = $offset; |
| 187 | + public static function onImagePageShowTOC( $imagePage, &$toc ) { |
| 188 | + $query = self::getImagePageQuery( $imagePage->getFile()->getTitle() ); |
| 189 | + if ( $query->getResult() ) |
| 190 | + $toc[] = '<li><a href="#globalusage">' . wfMsgHtml( 'globalusage' ) . '</a></li>'; |
| 191 | + return true; |
177 | 192 | } |
178 | | - /** |
179 | | - * Return the offset set by the user |
180 | | - * |
181 | | - * @return int offset |
182 | | - */ |
183 | | - public function getOffset() { |
184 | | - return $this->offset; |
185 | | - } |
186 | | - /** |
187 | | - * Set the maximum amount of items to return. Capped at 500. |
188 | | - * |
189 | | - * @param $limit int The limit |
190 | | - */ |
191 | | - public function setLimit( $limit ) { |
192 | | - $this->limit = min( $limit, 500 ); |
193 | | - } |
194 | | - public function getLimit() { |
195 | | - return $this->limit; |
196 | | - } |
197 | | - |
198 | | - /** |
199 | | - * Set whether to filter out the local usage |
200 | | - */ |
201 | | - public function filterLocal( $value = true ) { |
202 | | - $this->filterLocal = $value; |
203 | | - } |
204 | | - |
205 | | - |
206 | | - /** |
207 | | - * Executes the query |
208 | | - */ |
209 | | - public function execute() { |
210 | | - $where = array( 'gil_to' => $this->target->getDBkey() ); |
211 | | - if ( $this->filterLocal ) |
212 | | - $where[] = 'gil_wiki != ' . $this->db->addQuotes( wfWikiId() ); |
213 | | - |
214 | | - $res = $this->db->select( 'globalimagelinks', |
215 | | - array( |
216 | | - 'gil_wiki', |
217 | | - 'gil_page', |
218 | | - 'gil_page_namespace', |
219 | | - 'gil_page_title' |
220 | | - ), |
221 | | - $where, |
222 | | - __METHOD__, |
223 | | - array( |
224 | | - 'ORDER BY' => 'gil_wiki, gil_page', |
225 | | - 'LIMIT' => $this->limit + 1, |
226 | | - 'OFFSET' => $this->offset, |
227 | | - ) |
228 | | - ); |
229 | | - |
230 | | - $count = 0; |
231 | | - $this->hasMore = false; |
232 | | - $this->result = array(); |
233 | | - foreach ( $res as $row ) { |
234 | | - $count++; |
235 | | - if ( $count > $this->limit ) { |
236 | | - $this->hasMore = true; |
237 | | - break; |
238 | | - } |
239 | | - if ( !isset( $this->result[$row->gil_wiki] ) ) |
240 | | - $this->result[$row->gil_wiki] = array(); |
241 | | - $this->result[$row->gil_wiki][] = array( |
242 | | - 'namespace' => $row->gil_page_namespace, |
243 | | - 'title' => $row->gil_page_title, |
244 | | - 'wiki' => $row->gil_wiki, |
245 | | - ); |
| 193 | + |
| 194 | + protected function getNavBar( $query ) { |
| 195 | + global $wgLang, $wgUser; |
| 196 | + |
| 197 | + $skin = $wgUser->getSkin(); |
| 198 | + |
| 199 | + $target = $this->target->getPrefixedText(); |
| 200 | + $limit = $query->getLimit(); |
| 201 | + $fmtLimit = $wgLang->formatNum( $limit ); |
| 202 | + $offset = $query->getOffsetString(); |
| 203 | + if ( $offset == '||' ) |
| 204 | + $offset = ''; |
| 205 | + |
| 206 | + # Get prev/next link display text |
| 207 | + $prev = wfMsgExt( 'prevn', array('parsemag','escape'), $fmtLimit ); |
| 208 | + $next = wfMsgExt( 'nextn', array('parsemag','escape'), $fmtLimit ); |
| 209 | + # Get prev/next link title text |
| 210 | + $pTitle = wfMsgExt( 'prevn-title', array('parsemag','escape'), $fmtLimit ); |
| 211 | + $nTitle = wfMsgExt( 'nextn-title', array('parsemag','escape'), $fmtLimit ); |
| 212 | + |
| 213 | + # Fetch the title object |
| 214 | + $title = $this->getTitle(); |
| 215 | + |
| 216 | + # Make 'previous' link |
| 217 | + if ( $offset ) { |
| 218 | + $attr = array( 'title' => $pTitle, 'class' => 'mw-prevlink' ); |
| 219 | + $q = array( 'limit' => $limit, 'offset' => $offset, 'target' => $target ); |
| 220 | + $plink = $skin->link( $title, $prev, $attr, $q ); |
| 221 | + } else { |
| 222 | + $plink = $prev; |
246 | 223 | } |
| 224 | + |
| 225 | + # Make 'next' link |
| 226 | + if ( $query->hasMore() ) { |
| 227 | + $attr = array( 'title' => $nTitle, 'class' => 'mw-nextlink' ); |
| 228 | + $q = array( 'limit' => $limit, 'offset' => $query->getContinueString(), 'target' => $target ); |
| 229 | + $nlink = $skin->link( $title, $next, $attr, $q ); |
| 230 | + } else { |
| 231 | + $nlink = $next; |
| 232 | + } |
| 233 | + |
| 234 | + # Make links to set number of items per page |
| 235 | + $numLinks = array(); |
| 236 | + foreach ( array( 20, 50, 100, 250, 500 ) as $num ) { |
| 237 | + $fmtLimit = $wgLang->formatNum( $num ); |
| 238 | + |
| 239 | + $q = array( 'offset' => $offset, 'limit' => $num, 'target' => $target ); |
| 240 | + $lTitle = wfMsgExt( 'shown-title', array( 'parsemag', 'escape' ), $num ); |
| 241 | + $attr = array( 'title' => $lTitle, 'class' => 'mw-numlink' ); |
| 242 | + |
| 243 | + $numLinks[] = $skin->link( $title, $fmtLimit, $attr, $q ); |
| 244 | + } |
| 245 | + $nums = $wgLang->pipeList( $numLinks ); |
| 246 | + |
| 247 | + return wfMsgHtml( 'viewprevnext', $plink, $nlink, $nums ); |
247 | 248 | } |
248 | | - public function getResult() { |
249 | | - return $this->result; |
250 | | - } |
251 | | - |
252 | | - /** |
253 | | - * Returns whether there are more results |
254 | | - * |
255 | | - * @return bool |
256 | | - */ |
257 | | - public function hasMore() { |
258 | | - return $this->hasMore; |
259 | | - } |
260 | 249 | } |
| 250 | + |
Property changes on: branches/wmf-deployment/extensions/GlobalUsage |
___________________________________________________________________ |
Name: svn:mergeinfo |
261 | 251 | - /branches/REL1_15/phase3/extensions/GlobalUsage:51646 |
/trunk/extensions/GlobalUsage:56207,56209,56296,56333,56355,58660-58739,58752 |
/trunk/phase3/extensions/GlobalUsage:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816 |
262 | 252 | + /branches/REL1_15/phase3/extensions/GlobalUsage:51646 |
/trunk/extensions/GlobalUsage:56207,56209,56296,56333,56355,58660-60605 |
/trunk/phase3/extensions/GlobalUsage:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816 |