Commit ec81524945abee091e009d3414c96a9d7da83190
1 parent
19220744
fix for hard-to-identify gettext bug, where _() is not installed _and_ MySQL
is not running on install. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5082 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
5 additions
and
0 deletions
config/dmsDefaults.php
| @@ -380,6 +380,11 @@ class KTInit { | @@ -380,6 +380,11 @@ class KTInit { | ||
| 380 | 380 | ||
| 381 | $KTInit = new KTInit(); | 381 | $KTInit = new KTInit(); |
| 382 | 382 | ||
| 383 | +// handle unexpected errors in smarty somewhat more gracefully, even if no gettext is installed. | ||
| 384 | +if (!function_exists('_')) { | ||
| 385 | + function _($s) { return $s; } | ||
| 386 | +} | ||
| 387 | + | ||
| 383 | $KTInit->prependPath(KT_DIR . '/thirdparty/pear'); | 388 | $KTInit->prependPath(KT_DIR . '/thirdparty/pear'); |
| 384 | $KTInit->prependPath(KT_DIR . '/thirdparty/Smarty'); | 389 | $KTInit->prependPath(KT_DIR . '/thirdparty/Smarty'); |
| 385 | require_once('PEAR.php'); | 390 | require_once('PEAR.php'); |