|
@@ -501,7 +501,7 @@ function updateSettings($changeArray, $update = false, $debug = false)
|
|
|
*/
|
|
|
function constructPageIndex($base_url, &$start, $max_value, $num_per_page, $flexible_start = false)
|
|
|
{
|
|
|
- global $modSettings;
|
|
|
+ global $modSettings, $context;
|
|
|
|
|
|
// Save whether $start was less than 0 or not.
|
|
|
$start = (int) $start;
|
|
@@ -517,6 +517,8 @@ function constructPageIndex($base_url, &$start, $max_value, $num_per_page, $flex
|
|
|
else
|
|
|
$start = max(0, (int) $start - ((int) $start % (int) $num_per_page));
|
|
|
|
|
|
+ $context['current_page'] = $start / $num_per_page;
|
|
|
+
|
|
|
// Wireless will need the protocol on the URL somewhere.
|
|
|
if (WIRELESS)
|
|
|
$base_url .= ';' . WIRELESS_PROTOCOL;
|
|
@@ -2608,7 +2610,7 @@ function obExit($header = null, $do_footer = null, $from_index = false, $from_fa
|
|
|
{
|
|
|
// Was the page title set last minute? Also update the HTML safe one.
|
|
|
if (!empty($context['page_title']) && empty($context['page_title_html_safe']))
|
|
|
- $context['page_title_html_safe'] = $smcFunc['htmlspecialchars'](un_htmlspecialchars($context['page_title']));
|
|
|
+ $context['page_title_html_safe'] = $smcFunc['htmlspecialchars'](un_htmlspecialchars($context['page_title'])) . (!empty($context['current_page']) ? ' - ' . $txt['page'] . ' ' . ($context['current_page'] + 1) : '');
|
|
|
|
|
|
// Start up the session URL fixer.
|
|
|
ob_start('ob_sessrewrite');
|
|
@@ -2965,7 +2967,7 @@ function setupThemeContext($forceload = false)
|
|
|
$context['page_title'] = '';
|
|
|
|
|
|
// Set some specific vars.
|
|
|
- $context['page_title_html_safe'] = $smcFunc['htmlspecialchars'](un_htmlspecialchars($context['page_title']));
|
|
|
+ $context['page_title_html_safe'] = $smcFunc['htmlspecialchars'](un_htmlspecialchars($context['page_title'])) . (!empty($context['current_page']) ? ' - ' . $txt['page'] . ' ' . ($context['current_page'] + 1) : '');
|
|
|
$context['meta_keywords'] = !empty($modSettings['meta_keywords']) ? $smcFunc['htmlspecialchars']($modSettings['meta_keywords']) : '';
|
|
|
}
|
|
|
|