* @author Ivan Enderlin * @license GNU Affero General Public License, Version 3. */ $request = HTTP\Sapi::getRequest(); $response = new HTTP\Response(); /** * If the application has already been installed, redirect to the index. */ if (true === Installer::isInstalled()) { echo file_get_contents(SABRE_KATANA_PREFIX . '/resource/view/install_done.html'); return; } /** * If dependencies have not been installed, we print a specific message. */ if (true === Installer::isDirectoryEmpty(SABRE_KATANA_PREFIX . '/public/static/vendor/')) { echo file_get_contents(SABRE_KATANA_PREFIX . '/resource/view/install_bower.html'); return; } /** * If the application has not the correct permissions. */ $view = function ($directoryName, $directory) { $user = get_current_user(); $userId = getmyuid(); $groupId = getmygid(); $permissions = $directory->getReadablePermissions(); require SABRE_KATANA_PREFIX . '/resource/view/install_permissions.html'; }; $writableDirectories = ['/data', '/data/home', '/data/database', '/data/configuration', '/data/log']; foreach ($writableDirectories as $dir) {
* @author Ivan Enderlin * @license GNU Affero General Public License, Version 3. */ $request = HTTP\Sapi::getRequest(); $response = new HTTP\Response(); /** * If the application has already been installed, redirect to the index. */ if (true === Installer::isInstalled()) { echo file_get_contents('katana://resource/view/install_done.html'); return; } /** * If dependencies have not been installed, we print a specific message. */ if (true === Installer::isDirectoryEmpty('katana://public/static/vendor/')) { echo file_get_contents('katana://resource/view/install_bower.html'); return; } /** * If the application has not the correct permissions. */ $view = function ($directoryName, $directory) { $user = get_current_user(); $userId = getmyuid(); $groupId = getmygid(); $permissions = $directory->getReadablePermissions(); require 'katana://resource/view/install_permissions.html'; }; $dataDirectory = new File\Directory('katana://data/'); $dataDirectory->clearStatisticCache();