mirror of
https://github.com/slawkens/myaac.git
synced 2025-11-27 21:56:50 +01:00
* auto generate myaac cache & session prefix on install to be unique accross installations
* prevent adding duplicated newses with installation * players.is_sample to prevent displaying on highscores
This commit is contained in:
@@ -218,6 +218,11 @@ if(!$error) {
|
||||
if(query("ALTER TABLE `players` ADD `comment` TEXT NOT NULL;"))
|
||||
success($locale['step_database_adding_field'] . ' players.comment...');
|
||||
}
|
||||
|
||||
if(!fieldExist('is_sample', 'players')) {
|
||||
if(query("ALTER TABLE `players` ADD `is_sample` TINYINT(1) NOT NULL DEFAULT 0;"))
|
||||
success($locale['step_database_adding_field'] . ' players.is_sample...');
|
||||
}
|
||||
}
|
||||
|
||||
if(!$error && (!isset($_SESSION['saved']))) {
|
||||
@@ -239,6 +244,10 @@ if(!$error) {
|
||||
$content .= PHP_EOL;
|
||||
$content .= '$config[\'client_download_linux\'] = \'http://tibia-clients.com/clients/download/\'. $config[\'client\'] . \'/tar/linux\';';
|
||||
$content .= PHP_EOL;
|
||||
$content .= '$config[\'session_prefix\'] = \'myaac_' . generateRandomString(8, true, false, true, false) . '\';';
|
||||
$content .= PHP_EOL;
|
||||
$content .= '$config[\'cache_prefix\'] = \'myaac_' . generateRandomString(8, true, false, true, false) . '\';';
|
||||
$content .= PHP_EOL;
|
||||
$content .= '// place for your configuration directives, so you can later easily update myaac';
|
||||
$content .= PHP_EOL;
|
||||
$content .= "?>";
|
||||
|
||||
Reference in New Issue
Block a user