Skip to content

Commit

Permalink
Revert changesets [1683],[1705], fix timeout visit
Browse files Browse the repository at this point in the history
git-svn-id: http://punbb.informer.com/svn/punbb/trunk@1710 4dc816b1-62af-4023-b237-cae3452c1eb1
  • Loading branch information
hcs committed Mar 15, 2011
1 parent 837733d commit 1aa186e
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 36 deletions.
6 changes: 3 additions & 3 deletions admin/install.php
Expand Up @@ -4,13 +4,13 @@
*
* Used to actually install PunBB.
*
* @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org
* @copyright (C) 2008-2011 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.3.4');
define('FORUM_VERSION', '1.3.5');
define('FORUM_DB_REVISION', 4);
define('MIN_PHP_VERSION', '4.3.0');
define('MIN_MYSQL_VERSION', '4.1.2');
Expand Down Expand Up @@ -1629,7 +1629,7 @@ function unescape($str)
'o_date_format' => "'Y-m-d'",
'o_check_for_updates' => "'$check_for_updates'",
'o_check_for_versions' => "'$check_for_updates'",
'o_timeout_visit' => "'1800'",
'o_timeout_visit' => "'5400'",
'o_timeout_online' => "'300'",
'o_redirect_delay' => "'1'",
'o_show_version' => "'0'",
Expand Down
1 change: 0 additions & 1 deletion include/url/Default/forum_urls.php
Expand Up @@ -23,7 +23,6 @@
'delete_avatar' => 'profile.php?action=delete_avatar&id=$1&csrf_token=$2',
'edit' => 'edit.php?id=$1',
'email' => 'misc.php?email=$1',
'poster_email' => 'misc.php?email=$1&by_post',
'forum' => 'viewforum.php?id=$1',
'forum_rss' => 'extern.php?action=feed&fid=$1&type=rss',
'forum_atom' => 'extern.php?action=feed&fid=$1&type=atom',
Expand Down
1 change: 0 additions & 1 deletion include/url/Default/rewrite_rules.php
Expand Up @@ -45,7 +45,6 @@
'/^users(\.html?|\/)?$/i' => 'userlist.php',
'/^users\/(.*)\/([0-9-]+)\/?([a-z_]+)[\/_-]([a-zA-Z]+)[\/_-]p(age)?[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'userlist.php?username=$1&show_group=$2&sort_by=$3&sort_dir=$4&p=$6',
'/^users\/(.*)\/([0-9-]+)\/?([a-z_]+)[\/_-]([a-zA-Z]+)(\.html?|\/)?$/i' => 'userlist.php?username=$1&show_group=$2&sort_by=$3&sort_dir=$4',
'/^email[\/_-]?post[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'misc.php?email=$1&by_post',
'/^(email|report|subscribe|unsubscribe)[\/_-]?([0-9]+)[\/_-]?([a-z0-9]+)?(\.html?|\/)?$/i' => 'misc.php?$1=$2&csrf_token=$3',
'/^(mark|rules)[\/_-]?(read)?[\/_-]?([a-z0-9]+)?(\.html?|\/)?$/i' => 'misc.php?action=$1$2&csrf_token=$3',
'/^mark[\/_-](forum)[\/_-]?([0-9]+)[\/_-](read)[\/_-]([a-z0-9]+)(\.html?|\/)?$/i' => 'misc.php?action=markforumread&fid=$2&csrf_token=$4',
Expand Down
1 change: 0 additions & 1 deletion include/url/File_based/forum_urls.php
Expand Up @@ -25,7 +25,6 @@
'delete_avatar' => 'delete-avatar$1-$2.html',
'edit' => 'edit$1.html',
'email' => 'email$1.html',
'poster_email' => 'email-post$1.html',
'forum' => 'forum$1.html',
'forum_rss' => 'feed-rss-forum$1.xml',
'forum_atom' => 'feed-atom-forum$1.xml',
Expand Down
1 change: 0 additions & 1 deletion include/url/File_based/rewrite_rules.php
Expand Up @@ -45,7 +45,6 @@
'/^users(\.html?|\/)?$/i' => 'userlist.php',
'/^users\/(.*)\/([0-9-]+)\/?([a-z_]+)[\/_-]([a-zA-Z]+)[\/_-]p(age)?[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'userlist.php?username=$1&show_group=$2&sort_by=$3&sort_dir=$4&p=$6',
'/^users\/(.*)\/([0-9-]+)\/?([a-z_]+)[\/_-]([a-zA-Z]+)(\.html?|\/)?$/i' => 'userlist.php?username=$1&show_group=$2&sort_by=$3&sort_dir=$4',
'/^email[\/_-]?post[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'misc.php?email=$1&by_post',
'/^(email|report|subscribe|unsubscribe)[\/_-]?([0-9]+)[\/_-]?([a-z0-9]+)?(\.html?|\/)?$/i' => 'misc.php?$1=$2&csrf_token=$3',
'/^(mark|rules)[\/_-]?(read)?[\/_-]?([a-z0-9]+)?(\.html?|\/)?$/i' => 'misc.php?action=$1$2&csrf_token=$3',
'/^mark[\/_-](forum)[\/_-]?([0-9]+)[\/_-](read)[\/_-]([a-z0-9]+)(\.html?|\/)?$/i' => 'misc.php?action=markforumread&fid=$2&csrf_token=$4',
Expand Down
1 change: 0 additions & 1 deletion include/url/File_based_(fancy)/forum_urls.php
Expand Up @@ -26,7 +26,6 @@
'delete_avatar' => 'delete-avatar$1-$2.html',
'edit' => 'edit$1.html',
'email' => 'email$1.html',
'poster_email' => 'email-post$1.html',
'forum' => 'forum$1-$2.html',
'forum_rss' => 'feed-rss-forum$1.xml',
'forum_atom' => 'feed-atom-forum$1.xml',
Expand Down
1 change: 0 additions & 1 deletion include/url/File_based_(fancy)/rewrite_rules.php
Expand Up @@ -45,7 +45,6 @@
'/^users(\.html?|\/)?$/i' => 'userlist.php',
'/^users\/(.*)\/([0-9-]+)\/?([a-z_]+)[\/_-]([a-zA-Z]+)[\/_-]p(age)?[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'userlist.php?username=$1&show_group=$2&sort_by=$3&sort_dir=$4&p=$6',
'/^users\/(.*)\/([0-9-]+)\/?([a-z_]+)[\/_-]([a-zA-Z]+)(\.html?|\/)?$/i' => 'userlist.php?username=$1&show_group=$2&sort_by=$3&sort_dir=$4',
'/^email[\/_-]?post[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'misc.php?email=$1&by_post',
'/^(email|report|subscribe|unsubscribe)[\/_-]?([0-9]+)[\/_-]?([a-z0-9]+)?(\.html?|\/)?$/i' => 'misc.php?$1=$2&csrf_token=$3',
'/^(mark|rules)[\/_-]?(read)?[\/_-]?([a-z0-9]+)?(\.html?|\/)?$/i' => 'misc.php?action=$1$2&csrf_token=$3',
'/^mark[\/_-](forum)[\/_-]?([0-9]+)[\/_-](read)[\/_-]([a-z0-9]+)(\.html?|\/)?$/i' => 'misc.php?action=markforumread&fid=$2&csrf_token=$4',
Expand Down
1 change: 0 additions & 1 deletion include/url/Folder_based/forum_urls.php
Expand Up @@ -23,7 +23,6 @@
'delete_user' => 'delete/user/$1/',
'edit' => 'edit/$1/',
'email' => 'email/$1/',
'poster_email' => 'email/post/$1/',
'forum' => 'forum/$1/',
'forum_rss' => 'feed/rss/forum/$1/',
'forum_atom' => 'feed/atom/forum/$1/',
Expand Down
1 change: 0 additions & 1 deletion include/url/Folder_based/rewrite_rules.php
Expand Up @@ -45,7 +45,6 @@
'/^users(\.html?|\/)?$/i' => 'userlist.php',
'/^users\/(.*)\/([0-9-]+)\/?([a-z_]+)[\/_-]([a-zA-Z]+)[\/_-]p(age)?[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'userlist.php?username=$1&show_group=$2&sort_by=$3&sort_dir=$4&p=$6',
'/^users\/(.*)\/([0-9-]+)\/?([a-z_]+)[\/_-]([a-zA-Z]+)(\.html?|\/)?$/i' => 'userlist.php?username=$1&show_group=$2&sort_by=$3&sort_dir=$4',
'/^email[\/_-]?post[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'misc.php?email=$1&by_post',
'/^(email|report|subscribe|unsubscribe)[\/_-]?([0-9]+)[\/_-]?([a-z0-9]+)?(\.html?|\/)?$/i' => 'misc.php?$1=$2&csrf_token=$3',
'/^(mark|rules)[\/_-]?(read)?[\/_-]?([a-z0-9]+)?(\.html?|\/)?$/i' => 'misc.php?action=$1$2&csrf_token=$3',
'/^mark[\/_-](forum)[\/_-]?([0-9]+)[\/_-](read)[\/_-]([a-z0-9]+)(\.html?|\/)?$/i' => 'misc.php?action=markforumread&fid=$2&csrf_token=$4',
Expand Down
1 change: 0 additions & 1 deletion include/url/Folder_based_(fancy)/forum_urls.php
Expand Up @@ -24,7 +24,6 @@
'delete_user' => 'delete/user/$1/',
'edit' => 'edit/$1/',
'email' => 'email/$1/',
'poster_email' => 'email/post/$1/',
'forum' => 'forum/$1/$2/',
'forum_rss' => 'feed/rss/forum/$1/',
'forum_atom' => 'feed/atom/forum/$1/',
Expand Down
1 change: 0 additions & 1 deletion include/url/Folder_based_(fancy)/rewrite_rules.php
Expand Up @@ -45,7 +45,6 @@
'/^users(\.html?|\/)?$/i' => 'userlist.php',
'/^users\/(.*)\/([0-9-]+)\/?([a-z_]+)[\/_-]([a-zA-Z]+)[\/_-]p(age)?[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'userlist.php?username=$1&show_group=$2&sort_by=$3&sort_dir=$4&p=$6',
'/^users\/(.*)\/([0-9-]+)\/?([a-z_]+)[\/_-]([a-zA-Z]+)(\.html?|\/)?$/i' => 'userlist.php?username=$1&show_group=$2&sort_by=$3&sort_dir=$4',
'/^email[\/_-]?post[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'misc.php?email=$1&by_post',
'/^(email|report|subscribe|unsubscribe)[\/_-]?([0-9]+)[\/_-]?([a-z0-9]+)?(\.html?|\/)?$/i' => 'misc.php?$1=$2&csrf_token=$3',
'/^(mark|rules)[\/_-]?(read)?[\/_-]?([a-z0-9]+)?(\.html?|\/)?$/i' => 'misc.php?action=$1$2&csrf_token=$3',
'/^mark[\/_-](forum)[\/_-]?([0-9]+)[\/_-](read)[\/_-]([a-z0-9]+)(\.html?|\/)?$/i' => 'misc.php?action=markforumread&fid=$2&csrf_token=$4',
Expand Down
31 changes: 10 additions & 21 deletions misc.php
Expand Up @@ -153,7 +153,8 @@
if ($forum_user['is_guest'] || $forum_user['g_send_email'] == '0')
message($lang_common['No permission']);

