mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
feat: Added check for demo-mode in admin_robots.php
and admin_sitemap.php
This commit is contained in:
parent
c27d4373d6
commit
5e2d6f277e
2 changed files with 9 additions and 1 deletions
|
@ -16,8 +16,12 @@ require __DIR__ . '/pagestart.php';
|
||||||
|
|
||||||
$robots_file = BB_ROOT . 'robots.txt';
|
$robots_file = BB_ROOT . 'robots.txt';
|
||||||
|
|
||||||
// Обработка сохранения
|
|
||||||
if (isset($_POST['save'])) {
|
if (isset($_POST['save'])) {
|
||||||
|
// Check for demo mode
|
||||||
|
if (IN_DEMO_MODE) {
|
||||||
|
bb_die($lang['CANT_EDIT_IN_DEMO_MODE']);
|
||||||
|
}
|
||||||
|
|
||||||
$robots_txt = $_POST['robots_txt'] ?? '';
|
$robots_txt = $_POST['robots_txt'] ?? '';
|
||||||
|
|
||||||
if (!is_writable($robots_file) && is_file($robots_file)) {
|
if (!is_writable($robots_file) && is_file($robots_file)) {
|
||||||
|
|
|
@ -33,6 +33,10 @@ if (!$result = DB()->sql_query($sql)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['submit'])) {
|
if (isset($_POST['submit'])) {
|
||||||
|
// Check for demo mode
|
||||||
|
if (IN_DEMO_MODE) {
|
||||||
|
bb_die($lang['CANT_EDIT_IN_DEMO_MODE']);
|
||||||
|
}
|
||||||
if (!empty($new_params)) {
|
if (!empty($new_params)) {
|
||||||
bb_update_config($new_params);
|
bb_update_config($new_params);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue