Browse Source

Fix admin_index

Visman 8 years ago
parent
commit
5dc57fd3fe
3 changed files with 11 additions and 73 deletions
  1. 3 41
      admin_index.php
  2. 4 16
      lang/English/admin_index.php
  3. 4 16
      lang/Russian/admin_index.php

+ 3 - 41
admin_index.php

@@ -20,36 +20,6 @@ if (!$pun_user['is_admmod'])
 // Load the admin_index.php language file
 require PUN_ROOT.'lang/'.$admin_language.'/admin_index.php';
 
-$action = isset($_GET['action']) ? $_GET['action'] : null;
-
-// Check for upgrade
-if ($action == 'check_upgrade')
-{
-	if (!ini_get('allow_url_fopen'))
-		message($lang_admin_index['fopen disabled message']);
-
-	$latest_version = trim(@file_get_contents('http://fluxbb.org/latest_version'));
-	if (empty($latest_version))
-		message($lang_admin_index['Upgrade check failed message']);
-
-	if (version_compare($pun_config['s_fork_version'], $latest_version, '>='))
-		message($lang_admin_index['Running latest version message']);
-	else
-		message(sprintf($lang_admin_index['New version available message'], '<a href="http://fluxbb.org/">FluxBB.org</a>'));
-}
-// Remove install.php
-else if ($action == 'remove_install_file')
-{
-	$deleted = @unlink(PUN_ROOT.'install.php');
-
-	if ($deleted)
-		redirect('admin_index.php', $lang_admin_index['Deleted install.php redirect']);
-	else
-		message($lang_admin_index['Delete install.php failed']);
-}
-
-$install_file_exists = is_file(PUN_ROOT.'install.php');
-
 $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Index']);
 define('PUN_ACTIVE_PAGE', 'admin');
 require PUN_ROOT.'header.php';
@@ -75,21 +45,13 @@ generate_admin_menu('index');
 				</ul>
 			</div>
 		</div>
-
-<?php if ($install_file_exists) : ?>
-		<h2 class="block2"><span><?php echo $lang_admin_index['Alerts head'] ?></span></h2>
-		<div id="adalerts" class="box">
-			<p><?php printf($lang_admin_index['Install file exists'], '<a href="admin_index.php?action=remove_install_file">'.$lang_admin_index['Delete install file'].'</a>') ?></p>
-		</div>
-<?php endif; ?>
-
 		<h2 class="block2"><span><?php echo $lang_admin_index['About head'] ?></span></h2>
 		<div id="adstats" class="box">
 			<div class="inbox">
 				<dl>
-					<dt><?php echo $lang_admin_index['FluxBB version label'] ?></dt>
+					<dt><?php echo $lang_admin_index['ForkBB version label'] ?></dt>
 					<dd>
-						<?php printf($lang_admin_index['FluxBB version data']."\n", $pun_config['s_fork_version'].'.'.$pun_config['i_fork_revision'], '<a href="https://fluxbb.org/forums/viewtopic.php?id=4941">'.$lang_admin_index['Check for upgrade'].'</a>') ?> - <a href="https://github.com/MioVisman/FluxBB_by_Visman">GitHub</a>
+						<?php printf($lang_admin_index['ForkBB version data']."\n", $pun_config['s_fork_version'].'.'.$pun_config['i_fork_revision']) ?>
 					</dd>
 					<dt><?php echo $lang_admin_index['Server statistics label'] ?></dt>
 					<dd>
@@ -97,7 +59,7 @@ generate_admin_menu('index');
 					</dd>
 					<dt><?php echo $lang_admin_index['Support label'] ?></dt>
 					<dd>
-						<a href="http://fluxbb.org/forums/index.php"><?php echo $lang_admin_index['Forum label'] ?></a> - <a href="http://fluxbb.org/community/irc.html"><?php echo $lang_admin_index['IRC label'] ?></a>
+						<a href="https://github.com/forkbb/forkbb">GitHub</a>
 					</dd>
 				</dl>
 			</div>

+ 4 - 16
lang/English/admin_index.php

