./index.php
Find:
* @version 2.0.9
Replace With:
* @version 2.0.10
Find:
$forum_version = 'SMF 2.0.9';
Replace With:
$forum_version = 'SMF 2.0.10';
./Themes/default/languages/index.english.php
Find:
// Version: 2.0.8;
Replace With:
// Version: 2.0.10;
Find:
2014
Replace With:
2015
./Themes/default/scripts/script.js
Find:
var is_ff = (ua.indexOf('firefox') != -1 || ua.indexOf('iceweasel') != -1 || ua.indexOf('icecat') != -1 || ua.indexOf('shiretoko') != -1 || ua.indexOf('minefield') != -1) && !is_opera;
Replace With:
var is_ff = (ua.indexOf('firefox') != -1 || ua.indexOf('iceweasel') != -1 || ua.indexOf('icecat') != -1 || ua.indexOf('shiretoko') != -1 || ua.indexOf('minefield') != -1 || ua.indexOf('PaleMoon') != -1) && !is_opera;
Find:
if ('oThemeOptions' in this.opt && this.opt.oThemeOptions.bUseThemeSettings)
Replace With:
if (!bInit && 'oThemeOptions' in this.opt && this.opt.oThemeOptions.bUseThemeSettings)
./Themes/default/Search.template.php
Find:
* @version 2.0
Replace With:
* @version 2.0.10
Esta operação não é essencial para a instalação da presente mod.
Find:
<li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">
<label for="brd', $board['id'], '"><input type="checkbox" id="brd', $board['id'], '" name="brd[', $board['id'], ']" value="', $board['id'], '"', $board['selected'] ? ' checked="checked"' : '', ' class="input_check" /> ', $board['name'], '</label>
</li>';
Replace With:
<li class="board">
<label for="brd', $board['id'], '" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;"><input type="checkbox" id="brd', $board['id'], '" name="brd[', $board['id'], ']" value="', $board['id'], '"', $board['selected'] ? ' checked="checked"' : '', ' class="input_check" /> ', $board['name'], '</label>
</li>';
./Sources/ManageServer.php
Find:
* @version 2.0.9
Replace With:
* @version 2.0.10
Find:
$context['config_vars'][$config_var[1]]['value'] = unserialize($context['config_vars'][$config_var[1]]['value']);
$context['config_vars'][$config_var[1]]['value'] = !empty($context['config_vars'][$config_var[1]]['value']) ? unserialize($context['config_vars'][$config_var[1]]['value']) : array();
Replace With:
$context['config_vars'][$config_var[1]]['value'] = !empty($context['config_vars'][$config_var[1]]['value']) ? unserialize($context['config_vars'][$config_var[1]]['value']) : array();
Esta operação não é essencial para a instalação da presente mod.
./Sources/Subs-Post.php
Find:
* @version 2.0.9
Replace With:
* @version 2.0.10
Esta operação não é essencial para a instalação da presente mod.
Find:
$htmlfunc = create_function('$m', 'return \'[html]\' . strtr(un_htmlspecialchars("$m[1]"), array("\n" => \'
\', \' \' => \' \', \'[\' => \'[\', \']\' => \']\')) . \'[/html]\';');
Replace With:
$htmlfunc = create_function('$m', 'return \'[html]\' . strtr(un_htmlspecialchars("$m[1]"), array("\n" => \'
\', \' \' => \' \', \'[\' => \'[\', \']\' => \']\')) . \'[/html]\';');
Esta operação não é essencial para a instalação da presente mod.
./Sources/ManageAttachments.php
Find:
* @version 2.0
Replace With:
* @version 2.0.10
Esta operação não é essencial para a instalação da presente mod.
Find:
$date .= sprintf(\'<br />%1$s <a href="%2$s?topic=%3$d.0.msg%4$d#msg%4$d">%5$s</a>\', $txt[\'in\'], $scripturl, $rowData[\'id_topic\'], $rowData[\'id_msg\'], $rowData[\'subject\']);
Replace With:
$date .= sprintf(\'<br />%1$s <a href="%2$s?topic=%3$d.msg%4$d#msg%4$d">%5$s</a>\', $txt[\'in\'], $scripturl, $rowData[\'id_topic\'], $rowData[\'id_msg\'], $rowData[\'subject\']);
./Sources/Subs-Package.php
Find:
* @version 2.0.9
Replace With:
* @version 2.0.10
Esta operação não é essencial para a instalação da presente mod.
Find:
// Windows doesn't seem to care about the memory_limit.
if (!empty($modSettings['package_disable_cache']) || ini_set('memory_limit', '128M') !== false || strpos(strtolower(PHP_OS), 'win') !== false)
Replace With: [Select]
// Windows doesn't seem to care about the memory_limit.
if (!empty($modSettings['package_disable_cache']) || @ini_set('memory_limit', '128M') !== false || strpos(strtolower(PHP_OS), 'win') !== false)
Find: [Select]
// Try to increase the memory limit - we don't want to run out of ram!
if (!empty($modSettings['package_disable_cache']) || ini_set('memory_limit', '128M') !== false || strpos(strtolower(PHP_OS), 'win') !== false)
Replace With:
// Try to increase the memory limit - we don't want to run out of ram!
if (!empty($modSettings['package_disable_cache']) || @ini_set('memory_limit', '128M') !== false || strpos(strtolower(PHP_OS), 'win') !== false)
Find:
if ($current['type'] == 5 && substr($current['filename'], -1) != '/')
$current['filename'] .= '/';
foreach ($current as $k => $v)
{
if (in_array($k, $octdec))
$current[$k] = octdec(trim($v));
else
$current[$k] = trim($v);
}
Replace With:
foreach ($current as $k => $v)
{
if (in_array($k, $octdec))
$current[$k] = octdec(trim($v));
else
$current[$k] = trim($v);
}
if ($current['type'] == 5 && substr($current['filename'], -1) != '/')
$current['filename'] .= '/';
./Sources/Post.php
Find:
* @version 2.0.9
Replace With:
* @version 2.0.10
Esta operação não é essencial para a instalação da presente mod.
Find:
if (isset($_REQUEST['preview']))
{
checkSession();
return Post();
}
Replace With:
if (isset($_REQUEST['preview']))
{
if (checkSession('post', '', false) != '')
{
loadLanguage('Errors');
$context['post_errors']['message'][] = $txt['error_session_timeout'];
unset ($_POST['preview'], $_REQUEST['xml']); // just in case
}
return Post();
}
Esta operação não é essencial para a instalação da presente mod.
./Themes/default/scripts/fader.js
Find:
// Try to find the fore- and background colors.
if ('currentStyle' in this.oFaderHandle)
Replace With:
// Try to find the fore- and background colors.
var modern_browser = 'MozOpacity' in this.oFaderHandle.style || 'Opacity' in this.oFaderHandle.style || 'filter' in this.oFaderHandle.style;
if ('currentStyle' in this.oFaderHandle && !modern_browser)
Find:
else if (!('opera' in window) && 'defaultView' in document)
Replace With: [Select]
else if (!('opera' in window) && 'defaultView' in document && !modern_browser)
./Themes/default/Post.template.php
Find:
* @version 2.0
Replace With:
* @version 2.0.10
Esta operação não é essencial para a instalação da presente mod.
Find:
\'question\', \'topic\'
Replace With: [Select]
\'question\', \'topic\', ', JavaScriptEscape($context['session_var']), '
./Sources/Subscriptions-PayPal.php
Find:
* @version 2.0.3
Replace With: [Select]
* @version 2.0.10
Esta operação não é essencial para a instalação da presente mod.
Find:
$setting_data = array(
array('text', 'paypal_email', 'subtext' => $txt['paypal_email_desc']),
);
Replace With:
/// We add email and additional emails (the latter for recurring payments)
$setting_data = array(
array('text', 'paypal_email', 'subtext' => $txt['paypal_email_desc']),
array('text', 'paypal_additional_emails', 'subtext' => $txt['paypal_additional_emails_desc']),
);
Find:
if (strtolower($_POST['mc_currency']) != $modSettings['paid_currency_code'])
Replace With:
if (strtolower($_POST['mc_currency']) != strtolower($modSettings['paid_currency_code']))
Find:
if ($modSettings['paypal_email'] != $_POST['business'] && (empty($modSettings['paypal_additional_emails']) || !in_array($_POST['business'], explode(',', $modSettings['paypal_additional_emails']))))
return false;
Replace With:
if (strtolower($modSettings['paypal_email']) != strtolower($_POST['business']) && (empty($modSettings['paypal_additional_emails']) || !in_array(strtolower($_POST['business']), explode(',', strtolower($modSettings['paypal_additional_emails'])))))
return false;
Find:
// Check that this is intended for us.
if ($modSettings['paypal_email'] != $_POST['business'] && (empty($modSettings['paypal_additional_emails']) || !in_array($_POST['business'], explode(',', $modSettings['paypal_additional_emails']))))
Replace With:
// Check that this is intended for us.
if (strtolower($modSettings['paypal_email']) != strtolower($_POST['business']) && (empty($modSettings['paypal_additional_emails']) || !in_array(strtolower($_POST['business']), explode(',', strtolower($modSettings['paypal_additional_emails'])))))
./Themes/default/languages/ManagePaid.english.php
Find:
// Version: 2.0; ManagePaid
Replace With:
// Version: 2.0.10; ManagePaid
This operation isn't vital to the installation of this mod.
Find:
$txt['paid_note'] = '<strong class="alert">Note:</strong><br />For subscriptions to be automatically updated for your users, you
will need to setup a return URL for each of your payment methods. For all payment types, this return URL should be set as:<br /><br />
• <strong>' . $boardurl . '/subscriptions.php</strong><br /><br />
You can edit the link for paypal directly, by clicking <a href="https://www.paypal.com/us/cgi-bin/webscr?cmd=_profile-ipn-notify" target="_blank">here</a>.<br />
For the other gateways (If installed) you can normally find it in your customer panels, usually under the term "Return URL" or "Callback URL".';
Replace With:
$txt['paid_note'] = '<strong class="alert">Note:</strong><br />
SMF currently supports <strong>PayPal</strong> as the installed payment method.<br />
• It is not necessary to enable IPN in your PayPal account; if you do, the forum will receive payment notifications for all payments made to your account, and this will generate Paid Subscriptions errors for payments that are not subscription related.<br />
• You must have a business or premier account to use recurring payments.<br />
• You must provide your primary PayPal email address for validation purposes.<br /><br />
If you install a different payment gateway, you may need to set up a return URL for payment notification. For all payment types, this return URL should be set as:<br /><br />
• <strong>' . $boardurl . '/subscriptions.php</strong><br /><br />
You can normally find it in your customer panels, usually under the term "Return URL" or "Callback URL".<br /><br /><br />';
Find:
// View subscription strings.
Replace With:
$txt['paypal_additional_emails'] = 'Primary PayPal email address';
$txt['paypal_additional_emails_desc'] = 'If different (for business account)';
// View subscription strings.
./Themes/default/languages/ManagePaid.english-utf8.php
Find:
// Version: 2.0; ManagePaid
Replace With: [Select]
// Version: 2.0.10; ManagePaid
Esta operação não é essencial para a instalação da presente mod.
Find:
// View subscription strings.
Replace With:
$txt['paypal_additional_emails'] = 'Primary PayPal email address';
$txt['paypal_additional_emails_desc'] = 'If different (for business account)';
// View subscription strings.
Esta operação não é essencial para a instalação da presente mod.
./Sources/Packages.php
Find:
* @version 2.0.9
Replace With:
* @version 2.0.10
Find:
$context['redirect_text'] = !empty($action['filename']) && file_exists($boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename']) ? file_get_contents($boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename']) : ($context['uninstalling'] ? $txt['package_uninstall_done'] : $txt['package_installed_done']);
Replace With: [Select]
$context['redirect_text'] = !empty($action['filename']) && file_exists($boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename']) ? $smcFunc['htmlspecialchars'](file_get_contents($boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename'])) : ($context['uninstalling'] ? $txt['package_uninstall_done'] : $txt['package_installed_done']);
./SSI.php
Find:
* @version 2.0.7
Replace With:
* @version 2.0.10
Find:
// Check if they can vote.
Replace With:
// Check if they can vote.
$already_voted = false;
Find:
elseif ($user_info['is_guest'] && $row['guest_vote'] && (!isset($_COOKIE['guest_poll_vote']) || !in_array($row['id_poll'], explode(',', $_COOKIE['guest_poll_vote']))))
$allow_vote = true;
elseif ($user_info['is_guest'])
$allow_vote = false;
Replace With:
elseif ($user_info['is_guest'])
{
// There's a difference between "allowed to vote" and "already voted"...
$allow_vote = $row['guest_vote'];
// Did you already vote?
if (isset($_COOKIE['guest_poll_vote']) && in_array($row['id_poll'], explode(',', $_COOKIE['guest_poll_vote'])))
{
$already_voted = true;
}
}
Find:
$allow_vote = $smcFunc['db_num_rows']($request) == 0;
Replace With:
$allow_vote = $smcFunc['db_num_rows']($request) == 0;
$already_voted = $allow_vote;
Find:
$allow_view_results = allowedTo('moderate_board') || $row['hide_results'] == 0 || ($row['hide_results'] == 1 && !$allow_vote) || $is_expired;
Replace With:
$allow_view_results = allowedTo('moderate_board') || $row['hide_results'] == 0 || ($row['hide_results'] == 1 && $already_voted) || $is_expired;
Find:
elseif ($return['allow_view_results'])
Replace With:
else
Find:
foreach ($return['options'] as $option)
echo '
<dt>', $option['option'], '</dt>
<dd>
Replace With:
foreach ($return['options'] as $option)
{
echo '
<dt>', $option['option'], '</dt>
<dd>';
if ($return['allow_view_results'])
{
echo '
Find:
', $option['votes'], ' (', $option['percent'], '%)
</dd>';
echo '
</dl>
<strong>', $txt['poll_total_voters'], ': ', $return['total_votes'], '</strong>
Replace With:
', $option['votes'], ' (', $option['percent'], '%)';
}
echo '
</dd>';
}
echo '
</dl>', ($return['allow_view_results'] ? '
<strong>'. $txt['poll_total_voters'] .': '. $return['total_votes'] .'</strong>' : ''), '
Find:
}
// Cannot see it I'm afraid!
else
echo $txt['poll_cannot_see'];
Replace With: [Select]
}
./Sources/Load.php
Find:
* @version 2.0.9
Replace With:
* @version 2.0.10
Find:
return ' . strtr($ent_check[0], array('&' => '&')) . 'htmlspecialchars($string, $quote_style, ' . ($utf8 ? '\'UTF-8\'' : '$charset') . ')' . $ent_check[1] . ';'),
Replace With:
return ' . ($utf8 ? '$smcFunc[\'fix_utf8mb4\'](' : '') . strtr($ent_check[0], array('&' => '&')) . 'htmlspecialchars($string, $quote_style, ' . ($utf8 ? '\'UTF-8\'' : '$charset') . ')' . $ent_check[1] . ($utf8 ? ')' : '') . ';'),
'fix_utf8mb4' => create_function('$string', '
$i = 0;
$len = strlen($string);
$new_string = \'\';
while ($i < $len)
{
$ord = ord($string[$i]);
if ($ord < 128)
{
$new_string .= $string[$i];
$i++;
}
elseif ($ord < 224)
{
$new_string .= $string[$i] . $string[$i+1];
$i += 2;
}
elseif ($ord < 240)
{
$new_string .= $string[$i] . $string[$i+1] . $string[$i+2];
$i += 3;
}
elseif ($ord < 248)
{
// Magic happens.
$val = (ord($string[$i]) & 0x07) << 18;
$val += (ord($string[$i+1]) & 0x3F) << 12;
$val += (ord($string[$i+2]) & 0x3F) << 6;
$val += (ord($string[$i+3]) & 0x3F);
$new_string .= \'\' . $val . \';\';
$i += 4;
}
}
return $new_string;'),
./Sources/ManageNews.php
Find:
* @version 2.0.5
Replace With:
* @version 2.0.10
Find:
AND (COALESCE(bg.expire_time, 1=1) OR bg.expire_time > {int:current_time})
Replace With:
AND (bg.expire_time IS NULL OR bg.expire_time > {int:current_time})
./Sources/DbPackages-postgresql.php
Find:
* @version 2.0
Replace With:
* @version 2.0.10
Find:
$setTo = isset($column_info['default']) ? $column_info['default'] : '';
Replace With:
$setTo = isset($column_info['default']) ? $column_info['default'] : (strpos($old_info['type'], 'int') !== false ? 0 : '');
Find:
WHERE ' . $column_info['name'] . ' = NULL',
Replace With:
WHERE ' . $column_info['name'] . ' IS NULL',