disabled friendly_urls by default

* as some users have reported problems with it
* fixes when $config['database_*'] is set
This commit is contained in:
slawkens1 2017-05-04 16:57:46 +02:00
parent f35a24b35b
commit ef9d5127a2
5 changed files with 58 additions and 55 deletions

View File

@ -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

View File

@ -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)

View File

@ -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;

View File

@ -1,6 +1,8 @@
<?php <?php
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
if(!isset($config['database_type'][0]) || !isset($config['database_user'][0]) || !isset($config['database_password'][0]) || !isset($config['database_name'][0]))
{
if(isset($config['lua']['sqlType'])) // tfs 0.3 if(isset($config['lua']['sqlType'])) // tfs 0.3
{ {
$config['otserv_version'] = TFS_03; $config['otserv_version'] = TFS_03;
@ -50,6 +52,7 @@ defined('MYAAC') or die('Direct access not allowed!');
$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']))
$config['database_encryption'] = 'md5'; $config['database_encryption'] = 'md5';