Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moves stats from wordpress to /stats.php #157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions internal/classes/obo/perms/RoleManager.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,15 @@ public function isSuperUser()
return $_SESSION['isSuperUser'];
}

public function isStatsUser()
{
if(!isset($_SESSION['isStatsUser']))
{
$_SESSION['isStatsUser'] = $this->doesUserHaveRole(array(\obo\perms\Role::SUPER_STATS, \obo\perms\Role::SUPER_USER));
}
return $_SESSION['isStatsUser'];
}

public function isSuperStats()
{
if(!isset($_SESSION['isSuperStats']))
Expand Down
2 changes: 1 addition & 1 deletion internal/config/cfgLocal.docker.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class AppCfg extends AppCfgDefault

// --- DIRECTORYS & PATHS ---
const DIR_BASE = '/var/www/html/'; // Define Base Directory [ full path EX: /www/obobjobo/ ]
const URL_WEB = 'https://127.0.0.1:8080/'; // Define the web directory for the base of GS [root inclusive at starting slash: http://obojobo.com/]
const URL_WEB = 'http://127.0.0.1/'; // Define the web directory for the base of GS [root inclusive at starting slash: http://obojobo.com/]

// --- Main App DB Connection ---
const DB_HOST = 'mysql';
Expand Down
14 changes: 14 additions & 0 deletions stats-login.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
require_once('internal/app.php');
require('internal/includes/login.php');

// redirect to repository
if ($loggedIn)
{
header("Location: /stats.php");
exit;
}

// render login form
$title = 'Obojobo Stats';
include("assets/templates/login.php");
Loading