$recipient_id = $post_id = intval($_GET['email']);
$recipient_id = intval($_GET['email']);

if ($recipient_id < 2)
message($lang_common['Bad request']);

Expand All @@ -163,28 +164,16 @@
if (isset($_POST['cancel']))
redirect(forum_htmlencode($_POST['redirect_url']), $lang_common['Cancel redirect']);

if (!isset($_GET['by_post']))
{
$query = array(
'SELECT' => 'u.username, u.email, u.email_setting',
'FROM' => 'users AS u',
'WHERE' => 'u.id='.$recipient_id
);

($hook = get_hook('mi_email_qr_get_form_email_data')) ? eval($hook) : null;
}
else
{
$query = array(
'SELECT' => 'p.poster, p.poster_email, 1',
'FROM' => 'posts AS p',
'WHERE' => 'p.id='.$post_id
);
$query = array(
'SELECT' => 'u.username, u.email, u.email_setting',
'FROM' => 'users AS u',
'WHERE' => 'u.id='.$recipient_id
);

($hook = get_hook('mi_email_qr_get_form_guest_email_data')) ? eval($hook) : null;
}
($hook = get_hook('mi_email_qr_get_form_email_data')) ? eval($hook) : null;

$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);

if (!$forum_db->num_rows($result))
message($lang_common['Bad request']);

