diff --git a/e107_admin/search.php b/e107_admin/search.php index 9a8f5a3dd..195319a18 100644 --- a/e107_admin/search.php +++ b/e107_admin/search.php @@ -9,8 +9,8 @@ * Search Administration * * $Source: /cvs_backup/e107_0.8/e107_admin/search.php,v $ - * $Revision: 1.3 $ - * $Date: 2008-12-16 17:23:25 $ + * $Revision: 1.4 $ + * $Date: 2008-12-21 11:39:34 $ * $Author: secretr $ * */ @@ -25,7 +25,10 @@ $e_sub_cat = 'search'; require_once('auth.php'); require_once(e_HANDLER.'userclass_class.php'); require_once(e_HANDLER."message_handler.php"); +require_once (e_HANDLER.'form_handler.php'); +$frm = new e_form(true); $emessage = &eMessage::getInstance(); +$e_userclass = new user_class(); $query = explode('.', e_QUERY); @@ -71,34 +74,27 @@ if ($save_search) } -if (isset($_POST['update_main']) || isset($_POST['update_main_com'])) +if (isset($_POST['update_main'])) { // Update all the basic handler info - if(isset($_POST['update_main'])) + foreach($search_handlers as $s_key => $s_value) { - foreach($search_handlers as $s_key => $s_value) - { - $search_prefs['core_handlers'][$s_key]['class'] = $_POST['core_handlers'][$s_key]['class']; - $search_prefs['core_handlers'][$s_key]['order'] = $_POST['core_handlers'][$s_key]['order']; - } - - foreach ($search_prefs['plug_handlers'] as $plug_dir => $active) - { - $search_prefs['plug_handlers'][$plug_dir]['class'] = $_POST['plug_handlers'][$plug_dir]['class']; - $search_prefs['plug_handlers'][$plug_dir]['order'] = $_POST['plug_handlers'][$plug_dir]['order']; - } - - $search_prefs['google'] = $_POST['google']; + $search_prefs['core_handlers'][$s_key]['class'] = $_POST['core_handlers'][$s_key]['class']; + $search_prefs['core_handlers'][$s_key]['order'] = $_POST['core_handlers'][$s_key]['order']; } - if(isset($_POST['update_main_com'])) + foreach ($search_prefs['plug_handlers'] as $plug_dir => $active) { - foreach ($search_prefs['comments_handlers'] as $key => $value) - { - $search_prefs['comments_handlers'][$key]['class'] = $_POST['comments_handlers'][$key]['class']; - } + $search_prefs['plug_handlers'][$plug_dir]['class'] = $_POST['plug_handlers'][$plug_dir]['class']; + $search_prefs['plug_handlers'][$plug_dir]['order'] = $_POST['plug_handlers'][$plug_dir]['order']; } + $search_prefs['google'] = $_POST['google']; + + foreach ($search_prefs['comments_handlers'] as $key => $value) + { + $search_prefs['comments_handlers'][$key]['class'] = $_POST['comments_handlers'][$key]['class']; + } $tmp = addslashes(serialize($search_prefs)); @@ -215,74 +211,65 @@ if ($query[0] == 'settings') ".SEALAN_15.": - ".r_userclass("search_restrict", $pref['search_restrict'], "off", "public,guest,nobody,member,admin,classes")." + ".$e_userclass->uc_dropdown('search_restrict', $pref['search_restrict'], 'public,guest,nobody,member,admin,classes', "tabindex='".$frm->getNext()."'")." ".SEALAN_30." -    - + ".$frm->radio_switch('search_highlight', $pref['search_highlight'])." ".SEALAN_10." -    - + ".$frm->radio_switch('relevance', $search_prefs['relevance'])." ".SEALAN_11." -    - + ".$frm->radio_switch('user_select', $search_prefs['user_select'])." ".SEALAN_19." -    - + ".$frm->radio_switch('multisearch', $search_prefs['multisearch'])." ".SEALAN_35." -    -    - + ".$frm->radio_multi('selector', array(2 => SEALAN_36, 1 => SEALAN_37, 0 => SEALAN_38), $search_prefs['selector'])." ".SEALAN_12." -    -    -  ".SEALAN_14." + ".$frm->radio_multi('time_restrict', array(0 => LAN_DISABLED, 1 => SEALAN_13), $search_prefs['time_restrict'])."  + ".$frm->text('time_secs', $tp -> toForm($search_prefs['time_secs']), 3, 'class=tbox&size=5')." ".SEALAN_14." ".SEALAN_3." - ".$rs -> form_radio('search_sort', 'mysql', ($search_prefs['mysql_sort'] == TRUE ? 1 : 0))." MySql
- ".$rs -> form_radio('search_sort', 'php', ($search_prefs['mysql_sort'] == TRUE ? 0 : 1))." ".SEALAN_31." -  ".SEALAN_32." + ".$frm->radio_switch('search_sort', $search_prefs['mysql_sort'], 'MySql', SEALAN_31)."  + ".$frm->text('php_limit', $tp -> toForm($search_prefs['php_limit']), 5, 'class=tbox&size=5')." ".SEALAN_32."
".SEALAN_49."
".SEALAN_47." -    - + ".$frm->radio_switch('boundary', $search_prefs['boundary'])."
".SEALAN_48."
- + ".$frm->admin_button('update_prefs', LAN_UPDATE, 'update')."
@@ -446,9 +433,6 @@ else -
- -
"; @@ -490,7 +474,7 @@ else
- +
@@ -516,7 +500,7 @@ function search_adminmenu() { $var['settings']['text'] = SEALAN_42; $var['settings']['link'] = e_SELF."?settings"; - show_admin_menu(SEALAN_40, $action, $var); + e_admin_menu(SEALAN_40, $action, $var); } ?> \ No newline at end of file diff --git a/e107_languages/English/admin/help/search.php b/e107_languages/English/admin/help/search.php index 475341439..fd5817fe2 100644 --- a/e107_languages/English/admin/help/search.php +++ b/e107_languages/English/admin/help/search.php @@ -1,27 +1,24 @@
-If your site includes Ideographic languages such as Chinese and Japanese you must -use the PHP sort method and switch whole word matching off."; -$ns -> tablerender("Search Help", $text); +$caption = "Search Help"; +$text = " +

+ If your MySQL server version supports it you can switch + to the MySQL sort method which is faster than the PHP sort method. See preferences. +

+

+ If your site includes Ideographic languages such as Chinese and Japanese you must + use the PHP sort method and switch whole word matching off. +

+"; +$ns->tablerender($caption, $text); ?> \ No newline at end of file