diff -urN punbb-1.4.1/admin/bans.php punbb-1.4.2/admin/bans.php --- punbb-1.4.1/admin/bans.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/admin/bans.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Allows administrators and moderators to create, modify, and delete bans. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ @@ -223,7 +223,7 @@
- +
@@ -478,7 +478,7 @@
- +
@@ -544,7 +544,7 @@
-

+

'.$lang_admin_bans['Edit ban'].'', ''.$lang_admin_bans['Remove ban'].'') ?>

diff -urN punbb-1.4.1/admin/categories.php punbb-1.4.2/admin/categories.php --- punbb-1.4.1/admin/categories.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/admin/categories.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Allows administrators to create, reposition, and remove categories. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ @@ -193,7 +193,7 @@
- +
@@ -345,7 +345,7 @@
- +
@@ -391,7 +391,7 @@
- +
@@ -421,7 +421,7 @@ ?>
- +
@@ -445,7 +445,7 @@ ?>
- +
diff -urN punbb-1.4.1/admin/censoring.php punbb-1.4.2/admin/censoring.php --- punbb-1.4.1/admin/censoring.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/admin/censoring.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Allows administrators and moderators to add, modify, and delete the word censors used by the software when censoring is enabled. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ diff -urN punbb-1.4.1/admin/db_update.php punbb-1.4.2/admin/db_update.php --- punbb-1.4.1/admin/db_update.php 2011-11-29 18:13:36.000000000 +0000 +++ punbb-1.4.2/admin/db_update.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,13 +4,13 @@ * * Updates the database to the latest version. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ -define('UPDATE_TO', '1.4.1'); +define('UPDATE_TO', '1.4.2'); define('UPDATE_TO_DB_REVISION', 5); // The number of items to process per pageview (lower this if the update script times out during UTF-8 conversion) @@ -87,6 +87,9 @@ // Load DB abstraction layer and try to connect require FORUM_ROOT.'include/dblayer/common_db.php'; +// Start a transaction +$forum_db->start_transaction(); + // Check current version $query = array( 'SELECT' => 'conf_value', @@ -347,7 +350,7 @@ global $forum_db; $types = array( - 'char' => 'binary', + 'char' => 'binary', 'varchar' => 'varbinary', 'tinytext' => 'tinyblob', 'mediumtext' => 'mediumblob', @@ -389,7 +392,7 @@ { while (false !== ($avatar = readdir($handle))) { - $avatar_file = $avatar_dir.$avatar; + $avatar_file = $avatar_dir.$avatar; if (!is_file($avatar_file)) { continue; @@ -471,9 +474,9 @@ - + PunBB Database Update - + @@ -563,7 +566,7 @@ ?>
- +
@@ -833,7 +836,7 @@ $forum_db->alter_field('reports', 'message', 'TEXT', true); - // Drop fulltext indexes (should only apply to SVN installs) + // Drop fulltext indexes (should only apply to SVN installs) if (in_array($db_type, array('mysql', 'mysqli', 'mysql_innodb', 'mysqli_innodb'))) { $forum_db->drop_index('topics', 'subject_idx'); @@ -1363,7 +1366,7 @@ while ($cur_user = $forum_db->fetch_assoc($result)) { if ($cur_user['linkedin'] != '' && - strpos(strtolower($cur_user['linkedin']), 'http://') !== 0 && + strpos(strtolower($cur_user['linkedin']), 'http://') !== 0 && strpos(strtolower($cur_user['linkedin']), 'https://') !== 0) { $query = array( @@ -2180,9 +2183,9 @@ - + PunBB Database Update - + diff -urN punbb-1.4.1/admin/extensions.php punbb-1.4.2/admin/extensions.php --- punbb-1.4.1/admin/extensions.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/admin/extensions.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Allows administrators to control the extensions and hotfixes installed in the site. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ @@ -62,6 +62,16 @@ if (!empty($errors)) message(isset($_GET['install']) ? $lang_common['Bad request'] : $lang_admin_ext['Hotfix download failed']); + // Get core amd major versions + if (!defined('FORUM_DISABLE_EXTENSIONS_VERSION_CHECK')) + { + list($forum_version_core, $forum_version_major) = explode('.', clean_version($forum_config['o_cur_version'])); + list($extension_maxtestedon_version_core, $extension_maxtestedon_version_major) = explode('.', clean_version($ext_data['extension']['maxtestedon'])); + + if (version_compare($forum_version_core.'.'.$forum_version_major, $extension_maxtestedon_version_core.'.'.$extension_maxtestedon_version_major, '>')) + message($lang_admin_ext['Maxtestedon error']); + } + // Make sure we have an array of dependencies if (!isset($ext_data['extension']['dependencies']['dependency'])) $ext_data['extension']['dependencies'] = array(); @@ -192,7 +202,7 @@ if (isset($ext_data['extension']['hooks']['hook'])) { foreach ($ext_data['extension']['hooks']['hook'] as $ext_hook) - { + { $cur_hooks = explode(',', $ext_hook['attributes']['id']); foreach ($cur_hooks as $cur_hook) { @@ -205,8 +215,8 @@ ($hook = get_hook('aex_install_comply_qr_add_hook')) ? eval($hook) : null; $forum_db->query_build($query) or error(__FILE__, __LINE__); } - } - } + } + } // Empty the PHP cache forum_clear_cache(); @@ -308,7 +318,7 @@

