aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_search.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-03-26 01:36:26 +0000
committerNils Adermann <naderman@naderman.de>2006-03-26 01:36:26 +0000
commit8a32e0de742d9d4fd453402a48889bc6edd6a7f9 (patch)
tree83da50045e715ee7c47e8ea84e528a7fc17f58a6 /phpBB/includes/acp/acp_search.php
parented32b4d8dc396a656a6a0b84f9a40c5fce53278a (diff)
downloadforums-8a32e0de742d9d4fd453402a48889bc6edd6a7f9.tar
forums-8a32e0de742d9d4fd453402a48889bc6edd6a7f9.tar.gz
forums-8a32e0de742d9d4fd453402a48889bc6edd6a7f9.tar.bz2
forums-8a32e0de742d9d4fd453402a48889bc6edd6a7f9.tar.xz
forums-8a32e0de742d9d4fd453402a48889bc6edd6a7f9.zip
- correctly use DISTINCT and GROUP BY in search related SQL [Bug #1256]
- always display views and replies in search results [Bug #1223] - display error messages occuring during search index creation/deletion [Bug #1274] - correctly align the ACP link on the search results page [Bug #1160] - fixed the search forum box [Bug #1300] and added a search topic box (subBlue: can you please position this a little more visible, didn't want to mess with the CSS ;-)) - correctly check and use show_results on the search page git-svn-id: file:///svn/phpbb/trunk@5727 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_search.php')
-rw-r--r--phpBB/includes/acp/acp_search.php46
1 files changed, 27 insertions, 19 deletions
diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php
index 58bcd66ec0..855bdea0f6 100644
--- a/phpBB/includes/acp/acp_search.php
+++ b/phpBB/includes/acp/acp_search.php
@@ -234,7 +234,12 @@ class acp_search
if (method_exists($this->search, 'delete_index'))
{
// pass a reference to myself so the $search object can make use of save_state() and attributes
- $this->search->delete_index($this, $phpbb_admin_path . "index.$phpEx$SID&i=$id&mode=$mode&action=delete");
+ if ($error = $this->search->delete_index($this, $phpbb_admin_path . "index.$phpEx$SID&i=$id&mode=$mode&action=delete"))
+ {
+ $this->state = array('');
+ $this->save_state();
+ trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js());
+ }
}
else
{
@@ -269,25 +274,23 @@ class acp_search
}
$this->search->tidy();
-
+
$this->state = array('');
$this->save_state();
- /**
- * @todo remove Javascript
- */
- trigger_error($user->lang['SEARCH_INDEX_REMOVED'] . adm_back_link($this->u_action) . '<script language="javascript" type="text/javascript">
- <!--
- close_waitscreen = 1;
- //-->
- </script>');
+ trigger_error($user->lang['SEARCH_INDEX_REMOVED'] . adm_back_link($this->u_action) . $this->close_popup_js());
}
else
{
if (method_exists($this->search, 'create_index'))
{
// pass a reference to myself so the $search object can make use of save_state() and attributes
- $this->search->create_index($this, $phpbb_admin_path . "index.$phpEx$SID&i=$id&mode=$mode&action=create");
+ if ($error = $this->search->create_index($this, $phpbb_admin_path . "index.$phpEx$SID&i=$id&mode=$mode&action=create"))
+ {
+ $this->state = array('');
+ $this->save_state();
+ trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js());
+ }
}
else
{
@@ -319,14 +322,7 @@ class acp_search
$this->state = array('');
$this->save_state();
- /**
- * @todo remove Javascript
- */
- trigger_error($user->lang['SEARCH_INDEX_CREATED'] . adm_back_link($this->u_action) . '<script language="javascript" type="text/javascript">
- <!--
- close_waitscreen = 1;
- //-->
- </script>');
+ trigger_error($user->lang['SEARCH_INDEX_CREATED'] . adm_back_link($this->u_action) . $this->close_popup_js());
}
}
@@ -426,6 +422,18 @@ class acp_search
adm_page_footer();
}
+ function close_popup_js()
+ {
+ /**
+ * @todo remove Javascript
+ */
+ return '<script language="javascript" type="text/javascript">
+ <!--
+ close_waitscreen = 1;
+ //-->
+ </script>';
+ }
+
function get_search_types()
{
global $phpbb_root_path, $phpEx;