Add installation_in_progress function

This commit is contained in:
Dmitriy Simushev 2013-12-17 15:09:29 +00:00
parent 58b89f7ae4
commit b4ba38d770
3 changed files with 23 additions and 0 deletions

View File

@ -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');

View File

@ -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');

View File

@ -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;
}
?>