Expand Down Expand Up @@ -257,7 +246,7 @@

// Setup form
$forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0;
$forum_page['form_action'] = (isset($_GET['by_post']) ? forum_link($forum_url['poster_email'], $post_id) : forum_link($forum_url['email'], $recipient_id));
$forum_page['form_action'] = forum_link($forum_url['email'], $recipient_id);

$forum_page['hidden_fields'] = array(
'form_sent' => '<input type="hidden" name="form_sent" value="1" />',
Expand Down
6 changes: 5 additions & 1 deletion style/Oxygen/Oxygen.css
Expand Up @@ -1375,7 +1375,11 @@ F - MAIN CONTENT - FORMS
width: 100%;
position: relative;
}


.brd .txt-set .required label span em {
margin-bottom: -1.2em;
}

.brd .req-error {
display: block;
}
Expand Down
2 changes: 1 addition & 1 deletion viewtopic.php
Expand Up @@ -409,7 +409,7 @@
else
{
if ($cur_post['poster_email'] != '' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1')
$forum_page['post_contacts']['email'] = '<span class="user-email'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="'.(($forum_user['is_admmod']) ? 'mailto:'. forum_htmlencode($cur_post['poster_email']) : forum_link($forum_url['poster_email'], $cur_post['id'])).'">'.$lang_topic['E-mail'].'<span>&#160;'.forum_htmlencode($cur_post['username']).'</span></a></span>';
$forum_page['post_contacts']['email'] = '<span class="user-email'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="mailto:'.forum_htmlencode($cur_post['poster_email']).'">'.$lang_topic['E-mail'].'<span>&#160;'.forum_htmlencode($cur_post['username']).'</span></a></span>';
}
}

Expand Down

0 comments on commit 1aa186e

Please sign in to comment.