X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fvalidate.php;h=735aec4902fca6bca07fff64ab683bf94ca1c169;hb=9edbc08b1a549c2efc8181fe7c321447b58c466d;hp=8738cc35f2ff84b56d6675df90666cfa4a14af23;hpb=dcc1cc825e550711d0207a737f9ea3ac2b38e923;p=squirrelmail.git diff --git a/include/validate.php b/include/validate.php index 8738cc35..735aec49 100644 --- a/include/validate.php +++ b/include/validate.php @@ -1,28 +1,27 @@ + +/* temporary sm_init section */ + +include_once(SM_PATH . 'class/template/template.class.php'); +include_once(SM_PATH . 'class/error.class.php'); +/* + * Initialize the template object + */ +global $sTplDir; +$oTemplate = new Template($sTplDir); + +/* + * Initialize our custom error handler object + */ +$oErrorHandler = new ErrorHandler($oTemplate,'error_message.tpl'); + +/* + * Activate custom error handling + */ +if (version_compare(PHP_VERSION, "4.3.0", ">=")) { + $oldErrorHandler = set_error_handler(array($oErrorHandler, 'SquirrelMailErrorhandler')); +} else { + $oldErrorHandler = set_error_handler('SquirrelMailErrorhandler'); +} + +?> \ No newline at end of file