Просмотр исходного кода

Minor Lang Changes and Addition of Admin Link if Admin Since It's Confusing

own3mall 9 лет назад
Родитель
Сommit
8f0de1c8d6
3 измененных файлов с 11 добавлено и 3 удалено
  1. 4 1
      lang/English/modules/cron.php
  2. 1 1
      modules/cron/cron.php
  3. 6 1
      modules/cron/user_cron.php

+ 4 - 1
lang/English/modules/cron.php

@@ -41,4 +41,7 @@ define('scheduled_jobs', "Scheduled jobs");
 define('there_are_no_scheduled_jobs', "There are no scheduled jobs");
 define('cron_events', "Cron Events");
 define('refresh_interval', "Refresh Interval");
-?>
+define('cron_no_servers_tied_to_account', "There are no game servers directly assigned to your account.");
+define('cron_admin_link_display_text', "Cron Administration (All Servers)");
+define('cron_admin_no_ogp_servers_to_display', "There aren't any game servers currently configured in OGP.");
+?>

+ 1 - 1
modules/cron/cron.php

@@ -159,7 +159,7 @@ function exec_ogp_module()
 	$homes = $db->getIpPorts();
 	if(!$homes)
 	{
-		print_failure('There are no game servers assigned');
+		print_failure(get_lang('cron_admin_no_ogp_servers_to_display'));
 		return 0;
 	}
 	

+ 6 - 1
modules/cron/user_cron.php

@@ -160,10 +160,15 @@ function get_remote_server_selector($r_servers, $remote_servers_offline, $remote
 function exec_ogp_module() 
 {
 	global $db;
+	$isAdmin = $db->isAdmin($_SESSION['user_id']);
+
 	$homes = $db->getIpPortsForUser($_SESSION['user_id']);
 	if(!$homes)
 	{
-		print_failure('There are no game servers assigned');
+		print_failure(get_lang('cron_no_servers_tied_to_account'));
+		if($isAdmin){
+			echo '<a href="home.php?m=cron&p=cron">' . get_lang('cron_admin_link_display_text') . '</a>';
+		}
 		return 0;
 	}