r34221 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34220‎ | r34221 | r34222 >
Date:18:25, 4 May 2008
Author:siebrand
Status:old
Tags:
Comment:
Some whitespace and indentation fixes
Modified paths:
  • /trunk/extensions/APC/APCCacheMode.php (modified) (history)
  • /trunk/extensions/APC/APCHostMode.php (modified) (history)
  • /trunk/extensions/APC/APCImages.php (modified) (history)
  • /trunk/extensions/APC/APCUtils.php (modified) (history)
  • /trunk/extensions/APC/SpecialAPC.php (modified) (history)
  • /trunk/extensions/APC/ViewAPC.i18n.php (modified) (history)
  • /trunk/extensions/APC/ViewAPC.php (modified) (history)
  • /trunk/extensions/APC/apc.css (modified) (history)

Diff [purge]

Index: trunk/extensions/APC/APCImages.php
@@ -219,7 +219,5 @@
220220 }
221221
222222 return imagepng( $image );
223 -
224223 }
225 -
226 -}
\ No newline at end of file
 224+}
Index: trunk/extensions/APC/APCCacheMode.php
@@ -285,4 +285,4 @@
286286
287287 return $s;
288288 }
289 -}
\ No newline at end of file
 289+}
Index: trunk/extensions/APC/ViewAPC.i18n.php
@@ -3,126 +3,126 @@
44 $messages = array();
55
66 $messages['en'] = array(
7 -'viewapc' => 'APC information',
8 -'viewapc-desc' => 'View and manage APC cache with MediaWiki',
9 -'right-apc' => 'Use all features in Special:APC',
 7+ 'viewapc' => 'APC information',
 8+ 'viewapc-desc' => '[[Special:ViewAPC|View and manage APC cache]] with MediaWiki',
 9+ 'right-apc' => 'Use all features in Special:APC',
1010
11 -'viewapc-apc-not-available' => 'No cache info available. APC does not appear to be running.',
12 -'viewapc-clear-confirm' => 'Do you want to clear the cache?',
13 -'viewapc-clear-user-cache' => 'Clear user cache',
14 -'viewapc-clear-code-cache' => 'Clear opcode cache',
 11+ 'viewapc-apc-not-available' => 'No cache info available.
 12+APC does not appear to be running.',
 13+ 'viewapc-clear-confirm' => 'Do you want to clear the cache?',
 14+ 'viewapc-clear-user-cache' => 'Clear user cache',
 15+ 'viewapc-clear-code-cache' => 'Clear opcode cache',
1516
16 -'viewapc-mode-stats' => 'View host stats',
17 -'viewapc-mode-system-cache' => 'System cache entries',
18 -'viewapc-mode-system-cache-dir' => 'Per-directory entries',
19 -'viewapc-mode-user-cache' => 'User cache entries',
20 -'viewapc-mode-version-check' => 'Check version',
 17+ 'viewapc-mode-stats' => 'View host stats',
 18+ 'viewapc-mode-system-cache' => 'System cache entries',
 19+ 'viewapc-mode-system-cache-dir' => 'Per-directory entries',
 20+ 'viewapc-mode-user-cache' => 'User cache entries',
 21+ 'viewapc-mode-version-check' => 'Check version',
2122
22 -'viewapc-info-general' => 'General information',
23 -'viewapc-apc-version' => 'APC version',
24 -'viewapc-php-version' => 'PHP version',
25 -'viewapc-shared-memory' => 'Shared memory',
26 -'viewapc-shared-memory-details' => '{{PLURAL:$1|1 segment of $2|$1 segments $2 each}}.<br />
 23+ 'viewapc-info-general' => 'General information',
 24+ 'viewapc-apc-version' => 'APC version',
 25+ 'viewapc-php-version' => 'PHP version',
 26+ 'viewapc-shared-memory' => 'Shared memory',
 27+ 'viewapc-shared-memory-details' => '{{PLURAL:$1|1 segment of $2|$1 segments $2 each}}.<br />
2728 ($3 memory, $4 locking)',
28 -'viewapc-start-time' => 'Start time',
29 -'viewapc-uptime' => 'Uptime',
30 -'viewapc-upload-support' => 'File upload support',
 29+ 'viewapc-start-time' => 'Start time',
 30+ 'viewapc-uptime' => 'Uptime',
 31+ 'viewapc-upload-support' => 'File upload support',
3132
32 -'viewapc-filecache-info' => 'File cache information',
33 -'viewapc-usercache-info' => 'User cache information',
34 -'viewapc-cached-files' => 'Cached files',
35 -'viewapc-cached-files-d' => '$1 {{PLURAL:$1|file|files}} ($2)',
36 -'viewapc-hits' => 'Hits',
37 -'viewapc-misses' => 'Misses',
38 -'viewapc-requests' => 'Request rate',
39 -'viewapc-hitrate' => 'Hit rate',
40 -'viewapc-missrate' => 'Miss rate',
41 -'viewapc-insertrate' => 'Insertion rate',
42 -'viewapc-cachefull' => 'Cache full count',
43 -'viewapc-rps' => '$1 requests per second',
 33+ 'viewapc-filecache-info' => 'File cache information',
 34+ 'viewapc-usercache-info' => 'User cache information',
 35+ 'viewapc-cached-files' => 'Cached files',
 36+ 'viewapc-cached-files-d' => '$1 {{PLURAL:$1|file|files}} ($2)',
 37+ 'viewapc-hits' => 'Hits',
 38+ 'viewapc-misses' => 'Misses',
 39+ 'viewapc-requests' => 'Request rate',
 40+ 'viewapc-hitrate' => 'Hit rate',
 41+ 'viewapc-missrate' => 'Miss rate',
 42+ 'viewapc-insertrate' => 'Insertion rate',
 43+ 'viewapc-cachefull' => 'Cache full count',
 44+ 'viewapc-rps' => '$1 requests per second',
4445
45 -'viewapc-info-runtime' => 'Runtime information',
 46+ 'viewapc-info-runtime' => 'Runtime information',
4647
47 -'viewapc-info-memory' => 'Host status diagrams',
48 -'viewapc-memory-usage-detailed' => 'Memory Usage<br />
 48+ 'viewapc-info-memory' => 'Host status diagrams',
 49+ 'viewapc-memory-usage-detailed' => 'Memory Usage<br />
4950 (multiple slices indicate fragments)',
50 -'viewapc-memory-usage' => 'Memory Usage',
51 -'viewapc-cache-efficiency' => 'Hits and misses',
 51+ 'viewapc-memory-usage' => 'Memory Usage',
 52+ 'viewapc-cache-efficiency' => 'Hits and misses',
5253
53 -'viewapc-memory-free' => 'Free: $1 ($2)',
54 -'viewapc-memory-used' => 'Used: $1 ($2)',
55 -'viewapc-memory-hits' => 'Hits: $1 ($2)',
56 -'viewapc-memory-miss' => 'Misses: $1 ($2)',
 54+ 'viewapc-memory-free' => 'Free: $1 ($2)',
 55+ 'viewapc-memory-used' => 'Used: $1 ($2)',
 56+ 'viewapc-memory-hits' => 'Hits: $1 ($2)',
 57+ 'viewapc-memory-miss' => 'Misses: $1 ($2)',
5758
58 -'viewapc-memoryfragmentation' => 'Detailed memory usage and fragmentation',
59 -'viewapc-fragmentation-info' => 'Fragmentation: $1 ($2 out of $3 in $4 {{PLURAL:$4|fragment|fragments}})',
60 -'viewapc-fragmentation-none' => 'Fragmentation: no fragmentation',
 59+ 'viewapc-memoryfragmentation' => 'Detailed memory usage and fragmentation',
 60+ 'viewapc-fragmentation-info' => 'Fragmentation: $1 ($2 out of $3 in $4 {{PLURAL:$4|fragment|fragments}})',
 61+ 'viewapc-fragmentation-none' => 'Fragmentation: no fragmentation',
6162
62 -'viewapc-display-attribute' => 'Attribute',
63 -'viewapc-display-value' => 'Value',
 63+ 'viewapc-display-attribute' => 'Attribute',
 64+ 'viewapc-display-value' => 'Value',
6465
65 -'viewapc-display-filename' => 'Filename',
66 -'viewapc-display-device' => 'Device',
67 -'viewapc-display-info' => 'Name',
68 -'viewapc-display-ttl' => 'Expiry time',
69 -'viewapc-display-inode' => 'Inode',
70 -'viewapc-display-type' => 'Type',
71 -'viewapc-display-type-file' => 'Cached file',
72 -'viewapc-display-type-user' => 'Cached application data',
73 -'viewapc-display-num_hits' => 'Hits',
74 -'viewapc-display-mtime' => 'Modified',
75 -'viewapc-display-creation_time' => 'Created',
76 -'viewapc-display-deletion_time' => 'Deleted',
77 -'viewapc-display-no-delete' => 'Not deleted',
78 -'viewapc-display-access_time' => 'Accessed',
79 -'viewapc-display-ref_count' => 'Reference count',
80 -'viewapc-display-mem_size' => 'Size',
81 -'viewapc-display-stored-value' => 'Stored value',
 66+ 'viewapc-display-filename' => 'Filename',
 67+ 'viewapc-display-device' => 'Device',
 68+ 'viewapc-display-info' => 'Name',
 69+ 'viewapc-display-ttl' => 'Expiry time',
 70+ 'viewapc-display-inode' => 'Inode',
 71+ 'viewapc-display-type' => 'Type',
 72+ 'viewapc-display-type-file' => 'Cached file',
 73+ 'viewapc-display-type-user' => 'Cached application data',
 74+ 'viewapc-display-num_hits' => 'Hits',
 75+ 'viewapc-display-mtime' => 'Modified',
 76+ 'viewapc-display-creation_time' => 'Created',
 77+ 'viewapc-display-deletion_time' => 'Deleted',
 78+ 'viewapc-display-no-delete' => 'Not deleted',
 79+ 'viewapc-display-access_time' => 'Accessed',
 80+ 'viewapc-display-ref_count' => 'Reference count',
 81+ 'viewapc-display-mem_size' => 'Size',
 82+ 'viewapc-display-stored-value' => 'Stored value',
8283
83 -'viewapc-ls-options-legend' => 'Options',
84 -'viewapc-ls-options' => 'Scope: $1 Sorting: $2$3$4 Search: $5 $6',
85 -'viewapc-ls-submit' => 'Go!',
 84+ 'viewapc-ls-options-legend' => 'Options',
 85+ 'viewapc-ls-options' => 'Scope: $1 Sorting: $2$3$4 Search: $5 $6',
 86+ 'viewapc-ls-submit' => 'Go!',
8687
87 -'viewapc-ls-header-name' => 'Name',
88 -'viewapc-ls-header-hits' => 'Hits',
89 -'viewapc-ls-header-size' => 'Size',
90 -'viewapc-ls-header-accessed' => 'Last accessed',
91 -'viewapc-ls-header-modified' => 'Last modified',
92 -'viewapc-ls-header-created' => 'Created',
93 -'viewapc-ls-header-deleted' => 'Deleted',
94 -'viewapc-ls-header-timeout' => 'Timeout',
 88+ 'viewapc-ls-header-name' => 'Name',
 89+ 'viewapc-ls-header-hits' => 'Hits',
 90+ 'viewapc-ls-header-size' => 'Size',
 91+ 'viewapc-ls-header-accessed' => 'Last accessed',
 92+ 'viewapc-ls-header-modified' => 'Last modified',
 93+ 'viewapc-ls-header-created' => 'Created',
 94+ 'viewapc-ls-header-deleted' => 'Deleted',
 95+ 'viewapc-ls-header-timeout' => 'Timeout',
9596
96 -'viewapc-ls-delete' => '[Delete now]',
 97+ 'viewapc-ls-delete' => '[Delete now]',
9798
98 -'viewapc-ls-scope-active' => 'Active',
99 -'viewapc-ls-scope-deleted' => 'Deleted',
100 -'viewapc-ls-scope-both' => 'Both',
 99+ 'viewapc-ls-scope-active' => 'Active',
 100+ 'viewapc-ls-scope-deleted' => 'Deleted',
 101+ 'viewapc-ls-scope-both' => 'Both',
101102
 103+ 'viewapc-ls-sort-hits' => 'Hits',
 104+ 'viewapc-ls-sort-size' => 'Size',
 105+ 'viewapc-ls-sort-name' => 'Name',
 106+ 'viewapc-ls-sort-accessed' => 'Last accessed',
 107+ 'viewapc-ls-sort-modified' => 'Last modified',
 108+ 'viewapc-ls-sort-created' => 'Created',
 109+ 'viewapc-ls-sort-deleted' => 'Deleted',
 110+ 'viewapc-ls-sort-timeout' => 'Timeout',
102111
103 -'viewapc-ls-sort-hits' => 'Hits',
104 -'viewapc-ls-sort-size' => 'Size',
105 -'viewapc-ls-sort-name' => 'Name',
106 -'viewapc-ls-sort-accessed' => 'Last accessed',
107 -'viewapc-ls-sort-modified' => 'Last modified',
108 -'viewapc-ls-sort-created' => 'Created',
109 -'viewapc-ls-sort-deleted' => 'Deleted',
110 -'viewapc-ls-sort-timeout' => 'Timeout',
 112+ 'viewapc-ls-limit-none' => 'All',
 113+ 'viewapc-ls-more' => "''There is $1 more {{PLURAL:$1|entry|entries}}''",
 114+ 'viewapc-ls-nodata' => "''No matching data''",
111115
112 -'viewapc-ls-limit-none' => 'All',
113 -'viewapc-ls-more' => "''There is $1 more {{PLURAL:$1|entry|entries}}''",
114 -'viewapc-ls-nodata' => "''No matching data''",
 116+ 'viewapc-delete-ok' => 'Cache entry <nowiki>$1</nowiki> is deleted.',
 117+ 'viewapc-delete-failed' => 'Failed to delete cache entry <nowiki>$1</nowiki>.',
115118
116 -'viewapc-delete-ok' => 'Cache entry <nowiki>$1</nowiki> is deleted.',
117 -'viewapc-delete-failed' => 'Failed to delete cache entry <nowiki>$1</nowiki>.',
118 -
119 -'viewapc-version-info' => 'Version information',
120 -'viewapc-version-changelog' => 'Changelog',
121 -'viewapc-version-failed' => 'Unable to fetch version information.',
122 -'viewapc-version-ok' => 'You are running the latest version of APC ($1)',
123 -'viewapc-version-old' => 'You are running an older version of APC ($1).
 119+ 'viewapc-version-info' => 'Version information',
 120+ 'viewapc-version-changelog' => 'Changelog',
 121+ 'viewapc-version-failed' => 'Unable to fetch version information.',
 122+ 'viewapc-version-ok' => 'You are running the latest version of APC ($1)',
 123+ 'viewapc-version-old' => 'You are running an older version of APC ($1).
124124 Newer version $2 is available at http://pecl.php.net/package/APC/$2',
125125
126 -'viewapc-filecache-cleared' => "'''''File cache cleared.'''''",
127 -'viewapc-usercache-cleared' => "'''''Application cache cleared.'''''",
 126+ 'viewapc-filecache-cleared' => "'''''File cache cleared.'''''",
 127+ 'viewapc-usercache-cleared' => "'''''Application cache cleared.'''''",
128128
129129 );
Index: trunk/extensions/APC/ViewAPC.php
@@ -9,12 +9,10 @@
1010 * @copyright Copyright © 2008, Niklas Laxström
1111 */
1212
13 -
1413 $wgExtensionCredits['specialpage'][] = array(
1514 'name' => 'Apc',
1615 'version' => '2008-05-04',
1716 'author' => 'Niklas Laxström',
18 - 'description' => '[[Special:ViewAPC|Special page]] for viewing memory cache',
1917 'descriptionmsg' => 'viewapc-desc',
2018 );
2119
Index: trunk/extensions/APC/APCUtils.php
@@ -27,5 +27,4 @@
2828 return wfMsgExt( 'viewapc-rps', 'parsemag',
2929 $wgLang->formatNum( sprintf("%.2f", $number ), true ) );
3030 }
31 -
32 -}
\ No newline at end of file
 31+}
