Vergleich install/index.php - 1.8.5 - 1.8.6

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 65Zeile 65
// Prevent any shut down functions from running
$done_shutdown = 1;


// Prevent any shut down functions from running
$done_shutdown = 1;


// Include the necessary contants for installation

// Include the necessary constants for installation

$grouppermignore = array('gid', 'type', 'title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image');
$groupzerogreater = array('pmquota', 'maxpmrecipients', 'maxreputationsday', 'attachquota', 'maxemails', 'maxwarningsday', 'maxposts', 'edittimelimit', 'canusesigxposts', 'maxreputationsperthread');
$displaygroupfields = array('title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image');

$grouppermignore = array('gid', 'type', 'title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image');
$groupzerogreater = array('pmquota', 'maxpmrecipients', 'maxreputationsday', 'attachquota', 'maxemails', 'maxwarningsday', 'maxposts', 'edittimelimit', 'canusesigxposts', 'maxreputationsperthread');
$displaygroupfields = array('title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image');

Zeile 186Zeile 186
	}
}


	}
}


 
/**
* Welcome page
*/

function intro()
{
global $output, $mybb, $lang;

function intro()
{
global $output, $mybb, $lang;





	$output->print_header($lang->welcome, 'welcome');
if(strpos(strtolower(get_current_location('', '', true)), '/upload/') !== false)
{

	$output->print_header($lang->welcome, 'welcome');
if(strpos(strtolower(get_current_location('', '', true)), '/upload/') !== false)
{

Zeile 199Zeile 202
	$output->print_footer('license');
}


	$output->print_footer('license');
}


 
/**
* Show the license agreement
*/

function license_agreement()
{
global $output, $lang, $mybb;

function license_agreement()
{
global $output, $lang, $mybb;

Zeile 255Zeile 261
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.

Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.





  The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.

  The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.





  1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License

  1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License

Zeile 273Zeile 279
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:





   a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs

   a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs

Zeile 290Zeile 296
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:





   a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.

   a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.

Zeile 464Zeile 470

"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.


"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.





  "The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.

  "The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.

Zeile 1013Zeile 1019
	$output->print_footer('requirements_check');
}


	$output->print_footer('requirements_check');
}


 
/**
* Check our requirements
*/

function requirements_check()
{
global $output, $mybb, $dboptions, $lang;

function requirements_check()
{
global $output, $mybb, $dboptions, $lang;

Zeile 1198Zeile 1207
	}
}


	}
}


 
/**
* Which database do we use?
*/

function database_info()
{
global $output, $dbinfo, $errors, $mybb, $dboptions, $lang;

function database_info()
{
global $output, $dbinfo, $errors, $mybb, $dboptions, $lang;

Zeile 1376Zeile 1388
	$output->print_footer('create_tables');
}


	$output->print_footer('create_tables');
}


 
/**
* Create our tables
*/

function create_tables()
{
global $output, $dbinfo, $errors, $mybb, $dboptions, $lang;

function create_tables()
{
global $output, $dbinfo, $errors, $mybb, $dboptions, $lang;

Zeile 1613Zeile 1628
	$output->print_footer('populate_tables');
}


	$output->print_footer('populate_tables');
}


 
/**
* Insert our default data
*/

function populate_tables()
{
global $output, $lang;

function populate_tables()
{
global $output, $lang;

Zeile 1651Zeile 1669
		$db->query("SELECT setval('{$config['database']['table_prefix']}smilies_sid_seq', (SELECT max(sid) FROM {$config['database']['table_prefix']}smilies));");
$db->query("SELECT setval('{$config['database']['table_prefix']}spiders_sid_seq', (SELECT max(sid) FROM {$config['database']['table_prefix']}spiders));");
$db->query("SELECT setval('{$config['database']['table_prefix']}templategroups_gid_seq', (SELECT max(gid) FROM {$config['database']['table_prefix']}templategroups));");

		$db->query("SELECT setval('{$config['database']['table_prefix']}smilies_sid_seq', (SELECT max(sid) FROM {$config['database']['table_prefix']}smilies));");
$db->query("SELECT setval('{$config['database']['table_prefix']}spiders_sid_seq', (SELECT max(sid) FROM {$config['database']['table_prefix']}spiders));");
$db->query("SELECT setval('{$config['database']['table_prefix']}templategroups_gid_seq', (SELECT max(gid) FROM {$config['database']['table_prefix']}templategroups));");

	}

	}


