Skip to content

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Junker committed Sep 13, 2020
1 parent 85c3dd3 commit 26aa4d6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
11 changes: 0 additions & 11 deletions site/admin/configuration.php.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,4 @@
$USOC["SITE_PATH"] = "../";
$USOC["ADMIN_PATH"] = "";
$USOC["DOMAIN"] = "...";



//Don't remove this function
function newClass()
{
global $U;
if(!isset($U)){
$U = new U();
}
}
?>
15 changes: 14 additions & 1 deletion site/includes/class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,24 @@
* This file conatins the class U. This class is used on every page.
* @licence https://standards.casegames.ch/cgs/0003/v1.txt Case Games Open-Source licence
*/

/**
* This if statement checks the including of configuration.php
*/
if(gettype($USOC) == "array"){
/**
* This function initialise the U class in $U if it doesn't exist
* @version Pb2.0Bfx0
* @since Pb2.0Bfx0
*/
function newClass(){
global $U;
$U = isset($U) ? new U() : $U;
}
/**
* This class contains all functions for USOC. When a function is needed, U includes it.
* This class only works when configuration.php is included.
* Use newClass() and not this class.
* @see newClass()
* @version Pb2.0Bfx0
* @since Pb2.0Bfx0
*/
Expand Down

0 comments on commit 26aa4d6

Please sign in to comment.