aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2004-07-08 22:41:04 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2004-07-08 22:41:04 +0000
commit05f1315ebb96b46ea384df73d387aeb05602d2b5 (patch)
tree97ba594f068532d15df4e64f27fa5c271b1f7f30 /phpBB/includes/ucp
parent48eeecb25893839ef9c9290d616083a6f1351b19 (diff)
downloadforums-05f1315ebb96b46ea384df73d387aeb05602d2b5.tar
forums-05f1315ebb96b46ea384df73d387aeb05602d2b5.tar.gz
forums-05f1315ebb96b46ea384df73d387aeb05602d2b5.tar.bz2
forums-05f1315ebb96b46ea384df73d387aeb05602d2b5.tar.xz
forums-05f1315ebb96b46ea384df73d387aeb05602d2b5.zip
- remove output buffering options from download.php (not needed anymore)
- optimized viewtopic.php a little bit - removed the create_function (was consuming too much memory) from viewtopic - check for manually added convert[.exe] program name to imagemagick path in admin_attachments - reduced filesize checking for imagemagick program (some installations require less than 20k) - added checked="checked" for "not selected" topic icon - moved parse_text_display function from functions_posting.php to functions.php (see comment above function) - check for user_id != ANONYMOUS in page_footer for displaying the administration link (there seems to be a problem checking for global options) - rewrote attachment thumbnail functions - utilize GD2 functions if available, more uptodate checks... - changed final thumbnail size calculation - define S_ROW_COUNT within template class itself - added SID to template vars in page_header - added ability to view topic/forum within admin_viewlogs - added optional acl checking to make_jumpbox, no need to duplicate the function for this small need - added custom body file for confirm_box git-svn-id: file:///svn/phpbb/trunk@4920 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r--phpBB/includes/ucp/ucp_attachments.php3
-rw-r--r--phpBB/includes/ucp/ucp_main.php18
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php6
4 files changed, 6 insertions, 23 deletions
diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php
index 16b3dc3d77..b4566c0976 100644
--- a/phpBB/includes/ucp/ucp_attachments.php
+++ b/phpBB/includes/ucp/ucp_attachments.php
@@ -122,12 +122,13 @@ class ucp_attachments extends module
'POST_ID' => $row['post_msg_id'],
'TOPIC_ID' => $row['topic_id'],
- 'S_ROW_COUNT' => $row_count++,
'S_IN_MESSAGE' => $row['in_message'],
'U_VIEW_ATTACHMENT' => $phpbb_root_path . 'download.' . $phpEx . $SID . '&amp;id=' . $row['attach_id'],
'U_VIEW_TOPIC' => $view_topic)
);
+
+ $row_count++;
}
while ($row = $db->sql_fetchrow($result));
}
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index b1a72f19a9..33e72eab86 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -57,7 +57,6 @@ class ucp_main extends module
$tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? unserialize(stripslashes($_COOKIE[$config['cookie_name'] . '_track'])) : array();
- $i = 0;
$topic_type = $user->lang['VIEW_TOPIC_ANNOUNCEMENT'];
$folder = 'folder_announce';
$folder_new = $folder . '_new';
@@ -137,13 +136,10 @@ class ucp_main extends module
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', '') : '',
- 'S_ROW_COUNT' => $i,
'S_USER_POSTED' => (!empty($row['mark_type'])) ? true : false,
'U_VIEW_TOPIC' => $view_topic_url)
);
-
- $i++;
}
$db->sql_freeresult($result);
@@ -328,7 +324,6 @@ class ucp_main extends module
ORDER BY left_id';
$result = $db->sql_query($sql);
- $i = 0;
while ($row = $db->sql_fetchrow($result))
{
$forum_id = $row['forum_id'];
@@ -378,9 +373,7 @@ class ucp_main extends module
'U_LAST_POST_AUTHOR'=> $last_poster_url,
'U_LAST_POST' => $last_post_url,
- 'U_VIEWFORUM' => "viewforum.$phpEx$SID&amp;f=" . $row['forum_id'],
-
- 'S_ROW_COUNT' => $i++)
+ 'U_VIEWFORUM' => "viewforum.$phpEx$SID&amp;f=" . $row['forum_id'])
);
}
$db->sql_freeresult($result);
@@ -400,7 +393,6 @@ class ucp_main extends module
ORDER BY t.topic_last_post_time DESC';
$result = $db->sql_query_limit($sql, $config['topics_per_page']);
- $i = 0;
while ($row = $db->sql_fetchrow($result))
{
$forum_id = $row['forum_id'];
@@ -515,7 +507,6 @@ class ucp_main extends module
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', '') : '',
- 'S_ROW_COUNT' => $i++,
'S_USER_POSTED' => (!empty($row['mark_type'])) ? true : false,
'U_VIEW_TOPIC' => $view_topic_url)
@@ -620,7 +611,6 @@ class ucp_main extends module
ORDER BY b.order_id ASC';
$result = $db->sql_query($sql);
- $i = 0;
while ($row = $db->sql_fetchrow($result))
{
$forum_id = $row['forum_id'];
@@ -678,9 +668,7 @@ class ucp_main extends module
'U_VIEW_TOPIC' => $view_topic_url,
'U_VIEW_FORUM' => "{$phpbb_root_path}viewforum.$phpEx$SID&amp;f={$row['forum_id']}",
'U_MOVE_UP' => ($row['order_id'] != 1) ? "{$phpbb_root_path}ucp.$phpEx$SID&amp;i=main&amp;mode=bookmarks&amp;move_up={$row['order_id']}" : '',
- 'U_MOVE_DOWN' => ($row['order_id'] != $max_order_id) ? "{$phpbb_root_path}ucp.$phpEx$SID&amp;i=main&amp;mode=bookmarks&amp;move_down={$row['order_id']}" : '',
-
- 'S_ROW_COUNT' => $i++)
+ 'U_MOVE_DOWN' => ($row['order_id'] != $max_order_id) ? "{$phpbb_root_path}ucp.$phpEx$SID&amp;i=main&amp;mode=bookmarks&amp;move_down={$row['order_id']}" : '')
);
}
@@ -839,12 +827,12 @@ class ucp_main extends module
'U_VIEW_EDIT' => "ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode&amp;edit=" . $draft['draft_id'],
'U_INSERT' => $insert_url,
- 'S_ROW_COUNT' => $row_count++,
'S_LINK_TOPIC' => $link_topic,
'S_LINK_FORUM' => $link_forum,
'S_LINK_PM' => $link_pm,
'S_HIDDEN_FIELDS' => $s_hidden_fields
);
+ $row_count++;
($edit) ? $template->assign_vars($template_row) : $template->assign_block_vars('draftrow', $template_row);
}
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index 328161baa6..8c82ca7c5d 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -118,7 +118,6 @@ function view_folder($id, $mode, $folder_id, $folder, $type)
unset($recipient_list, $address);
}
- $i = 0;
$url = "{$phpbb_root_path}ucp.$phpEx$SID&amp;i=$id";
foreach ($folder_info['pm_list'] as $message_id)
@@ -160,7 +159,6 @@ function view_folder($id, $mode, $folder_id, $folder, $type)
'PM_IMG' => ($row_indicator) ? $user->img('pm_' . $row_indicator, '') : '',
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $row['message_attachment'] && $config['pm_attachments'] && $config['auth_download_pm']) ? $user->img('icon_attach', sprintf($user->lang['TOTAL_ATTACHMENTS'], $row['message_attachment'])) : '',
- 'S_ROW_COUNT' => $i,
'S_PM_REPORTED' => (!empty($row['message_reported']) && $auth->acl_get('m_')) ? true : false,
'U_VIEW_PM' => $view_message_url,
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index bb9cda5804..f753f6433b 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -286,7 +286,6 @@ function message_history($msg_id, $user_id, $message_row, $folder)
$title = censor_text($title);
- $i = 1;
$url = "{$phpbb_root_path}ucp.$phpEx$SID&amp;i=pm";
$next_history_pm = $previous_history_pm = $prev_id = 0;
@@ -329,13 +328,10 @@ function message_history($msg_id, $user_id, $message_row, $folder)
'U_VIEW_MESSAGE'=> "$url&amp;f=$folder_id&amp;p=" . $row['msg_id'],
'U_AUTHOR_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&amp;mode=viewprofile&amp;u=$author_id",
'U_QUOTE' => ($config['auth_quote_pm'] && $auth->acl_get('u_sendpm') && $author_id != $user->data['user_id']) ? "$url&amp;mode=compose&amp;action=quote&amp;f=" . $folder_id . "&amp;p=" . $row['msg_id'] : '',
- 'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $auth->acl_get('u_sendpm')) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;p=" . $row['msg_id'] : '',
-
- 'S_ROW_COUNT' => $i)
+ 'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $auth->acl_get('u_sendpm')) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;p=" . $row['msg_id'] : '')
);
unset($rowset[$id]);
$prev_id = $id;
- $i++;
}
$template->assign_vars(array(