mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
disabled friendly_urls by default
* as some users have reported problems with it * fixes when $config['database_*'] is set
This commit is contained in:
parent
f35a24b35b
commit
ef9d5127a2
@ -28,7 +28,7 @@ $config = array(
|
|||||||
// used for the Downloads page and some templates aswell
|
// used for the Downloads page and some templates aswell
|
||||||
'client' => 1098, // 954 = client 9.54
|
'client' => 1098, // 954 = client 9.54
|
||||||
|
|
||||||
'friendly_urls' => false, // mod_rewrite is required for this, it makes links looks more elegant to eye, and also are SEO friendly (example: http://my-aac.org/guilds/Testing instead of http://my-aac.org/?subtopic=guilds&name=Testing)
|
'friendly_urls' => false, // mod_rewrite is required for this, it makes links looks more elegant to eye, and also are SEO friendly (example: http://my-aac.org/guilds/Testing instead of http://my-aac.org/?subtopic=guilds&name=Testing). Remember to rename .htaccess.dist to .htaccess
|
||||||
'gzip_output' => false, // gzip page content before sending it to the browser, uses less bandwidth but more cpu cycles
|
'gzip_output' => false, // gzip page content before sending it to the browser, uses less bandwidth but more cpu cycles
|
||||||
|
|
||||||
// gesior backward support (templates & pages)
|
// gesior backward support (templates & pages)
|
||||||
@ -59,7 +59,7 @@ $config = array(
|
|||||||
|
|
||||||
// cache system. by default file cache is used
|
// cache system. by default file cache is used
|
||||||
'cache_engine' => 'auto', // apc, eaccelerator, xcache, file, auto, or blank to disable.
|
'cache_engine' => 'auto', // apc, eaccelerator, xcache, file, auto, or blank to disable.
|
||||||
'cache_prefix' => 'myaac_', // have to be unique if running more MyAAC instances on the same server, ignored when using file cache.
|
'cache_prefix' => 'myaac_', // have to be unique if running more MyAAC instances on the same server
|
||||||
|
|
||||||
// database details (leave blank for auto detect from config.lua)
|
// database details (leave blank for auto detect from config.lua)
|
||||||
'database_host' => '',
|
'database_host' => '',
|
||||||
@ -90,8 +90,8 @@ $config = array(
|
|||||||
'mail_address' => 'no-reply@your-server.org', // server e-mail address (from:)
|
'mail_address' => 'no-reply@your-server.org', // server e-mail address (from:)
|
||||||
'mail_admin' => 'your-address@your-server.org', // admin email address, where mails from contact form will be sent
|
'mail_admin' => 'your-address@your-server.org', // admin email address, where mails from contact form will be sent
|
||||||
'mail_signature' => array( // signature that will be included at the end of every message sent using _mail function
|
'mail_signature' => array( // signature that will be included at the end of every message sent using _mail function
|
||||||
'plain' => "--\nMy Server,\nhttp://www.myserver.com",
|
'plain' => ''/*'--\nMy Server,\nhttp://www.myserver.com'*/,
|
||||||
'html' => '<br/>My Server,\n<a href="http://www.myserver.com">myserver.com</a>'
|
'html' => ''/*'<br/>My Server,\n<a href="http://www.myserver.com">myserver.com</a>'*/
|
||||||
),
|
),
|
||||||
'smtp_enabled' => false, // send by smtp or mail function (set false if use mail function)
|
'smtp_enabled' => false, // send by smtp or mail function (set false if use mail function)
|
||||||
'smtp_host' => '', // mail host
|
'smtp_host' => '', // mail host
|
||||||
|
@ -18,7 +18,7 @@ else
|
|||||||
// detect locale
|
// detect locale
|
||||||
$locale_s = get_browser_languages();
|
$locale_s = get_browser_languages();
|
||||||
if(!sizeof($locale_s))
|
if(!sizeof($locale_s))
|
||||||
$locale__ = 'en';
|
$locale_ = 'en';
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreach($locale_s as $id => $tmp)
|
foreach($locale_s as $id => $tmp)
|
||||||
|
@ -213,10 +213,10 @@ if(!$error) {
|
|||||||
if(!$error && (!isset($_SESSION['saved']))) {
|
if(!$error && (!isset($_SESSION['saved']))) {
|
||||||
$content .= '$config[\'installed\'] = true;';
|
$content .= '$config[\'installed\'] = true;';
|
||||||
$content .= PHP_EOL;
|
$content .= PHP_EOL;
|
||||||
if(strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) {
|
// if(strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) {
|
||||||
$content .= '$config[\'friendly_urls\'] = true;';
|
// $content .= '$config[\'friendly_urls\'] = true;';
|
||||||
$content .= PHP_EOL;
|
// $content .= PHP_EOL;
|
||||||
}
|
// }
|
||||||
|
|
||||||
$content .= '$config[\'mail_enabled\'] = true;';
|
$content .= '$config[\'mail_enabled\'] = true;';
|
||||||
$content .= PHP_EOL;
|
$content .= PHP_EOL;
|
||||||
|
@ -1,54 +1,57 @@
|
|||||||
<?php
|
<?php
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
if(isset($config['lua']['sqlType'])) // tfs 0.3
|
if(!isset($config['database_type'][0]) || !isset($config['database_user'][0]) || !isset($config['database_password'][0]) || !isset($config['database_name'][0]))
|
||||||
{
|
{
|
||||||
$config['otserv_version'] = TFS_03;
|
if(isset($config['lua']['sqlType'])) // tfs 0.3
|
||||||
$config['database_type'] = $config['lua']['sqlType'];
|
{
|
||||||
$config['database_host'] = $config['lua']['sqlHost'];
|
$config['otserv_version'] = TFS_03;
|
||||||
$config['database_port'] = $config['lua']['sqlPort'];
|
$config['database_type'] = $config['lua']['sqlType'];
|
||||||
$config['database_user'] = $config['lua']['sqlUser'];
|
$config['database_host'] = $config['lua']['sqlHost'];
|
||||||
$config['database_password'] = $config['lua']['sqlPass'];
|
$config['database_port'] = $config['lua']['sqlPort'];
|
||||||
$config['database_name'] = $config['lua']['sqlDatabase'];
|
$config['database_user'] = $config['lua']['sqlUser'];
|
||||||
|
$config['database_password'] = $config['lua']['sqlPass'];
|
||||||
|
$config['database_name'] = $config['lua']['sqlDatabase'];
|
||||||
|
|
||||||
$config['database_encryption'] = $config['lua']['encryptionType'];
|
$config['database_encryption'] = $config['lua']['encryptionType'];
|
||||||
if(!isset($config['database_encryption']) || empty($config['database_encryption'])) // before 0.3.6
|
if(!isset($config['database_encryption']) || empty($config['database_encryption'])) // before 0.3.6
|
||||||
$config['database_encryption'] = $config['lua']['passwordType'];
|
$config['database_encryption'] = $config['lua']['passwordType'];
|
||||||
}
|
}
|
||||||
else if(isset($config['lua']['mysqlHost'])) // tfs 0.2/1.0
|
else if(isset($config['lua']['mysqlHost'])) // tfs 0.2/1.0
|
||||||
{
|
{
|
||||||
$config['otserv_version'] = TFS_02;
|
$config['otserv_version'] = TFS_02;
|
||||||
$config['database_type'] = 'mysql';
|
$config['database_type'] = 'mysql';
|
||||||
$config['database_host'] = $config['lua']['mysqlHost'];
|
$config['database_host'] = $config['lua']['mysqlHost'];
|
||||||
$config['database_port'] = $config['lua']['mysqlPort'];
|
$config['database_port'] = $config['lua']['mysqlPort'];
|
||||||
$config['database_user'] = $config['lua']['mysqlUser'];
|
$config['database_user'] = $config['lua']['mysqlUser'];
|
||||||
$config['database_password'] = $config['lua']['mysqlPass'];
|
$config['database_password'] = $config['lua']['mysqlPass'];
|
||||||
$config['database_name'] = $config['lua']['mysqlDatabase'];
|
$config['database_name'] = $config['lua']['mysqlDatabase'];
|
||||||
$config['database_encryption'] = 'sha1';
|
$config['database_encryption'] = 'sha1';
|
||||||
}
|
}
|
||||||
else if(isset($config['lua']['database_type'])) // otserv
|
else if(isset($config['lua']['database_type'])) // otserv
|
||||||
{
|
{
|
||||||
$config['otserv_version'] = OTSERV;
|
$config['otserv_version'] = OTSERV;
|
||||||
$config['database_type'] = $config['lua']['database_type'];
|
$config['database_type'] = $config['lua']['database_type'];
|
||||||
$config['database_host'] = $config['lua']['database_host'];
|
$config['database_host'] = $config['lua']['database_host'];
|
||||||
$config['database_port'] = $config['lua']['database_port'];
|
$config['database_port'] = $config['lua']['database_port'];
|
||||||
$config['database_user'] = $config['lua']['database_username'];
|
$config['database_user'] = $config['lua']['database_username'];
|
||||||
$config['database_password'] = $config['lua']['database_password'];
|
$config['database_password'] = $config['lua']['database_password'];
|
||||||
$config['database_name'] = $config['lua']['database_schema'];
|
$config['database_name'] = $config['lua']['database_schema'];
|
||||||
$config['database_encryption'] = isset($config['lua']['passwordtype']) ? $config['lua']['passwordtype'] : $config['lua']['password_type'];
|
$config['database_encryption'] = isset($config['lua']['passwordtype']) ? $config['lua']['passwordtype'] : $config['lua']['password_type'];
|
||||||
$config['database_salt'] = isset($config['lua']['passwordsalt']) ? $config['lua']['passwordsalt'] : $config['lua']['password_salt'];
|
$config['database_salt'] = isset($config['lua']['passwordsalt']) ? $config['lua']['passwordsalt'] : $config['lua']['password_salt'];
|
||||||
}
|
}
|
||||||
else if(isset($config['lua']['sql_host'])) // otserv 0.6.3 / 0.6.4
|
else if(isset($config['lua']['sql_host'])) // otserv 0.6.3 / 0.6.4
|
||||||
{
|
{
|
||||||
$config['otserv_version'] = OTSERV_06;
|
$config['otserv_version'] = OTSERV_06;
|
||||||
$config['database_type'] = $config['lua']['sql_type'];
|
$config['database_type'] = $config['lua']['sql_type'];
|
||||||
$config['database_host'] = $config['lua']['sql_host'];
|
$config['database_host'] = $config['lua']['sql_host'];
|
||||||
$config['database_port'] = $config['lua']['sql_port'];
|
$config['database_port'] = $config['lua']['sql_port'];
|
||||||
$config['database_user'] = $config['lua']['sql_user'];
|
$config['database_user'] = $config['lua']['sql_user'];
|
||||||
$config['database_password'] = $config['lua']['sql_pass'];
|
$config['database_password'] = $config['lua']['sql_pass'];
|
||||||
$config['database_name'] = $config['lua']['sql_db'];
|
$config['database_name'] = $config['lua']['sql_db'];
|
||||||
$config['database_encryption'] = isset($config['lua']['passwordtype']) ? $config['lua']['passwordtype'] : $config['lua']['password_type'];
|
$config['database_encryption'] = isset($config['lua']['passwordtype']) ? $config['lua']['passwordtype'] : $config['lua']['password_type'];
|
||||||
$config['database_salt'] = isset($config['lua']['passwordsalt']) ? $config['lua']['passwordsalt'] : $config['lua']['password_salt'];
|
$config['database_salt'] = isset($config['lua']['passwordsalt']) ? $config['lua']['passwordsalt'] : $config['lua']['password_salt'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($config['lua']['useMD5Passwords']) && getBoolean($config['lua']['useMD5Passwords']))
|
if(isset($config['lua']['useMD5Passwords']) && getBoolean($config['lua']['useMD5Passwords']))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user