2 // This file initialize everything
\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
10 // Create the YOURLS object $ydb that will contain everything we globally need
\r
11 if ( function_exists( 'yourls_db_connect' ) ) {
\r
13 yourls_db_connect();
\r
16 // Read option right from start ?
\r
17 // TODO: think about it
\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