diff options
38 files changed, 359 insertions, 419 deletions
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index 8066d90eca..7d2b2c60b1 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -306,7 +306,7 @@ </tr> <!-- ENDIF --> <tr> - <td><b>{extensions.EXTENSION}</b></td> + <td><strong>{extensions.EXTENSION}</strong></td> <td>{extensions.GROUP_OPTIONS}</td> <td><input type="checkbox" class="radio" name="extension_id_list[]" value="{extensions.EXTENSION_ID}" /><input type="hidden" name="extension_change_list[]" value="{extensions.EXTENSION_ID}" /></td> </tr> @@ -346,7 +346,7 @@ <td><a href="{orphan.U_FILE}">{orphan.REAL_FILENAME}</a></td> <td>{orphan.FILETIME}</td> <td>{orphan.FILESIZE}</td> - <td><b>ID: </b><input type="text" name="post_id[{orphan.ATTACH_ID}]" size="7" maxlength="10" value="{orphan.POST_ID}" /></td> + <td><strong>{L_ATTACH_ID}: </strong><input type="text" name="post_id[{orphan.ATTACH_ID}]" size="7" maxlength="10" value="{orphan.POST_ID}" /></td> <td><input type="checkbox" class="radio" name="add[{orphan.ATTACH_ID}]" /></td> <td><input type="checkbox" class="radio" name="delete[{orphan.ATTACH_ID}]" /></td> </tr> diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index b5b2dcabcb..6cc703a5a7 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -335,7 +335,7 @@ <legend>{L_FORUM_DELETE}</legend> <dl> <dt><label>{L_FORUM_NAME}:</label></dt> - <dd><b>{FORUM_NAME}</b></dd> + <dd><strong>{FORUM_NAME}</strong></dd> </dl> <!-- IF S_FORUM_POST --> <dl> @@ -434,7 +434,7 @@ <!-- IF forums.FORUM_IMAGE --><div style="float: left; margin-right: 5px;">{forums.FORUM_IMAGE}</div><!-- ENDIF --> <strong><!-- IF forums.S_FORUM_LINK -->{forums.FORUM_NAME}<!-- ELSE --><a href="{forums.U_FORUM}">{forums.FORUM_NAME}</a><!-- ENDIF --></strong> <!-- IF forums.FORUM_DESCRIPTION --><br /><span>{forums.FORUM_DESCRIPTION}</span><!-- ENDIF --> - <!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}: <b>{forums.FORUM_TOPICS}</b> / {L_POSTS}: <b>{forums.FORUM_POSTS}</b></span><!-- ENDIF --> + <!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}: <strong>{forums.FORUM_TOPICS}</strong> / {L_POSTS}: <b>{forums.FORUM_POSTS}</b></span><!-- ENDIF --> </td> <td style="vertical-align: top; width: 100px; text-align: right; white-space: nowrap;"> <!-- IF forums.S_FIRST_ROW && not forums.S_LAST_ROW --> diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html index 3e98e5de4c..3bdeaeaad0 100644 --- a/phpBB/adm/style/acp_groups.html +++ b/phpBB/adm/style/acp_groups.html @@ -23,7 +23,7 @@ <legend>{L_GROUP_DETAILS}</legend> <dl> <dt><label<!-- IF not S_SPECIAL_GROUP --> for="group_name"<!-- ENDIF -->>{L_GROUP_NAME}:</label></dt> - <dd><!-- IF S_SPECIAL_GROUP --><b>{GROUP_NAME}</b><!-- ENDIF --><input name="group_name" type="<!-- IF S_SPECIAL_GROUP -->hidden<!-- ELSE -->text<!-- ENDIF -->" id="group_name" value="{GROUP_INTERNAL_NAME}" /></dd> + <dd><!-- IF S_SPECIAL_GROUP --><strong>{GROUP_NAME}</strong><!-- ENDIF --><input name="group_name" type="<!-- IF S_SPECIAL_GROUP -->hidden<!-- ELSE -->text<!-- ENDIF -->" id="group_name" value="{GROUP_INTERNAL_NAME}" /></dd> </dl> <dl> <dt><label for="group_desc">{L_GROUP_DESC}:</label></dt> @@ -184,7 +184,7 @@ </thead> <tbody> <tr> - <td class="row3" colspan="5"><b>{L_GROUP_LEAD}</b></td> + <td class="row3" colspan="5"><strong>{L_GROUP_LEAD}</strong></td> </tr> <!-- BEGIN leader --> <!-- IF leader.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> @@ -200,12 +200,12 @@ </tr> <!-- END leader --> <tr> - <td class="row3" colspan="5"><b>{L_GROUP_APPROVED}</b></td> + <td class="row3" colspan="5"><strong>{L_GROUP_APPROVED}</strong></td> </tr> <!-- BEGIN member --> <!-- IF member.S_PENDING --> <tr> - <td class="row3" colspan="5"><b>{L_GROUP_PENDING}</b></td> + <td class="row3" colspan="5"><strong>{L_GROUP_PENDING}</strong></td> </tr> <!-- ELSE --> <!-- IF member.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> diff --git a/phpBB/adm/style/acp_jabber.html b/phpBB/adm/style/acp_jabber.html index 1f14b7044b..03992364dd 100644 --- a/phpBB/adm/style/acp_jabber.html +++ b/phpBB/adm/style/acp_jabber.html @@ -47,11 +47,11 @@ <dd><input type="text" id="jab_package_size" name="jab_package_size" value="{JAB_PACKAGE_SIZE}" maxlength="5" size="5" /></dd> </dl> -<p class="submit-buttons"> +</fieldset> + +<fieldset class="submit-buttons"> <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> -</p> - </fieldset> </form> diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html index 6b96a3e418..696d384ff8 100644 --- a/phpBB/adm/style/acp_main.html +++ b/phpBB/adm/style/acp_main.html @@ -35,54 +35,54 @@ <tbody> <tr> <td>{L_NUMBER_POSTS}: </td> - <td><b>{TOTAL_POSTS}</b></td> + <td><strong>{TOTAL_POSTS}</strong></td> <td>{L_POSTS_PER_DAY}: </td> - <td><b>{POSTS_PER_DAY}</b></td> + <td><strong>{POSTS_PER_DAY}</strong></td> </tr> <tr> <td>{L_NUMBER_TOPICS}: </td> - <td><b>{TOTAL_TOPICS}</b></td> + <td><strong>{TOTAL_TOPICS}</strong></td> <td>{L_TOPICS_PER_DAY}: </td> - <td><b>{TOPICS_PER_DAY}</b></td> + <td><strong>{TOPICS_PER_DAY}</strong></td> </tr> <tr> <td>{L_NUMBER_USERS}: </td> - <td><b>{TOTAL_USERS}</b></td> + <td><strong>{TOTAL_USERS}</strong></td> <td>{L_USERS_PER_DAY}: </td> - <td><b>{USERS_PER_DAY}</b></td> + <td><strong>{USERS_PER_DAY}</strong></td> </tr> <tr> <td>{L_NUMBER_FILES}: </td> - <td><b>{TOTAL_FILES}</b></td> + <td><strong>{TOTAL_FILES}</strong></td> <td>{L_FILES_PER_DAY}: </td> - <td><b>{FILES_PER_DAY}</b></td> + <td><strong>{FILES_PER_DAY}</strong></td> </tr> <tr> <td>{L_BOARD_STARTED}: </td> - <td><b>{START_DATE}</b></td> + <td><strong>{START_DATE}</strong></td> <td>{L_AVATAR_DIR_SIZE}: </td> - <td><b>{AVATAR_DIR_SIZE}</b></td> + <td><strong>{AVATAR_DIR_SIZE}</strong></td> </tr> <tr> <td>{L_DATABASE_SIZE}: </td> - <td><b>{DBSIZE}</b></td> + <td><strong>{DBSIZE}</strong></td> <td>{L_UPLOAD_DIR_SIZE}: </td> - <td><b>{UPLOAD_DIR_SIZE}</b></td> + <td><strong>{UPLOAD_DIR_SIZE}</strong></td> </tr> <tr> <td>{L_DATABASE_SERVER_INFO}: </td> - <td><b>{DATABASE_INFO}</b></td> + <td><strong>{DATABASE_INFO}</strong></td> <td>{L_GZIP_COMPRESSION}: </td> - <td><b>{GZIP_COMPRESSION}</b></td> + <td><strong>{GZIP_COMPRESSION}</strong></td> </tr> <!-- IF S_TOTAL_ORPHAN --> <tr> <td> </td> <td> </td> <td>{L_NUMBER_ORPHAN}: </td> - <td><b>{TOTAL_ORPHAN}</b></td> + <td><strong>{TOTAL_ORPHAN}</strong></td> </tr> <!-- ENDIF --> </tbody> diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html index d70533bd94..1d2fd77762 100644 --- a/phpBB/adm/style/acp_permission_roles.html +++ b/phpBB/adm/style/acp_permission_roles.html @@ -154,7 +154,7 @@ <tbody> <!-- BEGIN roles --> <tr> - <td style="vertical-align: top;"><b>{roles.ROLE_NAME}</b> + <td style="vertical-align: top;"><strong>{roles.ROLE_NAME}</strong> <!-- IF roles.ROLE_DESCRIPTION --><br /><span>{roles.ROLE_DESCRIPTION}</span><!-- ENDIF --> </td> <td style="width: 30%; text-align: center; vertical-align: top; white-space: nowrap;"><!-- IF roles.U_DISPLAY_ITEMS --><a href="{roles.U_DISPLAY_ITEMS}">{L_VIEW_ASSIGNED_ITEMS}</a><!-- ELSE -->{L_VIEW_ASSIGNED_ITEMS}<!-- ENDIF --></td> diff --git a/phpBB/adm/style/acp_permissions.html b/phpBB/adm/style/acp_permissions.html index 9097bf1e61..862ba6e8d2 100644 --- a/phpBB/adm/style/acp_permissions.html +++ b/phpBB/adm/style/acp_permissions.html @@ -290,7 +290,7 @@ <p>{L_ACL_VIEW_EXPLAIN}</p> <fieldset class="quick"> - <b>» {L_PERMISSION_TYPE}</b> + <strong>» {L_PERMISSION_TYPE}</strong> </fieldset> <!-- INCLUDE permission_mask.html --> @@ -306,7 +306,7 @@ <br /> <fieldset class="quick" style="float: right;"> - <b>» {L_PERMISSION_TYPE}</b> + <strong>» {L_PERMISSION_TYPE}</strong> </fieldset> <!-- IF S_PERMISSION_DROPDOWN --> diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html index 76c5516622..5c3d0077b6 100644 --- a/phpBB/adm/style/acp_profile.html +++ b/phpBB/adm/style/acp_profile.html @@ -25,7 +25,7 @@ <legend>{L_TITLE}</legend> <dl> <dt><label>{L_FIELD_TYPE}:</label><br /><span>{L_FIELD_TYPE_EXPLAIN}</span></dt> - <dd><b>{FIELD_TYPE}</b></dd> + <dd><strong>{FIELD_TYPE}</strong></dd> </dl> <!-- IF S_EDIT_MODE --> <dl> diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index 11da8d2d5a..37a878c240 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -16,7 +16,7 @@ <legend>{L_TITLE}</legend> <dl> <dt><label>{L_NAME}:</label></dt> - <dd><b>{NAME}</b></dd> + <dd><strong>{NAME}</strong></dd> </dl> <dl> <dt><label for="new_id">{L_REPLACE}:</label><br /><span>{L_REPLACE_EXPLAIN}</span></dt> @@ -149,7 +149,7 @@ <p>{L_EDIT_TEMPLATE_EXPLAIN}</p> - <p>{L_SELECTED_TEMPLATE}: <b>{SELECTED_TEMPLATE}</b></p> + <p>{L_SELECTED_TEMPLATE}: <strong>{SELECTED_TEMPLATE}</strong></p> <form id="acp_styles" method="post" action="{U_ACTION}"> @@ -467,7 +467,7 @@ <legend>{L_TITLE}</legend> <dl> <dt><label>{L_NAME}:</label></dt> - <dd><b>{NAME}</b></dd> + <dd><strong>{NAME}</strong></dd> </dl> <!-- IF S_STYLE --> <dl> @@ -523,7 +523,7 @@ </thead> <tbody> <tr> - <td class="row3" colspan="{$COLSPAN}"><b>{L_INSTALLED}</b></td> + <td class="row3" colspan="{$COLSPAN}"><strong>{L_INSTALLED}</strong></td> </tr> <!-- BEGIN installed --> <tr> @@ -545,7 +545,7 @@ </td> <!-- END installed --> <tr> - <td class="row3" colspan="{$COLSPAN}"><b>{L_UNINSTALLED}</b></td> + <td class="row3" colspan="{$COLSPAN}"><strong>{L_UNINSTALLED}</strong></td> </tr> <!-- IF not .uninstalled --> <tr> @@ -554,7 +554,7 @@ <!-- ENDIF --> <!-- BEGIN uninstalled --> <tr> - <td<!-- IF S_STYLE --> colspan="2"<!-- ENDIF -->><b>{uninstalled.NAME}</b><br /><span>{L_COPYRIGHT}: {uninstalled.COPYRIGHT}</span></td> + <td<!-- IF S_STYLE --> colspan="2"<!-- ENDIF -->><strong>{uninstalled.NAME}</strong><br /><span>{L_COPYRIGHT}: {uninstalled.COPYRIGHT}</span></td> <td style="text-align: center;" colspan="2"><a href="{uninstalled.U_INSTALL}">{L_INSTALL}</a></td> </tr> <!-- END uninstalled --> diff --git a/phpBB/adm/style/acp_update.html b/phpBB/adm/style/acp_update.html index 06672f39ae..eb4dbbdef4 100644 --- a/phpBB/adm/style/acp_update.html +++ b/phpBB/adm/style/acp_update.html @@ -22,11 +22,11 @@ <legend></legend> <dl> <dt><label>{L_CURRENT_VERSION}</label></dt> - <dd><b>{CURRENT_VERSION}</b></dd> + <dd><strong>{CURRENT_VERSION}</strong></dd> </dl> <dl> <dt><label>{L_LATEST_VERSION}</label></dt> - <dd><b>{LATEST_VERSION}</b></dd> + <dd><strong>{LATEST_VERSION}</strong></dd> </dl> </fieldset> diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index 958becd809..eda5a416f4 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -173,7 +173,7 @@ <tbody> <!-- BEGIN attach --> <!-- IF attach.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> - <td><a href="{attach.U_DOWNLOAD}">{attach.REAL_FILENAME}</a><br /><span class="small"><!-- IF attach.S_IN_MESSAGE --><b>{L_PM}: </b><!-- ELSE --><b>{L_TOPIC}: </b><!-- ENDIF --><a href="{attach.U_VIEW_TOPIC}">{attach.TOPIC_TITLE}</a></span></td> + <td><a href="{attach.U_DOWNLOAD}">{attach.REAL_FILENAME}</a><br /><span class="small"><!-- IF attach.S_IN_MESSAGE --><strong>{L_PM}: </strong><!-- ELSE --><strong>{L_TOPIC}: </strong><!-- ENDIF --><a href="{attach.U_VIEW_TOPIC}">{attach.TOPIC_TITLE}</a></span></td> <td style="text-align: center">{attach.POST_TIME}</td> <td style="text-align: center">{attach.SIZE}</td> <td style="text-align: center">{attach.DOWNLOAD_COUNT}</td> diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html index 30f797cc8c..58f839f548 100644 --- a/phpBB/adm/style/install_update.html +++ b/phpBB/adm/style/install_update.html @@ -62,11 +62,11 @@ <legend></legend> <dl> <dt><label>{L_CURRENT_VERSION}</label></dt> - <dd><b>{CURRENT_VERSION}</b></dd> + <dd><strong>{CURRENT_VERSION}</strong></dd> </dl> <dl> <dt><label>{L_LATEST_VERSION}</label></dt> - <dd><b>{LATEST_VERSION}</b></dd> + <dd><strong>{LATEST_VERSION}</strong></dd> </dl> </fieldset> @@ -312,7 +312,7 @@ <legend>{L_FTP_SETTINGS}</legend> <dl> <dt><label>{L_UPLOAD_METHOD}:</label></dt> - <dd><b>{UPLOAD_METHOD}</b></dd> + <dd><strong>{UPLOAD_METHOD}</strong></dd> </dl> <!-- BEGIN data --> <dl> diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index 42b921d228..d3efdc45f2 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -921,12 +921,8 @@ function get_schema_struct() 'COLUMNS' => array( 'topic_id' => array('UINT', 0), 'user_id' => array('UINT', 0), - 'order_id' => array('UINT', 0), - ), - 'KEYS' => array( - 'order_id' => array('INDEX', 'order_id'), - 'topic_user_id' => array('INDEX', array('topic_id', 'user_id')), ), + 'PRIMARY_KEY' => array('topic_id', 'user_id'), ); $schema_data['phpbb_bots'] = array( diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php index dd67cdda87..8f4b702d72 100644 --- a/phpBB/includes/acp/acp_modules.php +++ b/phpBB/includes/acp/acp_modules.php @@ -154,7 +154,7 @@ class acp_modules if ($move_module_name !== false) { - add_log('admin', 'LOG_MODULE_' . strtoupper($action), $move_module_name); + add_log('admin', 'LOG_MODULE_' . strtoupper($action), $this->lang_name($row['module_langname']), $move_module_name); $this->remove_cache_file(); } diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 78a9983b0f..41023816af 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1455,6 +1455,8 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add } $on_page = floor($start_item / $per_page) + 1; + $url_delim = (strpos($base_url, '?') === false) ? '?' : '&'; + $page_string = ($on_page == 1) ? '<strong>1</strong>' : '<a href="' . $base_url . '">1</a>'; if ($total_pages > 5) @@ -1466,7 +1468,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add for ($i = $start_cnt + 1; $i < $end_cnt; $i++) { - $page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href="' . $base_url . "&start=" . (($i - 1) * $per_page) . '">' . $i . '</a>'; + $page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href="' . $base_url . "{$url_delim}start=" . (($i - 1) * $per_page) . '">' . $i . '</a>'; if ($i < $end_cnt - 1) { $page_string .= $seperator; @@ -1481,7 +1483,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add for ($i = 2; $i < $total_pages; $i++) { - $page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href="' . $base_url . "&start=" . (($i - 1) * $per_page) . '">' . $i . '</a>'; + $page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href="' . $base_url . "{$url_delim}start=" . (($i - 1) * $per_page) . '">' . $i . '</a>'; if ($i < $total_pages) { $page_string .= $seperator; @@ -1489,18 +1491,18 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add } } - $page_string .= ($on_page == $total_pages) ? '<strong>' . $total_pages . '</strong>' : '<a href="' . $base_url . '&start=' . (($total_pages - 1) * $per_page) . '">' . $total_pages . '</a>'; + $page_string .= ($on_page == $total_pages) ? '<strong>' . $total_pages . '</strong>' : '<a href="' . $base_url . "{$url_delim}start=" . (($total_pages - 1) * $per_page) . '">' . $total_pages . '</a>'; if ($add_prevnext_text) { if ($on_page != 1) { - $page_string = '<a href="' . $base_url . '&start=' . (($on_page - 2) * $per_page) . '">' . $user->lang['PREVIOUS'] . '</a> ' . $page_string; + $page_string = '<a href="' . $base_url . "{$url_delim}start=" . (($on_page - 2) * $per_page) . '">' . $user->lang['PREVIOUS'] . '</a> ' . $page_string; } if ($on_page != $total_pages) { - $page_string .= ' <a href="' . $base_url . '&start=' . ($on_page * $per_page) . '">' . $user->lang['NEXT'] . '</a>'; + $page_string .= ' <a href="' . $base_url . "{$url_delim}start=" . ($on_page * $per_page) . '">' . $user->lang['NEXT'] . '</a>'; } } @@ -1508,8 +1510,8 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add $tpl_prefix . 'BASE_URL' => $base_url, $tpl_prefix . 'PER_PAGE' => $per_page, - $tpl_prefix . 'PREVIOUS_PAGE' => ($on_page == 1) ? '' : $base_url . '&start=' . (($on_page - 2) * $per_page), - $tpl_prefix . 'NEXT_PAGE' => ($on_page == $total_pages) ? '' : $base_url . '&start=' . ($on_page * $per_page), + $tpl_prefix . 'PREVIOUS_PAGE' => ($on_page == 1) ? '' : $base_url . "{$url_delim}start=" . (($on_page - 2) * $per_page), + $tpl_prefix . 'NEXT_PAGE' => ($on_page == $total_pages) ? '' : $base_url . "{$url_delim}start=" . ($on_page * $per_page), $tpl_prefix . 'TOTAL_PAGES' => $total_pages) ); diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 8e84e1a2db..f827187956 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -330,150 +330,7 @@ class ucp_main // Subscribed Topics if ($config['allow_topic_notify']) { - $start = request_var('start', 0); - - $sql = 'SELECT COUNT(topic_id) as topics_count - FROM ' . TOPICS_WATCH_TABLE . ' - WHERE user_id = ' . $user->data['user_id']; - $result = $db->sql_query($sql); - $topics_count = (int) $db->sql_fetchfield('topics_count'); - $db->sql_freeresult($result); - - if ($topics_count) - { - $template->assign_vars(array( - 'PAGINATION' => generate_pagination($this->u_action, $topics_count, $config['topics_per_page'], $start), - 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start), - 'TOTAL_TOPICS' => ($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count)) - ); - } - - $sql_array = array( - 'SELECT' => 't.*', - - 'FROM' => array( - TOPICS_WATCH_TABLE => 'tw', - TOPICS_TABLE => 't' - ), - - 'WHERE' => 'tw.user_id = ' . $user->data['user_id'] . ' - AND t.topic_id = tw.topic_id', - - 'ORDER_BY' => 't.topic_last_post_time DESC' - ); - - if ($config['load_db_lastread']) - { - $sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.forum_id = t.forum_id AND ft.user_id = ' . $user->data['user_id']); - $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_TRACK_TABLE => 'tt'), 'ON' => 'tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id']); - $sql_array['SELECT'] .= ', tt.mark_time, ft.mark_time AS forum_mark_time'; - } - - if ($config['load_db_track']) - { - $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_POSTED_TABLE => 'tp'), 'ON' => 'tp.topic_id = t.topic_id AND tp.user_id = ' . $user->data['user_id']); - $sql_array['SELECT'] .= ', tp.topic_posted'; - } - - $sql = $db->sql_build_query('SELECT', $sql_array); - $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); - - $topic_list = $topic_forum_list = $global_announce_list = $rowset = array(); - while ($row = $db->sql_fetchrow($result)) - { - $topic_list[] = $row['topic_id']; - $rowset[$row['topic_id']] = $row; - - $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread']) ? $row['forum_mark_time'] : 0; - $topic_forum_list[$row['forum_id']]['topics'][] = $row['topic_id']; - - if ($row['topic_type'] == POST_GLOBAL) - { - $global_announce_list[] = $row['topic_id']; - } - } - $db->sql_freeresult($result); - - $topic_tracking_info = array(); - if ($config['load_db_lastread']) - { - foreach ($topic_forum_list as $f_id => $topic_row) - { - $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']), ($f_id == 0) ? $global_announce_list : false); - } - } - else - { - foreach ($topic_forum_list as $f_id => $topic_row) - { - $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics'], $global_announce_list); - } - } - - foreach ($topic_list as $topic_id) - { - $row = &$rowset[$topic_id]; - - $forum_id = $row['forum_id']; - $topic_id = $row['topic_id']; - - $unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false; - - // Replies - $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies']; - - if ($row['topic_status'] == ITEM_MOVED) - { - $topic_id = $row['topic_moved_id']; - } - - // Get folder img, topic status/type related information - $folder_img = $folder_alt = $topic_type = ''; - topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type); - - $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id"); - - // Send vars to template - $template->assign_block_vars('topicrow', array( - 'FORUM_ID' => $forum_id, - 'TOPIC_ID' => $topic_id, - 'FIRST_POST_TIME' => $user->format_date($row['topic_time']), - 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'], - 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), - 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']), - - 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - - 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - - 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id")), - 'REPLIES' => $replies, - 'VIEWS' => $row['topic_views'], - 'TOPIC_TITLE' => censor_text($row['topic_title']), - 'TOPIC_TYPE' => $topic_type, - - 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), - 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), - 'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '', - 'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '', - 'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '', - 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '', - - 'S_TOPIC_TYPE' => $row['topic_type'], - 'S_USER_POSTED' => (!empty($row['topic_posted'])) ? true : false, - 'S_UNREAD_TOPIC' => $unread_topic, - - 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread', - 'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'], - 'U_VIEW_TOPIC' => $view_topic_url, - )); - } + $this->assign_topiclist('subscribed'); } $template->assign_vars(array( @@ -497,31 +354,6 @@ class ucp_main $user->add_lang('viewforum'); - $move_up = request_var('move_up', 0); - $move_down = request_var('move_down', 0); - - $sql = 'SELECT MAX(order_id) as max_order_id - FROM ' . BOOKMARKS_TABLE . ' - WHERE user_id = ' . $user->data['user_id']; - $result = $db->sql_query($sql); - $max_order_id = (int) $db->sql_fetchfield('max_order_id'); - $db->sql_freeresult($result); - - if ($move_up || $move_down) - { - if (($move_up && $move_up != 1) || ($move_down && $move_down != $max_order_id)) - { - $order = ($move_up) ? $move_up : $move_down; - $order_total = $order * 2 + (($move_up) ? -1 : 1); - - $sql = 'UPDATE ' . BOOKMARKS_TABLE . " - SET order_id = $order_total - order_id - WHERE order_id IN ($order, " . (($move_up) ? $order - 1 : $order + 1) . ') - AND user_id = ' . $user->data['user_id']; - $db->sql_query($sql); - } - } - if (isset($_POST['unbookmark'])) { $s_hidden_fields = array('unbookmark' => 1); @@ -545,25 +377,6 @@ class ucp_main AND ' . $db->sql_in_set('topic_id', $topics); $db->sql_query($sql); - // Re-Order bookmarks (possible with one query? This query massaker is not really acceptable...) - $sql = 'SELECT topic_id FROM ' . BOOKMARKS_TABLE . ' - WHERE user_id = ' . $user->data['user_id'] . ' - ORDER BY order_id ASC'; - $result = $db->sql_query($sql); - - $i = 1; - while ($row = $db->sql_fetchrow($result)) - { - $sql = 'UPDATE ' . BOOKMARKS_TABLE . " - SET order_id = $i - WHERE topic_id = {$row['topic_id']} - AND user_id = {$user->data['user_id']}"; - $db->sql_query($sql); - - $i++; - } - $db->sql_freeresult($result); - meta_refresh(3, $url); $message = $user->lang['BOOKMARKS_REMOVED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $url . '">', '</a>'); trigger_error($message); @@ -574,68 +387,7 @@ class ucp_main } } - // We grab deleted topics here too... - // NOTE: At the moment bookmarks are not removed with topics, might be useful later (not really sure how though. :D) - // But since bookmarks are sensible to the user, they should not be deleted without notice. - $sql = 'SELECT b.order_id, b.topic_id as b_topic_id, t.*, f.forum_name - FROM ' . BOOKMARKS_TABLE . ' b - LEFT JOIN ' . TOPICS_TABLE . ' t ON (b.topic_id = t.topic_id) - LEFT JOIN ' . FORUMS_TABLE . ' f ON (t.forum_id = f.forum_id) - WHERE b.user_id = ' . $user->data['user_id'] . ' - ORDER BY b.order_id ASC'; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $forum_id = $row['forum_id']; - $topic_id = $row['b_topic_id']; - - $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies']; - - // Get folder img, topic status/type related information - $folder_img = $folder_alt = $topic_type = ''; - $unread_topic = false; - - topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type); - $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id"); - - $template->assign_block_vars('topicrow', array( - 'FORUM_ID' => $forum_id, - 'TOPIC_ID' => $topic_id, - 'TOPIC_TITLE' => censor_text($row['topic_title']), - 'TOPIC_TYPE' => $topic_type, - 'FORUM_NAME' => $row['forum_name'], - - 'S_DELETED_TOPIC' => (!$row['topic_id']) ? true : false, - 'S_GLOBAL_TOPIC' => (!$forum_id) ? true : false, - - 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - 'FIRST_POST_TIME' => $user->format_date($row['topic_time']), - 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'], - 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), - 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']), - 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - - 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id")), - 'POSTED_AT' => $user->format_date($row['topic_time']), - - 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), - 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), - 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', '') : '', - - 'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'], - 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), - 'U_VIEW_TOPIC' => $view_topic_url, - 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id), - 'U_MOVE_UP' => ($row['order_id'] != 1) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=main&mode=bookmarks&move_up=' . $row['order_id']) : '', - 'U_MOVE_DOWN' => ($row['order_id'] != $max_order_id) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=main&mode=bookmarks&move_down=' . $row['order_id']) : '', - )); - } + $this->assign_topiclist('bookmarks'); break; @@ -828,6 +580,191 @@ class ucp_main $this->tpl_name = 'ucp_main_' . $mode; $this->page_title = 'UCP_MAIN_' . strtoupper($mode); } + + /** + * Build and assign topiclist for bookmarks/subscribed topics + */ + function assign_topiclist($mode = 'subscribed') + { + global $user, $db, $template, $config, $auth, $phpbb_root_path, $phpEx; + + $table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE; + $start = request_var('start', 0); + + $sql = 'SELECT COUNT(topic_id) as topics_count + FROM ' . $table . ' + WHERE user_id = ' . $user->data['user_id']; + $result = $db->sql_query($sql); + $topics_count = (int) $db->sql_fetchfield('topics_count'); + $db->sql_freeresult($result); + + if ($topics_count) + { + $template->assign_vars(array( + 'PAGINATION' => generate_pagination($this->u_action, $topics_count, $config['topics_per_page'], $start), + 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start), + 'TOTAL_TOPICS' => ($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count)) + ); + } + + if ($mode == 'subscribed') + { + $sql_array = array( + 'SELECT' => 't.*, f.forum_name', + + 'FROM' => array( + TOPICS_WATCH_TABLE => 'tw', + TOPICS_TABLE => 't' + ), + + 'WHERE' => 'tw.user_id = ' . $user->data['user_id'] . ' + AND t.topic_id = tw.topic_id', + + 'ORDER_BY' => 't.topic_last_post_time DESC' + ); + + $sql_array['LEFT_JOIN'] = array(); + } + else + { + $sql_array = array( + 'SELECT' => 't.*, f.forum_name, b.topic_id as b_topic_id', + + 'FROM' => array( + BOOKMARKS_TABLE => 'b', + ), + + 'WHERE' => 'b.user_id = ' . $user->data['user_id'], + + 'ORDER_BY' => 't.topic_last_post_time DESC' + ); + + $sql_array['LEFT_JOIN'] = array(); + $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_TABLE => 't'), 'ON' => 'b.topic_id = t.topic_id'); + } + + $sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TABLE => 'f'), 'ON' => 't.forum_id = f.forum_id'); + + if ($config['load_db_lastread']) + { + $sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.forum_id = t.forum_id AND ft.user_id = ' . $user->data['user_id']); + $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_TRACK_TABLE => 'tt'), 'ON' => 'tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id']); + $sql_array['SELECT'] .= ', tt.mark_time, ft.mark_time AS forum_mark_time'; + } + + if ($config['load_db_track']) + { + $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_POSTED_TABLE => 'tp'), 'ON' => 'tp.topic_id = t.topic_id AND tp.user_id = ' . $user->data['user_id']); + $sql_array['SELECT'] .= ', tp.topic_posted'; + } + + $sql = $db->sql_build_query('SELECT', $sql_array); + $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); + + $topic_list = $topic_forum_list = $global_announce_list = $rowset = array(); + while ($row = $db->sql_fetchrow($result)) + { + $topic_id = (isset($row['b_topic_id'])) ? $row['b_topic_id'] : $row['topic_id']; + + $topic_list[] = $topic_id; + $rowset[$topic_id] = $row; + + $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread']) ? $row['forum_mark_time'] : 0; + $topic_forum_list[$row['forum_id']]['topics'][] = $topic_id; + + if ($row['topic_type'] == POST_GLOBAL) + { + $global_announce_list[] = $topic_id; + } + } + $db->sql_freeresult($result); + + $topic_tracking_info = array(); + if ($config['load_db_lastread']) + { + foreach ($topic_forum_list as $f_id => $topic_row) + { + $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']), ($f_id == 0) ? $global_announce_list : false); + } + } + else + { + foreach ($topic_forum_list as $f_id => $topic_row) + { + $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics'], $global_announce_list); + } + } + + foreach ($topic_list as $topic_id) + { + $row = &$rowset[$topic_id]; + + $forum_id = $row['forum_id']; + $topic_id = (isset($row['b_topic_id'])) ? $row['b_topic_id'] : $row['topic_id']; + + $unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false; + + // Replies + $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies']; + + if ($row['topic_status'] == ITEM_MOVED && !empty($row['topic_moved_id'])) + { + $topic_id = $row['topic_moved_id']; + } + + // Get folder img, topic status/type related information + $folder_img = $folder_alt = $topic_type = ''; + topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type); + + $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id"); + + // Send vars to template + $template->assign_block_vars('topicrow', array( + 'FORUM_ID' => $forum_id, + 'TOPIC_ID' => $topic_id, + 'FIRST_POST_TIME' => $user->format_date($row['topic_time']), + 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'], + 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), + 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']), + + 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + + 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + + 'S_DELETED_TOPIC' => (!$row['topic_id']) ? true : false, + 'S_GLOBAL_TOPIC' => (!$forum_id) ? true : false, + + 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id")), + 'REPLIES' => $replies, + 'VIEWS' => $row['topic_views'], + 'TOPIC_TITLE' => censor_text($row['topic_title']), + 'TOPIC_TYPE' => $topic_type, + 'FORUM_NAME' => $row['forum_name'], + + 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), + 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), + 'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '', + 'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '', + 'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '', + 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '', + + 'S_TOPIC_TYPE' => $row['topic_type'], + 'S_USER_POSTED' => (!empty($row['topic_posted'])) ? true : false, + 'S_UNREAD_TOPIC' => $unread_topic, + + 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread', + 'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'], + 'U_VIEW_TOPIC' => $view_topic_url, + 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id), + )); + } + } } ?>
\ No newline at end of file diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 395fcc4918..79c7145797 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -336,6 +336,10 @@ $database_update_info = array( STYLES_IMAGESET_TABLE => array( 'imgset_nm', ), + BOOKMARKS_TABLE => array( + 'order_id', + 'topic_user_id', + ), ), 'add_index' => array( SEARCH_WORDLIST_TABLE => array( @@ -363,7 +367,7 @@ $database_update_info = array( 'username_clean' => array('username_clean'), ), ), - // Add the following columns + // Drop the following columns 'drop_columns' => array( STYLES_IMAGESET_TABLE => array( 'site_logo', @@ -461,6 +465,15 @@ $database_update_info = array( 'user_icon9', 'user_icon10' ), + BOOKMARKS_TABLE => array( + 'order_id', + ), + ), + // Adding primary key + 'add_primary_keys' => array( + BOOKMARKS_TABLE => array( + 'topic_id', 'user_id', + ), ), ), ); diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 52e4d1cf14..12d4eda5ec 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -753,7 +753,14 @@ class install_convert extends module $this->p_master->error(sprintf($user->lang['COULD_NOT_FIND_PATH'], $convert->options['forum_path']), __LINE__, __FILE__); } - $search_type = $config['search_type']; + $search_type = basename(trim($config['search_type'])); + + // For conversions we are a bit less strict and set to a search backend we know exist... + if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx)) + { + $search_type = 'fulltext_native'; + set_config('search_type', $search_type); + } if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx)) { diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 50a59d9c98..f815449d19 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -179,12 +179,11 @@ CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes(display_on_posting); # Table: 'phpbb_bookmarks' CREATE TABLE phpbb_bookmarks ( topic_id INTEGER DEFAULT 0 NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - order_id INTEGER DEFAULT 0 NOT NULL + user_id INTEGER DEFAULT 0 NOT NULL );; -CREATE INDEX phpbb_bookmarks_order_id ON phpbb_bookmarks(order_id);; -CREATE INDEX phpbb_bookmarks_topic_user_id ON phpbb_bookmarks(topic_id, user_id);; +ALTER TABLE phpbb_bookmarks ADD PRIMARY KEY (topic_id, user_id);; + # Table: 'phpbb_bots' CREATE TABLE phpbb_bots ( diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 7caea395ec..3e58881427 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -236,15 +236,16 @@ GO */ CREATE TABLE [phpbb_bookmarks] ( [topic_id] [int] DEFAULT (0) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [order_id] [int] DEFAULT (0) NOT NULL + [user_id] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO -CREATE INDEX [order_id] ON [phpbb_bookmarks]([order_id]) ON [PRIMARY] -GO - -CREATE INDEX [topic_user_id] ON [phpbb_bookmarks]([topic_id], [user_id]) ON [PRIMARY] +ALTER TABLE [phpbb_bookmarks] WITH NOCHECK ADD + CONSTRAINT [PK_phpbb_bookmarks] PRIMARY KEY CLUSTERED + ( + [topic_id], + [user_id] + ) ON [PRIMARY] GO diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index a5d850ca68..db814a3613 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -129,9 +129,7 @@ CREATE TABLE phpbb_bbcodes ( CREATE TABLE phpbb_bookmarks ( topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - order_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - KEY order_id (order_id), - KEY topic_user_id (topic_id, user_id) + PRIMARY KEY (topic_id, user_id) ); diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 6308ed0c15..dee258d888 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -129,9 +129,7 @@ CREATE TABLE phpbb_bbcodes ( CREATE TABLE phpbb_bookmarks ( topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - order_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - KEY order_id (order_id), - KEY topic_user_id (topic_id, user_id) + PRIMARY KEY (topic_id, user_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 8ad99ea189..9660dbf386 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -278,14 +278,10 @@ CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting) CREATE TABLE phpbb_bookmarks ( topic_id number(8) DEFAULT '0' NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, - order_id number(8) DEFAULT '0' NOT NULL + CONSTRAINT pk_phpbb_bookmarks PRIMARY KEY (topic_id, user_id) ) / -CREATE INDEX phpbb_bookmarks_order_id ON phpbb_bookmarks (order_id) -/ -CREATE INDEX phpbb_bookmarks_topic_user_id ON phpbb_bookmarks (topic_id, user_id) -/ /* Table: 'phpbb_bots' diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index fe20316705..c976a2a157 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -234,11 +234,9 @@ CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting) CREATE TABLE phpbb_bookmarks ( topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - order_id INT4 DEFAULT '0' NOT NULL CHECK (order_id >= 0) + PRIMARY KEY (topic_id, user_id) ); -CREATE INDEX phpbb_bookmarks_order_id ON phpbb_bookmarks (order_id); -CREATE INDEX phpbb_bookmarks_topic_user_id ON phpbb_bookmarks (topic_id, user_id); /* Table: 'phpbb_bots' diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index fcd6a50679..9f48115874 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -127,11 +127,9 @@ CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting) CREATE TABLE phpbb_bookmarks ( topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - order_id INTEGER UNSIGNED NOT NULL DEFAULT '0' + PRIMARY KEY (topic_id, user_id) ); -CREATE INDEX phpbb_bookmarks_order_id ON phpbb_bookmarks (order_id); -CREATE INDEX phpbb_bookmarks_topic_user_id ON phpbb_bookmarks (topic_id, user_id); # Table: 'phpbb_bots' CREATE TABLE phpbb_bots ( diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php index 31d94265fa..9b84aa2233 100644 --- a/phpBB/language/en/acp/attachments.php +++ b/phpBB/language/en/acp/attachments.php @@ -49,6 +49,7 @@ $lang = array_merge($lang, array( 'ASSIGNED_GROUP' => 'Assigned extension group', 'ATTACH_EXTENSIONS_URL' => 'Extensions', 'ATTACH_EXT_GROUPS_URL' => 'Extension groups', + 'ATTACH_ID' => 'ID', 'ATTACH_MAX_FILESIZE' => 'Maximum file size', 'ATTACH_MAX_FILESIZE_EXPLAIN' => 'Maximum size of each file, with 0 being unlimited.', 'ATTACH_MAX_PM_FILESIZE' => 'Maximum file size messaging', diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index a1c6d8678c..a10333e073 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -551,8 +551,8 @@ $lang = array_merge($lang, array( 'LOG_MODULE_DISABLE' => '<strong>Module disabled</strong><br />» %s', 'LOG_MODULE_ENABLE' => '<strong>Module enabled</strong><br />» %s', - 'LOG_MODULE_MOVE_DOWN' => '<strong>Module moved down</strong><br />» %s', - 'LOG_MODULE_MOVE_UP' => '<strong>Module moved up</strong><br />» %s', + 'LOG_MODULE_MOVE_DOWN' => '<strong>Module moved down</strong><br />» %1$s below %2$s', + 'LOG_MODULE_MOVE_UP' => '<strong>Module moved up</strong><br />» %1$s above %2$s', 'LOG_MODULE_REMOVED' => '<strong>Module removed</strong><br />» %s', 'LOG_MODULE_ADD' => '<strong>Module added</strong><br />» %s', 'LOG_MODULE_EDIT' => '<strong>Module edited</strong><br />» %s', diff --git a/phpBB/styles/prosilver/template/attachment.html b/phpBB/styles/prosilver/template/attachment.html index a51f1ebc57..9e68274f0b 100644 --- a/phpBB/styles/prosilver/template/attachment.html +++ b/phpBB/styles/prosilver/template/attachment.html @@ -14,7 +14,7 @@ <!-- IF _file.S_IMAGE --> <dl class="file"> - <dt><img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" onclick="viewableArea(this);" /></dt> + <dt class="attach-image"><img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" onclick="viewableArea(this);" /></dt> <!-- IF _file.COMMENT --><dd><em>{_file.COMMENT}</em></dd><!-- ENDIF --> <dd>{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}</dd> </dl> diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html index 91438ecfbc..d702e88ea4 100644 --- a/phpBB/styles/prosilver/template/index_body.html +++ b/phpBB/styles/prosilver/template/index_body.html @@ -29,7 +29,7 @@ <!-- IF S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST --> <h3>{L_BIRTHDAYS}</h3> - <p><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <b>{BIRTHDAY_LIST}</b><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p> + <p><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <strong>{BIRTHDAY_LIST}</strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p> <!-- ENDIF --> <!-- IF NEWEST_USER --> diff --git a/phpBB/styles/prosilver/template/mcp_viewlogs.html b/phpBB/styles/prosilver/template/mcp_viewlogs.html index 760981ebf6..862fad9df7 100644 --- a/phpBB/styles/prosilver/template/mcp_viewlogs.html +++ b/phpBB/styles/prosilver/template/mcp_viewlogs.html @@ -18,7 +18,7 @@ </tr> <!-- IF S_TOPIC_ID --> <tr> - <td class="bg3" colspan="5"><span class="gensmall">{L_LOGS_CURRENT_TOPIC} <a href="{U_VIEW_TOPIC}"><b>{TOPIC_NAME}</b></a></td> + <td class="bg3" colspan="5"><span class="gensmall">{L_LOGS_CURRENT_TOPIC} <a href="{U_VIEW_TOPIC}"><strong>{TOPIC_NAME}</strong></a></td> </tr> <!-- ENDIF --> @@ -44,7 +44,7 @@ <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> <td class="nav" align="left" valign="middle">{PAGE_NUMBER}</td> - <td align="right" valign="top" nowrap="nowrap"><!-- IF PAGINATION --><b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a> <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}">{L_PREVIOUS}</a> <!-- ENDIF -->{PAGINATION}<!-- IF NEXT_PAGE --> <a href="{NEXT_PAGE}">{L_NEXT}</a><!-- ENDIF --></b><!-- ENDIF --></td> + <td align="right" valign="top" nowrap="nowrap"><!-- IF PAGINATION --><strong><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a> <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}">{L_PREVIOUS}</a> <!-- ENDIF -->{PAGINATION}<!-- IF NEXT_PAGE --> <a href="{NEXT_PAGE}">{L_NEXT}</a><!-- ENDIF --></strong><!-- ENDIF --></td> </tr> </table> diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index 1327110758..cbd2d7ae12 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -1,7 +1,6 @@ </div> <div id="page-footer"> - {RUN_CRON_TASK} <div class="navbar"> <div class="inner"><span class="corners-top"><span></span></span> @@ -44,5 +43,7 @@ <div><a id="bottom" name="bottom" accesskey="z"></a></div> +<!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF --> + </body> </html>
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html index 8278299cd6..6a19d62609 100644 --- a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html +++ b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html @@ -13,51 +13,49 @@ <p class="error">{L_BOOKMARKS_DISABLED}</p> <!-- ELSE --> - <!-- IF .topicrow --> - <ul class="topiclist"> - <li class="header"> - <dl class="icon"> - <dt>{L_BOOKMARKS}</dt> - <dd class="lastpost"><span>{L_LAST_POST}</span></dd> - <dd class="mark">{L_MARK}</dd> - <dd class="mark">{L_MOVE}</dd> - </dl> - </li> - </ul> - <ul class="topiclist cplist"> +<!-- IF .topicrow --> + <ul class="topiclist"> + <li class="header"> + <dl class="icon"> + <dt>{L_BOOKMARKS}</dt> + <dd class="lastpost"><span>{L_LAST_POST}</span></dd> + </dl> + </li> + </ul> + <ul class="topiclist cplist"> - <!-- BEGIN topicrow --> - <li class="row<!-- IF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->"> + <!-- BEGIN topicrow --> + <li class="row<!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ELSEIF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->"> <!-- IF topicrow.S_DELETED_TOPIC --> <dl><dt><strong>{L_DELETED_TOPIC}</strong></dt></dl> + <dd class="mark"><input type="checkbox" name="t[{topicrow.TOPIC_ID}]" id="t{topicrow.TOPIC_ID}" /></dd> <!-- ELSE --> - <dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC});"> - <dt <!-- IF topicrow.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG});"<!-- ENDIF -->> - <a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a> - <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF --> - <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br /> - <!-- IF topicrow.PAGINATION --><strong class="pagination"><span>{topicrow.PAGINATION}</span></strong><!-- ENDIF --> - {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} {L_POSTED_ON_DATE} {topicrow.FIRST_POST_TIME} {NEWEST_POST_IMG} - </dt> - <dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a><br /> - {L_POSTED_ON_DATE} {topicrow.LAST_POST_TIME}</span> - </dd> - <dd class="mark"><input type="checkbox" name="t[{topicrow.TOPIC_ID}]" id="t{topicrow.TOPIC_ID}" /></dd> - <!-- IF topicrow.U_MOVE_UP or topicrow.U_MOVE_DOWN --> - <dd class="mark"> - <!-- IF topicrow.U_MOVE_UP --><a href="{topicrow.U_MOVE_UP}" title="{L_MOVE_UP}"><img src="{T_THEME_PATH}/images/arrow_up.gif" style="padding:3px;" alt="{L_MOVE_UP}" /></a><!-- ENDIF --> - <!-- IF topicrow.U_MOVE_DOWN --><a href="{topicrow.U_MOVE_DOWN}" title="{L_MOVE_DOWN}"><img src="{T_THEME_PATH}/images/arrow_down.gif" style="padding:3px;" alt="{L_MOVE_DOWN}" /></a><!-- ENDIF --> - </dd> - <!-- ENDIF --> - </dl> - <!-- ENDIF --> - </li> - <!-- END topicrow --> - - </ul> - <!-- ELSE --> - <p><strong>{L_NO_BOOKMARKS}</strong></p> - <!-- ENDIF --> + <dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC});"> + <dt style="<!-- IF topicrow.TOPIC_ICON_IMG -->background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG});<!-- ENDIF -->" title="{topicrow.TOPIC_FOLDER_IMG_ALT}"> + <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a> + <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF --> + <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br /> + <!-- IF topicrow.PAGINATION --><strong class="pagination"><span>{topicrow.PAGINATION}</span></strong><!-- ENDIF --> + <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} {L_POSTED_ON_DATE} {topicrow.FIRST_POST_TIME} + </dt> + <dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} + <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{L_POSTED_ON_DATE} {topicrow.LAST_POST_TIME}</span> + </dd> + <dd class="mark"><input type="checkbox" name="t[{topicrow.TOPIC_ID}]" id="t{topicrow.TOPIC_ID}" /></dd> + </dl> + <!-- ENDIF --> + </li> + <!-- END topicrow --> + </ul> + <ul class="linklist"> + <li class="rightside pagination"> + <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} <!-- ENDIF --> + <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> • <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> • <span>{PAGINATION}</span><!-- ELSE --> • {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF --> + </li> + </ul> +<!-- ELSE --> + <p><strong>{L_NO_BOOKMARKS}</strong></p> +<!-- ENDIF --> <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html index bf49116652..d806507e06 100644 --- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html +++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html @@ -50,17 +50,16 @@ <!-- BEGIN topicrow --> <li class="row<!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ELSEIF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->"> <dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC});"> - <dt <!-- IF topicrow.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG});"<!-- ENDIF -->> - <a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a> {topicrow.ATTACH_ICON_IMG} + <dt style="<!-- IF topicrow.TOPIC_ICON_IMG -->background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG});<!-- ENDIF -->" title="{topicrow.TOPIC_FOLDER_IMG_ALT}"> + <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a> <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF --> <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br /> <!-- IF topicrow.PAGINATION --><strong class="pagination"><span>{topicrow.PAGINATION}</span></strong><!-- ENDIF --> - {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} {L_POSTED_ON_DATE} {topicrow.FIRST_POST_TIME} <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a><!-- ENDIF --> + <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} {L_POSTED_ON_DATE} {topicrow.FIRST_POST_TIME} </dt> - <dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a><br /> - {L_POSTED_ON_DATE} {topicrow.LAST_POST_TIME}</span> + <dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} + <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{L_POSTED_ON_DATE} {topicrow.LAST_POST_TIME}</span> </dd> - <dd class="mark"><input type="checkbox" name="t[{topicrow.TOPIC_ID}]" id="t{topicrow.TOPIC_ID}" /></dd> </dl> </li> diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html index d5f26ec436..44b7016d25 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html @@ -75,7 +75,7 @@ hr.sep { <table width="85%" cellspacing="3" cellpadding="0" border="0" align="center"> <tr> <td width="10%" nowrap="nowrap">{L_PM_FROM}: </td> - <td><b>{MESSAGE_AUTHOR}</b> [ {SENT_DATE} ]</td> + <td><strong>{MESSAGE_AUTHOR}</strong> [ {SENT_DATE} ]</td> </tr> <!-- IF S_TO_RECIPIENT --> diff --git a/phpBB/styles/subsilver2/template/overall_footer.html b/phpBB/styles/subsilver2/template/overall_footer.html index 64aefc64eb..e9f1cd3292 100644 --- a/phpBB/styles/subsilver2/template/overall_footer.html +++ b/phpBB/styles/subsilver2/template/overall_footer.html @@ -1,4 +1,4 @@ - {RUN_CRON_TASK} + <!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF --> </div> <!-- diff --git a/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html b/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html index 4f3076de2d..191e25c297 100644 --- a/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html +++ b/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html @@ -2,33 +2,46 @@ <table class="tablebg" width="100%" cellspacing="1"> <tr> - <th colspan="5">{L_UCP}</th> + <th colspan="4">{L_UCP}</th> </tr> <tr> - <td class="row1" colspan="5" align="center"><span class="genmed">{L_BOOKMARKS_EXPLAIN}</span></td> + <td class="row1" colspan="4" align="center"><span class="genmed">{L_BOOKMARKS_EXPLAIN}</span></td> </tr> <!-- IF .topicrow --> <tr> - <th colspan="5">{L_BOOKMARKS}</th> + <th colspan="4">{L_BOOKMARKS}</th> </tr> <!-- ENDIF --> <!-- IF S_NO_DISPLAY_BOOKMARKS --> <tr class="row1"> - <td colspan="5" align="center"><b class="genmed">{L_BOOKMARKS_DISABLED}</b></td> + <td colspan="4" align="center"><b class="genmed">{L_BOOKMARKS_DISABLED}</b></td> </tr> <!-- ELSE --> + <!-- IF TOTAL_TOPICS --> + <tr> + <td class="row3" colspan="4"> + <table width="100%" cellspacing="1"> + <tr> + <td class="nav" valign="middle" nowrap="nowrap"> {PAGE_NUMBER}<br /></td> + <td class="gensmall" nowrap="nowrap"> [ {TOTAL_TOPICS} ] </td> + <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td> + </tr> + </table> + </td> + </tr> + <!-- ENDIF --> + <!-- BEGIN topicrow --> <!-- IF topicrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> - - <td style="padding: 4px;" width="20" align="center" valign="middle">{topicrow.TOPIC_FOLDER_IMG}</td> + <td style="padding: 4px;" width="20" align="center" valign="middle">{topicrow.TOPIC_FOLDER_IMG}</td> <!-- IF topicrow.S_DELETED_TOPIC --> <td class="postdetails" style="padding: 4px" width="100%" colspan="2">{L_DELETED_TOPIC}</td> <!-- ELSE --> <td style="padding: 4px;" width="100%" valign="top"> - <p class="topictitle">{topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></p> + <p class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></p> <!-- IF topicrow.S_GLOBAL_TOPIC --><span class="gensmall">{L_GLOBAL_ANNOUNCEMENT}</span><!-- ELSE --><span class="gensmall"><b>{L_FORUM}: </b><a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a></span><!-- ENDIF --> <!-- IF topicrow.PAGINATION --> <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p> @@ -41,12 +54,11 @@ </p> </td> <!-- ENDIF --> - <td class="postdetails" style="padding: 4px;" align="center" valign="middle" nowrap="nowrap"> <!-- IF topicrow.U_MOVE_UP --><a href="{topicrow.U_MOVE_UP}">{L_MOVE_UP}</a><!-- ENDIF --><!-- IF topicrow.U_MOVE_UP and topicrow.U_MOVE_DOWN --> | <!-- ENDIF --><!-- IF topicrow.U_MOVE_DOWN --><a href="{topicrow.U_MOVE_DOWN}">{L_MOVE_DOWN}</a><!-- ENDIF --> </td> - <td style="padding: 4px;"> <input type="checkbox" class="radio" name="t[{topicrow.TOPIC_ID}]" /> </td> - </tr> + <td style="padding: 4px;"> <input type="checkbox" class="radio" name="t[{topicrow.TOPIC_ID}]" /> </td> + </tr> <!-- BEGINELSE --> <tr class="row1"> - <td colspan="5" align="center"><b class="genmed">{L_NO_BOOKMARKS}</b></td> + <td colspan="4" align="center"><b class="genmed">{L_NO_BOOKMARKS}</b></td> </tr> <!-- END topicrow --> diff --git a/phpBB/styles/subsilver2/template/ucp_main_subscribed.html b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html index b549daaf87..844a90f3e6 100644 --- a/phpBB/styles/subsilver2/template/ucp_main_subscribed.html +++ b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html @@ -50,7 +50,8 @@ <!-- IF topicrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> <td style="padding: 4px;" width="20" align="center" valign="middle">{topicrow.TOPIC_FOLDER_IMG}</td> <td style="padding: 4px;" width="100%" valign="top"> - <p class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></p><br /> + <p class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></p> + <!-- IF topicrow.S_GLOBAL_TOPIC --><span class="gensmall">{L_GLOBAL_ANNOUNCEMENT}</span><!-- ELSE --><span class="gensmall"><b>{L_FORUM}: </b><a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a></span><!-- ENDIF --> <!-- IF topicrow.PAGINATION --> <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p> <!-- ENDIF --> diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index ca74ea3154..6b5c2f411d 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -172,7 +172,7 @@ if ($user->data['is_registered']) if ($config['allow_bookmarks']) { - $sql_array['SELECT'] .= ', bm.order_id as bookmarked'; + $sql_array['SELECT'] .= ', bm.topic_id as bookmarked'; $sql_array['LEFT_JOIN'][] = array( 'FROM' => array(BOOKMARKS_TABLE => 'bm'), 'ON' => 'bm.user_id = ' . $user->data['user_id'] . ' AND t.topic_id = bm.topic_id' @@ -439,12 +439,8 @@ if ($config['allow_bookmarks'] && $user->data['is_registered'] && request_var('b $sql = 'INSERT INTO ' . BOOKMARKS_TABLE . ' ' . $db->sql_build_array('INSERT', array( 'user_id' => $user->data['user_id'], 'topic_id' => $topic_id, - 'order_id' => 0) - ); + )); $db->sql_query($sql); - - $where_sql = ''; - $sign = '+'; } else { @@ -452,19 +448,8 @@ if ($config['allow_bookmarks'] && $user->data['is_registered'] && request_var('b WHERE user_id = {$user->data['user_id']} AND topic_id = $topic_id"; $db->sql_query($sql); - - // Works because of current order_id selected as bookmark value (please do not change because of simplicity) - $where_sql = " AND order_id > {$topic_data['bookmarked']}"; - $sign = '-'; } - // Re-Sort Bookmarks - $sql = 'UPDATE ' . BOOKMARKS_TABLE . " - SET order_id = order_id $sign 1 - WHERE user_id = {$user->data['user_id']} - $where_sql"; - $db->sql_query($sql); - meta_refresh(3, $viewtopic_url); $message = (($topic_data['bookmarked']) ? $user->lang['BOOKMARK_REMOVED'] : $user->lang['BOOKMARK_ADDED']) . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $viewtopic_url . '">', '</a>'); |