Skip to content

Commit

Permalink
Update start.php
Browse files Browse the repository at this point in the history
  • Loading branch information
lianglee authored Jul 10, 2018
1 parent c4c64c3 commit 206fdfe
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions system/start.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
* @license Open Source Social Network License (OSSN LICENSE) http://www.opensource-socialnetwork.org/licence
* @link http://www.informatikon.com/
*/
session_start();

//Restrict calling start.php directly from browser #1315
if(!defined("OSSN_ALLOW_SYSTEM_START")){
header("HTTP/1.0 404 Not Found");
exit;
}
global $Ossn;
if (!isset($Ossn)) {
$Ossn = new stdClass;
}

include_once(dirname(dirname(__FILE__)) . '/libraries/ossn.lib.route.php');

if (!is_file(ossn_route()->configs . 'ossn.config.site.php') && !is_file(ossn_route()->configs . 'ossn.config.db.php')) {
Expand All @@ -32,6 +34,8 @@
throw new exception('Cannot include all classes');
}
}
//Load session start after classes #1318
session_start();
foreach ($Ossn->libraries as $lib) {
if (!include_once(ossn_route()->libs . "ossn.lib.{$lib}.php")) {
throw new exception('Cannot include all libraries');
Expand Down

0 comments on commit 206fdfe

Please sign in to comment.