aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-08-30 21:21:16 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-08-30 21:21:16 +0000
commit1d004b925f9e858fcdc491da63efefb52173042c (patch)
tree77002d3de006a681097d976766116cba70cbd0fe /phpBB
parent6f1d6e92460316e9d602fdf1b7466d4ad886564b (diff)
downloadforums-1d004b925f9e858fcdc491da63efefb52173042c.tar
forums-1d004b925f9e858fcdc491da63efefb52173042c.tar.gz
forums-1d004b925f9e858fcdc491da63efefb52173042c.tar.bz2
forums-1d004b925f9e858fcdc491da63efefb52173042c.tar.xz
forums-1d004b925f9e858fcdc491da63efefb52173042c.zip
necessary changes...
git-svn-id: file:///svn/phpbb/trunk@8072 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/index.php8
-rw-r--r--phpBB/common.php2
-rw-r--r--phpBB/docs/CHANGELOG.html27
-rw-r--r--phpBB/includes/acp/acp_captcha.php2
-rw-r--r--phpBB/includes/acp/acp_forums.php2
-rw-r--r--phpBB/includes/auth/auth_apache.php9
-rw-r--r--phpBB/includes/auth/auth_db.php9
-rw-r--r--phpBB/includes/auth/auth_ldap.php9
-rw-r--r--phpBB/includes/constants.php4
-rw-r--r--phpBB/includes/db/dbal.php6
-rw-r--r--phpBB/includes/functions.php36
-rw-r--r--phpBB/includes/functions_convert.php2
-rw-r--r--phpBB/install/database_update.php17
-rwxr-xr-xphpBB/install/index.php4
-rwxr-xr-xphpBB/install/install_install.php2
-rw-r--r--phpBB/install/schemas/schema_data.sql2
-rw-r--r--phpBB/mcp.php2
-rw-r--r--phpBB/memberlist.php56
-rw-r--r--phpBB/posting.php6
-rw-r--r--phpBB/styles/prosilver/theme/bidi.css4
-rw-r--r--phpBB/styles/prosilver/theme/common.css3
-rw-r--r--phpBB/styles/prosilver/theme/tweaks.css4
-rwxr-xr-xphpBB/ucp.php2
23 files changed, 151 insertions, 67 deletions
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php
index b0d41f94e4..84acd5c457 100644
--- a/phpBB/adm/index.php
+++ b/phpBB/adm/index.php
@@ -42,7 +42,7 @@ if (!$auth->acl_get('a_'))
// We define the admin variables now, because the user is now able to use the admin related features...
define('IN_ADMIN', true);
-$phpbb_admin_path = './';
+$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : './';
// Some oft used variables
$safe_mode = (@ini_get('safe_mode') || @strtolower(ini_get('safe_mode')) == 'on') ? true : false;
@@ -204,11 +204,7 @@ function adm_page_footer($copyright_html = true)
$template->display('body');
garbage_collection();
-
- if (!defined('PHPBB_EMBEDDED'))
- {
- exit;
- }
+ exit_handler();
}
/**
diff --git a/phpBB/common.php b/phpBB/common.php
index 5177bff5b8..151645e5da 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -172,7 +172,7 @@ require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
// Set PHP error handler to ours
-set_error_handler('msg_handler');
++set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
// Instantiate some basic classes
$user = new user();
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 886334175a..37fb419e9d 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -169,6 +169,7 @@ p a {
<ol class="menu">
<li><a href="#changelog">Changelog</a>
<ol type="i">
+ <li><a href="#v30rc5">Changes since RC-5</a></li>
<li><a href="#v30rc4">Changes since RC-4</a></li>
<li><a href="#v30rc3">Changes since RC-3</a></li>
<li><a href="#v30rc2">Changes since RC-2</a></li>
@@ -182,11 +183,27 @@ p a {
<a name="changelog"></a><h1>1. Changelog</h1>
- <a name="v30rc4"></a><b>1.i. Changes since 3.0.RC4</b>
+ <a name="v30rc5"></a><b>1.i. Changes since 3.0.RC5</b>
<br /><br />
<div class="paragraph">
- <p>These fixes/changes are currently only present within CVS and will appear within the next phpBB3 version.</p>
+ <ul class="menu">
+ <li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
+ <li>[Feature] The new exit_handler() function having a check for the function exit_handler_phpbb_hook().</li>
+ <li>[Feature] Constant PHPBB_ADMIN_PATH introduced, having the same purpose as PHPBB_ROOT_PATH, but for the ACP.</li>
+ <li>[Fix] Further fixing user profile view (please do not forget to update/refresh your template and style) (Bug #14230)</li>
+ <li>[Fix] Adjust google adsense bot information (Bug #14296)</li>
+ </ul>
+
+ </div>
+ <a href="#top">Top</a>
+ <br /><br />
+
+ <hr />
+
+ <a name="v30rc4"></a><b>1.ii. Changes since 3.0.RC4</b>
+ <br /><br />
+ <div class="paragraph">
<ul class="menu">
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
@@ -243,7 +260,7 @@ p a {
<hr />
- <a name="v30rc3"></a><b>1.ii. Changes since 3.0.RC3</b>
+ <a name="v30rc3"></a><b>1.iii. Changes since 3.0.RC3</b>
<br /><br />
<div class="paragraph">
@@ -360,7 +377,7 @@ p a {
<hr />
- <a name="v30rc2"></a><b>1.iii. Changes since 3.0.RC2</b>
+ <a name="v30rc2"></a><b>1.iv. Changes since 3.0.RC2</b>
<br /><br />
<div class="paragraph">
@@ -414,7 +431,7 @@ p a {
<hr />
- <a name="v30rc1"></a><b>1.iiii. Changes since 3.0.RC1</b>
+ <a name="v30rc1"></a><b>1.v. Changes since 3.0.RC1</b>
<br /><br />
<div class="paragraph">
diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php
index 7386c378a3..496f66e4f9 100644
--- a/phpBB/includes/acp/acp_captcha.php
+++ b/phpBB/includes/acp/acp_captcha.php
@@ -46,7 +46,7 @@ class acp_captcha
}
$captcha = new captcha();
$captcha->execute(gen_rand_string(mt_rand(5, 8)), time());
- exit;
+ exit_handler();
}
$config_vars = array(
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index fd2602d329..41991fdae0 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -41,7 +41,7 @@ class acp_forums
$total = request_var('total', 0);
$this->display_progress_bar($start, $total);
- exit;
+ exit_handler();
break;
case 'delete':
diff --git a/phpBB/includes/auth/auth_apache.php b/phpBB/includes/auth/auth_apache.php
index 4c8293c707..25631e9f87 100644
--- a/phpBB/includes/auth/auth_apache.php
+++ b/phpBB/includes/auth/auth_apache.php
@@ -36,6 +36,15 @@ function login_apache(&$username, &$password)
{
global $db;
+ // do not allow empty password
+ if (!$password)
+ {
+ return array(
+ 'status' => LOGIN_BREAK,
+ 'error_msg' => 'NO_PASSWORD_SUPPLIED',
+ );
+ }
+
if (!isset($_SERVER['PHP_AUTH_USER']))
{
return array(
diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php
index 6df378b00a..49e6b8fc5d 100644
--- a/phpBB/includes/auth/auth_db.php
+++ b/phpBB/includes/auth/auth_db.php
@@ -20,6 +20,15 @@ function login_db(&$username, &$password)
{
global $db, $config;
+ // do not allow empty password
+ if (!$password)
+ {
+ return array(
+ 'status' => LOGIN_BREAK,
+ 'error_msg' => 'NO_PASSWORD_SUPPLIED',
+ );
+ }
+
$sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
FROM ' . USERS_TABLE . "
WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
diff --git a/phpBB/includes/auth/auth_ldap.php b/phpBB/includes/auth/auth_ldap.php
index a4e6365183..7f79a4862a 100644
--- a/phpBB/includes/auth/auth_ldap.php
+++ b/phpBB/includes/auth/auth_ldap.php
@@ -92,6 +92,15 @@ function login_ldap(&$username, &$password)
{
global $db, $config, $user;
+ // do not allow empty password
+ if (!$password)
+ {
+ return array(
+ 'status' => LOGIN_BREAK,
+ 'error_msg' => 'NO_PASSWORD_SUPPLIED',
+ );
+ }
+
if (!@extension_loaded('ldap'))
{
return array(
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 3c049a1153..0823074072 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -9,6 +9,10 @@
*/
/**
+* valid external constants:
+* PHPBB_MSG_HANDLER
+* PHPBB_ROOT_PATH
+* PHPBB_ADMIN_PATH
*/
// User related
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index 79a2d6bf35..f79b196e68 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -651,8 +651,10 @@ class dbal
</div>
</body>
</html>';
- exit;
- break;
+
+ exit_handler();
+
+ break;
case 'stop':
$endtime = explode(' ', microtime());
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 142b1e8ce7..9f75438e84 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1577,6 +1577,8 @@ function on_page($num_items, $per_page, $start)
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1&f=2', false);
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", array('t' => 1, 'f' => 2));
* </code>
+*
+* Ability to use own function <code>append_sid_phpbb_hook</code> as a hook. It is called in favor of this function.
*/
function append_sid($url, $params = false, $is_amp = true, $session_id = false)
{
@@ -2107,12 +2109,6 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
trigger_error('NO_AUTH_ADMIN_USER_DIFFER');
}
- // do not allow empty password
- if (!$password)
- {
- trigger_error('NO_PASSWORD_SUPPLIED');
- }
-
// If authentication is successful we redirect user to previous page
$result = $auth->login($username, $password, $autologin, $viewonline, $admin);
@@ -3572,8 +3568,7 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
}
else
{
- $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile');
- $profile_url .= '&amp;u=' . (int) $user_id;
+ $profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&amp;u=' . (int) $user_id : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . (int) $user_id);
}
}
else
@@ -3794,7 +3789,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
echo '</body>';
echo '</html>';
- exit;
+ exit_handler();
break;
case E_USER_WARNING:
@@ -3853,7 +3848,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
page_footer();
}
- exit;
+ exit_handler();
break;
}
@@ -4303,11 +4298,7 @@ function page_footer($run_cron = true)
$template->display('body');
garbage_collection();
-
- if (!defined('PHPBB_EMBEDDED'))
- {
- exit;
- }
+ exit_handler();
}
/**
@@ -4332,6 +4323,21 @@ function garbage_collection()
}
/**
+* Handler for exit calls in phpBB
+*
+* Ability to use own function <code>exit_handler_phpbb_hook</code> as a hook. It is called in favor of this function.
+*/
+function exit_handler()
+{
+ if (function_exists('exit_handler_phpbb_hook'))
+ {
+ return exit_handler_phpbb_hook();
+ }
+
+ exit;
+}
+
+/**
* @package phpBB3
*/
class bitfield
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index 12b3109430..a5f78f5c2d 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -1784,7 +1784,7 @@ function add_bots()
'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''),
'Francis [Bot]' => array('http://www.neomo.de/', ''),
'Gigabot [Bot]' => array('Gigabot/', ''),
- 'Google Adsense [Bot]' => array('Mediapartners-Google/', ''),
+ 'Google Adsense [Bot]' => array('Mediapartners-Google', ''),
'Google Desktop' => array('Google Desktop', ''),
'Google Feedfetcher' => array('Feedfetcher-Google', ''),
'Google [Bot]' => array('Googlebot', ''),
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 4c15a4700f..ef6f2338c5 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -8,7 +8,7 @@
*
*/
-$updates_to_version = '3.0.RC5';
+$updates_to_version = '3.0.RC6';
// Return if we "just include it" to find out for which version the database update is responsuble for
if (defined('IN_PHPBB') && defined('IN_INSTALL'))
@@ -983,7 +983,7 @@ if ($exit)
</html>
<?php
- exit;
+ exit_handler();
}
// Schema updates
@@ -1502,6 +1502,17 @@ if (version_compare($current_version, '3.0.RC4', '<='))
$no_updates = false;
}
+if (version_compare($current_version, '3.0.RC5', '<='))
+{
+ // In case the user is having the bot mediapartner google "as is", adjust it.
+ $sql = 'UPDATE ' . BOTS_TABLE . "
+ SET bot_agent = '" . $db->sql_escape('Mediapartners-Google') . "'
+ WHERE bot_agent = '" . $db->sql_escape('Mediapartners-Google/') . "'";
+ _sql($sql, $errored, $error_ary);
+
+ $no_updates = false;
+}
+
_write_result($no_updates, $errored, $error_ary);
$error_ary = array();
@@ -1604,7 +1615,7 @@ $cache->purge();
<?php
-exit;
+exit_handler();
/**
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 56da3590ff..c916ee9df4 100755
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -415,7 +415,7 @@ class module
$db->sql_close();
}
- exit;
+ exit_handler();
}
/**
@@ -606,7 +606,7 @@ class module
$db->sql_close();
}
- exit;
+ exit_handler();
}
/**
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 4dd7e73db5..593f98d7bb 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -2060,7 +2060,7 @@ class install_install extends module
'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''),
'Francis [Bot]' => array('http://www.neomo.de/', ''),
'Gigabot [Bot]' => array('Gigabot/', ''),
- 'Google Adsense [Bot]' => array('Mediapartners-Google/', ''),
+ 'Google Adsense [Bot]' => array('Mediapartners-Google', ''),
'Google Desktop' => array('Google Desktop', ''),
'Google Feedfetcher' => array('Feedfetcher-Google', ''),
'Google [Bot]' => array('Googlebot', ''),
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 4ea41610f1..b80dc5583f 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -208,7 +208,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page',
INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC5');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC6-dev');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index c772918dd7..cd6d20b19c 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -166,7 +166,7 @@ if ($quickmod)
case 'delete_post':
case 'delete_topic':
$module->load('mcp', 'main', 'quickmod');
- exit;
+ exit_handler();
break;
case 'topic_logs':
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index bcacdc9156..1d885ddc59 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1154,27 +1154,47 @@ switch ($mode)
// Build a relevant pagination_url
$params = $sort_params = array();
- foreach (array('_POST', '_GET') as $global_var)
+
+ // We do not use request_var() here directly to save some calls (not all variables are set)
+ $check_params = array(
+ 'g' => array('g', 0),
+ 'sk' => array('sk', $default_key),
+ 'sd' => array('sd', 'a'),
+ 'form' => array('form', ''),
+ 'field' => array('field', ''),
+ 'select_single' => array('select_single', 0),
+ 'username' => array('username', '', true),
+ 'email' => array('email', ''),
+ 'icq' => array('icq', ''),
+ 'aim' => array('aim', ''),
+ 'yahoo' => array('yahoo', ''),
+ 'msn' => array('msn', ''),
+ 'jabber' => array('jabber', ''),
+ 'search_group_id' => array('search_group_id', 0),
+ 'joined_select' => array('joined_select', 'lt'),
+ 'active_select' => array('active_select', 'lt'),
+ 'count_select' => array('count_select', 'eq'),
+ 'joined' => array('joined', ''),
+ 'active' => array('active', ''),
+ 'count' => ($count !== '') ? array('count', 0) : array('count', ''),
+ 'ipdomain' => array('ip', ''),
+ 'first_char' => array('first_char', ''),
+ );
+
+ foreach ($check_params as $key => $call)
{
- foreach ($$global_var as $key => $var)
+ if (!isset($_REQUEST[$key]))
{
- if ($global_var == '_POST')
- {
- unset($_GET[$key]);
- }
-
- if (in_array($key, array('submit', 'start', 'mode', 'char')) || empty($var))
- {
- continue;
- }
+ continue;
+ }
- $param = urlencode($key) . '=' . urlencode(htmlspecialchars($var));
- $params[] = $param;
+ $param = call_user_func_array('request_var', $call);
+ $param = urlencode($key) . '=' . ((is_string($param)) ? urlencode($param) : $param);
+ $params[] = $param;
- if (!in_array($key, array('sk', 'sd')))
- {
- $sort_params[] = $param;
- }
+ if ($key != 'sk' && $key != 'sd')
+ {
+ $sort_params[] = $param;
}
}
@@ -1405,7 +1425,7 @@ switch ($mode)
'S_MODE_SELECT' => $s_sort_key,
'S_ORDER_SELECT' => $s_sort_dir,
'S_CHAR_OPTIONS' => $s_char_options,
- 'S_MODE_ACTION' => $pagination_url . "&amp;form=$form")
+ 'S_MODE_ACTION' => $pagination_url)
);
}
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 71e0dfc2c7..657e1d0082 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -114,7 +114,7 @@ switch ($mode)
{
upload_popup();
garbage_collection();
- exit;
+ exit_handler();
}
break;
@@ -145,7 +145,7 @@ if (!$post_data)
if ($mode == 'popup')
{
upload_popup($post_data['forum_style']);
- exit;
+ exit_handler();
}
$user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']);
@@ -276,7 +276,7 @@ if ($mode == 'edit' && !$auth->acl_get('m_edit', $forum_id))
if ($mode == 'delete')
{
handle_post_delete($forum_id, $topic_id, $post_id, $post_data);
- exit;
+ exit_handler();
}
// Handle bump mode...
diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css
index 1d08fb22bf..5e836534a3 100644
--- a/phpBB/styles/prosilver/theme/bidi.css
+++ b/phpBB/styles/prosilver/theme/bidi.css
@@ -164,12 +164,12 @@
}
*:first-child+html dl.details dd {
- margin-right: 15em;
+ margin-right: 35%;
float: none;
}
* html dl.details dd {
- margin-right: 15em;
+ margin-right: 35%;
float: none;
}
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index 1a015ca882..a99c82bd05 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -459,7 +459,7 @@ dl.details {
dl.details dt {
float: left;
clear: left;
- width: 15em;
+ width: 30%;
text-align: right;
color: #000000;
display: block;
@@ -471,6 +471,7 @@ dl.details dd {
margin-bottom: 5px;
color: #828282;
float: left;
+ width: 65%;
}
/* Pagination
diff --git a/phpBB/styles/prosilver/theme/tweaks.css b/phpBB/styles/prosilver/theme/tweaks.css
index 20f3f67a38..704e5ad61f 100644
--- a/phpBB/styles/prosilver/theme/tweaks.css
+++ b/phpBB/styles/prosilver/theme/tweaks.css
@@ -61,12 +61,12 @@ dl.icon {
/* Correctly clear floating for details on profile view */
*:first-child+html dl.details dd {
- margin-left: 15em;
+ margin-left: 30%;
float: none;
}
* html dl.details dd {
- margin-left: 15em;
+ margin-left: 30%;
float: none;
}
diff --git a/phpBB/ucp.php b/phpBB/ucp.php
index 0df248dd2d..54e50bf2af 100755
--- a/phpBB/ucp.php
+++ b/phpBB/ucp.php
@@ -69,7 +69,7 @@ switch ($mode)
case 'confirm':
$module->load('ucp', 'confirm');
- exit;
+ exit_handler();
break;
case 'login':