Core::checkIsInstalled PHP Method

checkIsInstalled() public static method

Full installation of the program is determined by (a) the settings.php file existing and (b) the "installationComplete" setting value existing in the database. Note: this function assumes the database connection in Core::$db has already been created.
public static checkIsInstalled ( )
    public static function checkIsInstalled()
    {
        if (!self::$settingsFileExists) {
            return false;
        }
        // attempt to make the connection
        Core::initDatabase();
        $installationComplete = Settings::getSetting("installationComplete");
        if (!isset($installationComplete) || $installationComplete == "no") {
            return false;
        }
        return true;
    }

Usage Example

 function __construct()
 {
     if (!Core::checkIsInstalled()) {
         return;
     }
     $this->dbLink = Core::$db->getDBLink();
     $this->dbPrefix = Core::getDbTablePrefix();
     // register this object as the session handler
     session_set_save_handler(array(&$this, "open"), array(&$this, "close"), array(&$this, "read"), array(&$this, "write"), array(&$this, "destroy"), array(&$this, "gc"));
 }
All Usage Examples Of Core::checkIsInstalled