echo $lang->populate_step_inserted;
$output->print_footer('templates');
}


echo $lang->populate_step_inserted;
$output->print_footer('templates');
}







/**
* Install our theme
*/

function insert_templates()
{
global $mybb, $output, $cache, $db, $lang;

require MYBB_ROOT.'inc/config.php';
$db = db_connection($config);

function insert_templates()
{
global $mybb, $output, $cache, $db, $lang;

require MYBB_ROOT.'inc/config.php';
$db = db_connection($config);





	require_once MYBB_ROOT.'inc/class_datacache.php';
$cache = new datacache;

	require_once MYBB_ROOT.'inc/class_datacache.php';
$cache = new datacache;





	$output->print_header($lang->theme_installation, 'theme');

echo $lang->theme_step_importing;

	$output->print_header($lang->theme_installation, 'theme');

echo $lang->theme_step_importing;





	$db->delete_query("themes");
$db->delete_query("templates");
$db->delete_query("themestylesheets");

	$db->delete_query("themes");
$db->delete_query("templates");
$db->delete_query("themestylesheets");

Zeile 1767Zeile 1788
	$output->print_footer('configuration');
}


	$output->print_footer('configuration');
}


 
/**
* Default configuration
*/

function configure()
{
global $output, $mybb, $errors, $lang;

function configure()
{
global $output, $mybb, $errors, $lang;

Zeile 1879Zeile 1903
	$output->print_footer('adminuser');
}


	$output->print_footer('adminuser');
}


 
/**
* How do we want to name the admin user?
*/

function create_admin_user()
{
global $output, $mybb, $errors, $db, $lang;

function create_admin_user()
{
global $output, $mybb, $errors, $db, $lang;

Zeile 1936Zeile 1963

echo $lang->admin_step_setupsettings;
$adminuser = $adminemail = '';


echo $lang->admin_step_setupsettings;
$adminuser = $adminemail = '';





		$settings = file_get_contents(INSTALL_ROOT.'resources/settings.xml');
$parser = new XMLParser($settings);
$parser->collapse_dups = 0;

		$settings = file_get_contents(INSTALL_ROOT.'resources/settings.xml');
$parser = new XMLParser($settings);
$parser->collapse_dups = 0;

Zeile 2110Zeile 2137
	$output->print_footer('final');
}


	$output->print_footer('final');
}


 
/**
* Installation is finished
*/

function install_done()
{
global $output, $db, $mybb, $errors, $cache, $lang;

function install_done()
{
global $output, $db, $mybb, $errors, $cache, $lang;

Zeile 2375Zeile 2405
	$output->print_footer('');
}


	$output->print_footer('');
}


 
/**
* @param array $config
*
* @return DB_MySQL|DB_MySQLi|DB_PgSQL|DB_SQLite
*/

function db_connection($config)
{
require_once MYBB_ROOT."inc/db_{$config['database']['type']}.php";
switch($config['database']['type'])

function db_connection($config)
{
require_once MYBB_ROOT."inc/db_{$config['database']['type']}.php";
switch($config['database']['type'])

	{

	{

		case "sqlite":
$db = new DB_SQLite;
break;

		case "sqlite":
$db = new DB_SQLite;
break;

Zeile 2399Zeile 2434
	$db->connect($config['database']);
$db->set_table_prefix(TABLE_PREFIX);
$db->type = $config['database']['type'];

	$db->connect($config['database']);
$db->set_table_prefix(TABLE_PREFIX);
$db->type = $config['database']['type'];





	return $db;
}


	return $db;
}


 
/**
* @param array $array
*
* @return string
*/

function error_list($array)
{
$string = "<ul>\n";

function error_list($array)
{
$string = "<ul>\n";

Zeile 2414Zeile 2454
	return $string;
}


	return $string;
}


 
/**
* Write our settings to the settings file
*/

function write_settings()
{
global $db;

function write_settings()
{
global $db;