r6695 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r6694‎ | r6695 | r6696 >
Date:02:34, 18 December 2004
Author:zhengzhu
Status:old
Tags:
Comment:
Follow naming convention for class members.
Modified paths:
  • /branches/REL1_4/phase3/includes/ZhClient.php (modified) (history)

Diff [purge]

Index: branches/REL1_4/phase3/includes/ZhClient.php
@@ -148,20 +148,20 @@
149149 class ZhClientFake {
150150 function ZhClientFake() {
151151 global $wgMemc, $wgDBname;
152 - $this->zh2TW = $wgMemc->get($key1 = "$wgDBname:zhConvert:tw");
153 - $this->zh2CN = $wgMemc->get($key2 = "$wgDBname:zhConvert:cn");
154 - $this->zh2SG = $wgMemc->get($key3 = "$wgDBname:zhConvert:sg");
155 - $this->zh2HK = $wgMemc->get($key4 = "$wgDBname:zhConvert:hk");
156 - if(empty($this->zh2TW) || empty($this->zh2CN) || empty($this->zh2SG) || empty($this->zh2HK)) {
 152+ $this->mZh2TW = $wgMemc->get($key1 = "$wgDBname:zhConvert:tw");
 153+ $this->mZh2CN = $wgMemc->get($key2 = "$wgDBname:zhConvert:cn");
 154+ $this->mZh2SG = $wgMemc->get($key3 = "$wgDBname:zhConvert:sg");
 155+ $this->mZh2HK = $wgMemc->get($key4 = "$wgDBname:zhConvert:hk");
 156+ if(empty($this->mZh2TW) || empty($this->mZh2CN) || empty($this->mZh2SG) || empty($this->mZh2HK)) {
157157 require("includes/ZhConversion.php");
158 - $this->zh2TW = $zh2TW;
159 - $this->zh2CN = $zh2CN;
160 - $this->zh2HK = $zh2HK;
161 - $this->zh2SG = $zh2SG;
162 - $wgMemc->set($key1, $this->zh2TW);
163 - $wgMemc->set($key2, $this->zh2CN);
164 - $wgMemc->set($key3, $this->zh2SG);
165 - $wgMemc->set($key4, $this->zh2HK);
 158+ $this->mZh2TW = $zh2TW;
 159+ $this->mZh2CN = $zh2CN;
 160+ $this->mZh2HK = $zh2HK;
 161+ $this->mZh2SG = $zh2SG;
 162+ $wgMemc->set($key1, $this->mZh2TW);
 163+ $wgMemc->set($key2, $this->mZh2CN);
 164+ $wgMemc->set($key3, $this->mZh2SG);
 165+ $wgMemc->set($key4, $this->mZh2HK);
166166 }
167167 }
168168
@@ -175,7 +175,7 @@
176176 * @access private
177177 */
178178 function zh2tw($text) {
179 - return strtr($text, $this->zh2TW);
 179+ return strtr($text, $this->mZh2TW);
180180 }
181181
182182 /**
@@ -184,7 +184,7 @@
185185 * @access private
186186 */
187187 function zh2cn($text) {
188 - return strtr($text, $this->zh2CN);
 188+ return strtr($text, $this->mZh2CN);
189189 }
190190
191191 /**
@@ -193,7 +193,7 @@
194194 * @access private
195195 */
196196 function zh2sg($text) {
197 - return strtr(strtr($text, $this->zh2CN), $this->zh2SG);
 197+ return strtr(strtr($text, $this->mZh2CN), $this->mZh2SG);
198198 }
199199
200200 /**
@@ -202,7 +202,7 @@
203203 * @access private
204204 */
205205 function zh2hk($text) {
206 - return strtr(strtr($text, $this->zh2TW), $this->zh2HK);
 206+ return strtr(strtr($text, $this->mZh2TW), $this->mZh2HK);
207207 }
208208
209209 /**

Status & tagging log