Moved everything concerning system(-settings) to /content/.system

This commit is contained in:
kolaente 2017-10-04 17:15:36 +02:00
parent a66b948ffd
commit 3faa9d3c35
8 changed files with 17 additions and 22 deletions

View File

@ -40,9 +40,9 @@ if (hasPerm('manage_system'))
{
if (isset($_POST['constr_message']))
{
if (file_put_contents('../inc/System/construction2.txt', $_POST['constr_message']))
if (file_put_contents('../content/.system/construction2.txt', $_POST['constr_message']))
{
copy('../inc/System/construction2.txt', '../inc/System/construction.txt');
copy('../content/.system/construction2.txt', '../content/.system/construction.txt');
echo msg('success', $lang->get('action_construction_message_success') . ' <a href="general_config.php">' . $lang->get('back') . '</a>');
stream_message('{user} edited the construction-mode message.', 2);
} else
@ -57,7 +57,7 @@ if (hasPerm('manage_system'))
<h1><?php echo $lang->get('action_construction_message_edit'); ?></h1>
<form action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post">
<textarea id="editor"
name="constr_message"><?php require('../inc/System/construction2.txt'); ?></textarea>
name="constr_message"><?php require('../content/.system/construction2.txt'); ?></textarea>
<input type="submit" value="<?php echo $lang->get('general_save_changes'); ?>"/>
</form>
</div>
@ -67,11 +67,11 @@ if (hasPerm('manage_system'))
{
if (hasPerm('construction'))
{
if (!file_exists('../inc/System/construction.txt'))
if (!file_exists('../content/.system/construction.txt'))
{
if (isset($_GET['confirm']))
{
if (copy('../inc/System/construction2.txt', '../inc/System/construction.txt'))
if (copy('../content/.system/construction2.txt', '../content/.system/construction.txt'))
{
echo msg('success', $lang->get('action_construction_success') . ' <a href="general_config.php">' . $lang->get('back') . '</a>');
stream_message('{user} put the site into construction mode.', 2);
@ -97,7 +97,7 @@ if (hasPerm('manage_system'))
{
if (isset($_GET['confirm']))
{
if (unlink('../inc/System/construction.txt'))
if (unlink('../content/.system/construction.txt'))
{
echo msg('success', $lang->get('action_construction_removed_success') . ' <a href="general_config.php">' . $lang->get('back') . '</a>');
stream_message('{user} put the site into production mode.', 2);
@ -132,7 +132,7 @@ if (hasPerm('manage_system'))
if (hasPerm('edit_title'))
{
$titel = $_POST['titel'];
if (file_put_contents('../inc/System/page_title.txt', $titel))
if (file_put_contents('../content/.system/page_title.txt', $titel))
{
echo msg('success', $lang->get('action_change_page_title_success'));
stream_message('{user} edited the page title.', 2);

View File

@ -23,7 +23,7 @@ tinymce();
?>
<p><span><?php echo $lang->get('general_construction_mode'); ?></span>
<?php
if (file_exists('../inc/System/construction.txt'))
if (file_exists('../content/.system/construction.txt'))
{
echo '<a href="action.php?construction" class="button">' . $lang->get('general_end_construction_mode') . '</a>';
} else

View File

@ -53,7 +53,6 @@ if (isset($_POST['submit']))
$CONFIG = [];
$CONFIG['General']['web_uri'] = $_POST['general_webUrl'];
$CONFIG['General']['home_uri'] = $_POST['general_home_url'];
$CONFIG['General']['title'] = 'inc/System/page_title.txt';
$CONFIG['General']['tinymce_css'] = $_POST['general_editor_css'];
$CONFIG['General']['timezone'] = $_POST['general_timezone'];
$CONFIG['Database']['db_type'] = 'mysql';
@ -196,7 +195,7 @@ ALTER TABLE `' . $_POST['db_prefix'] . 'system_roles`
}
//Page title
if (file_put_contents('../inc/System/page_title.txt', $_POST['general_page_title']))
if (file_put_contents('../content/.system/page_title.txt', $_POST['general_page_title']))
{
echo msg('success', 'Page Title was successfully set.<br/>');
} else

View File

@ -0,0 +1,4 @@
<h1 dir="ltr">Baustelle</h1>
<p>oder so</p>
<p>(oder?)</p>
<p><a href="http://mowie.cc">mowie.cc</a></p>

View File

@ -1,8 +0,0 @@
<h1>Baustelle</h1>
<p>&nbsp;</p>
<p>oder so</p>
<p>&nbsp;</p>
<p>(oder?)</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="/SelfCMS/Mowie-Github/admin/mowie.cc">mowie.cc</a></p>

View File

@ -38,7 +38,7 @@ $MCONF['db_prefix'] = $config['Database']['db_prefix'];
//General
$MCONF['web_uri'] = $config['General']['web_uri'];
$MCONF['home_uri'] = $config['General']['home_uri'];
$MCONF['title'] = file_get_contents(str_replace('config/config.yml', '', $cfg_path).$config['General']['title']);
$MCONF['title'] = file_get_contents(str_replace('config/config.yml', '', $cfg_path).'content/.system/page_title.txt');
$MCONF['tinymce_css'] = $MCONF['web_uri'].$config['General']['tinymce_css'];
$MCONF['timezone'] = $config['General']['timezone'];

View File

@ -11,9 +11,9 @@ if (file_exists('config/config.yml'))
require_once 'inc/apps.php';
//Under Construction?
if (file_exists('inc/System/construction.txt'))
if (file_exists('content/.system/construction.txt'))
{
echo file_get_contents('inc/System/construction.txt');
echo file_get_contents('content/.system/construction.txt');
} else
{
//Page
@ -92,7 +92,7 @@ if (file_exists('config/config.yml'))
if ($page->getResponseCode() == 404)
{
$page->setTitle('404');
$page->setContent(file_get_contents('inc/System/404.txt'));
$page->setContent(file_get_contents('content/.system/404.txt'));
}
//Build Copyright