@@ -1011,7 +1011,7 @@ |
||
1011 | 1011 | } |
1012 | 1012 | $logs_restored = true; |
1013 | 1013 | } |
1014 | - // if it was not already restored by a later restore operation ... |
|
1014 | + // if it was not already restored by a later restore operation ... |
|
1015 | 1015 | } elseif (sql_value("SELECT `id` FROM `cache_logs` WHERE `id`='&1'", 0, $revert_logid) == 0) { |
1016 | 1016 | // id, uuid, date_created and last_modified are set automatically; |
1017 | 1017 | // picture will be updated automatically on picture-restore |
@@ -86,69 +86,69 @@ discard block |
||
86 | 86 | } |
87 | 87 | |
88 | 88 | switch ($action) { |
89 | - case 'selectlang': |
|
90 | - break; |
|
89 | + case 'selectlang': |
|
90 | + break; |
|
91 | 91 | |
92 | - case 'verify': |
|
93 | - verify(); |
|
94 | - break; |
|
92 | + case 'verify': |
|
93 | + verify(); |
|
94 | + break; |
|
95 | 95 | |
96 | - case 'resetids': |
|
97 | - resetIds(); |
|
98 | - break; |
|
96 | + case 'resetids': |
|
97 | + resetIds(); |
|
98 | + break; |
|
99 | 99 | |
100 | - case 'clearcache': |
|
101 | - clearCache(); |
|
102 | - break; |
|
100 | + case 'clearcache': |
|
101 | + clearCache(); |
|
102 | + break; |
|
103 | 103 | |
104 | - case 'export': |
|
105 | - export(); |
|
106 | - break; |
|
104 | + case 'export': |
|
105 | + export(); |
|
106 | + break; |
|
107 | 107 | |
108 | - case 'xmlexport': |
|
109 | - xmlexport(); |
|
110 | - break; |
|
108 | + case 'xmlexport': |
|
109 | + xmlexport(); |
|
110 | + break; |
|
111 | 111 | |
112 | - case 'xmlimport': |
|
113 | - break; |
|
112 | + case 'xmlimport': |
|
113 | + break; |
|
114 | 114 | |
115 | - case 'xmlimport2': |
|
116 | - xmlimport2(); |
|
117 | - break; |
|
115 | + case 'xmlimport2': |
|
116 | + xmlimport2(); |
|
117 | + break; |
|
118 | 118 | |
119 | - case 'xmlimport3': |
|
120 | - xmlimport3(); |
|
121 | - break; |
|
119 | + case 'xmlimport3': |
|
120 | + xmlimport3(); |
|
121 | + break; |
|
122 | 122 | |
123 | - case 'textexportnew': |
|
124 | - textexport($translang, false); |
|
125 | - break; |
|
123 | + case 'textexportnew': |
|
124 | + textexport($translang, false); |
|
125 | + break; |
|
126 | 126 | |
127 | - case 'textexportall': |
|
128 | - textexport($translang, true); |
|
129 | - break; |
|
127 | + case 'textexportall': |
|
128 | + textexport($translang, true); |
|
129 | + break; |
|
130 | 130 | |
131 | - case 'textimport': |
|
132 | - break; |
|
131 | + case 'textimport': |
|
132 | + break; |
|
133 | 133 | |
134 | - case 'textimport2': |
|
135 | - textimport($translang); |
|
136 | - break; |
|
134 | + case 'textimport2': |
|
135 | + textimport($translang); |
|
136 | + break; |
|
137 | 137 | |
138 | - case 'edit': |
|
139 | - if (!$access->mayTranslate($translang)) { |
|
140 | - $tpl->error(ERROR_NO_ACCESS); |
|
141 | - } |
|
142 | - edit(); |
|
143 | - break; |
|
138 | + case 'edit': |
|
139 | + if (!$access->mayTranslate($translang)) { |
|
140 | + $tpl->error(ERROR_NO_ACCESS); |
|
141 | + } |
|
142 | + edit(); |
|
143 | + break; |
|
144 | 144 | |
145 | - case 'copy_en': |
|
146 | - copy_english_texts(); |
|
147 | - break; |
|
145 | + case 'copy_en': |
|
146 | + copy_english_texts(); |
|
147 | + break; |
|
148 | 148 | |
149 | - case 'listfaults': |
|
150 | - $trans = sql( |
|
151 | - "SELECT |
|
149 | + case 'listfaults': |
|
150 | + $trans = sql( |
|
151 | + "SELECT |
|
152 | 152 | `sys_trans`.`id`, |
153 | 153 | `sys_trans`.`text` |
154 | 154 | FROM `sys_trans` |
@@ -156,14 +156,14 @@ discard block |
||
156 | 156 | ON `sys_trans`.`id`=`sys_trans_ref`.`trans_id` |
157 | 157 | WHERE ISNULL(`sys_trans_ref`.`trans_id`) |
158 | 158 | ORDER BY `sys_trans`.`id` DESC" |
159 | - ); |
|
160 | - $tpl->assign_rs('trans', $trans); |
|
161 | - sql_free_result($trans); |
|
162 | - break; |
|
159 | + ); |
|
160 | + $tpl->assign_rs('trans', $trans); |
|
161 | + sql_free_result($trans); |
|
162 | + break; |
|
163 | 163 | |
164 | - case 'listall': |
|
165 | - $trans = sql( |
|
166 | - "SELECT |
|
164 | + case 'listall': |
|
165 | + $trans = sql( |
|
166 | + "SELECT |
|
167 | 167 | `sys_trans`.`id`, |
168 | 168 | `sys_trans`.`text`, |
169 | 169 | `sys_trans_text`.`text` AS `trans` |
@@ -172,48 +172,48 @@ discard block |
||
172 | 172 | ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` |
173 | 173 | AND `sys_trans_text`.`lang`='&1' |
174 | 174 | ORDER BY `sys_trans`.`id` DESC", |
175 | - $translang |
|
176 | - ); |
|
177 | - $tpl->assign_rs('trans', $trans); |
|
178 | - sql_free_result($trans); |
|
179 | - break; |
|
175 | + $translang |
|
176 | + ); |
|
177 | + $tpl->assign_rs('trans', $trans); |
|
178 | + sql_free_result($trans); |
|
179 | + break; |
|
180 | 180 | |
181 | - case 'remove': |
|
182 | - if (!$access->mayTranslate($translang)) { |
|
183 | - $tpl->error(ERROR_NO_ACCESS); |
|
184 | - } |
|
185 | - remove(); |
|
186 | - break; |
|
187 | - |
|
188 | - case 'scan': |
|
189 | - scan(); |
|
190 | - break; |
|
191 | - |
|
192 | - case 'scanstart': |
|
193 | - scanStart(); |
|
194 | - break; |
|
195 | - |
|
196 | - case 'scanfile': |
|
197 | - $filename = isset($_REQUEST['filename']) ? $_REQUEST['filename'] : ''; |
|
198 | - scanFile($filename); |
|
199 | - exit; |
|
200 | - |
|
201 | - case 'quicknone': |
|
202 | - $cookie->un_set('translate_mode'); |
|
203 | - break; |
|
204 | - |
|
205 | - case 'quicknew': |
|
206 | - $cookie->set('translate_mode', 'new'); |
|
207 | - break; |
|
208 | - |
|
209 | - case 'quickall': |
|
210 | - $cookie->set('translate_mode', 'all'); |
|
211 | - break; |
|
212 | - |
|
213 | - default: |
|
214 | - $action = 'listnew'; |
|
215 | - $trans = sql( |
|
216 | - "SELECT DISTINCT |
|
181 | + case 'remove': |
|
182 | + if (!$access->mayTranslate($translang)) { |
|
183 | + $tpl->error(ERROR_NO_ACCESS); |
|
184 | + } |
|
185 | + remove(); |
|
186 | + break; |
|
187 | + |
|
188 | + case 'scan': |
|
189 | + scan(); |
|
190 | + break; |
|
191 | + |
|
192 | + case 'scanstart': |
|
193 | + scanStart(); |
|
194 | + break; |
|
195 | + |
|
196 | + case 'scanfile': |
|
197 | + $filename = isset($_REQUEST['filename']) ? $_REQUEST['filename'] : ''; |
|
198 | + scanFile($filename); |
|
199 | + exit; |
|
200 | + |
|
201 | + case 'quicknone': |
|
202 | + $cookie->un_set('translate_mode'); |
|
203 | + break; |
|
204 | + |
|
205 | + case 'quicknew': |
|
206 | + $cookie->set('translate_mode', 'new'); |
|
207 | + break; |
|
208 | + |
|
209 | + case 'quickall': |
|
210 | + $cookie->set('translate_mode', 'all'); |
|
211 | + break; |
|
212 | + |
|
213 | + default: |
|
214 | + $action = 'listnew'; |
|
215 | + $trans = sql( |
|
216 | + "SELECT DISTINCT |
|
217 | 217 | `sys_trans`.`id`, |
218 | 218 | `sys_trans`.`text` |
219 | 219 | FROM `sys_trans` |
@@ -224,10 +224,10 @@ discard block |
||
224 | 224 | ON `sys_trans`.`id`=`sys_trans_ref`.`trans_id` |
225 | 225 | WHERE ISNULL(`sys_trans_text`.`trans_id`) OR `sys_trans_text`.`text`='' |
226 | 226 | ORDER BY `sys_trans`.`id` DESC", |
227 | - $translang |
|
228 | - ); |
|
229 | - $tpl->assign_rs('trans', $trans); |
|
230 | - sql_free_result($trans); |
|
227 | + $translang |
|
228 | + ); |
|
229 | + $tpl->assign_rs('trans', $trans); |
|
230 | + sql_free_result($trans); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | $languages = []; |
@@ -30,7 +30,7 @@ |
||
30 | 30 | global $login; |
31 | 31 | |
32 | 32 | $fields = |
33 | - "`pics`.`uuid` AS `pic_uuid`, |
|
33 | + "`pics`.`uuid` AS `pic_uuid`, |
|
34 | 34 | `pics`.`url` AS `pic_url`, |
35 | 35 | `pics`.`title`, |
36 | 36 | `pics`.`date_created`, |
@@ -2273,38 +2273,38 @@ discard block |
||
2273 | 2273 | |
2274 | 2274 | foreach ($option as $k => $v) { |
2275 | 2275 | switch ($k) { |
2276 | - case 'encoding': |
|
2277 | - switch ($v) { |
|
2278 | - case 'utf8': |
|
2279 | - case 'ucs4_string': |
|
2280 | - case 'ucs4_array': |
|
2281 | - $this->_api_encoding = $v; |
|
2282 | - break; |
|
2276 | + case 'encoding': |
|
2277 | + switch ($v) { |
|
2278 | + case 'utf8': |
|
2279 | + case 'ucs4_string': |
|
2280 | + case 'ucs4_array': |
|
2281 | + $this->_api_encoding = $v; |
|
2282 | + break; |
|
2283 | 2283 | |
2284 | - default: |
|
2285 | - throw new InvalidArgumentException('Set Parameter: Unknown parameter '.$v.' for option '.$k); |
|
2286 | - } |
|
2284 | + default: |
|
2285 | + throw new InvalidArgumentException('Set Parameter: Unknown parameter '.$v.' for option '.$k); |
|
2286 | + } |
|
2287 | 2287 | |
2288 | 2288 | break; |
2289 | 2289 | |
2290 | - case 'overlong': |
|
2291 | - $this->_allow_overlong = ($v) ? true : false; |
|
2292 | - break; |
|
2290 | + case 'overlong': |
|
2291 | + $this->_allow_overlong = ($v) ? true : false; |
|
2292 | + break; |
|
2293 | 2293 | |
2294 | - case 'strict': |
|
2295 | - $this->_strict_mode = ($v) ? true : false; |
|
2296 | - break; |
|
2294 | + case 'strict': |
|
2295 | + $this->_strict_mode = ($v) ? true : false; |
|
2296 | + break; |
|
2297 | 2297 | |
2298 | - case 'version': |
|
2299 | - if (in_array($v, array('2003', '2008'))) { |
|
2300 | - $this->_version = $v; |
|
2301 | - } else { |
|
2302 | - throw new InvalidArgumentException('Set Parameter: Invalid parameter '.$v.' for option '.$k); |
|
2303 | - } |
|
2304 | - break; |
|
2298 | + case 'version': |
|
2299 | + if (in_array($v, array('2003', '2008'))) { |
|
2300 | + $this->_version = $v; |
|
2301 | + } else { |
|
2302 | + throw new InvalidArgumentException('Set Parameter: Invalid parameter '.$v.' for option '.$k); |
|
2303 | + } |
|
2304 | + break; |
|
2305 | 2305 | |
2306 | - default: |
|
2307 | - return false; |
|
2306 | + default: |
|
2307 | + return false; |
|
2308 | 2308 | } |
2309 | 2309 | } |
2310 | 2310 | |
@@ -2328,15 +2328,15 @@ discard block |
||
2328 | 2328 | // Forcing conversion of input to UCS4 array |
2329 | 2329 | // If one time encoding is given, use this, else the objects property |
2330 | 2330 | switch (($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) { |
2331 | - case 'utf8': |
|
2332 | - $decoded = $this->_utf8_to_ucs4($decoded); |
|
2333 | - break; |
|
2334 | - case 'ucs4_string': |
|
2335 | - $decoded = $this->_ucs4_string_to_ucs4($decoded); |
|
2336 | - case 'ucs4_array': // No break; before this line. Catch case, but do nothing |
|
2337 | - break; |
|
2338 | - default: |
|
2339 | - throw new InvalidArgumentException('Unsupported input format'); |
|
2331 | + case 'utf8': |
|
2332 | + $decoded = $this->_utf8_to_ucs4($decoded); |
|
2333 | + break; |
|
2334 | + case 'ucs4_string': |
|
2335 | + $decoded = $this->_ucs4_string_to_ucs4($decoded); |
|
2336 | + case 'ucs4_array': // No break; before this line. Catch case, but do nothing |
|
2337 | + break; |
|
2338 | + default: |
|
2339 | + throw new InvalidArgumentException('Unsupported input format'); |
|
2340 | 2340 | } |
2341 | 2341 | |
2342 | 2342 | // No input, no output, what else did you expect? |
@@ -2350,35 +2350,35 @@ discard block |
||
2350 | 2350 | foreach ($decoded as $k => $v) { |
2351 | 2351 | // Make sure to use just the plain dot |
2352 | 2352 | switch($v) { |
2353 | - case 0x3002: |
|
2354 | - case 0xFF0E: |
|
2355 | - case 0xFF61: |
|
2356 | - $decoded[$k] = 0x2E; |
|
2357 | - // It's right, no break here |
|
2358 | - // The codepoints above have to be converted to dots anyway |
|
2359 | - |
|
2360 | - // Stumbling across an anchoring character |
|
2361 | - case 0x2E: |
|
2362 | - case 0x2F: |
|
2363 | - case 0x3A: |
|
2364 | - case 0x3F: |
|
2365 | - case 0x40: |
|
2366 | - // Neither email addresses nor URLs allowed in strict mode |
|
2367 | - if ($this->_strict_mode) { |
|
2368 | - throw new InvalidArgumentException('Neither email addresses nor URLs are allowed in strict mode.'); |
|
2369 | - } |
|
2370 | - // Skip first char |
|
2371 | - if ($k) { |
|
2372 | - $encoded = ''; |
|
2373 | - $encoded = $this->_encode(array_slice($decoded, $last_begin, (($k)-$last_begin))); |
|
2374 | - if ($encoded) { |
|
2375 | - $output .= $encoded; |
|
2376 | - } else { |
|
2377 | - $output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k)-$last_begin))); |
|
2353 | + case 0x3002: |
|
2354 | + case 0xFF0E: |
|
2355 | + case 0xFF61: |
|
2356 | + $decoded[$k] = 0x2E; |
|
2357 | + // It's right, no break here |
|
2358 | + // The codepoints above have to be converted to dots anyway |
|
2359 | + |
|
2360 | + // Stumbling across an anchoring character |
|
2361 | + case 0x2E: |
|
2362 | + case 0x2F: |
|
2363 | + case 0x3A: |
|
2364 | + case 0x3F: |
|
2365 | + case 0x40: |
|
2366 | + // Neither email addresses nor URLs allowed in strict mode |
|
2367 | + if ($this->_strict_mode) { |
|
2368 | + throw new InvalidArgumentException('Neither email addresses nor URLs are allowed in strict mode.'); |
|
2378 | 2369 | } |
2379 | - $output .= chr($decoded[$k]); |
|
2380 | - } |
|
2381 | - $last_begin = $k + 1; |
|
2370 | + // Skip first char |
|
2371 | + if ($k) { |
|
2372 | + $encoded = ''; |
|
2373 | + $encoded = $this->_encode(array_slice($decoded, $last_begin, (($k)-$last_begin))); |
|
2374 | + if ($encoded) { |
|
2375 | + $output .= $encoded; |
|
2376 | + } else { |
|
2377 | + $output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k)-$last_begin))); |
|
2378 | + } |
|
2379 | + $output .= chr($decoded[$k]); |
|
2380 | + } |
|
2381 | + $last_begin = $k + 1; |
|
2382 | 2382 | } |
2383 | 2383 | } |
2384 | 2384 | // Catch the rest of the string |
@@ -2416,12 +2416,12 @@ discard block |
||
2416 | 2416 | // Optionally set |
2417 | 2417 | if ($one_time_encoding) { |
2418 | 2418 | switch ($one_time_encoding) { |
2419 | - case 'utf8': |
|
2420 | - case 'ucs4_string': |
|
2421 | - case 'ucs4_array': |
|
2422 | - break; |
|
2423 | - default: |
|
2424 | - throw new InvalidArgumentException('Unknown encoding '.$one_time_encoding); |
|
2419 | + case 'utf8': |
|
2420 | + case 'ucs4_string': |
|
2421 | + case 'ucs4_array': |
|
2422 | + break; |
|
2423 | + default: |
|
2424 | + throw new InvalidArgumentException('Unknown encoding '.$one_time_encoding); |
|
2425 | 2425 | } |
2426 | 2426 | } |
2427 | 2427 | // Make sure to drop any newline characters around |
@@ -2473,17 +2473,17 @@ discard block |
||
2473 | 2473 | // The output is UTF-8 by default, other output formats need conversion here |
2474 | 2474 | // If one time encoding is given, use this, else the objects property |
2475 | 2475 | switch (($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) { |
2476 | - case 'utf8': |
|
2477 | - return $return; |
|
2478 | - break; |
|
2479 | - case 'ucs4_string': |
|
2480 | - return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return)); |
|
2481 | - break; |
|
2482 | - case 'ucs4_array': |
|
2483 | - return $this->_utf8_to_ucs4($return); |
|
2484 | - break; |
|
2485 | - default: |
|
2486 | - throw new InvalidArgumentException('Unsupported output format'); |
|
2476 | + case 'utf8': |
|
2477 | + return $return; |
|
2478 | + break; |
|
2479 | + case 'ucs4_string': |
|
2480 | + return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return)); |
|
2481 | + break; |
|
2482 | + case 'ucs4_array': |
|
2483 | + return $this->_utf8_to_ucs4($return); |
|
2484 | + break; |
|
2485 | + default: |
|
2486 | + throw new InvalidArgumentException('Unsupported output format'); |
|
2487 | 2487 | } |
2488 | 2488 | } |
2489 | 2489 |
@@ -7,34 +7,34 @@ |
||
7 | 7 | * Common error messages |
8 | 8 | ***************************************************************************/ |
9 | 9 | |
10 | - define('ERROR_UNKNOWN', 1000); |
|
11 | - define('ERROR_TEMPLATE_NOT_FOUND', 1001); |
|
12 | - define('ERROR_COMPILATION_FAILED', 1002); |
|
13 | - define('ERROR_NO_ACCESS', 1003); |
|
14 | - define('ERROR_INVALID_OPERATION', 1004); |
|
15 | - define('ERROR_LOGIN_REQUIRED', 1005); |
|
16 | - define('ERROR_MAIL_TEMPLATE_NOT_FOUND', 1006); |
|
17 | - define('ERROR_NO_COOKIES', 1007); |
|
18 | - define('ERROR_ALREADY_LOGGEDIN', 1008); |
|
19 | - define('ERROR_USER_NOT_ACTIVE', 1009); |
|
20 | - define('ERROR_USER_NO_EMAIL', 1010); |
|
21 | - define('ERROR_CACHE_NOT_PUBLISHED', 1011); |
|
22 | - define('ERROR_CACHE_LOCKED', 1012); |
|
10 | + define('ERROR_UNKNOWN', 1000); |
|
11 | + define('ERROR_TEMPLATE_NOT_FOUND', 1001); |
|
12 | + define('ERROR_COMPILATION_FAILED', 1002); |
|
13 | + define('ERROR_NO_ACCESS', 1003); |
|
14 | + define('ERROR_INVALID_OPERATION', 1004); |
|
15 | + define('ERROR_LOGIN_REQUIRED', 1005); |
|
16 | + define('ERROR_MAIL_TEMPLATE_NOT_FOUND', 1006); |
|
17 | + define('ERROR_NO_COOKIES', 1007); |
|
18 | + define('ERROR_ALREADY_LOGGEDIN', 1008); |
|
19 | + define('ERROR_USER_NOT_ACTIVE', 1009); |
|
20 | + define('ERROR_USER_NO_EMAIL', 1010); |
|
21 | + define('ERROR_CACHE_NOT_PUBLISHED', 1011); |
|
22 | + define('ERROR_CACHE_LOCKED', 1012); |
|
23 | 23 | |
24 | - define('ERROR_SEARCHPLUGIN_WAYPOINT_FORMAT', 1013); |
|
25 | - define('ERROR_SEARCHPLUGIN_WAYPOINT_MANY', 1014); |
|
26 | - define('ERROR_SEARCHPLUGIN_WAYPOINT_NOTFOUND', 1015); |
|
24 | + define('ERROR_SEARCHPLUGIN_WAYPOINT_FORMAT', 1013); |
|
25 | + define('ERROR_SEARCHPLUGIN_WAYPOINT_MANY', 1014); |
|
26 | + define('ERROR_SEARCHPLUGIN_WAYPOINT_NOTFOUND', 1015); |
|
27 | 27 | |
28 | - define('ERROR_DB_COULD_NOT_RECONNECT', 1016); |
|
29 | - define('ERROR_DB_NO_ROOT', 1017); |
|
28 | + define('ERROR_DB_COULD_NOT_RECONNECT', 1016); |
|
29 | + define('ERROR_DB_NO_ROOT', 1017); |
|
30 | 30 | |
31 | - define('ERROR_USER_NOT_EXISTS', 1018); |
|
32 | - define('ERROR_CACHE_NOT_EXISTS', 1019); |
|
33 | - define('ERROR_CACHELOG_NOT_EXISTS', 1020); |
|
34 | - define('ERROR_PICTURE_NOT_EXISTS', 1021); |
|
31 | + define('ERROR_USER_NOT_EXISTS', 1018); |
|
32 | + define('ERROR_CACHE_NOT_EXISTS', 1019); |
|
33 | + define('ERROR_CACHELOG_NOT_EXISTS', 1020); |
|
34 | + define('ERROR_PICTURE_NOT_EXISTS', 1021); |
|
35 | 35 | |
36 | - define('ERROR_UPLOAD_ERR_NO_FILE', 1022); |
|
37 | - define('ERROR_UPLOAD_ERR_SIZE', 1023); |
|
38 | - define('ERROR_UPLOAD_ERR_TYPE', 1024); |
|
39 | - define('ERROR_UPLOAD_UNKNOWN', 1025); |
|
40 | - define('ERROR_UPLOAD_ERR_BAD_FORMAT', 1026); |
|
36 | + define('ERROR_UPLOAD_ERR_NO_FILE', 1022); |
|
37 | + define('ERROR_UPLOAD_ERR_SIZE', 1023); |
|
38 | + define('ERROR_UPLOAD_ERR_TYPE', 1024); |
|
39 | + define('ERROR_UPLOAD_UNKNOWN', 1025); |
|
40 | + define('ERROR_UPLOAD_ERR_BAD_FORMAT', 1026); |
@@ -29,12 +29,12 @@ |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | switch ($action) { |
32 | - case 'addignore': |
|
33 | - sql("INSERT IGNORE INTO `cache_ignore` (`cache_id`, `user_id`) VALUES ('&1', '&2')", $cache_id, $login->userid); |
|
34 | - break; |
|
35 | - case 'removeignore': |
|
36 | - sql("DELETE FROM `cache_ignore` WHERE `cache_id`='&1' AND `user_id`='&2'", $cache_id, $login->userid); |
|
37 | - break; |
|
32 | + case 'addignore': |
|
33 | + sql("INSERT IGNORE INTO `cache_ignore` (`cache_id`, `user_id`) VALUES ('&1', '&2')", $cache_id, $login->userid); |
|
34 | + break; |
|
35 | + case 'removeignore': |
|
36 | + sql("DELETE FROM `cache_ignore` WHERE `cache_id`='&1' AND `user_id`='&2'", $cache_id, $login->userid); |
|
37 | + break; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | // clear cached map result, so that the change directly appears on the map |
@@ -14,40 +14,40 @@ |
||
14 | 14 | * set template specific language variables |
15 | 15 | ****************************************************************************/ |
16 | 16 | |
17 | - $firstcache_note = t('If this is your first cache on %1, be sure to check out the <a href="articles.php?page=cacheinfo">description</a> of the individual fields.'); |
|
18 | - |
|
19 | - $submit = t('Submit cache'); |
|
20 | - $default_country = t('EN'); |
|
21 | - $default_lang = t('EN'); |
|
22 | - $show_all = t('Show all'); |
|
23 | - $default_NS = 'N'; |
|
24 | - $default_EW = 'E'; |
|
25 | - $date_time_format_message = ' ' . t('Format: DD-MM-YYYY'); |
|
26 | - |
|
27 | - $error_general = "<tr><td class='error' colspan='2'><b>" . t('Some errors occured, please check the marked fields.') . "</b></td></tr>"; |
|
28 | - $error_long_not_ok = '<span class="errormsg">' . t('Your chosen coordinated are invalid') . '</span>'; |
|
29 | - $error_lat_not_ok = $error_long_not_ok . "<br />"; |
|
30 | - $error_duplicate_coords = '<span class="errormsg">' . t('Another cache (<a href="viewcache.php?wp=%1">%1</a>) exists at these coords. Maybe you pressed "submit cache" twice. To publish a cache with identical coords, enter other coords first, then edit the listing and change coords.') . '</span>'; |
|
31 | - $time_not_ok_message = '<span class="errormsg">' . t('The entered time is invalid.') . '</span>'; |
|
32 | - $way_length_not_ok_message = '<span class="errormsg">' . t('The entered distance is invalid, Format: aa.aaa') . '</span>'; |
|
33 | - $date_not_ok_message = '<span class="errormsg">' . t('Invalid date, format:DD-MM-JJJJ') . '</span>'; |
|
34 | - $name_not_ok_message = ' <span class="errormsg">' . t('Cachename is invalid') . '</span>'; |
|
35 | - $tos_not_ok_message = '<br/><span class="errormsg">' . t('The cache can only be adopted if you agree our terms of use.') . '</span>'; |
|
36 | - $type_not_ok_message = ' <span class="errormsg">' . t('No cache-type is chosen.') . '</span>'; |
|
37 | - $size_not_ok_message = ' <span class="errormsg">' . t('No cache-size is chosen.') . '</span>'; |
|
38 | - $diff_not_ok_message = ' <span class="errormsg">' . t('Choose both valuations!') . '</span>'; |
|
39 | - $sizemismatch_message = ' <span class="errormsg">' . t('For virtual and webcam caches, the cache size has to be -no container-!') . '</span>'; |
|
40 | - $safari_not_allowed_message = '<span class="errormsg">' . t('Only virtual caches can be safari caches.') . '</span>'; |
|
41 | - $bad_wpgc_message = '<span class="errormsg">' . t('GC waypoint is invalid, must be GCxxxxx') . '</span>'; |
|
42 | - |
|
43 | - $cache_submitted = t('Your cache is successfully added to the database. You will be redirected to the cache page, now.'); |
|
44 | - |
|
45 | - $sel_message = t('Select'); |
|
46 | - |
|
47 | - $cache_attrib_js = "new Array({id}, {selected}, '{img_undef}', '{img_large}')"; |
|
48 | - $cache_attrib_pic = '<img id="attr{attrib_id}" src="{attrib_pic}" border="0" onmousedown="toggleAttr({attrib_id})" onmouseover="Tip(\'{html_desc}\', TITLE, \'{name}\', TITLEBGCOLOR, \'{color}\', TITLEFONTCOLOR, \'#000000\', BGCOLOR, \'#FFFFFF\', BORDERCOLOR, \'{color}\', CLICKCLOSE, true, DELAY, 0, FADEIN, false, FADEOUT, false, FONTCOLOR, \'#000080\', WIDTH, 500)" onmouseout="UnTip()" /> '; |
|
49 | - |
|
50 | - $cache_attrib_group = |
|
17 | + $firstcache_note = t('If this is your first cache on %1, be sure to check out the <a href="articles.php?page=cacheinfo">description</a> of the individual fields.'); |
|
18 | + |
|
19 | + $submit = t('Submit cache'); |
|
20 | + $default_country = t('EN'); |
|
21 | + $default_lang = t('EN'); |
|
22 | + $show_all = t('Show all'); |
|
23 | + $default_NS = 'N'; |
|
24 | + $default_EW = 'E'; |
|
25 | + $date_time_format_message = ' ' . t('Format: DD-MM-YYYY'); |
|
26 | + |
|
27 | + $error_general = "<tr><td class='error' colspan='2'><b>" . t('Some errors occured, please check the marked fields.') . "</b></td></tr>"; |
|
28 | + $error_long_not_ok = '<span class="errormsg">' . t('Your chosen coordinated are invalid') . '</span>'; |
|
29 | + $error_lat_not_ok = $error_long_not_ok . "<br />"; |
|
30 | + $error_duplicate_coords = '<span class="errormsg">' . t('Another cache (<a href="viewcache.php?wp=%1">%1</a>) exists at these coords. Maybe you pressed "submit cache" twice. To publish a cache with identical coords, enter other coords first, then edit the listing and change coords.') . '</span>'; |
|
31 | + $time_not_ok_message = '<span class="errormsg">' . t('The entered time is invalid.') . '</span>'; |
|
32 | + $way_length_not_ok_message = '<span class="errormsg">' . t('The entered distance is invalid, Format: aa.aaa') . '</span>'; |
|
33 | + $date_not_ok_message = '<span class="errormsg">' . t('Invalid date, format:DD-MM-JJJJ') . '</span>'; |
|
34 | + $name_not_ok_message = ' <span class="errormsg">' . t('Cachename is invalid') . '</span>'; |
|
35 | + $tos_not_ok_message = '<br/><span class="errormsg">' . t('The cache can only be adopted if you agree our terms of use.') . '</span>'; |
|
36 | + $type_not_ok_message = ' <span class="errormsg">' . t('No cache-type is chosen.') . '</span>'; |
|
37 | + $size_not_ok_message = ' <span class="errormsg">' . t('No cache-size is chosen.') . '</span>'; |
|
38 | + $diff_not_ok_message = ' <span class="errormsg">' . t('Choose both valuations!') . '</span>'; |
|
39 | + $sizemismatch_message = ' <span class="errormsg">' . t('For virtual and webcam caches, the cache size has to be -no container-!') . '</span>'; |
|
40 | + $safari_not_allowed_message = '<span class="errormsg">' . t('Only virtual caches can be safari caches.') . '</span>'; |
|
41 | + $bad_wpgc_message = '<span class="errormsg">' . t('GC waypoint is invalid, must be GCxxxxx') . '</span>'; |
|
42 | + |
|
43 | + $cache_submitted = t('Your cache is successfully added to the database. You will be redirected to the cache page, now.'); |
|
44 | + |
|
45 | + $sel_message = t('Select'); |
|
46 | + |
|
47 | + $cache_attrib_js = "new Array({id}, {selected}, '{img_undef}', '{img_large}')"; |
|
48 | + $cache_attrib_pic = '<img id="attr{attrib_id}" src="{attrib_pic}" border="0" onmousedown="toggleAttr({attrib_id})" onmouseover="Tip(\'{html_desc}\', TITLE, \'{name}\', TITLEBGCOLOR, \'{color}\', TITLEFONTCOLOR, \'#000000\', BGCOLOR, \'#FFFFFF\', BORDERCOLOR, \'{color}\', CLICKCLOSE, true, DELAY, 0, FADEIN, false, FADEOUT, false, FONTCOLOR, \'#000080\', WIDTH, 500)" onmouseout="UnTip()" /> '; |
|
49 | + |
|
50 | + $cache_attrib_group = |
|
51 | 51 | '<div class="attribgroup"><table cellspacing="0" style="display:inline;border-spacing:0px;"> |
52 | 52 | <tr><td bgcolor="{color}" style="line-height:9px;padding-top:2px;margin:0 0 0 0;border-left:1px solid gray;border-right:1px solid gray;border-top:1px solid gray;"><font size="1">{name}</font></td></tr> |
53 | 53 | <tr><td bgcolor="#F8F8F8" style="margin:0 0 0 0;border-left:1px solid gray;border-right:1px solid gray;border-bottom:1px solid gray;">{attribs}</td></tr> |
@@ -15,8 +15,8 @@ |
||
15 | 15 | |
16 | 16 | ****************************************************************************/ |
17 | 17 | |
18 | - $error_wrong_node = t('This log entry has been created on another Opencaching website. The cache can only be edited there.'); |
|
19 | - $removed_message_end = '---'; |
|
18 | + $error_wrong_node = t('This log entry has been created on another Opencaching website. The cache can only be edited there.'); |
|
19 | + $removed_message_end = '---'; |
|
20 | 20 | |
21 | 21 | |
22 | 22 | function removed_log_subject($lang) |
@@ -15,7 +15,7 @@ |
||
15 | 15 | |
16 | 16 | ****************************************************************************/ |
17 | 17 | |
18 | - $error_wrong_node = t('this description was created on another Opencaching-webserver and can only be deleted there.'); |
|
18 | + $error_wrong_node = t('this description was created on another Opencaching-webserver and can only be deleted there.'); |
|
19 | 19 | |
20 | - $commit = t('the cache description has been deleted'); |
|
21 | - $commit_title = t('delete this cache-description'); |
|
20 | + $commit = t('the cache description has been deleted'); |
|
21 | + $commit_title = t('delete this cache-description'); |