diff --git a/src/mibew/install/dbperform.php b/src/mibew/install/dbperform.php index 044caaff..5dfe54f1 100644 --- a/src/mibew/install/dbperform.php +++ b/src/mibew/install/dbperform.php @@ -15,6 +15,11 @@ * limitations under the License. */ +/** + * Indicate that installation in progress + */ +define('INSTALLATION_IN_PROGRESS', TRUE); + session_start(); require_once(dirname(dirname(__FILE__)).'/libs/config.php'); diff --git a/src/mibew/install/index.php b/src/mibew/install/index.php index 1933d333..b2317695 100644 --- a/src/mibew/install/index.php +++ b/src/mibew/install/index.php @@ -15,6 +15,11 @@ * limitations under the License. */ +/** + * Indicate that installation in progress + */ +define('INSTALLATION_IN_PROGRESS', TRUE); + session_start(); require_once(dirname(dirname(__FILE__)).'/libs/config.php'); diff --git a/src/mibew/libs/common/misc.php b/src/mibew/libs/common/misc.php index e6bcada9..b944f033 100644 --- a/src/mibew/libs/common/misc.php +++ b/src/mibew/libs/common/misc.php @@ -105,4 +105,17 @@ function array_flatten_recursive($arr) { return $result; } +/** + * Checks if currently processed script is installation script. + * + * @return boolean + */ +function installation_in_progress() { + if (!defined('INSTALLATION_IN_PROGRESS')) { + return FALSE; + } + + return INSTALLATION_IN_PROGRESS; +} + ?> \ No newline at end of file