瀏覽代碼

! remove unused code from Admin.php (left overs from 2.0)
! add link to php info under support info Subs-Admin.php, Admin.template.php

Spuds 13 年之前
父節點
當前提交
d1ba6b8c8d
共有 3 個文件被更改,包括 12 次插入8 次删除
  1. 0 6
      Sources/Admin.php
  2. 2 1
      Sources/Subs-Admin.php
  3. 10 1
      Themes/default/Admin.template.php

+ 0 - 6
Sources/Admin.php

@@ -520,12 +520,6 @@ function AdminHome()
 
 	// This makes it easier to get the latest news with your time format.
 	$context['time_format'] = urlencode($user_info['time_format']);
-
-	$context['current_versions'] = array(
-		'php' => array('title' => $txt['support_versions_php'], 'version' => PHP_VERSION),
-		'db' => array('title' => sprintf($txt['support_versions_db'], $smcFunc['db_title']), 'version' => ''),
-		'server' => array('title' => $txt['support_versions_server'], 'version' => $_SERVER['SERVER_SOFTWARE']),
-	);
 	$context['forum_version'] = $forum_version;
 
 	// Get a list of current server versions.

+ 2 - 1
Sources/Subs-Admin.php

@@ -65,8 +65,9 @@ function getServerVersions($checkFor)
 		$versions['memcache'] = array('title' => 'Memcached', 'version' => empty($memcached) ? '???' : memcache_get_version($memcached));
 	if (in_array('xcache', $checkFor) && function_exists('xcache_set'))
 		$versions['xcache'] = array('title' => 'XCache', 'version' => XCACHE_VERSION);
+	
 	if (in_array('php', $checkFor))
-		$versions['php'] = array('title' => 'PHP', 'version' => PHP_VERSION);
+		$versions['php'] = array('title' => 'PHP', 'version' => PHP_VERSION, 'more' => '?action=admin;area=serversettings;sa=phpinfo');
 
 	if (in_array('server', $checkFor))
 		$versions['server'] = array('title' => $txt['support_versions_server'], 'version' => $_SERVER['SERVER_SOFTWARE']);

+ 10 - 1
Themes/default/Admin.template.php

@@ -220,9 +220,18 @@ function template_credits()
 
 	// Display all the variables we have server information for.
 	foreach ($context['current_versions'] as $version)
+	{
 		echo '
 					', $version['title'], ':
-				<em>', $version['version'], '</em><br />';
+				<em>', $version['version'], '</em>';
+		
+		// more details for this item, show them a link
+		if ($context['can_admin'] && isset($version['more']))
+			echo 
+				' <a href="', $scripturl, $version['more'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['version_check_more'], '</a>';
+		echo '
+				<br />';
+	}
 
 	echo '
 			</div>