Преглед на файлове

Merge pull request #1246 from Arantor/release-2.1

Minor things
Arantor преди 10 години
родител
ревизия
2826e6e4c7

+ 1 - 1
Sources/Display.php

@@ -538,7 +538,7 @@ function Display()
 
 	// Set the topic's information for the template.
 	$context['subject'] = $topicinfo['subject'];
-	$context['num_views'] = $topicinfo['num_views'];
+	$context['num_views'] = comma_format($topicinfo['num_views']);
 	$context['num_views_text'] = $context['num_views'] == 1 ? $txt['read_one_time'] : sprintf($txt['read_many_times'], $context['num_views']);
 	$context['mark_unread_time'] = !empty($virtual_msg) ? $virtual_msg : $topicinfo['new_from'];
 

+ 2 - 2
Sources/ManageCalendar.php

@@ -127,8 +127,8 @@ function ModifyHolidays()
 					),
 				),
 				'sort' => array(
-					'default' => 'title',
-					'reverse' => 'title DESC',
+					'default' => 'title ASC, event_date ASC',
+					'reverse' => 'title DESC, event_date ASC',
 				)
 			),
 			'date' => array(

+ 3 - 0
Sources/Subscriptions-PayPal.php

@@ -99,6 +99,9 @@ class paypal_display
 		$return_data['hidden']['src'] = 1;
 		$return_data['hidden']['notify_url'] = $boardurl . '/subscriptions.php';
 
+		// If possible let's use the language we know we need.
+		$return_data['hidden']['lc'] = !empty($txt['lang_paypal']) ? $txt['lang_paypal'] : 'US';
+
 		// Now stuff dependant on what we're doing.
 		if ($sub_data['flexible'])
 		{

+ 3 - 2
Sources/Themes.php

@@ -1637,7 +1637,7 @@ function SetJavaScript()
  */
 function EditTheme()
 {
-	global $context, $settings, $scripturl, $boarddir, $smcFunc;
+	global $context, $settings, $scripturl, $boarddir, $smcFunc, $txt;
 
 	// @todo Should this be removed?
 	if (isset($_REQUEST['preview']))
@@ -1672,6 +1672,7 @@ function EditTheme()
 	// Get the directory of the theme we are editing.
 	$currentTheme = get_single_theme($_GET['th']);
 	$context['theme_id'] = $currentTheme['id'];
+	$context['browse_title'] = sprintf($txt['themeadmin_browsing_theme'], $currentTheme['name']);
 
 	if (!file_exists($currentTheme['theme_dir'] . '/index.template.php') && !file_exists($currentTheme['theme_dir'] . '/css/index.css'))
 		fatal_lang_error('theme_edit_missing', false);
@@ -1687,7 +1688,7 @@ function EditTheme()
 				$_GET['directory'] = preg_replace(array('~^[\./\\:\0\n\r]+~', '~[\\\\]~', '~/[\./]+~'), array('', '/', '/'), $_GET['directory']);
 
 				$temp = realpath($currentTheme['theme_dir'] . '/' . $_GET['directory']);
-				if (empty($temp) || substr($temp, 0, strlen(realpath($theme_dir))) != realpath($theme_dir))
+				if (empty($temp) || substr($temp, 0, strlen(realpath($currentTheme['theme_dir']))) != realpath($currentTheme['theme_dir']))
 					$_GET['directory'] = '';
 			}
 		}

+ 1 - 1
Themes/default/BoardIndex.template.php

@@ -157,7 +157,7 @@ function template_main()
 					</td>
 					<td class="windowbg stats">
 						<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], '
-						', $board['is_redirect'] ? '' : '<br> '.comma_format($board['topics']) . ' ' . $txt['board_topics'], '
+						', $board['is_redirect'] ? '' : '<br> ' . comma_format($board['topics']) . ' ' . $txt['board_topics'], '
 						</p>
 					</td>
 					<td class="lastpost">';

+ 9 - 1
Themes/default/Themes.template.php

@@ -887,7 +887,15 @@ function template_edit_browse()
 	global $context, $scripturl, $txt;
 
 	echo '
-	<div id="admincenter">
+	<div id="admincenter">';
+
+	if (!empty($context['browse_title']))
+		echo '
+		<div class="cat_bar">
+			<h3 class="catbg">', $context['browse_title'], '</h3>
+		</div>';
+
+	echo '
 		<table class="table_grid tborder">
 		<thead>
 			<tr class="catbg">

+ 4 - 1
Themes/default/languages/ManagePaid.english.php

@@ -3,6 +3,9 @@
 
 global $boardurl;
 
+// Some payment gateways need language specific information.
+$txt['lang_paypal'] = 'US';
+
 // Symbols.
 $txt['usd_symbol'] = '$%1.2f';
 $txt['eur_symbol'] = '&euro;%1.2f';
@@ -205,4 +208,4 @@ $txt['pending_payments_value'] = 'Value';
 $txt['pending_payments_accept'] = 'Accept';
 $txt['pending_payments_remove'] = 'Remove';
 
-?>
+?>

+ 1 - 0
Themes/default/languages/Themes.english.php

@@ -155,6 +155,7 @@ $txt['themeadmin_edit_copy_warning'] = 'When SMF needs a template or language fi
 $txt['themeadmin_edit_copy_confirm'] = 'Are you sure you want to copy this template?';
 $txt['themeadmin_edit_overwrite_confirm'] = 'Are you sure you want to copy this template over the one that already exists?\nThis will OVERWRITE any changes you\\\'ve made';
 $txt['themeadmin_edit_no_copy'] = '<em>(can\'t copy)</em>';
+$txt['themeadmin_browsing_theme'] = 'Browsing files in theme: %1$s';
 $txt['themeadmin_edit_filename'] = 'Filename';
 $txt['themeadmin_edit_modified'] = 'Last Modified';
 $txt['themeadmin_edit_size'] = 'Size';