diff --git a/search_autocomplete.features.inc b/search_autocomplete.features.inc index c5c92daf791aa977e3636bbdf958a45f10a8abab..dd56bdafccabc4edc22ef405469af75a2f676220 100644 --- a/search_autocomplete.features.inc +++ b/search_autocomplete.features.inc @@ -27,7 +27,7 @@ function search_autocomplete_config_features_export_options() { * This is a component hook, rather then a module hook, therefore this is the * callback from hook_features_api which relates to the specific component we * are looking to export. When a specific instance of the component we are - * looking to export is selected, this will include the necessariy item, plus + * looking to export is selected, this will include the necessary item, plus * any dependencies into our export array. * * @param array $data @@ -107,7 +107,7 @@ function search_autocomplete_config_features_rebuild($module) { } drupal_write_record('search_autocomplete_forms', $value, $new ? array() : 'fid'); } catch (Exception $e) { - watchdog("Erroor in updating", $e->getMessage(), array(), WATCHDOG_ERROR); + watchdog("Error in updating", $e->getMessage(), array(), WATCHDOG_ERROR); } } } @@ -127,7 +127,7 @@ function search_autocomplete_get_data() { } /** - * Will retrive data on basis of fid + * Will retrieve data on basis of fid * @param type $fid * @return type */ @@ -137,4 +137,4 @@ function search_autocomplete_row_data($fid) { ->condition('fid', $fid) ->execute(); return $codes->fetchAssoc(); -} +} \ No newline at end of file diff --git a/search_autocomplete.form.add.inc b/search_autocomplete.form.add.inc index ec3875655bea2e14979cbaf5f9a2792d3b4139f4..de6bc76749907649a961642060b18f20feed3735 100644 --- a/search_autocomplete.form.add.inc +++ b/search_autocomplete.form.add.inc @@ -41,7 +41,7 @@ function search_autocomplete_form_add() { '#maxlength' => 255, '#required' => TRUE, ); - // Submit buton. + // Submit button. $form['submit'] = array( '#type' => 'submit', '#value' => t('Save'), @@ -62,7 +62,7 @@ function search_autocomplete_form_add_submit($form, &$form_state) { // Get the form values. $values = $form_state['values']; - // Check if aready existing records. + // Check if already existing records. $result = db_select('search_autocomplete_forms', 'f') ->fields('f') ->condition('title', $values['title']) @@ -103,5 +103,5 @@ function search_autocomplete_form_add_submit($form, &$form_state) { $form_state['redirect'] = 'admin/config/search/search_autocomplete/' . $fid . '/configure'; // Give a return to the user. - $ok_query ? drupal_set_message(t('The form has been created successfully !') . '
' . t('Please check its configuration.')) : drupal_set_message(t("An error has occured while creating the form. Please, double check your settings!"), 'error'); -} + $ok_query ? drupal_set_message(t('The form has been created successfully!') . '
' . t('Please check its configuration.')) : drupal_set_message(t("An error has occurred while creating the form. Please, double check your settings!"), 'error'); +} \ No newline at end of file diff --git a/search_autocomplete.form.configure.inc b/search_autocomplete.form.configure.inc index 6a17917447d3b3f913751f9abd0d1cb74f269dc8..c904136e273e4b881bbb4c0848f45393ff20fb64 100644 --- a/search_autocomplete.form.configure.inc +++ b/search_autocomplete.form.configure.inc @@ -3,7 +3,7 @@ /** * @file * Search Autocomplete - * Helper functions to retrive suggestions from database + * Helper functions to retrieve suggestions from database * * Sponsored by: * www.axiomcafe.fr @@ -52,24 +52,24 @@ function search_autocomplete_form_configure($form, &$form_state) { $form['search_autocomplete_how']['max_sug'] = array( '#type' => 'textfield', '#title' => t('Limit of the autocomplete search result'), - '#description' => t('Please enter the maximim number of suggestion to display.'), + '#description' => t('Please enter the maximum number of suggestion to display.'), '#default_value' => $item->max_sug, '#maxlength' => 2, '#required' => TRUE, ); - // Check if form should be autosubmitted. + // Check if form should be auto submitted. $form['search_autocomplete_how']['auto_submit'] = array( '#type' => 'checkbox', '#title' => t('Auto Submit'), '#description' => t('If enabled, the form will be submitted automatically as soon as your user choose a suggestion in the popup list.'), '#default_value' => $item->auto_submit, ); - // Check if form should be autoredirected. + // Check if form should be auto redirected. $form['search_autocomplete_how']['auto_redirect'] = array( '#type' => 'checkbox', '#title' => t('Auto Redirect'), - '#description' => t('If enabled, the user will be directly routed to the suggestion he choosed instead of performing form validation process. Only works if "link" attribute is existing and if "Auto Submit" is enabled.'), + '#description' => t('If enabled, the user will be directly routed to the suggestion he chooses instead of performing form validation process. Only works if "link" attribute is existing and if "Auto Submit" is enabled.'), '#default_value' => $item->auto_redirect, ); @@ -78,11 +78,11 @@ function search_autocomplete_form_configure($form, &$form_state) { // "View all results" custom configurations $form['search_autocomplete_how']['view_all_results'] = array( '#type' => 'fieldset', - '#title' => t('Custom behavior when some suggestions are available'), + '#title' => t('Custom behaviour when some suggestions are available'), '#collapsible' => TRUE, '#collapsed' => TRUE, ); - // Check if form should be autosubmitted. + // Check if form should be auto submitted. $form['search_autocomplete_how']['view_all_results']['all_results_label'] = array( '#type' => 'textfield', '#title' => t('Custom "view all results" message label'), @@ -91,7 +91,7 @@ function search_autocomplete_form_configure($form, &$form_state) { '#maxlength' => 255, '#required' => FALSE, ); - // Check if form should be autosubmitted. + // Check if form should be auto submitted. $form['search_autocomplete_how']['view_all_results']['all_results_value'] = array( '#type' => 'textfield', '#title' => t('Custom "view all results" message value'), @@ -100,7 +100,7 @@ function search_autocomplete_form_configure($form, &$form_state) { '#maxlength' => 255, '#required' => FALSE, ); - // Check if form should be autosubmitted. + // Check if form should be auto submitted. $form['search_autocomplete_how']['view_all_results']['all_results_link'] = array( '#type' => 'textfield', '#title' => t('Custom "view all results" URL redirection'), @@ -115,11 +115,11 @@ function search_autocomplete_form_configure($form, &$form_state) { // "No resuls" custom configurations $form['search_autocomplete_how']['no_results'] = array( '#type' => 'fieldset', - '#title' => t('Custom behavior when no suggestions are found'), + '#title' => t('Custom behaviour when no suggestions are found'), '#collapsible' => TRUE, '#collapsed' => TRUE, ); - // Check if form should be autosubmitted. + // Check if form should be auto submitted. $form['search_autocomplete_how']['no_results']['no_results_label'] = array( '#type' => 'textfield', '#title' => t('Custom "no result" message label'), @@ -128,7 +128,7 @@ function search_autocomplete_form_configure($form, &$form_state) { '#maxlength' => 255, '#required' => FALSE, ); - // Check if form should be autosubmitted. + // Check if form should be auto submitted. $form['search_autocomplete_how']['no_results']['no_results_value'] = array( '#type' => 'textfield', '#title' => t('Custom "no result" message value'), @@ -137,7 +137,7 @@ function search_autocomplete_form_configure($form, &$form_state) { '#maxlength' => 255, '#required' => FALSE, ); - // Check if form should be autosubmitted. + // Check if form should be auto submitted. $form['search_autocomplete_how']['no_results']['no_results_link'] = array( '#type' => 'textfield', '#title' => t('Custom "no result" URL redirection'), @@ -370,7 +370,7 @@ function search_autocomplete_form_configure_submit($form, &$form_state) { // ###. drupal_clear_css_cache(); $form_state['redirect'] = 'admin/config/search/search_autocomplete'; - $ok_query ? drupal_set_message(t("Configuration success !")) : drupal_set_message(t("An error has occured while saving the settings. Please, double check your settings!"), 'error'); + $ok_query ? drupal_set_message(t("Configuration success!")) : drupal_set_message(t("An error has occurred while saving the settings. Please double check your settings!"), 'error'); } // ///////////////////////////////////////////////////////////////////////// // diff --git a/search_autocomplete.form.treelist.inc b/search_autocomplete.form.treelist.inc index 23726b41d35a13640f0dbda46953c31a18832c4b..1c4d2afb81b775d88e9b95e1fe495c09ec04215d 100644 --- a/search_autocomplete.form.treelist.inc +++ b/search_autocomplete.form.treelist.inc @@ -3,7 +3,7 @@ /** * @file * Search Autocomplete - * Display the list of form to autocomplete and themis it as a draggable table. + * Display the list of form to autocomplete and theme it as a draggable table. * * Sponsored by: * www.axiomcafe.fr @@ -11,7 +11,7 @@ // --------------------------------------------------------------------------- /** - * Menu Callback: create the form to list the searchforms. + * Menu Callback: create the form to list the search forms. * * @return array * the form @@ -93,7 +93,7 @@ function search_autocomplete_treelist_form($form, &$form_state) { $form['admin_helper'] = array( '#type' => 'checkbox', '#title' => $title, - '#description' => t('If enabled, user with "administer Search Autocomplete" permission will be able to use admin helper tool on input fields (recommanded).'), + '#description' => t('If enabled, user with "administer Search Autocomplete" permission will be able to use admin helper tool on input fields (recommended).'), '#default_value' => $admin_helper, ); @@ -170,7 +170,7 @@ function theme_search_autocomplete_treelist_form($variables) { 'colspan' => 2, ), ); - // Themize the table and render the form. + // Theme the table and render the form. $output = theme('table', array( 'header' => $header, 'rows' => $rows, @@ -263,4 +263,4 @@ function _search_autocomplete_sort_by_weight($a, $b) { return 0; } return ($a->weight < $b->weight) ? -1 : 1; -} +} \ No newline at end of file diff --git a/search_autocomplete.module b/search_autocomplete.module index bb257e729354a72e8e9017a5247759e1960d0273..c8f07b86a9ac2b04703daf847cf1084d010ce4c6 100644 --- a/search_autocomplete.module +++ b/search_autocomplete.module @@ -16,7 +16,7 @@ include_once('search_autocomplete.features.inc'); /** * Implements hook_init(). * - * Add autocomplete.js on everypage. + * Add autocomplete.js on every page. */ function search_autocomplete_page_build() { @@ -36,7 +36,7 @@ function search_autocomplete_page_build() { ->condition('enabled', 1,'=') ->execute() ->fetchAllAssoc('fid'); - // Build the setting array to transfert to JS. + // Build the setting array to transfer to JS. foreach ($result as $match) { $form_id = 'form' . $match->fid; $input_data = explode("\n", $match->data_static); @@ -177,4 +177,4 @@ function search_autocomplete_features_api() { 'feature_source' => TRUE, ), ); -} +} \ No newline at end of file