diff --git a/core/ormlinkset.class.inc.php b/core/ormlinkset.class.inc.php index 7a307c129..822bd3045 100644 --- a/core/ormlinkset.class.inc.php +++ b/core/ormlinkset.class.inc.php @@ -30,8 +30,8 @@ require_once('dbobjectiterator.php'); class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator { - const LINK_ALIAS = 'Link'; - const REMOTE_ALIAS = 'Remote'; + public const LINK_ALIAS = 'Link'; + public const REMOTE_ALIAS = 'Remote'; protected $sHostClass; // subclass of DBObject protected $sAttCode; // xxxxxx_list diff --git a/setup/index.php b/setup/index.php index c98ea1d8d..e61956cff 100644 --- a/setup/index.php +++ b/setup/index.php @@ -1,6 +1,13 @@ + + + +iTop Setup - redirection + + + + +HTML; -///////////////////////////////////////////////////////////////////// -// Fake functions to protect the first run of the installer -// in case the PHP JSON module is not installed... -if (!function_exists('json_encode')) + +function HandlePageErrors() { - function json_encode($value, $options = null) - { - return '[]'; + $error = error_get_last(); + if ($error + && (isset($error['type'])) + && (in_array($error['type'], [E_ERROR, E_PARSE, E_COMPILE_ERROR], true))) { + ob_end_clean(); } } -if (!function_exists('json_decode')) -{ - function json_decode($json, $assoc=null) - { - return array(); - } -} -///////////////////////////////////////////////////////////////////// -$oWizard = new WizardController('WizStepWelcome'); -$oWizard->Run(); + +register_shutdown_function('HandlePageErrors'); +ob_start(); +require_once("wizard.php"); +ob_end_clean(); + +//echo << +//bSkipErrorDisplay = true; +//document.location = "wizard.php"; +// +//HTML; +?> + + diff --git a/setup/wizard.php b/setup/wizard.php new file mode 100644 index 000000000..6c735b09c --- /dev/null +++ b/setup/wizard.php @@ -0,0 +1,64 @@ +Run();