Index: branches/REL1_4/phase3/includes/ZhClient.php |
— | — | @@ -148,20 +148,20 @@ |
149 | 149 | class ZhClientFake { |
150 | 150 | function ZhClientFake() { |
151 | 151 | 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)) { |
157 | 157 | 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); |
166 | 166 | } |
167 | 167 | } |
168 | 168 | |
— | — | @@ -175,7 +175,7 @@ |
176 | 176 | * @access private |
177 | 177 | */ |
178 | 178 | function zh2tw($text) { |
179 | | - return strtr($text, $this->zh2TW); |
| 179 | + return strtr($text, $this->mZh2TW); |
180 | 180 | } |
181 | 181 | |
182 | 182 | /** |
— | — | @@ -184,7 +184,7 @@ |
185 | 185 | * @access private |
186 | 186 | */ |
187 | 187 | function zh2cn($text) { |
188 | | - return strtr($text, $this->zh2CN); |
| 188 | + return strtr($text, $this->mZh2CN); |
189 | 189 | } |
190 | 190 | |
191 | 191 | /** |
— | — | @@ -193,7 +193,7 @@ |
194 | 194 | * @access private |
195 | 195 | */ |
196 | 196 | function zh2sg($text) { |
197 | | - return strtr(strtr($text, $this->zh2CN), $this->zh2SG); |
| 197 | + return strtr(strtr($text, $this->mZh2CN), $this->mZh2SG); |
198 | 198 | } |
199 | 199 | |
200 | 200 | /** |
— | — | @@ -202,7 +202,7 @@ |
203 | 203 | * @access private |
204 | 204 | */ |
205 | 205 | function zh2hk($text) { |
206 | | - return strtr(strtr($text, $this->zh2TW), $this->zh2HK); |
| 206 | + return strtr(strtr($text, $this->mZh2TW), $this->mZh2HK); |
207 | 207 | } |
208 | 208 | |
209 | 209 | /** |