aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2006-12-08 00:08:46 +0000
committerDavid M <davidmj@users.sourceforge.net>2006-12-08 00:08:46 +0000
commit4519c510663b5c5168d6594d9eb96819a0c6bae0 (patch)
tree7d29f530d224b6777d5a1799c6f2192306417505
parentdddffa234796608a167b2e6804baf6359633562c (diff)
downloadforums-4519c510663b5c5168d6594d9eb96819a0c6bae0.tar
forums-4519c510663b5c5168d6594d9eb96819a0c6bae0.tar.gz
forums-4519c510663b5c5168d6594d9eb96819a0c6bae0.tar.bz2
forums-4519c510663b5c5168d6594d9eb96819a0c6bae0.tar.xz
forums-4519c510663b5c5168d6594d9eb96819a0c6bae0.zip
#6076
- removed unused junk from functions.php git-svn-id: file:///svn/phpbb/trunk@6729 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/functions.php14
-rw-r--r--phpBB/includes/functions_display.php4
-rw-r--r--phpBB/includes/ucp/ucp_register.php7
-rw-r--r--phpBB/posting.php7
4 files changed, 22 insertions, 10 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 1a3cb559f2..3b0cd9a055 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1905,12 +1905,17 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
$confirm_id = md5(unique_id($user->ip));
$seed = hexdec(substr(unique_id(), 4, 10));
+ if ($seed > 0x7FFFFFFF)
+ {
+ $seed -= 0x7FFFFFFF;
+ }
+
$sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'confirm_id' => (string) $confirm_id,
'session_id' => (string) $user->session_id,
'confirm_type' => (int) CONFIRM_LOGIN,
'code' => (string) $code,
- 'seed' => (float) $seed)
+ 'seed' => (int) $seed)
);
$db->sql_query($sql);
@@ -2795,7 +2800,7 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
{
global $phpbb_root_path, $phpEx, $user;
- $full_string = $profile_url = '';
+ $profile_url = '';
$username_colour = ($username_colour) ? '#' . $username_colour : '';
if ($guest_username === false)
@@ -2918,7 +2923,7 @@ function phpbb_checkdnsrr($host, $type = '')
function msg_handler($errno, $msg_text, $errfile, $errline)
{
global $cache, $db, $auth, $template, $config, $user;
- global $phpEx, $phpbb_root_path, $starttime, $msg_title, $msg_long_text;
+ global $phpEx, $phpbb_root_path, $msg_title, $msg_long_text;
// Message handler is stripping text. In case we need it, we are possible to define long text...
if (isset($msg_long_text) && $msg_long_text && !$msg_text)
@@ -3097,7 +3102,6 @@ function page_header($page_title = '', $display_online_list = true)
if ($config['load_online'] && $config['load_online_time'] && $display_online_list)
{
- $userlist_ary = $userlist_visible = array();
$logged_visible_online = $logged_hidden_online = $guests_online = $prev_user_id = 0;
$prev_session_ip = $reading_sql = '';
@@ -3417,7 +3421,7 @@ function page_header($page_title = '', $display_online_list = true)
*/
function page_footer($run_cron = true)
{
- global $db, $config, $template, $user, $auth, $cache, $messenger, $starttime, $phpbb_root_path, $phpEx;
+ global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx;
// Output page creation time
if (defined('DEBUG'))
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index e875fade70..4c16029803 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -47,7 +47,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$show_active = (isset($root_data['forum_flags']) && ($root_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS)) ? true : false;
$sql_from = FORUMS_TABLE . ' f ';
- $lastread_select = $sql_lastread = '';
+ $lastread_select = '';
if ($config['load_db_lastread'] && $user->data['is_registered'])
{
@@ -846,8 +846,6 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_
$download_link = (!$force_physical && $attachment['attach_id']) ? append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&amp;f=' . $forum_id) : $filename;
- $download_link_full = (!$force_physical && $attachment['attach_id']) ? generate_board_url() . append_sid("/download.$phpEx", 'id=' . $attachment['attach_id'] . '&amp;f=' . $forum_id) : generate_board_url() . $filename;
-
switch ($display_cat)
{
// Images
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 916c1b78d9..b4b28e8a1e 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -443,12 +443,17 @@ class ucp_register
$confirm_id = md5(unique_id($user->ip));
$seed = hexdec(substr(unique_id(), 4, 10));
+ if ($seed > 0x7FFFFFFF)
+ {
+ $seed -= 0x7FFFFFFF;
+ }
+
$sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'confirm_id' => (string) $confirm_id,
'session_id' => (string) $user->session_id,
'confirm_type' => (int) CONFIRM_REG,
'code' => (string) $code,
- 'seed' => (float) $seed)
+ 'seed' => (int) $seed)
);
$db->sql_query($sql);
}
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 663a96591f..9b33a9ab62 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -1130,12 +1130,17 @@ if ($config['enable_post_confirm'] && !$user->data['is_registered'] && $solved_c
$confirm_id = md5(unique_id($user->ip));
$seed = hexdec(substr(unique_id(), 4, 10));
+ if ($seed > 0x7FFFFFFF)
+ {
+ $seed -= 0x7FFFFFFF;
+ }
+
$sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'confirm_id' => (string) $confirm_id,
'session_id' => (string) $user->session_id,
'confirm_type' => (int) CONFIRM_POST,
'code' => (string) $code,
- 'seed' => (float) $seed)
+ 'seed' => (int) $seed)
);
$db->sql_query($sql);