Removed beta admin components, Removed checks for users and projects files, Updated user_workspace variable

This commit is contained in:
xevidos 2019-02-09 16:18:50 -05:00
parent 81338b1e65
commit 4c46d82f03
3 changed files with 7 additions and 27 deletions

View file

@ -1,3 +0,0 @@
<?php
//Silence is golden.
?>

View file

@ -1,16 +0,0 @@
<?php
/**
* Copyright (c) Codiad, Kent Safranski (codiad.com), and Isaac Brown (telaaedifex.com), distributed
* as-is and without warranty under the MIT License. See
* [root]/license.txt for more. This information must remain intact.
*/
class initialize {
public function __construct() {
Common::check_access();
}
}
?>

View file

@ -121,18 +121,17 @@ if( defined( "SITE_NAME" ) && ! ( SITE_NAME === "" || SITE_NAME === null ) ) {
if( ! isset( $_SESSION['user'] ) ) {
$path = rtrim(str_replace("index.php", "", $_SERVER['SCRIPT_FILENAME']),"/");
$users = file_exists($path . "/data/users.php");
$projects = file_exists($path . "/data/projects.php");
$config = file_exists($path . "/config.php");
$active = file_exists($path . "/data/active.php");
if(!$users && !$projects && !$active){
if( !$config ) {
// Installer
require_once('components/install/view.php');
}else{
} else {
// Login form
?>
<form id="login" method="post" style="position: fixed; width: 350px; top: 30%; left: 50%; margin-left: -175px; padding: 35px;">
<label><span class="icon-user login-icon"></span> <?php i18n("Username"); ?></label>
@ -186,7 +185,7 @@ if( defined( "SITE_NAME" ) && ! ( SITE_NAME === "" || SITE_NAME === null ) ) {
} else {
define( "USER_WORKSPACE", WORKSPACE . "/" . $_SESSION["user"] );
define( "USER_WORKSPACE", WORKSPACE . '/' . preg_replace( '/[^\w-]/', '', strtolower( $_SESSION["user"] ) ) );
if( ! is_dir( USER_WORKSPACE ) ) {