Index: trunk/extensions/APC/SpecialAPC.php
@@ -95,7 +95,7 @@
9696 }
9797 }
9898
99 -
 99+
100100 $dir = dirname( __FILE__ );
101101 $wgOut->addLink( array( 'rel' => 'stylesheet', 'type' => 'text/css',
102102 'href' => "$wgScriptPath/extensions/APC/apc.css?$wgStyleVersion", )
@@ -112,7 +112,7 @@
113113 return Xml::element( 'a', array( 'href' => $target ) + $attribs, $name );
114114 }
115115
116 - protected function getSelfURL( $overrides ) {
 116+ protected function getSelfURL( $overrides ) {
117117 $changed = $this->opts->getUnconsumedValues();
118118 $target = $this->title->getLocalURL( wfArrayToCGI( $overrides, $changed ) );
119119 return $target;
@@ -150,8 +150,8 @@
151151 }
152152
153153 protected function mainMenu() {
154 -
155154
 155+
156156 $clearParams = array(
157157 'clearcache' => 1,
158158 );
@@ -265,5 +265,4 @@
266266 }
267267 }
268268 }
269 -
270 -}
\ No newline at end of file
 269+}
Index: trunk/extensions/APC/apc.css
@@ -37,7 +37,7 @@
3838 margin-top:1px;
3939 padding:0;
4040 }
41 -
 41+
4242 .mw-apc-stats {
4343 background:rgb(238,238,238);
4444 border:solid rgb(238,238,238) 1px;
Index: trunk/extensions/APC/APCHostMode.php
@@ -199,4 +199,4 @@
200200 $s .= APCUtils::tableFooter();
201201 return $s;
202202 }
203 -}
\ No newline at end of file
 203+}

Status & tagging log