@@ -3,16 +3,10 @@
 // Language definitions used in admin_index.php
 $lang_admin_index = array(
 
-'fopen disabled message'			=>	'Unable to check for upgrade since \'allow_url_fopen\' is disabled on this system.',
-'Upgrade check failed message'		=>	'Check for upgrade failed for unknown reasons.',
-'Running latest version message'	=>	'You are running the latest version of FluxBB.',
-'New version available message'		=>	'A new version of FluxBB has been released. You can download the latest version at %s.',
-'Deleted install.php redirect'		=>	'The file was successfully removed. Redirecting …',
-'Delete install.php failed'			=>	'Could not remove install.php. Please do so by hand.',
 'Not available'						=>	'Not available',
 'Forum admin head'					=>	'Forum administration',
 'NA'								=>	'N/A',
-'Welcome to admin'					=>	'Welcome to the FluxBB administration control panel. From here you can control vital aspects of the board. Depending on whether you are an administrator or a moderator you can:',
+'Welcome to admin'					=>	'Welcome to the ForkBB administration control panel. From here you can control vital aspects of the board. Depending on whether you are an administrator or a moderator you can:',
 'Welcome 1'							=>	'Organize categories and forums.',
 'Welcome 2'							=>	'Set forum-wide options and preferences.',
 'Welcome 3'							=>	'Control permissions for users and guests.',
@@ -22,18 +16,12 @@ $lang_admin_index = array(
 'Welcome 7'							=>	'Set up user groups and promotions.',
 'Welcome 8'							=>	'Prune old posts.',
 'Welcome 9'							=>	'Handle post reports.',
-'Alerts head'						=>	'Alerts',
-'Install file exists'				=>	'The file install.php still exists, but should be removed. %s.',
-'Delete install file'				=>	'Delete it',
-'About head'						=>	'About FluxBB',
-'FluxBB version label'				=>	'FluxBB version',
-'Check for upgrade'					=>	'Check for upgrade',
-'FluxBB version data'				=>	'v%s - %s',
+'About head'						=>	'About ForkBB',
+'ForkBB version label'				=>	'ForkBB version',
+'ForkBB version data'				=>	'v %s',
 'Server statistics label'			=>	'Server statistics',
 'View server statistics'			=>	'View server statistics',
 'Support label'						=>	'Support',
-'Forum label'						=>	'Forum',
-'IRC label'							=>	'IRC channel',
 
 // Language definitions used in admin_statistics.php
 'PHPinfo disabled message'			=>	'The PHP function phpinfo() has been disabled on this server.',

+ 4 - 16
lang/Russian/admin_index.php

@@ -3,16 +3,10 @@
 // Language definitions used in admin_index.php
 $lang_admin_index = array(
 
-'fopen disabled message'			=>	'Unable to check for upgrade since \'allow_url_fopen\' is disabled on this system.',
-'Upgrade check failed message'		=>	'Check for upgrade failed for unknown reasons.',
-'Running latest version message'	=>	'You are running the latest version of FluxBB.',
-'New version available message'		=>	'A new version of FluxBB has been released. You can download the latest version at %s.',
-'Deleted install.php redirect'		=>	'Файл был успешно удален. Переадресация …',
-'Delete install.php failed'			=>	'Невозможно удалить install.php. Пожалуйста, сделайте это вручную.',
 'Not available'						=>	'Not available',
 'Forum admin head'					=>	'Администрирование форума',
 'NA'								=>	'N/A',
-'Welcome to admin'					=>	'Добро пожаловать в панель управления FluxBB! Здесь вы можете настроить ключевые параметры вашего форума. В зависимости от того, Администратор вы или Модератор, вы можете:',
+'Welcome to admin'					=>	'Добро пожаловать в панель управления ForkBB! Здесь вы можете настроить ключевые параметры вашего форума. В зависимости от того, Администратор вы или Модератор, вы можете:',
 'Welcome 1'							=>	'Настроить категории и разделы.',
 'Welcome 2'							=>	'Установить параметры по-умолчанию для форума в целом.',
 'Welcome 3'							=>	'Контролировать права пользователей и гостей.',
@@ -22,18 +16,12 @@ $lang_admin_index = array(
 'Welcome 7'							=>	'Установить группы пользователей и продвижение по ним.',
 'Welcome 8'							=>	'Очистить старые сообщения.',
 'Welcome 9'							=>	'Реагировать на сигналы пользователей.',
-'About head'						=>	'О FluxBB',
-'Alerts head'						=>	'Предупреждения',
-'Install file exists'				=>	'Файл install.php все еще существует, но должен быть удален. %s.',
-'Delete install file'				=>	'Удалить',
-'FluxBB version label'				=>	'Версия FluxBB',
-'Check for upgrade'					=>	'Искать обновления',
-'FluxBB version data'				=>	'v%s - %s',
+'About head'						=>	'О ForkBB',
+'ForkBB version label'				=>	'Версия ForkBB',
+'ForkBB version data'				=>	'v %s',
 'Server statistics label'			=>	'Статистика сервера',
 'View server statistics'			=>	'Смотреть статистику сервера',
 'Support label'						=>	'Саппорт',
-'Forum label'						=>	'Форум',
-'IRC label'							=>	'IRC канал',
 
 // Language definitions used in admin_statistics.php
 'PHPinfo disabled message'			=>	'Функция PHP phpinfo() была отключена на этом сервере.',