]> CyberLeo.Net >> Repos - Github/YOURLS.git/blob - includes/load-yourls.php
1.4-alpha massive commit:
[Github/YOURLS.git] / includes / load-yourls.php
1 <?php\r
2 // This file initialize everything\r
3 \r
4 // Include everything except auth functions\r
5 require_once (dirname(__FILE__).'/version.php');\r
6 require_once (dirname(__FILE__).'/functions.php');\r
7 require_once (dirname(__FILE__).'/functions-baseconvert.php');\r
8 require_once (dirname(__FILE__).'/class-mysql.php');\r
9 \r
10 // Create the YOURLS object $ydb that will contain everything we globally need\r
11 if ( function_exists( 'yourls_db_connect' ) ) {\r
12         global $ydb;\r
13         yourls_db_connect();\r
14 }\r
15 \r
16 // Read option right from start ?\r
17 // TODO: think about it\r
18 \r
19 // Check if upgrade is needed. Note: this is bypassable with define('YOURLS_NO_VERSION_CHECK', true)\r
20 if ( !defined('YOURLS_NO_VERSION_CHECK') || YOURLS_NO_VERSION_CHECK != true ) {\r
21         if ( yourls_upgrade_is_needed() ) {\r
22                 yourls_redirect( YOURLS_SITE .'/admin/upgrade.php' );\r
23         }\r
24 }