mirror of
https://github.com/slawkens/myaac.git
synced 2025-06-29 16:20:15 +02:00
Rename server-info -> ots-info, changelog -> change-log + move rules to admin panel
Due to conflict with apache2 server-info mod
This commit is contained in:
parent
a161cff003
commit
3949d84e5d
@ -27,7 +27,7 @@ if (version_compare(phpversion(), '8.1', '<')) die('PHP version 8.1 or higher is
|
||||
|
||||
const MYAAC = true;
|
||||
const MYAAC_VERSION = '1.4.1-dev';
|
||||
const DATABASE_VERSION = 43;
|
||||
const DATABASE_VERSION = 44;
|
||||
const TABLE_PREFIX = 'myaac_';
|
||||
define('START_TIME', microtime(true));
|
||||
define('MYAAC_OS', stripos(PHP_OS, 'WIN') === 0 ? 'WINDOWS' : (strtoupper(PHP_OS) === 'DARWIN' ? 'MAC' : 'LINUX'));
|
||||
|
39
system/migrations/44.php
Normal file
39
system/migrations/44.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
// 2025-05-14
|
||||
// update pages links
|
||||
// server-info conflicts with apache2 mod
|
||||
// Changelog conflicts with changelog files
|
||||
|
||||
use MyAAC\Models\Menu;
|
||||
use MyAAC\Models\Pages;
|
||||
|
||||
$up = function() {
|
||||
Menu::where('link', 'server-info')->update(['link' => 'ots-info']);
|
||||
Menu::where('link', 'changelog')->update(['link' => 'change-log']);
|
||||
|
||||
Pages::where('name', 'rules_on_the_page')->update(['hide' => 1]);
|
||||
|
||||
$rules = Pages::where('name', 'rules')->first();
|
||||
if (!$rules) {
|
||||
Pages::create([
|
||||
'name' => 'rules',
|
||||
'title' => 'Server Rules',
|
||||
'body' => '<b>{{ config.lua.serverName }} Rules</b><br/>' . nl2br(file_get_contents(__DIR__ . '/30-rules.txt')),
|
||||
'date' => time(),
|
||||
'player_id' => 1,
|
||||
'php' => 0,
|
||||
'enable_tinymce' => 0,
|
||||
'access' => 0,
|
||||
'hide' => 0,
|
||||
]);
|
||||
}
|
||||
};
|
||||
|
||||
$down = function() {
|
||||
Menu::where('link', 'ots-info')->update(['link' => 'server-info']);
|
||||
Menu::where('link', 'change-log')->update(['link' => 'changelog']);
|
||||
|
||||
Pages::where('name', 'rules_on_the_page')->update(['hide' => 0]);
|
||||
};
|
||||
|
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Rules
|
||||
*
|
||||
* @package MyAAC
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2019 MyAAC
|
||||
* @link https://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
$title = 'Server Rules';
|
||||
|
||||
$twig->display('rules.html.twig');
|
@ -1,2 +0,0 @@
|
||||
<b>{{ config.lua.serverName }} Rules</b><br/>
|
||||
{{ getCustomPage('rules_on_the_page') | nl2br }}
|
Loading…
x
Reference in New Issue
Block a user