mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
- added delete cookies link
- fixed global announcement links in viewforum - do not display redirects in link forums as posts in forum overview git-svn-id: file:///svn/phpbb/trunk@4904 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -660,7 +660,7 @@ function markread($mode, $forum_id = 0, $topic_id = 0, $marktime = false)
|
||||
$tracking[$f_id][0] = base_convert($current_time - $config['board_startdate'], 10, 36);
|
||||
}
|
||||
|
||||
setcookie($config['cookie_name'] . '_track', serialize($tracking), time() + 31536000, $config['cookie_path'], $config['cookie_domain'], $config['cookie_secure']);
|
||||
$user->set_cookie('track', serialize($tracking), time() + 31536000);
|
||||
unset($tracking);
|
||||
}
|
||||
break;
|
||||
@@ -720,7 +720,7 @@ function markread($mode, $forum_id = 0, $topic_id = 0, $marktime = false)
|
||||
{
|
||||
$tracking[$forum_id][base_convert($topic_id, 10, 36)] = base_convert($current_time - $config['board_startdate'], 10, 36);
|
||||
|
||||
setcookie($config['cookie_name'] . '_track', serialize($tracking), time() + 31536000, $config['cookie_path'], $config['cookie_domain'], $config['cookie_secure']);
|
||||
$user->set_cookie('track', serialize($tracking), time() + 31536000);
|
||||
}
|
||||
unset($tracking);
|
||||
}
|
||||
@@ -1645,6 +1645,7 @@ function page_header($page_title = '')
|
||||
'U_SEARCH_SELF' => "{$phpbb_root_path}search.$phpEx$SID&search_id=egosearch",
|
||||
'U_SEARCH_NEW' => "{$phpbb_root_path}search.$phpEx$SID&search_id=newposts",
|
||||
'U_SEARCH_UNANSWERED' => "{$phpbb_root_path}search.$phpEx$SID&search_id=unanswered",
|
||||
'U_DELETE_COOKIES' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=delete_cookies",
|
||||
|
||||
'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS) ? true : false,
|
||||
'S_USER_PM_POPUP' => $user->optionget('popuppm'),
|
||||
|
@@ -129,7 +129,12 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
||||
|
||||
// Include subforum topic/post counts in parent counts
|
||||
$forum_rows[$parent_id]['forum_topics'] += $row['forum_topics'];
|
||||
$forum_rows[$parent_id]['forum_posts'] += $row['forum_posts'];
|
||||
|
||||
// Do not list redirects in LINK Forums as Posts.
|
||||
if ($row['forum_type'] != FORUM_LINK)
|
||||
{
|
||||
$forum_rows[$parent_id]['forum_posts'] += $row['forum_posts'];
|
||||
}
|
||||
|
||||
if (isset($forum_rows[$parent_id]) && $row['forum_last_post_time'] > $forum_rows[$parent_id]['forum_last_post_time'])
|
||||
{
|
||||
|
@@ -428,6 +428,13 @@ class queue
|
||||
|
||||
set_config('last_queue_run', time());
|
||||
|
||||
// Delete stale lock file
|
||||
if (file_exists($this->cache_file . '.lock') && !file_exists($this->cache_file))
|
||||
{
|
||||
@unlink($this->cache_file . '.lock');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!file_exists($this->cache_file) || (file_exists($this->cache_file . '.lock') && filemtime($this->cache_file) > time() - $config['queue_interval']))
|
||||
{
|
||||
return;
|
||||
@@ -1158,7 +1165,7 @@ function mail_encode($str, $encoding)
|
||||
|
||||
// define start delimimter, end delimiter and spacer
|
||||
$end = "?=";
|
||||
$start = "=?$this->encoding?B?";
|
||||
$start = "=?$encoding?B?";
|
||||
$spacer = "$end\r\n $start";
|
||||
|
||||
// determine length of encoded text within chunks and ensure length is even
|
||||
|
@@ -31,7 +31,8 @@ class session
|
||||
$this->page = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : $_ENV['REQUEST_URI'];
|
||||
|
||||
// Generate Valid URL
|
||||
$this->cur_page = preg_replace('#^.*?([a-z]+?)\.' . $phpEx . '\?sid=[a-z0-9]*?(&.*)?$#i', '\1.' . $phpEx . '?\2', htmlspecialchars($this->page));
|
||||
// TODO: need another one with sid for normal redirects
|
||||
$this->cur_page = preg_replace('#^.*?([a-z]+?)\.' . $phpEx . '\?sid=[a-z0-9]*?(&.*)?$#i', '\1.' . $phpEx . '?\2', str_replace('&', '&', htmlspecialchars($this->page)));
|
||||
|
||||
$this->page = preg_replace('#^.*?([a-z]+?)\.' . $phpEx . '\?sid=[a-z0-9]*?(&.*)?$#i', '\1\2', $this->page);
|
||||
$this->page .= (isset($_POST['f'])) ? 'f=' . intval($_POST['f']) : '';
|
||||
@@ -740,11 +741,14 @@ class user extends session
|
||||
return;
|
||||
}
|
||||
|
||||
$sql = 'SELECT * FROM ' . CUSTOM_PROFILE_DATA . "
|
||||
// TODO: think about adding this to the session code too?
|
||||
// Grabbing all user specific options (all without the need of special complicate adding to the sql query) might be useful...
|
||||
$sql = 'SELECT * FROM ' . PROFILE_DATA_TABLE . "
|
||||
WHERE user_id = $user_id";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
|
||||
$user->profile_fields = (!($row = $db->sql_fetchrow($result))) ? array() : $row;
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
function img($img, $alt = '', $width = false, $suffix = '')
|
||||
|
@@ -277,7 +277,7 @@ class ucp_profile extends module
|
||||
// Update Custom Fields
|
||||
if (sizeof($cp_data))
|
||||
{
|
||||
$sql = 'UPDATE ' . CUSTOM_PROFILE_DATA . '
|
||||
$sql = 'UPDATE ' . PROFILE_DATA_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $cp_data) . '
|
||||
WHERE user_id = ' . $user->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
@@ -288,7 +288,7 @@ class ucp_profile extends module
|
||||
|
||||
$db->return_on_error = true;
|
||||
|
||||
$sql = 'INSERT INTO ' . CUSTOM_PROFILE_DATA . ' ' . $db->sql_build_array('INSERT', $cp_data);
|
||||
$sql = 'INSERT INTO ' . PROFILE_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $cp_data);
|
||||
$db->sql_query($sql);
|
||||
|
||||
$db->return_on_error = false;
|
||||
|
@@ -200,7 +200,7 @@ class ucp_register extends module
|
||||
if (sizeof($cp_data))
|
||||
{
|
||||
$cp_data['user_id'] = (int) $user_id;
|
||||
$sql = 'INSERT INTO ' . CUSTOM_PROFILE_DATA . ' ' . $db->sql_build_array('INSERT', $cp->build_insert_sql_array($cp_data));
|
||||
$sql = 'INSERT INTO ' . PROFILE_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $cp->build_insert_sql_array($cp_data));
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user