basically what is listed within the changelog. ;)

git-svn-id: file:///svn/phpbb/trunk@7872 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2007-07-12 07:08:21 +00:00
parent 49cc38ebba
commit f27d0c466e
10 changed files with 49 additions and 28 deletions

View file

@ -211,6 +211,9 @@ p a {
<li>[Fix] Allow link forums being password protected (Bug #12967)</li> <li>[Fix] Allow link forums being password protected (Bug #12967)</li>
<li>[Fix] Allow wrapping topic/post icons in posting editor (Bug #12843)</li> <li>[Fix] Allow wrapping topic/post icons in posting editor (Bug #12843)</li>
<li>[Fix] Display L_RANK only once in template if rank title and image defined (Bug #13231)</li> <li>[Fix] Display L_RANK only once in template if rank title and image defined (Bug #13231)</li>
<li>[Fix] Make sure selected transfer method exists before calling (Bug #13265)</li>
<li>[Fix] Correctly escape language keys in language editor (Bug #13279)</li>
<li>[Fix] Correctly hide post/reply buttons if permissions are not given (related to Bug #12809)</li>
</ul> </ul>

View file

@ -93,6 +93,11 @@ class acp_language
$method = request_var('method', ''); $method = request_var('method', '');
if (!class_exists($method))
{
trigger_error('Method does not exist.', E_USER_ERROR);
}
$requested_data = call_user_func(array($method, 'data')); $requested_data = call_user_func(array($method, 'data'));
foreach ($requested_data as $data => $default) foreach ($requested_data as $data => $default)
{ {
@ -201,7 +206,7 @@ class acp_language
// Get target filename for storage folder // Get target filename for storage folder
$filename = $this->get_filename($row['lang_iso'], $this->language_directory, $this->language_file, true, true); $filename = $this->get_filename($row['lang_iso'], $this->language_directory, $this->language_file, true, true);
$fp = fopen($phpbb_root_path . $filename, 'wb'); $fp = @fopen($phpbb_root_path . $filename, 'wb');
if (!$fp) if (!$fp)
{ {
@ -271,7 +276,7 @@ class acp_language
header('Content-Type: application/octetstream; name="' . $this->language_file . '"'); header('Content-Type: application/octetstream; name="' . $this->language_file . '"');
header('Content-disposition: attachment; filename=' . $this->language_file); header('Content-disposition: attachment; filename=' . $this->language_file);
$fp = fopen($phpbb_root_path . $filename, 'rb'); $fp = @fopen($phpbb_root_path . $filename, 'rb');
while ($buffer = fread($fp, 1024)) while ($buffer = fread($fp, 1024))
{ {
echo $buffer; echo $buffer;
@ -329,7 +334,10 @@ class acp_language
$transfer->close_session(); $transfer->close_session();
// Remove from storage folder // Remove from storage folder
@unlink($phpbb_root_path . 'store/' . $lang_path . $file); if (file_exists($phpbb_root_path . 'store/' . $lang_path . $file))
{
@unlink($phpbb_root_path . 'store/' . $lang_path . $file);
}
add_log('admin', 'LOG_LANGUAGE_FILE_REPLACED', $file); add_log('admin', 'LOG_LANGUAGE_FILE_REPLACED', $file);
@ -406,7 +414,11 @@ class acp_language
if (isset($_POST['remove_store'])) if (isset($_POST['remove_store']))
{ {
$store_filename = $this->get_filename($lang_iso, $this->language_directory, $this->language_file, true, true); $store_filename = $this->get_filename($lang_iso, $this->language_directory, $this->language_file, true, true);
@unlink($phpbb_root_path . $store_filename);
if (file_exists($phpbb_root_path . $store_filename))
{
@unlink($phpbb_root_path . $store_filename);
}
} }
include_once($phpbb_root_path . 'includes/functions_transfer.' . $phpEx); include_once($phpbb_root_path . 'includes/functions_transfer.' . $phpEx);
@ -1323,12 +1335,12 @@ $lang = array_merge($lang, array(
if (!is_array($value)) if (!is_array($value))
{ {
$entry .= "{$tabs}'{$key}'\t=> '" . $this->prepare_lang_entry($value) . "',\n"; $entry .= "{$tabs}'" . $this->prepare_lang_entry($key) . "'\t=> '" . $this->prepare_lang_entry($value) . "',\n";
} }
else else
{ {
$_tabs = $tabs . "\t"; $_tabs = $tabs . "\t";
$entry .= "\n{$tabs}'{$key}'\t=> array(\n"; $entry .= "\n{$tabs}'" . $this->prepare_lang_entry($key) . "'\t=> array(\n";
foreach ($value as $_key => $_value) foreach ($value as $_key => $_value)
{ {

View file

@ -700,7 +700,7 @@ parse_css_file = {PARSE_CSS_FILE}
// If the template is stored on the filesystem try to write the file else store it in the database // If the template is stored on the filesystem try to write the file else store it in the database
if (!$safe_mode && !$template_info['template_storedb'] && file_exists($file) && @is_writable($file)) if (!$safe_mode && !$template_info['template_storedb'] && file_exists($file) && @is_writable($file))
{ {
if (!($fp = fopen($file, 'wb'))) if (!($fp = @fopen($file, 'wb')))
{ {
trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING); trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
} }
@ -1055,7 +1055,7 @@ parse_css_file = {PARSE_CSS_FILE}
// If the theme is stored on the filesystem try to write the file else store it in the database // If the theme is stored on the filesystem try to write the file else store it in the database
if (!$safe_mode && !$theme_info['theme_storedb'] && file_exists($file) && @is_writable($file)) if (!$safe_mode && !$theme_info['theme_storedb'] && file_exists($file) && @is_writable($file))
{ {
if (!($fp = fopen($file, 'wb'))) if (!($fp = @fopen($file, 'wb')))
{ {
trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING); trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
} }
@ -2344,7 +2344,7 @@ parse_css_file = {PARSE_CSS_FILE}
{ {
foreach ($file_ary as $file) foreach ($file_ary as $file)
{ {
if (!($fp = fopen("{$phpbb_root_path}styles/$template_path$pathfile$file", 'r'))) if (!($fp = @fopen("{$phpbb_root_path}styles/$template_path$pathfile$file", 'r')))
{ {
trigger_error("Could not open {$phpbb_root_path}styles/$template_path$pathfile$file", E_USER_ERROR); trigger_error("Could not open {$phpbb_root_path}styles/$template_path$pathfile$file", E_USER_ERROR);
} }

View file

@ -643,6 +643,11 @@ class install_update extends module
{ {
$this->page_title = 'SELECT_FTP_SETTINGS'; $this->page_title = 'SELECT_FTP_SETTINGS';
if (!class_exists($method))
{
trigger_error('Method does not exist.', E_USER_ERROR);
}
$requested_data = call_user_func(array($method, 'data')); $requested_data = call_user_func(array($method, 'data'));
foreach ($requested_data as $data => $default) foreach ($requested_data as $data => $default)
{ {

View file

@ -159,13 +159,11 @@
<!-- ENDIF --> <!-- ENDIF -->
<!-- BEGINELSE --> <!-- BEGINELSE -->
<!-- IF S_IS_POSTABLE -->
<div class="panel"> <div class="panel">
<div class="inner"><span class="corners-top"><span></span></span> <div class="inner"><span class="corners-top"><span></span></span>
<strong>{L_NO_TOPICS}</strong> <strong>{L_NO_TOPICS}</strong>
<span class="corners-bottom"><span></span></span></div> <span class="corners-bottom"><span></span></span></div>
</div> </div>
<!-- ENDIF -->
<!-- END topicrow --> <!-- END topicrow -->
<!-- IF S_SELECT_SORT_DAYS and not S_DISPLAY_ACTIVE --> <!-- IF S_SELECT_SORT_DAYS and not S_DISPLAY_ACTIVE -->

View file

@ -31,8 +31,8 @@
<div class="topic-actions"> <div class="topic-actions">
<div class="buttons"> <div class="buttons">
<!-- IF not S_IS_BOT --> <!-- IF not S_IS_BOT and U_POST_REPLY_TOPIC -->
<!-- IF U_POST_REPLY_TOPIC or S_IS_POSTABLE --><div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}"><span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></span></a></div><!-- ENDIF --> <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}"><span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></span></a></div>
<!-- ENDIF --> <!-- ENDIF -->
</div> </div>
@ -237,8 +237,8 @@
<div class="topic-actions"> <div class="topic-actions">
<div class="buttons"> <div class="buttons">
<!-- IF not S_IS_BOT --> <!-- IF not S_IS_BOT and U_POST_REPLY_TOPIC -->
<!-- IF U_POST_REPLY_TOPIC or S_IS_POSTABLE --><div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}"><span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></span></a></div><!-- ENDIF --> <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}"><span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></span></a></div>
<!-- ENDIF --> <!-- ENDIF -->
</div> </div>

View file

@ -148,7 +148,6 @@
</table> </table>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_IS_POSTABLE -->
<table class="tablebg" width="100%" cellspacing="1"> <table class="tablebg" width="100%" cellspacing="1">
<tr> <tr>
<td class="cat" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->"> <td class="cat" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->">
@ -236,18 +235,22 @@
</tr> </tr>
</table> </table>
<!-- IF S_IS_POSTABLE or TOTAL_TOPICS -->
<table width="100%" cellspacing="1"> <table width="100%" cellspacing="1">
<tr> <tr>
<td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><!-- IF not S_IS_BOT --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a><!-- ENDIF --></td> <!-- IF S_IS_POSTABLE and not S_IS_BOT -->
<td class="nav" nowrap="nowrap">&nbsp;{PAGE_NUMBER}</td> <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a></td>
<td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_TOPICS} ]</td> <!-- ENDIF -->
<td class="nav" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td> <!-- IF TOTAL_TOPICS -->
<td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
<td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_TOPICS} ]&nbsp;</td>
<td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
<!-- ENDIF -->
</tr> </tr>
</table> </table>
<br clear="all" />
<!-- ENDIF --> <!-- ENDIF -->
<br clear="all" />
</div> </div>
<!-- INCLUDE breadcrumbs.html --> <!-- INCLUDE breadcrumbs.html -->

View file

@ -31,7 +31,7 @@
<table width="100%" cellspacing="1"> <table width="100%" cellspacing="1">
<tr> <tr>
<td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap"><!-- IF not S_IS_BOT --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a>&nbsp;<a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- ENDIF --></td> <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap"><!-- IF not S_IS_BOT and U_POST_NEW_TOPIC --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a>&nbsp;<!-- ENDIF --><!-- IF not S_IS_BOT and U_POST_REPLY_TOPIC --><a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- ENDIF --></td>
<!-- IF TOTAL_POSTS --> <!-- IF TOTAL_POSTS -->
<td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td> <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
<td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_POSTS} ]&nbsp;</td> <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_POSTS} ]&nbsp;</td>
@ -294,7 +294,7 @@
<table width="100%" cellspacing="1"> <table width="100%" cellspacing="1">
<tr> <tr>
<td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap"><!-- IF not S_IS_BOT --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a>&nbsp;<a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- ENDIF --></td> <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap"><!-- IF not S_IS_BOT and U_POST_NEW_TOPIC --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a>&nbsp;<!-- ENDIF --><!-- IF not S_IS_BOT and U_POST_REPLY_TOPIC --><a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- ENDIF --></td>
<!-- IF TOTAL_POSTS --> <!-- IF TOTAL_POSTS -->
<td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td> <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
<td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_POSTS} ]&nbsp;</td> <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_POSTS} ]&nbsp;</td>

View file

@ -275,7 +275,7 @@ $template->assign_vars(array(
'L_NO_TOPICS' => ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->lang['POST_FORUM_LOCKED'] : $user->lang['NO_TOPICS'], 'L_NO_TOPICS' => ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->lang['POST_FORUM_LOCKED'] : $user->lang['NO_TOPICS'],
'S_IS_POSTABLE' => ($forum_data['forum_type'] == FORUM_POST) ? true : false, 'S_IS_POSTABLE' => ($forum_data['forum_type'] == FORUM_POST && $auth->acl_get('f_post', $forum_id)) ? true : false,
'S_DISPLAY_ACTIVE' => $s_display_active, 'S_DISPLAY_ACTIVE' => $s_display_active,
'S_SELECT_SORT_DIR' => $s_sort_dir, 'S_SELECT_SORT_DIR' => $s_sort_dir,
'S_SELECT_SORT_KEY' => $s_sort_key, 'S_SELECT_SORT_KEY' => $s_sort_key,
@ -290,7 +290,7 @@ $template->assign_vars(array(
'S_SINGLE_MODERATOR' => (!empty($moderators[$forum_id]) && sizeof($moderators[$forum_id]) > 1) ? false : true, 'S_SINGLE_MODERATOR' => (!empty($moderators[$forum_id]) && sizeof($moderators[$forum_id]) > 1) ? false : true,
'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&amp;i=main&amp;mode=forum_view", true, $user->session_id) : '', 'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&amp;i=main&amp;mode=forum_view", true, $user->session_id) : '',
'U_POST_NEW_TOPIC' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=post&amp;f=' . $forum_id), 'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=post&amp;f=' . $forum_id) : '',
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&amp;$u_sort_param&amp;start=$start"), 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&amp;$u_sort_param&amp;start=$start"),
'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&amp;mark=topics") : '', 'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&amp;mark=topics") : '',
)); ));

View file

@ -581,8 +581,8 @@ $template->assign_vars(array(
'U_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks']) ? $viewtopic_url . '&amp;bookmark=1' : '', 'U_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks']) ? $viewtopic_url . '&amp;bookmark=1' : '',
'L_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'], 'L_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'],
'U_POST_NEW_TOPIC' => append_sid("{$phpbb_root_path}posting.$phpEx", "mode=post&amp;f=$forum_id"), 'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=post&amp;f=$forum_id") : '',
'U_POST_REPLY_TOPIC' => append_sid("{$phpbb_root_path}posting.$phpEx", "mode=reply&amp;f=$forum_id&amp;t=$topic_id"), 'U_POST_REPLY_TOPIC' => ($auth->acl_get('f_reply', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=reply&amp;f=$forum_id&amp;t=$topic_id") : '',
'U_BUMP_TOPIC' => (bump_topic_allowed($forum_id, $topic_data['topic_bumped'], $topic_data['topic_last_post_time'], $topic_data['topic_poster'], $topic_data['topic_last_poster_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=bump&amp;f=$forum_id&amp;t=$topic_id") : '') 'U_BUMP_TOPIC' => (bump_topic_allowed($forum_id, $topic_data['topic_bumped'], $topic_data['topic_last_post_time'], $topic_data['topic_poster'], $topic_data['topic_last_poster_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=bump&amp;f=$forum_id&amp;t=$topic_id") : '')
); );