aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-04-29 13:14:33 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-04-29 13:14:33 +0000
commit859902ea243824b48d2b67d806cd622746bed00f (patch)
treef2b3d40656d471499fdf61389166f0818f88a168 /phpBB/includes
parent7bc05c5e24ca632f3aa5dfd1fe1e6bd145f9d34c (diff)
downloadforums-859902ea243824b48d2b67d806cd622746bed00f.tar
forums-859902ea243824b48d2b67d806cd622746bed00f.tar.gz
forums-859902ea243824b48d2b67d806cd622746bed00f.tar.bz2
forums-859902ea243824b48d2b67d806cd622746bed00f.tar.xz
forums-859902ea243824b48d2b67d806cd622746bed00f.zip
reverting changes to the installer
do not introduce a function we never call outside of common.php git-svn-id: file:///svn/phpbb/trunk@5859 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/constants.php142
-rw-r--r--phpBB/includes/functions_messenger.php9
-rw-r--r--phpBB/includes/session.php34
3 files changed, 76 insertions, 109 deletions
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index da19cfde4d..75b3c9ef02 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -132,79 +132,73 @@ define('FIELD_DATE', 6);
// Additional constants
-// Table names - only set if not in installation
-if (!defined('IN_INSTALL'))
-{
- // Table names
- define('ACL_GROUPS_TABLE', $table_prefix . 'auth_groups');
- define('ACL_OPTIONS_TABLE', $table_prefix . 'auth_options');
- define('ACL_ROLES_TABLE', $table_prefix . 'auth_roles');
- define('ACL_ROLES_DATA_TABLE', $table_prefix . 'auth_roles_data');
- define('ACL_USERS_TABLE', $table_prefix . 'auth_users');
- define('ATTACHMENTS_TABLE', $table_prefix . 'attachments');
- define('BANLIST_TABLE', $table_prefix . 'banlist');
- define('BBCODES_TABLE', $table_prefix . 'bbcodes');
- define('BOOKMARKS_TABLE', $table_prefix . 'bookmarks');
- define('BOTS_TABLE', $table_prefix . 'bots');
- define('CACHE_TABLE', $table_prefix . 'cache');
- define('CONFIG_TABLE', $table_prefix . 'config');
- define('CONFIRM_TABLE', $table_prefix . 'confirm');
- define('PROFILE_FIELDS_TABLE', $table_prefix . 'profile_fields');
- define('PROFILE_LANG_TABLE', $table_prefix . 'profile_lang');
- define('PROFILE_DATA_TABLE', $table_prefix . 'profile_fields_data');
- define('PROFILE_FIELDS_LANG_TABLE', $table_prefix . 'profile_fields_lang');
- define('DISALLOW_TABLE', $table_prefix . 'disallow');
- define('DRAFTS_TABLE', $table_prefix . 'drafts');
- define('EXTENSIONS_TABLE', $table_prefix . 'extensions');
- define('EXTENSION_GROUPS_TABLE', $table_prefix . 'extension_groups');
- define('FORUMS_TABLE', $table_prefix . 'forums');
- define('FORUMS_ACCESS_TABLE', $table_prefix . 'forum_access');
- define('FORUMS_TRACK_TABLE', $table_prefix . 'forums_marking');
- define('FORUMS_WATCH_TABLE', $table_prefix . 'forums_watch');
- define('GROUPS_TABLE', $table_prefix . 'groups');
- define('ICONS_TABLE', $table_prefix . 'icons');
- define('LANG_TABLE', $table_prefix . 'lang');
- define('LOG_TABLE', $table_prefix . 'log');
- define('MODERATOR_TABLE', $table_prefix . 'moderator_cache');
- define('MODULES_TABLE', $table_prefix . 'modules');
- define('POSTS_TABLE', $table_prefix . 'posts');
- define('PRIVMSGS_TABLE', $table_prefix . 'privmsgs');
- define('PRIVMSGS_TO_TABLE', $table_prefix . 'privmsgs_to');
- define('PRIVMSGS_FOLDER_TABLE', $table_prefix . 'privmsgs_folder');
- define('PRIVMSGS_RULES_TABLE', $table_prefix . 'privmsgs_rules');
- define('RANKS_TABLE', $table_prefix . 'ranks');
- define('RATINGS_TABLE', $table_prefix . 'ratings');
- define('REPORTS_TABLE', $table_prefix . 'reports');
- define('REASONS_TABLE', $table_prefix . 'reports_reasons');
- define('SEARCH_TABLE', $table_prefix . 'search_results');
- define('SEARCH_WORD_TABLE', $table_prefix . 'search_wordlist');
- define('SEARCH_MATCH_TABLE', $table_prefix . 'search_wordmatch');
- define('SESSIONS_TABLE', $table_prefix . 'sessions');
- define('SESSIONS_KEYS_TABLE', $table_prefix . 'sessions_keys');
- define('SITELIST_TABLE', $table_prefix . 'sitelist');
- define('SMILIES_TABLE', $table_prefix . 'smilies');
- define('STYLES_TABLE', $table_prefix . 'styles');
- define('STYLES_TPL_TABLE', $table_prefix . 'styles_template');
- define('STYLES_TPLDATA_TABLE', $table_prefix . 'styles_template_data');
- define('STYLES_CSS_TABLE', $table_prefix . 'styles_theme');
- define('STYLES_IMAGE_TABLE', $table_prefix . 'styles_imageset');
- define('TOPICS_TABLE', $table_prefix . 'topics');
- define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted');
- define('TOPICS_WATCH_TABLE', $table_prefix . 'topics_watch');
- define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_marking');
- define('USER_GROUP_TABLE', $table_prefix . 'user_group');
- define('USERS_TABLE', $table_prefix . 'users');
- define('USERS_NOTES_TABLE', $table_prefix . 'users_notes');
- define('WARNINGS_TABLE', $table_prefix . 'warnings');
- define('WORDS_TABLE', $table_prefix . 'words');
- define('POLL_OPTIONS_TABLE', $table_prefix . 'poll_results');
- define('POLL_VOTES_TABLE', $table_prefix . 'poll_voters');
- define('ZEBRA_TABLE', $table_prefix . 'zebra');
-
- // Additional tables
-
-
- // Additional tables end
-}
+// Table names
+define('ACL_GROUPS_TABLE', $table_prefix . 'auth_groups');
+define('ACL_OPTIONS_TABLE', $table_prefix . 'auth_options');
+define('ACL_ROLES_TABLE', $table_prefix . 'auth_roles');
+define('ACL_ROLES_DATA_TABLE', $table_prefix . 'auth_roles_data');
+define('ACL_USERS_TABLE', $table_prefix . 'auth_users');
+define('ATTACHMENTS_TABLE', $table_prefix . 'attachments');
+define('BANLIST_TABLE', $table_prefix . 'banlist');
+define('BBCODES_TABLE', $table_prefix . 'bbcodes');
+define('BOOKMARKS_TABLE', $table_prefix . 'bookmarks');
+define('BOTS_TABLE', $table_prefix . 'bots');
+define('CACHE_TABLE', $table_prefix . 'cache');
+define('CONFIG_TABLE', $table_prefix . 'config');
+define('CONFIRM_TABLE', $table_prefix . 'confirm');
+define('PROFILE_FIELDS_TABLE', $table_prefix . 'profile_fields');
+define('PROFILE_LANG_TABLE', $table_prefix . 'profile_lang');
+define('PROFILE_DATA_TABLE', $table_prefix . 'profile_fields_data');
+define('PROFILE_FIELDS_LANG_TABLE', $table_prefix . 'profile_fields_lang');
+define('DISALLOW_TABLE', $table_prefix . 'disallow');
+define('DRAFTS_TABLE', $table_prefix . 'drafts');
+define('EXTENSIONS_TABLE', $table_prefix . 'extensions');
+define('EXTENSION_GROUPS_TABLE', $table_prefix . 'extension_groups');
+define('FORUMS_TABLE', $table_prefix . 'forums');
+define('FORUMS_ACCESS_TABLE', $table_prefix . 'forum_access');
+define('FORUMS_TRACK_TABLE', $table_prefix . 'forums_marking');
+define('FORUMS_WATCH_TABLE', $table_prefix . 'forums_watch');
+define('GROUPS_TABLE', $table_prefix . 'groups');
+define('ICONS_TABLE', $table_prefix . 'icons');
+define('LANG_TABLE', $table_prefix . 'lang');
+define('LOG_TABLE', $table_prefix . 'log');
+define('MODERATOR_TABLE', $table_prefix . 'moderator_cache');
+define('MODULES_TABLE', $table_prefix . 'modules');
+define('POSTS_TABLE', $table_prefix . 'posts');
+define('PRIVMSGS_TABLE', $table_prefix . 'privmsgs');
+define('PRIVMSGS_TO_TABLE', $table_prefix . 'privmsgs_to');
+define('PRIVMSGS_FOLDER_TABLE', $table_prefix . 'privmsgs_folder');
+define('PRIVMSGS_RULES_TABLE', $table_prefix . 'privmsgs_rules');
+define('RANKS_TABLE', $table_prefix . 'ranks');
+define('RATINGS_TABLE', $table_prefix . 'ratings');
+define('REPORTS_TABLE', $table_prefix . 'reports');
+define('REASONS_TABLE', $table_prefix . 'reports_reasons');
+define('SEARCH_TABLE', $table_prefix . 'search_results');
+define('SEARCH_WORD_TABLE', $table_prefix . 'search_wordlist');
+define('SEARCH_MATCH_TABLE', $table_prefix . 'search_wordmatch');
+define('SESSIONS_TABLE', $table_prefix . 'sessions');
+define('SESSIONS_KEYS_TABLE', $table_prefix . 'sessions_keys');
+define('SITELIST_TABLE', $table_prefix . 'sitelist');
+define('SMILIES_TABLE', $table_prefix . 'smilies');
+define('STYLES_TABLE', $table_prefix . 'styles');
+define('STYLES_TPL_TABLE', $table_prefix . 'styles_template');
+define('STYLES_TPLDATA_TABLE', $table_prefix . 'styles_template_data');
+define('STYLES_CSS_TABLE', $table_prefix . 'styles_theme');
+define('STYLES_IMAGE_TABLE', $table_prefix . 'styles_imageset');
+define('TOPICS_TABLE', $table_prefix . 'topics');
+define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted');
+define('TOPICS_WATCH_TABLE', $table_prefix . 'topics_watch');
+define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_marking');
+define('USER_GROUP_TABLE', $table_prefix . 'user_group');
+define('USERS_TABLE', $table_prefix . 'users');
+define('USERS_NOTES_TABLE', $table_prefix . 'users_notes');
+define('WARNINGS_TABLE', $table_prefix . 'warnings');
+define('WORDS_TABLE', $table_prefix . 'words');
+define('POLL_OPTIONS_TABLE', $table_prefix . 'poll_results');
+define('POLL_VOTES_TABLE', $table_prefix . 'poll_voters');
+define('ZEBRA_TABLE', $table_prefix . 'zebra');
+
+// Additional tables
+
?> \ No newline at end of file
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 8e20a418e2..a314c5edef 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -912,7 +912,10 @@ class smtp_class
// Log into server and get possible auth codes if neccessary
function log_into_server($hostname, $username, $password, $default_auth_method)
{
+ global $user;
+
$err_msg = '';
+ $local_host = (empty($user->page)) ? 'localhost' : $user->host;
// If we are authenticating through pop-before-smtp, we
// have to login ones before we get authenticated
@@ -923,7 +926,7 @@ class smtp_class
}
// Try EHLO first
- $this->server_send("EHLO [$hostname]");
+ $this->server_send("EHLO [{$local_host}]");
if ($err_msg = $this->server_parse('250', __LINE__))
{
// a 503 response code means that we're already authenticated
@@ -933,7 +936,7 @@ class smtp_class
}
// If EHLO fails, we try HELO
- $this->server_send("HELO [$hostname]");
+ $this->server_send("HELO [{$local_host}]");
if ($err_msg = $this->server_parse('250', __LINE__))
{
return ($this->numeric_response_code == 503) ? false : $err_msg;
@@ -1148,7 +1151,7 @@ class smtp_class
$uname = posix_uname();
$tokens['realm'] = $uname['nodename'];
}
-
+
// Maxbuf
if (empty($tokens['maxbuf']))
{
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 3ea20541ab..cf074bb0c5 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -17,6 +17,7 @@ class session
var $session_id = '';
var $cookie_data = array();
var $browser = '';
+ var $host = '';
var $ip = '';
var $page = array();
var $current_page_filename = '';
@@ -112,6 +113,7 @@ class session
$this->time_now = time();
$this->browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : '';
+ $this->host = (!empty($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : 'localhost';
$this->page = $this->extract_current_page($phpbb_root_path);
$this->page['page'] .= (isset($_POST['f'])) ? ((strpos($this->page['page'], '?') !== false) ? '&' : '?') . 'f=' . intval($_POST['f']) : '';
@@ -373,10 +375,6 @@ class session
$this->data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
}
-/* echo "<br />$sql";
- echo "<br />$user_id :: " . sizeof($this->data) . " :: " . (int) is_array($this->data) . " :: " . $db->sql_numrows();
- print_r($this->cookie_data);
- print_r($this->data);*/
// If no data was returned one or more of the following occured:
// Key didn't match one in the DB
@@ -397,34 +395,6 @@ class session
$db->sql_freeresult($result);
}
-/* echo "<br />$sql";
- echo "<br />$user_id :: " . sizeof($this->data) . " :: " . (int) is_array($this->data) . " :: " . $db->sql_numrows();
- print_r($this->cookie_data);
- print_r($this->data);
-
- if ($this->data['user_id'] != ANONYMOUS)
- {
- $sql = 'SELECT session_time, session_id
- FROM ' . SESSIONS_TABLE . '
- WHERE session_user_id = ' . (int) $this->data['user_id'] . '
- ORDER BY session_time DESC';
- $result = $db->sql_query_limit($sql, 1);
-
- if ($sdata = $db->sql_fetchrow($result))
- {
- $this->data = array_merge($sdata, $this->data);
- unset($sdata);
- $this->session_id = $this->data['session_id'];
- }
- $db->sql_freeresult($result);
-
- $this->data['session_last_visit'] = (isset($this->data['session_time']) && $this->data['session_time']) ? $this->data['session_time'] : (($this->data['user_lastvisit']) ? $this->data['user_lastvisit'] : time());
- }
- else
- {
- $this->data['session_last_visit'] = time();
- }
-*/
if ($this->data['user_id'] != ANONYMOUS)
{
$this->data['session_last_visit'] = (isset($this->data['session_time']) && $this->data['session_time']) ? $this->data['session_time'] : (($this->data['user_lastvisit']) ? $this->data['user_lastvisit'] : time());