Merging revisions #r8352, #r8353, #r8354 and #r8355

git-svn-id: file:///svn/phpbb/trunk@8356 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2008-01-30 21:48:49 +00:00
parent 4b5fab372f
commit 48ed77f046
4 changed files with 190 additions and 172 deletions

View file

@ -108,11 +108,14 @@
<li>[Fix] Fix possible database transaction errors if code returns on error and rollback happened (Bug #17025)</li>
<li>[Change] Allow numbers in permission names for modifications, as well as uppercase letters for the request_ part (Bug #20125)</li>
<li>[Fix] Use HTTP_HOST in favor of SERVER_NAME for determining server url for redirection and installation (Bug #19955)</li>
<li>Removing s_watching_img from watch_topic_forum() function (Bug #20445)</li>
<li>Changing order for post review if more than one post affected (Bug #15249)</li>
<li>Language typos/fixes (Bug #20425, #15719, #15429, #14669, #13479)</li>
<li>Style/Template fixes (Bug #20065, #19405, #19205, #15028, #14934, #14821, #14752, #14497, #13707, #14738)</li>
<li>Tiny code fixes (Bug #20165, #20025, #19795, #14804)</li>
<li>[Fix] Removing s_watching_img from watch_topic_forum() function (Bug #20445)</li>
<li>[Fix] Changing order for post review if more than one post affected (Bug #15249)</li>
<li>[Fix] Language typos/fixes (Bug #20425, #15719, #15429, #14669, #13479)</li>
<li>[Fix] Style/Template fixes (Bug #20065, #19405, #19205, #15028, #14934, #14821, #14752, #14497, #13707, #14738)</li>
<li>[Fix] Tiny code fixes (Bug #20165, #20025, #19795, #14804)</li>
<li>[Fix] Prepend phpbb_root_path to ranks path for displaying ranks (Bug #19075)</li>
<li>[Fix] Allow forum notifications if topic notifications are disabled but forum notifications enabled (Bug #14765)</li>
<li>[Fix] Fixing realpath issues for provider returning the passed value instead of disabling it. This fixes issues with confirm boxes for those hosted on Network Solutions for example. (Bug #20435)</li>
</ul>
<a name="v30rc8"></a><h3>1.i. Changes since 3.0.RC8</h3>

View file

@ -422,27 +422,25 @@ function _hash_crypt_private($password, $setting, &$itoa64)
return $output;
}
if (!function_exists('realpath'))
/**
* Checks if a path ($path) is absolute or relative
*
* @param string $path Path to check absoluteness of
* @return boolean
*/
function is_absolute($path)
{
/**
* Checks if a path ($path) is absolute or relative
*
* @param string $path Path to check absoluteness of
* @return boolean
*/
function is_absolute($path)
{
return ($path[0] == '/' || (DIRECTORY_SEPARATOR == '\\' && preg_match('#^[a-z]:/#i', $path))) ? true : false;
}
}
/**
* @author Chris Smith <chris@project-minerva.org>
* @copyright 2006 Project Minerva Team
* @param string $path The path which we should attempt to resolve.
* @return mixed
*/
function phpbb_realpath($path)
{
/**
* @author Chris Smith <chris@project-minerva.org>
* @copyright 2006 Project Minerva Team
* @param string $path The path which we should attempt to resolve.
* @return mixed
*/
function phpbb_own_realpath($path)
{
// Now to perform funky shizzle
// Switch to use UNIX slashes
@ -590,9 +588,9 @@ if (!function_exists('realpath'))
}
return $resolved; // We got here, in the end!
}
}
else
if (!function_exists('realpath'))
{
/**
* A wrapper for realpath
@ -600,15 +598,32 @@ else
*/
function phpbb_realpath($path)
{
$path = realpath($path);
// Check for DIRECTORY_SEPARATOR at the end (and remove it!)
if (substr($path, -1) == DIRECTORY_SEPARATOR)
return phpbb_own_realpath($path);
}
}
else
{
/**
* A wrapper for realpath
*/
function phpbb_realpath($path)
{
return substr($path, 0, -1);
$realpath = realpath($path);
// Strangely there are provider not disabling realpath but returning strange values. :o
// We at least try to cope with them.
if ($realpath === $path || $realpath === false)
{
return phpbb_own_realpath($path);
}
return $path;
// Check for DIRECTORY_SEPARATOR at the end (and remove it!)
if (substr($realpath, -1) == DIRECTORY_SEPARATOR)
{
$realpath = substr($realpath, 0, -1);
}
return $realpath;
}
}

View file

@ -1102,7 +1102,7 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
*/
function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)
{
global $ranks, $config;
global $ranks, $config, $phpbb_root_path;
if (empty($ranks))
{
@ -1113,8 +1113,8 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank
if (!empty($user_rank))
{
$rank_title = (isset($ranks['special'][$user_rank]['rank_title'])) ? $ranks['special'][$user_rank]['rank_title'] : '';
$rank_img = (!empty($ranks['special'][$user_rank]['rank_image'])) ? '<img src="' . $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image'] . '" alt="' . $ranks['special'][$user_rank]['rank_title'] . '" title="' . $ranks['special'][$user_rank]['rank_title'] . '" />' : '';
$rank_img_src = (!empty($ranks['special'][$user_rank]['rank_image'])) ? $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image'] : '';
$rank_img = (!empty($ranks['special'][$user_rank]['rank_image'])) ? '<img src="' . $phpbb_root_path . $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image'] . '" alt="' . $ranks['special'][$user_rank]['rank_title'] . '" title="' . $ranks['special'][$user_rank]['rank_title'] . '" />' : '';
$rank_img_src = (!empty($ranks['special'][$user_rank]['rank_image'])) ? $phpbb_root_path . $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image'] : '';
}
else
{
@ -1125,8 +1125,8 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank
if ($user_posts >= $rank['rank_min'])
{
$rank_title = $rank['rank_title'];
$rank_img = (!empty($rank['rank_image'])) ? '<img src="' . $config['ranks_path'] . '/' . $rank['rank_image'] . '" alt="' . $rank['rank_title'] . '" title="' . $rank['rank_title'] . '" />' : '';
$rank_img_src = (!empty($rank['rank_image'])) ? $config['ranks_path'] . '/' . $rank['rank_image'] : '';
$rank_img = (!empty($rank['rank_image'])) ? '<img src="' . $phpbb_root_path . $config['ranks_path'] . '/' . $rank['rank_image'] . '" alt="' . $rank['rank_title'] . '" title="' . $rank['rank_title'] . '" />' : '';
$rank_img_src = (!empty($rank['rank_image'])) ? $phpbb_root_path . $config['ranks_path'] . '/' . $rank['rank_image'] : '';
break;
}
}

View file

@ -939,7 +939,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
WHERE p.topic_id = $topic_id
" . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND p.post_approved = 1' : '') . '
' . (($mode == 'post_review') ? " AND p.post_id > $cur_post_id" : '') . '
ORDER BY p.post_time';
ORDER BY p.post_time ';
$sql .= ($mode == 'post_review') ? 'ASC' : 'DESC';
$result = $db->sql_query_limit($sql, $config['posts_per_page']);
@ -1111,7 +1111,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
trigger_error('WRONG_NOTIFICATION_MODE');
}
if (!$config['allow_topic_notify'])
if (($topic_notification && !$config['allow_topic_notify']) || ($forum_notification && !$config['allow_forum_notify']))
{
return;
}