-

+

@@ -562,7 +572,7 @@

- +
@@ -757,7 +767,7 @@ { if (!array_key_exists($hotfix['attributes']['id'], $inst_exts)) { - $forum_page['ext_item'][] = '
'."\n\t\t\t".'

'.forum_htmlencode($hotfix['content']).'

'."\n\t\t\t".''."\n\t\t\t\t".'

'.$lang_admin_ext['Install hotfix'].'

'."\n\t\t".'
'; + $forum_page['ext_item'][] = '
'."\n\t\t\t".'

'.forum_htmlencode($hotfix['content']).'

'."\n\t\t\t".''."\n\t\t\t\t".'

'.$lang_admin_ext['Install hotfix'].'

'."\n\t\t".'
'; ++$num_exts; } } @@ -810,8 +820,10 @@ + +
  • + +

    60 * 60)); // Update last versions if there is no cahe or some extension was added/removed or one day has gone since last update - $update_new_versions_cache = !defined('FORUM_EXT_VERSIONS_LOADED') || (isset($forum_ext_last_versions) && array_diff($inst_exts, $forum_ext_last_versions) != array()) || $update_hour || ( $update_hour && isset($min_timestamp) && (time() - $min_timestamp > 60*60*24)); + $update_new_versions_cache = !defined('FORUM_EXT_VERSIONS_LOADED') || (isset($forum_ext_last_versions) && array_diff($inst_exts, $forum_ext_last_versions) != array()) || $update_hour || ($update_hour && isset($min_timestamp) && (time() - $min_timestamp > 60*60*24)); ($hook = get_hook('aex_before_update_checking')) ? eval($hook) : null; @@ -954,7 +965,7 @@ { if (!array_key_exists($entry, $inst_exts) || version_compare($inst_exts[$entry]['version'], $ext_data['extension']['version'], '!=')) { - $forum_page['ext_item'][] = '
    '."\n\t\t\t".'

    '.forum_htmlencode($ext_data['extension']['title']).'

    '."\n\t\t\t".''."\n\t\t\t".'

    '.(isset($inst_exts[$entry]['version']) ? $lang_admin_ext['Upgrade extension'] : $lang_admin_ext['Install extension']).'

    '."\n\t\t".'
    '; + $forum_page['ext_item'][] = '
    '."\n\t\t\t".'

    '.forum_htmlencode($ext_data['extension']['title']).' '.$ext_data['extension']['version'].'

    '."\n\t\t\t".''."\n\t\t\t".'

    '.(isset($inst_exts[$entry]['version']) ? $lang_admin_ext['Upgrade extension'] : $lang_admin_ext['Install extension']).'

    '."\n\t\t".'
    '; ++$num_exts; } } @@ -1021,9 +1032,9 @@ ($hook = get_hook('aex_section_manage_pre_ext_actions')) ? eval($hook) : null; if ($ext['disabled'] == '1') - $forum_page['ext_item'][] = '
    '."\n\t\t".'

    '.forum_htmlencode($ext['title']).' ( '.$lang_admin_ext['Extension disabled'].' )

    '."\n\t\t".''."\n\t\t".'

    '.implode(' ', $forum_page['ext_actions']).'

    '."\n\t".'
    '; + $forum_page['ext_item'][] = '
    '."\n\t\t".'

    '.forum_htmlencode($ext['title']).' '.$ext['version'].' ('.$lang_admin_ext['Extension disabled'].')

    '."\n\t\t".''."\n\t\t".'

    '.implode(' ', $forum_page['ext_actions']).'

    '."\n\t".'
    '; else - $forum_page['ext_item'][] = '
    '."\n\t\t".'

    '.forum_htmlencode($ext['title']).'

    '."\n\t\t".''."\n\t\t".'

    '.implode(' ', $forum_page['ext_actions']).'

    '."\n\t".'
    '; + $forum_page['ext_item'][] = '
    '."\n\t\t".'

    '.forum_htmlencode($ext['title']).' '.$ext['version'].'

    '."\n\t\t".''."\n\t\t".'

    '.implode(' ', $forum_page['ext_actions']).'

    '."\n\t".'
    '; $installed_count++; } diff -urN punbb-1.4.1/admin/forums.php punbb-1.4.2/admin/forums.php --- punbb-1.4.1/admin/forums.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/admin/forums.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Allows administrators to add, modify, and remove forums. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ @@ -188,7 +188,7 @@

    - +
    @@ -549,7 +549,7 @@

    - ' : ''; ?> + ' : '' ?>
    @@ -612,19 +612,19 @@
    - + /> - +
    - + />
    - + />
    @@ -735,7 +735,7 @@
    - +
    @@ -806,7 +806,7 @@ ($hook = get_hook('afo_pre_edit_cur_forum_fieldset')) ? eval($hook) : null; ?> -
    +
    '.$lang_admin_forums['Edit'].'', ''.$lang_admin_forums['Delete'].'') ?>
    @@ -832,7 +832,7 @@ ?>
    - +
    diff -urN punbb-1.4.1/admin/groups.php punbb-1.4.2/admin/groups.php --- punbb-1.4.1/admin/groups.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/admin/groups.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Allows administrators to control group permissions. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ @@ -99,7 +99,7 @@
    -

    +

    @@ -664,7 +664,7 @@
    - +
    @@ -743,7 +743,7 @@
    - +
    @@ -796,7 +796,7 @@
    - +
    @@ -846,7 +846,7 @@ ?>
    -

    +

    diff -urN punbb-1.4.1/admin/index.php punbb-1.4.2/admin/index.php --- punbb-1.4.1/admin/index.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/admin/index.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Gives an overview of some statistics to administrators and moderators. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ @@ -100,14 +100,9 @@ $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); $num_online = $forum_db->result($result); -// Get the database system version -$db_version = $forum_db->get_version(); - // Collect some additional info about MySQL if (in_array($db_type, array('mysql', 'mysqli', 'mysql_innodb', 'mysqli_innodb'))) { - $db_version = 'MySQL '.$db_version; - // Calculate total db size/row count $result = $forum_db->query('SHOW TABLE STATUS FROM `'.$db_name.'` LIKE \''.$db_prefix.'%\'') or error(__FILE__, __LINE__); diff -urN punbb-1.4.1/admin/install.php punbb-1.4.2/admin/install.php --- punbb-1.4.1/admin/install.php 2011-11-27 18:23:16.000000000 +0000 +++ punbb-1.4.2/admin/install.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,13 +4,13 @@ * * Used to actually install PunBB. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ -define('FORUM_VERSION', '1.4.1'); +define('FORUM_VERSION', '1.4.2'); define('FORUM_DB_REVISION', 5); define('MIN_PHP_VERSION', '5.0.0'); define('MIN_MYSQL_VERSION', '4.1.2'); @@ -64,6 +64,7 @@ $config_body .= "\n\n// Disable forum hooks (extensions) by removing // from the following line\n//define('FORUM_DISABLE_HOOKS', 1);"; $config_body .= "\n\n// Disable forum output buffering by removing // from the following line\n//define('FORUM_DISABLE_BUFFERING', 1);"; $config_body .= "\n\n// Disable forum async JS loader by removing // from the following line\n//define('FORUM_DISABLE_ASYNC_JS_LOADER', 1);"; + $config_body .= "\n\n// Disable forum extensions version check by removing // from the following line\n//define('FORUM_DISABLE_EXTENSIONS_VERSION_CHECK', 1);"; return $config_body; } @@ -142,9 +143,9 @@ - + PunBB Installation - +
    @@ -187,7 +188,7 @@
    - +
    @@ -195,7 +196,7 @@ } -?>
    +?> @@ -214,7 +215,7 @@
    -

    +

    @@ -230,10 +231,10 @@ ?> -
    +
    -
    - +
    +
    @@ -272,22 +273,22 @@
    -
    +
    -
    - +
    +
    -
    +
    -
    - +
    +
    -
    +
    -
    - +
    +
    @@ -334,7 +335,7 @@ { ?> - + PunBB Installation - +
    @@ -1946,14 +1947,14 @@
    diff -urN punbb-1.4.1/admin/prune.php punbb-1.4.2/admin/prune.php --- punbb-1.4.1/admin/prune.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/admin/prune.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Allows administrators to delete older topics from the site. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ @@ -152,7 +152,7 @@
    - +
    @@ -205,7 +205,7 @@

    -

    +

    - +
    diff -urN punbb-1.4.1/admin/ranks.php punbb-1.4.2/admin/ranks.php --- punbb-1.4.1/admin/ranks.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/admin/ranks.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Allows administrators to control the tags given to posters based on their post count. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ diff -urN punbb-1.4.1/admin/reindex.php punbb-1.4.2/admin/reindex.php --- punbb-1.4.1/admin/reindex.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/admin/reindex.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Allows administrators to rebuild the index used to search the posts and topics. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ @@ -212,8 +212,10 @@

    -
    +

    +

    +

    diff -urN punbb-1.4.1/admin/reports.php punbb-1.4.2/admin/reports.php --- punbb-1.4.1/admin/reports.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/admin/reports.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Allows administrators and moderators to handle reported posts. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ @@ -134,7 +134,7 @@ $forum = ($cur_report['forum_name'] != '') ? ''.forum_htmlencode($cur_report['forum_name']).'' : $lang_admin_reports['Deleted forum']; $topic = ($cur_report['subject'] != '') ? ''.forum_htmlencode($cur_report['subject']).'' : $lang_admin_reports['Deleted topic']; $message = str_replace("\n", '
    ', forum_htmlencode($cur_report['message'])); - $post_id = ($cur_report['pid'] != '') ? 'Post #'.$cur_report['pid'].'' : $lang_admin_reports['Deleted post']; + $post_id = ($cur_report['pid'] != '') ? ''.sprintf($lang_admin_reports['Post'], $cur_report['pid']).'' : $lang_admin_reports['Deleted post']; ($hook = get_hook('arp_new_report_pre_display')) ? eval($hook) : null; @@ -155,7 +155,7 @@ ?>
    - +
    @@ -224,7 +224,7 @@ $forum = ($cur_report['forum_name'] != '') ? ''.forum_htmlencode($cur_report['forum_name']).'' : $lang_admin_reports['Deleted forum']; $topic = ($cur_report['subject'] != '') ? ''.forum_htmlencode($cur_report['subject']).'' : $lang_admin_reports['Deleted topic']; $message = str_replace("\n", '
    ', forum_htmlencode($cur_report['message'])); - $post_id = ($cur_report['pid'] != '') ? 'Post #'.$cur_report['pid'].'' : $lang_admin_reports['Deleted post']; + $post_id = ($cur_report['pid'] != '') ? ''.sprintf($lang_admin_reports['Post'], $cur_report['pid']).'' : $lang_admin_reports['Deleted post']; $zapped_by = ($cur_report['zapped_by'] != '') ? ''.forum_htmlencode($cur_report['zapped_by']).'' : $lang_admin_reports['Deleted user']; ($hook = get_hook('arp_report_pre_display')) ? eval($hook) : null; diff -urN punbb-1.4.1/admin/settings.php punbb-1.4.2/admin/settings.php --- punbb-1.4.1/admin/settings.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/admin/settings.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Allows administrators to control many of the settings used in the site. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ @@ -434,7 +434,7 @@
    - /> + />
    @@ -629,7 +629,7 @@
    - +
    @@ -1065,7 +1065,7 @@
    - +
    @@ -1134,7 +1134,7 @@
    - +
    @@ -1274,7 +1274,7 @@
    - +
    @@ -1327,7 +1327,7 @@
    /> - +
    @@ -1341,7 +1341,7 @@
    - +
    @@ -1458,7 +1458,7 @@
    - +
    diff -urN punbb-1.4.1/admin/users.php punbb-1.4.2/admin/users.php --- punbb-1.4.1/admin/users.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/admin/users.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Allows administrators or moderators to search the existing users based on various criteria. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ @@ -451,6 +451,14 @@ delete_user($id, isset($_POST['delete_posts'])); } + // Remove cache file with forum stats + if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) + { + require FORUM_ROOT.'include/cache.php'; + } + + clean_stats_cache(); + ($hook = get_hook('aus_delete_users_pre_redirect')) ? eval($hook) : null; redirect(forum_link($forum_url['admin_users']), $lang_admin_users['Users deleted']); @@ -502,7 +510,7 @@
    - +
    @@ -674,7 +682,7 @@
    - +
    @@ -1410,7 +1418,7 @@
    - +
    @@ -1440,7 +1448,7 @@
    - +
    diff -urN punbb-1.4.1/ChangeLog punbb-1.4.2/ChangeLog --- punbb-1.4.1/ChangeLog 2011-11-27 18:47:43.000000000 +0000 +++ punbb-1.4.2/ChangeLog 2012-02-09 20:42:20.000000000 +0000 @@ -1,3 +1,23 @@ +PunBB 1.4.2 +2012-02-09 20:36:00 +==================== + + * Oxygen style is updated. + * Errors are translatable. + * The link from the last part of breadcrumbs is removed. + * "Last edited message" is moved to the post header. + * Flash messages is automatically disabled in the case of a redirect with delay > 0. + * Fixed non-updated info block of the last registered user. + * Fixed redirect of a post to the previous one after its deleting. Fix #53. + * Fixed upload of avatars in open_basedir cases. + * Fixed censoring functions. Thanks to Gargaj for helping. + * Fixed all known "Full-path disclosure" errors. + * Fixed extension of an updated subsystem - broken in 1.4.0. + * Fixed broken update in SQLite. + * Auto-suggest username from the email inserted in the registration form. + * New function to start a session - forum_session_start(). + + PunBB 1.4.1 2011-10-27 20:29:00 ==================== diff -urN punbb-1.4.1/delete.php punbb-1.4.2/delete.php --- punbb-1.4.1/delete.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/delete.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Deletes the specified post (and, if necessary, the topic it is in). * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ @@ -102,11 +102,31 @@ // Delete just this one post delete_post($id, $cur_post['tid'], $cur_post['fid']); + // Fetch previus post #id in some topic for redirect after delete + $query = array( + 'SELECT' => 'p.id', + 'FROM' => 'posts AS p', + 'WHERE' => 'p.topic_id = '.$cur_post['tid'].' AND p.id < '.$id, + 'ORDER BY' => 'p.id DESC', + 'LIMIT' => '1' + ); + + ($hook = get_hook('dl_post_deleted_get_prev_post_id')) ? eval($hook) : null; + $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); + $prev_post = $forum_db->fetch_assoc($result); + $forum_flash->add_info($lang_delete['Post del redirect']); ($hook = get_hook('dl_post_deleted_pre_redirect')) ? eval($hook) : null; - redirect(forum_link($forum_url['topic'], array($cur_post['tid'], sef_friendly($cur_post['subject']))), $lang_delete['Post del redirect']); + if (isset($prev_post['id'])) + { + redirect(forum_link($forum_url['post'], $prev_post['id']), $lang_delete['Post del redirect']); + } + else + { + redirect(forum_link($forum_url['topic'], array($cur_post['tid'], sef_friendly($cur_post['subject']))), $lang_delete['Post del redirect']); + } } } @@ -128,8 +148,7 @@ // Setup form information $forum_page['frm_info'] = array( '
  • '.$lang_delete['Forum'].': '.forum_htmlencode($cur_post['forum_name']).'
  • ', - '
  • '.$lang_delete['Topic'].': '.forum_htmlencode($cur_post['subject']).'
  • ', - '
  • '.sprintf((($cur_post['is_topic']) ? $lang_delete['Delete topic info'] : $lang_delete['Delete post info']), forum_htmlencode($cur_post['poster']), format_time($cur_post['posted'])).'
  • ' + '
  • '.$lang_delete['Topic'].': '.forum_htmlencode($cur_post['subject']).'
  • ' ); // Generate the post heading @@ -206,7 +225,7 @@
    - +
    diff -urN punbb-1.4.1/edit.php punbb-1.4.2/edit.php --- punbb-1.4.1/edit.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/edit.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Modifies the contents of the specified post. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ @@ -284,7 +284,7 @@ ?>
    -

    +

    >