+
diff -urN punbb-1.3.2/admin/users.php punbb-1.3.4/admin/users.php
--- punbb-1.3.2/admin/users.php 2008-12-04 16:48:51.000000000 +0000
+++ punbb-1.3.4/admin/users.php 2009-04-17 12:51:23.000000000 +0000
@@ -4,7 +4,7 @@
*
* Allows administrators or moderators to search the existing users based on various criteria.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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
*/
@@ -1081,7 +1081,6 @@
// Setup form
$forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0;
-$forum_page['form_action'] = '';
// Setup breadcrumbs
$forum_page['crumbs'] = array(
diff -urN punbb-1.3.2/delete.php punbb-1.3.4/delete.php
--- punbb-1.3.2/delete.php 2008-10-31 09:04:18.000000000 +0000
+++ punbb-1.3.4/delete.php 2009-04-17 12:51:23.000000000 +0000
@@ -4,7 +4,7 @@
*
* Deletes the specified post (and, if necessary, the topic it is in).
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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.3.2/edit.php punbb-1.3.4/edit.php
--- punbb-1.3.2/edit.php 2008-11-08 17:53:23.000000000 +0000
+++ punbb-1.3.4/edit.php 2009-04-17 12:51:23.000000000 +0000
@@ -4,7 +4,7 @@
*
* Modifies the contents of the specified post.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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
*/
@@ -297,7 +297,7 @@
diff -urN punbb-1.3.2/extensions/pun_repository/manifest.xml punbb-1.3.4/extensions/pun_repository/manifest.xml
--- punbb-1.3.2/extensions/pun_repository/manifest.xml 2008-11-20 15:24:28.000000000 +0000
+++ punbb-1.3.4/extensions/pun_repository/manifest.xml 2009-04-30 10:12:47.000000000 +0000
@@ -440,11 +440,14 @@
-
Currently used extensions: '.implode(', ', $pun_extensions_used).'. Copyright © 2008 PunBB ';
+ if (count($pun_extensions_used) == 1)
+ echo 'The '.$pun_extensions_used[0].' official extension is installed. Copyright © 2003–2009 PunBB .
';
+ else
+ echo 'Currently installed '.count($pun_extensions_used).' official extensions . Copyright © 2003–2009 PunBB .
';
}
]]>
diff -urN punbb-1.3.2/extern.php punbb-1.3.4/extern.php
--- punbb-1.3.2/extern.php 2008-11-26 12:46:21.000000000 +0000
+++ punbb-1.3.4/extern.php 2009-04-17 12:51:23.000000000 +0000
@@ -5,7 +5,7 @@
* Allows forum content to be syndicated outside of the site in various formats
* (ie: RSS, Atom, XML, HTML).
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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
*/
@@ -120,8 +120,9 @@
else
echo "\t\t".'
PunBB '."\n";
- foreach ($feed['items'] as $item)
+ ($hook = get_hook('ex_add_new_rss_info')) ? eval($hook) : null;
+ foreach ($feed['items'] as $item)
{
echo "\t\t".'
- '."\n";
echo "\t\t\t".'
'."\n";
@@ -131,6 +132,8 @@
echo "\t\t\t".''.gmdate('r', $item['pubdate']).' '."\n";
echo "\t\t\t".''.$item['link'].' '."\n";
+ ($hook = get_hook('ex_add_new_rss_item_info')) ? eval($hook) : null;
+
echo "\t\t".' '."\n";
}
@@ -164,6 +167,8 @@
else
echo "\t".'
PunBB '."\n";
+ ($hook = get_hook('ex_add_new_atom_info')) ? eval($hook) : null;
+
echo "\t".'
'.$feed['link'].' '."\n";
$content_tag = ($feed['type'] == 'posts') ? 'content' : 'summary';
@@ -186,6 +191,8 @@
echo "\t\t\t".''."\n";
echo "\t\t\t".'
'.gmdate('Y-m-d\TH:i:s\Z', $item['pubdate']).' '."\n";
+ ($hook = get_hook('ex_add_new_atom_item_info')) ? eval($hook) : null;
+
echo "\t\t\t".'
'.$item['link'].' '."\n";
echo "\t\t".''."\n";
}
@@ -202,7 +209,7 @@
global $lang_common, $forum_config;
// Send XML/no cache headers
- header('Content-Type: text/xml; charset=utf-8');
+ header('Content-Type: application/xml; charset=utf-8');
header('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
@@ -211,6 +218,8 @@
echo '
'."\n";
echo "\t".''.$feed['link'].' '."\n";
+ ($hook = get_hook('ex_add_new_xml_info')) ? eval($hook) : null;
+
$forum_tag = ($feed['type'] == 'posts') ? 'post' : 'topic';
foreach ($feed['items'] as $item)
@@ -232,6 +241,8 @@
echo "\t\t".''."\n";
echo "\t\t".''.gmdate('r', $item['pubdate']).' '."\n";
+ ($hook = get_hook('ex_add_new_xml_item_info')) ? eval($hook) : null;
+
echo "\t".''.$forum_tag.'>'."\n";
}
@@ -247,6 +258,9 @@
// Send the Content-type header in case the web server is setup to send something else
header('Content-type: text/html; charset=utf-8');
+ header('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Pragma: public');
foreach ($feed['items'] as $item)
{
@@ -269,6 +283,8 @@
if ($show < 1 || $show > 50)
$show = 15;
+ ($hook = get_hook('ex_set_syndication_type')) ? eval($hook) : null;
+
// Was a topic ID supplied?
if (isset($_GET['tid']))
{
@@ -276,7 +292,7 @@
// Fetch topic subject
$query = array(
- 'SELECT' => 't.subject, t.num_replies, t.first_post_id',
+ 'SELECT' => 't.subject, t.first_post_id',
'FROM' => 'topics AS t',
'JOINS' => array(
array(
@@ -297,12 +313,15 @@
$cur_topic = $forum_db->fetch_assoc($result);
+ if (!defined('FORUM_PARSER_LOADED'))
+ require FORUM_ROOT.'include/parser.php';
+
if ($forum_config['o_censoring'] == '1')
$cur_topic['subject'] = censor_words($cur_topic['subject']);
// Setup the feed
$feed = array(
- 'title' => $forum_config['o_board_title'].' - '.$cur_topic['subject'],
+ 'title' => $forum_config['o_board_title'].$lang_common['Title separator'].$cur_topic['subject'],
'link' => forum_link($forum_url['topic'], array($tid, sef_friendly($cur_topic['subject']))),
'description' => sprintf($lang_common['RSS description topic'], $cur_topic['subject']),
'items' => array(),
@@ -311,7 +330,7 @@
// Fetch $show posts
$query = array(
- 'SELECT' => 'p.id, p.poster, p.message, p.posted, p.poster_id, u.email_setting, u.email, p.poster_email',
+ 'SELECT' => 'p.id, p.poster, p.message, p.hide_smilies, p.posted, p.poster_id, u.email_setting, u.email, p.poster_email',
'FROM' => 'posts AS p',
'JOINS' => array(
array(
@@ -331,6 +350,8 @@
if ($forum_config['o_censoring'] == '1')
$cur_post['message'] = censor_words($cur_post['message']);
+ $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);
+
$item = array(
'id' => $cur_post['id'],
'title' => $cur_topic['first_post_id'] == $cur_post['id'] ? $cur_topic['subject'] : $lang_common['RSS reply'].$cur_topic['subject'],
@@ -344,12 +365,12 @@
if ($cur_post['poster_id'] > 1)
{
- if ($cur_post['email_setting'] == '0')
+ if ($cur_post['email_setting'] == '0' && !$forum_user['is_guest'])
$item['author']['email'] = $cur_post['email'];
$item['author']['uri'] = forum_link($forum_url['user'], $cur_post['poster_id']);
}
- else if ($cur_post['poster_email'] != '')
+ else if ($cur_post['poster_email'] != '' && !$forum_user['is_guest'])
$item['author']['email'] = $cur_post['poster_email'];
$feed['items'][] = $item;
@@ -364,6 +385,11 @@
}
else
{
+ $forum_name = '';
+
+ if (!defined('FORUM_PARSER_LOADED'))
+ require FORUM_ROOT.'include/parser.php';
+
// Were any forum ID's supplied?
if (isset($_GET['fid']) && is_scalar($_GET['fid']) && $_GET['fid'] != '')
{
@@ -372,6 +398,26 @@
if (!empty($fids))
$forum_sql = ' AND t.forum_id IN('.implode(',', $fids).')';
+
+ if (count($fids) == 1)
+ {
+ // Fetch forum name
+ $query = array(
+ 'SELECT' => 'f.forum_name',
+ 'FROM' => 'forums AS f',
+ 'JOINS' => array(
+ array(
+ 'LEFT JOIN' => 'forum_perms AS fp',
+ 'ON' => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')'
+ )
+ ),
+ 'WHERE' => '(fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$fids[0]
+ );
+
+ $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
+ if ($forum_db->num_rows($result))
+ $forum_name = $lang_common['Title separator'].$forum_db->result($result);
+ }
}
// Any forum ID's to exclude?
@@ -386,7 +432,7 @@
// Setup the feed
$feed = array(
- 'title' => $forum_config['o_board_title'],
+ 'title' => $forum_config['o_board_title'].$forum_name,
'link' => forum_link($forum_url['index']),
'description' => sprintf($lang_common['RSS description'], $forum_config['o_board_title']),
'items' => array(),
@@ -395,7 +441,7 @@
// Fetch $show topics
$query = array(
- 'SELECT' => 't.id, t.poster, t.subject, t.last_post, t.last_poster, p.message, u.email_setting, u.email, p.poster_id, p.poster_email',
+ 'SELECT' => 't.id, t.poster, t.subject, t.last_post, t.last_poster, p.message, p.hide_smilies, u.email_setting, u.email, p.poster_id, p.poster_email',
'FROM' => 'topics AS t',
'JOINS' => array(
array(
@@ -429,11 +475,13 @@
$cur_topic['message'] = censor_words($cur_topic['message']);
}
+ $cur_topic['message'] = parse_message($cur_topic['message'], $cur_topic['hide_smilies']);
+
$item = array(
'id' => $cur_topic['id'],
'title' => $cur_topic['subject'],
'link' => forum_link($forum_url['topic_new_posts'], array($cur_topic['id'], sef_friendly($cur_topic['subject']))),
- 'description' => $cur_topic['message'],
+ 'description' => $cur_topic['message'],
'author' => array(
'name' => $cur_topic['last_poster']
),
@@ -442,12 +490,12 @@
if ($cur_topic['poster_id'] > 1)
{
- if ($cur_topic['email_setting'] == '0')
+ if ($cur_topic['email_setting'] == '0' && !$forum_user['is_guest'])
$item['author']['email'] = $cur_topic['email'];
$item['author']['uri'] = forum_link($forum_url['user'], $cur_topic['poster_id']);
}
- else if ($cur_topic['poster_email'] != '')
+ else if ($cur_topic['poster_email'] != '' && !$forum_user['is_guest'])
$item['author']['email'] = $cur_topic['poster_email'];
$feed['items'][] = $item;
@@ -487,7 +535,7 @@
{
if ($forum_user_online['user_id'] > 1)
{
- $users[] = ''.forum_htmlencode($forum_user_online['ident']).' ';
+ $users[] = $forum_user['g_view_users'] == '1' ?''.forum_htmlencode($forum_user_online['ident']).' ' : forum_htmlencode($forum_user_online['ident']);
++$num_users;
}
else
@@ -495,11 +543,17 @@
}
($hook = get_hook('ex_pre_online_output')) ? eval($hook) : null;
+ // Send the Content-type header in case the web server is setup to send something else
+ header('Content-type: text/html; charset=utf-8');
+ header('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Pragma: public');
+
echo $lang_index['Guests online'].': '.forum_number_format($num_guests).' '."\n";
- if ($_GET['action'] == 'online_full')
- echo $lang_index['Users online'].': '.implode(', ', $users).' '."\n";
+ if ($_GET['action'] == 'online_full' && !empty($users))
+ echo $lang_index['Users online'].': '.implode($lang_index['Online list separator'], $users).' '."\n";
else
echo $lang_index['Users online'].': '.forum_number_format($num_users).' '."\n";
@@ -544,6 +598,12 @@
$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
list($stats['total_topics'], $stats['total_posts']) = $forum_db->fetch_row($result);
+ // Send the Content-type header in case the web server is setup to send something else
+ header('Content-type: text/html; charset=utf-8');
+ header('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Pragma: public');
+
($hook = get_hook('ex_pre_stats_output')) ? eval($hook) : null;
echo sprintf($lang_index['No of users'], forum_number_format($stats['total_users'])).' '."\n";
diff -urN punbb-1.3.2/footer.php punbb-1.3.4/footer.php
--- punbb-1.3.2/footer.php 2008-11-09 13:28:04.000000000 +0000
+++ punbb-1.3.4/footer.php 2009-05-20 09:09:23.000000000 +0000
@@ -2,7 +2,7 @@
/**
* Outputs the footer used by most forum pages.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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
*/
@@ -15,11 +15,12 @@
// START SUBST -
ob_start();
($hook = get_hook('ft_about_output_start')) ? eval($hook) : null;
-($hook = get_hook('ft_about_pre_quickjump')) ? eval($hook) : null;
// Display the "Jump to" drop list
if ($forum_user['g_read_board'] == '1' && $forum_config['o_quickjump'] == '1')
{
+ ($hook = get_hook('ft_about_pre_quickjump')) ? eval($hook) : null;
+
// Load cached quickjump
if (file_exists(FORUM_CACHE_DIR.'cache_quickjump_'.$forum_user['g_id'].'.php'))
include FORUM_CACHE_DIR.'cache_quickjump_'.$forum_user['g_id'].'.php';
@@ -34,15 +35,12 @@
}
}
-
($hook = get_hook('ft_about_pre_copyright')) ? eval($hook) : null;
-// End the transaction
-$forum_db->end_transaction();
-
?>
- PunBB'.($forum_config['o_show_version'] == '1' ? ' '.$forum_config['o_cur_version'] : '')); ?>
+ PunBB'.($forum_config['o_show_version'] == '1' ? ' '.$forum_config['o_cur_version'] : ''), 'Informer Technologies, Inc ') ?>
end_transaction();
// Close the db connection (and free up any result data)
$forum_db->close();
diff -urN punbb-1.3.2/header.php punbb-1.3.4/header.php
--- punbb-1.3.2/header.php 2008-12-08 11:53:13.000000000 +0000
+++ punbb-1.3.4/header.php 2009-04-17 12:51:23.000000000 +0000
@@ -2,7 +2,7 @@
/**
* Outputs the header used by most forum pages.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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
*/
@@ -279,7 +279,7 @@
// Bottom breadcrumbs
$main_elements[''] = (FORUM_PAGE != 'index') ? ''."\n\t".'
'.generate_crumbs(false).'
'."\n".'
' : '';
// Main section heading
-$main_elements[''] = ''.((isset($forum_page['main_title'])) ? $forum_page['main_title'] : (is_array($last_crumb = end($forum_page['crumbs'])) ? reset($last_crumb) : $last_crumb)).(isset($forum_page['main_head_pages']) ? ' '.$forum_page['main_head_pages'].' ' : '').' '."\n";
+$main_elements[''] = ''.((isset($forum_page['main_title'])) ? $forum_page['main_title'] : forum_htmlencode(is_array($last_crumb = end($forum_page['crumbs'])) ? reset($last_crumb) : $last_crumb)).(isset($forum_page['main_head_pages']) ? ' '.$forum_page['main_head_pages'].' ' : '').' '."\n";
// Top pagination and post links
$main_elements[''] = (!empty($forum_page['page_post'])) ? ''."\n\t".implode("\n\t", $forum_page['page_post'])."\n".'
' : '';
diff -urN punbb-1.3.2/help.php punbb-1.3.4/help.php
--- punbb-1.3.2/help.php 2008-10-31 09:04:18.000000000 +0000
+++ punbb-1.3.4/help.php 2009-04-17 12:51:23.000000000 +0000
@@ -4,7 +4,7 @@
*
* Provides examples of how to use various features of the forum (ie: BBCode, smilies).
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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
*/
@@ -26,7 +26,11 @@
if (!$section)
message($lang_common['Bad request']);
-$page_title = forum_htmlencode($forum_config['o_board_title']).' - '.$lang_help['Help'];
+$forum_page['crumbs'] = array(
+ array($forum_config['o_board_title'], forum_link($forum_url['help'])),
+ $lang_help['Help']
+);
+
define('FORUM_PAGE', 'help');
require FORUM_ROOT.'header.php';
@@ -102,7 +106,7 @@
name@example.com
-
[email=name@example.com][/email]
+
[email=name@example.com][/email]
diff -urN punbb-1.3.2/include/cache.php punbb-1.3.4/include/cache.php
--- punbb-1.3.2/include/cache.php 2008-10-25 15:27:40.000000000 +0000
+++ punbb-1.3.4/include/cache.php 2009-04-17 12:51:23.000000000 +0000
@@ -4,7 +4,7 @@
*
* This file contains all of the functions used to generate the cache files used by the site.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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
*/
@@ -371,7 +371,7 @@
$output = xml_to_array(forum_trim($result['content']));
$output = current($output);
- if (is_array($output['hotfix']) && !is_array(current($output['hotfix'])))
+ if (!empty($output['hotfix']) && is_array($output['hotfix']) && !is_array(current($output['hotfix'])))
$output['hotfix'] = array($output['hotfix']);
$output['cached'] = time();
diff -urN punbb-1.3.2/include/common.php punbb-1.3.4/include/common.php
--- punbb-1.3.2/include/common.php 2008-10-30 16:06:04.000000000 +0000
+++ punbb-1.3.4/include/common.php 2009-04-17 12:51:23.000000000 +0000
@@ -2,7 +2,7 @@
/**
* Loads common data and performs various functions necessary for the site to work properly.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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.3.2/include/common_admin.php punbb-1.3.4/include/common_admin.php
--- punbb-1.3.2/include/common_admin.php 2008-11-26 11:59:03.000000000 +0000
+++ punbb-1.3.4/include/common_admin.php 2009-04-17 12:51:23.000000000 +0000
@@ -2,7 +2,7 @@
/**
* Loads common functions used in the administration panel.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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
*/
@@ -50,7 +50,7 @@
}
else if (FORUM_PAGE_SECTION == 'users')
{
- $forum_page['admin_submenu']['users'] = '';
+ $forum_page['admin_submenu']['users'] = '';
$forum_page['admin_submenu']['groups'] = '';
$forum_page['admin_submenu']['ranks'] = '';
$forum_page['admin_submenu']['bans'] = '';
diff -urN punbb-1.3.2/include/dblayer/common_db.php punbb-1.3.4/include/dblayer/common_db.php
--- punbb-1.3.2/include/dblayer/common_db.php 2008-10-23 07:49:10.000000000 +0000
+++ punbb-1.3.4/include/dblayer/common_db.php 2009-04-17 12:51:23.000000000 +0000
@@ -2,7 +2,7 @@
/**
* Loads the proper database layer class.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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.3.2/include/dblayer/mysql.php punbb-1.3.4/include/dblayer/mysql.php
--- punbb-1.3.2/include/dblayer/mysql.php 2008-10-30 17:09:06.000000000 +0000
+++ punbb-1.3.4/include/dblayer/mysql.php 2009-04-17 12:51:23.000000000 +0000
@@ -2,7 +2,7 @@
/**
* A database layer class that relies on the MySQL PHP extension.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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.3.2/include/dblayer/mysqli.php punbb-1.3.4/include/dblayer/mysqli.php
--- punbb-1.3.2/include/dblayer/mysqli.php 2008-10-30 17:09:06.000000000 +0000
+++ punbb-1.3.4/include/dblayer/mysqli.php 2009-04-17 12:51:23.000000000 +0000
@@ -2,7 +2,7 @@
/**
* A database layer class that relies on the MySQLi PHP extension.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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.3.2/include/dblayer/pgsql.php punbb-1.3.4/include/dblayer/pgsql.php
--- punbb-1.3.2/include/dblayer/pgsql.php 2008-10-30 17:09:06.000000000 +0000
+++ punbb-1.3.4/include/dblayer/pgsql.php 2009-04-17 12:51:23.000000000 +0000
@@ -2,7 +2,7 @@
/**
* A database layer class that relies on the PostgreSQL PHP extension.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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.3.2/include/dblayer/sqlite.php punbb-1.3.4/include/dblayer/sqlite.php
--- punbb-1.3.2/include/dblayer/sqlite.php 2008-11-06 22:34:26.000000000 +0000
+++ punbb-1.3.4/include/dblayer/sqlite.php 2009-04-17 12:51:23.000000000 +0000
@@ -2,7 +2,7 @@
/**
* A database layer class that relies on the SQLite PHP extension.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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.3.2/include/email.php punbb-1.3.4/include/email.php
--- punbb-1.3.2/include/email.php 2008-10-25 15:27:40.000000000 +0000
+++ punbb-1.3.4/include/email.php 2009-04-17 12:51:23.000000000 +0000
@@ -2,7 +2,7 @@
/**
* Loads functions used in dealing with email addresses and email sending.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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.3.2/include/essentials.php punbb-1.3.4/include/essentials.php
--- punbb-1.3.2/include/essentials.php 2008-12-08 15:02:16.000000000 +0000
+++ punbb-1.3.4/include/essentials.php 2009-05-20 09:20:51.000000000 +0000
@@ -2,21 +2,21 @@
/**
* Loads the minimum amount of data (eg: functions, database connection, config data, etc) necessary to integrate the site.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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
*/
// Enable DEBUG mode by removing // from the following line
-define('FORUM_DEBUG', 1);
+//define('FORUM_DEBUG', 1);
if (!defined('FORUM_ROOT'))
exit('The constant FORUM_ROOT must be defined and point to a valid PunBB installation root directory.');
// Define the version and database revision that this code was written for
-define('FORUM_VERSION', '1.3.2');
-define('FORUM_DB_REVISION', 3);
+define('FORUM_VERSION', '1.3.4');
+define('FORUM_DB_REVISION', 4);
// Load the functions script
require FORUM_ROOT.'include/functions.php';
@@ -63,7 +63,10 @@
$forum_start = ((float)$usec + (float)$sec);
// Make sure PHP reports all errors except E_NOTICE. PunBB supports E_ALL, but a lot of scripts it may interact with, do not.
-error_reporting(E_ALL);
+if (defined('FORUM_DEBUG'))
+ error_reporting(E_ALL);
+else
+ error_reporting(E_ALL ^ E_NOTICE);
// Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings)
setlocale(LC_CTYPE, 'C');
@@ -106,7 +109,7 @@
// Verify that we are running the proper database schema revision
if (defined('PUN') || !isset($forum_config['o_database_revision']) || $forum_config['o_database_revision'] < FORUM_DB_REVISION || version_compare($forum_config['o_cur_version'], FORUM_VERSION, '<'))
- error('Your PunBB database is out-of-date and must be upgraded in order to continue. Please run
db_update.php in order to complete the upgrade process.');
+ error('Your PunBB database is out-of-date and must be upgraded in order to continue. Please run
db_update.php in order to complete the upgrade process.');
// Load hooks
diff -urN punbb-1.3.2/include/functions.php punbb-1.3.4/include/functions.php
--- punbb-1.3.2/include/functions.php 2008-12-04 16:49:51.000000000 +0000
+++ punbb-1.3.4/include/functions.php 2009-04-17 12:51:23.000000000 +0000
@@ -2,7 +2,7 @@
/**
* Loads common functions used throughout the site.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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
*/
@@ -631,7 +631,7 @@
-
+
@@ -1360,44 +1360,47 @@
$forum_user = $forum_db->fetch_assoc($result);
- // Update online list
- if (!$forum_user['logged'])
+ if (!defined('FORUM_QUIET_VISIT'))
{
- $forum_user['logged'] = time();
- $forum_user['csrf_token'] = random_key(40, false, true);
- $forum_user['prev_url'] = get_current_url(255);
+ // Update online list
+ if (!$forum_user['logged'])
+ {
+ $forum_user['logged'] = time();
+ $forum_user['csrf_token'] = random_key(40, false, true);
+ $forum_user['prev_url'] = get_current_url(255);
- // REPLACE INTO avoids a user having two rows in the online table
- $query = array(
- 'REPLACE' => 'user_id, ident, logged, csrf_token',
- 'INTO' => 'online',
- 'VALUES' => '1, \''.$forum_db->escape($remote_addr).'\', '.$forum_user['logged'].', \''.$forum_user['csrf_token'].'\'',
- 'UNIQUE' => 'user_id=1 AND ident=\''.$forum_db->escape($remote_addr).'\''
- );
+ // REPLACE INTO avoids a user having two rows in the online table
+ $query = array(
+ 'REPLACE' => 'user_id, ident, logged, csrf_token',
+ 'INTO' => 'online',
+ 'VALUES' => '1, \''.$forum_db->escape($remote_addr).'\', '.$forum_user['logged'].', \''.$forum_user['csrf_token'].'\'',
+ 'UNIQUE' => 'user_id=1 AND ident=\''.$forum_db->escape($remote_addr).'\''
+ );
- if ($forum_user['prev_url'] != null)
- {
- $query['REPLACE'] .= ', prev_url';
- $query['VALUES'] .= ', \''.$forum_db->escape($forum_user['prev_url']).'\'';
- }
+ if ($forum_user['prev_url'] != null)
+ {
+ $query['REPLACE'] .= ', prev_url';
+ $query['VALUES'] .= ', \''.$forum_db->escape($forum_user['prev_url']).'\'';
+ }
- ($hook = get_hook('fn_set_default_user_qr_add_online_guest_user')) ? eval($hook) : null;
- $forum_db->query_build($query) or error(__FILE__, __LINE__);
- }
- else
- {
- $query = array(
- 'UPDATE' => 'online',
- 'SET' => 'logged='.time(),
- 'WHERE' => 'ident=\''.$forum_db->escape($remote_addr).'\''
- );
+ ($hook = get_hook('fn_set_default_user_qr_add_online_guest_user')) ? eval($hook) : null;
+ $forum_db->query_build($query) or error(__FILE__, __LINE__);
+ }
+ else
+ {
+ $query = array(
+ 'UPDATE' => 'online',
+ 'SET' => 'logged='.time(),
+ 'WHERE' => 'ident=\''.$forum_db->escape($remote_addr).'\''
+ );
- $current_url = get_current_url(255);
- if ($current_url != null)
- $query['SET'] .= ', prev_url=\''.$forum_db->escape($current_url).'\'';
+ $current_url = get_current_url(255);
+ if ($current_url != null)
+ $query['SET'] .= ', prev_url=\''.$forum_db->escape($current_url).'\'';
- ($hook = get_hook('fn_set_default_user_qr_update_online_guest_user')) ? eval($hook) : null;
- $forum_db->query_build($query) or error(__FILE__, __LINE__);
+ ($hook = get_hook('fn_set_default_user_qr_update_online_guest_user')) ? eval($hook) : null;
+ $forum_db->query_build($query) or error(__FILE__, __LINE__);
+ }
}
$forum_user['disp_topics'] = $forum_config['o_disp_topics_default'];
@@ -1408,6 +1411,8 @@
$forum_user['style'] = $forum_config['o_default_style'];
$forum_user['is_guest'] = true;
$forum_user['is_admmod'] = false;
+
+ ($hook = get_hook('fn_set_default_user_end')) ? eval($hook) : null;
}
@@ -2775,7 +2780,7 @@
ob_start();
?>
-
+
@@ -2792,7 +2797,7 @@
ob_start();
?>
-
+
@@ -2887,7 +2892,7 @@
// START SUBST -
$forum_head['refresh'] = '
';
- $forum_head['title'] = '
'.$lang_common['Redirecting'].' - '.forum_htmlencode($forum_config['o_board_title']).' ';
+ $forum_head['title'] = '
'.$lang_common['Redirecting'].$lang_common['Title separator'].forum_htmlencode($forum_config['o_board_title']).' ';
ob_start();
@@ -2966,14 +2971,16 @@
// Display a simple error message
function error()
{
+ global $forum_config;
+
if (!headers_sent())
{
+ // if no HTTP responce code is set we send 503
+ if (!defined('FORUM_HTTP_RESPONSE_CODE_SET'))
+ header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Content-type: text/html; charset=utf-8');
- header('HTTP/1.1 503 Service Temporarily Unavailable');
}
- global $forum_config;
-
/*
Parse input parameters. Possible function signatures:
error('Error message.');
@@ -3006,7 +3013,7 @@
while (@ob_end_clean());
// "Restart" output buffering if we are using ob_gzhandler (since the gzip header is already sent)
- if (!empty($forum_config['o_gzip']) && extension_loaded('zlib') && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false || strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') !== false))
+ if (!empty($forum_config['o_gzip']) && extension_loaded('zlib') && !empty($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false || strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') !== false))
ob_start('ob_gzhandler');
?>
diff -urN punbb-1.3.2/include/parser.php punbb-1.3.4/include/parser.php
--- punbb-1.3.2/include/parser.php 2008-12-08 13:47:34.000000000 +0000
+++ punbb-1.3.4/include/parser.php 2009-04-17 12:51:23.000000000 +0000
@@ -2,7 +2,7 @@
/**
* Loads various functions used to parse posts.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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
*/
@@ -766,6 +766,10 @@
{
global $forum_config, $base_url, $smilies;
+ $return = ($hook = get_hook('ps_do_smilies_start')) ? eval($hook) : null;
+ if ($return != null)
+ return $return;
+
$text = ' '.$text.' ';
foreach ($smilies as $smiley_text => $smiley_img)
@@ -774,6 +778,8 @@
$text = preg_replace("#(?<=[>\s])".preg_quote($smiley_text, '#')."(?=\W)#m", '
', $text);
}
+ $return = ($hook = get_hook('ps_do_smilies_end')) ? eval($hook) : null;
+
return substr($text, 1, -1);
}
diff -urN punbb-1.3.2/include/search_functions.php punbb-1.3.4/include/search_functions.php
--- punbb-1.3.2/include/search_functions.php 2008-10-30 13:04:00.000000000 +0000
+++ punbb-1.3.4/include/search_functions.php 2009-04-17 12:51:23.000000000 +0000
@@ -2,7 +2,7 @@
/**
* Loads various functions that are used for searching the forum.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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
*/
@@ -788,14 +788,14 @@
case 'show_user_posts':
$forum_page['crumbs'][] = sprintf($lang_search['Posts by'], $search_set[0]['pposter'], ($forum_page['start_from'] + 1), $num_hits);
$forum_page['items_info'] = generate_items_info($lang_search['Posts found'], ($forum_page['start_from'] + 1), $num_hits);
- $forum_page['main_head_options']['user_topics'] = '
'.sprintf($lang_search['Topics by'], $search_set[0]['pposter']).' ';
+ $forum_page['main_head_options']['user_topics'] = '
'.sprintf($lang_search['Topics by'], forum_htmlencode($search_set[0]['pposter'])).' ';
$forum_page['main_head_options']['defined_search'] = '
'.$lang_search['User defined search'].' ';
break;
case 'show_user_topics':
$forum_page['crumbs'][] = sprintf($lang_search['Topics by'], $search_set[0]['poster']);
$forum_page['items_info'] = generate_items_info($lang_search['Topics found'], ($forum_page['start_from'] + 1), $num_hits);
- $forum_page['main_head_options']['user_posts'] = '
'.sprintf($lang_search['Posts by'], $search_set[0]['poster']).' ';
+ $forum_page['main_head_options']['user_posts'] = '
'.sprintf($lang_search['Posts by'], forum_htmlencode($search_set[0]['poster'])).' ';
$forum_page['main_head_options']['defined_search'] = '
'.$lang_search['User defined search'].' ';
break;
diff -urN punbb-1.3.2/include/search_idx.php punbb-1.3.4/include/search_idx.php
--- punbb-1.3.2/include/search_idx.php 2008-11-05 12:42:27.000000000 +0000
+++ punbb-1.3.4/include/search_idx.php 2009-04-17 12:51:23.000000000 +0000
@@ -2,7 +2,7 @@
/**
* Load various functions used in indexing posts and topics for searching.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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.3.2/include/url/Default/forum_urls.php punbb-1.3.4/include/url/Default/forum_urls.php
--- punbb-1.3.2/include/url/Default/forum_urls.php 2008-11-09 17:45:53.000000000 +0000
+++ punbb-1.3.4/include/url/Default/forum_urls.php 2009-04-17 12:51:23.000000000 +0000
@@ -2,7 +2,7 @@
/**
* Regular URL scheme.
*
- * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org
+ * @copyright (C) 2008-2009 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.3.2/include/url/Default/index.html punbb-1.3.4/include/url/Default/index.html
--- punbb-1.3.2/include/url/Default/index.html 2008-11-09 17:45:53.000000000 +0000
+++ punbb-1.3.4/include/url/Default/index.html 2009-03-13 15:55:28.000000000 +0000
@@ -5,12 +5,4 @@
.
-