]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/config.php
* revert to the wikidb ref passing. there's no memory abuse there.
[SourceForge/phpwiki.git] / lib / config.php
1 <?php
2 rcs_id('$Id: config.php,v 1.124 2004-11-09 17:11:16 rurban Exp $');
3 /*
4  * NOTE: The settings here should probably not need to be changed.
5  * The user-configurable settings have been moved to IniConfig.php
6  * The run-time code has been moved to lib/IniConfig.php:fix_configs()
7  */
8  
9 if (!defined("LC_ALL")) {
10     // Backward compatibility (for PHP < 4.0.5)
11     if (!check_php_version(4,0,5)) {
12         define("LC_ALL",   "LC_ALL");
13         define("LC_CTYPE", "LC_CTYPE");
14     } else {
15         define("LC_ALL",   0);
16         define("LC_CTYPE", 2);
17     }
18 }
19 // debug flags: 
20 define ('_DEBUG_VERBOSE',   1); // verbose msgs and add validator links on footer
21 define ('_DEBUG_PAGELINKS', 2); // list the extraced pagelinks at the top of each pages
22 define ('_DEBUG_PARSER',    4); // verbose parsing steps
23 define ('_DEBUG_TRACE',     8); // test php memory usage, prints php debug backtraces
24 define ('_DEBUG_INFO',     16);
25 define ('_DEBUG_APD',      32);
26 define ('_DEBUG_LOGIN',    64); // verbose login debug-msg (settings and reason for failure)
27 define ('_DEBUG_SQL',     128);
28
29 function isCGI() {
30     return (substr(php_sapi_name(),0,3) == 'cgi' and 
31             isset($GLOBALS['HTTP_ENV_VARS']['GATEWAY_INTERFACE']) and
32             @preg_match('/CGI/',$GLOBALS['HTTP_ENV_VARS']['GATEWAY_INTERFACE']));
33 }
34
35 /*
36 // copy some $_ENV vars to $_SERVER for CGI compatibility. php does it automatically since when?
37 if (isCGI()) {
38     foreach (explode(':','SERVER_SOFTWARE:SERVER_NAME:GATEWAY_INTERFACE:SERVER_PROTOCOL:SERVER_PORT:REQUEST_METHOD:HTTP_ACCEPT:PATH_INFO:PATH_TRANSLATED:SCRIPT_NAME:QUERY_STRING:REMOTE_HOST:REMOTE_ADDR:REMOTE_USER:AUTH_TYPE:CONTENT_TYPE:CONTENT_LENGTH') as $key) {
39         $GLOBALS['HTTP_SERVER_VARS'][$key] = &$GLOBALS['HTTP_ENV_VARS'][$key];
40     }
41 }
42 */
43
44 // essential internal stuff
45 set_magic_quotes_runtime(0);
46
47 /** 
48  * Browser Detection Functions
49  *
50  * Current Issues:
51  *  NS/IE < 4.0 doesn't accept < ? xml version="1.0" ? >
52  *  NS/IE < 4.0 cannot display PNG
53  *  NS/IE < 4.0 cannot display all XHTML tags
54  *  NS < 5.0 needs textarea wrap=virtual
55  *  IE55 has problems with transparent PNG's
56  * @author: ReiniUrban
57  */
58 function browserAgent() {
59     static $HTTP_USER_AGENT = false;
60     if (!$HTTP_USER_AGENT)
61         $HTTP_USER_AGENT = @$GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT'];
62     if (!$HTTP_USER_AGENT) // CGI
63         $HTTP_USER_AGENT = $GLOBALS['HTTP_ENV_VARS']['HTTP_USER_AGENT'];
64     return $HTTP_USER_AGENT;
65 }
66 function browserDetect($match) {
67     return strstr(browserAgent(), $match);
68 }
69 // returns a similar number for Netscape/Mozilla (gecko=5.0)/IE/Opera features.
70 function browserVersion() {
71     if (strstr(browserAgent(),    "Mozilla/4.0 (compatible; MSIE"))
72         return (float) substr(browserAgent(),30);
73     elseif (strstr(browserAgent(),"Mozilla/5.0 (compatible; Konqueror/"))
74         return (float) substr(browserAgent(),36);
75     else
76         return (float) substr(browserAgent(),8);
77 }
78 function isBrowserIE() {
79     return (browserDetect('Mozilla/') and 
80             browserDetect('MSIE'));
81 }
82 // problem with transparent PNG's
83 function isBrowserIE55() {
84     return (isBrowserIE() and 
85             browserVersion() > 5.1 and browserVersion() < 6.0);
86 }
87 // old Netscape prior to Mozilla
88 function isBrowserNetscape($version = false) {
89     $agent = (browserDetect('Mozilla/') and 
90             ! browserDetect('Gecko/') and
91             ! browserDetect('MSIE'));
92     if ($version) return $agent and browserVersion() >= $version; 
93     else return $agent;
94 }
95 // NS3 or less
96 function isBrowserNS3() {
97     return (isBrowserNetscape() and browserVersion() < 4.0);
98 }
99 // NS4 or less
100 function isBrowserNS4() {
101     return (isBrowserNetscape() and browserVersion() < 5.0);
102 }
103 // must omit display alternate stylesheets: konqueror 3.1.4
104 // http://sourceforge.net/tracker/index.php?func=detail&aid=945154&group_id=6121&atid=106121
105 function isBrowserKonqueror($version = false) {
106     if ($version) return browserDetect('Konqueror/') and browserVersion() >= $version; 
107     return browserDetect('Konqueror/');
108 }
109
110 /**
111  * Smart? setlocale().
112  *
113  * This is a version of the builtin setlocale() which is
114  * smart enough to try some alternatives...
115  *
116  * @param mixed $category
117  * @param string $locale
118  * @return string The new locale, or <code>false</code> if unable
119  *  to set the requested locale.
120  * @see setlocale
121  * [56ms]
122  */
123 function guessing_setlocale ($category, $locale) {
124     if ($res = setlocale($category, $locale))
125         return $res;
126     $alt = array('en' => array('C', 'en_US', 'en_GB', 'en_AU', 'en_CA', 'english'),
127                  'de' => array('de_DE', 'de_DE', 'de_DE@euro', 
128                                'de_AT@euro', 'de_AT', 'German_Austria.1252', 'deutsch', 
129                                'german', 'ge'),
130                  'es' => array('es_ES', 'es_MX', 'es_AR', 'spanish'),
131                  'nl' => array('nl_NL', 'dutch'),
132                  'fr' => array('fr_FR', 'français', 'french'),
133                  'it' => array('it_IT'),
134                  'sv' => array('sv_SE'),
135                  'ja' => array('ja_JP','ja_JP.eucJP','japanese.euc'),
136                  'zh' => array('zh_TW', 'zh_CN'),
137                  );
138     if (strlen($locale) == 2)
139         $lang = $locale;
140     else 
141         list ($lang) = split('_', $locale);
142     if (!isset($alt[$lang]))
143         return false;
144         
145     foreach ($alt[$lang] as $try) {
146         if ($res = setlocale($category, $try))
147             return $res;
148         // Try with charset appended...
149         $try = $try . '.' . $GLOBALS['charset'];
150         if ($res = setlocale($category, $try))
151             return $res;
152         foreach (array('@', ".", '_') as $sep) {
153             list ($try) = split($sep, $try);
154             if ($res = setlocale($category, $try))
155                 return $res;
156         }
157     }
158     return false;
159
160     // A standard locale name is typically of  the  form
161     // language[_territory][.codeset][@modifier],  where  language is
162     // an ISO 639 language code, territory is an ISO 3166 country code,
163     // and codeset  is  a  character  set or encoding identifier like
164     // ISO-8859-1 or UTF-8.
165 }
166 // [99ms]
167 function update_locale($loc) {
168     //require_once(dirname(__FILE__)."/FileFinder.php");
169     $newlocale = guessing_setlocale(LC_ALL, $loc); // [56ms]
170     if (!$newlocale) {
171         //trigger_error(sprintf(_("Can't setlocale(LC_ALL,'%s')"), $loc), E_USER_NOTICE);
172         // => LC_COLLATE=C;LC_CTYPE=German_Austria.1252;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=C
173         //$loc = setlocale(LC_CTYPE, '');  // pull locale from environment.
174         $newlocale = FileFinder::_get_lang();
175         list ($newlocale,) = split('_', $newlocale, 2);
176         //$GLOBALS['LANG'] = $loc;
177         //$newlocale = $loc;
178         //return false;
179     }
180     //if (substr($newlocale,0,2) == $loc) // don't update with C or failing setlocale
181     if (!isset($GLOBALS['LANG'])) $GLOBALS['LANG'] = $loc;
182     // Try to put new locale into environment (so any
183     // programs we run will get the right locale.)
184     //
185     // If PHP is in safe mode, this is not allowed,
186     // so hide errors...
187     @putenv("LC_ALL=$newlocale");
188     @putenv("LANG=$newlocale");
189     @putenv("LANGUAGE=$newlocale");
190     
191     if (!function_exists ('bindtextdomain'))  {
192         // Reinitialize translation array.
193         global $locale;
194         $locale = array();
195         // do reinit to purge PHP's static cache
196         // [43ms]
197         if ( ($lcfile = FindLocalizedFile("LC_MESSAGES/phpwiki.php", 'missing_ok', 'reinit')) ) {
198             include($lcfile);
199         }
200     }
201
202     // To get the POSIX character classes in the PCRE's (e.g.
203     // [[:upper:]]) to match extended characters (e.g. GrüßGott), we have
204     // to set the locale, using setlocale().
205     //
206     // The problem is which locale to set?  We would like to recognize all
207     // upper-case characters in the iso-8859-1 character set as upper-case
208     // characters --- not just the ones which are in the current $LANG.
209     //
210     // As it turns out, at least on my system (Linux/glibc-2.2) as long as
211     // you setlocale() to anything but "C" it works fine.  (I'm not sure
212     // whether this is how it's supposed to be, or whether this is a bug
213     // in the libc...)
214     //
215     // We don't currently use the locale setting for anything else, so for
216     // now, just set the locale to US English.
217     //
218     // FIXME: Not all environments may support en_US?  We should probably
219     // have a list of locales to try.
220     if (setlocale(LC_CTYPE, 0) == 'C') {
221         $x = setlocale(LC_CTYPE, 'en_US.' . $GLOBALS['charset']);
222     } else {
223         $x = setlocale(LC_CTYPE, $newlocale);
224     }
225
226     return $newlocale;
227 }
228
229 /** string pcre_fix_posix_classes (string $regexp)
230 *
231 * Older version (pre 3.x?) of the PCRE library do not support
232 * POSIX named character classes (e.g. [[:alnum:]]).
233 *
234 * This is a helper function which can be used to convert a regexp
235 * which contains POSIX named character classes to one that doesn't.
236 *
237 * All instances of strings like '[:<class>:]' are replaced by the equivalent
238 * enumerated character class.
239 *
240 * Implementation Notes:
241 *
242 * Currently we use hard-coded values which are valid only for
243 * ISO-8859-1.  Also, currently on the classes [:alpha:], [:alnum:],
244 * [:upper:] and [:lower:] are implemented.  (The missing classes:
245 * [:blank:], [:cntrl:], [:digit:], [:graph:], [:print:], [:punct:],
246 * [:space:], and [:xdigit:] could easily be added if needed.)
247 *
248 * This is a hack.  I tried to generate these classes automatically
249 * using ereg(), but discovered that in my PHP, at least, ereg() is
250 * slightly broken w.r.t. POSIX character classes.  (It includes
251 * "\xaa" and "\xba" in [:alpha:].)
252 *
253 * So for now, this will do.  --Jeff <dairiki@dairiki.org> 14 Mar, 2001
254 */
255 function pcre_fix_posix_classes ($regexp) {
256     global $charset;
257     if (!isset($charset))
258         $charset = CHARSET; // get rid of constant. pref is dynamic and language specific
259     if (in_array($GLOBALS['LANG'],array('zh')))
260         $charset = 'utf-8';
261     if (in_array($GLOBALS['LANG'],array('ja')))
262         $charset = 'EUC-JP';
263     if (strtolower($charset) == 'utf-8') { // thanks to John McPherson
264         // until posix class names/pcre work with utf-8
265         if (preg_match('/[[:upper:]]/', '\xc4\x80'))
266             return $regexp;    
267         // utf-8 non-ascii chars: most common (eg western) latin chars are 0xc380-0xc3bf
268         // we currently ignore other less common non-ascii characters
269         // (eg central/east european) latin chars are 0xc432-0xcdbf and 0xc580-0xc5be
270         // and indian/cyrillic/asian languages
271         
272         // this replaces [[:lower:]] with utf-8 match (Latin only)
273         $regexp = preg_replace('/\[\[\:lower\:\]\]/','(?:[a-z]|\xc3[\x9f-\xbf]|\xc4[\x81\x83\x85\x87])',
274                                $regexp);
275         // this replaces [[:upper:]] with utf-8 match (Latin only)
276         $regexp = preg_replace('/\[\[\:upper\:\]\]/','(?:[A-Z]|\xc3[\x80-\x9e]|\xc4[\x80\x82\x84\x86])',
277                                $regexp);
278     } elseif (preg_match('/[[:upper:]]/', 'Ä')) {
279         // First check to see if our PCRE lib supports POSIX character
280         // classes.  If it does, there's nothing to do.
281         return $regexp;
282     }
283     static $classes = array(
284                             'alnum' => "0-9A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\xff",
285                             'alpha' => "A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\xff",
286                             'upper' => "A-Z\xc0-\xd6\xd8-\xde",
287                             'lower' => "a-z\xdf-\xf6\xf8-\xff"
288                             );
289     $keys = join('|', array_keys($classes));
290     return preg_replace("/\[:($keys):]/e", '$classes["\1"]', $regexp);
291 }
292
293 function deduce_script_name() {
294     $s = &$GLOBALS['HTTP_SERVER_VARS'];
295     $script = @$s['SCRIPT_NAME'];
296     if (empty($script) or $script[0] != '/') {
297         // Some places (e.g. Lycos) only supply a relative name in
298         // SCRIPT_NAME, but give what we really want in SCRIPT_URL.
299         if (!empty($s['SCRIPT_URL']))
300             $script = $s['SCRIPT_URL'];
301     }
302     return $script;
303 }
304
305 function IsProbablyRedirectToIndex () {
306     // This might be a redirect to the DirectoryIndex,
307     // e.g. REQUEST_URI = /dir/?some_action got redirected
308     // to SCRIPT_NAME = /dir/index.php
309
310     // In this case, the proper virtual path is still
311     // $SCRIPT_NAME, since pages appear at
312     // e.g. /dir/index.php/HomePage.
313
314     $requri = preg_replace('/\?.*$/','',$GLOBALS['HTTP_SERVER_VARS']['REQUEST_URI']);
315     $requri = preg_quote($requri, '%');
316     return preg_match("%^${requri}[^/]*$%", $GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']);
317 }
318
319 // >= php-4.1.0
320 if (!function_exists('array_key_exists')) { // lib/IniConfig.php, sqlite, adodb, ...
321     function array_key_exists($item, $array) {
322         return isset($array[$item]);
323     }
324 }
325
326 // => php-4.0.5
327 if (!function_exists('is_scalar')) { // lib/stdlib.php:hash()
328     function is_scalar($x) {
329         return is_numeric($x) or is_string($x) or is_float($x) or is_bool($x); 
330     }
331 }
332
333 // => php-4.2.0. pear wants to break old php's! DB uses it now.
334 if (!function_exists('is_a')) {
335     function is_a($item,$class) {
336         return isa($item,$class); 
337     }
338 }
339
340 /** 
341  * wordwrap() might crash between 4.1.2 and php-4.3.0RC2, fixed in 4.3.0
342  * See http://bugs.php.net/bug.php?id=20927 and 
343  * http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-1396
344  * Improved version of wordwrap2() in the comments at http://www.php.net/wordwrap
345  */
346 function safe_wordwrap($str, $width=80, $break="\n", $cut=false) {
347     if (check_php_version(4,3))
348         return wordwrap($str, $width, $break, $cut);
349     elseif (!check_php_version(4,1,2))
350         return wordwrap($str, $width, $break, $cut);
351     else {
352         $len = strlen($str);
353         $tag = 0; $result = ''; $wordlen = 0;
354         for ($i = 0; $i < $len; $i++) {
355             $chr = $str[$i];
356             // don't break inside xml tags
357             if ($chr == '<') {
358                 $tag++;
359             } elseif ($chr == '>') {
360                 $tag--;
361             } elseif (!$tag) {
362                 if (!function_exists('ctype_space')) {
363                     if (preg_match('/^\s$/', $chr))
364                         $wordlen = 0;
365                     else
366                         $wordlen++;
367                 }
368                 elseif (ctype_space($chr)) {
369                     $wordlen = 0;
370                 } else {
371                     $wordlen++;
372                 }
373             }
374             if ((!$tag) && ($wordlen) && (!($wordlen % $width))) {
375                 $chr .= $break;
376             }
377             $result .= $chr;
378         }
379         return $result;
380         /*
381         if (isset($str) && isset($width)) {
382             $ex = explode(" ", $str); // wrong: must use preg_split \s+
383             $rp = array();
384             for ($i=0; $i<count($ex); $i++) {
385                 // $word_array = preg_split('//', $ex[$i], -1, PREG_SPLIT_NO_EMPTY);
386                 // delete #&& !is_numeric($ex[$i])# if you want force it anyway
387                 if (strlen($ex[$i]) > $width && !is_numeric($ex[$i])) {
388                     $where = 0;
389                     $rp[$i] = "";
390                     for($b=0; $b < (ceil(strlen($ex[$i]) / $width)); $b++) {
391                         $rp[$i] .= substr($ex[$i], $where, $width).$break;
392                         $where += $width;
393                     }
394                 } else {
395                     $rp[$i] = $ex[$i];
396                 }
397             }
398             return implode(" ",$rp);
399         }
400         return $text;
401         */
402     }
403 }
404
405 function getUploadFilePath() {
406     return defined('PHPWIKI_DIR') ? PHPWIKI_DIR . "/uploads/" : "uploads/";
407 }
408 function getUploadDataPath() {
409   return SERVER_URL . ((substr(DATA_PATH,0,1)=='/') ? '' : "/") . DATA_PATH . '/uploads/';
410 }
411
412 // $Log: not supported by cvs2svn $
413 // Revision 1.123  2004/11/05 21:03:27  rurban
414 // new DEBUG flag: _DEBUG_LOGIN (64)
415 //   verbose login debug-msg (settings and reason for failure)
416 //
417 // Revision 1.122  2004/10/14 17:49:58  rurban
418 // fix warning in safe_wordwrap
419 //
420 // Revision 1.121  2004/10/14 17:48:19  rurban
421 // typo in safe_wordwrap
422 //
423 // Revision 1.120  2004/09/22 13:46:26  rurban
424 // centralize upload paths.
425 // major WikiPluginCached feature enhancement:
426 //   support _STATIC pages in uploads/ instead of dynamic getimg.php? subrequests.
427 //   mainly for debugging, cache problems and action=pdf
428 //
429 // Revision 1.119  2004/09/16 07:50:37  rurban
430 // wordwrap() might crash between 4.1.2 and php-4.3.0RC2, fixed in 4.3.0
431 // See http://bugs.php.net/bug.php?id=20927 and
432 //     http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-1396
433 // Improved version of wordwrap2() from the comments at http://www.php.net/wordwrap
434 //
435 // Revision 1.118  2004/07/13 14:03:31  rurban
436 // just some comments
437 //
438 // Revision 1.117  2004/06/21 17:29:17  rurban
439 // pear DB introduced a is_a requirement. so pear lost support for php < 4.2.0
440 //
441 // Revision 1.116  2004/06/21 08:39:37  rurban
442 // pear/Cache update from Cache-1.5.4 (added db and trifile container)
443 // pear/DB update from DB-1.6.1 (mysql bugfixes, php5 compat, DB_PORTABILITY features)
444 //
445 // Revision 1.115  2004/06/20 14:42:54  rurban
446 // various php5 fixes (still broken at blockparser)
447 //
448 // Revision 1.114  2004/06/19 11:48:05  rurban
449 // moved version check forwards: already needed in XmlElement::_quote
450 //
451 // Revision 1.113  2004/06/03 12:59:41  rurban
452 // simplify translation
453 // NS4 wrap=virtual only
454 //
455 // Revision 1.112  2004/06/02 18:01:46  rurban
456 // init global FileFinder to add proper include paths at startup
457 //   adds PHPWIKI_DIR if started from another dir, lib/pear also
458 // fix slashify for Windows
459 // fix USER_AUTH_POLICY=old, use only USER_AUTH_ORDER methods (besides HttpAuth)
460 //
461 // Revision 1.111  2004/05/17 17:43:29  rurban
462 // CGI: no PATH_INFO fix
463 //
464 // Revision 1.110  2004/05/16 23:10:44  rurban
465 // update_locale wrongly resetted LANG, which broke japanese.
466 // japanese now correctly uses EUC_JP, not utf-8.
467 // more charset and lang headers to help the browser.
468 //
469 // Revision 1.109  2004/05/08 14:06:12  rurban
470 // new support for inlined image attributes: [image.jpg size=50x30 align=right]
471 // minor stability and portability fixes
472 //
473 // Revision 1.108  2004/05/08 11:25:16  rurban
474 // php-4.0.4 fixes
475 //
476 // Revision 1.107  2004/05/06 17:30:38  rurban
477 // CategoryGroup: oops, dos2unix eol
478 // improved phpwiki_version:
479 //   pre -= .0001 (1.3.10pre: 1030.099)
480 //   -p1 += .001 (1.3.9-p1: 1030.091)
481 // improved InstallTable for mysql and generic SQL versions and all newer tables so far.
482 // abstracted more ADODB/PearDB methods for action=upgrade stuff:
483 //   backend->backendType(), backend->database(),
484 //   backend->listOfFields(),
485 //   backend->listOfTables(),
486 //
487 // Revision 1.106  2004/05/02 19:12:14  rurban
488 // fix sf.net bug #945154 Konqueror alt css
489 //
490 // Revision 1.105  2004/05/02 15:10:06  rurban
491 // new finally reliable way to detect if /index.php is called directly
492 //   and if to include lib/main.php
493 // new global AllActionPages
494 // SetupWiki now loads all mandatory pages: HOME_PAGE, action pages, and warns if not.
495 // WikiTranslation what=buttons for Carsten to create the missing MacOSX buttons
496 // PageGroupTestOne => subpages
497 // renamed PhpWikiRss to PhpWikiRecentChanges
498 // more docs, default configs, ...
499 //
500 // Revision 1.104  2004/05/01 11:26:37  rurban
501 // php-4.0.x support: array_key_exists (PHP 4 >= 4.1.0)
502 //
503 // Revision 1.103  2004/04/30 00:04:14  rurban
504 // zh (chinese language) support
505 //
506 // Revision 1.102  2004/04/29 23:25:12  rurban
507 // re-ordered locale init (as in 1.3.9)
508 // fixed loadfile with subpages, and merge/restore anyway
509 //   (sf.net bug #844188)
510 //
511 // Revision 1.101  2004/04/26 13:22:32  rurban
512 // calculate bool old or dynamic constants later
513 //
514 // Revision 1.100  2004/04/26 12:15:01  rurban
515 // check default config values
516 //
517 // Revision 1.99  2004/04/21 14:04:24  zorloc
518 // 'Require lib/FileFinder.php' necessary to allow for call to FindLocalizedFile().
519 //
520 // Revision 1.98  2004/04/20 18:10:28  rurban
521 // config refactoring:
522 //   FileFinder is needed for WikiFarm scripts calling index.php
523 //   config run-time calls moved to lib/IniConfig.php:fix_configs()
524 //   added PHPWIKI_DIR smart-detection code (Theme finder)
525 //   moved FileFind to lib/FileFinder.php
526 //   cleaned lib/config.php
527 //
528 // Revision 1.97  2004/04/18 01:11:52  rurban
529 // more numeric pagename fixes.
530 // fixed action=upload with merge conflict warnings.
531 // charset changed from constant to global (dynamic utf-8 switching)
532 //
533
534 // For emacs users
535 // Local Variables:
536 // mode: php
537 // tab-width: 8
538 // c-basic-offset: 4
539 // c-hanging-comment-ender-p: nil
540 // indent-tabs-mode: nil
541 // End:
542 ?>