From 07a8d9bcb3665baf3a364a14669e5f85d70c265f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Wed, 4 Jul 2007 21:33:55 +0000 Subject: #156782 by webernet and pwolanin: clean up menu API and menu module code comments, fix typos, wrap lines properly and fix some coding style issues --- modules/menu/menu.module | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/menu/menu.module b/modules/menu/menu.module index 42e7ea26f..693f7e768 100644 --- a/modules/menu/menu.module +++ b/modules/menu/menu.module @@ -389,7 +389,7 @@ function menu_edit_menu(&$form_state, $type, $menu = array()) { $form['menu_name'] = array( '#type' => 'textfield', '#title' => t('Menu name'), - '#description' => t('The machine-readable name of this menu. This text will be used for constructing the URL of the menu overview page for this menu. This name may consist of only of lowercase letters, numbers and hypens and must be unique.'), + '#description' => t('The machine-readable name of this menu. This text will be used for constructing the URL of the menu overview page for this menu. This name may consist of only of lowercase letters, numbers, and hyphens, and must be unique.'), '#required' => TRUE, ); $form['#insert'] = TRUE; @@ -420,7 +420,7 @@ function menu_edit_menu(&$form_state, $type, $menu = array()) { function menu_edit_menu_validate($form, &$form_state) { $item = $form_state['values']; if (preg_match('/[^a-z0-9-]/', $item['menu_name'])) { - form_set_error('menu_name', t('Menu name may consist only of lowercase letters, numbers and hypens.')); + form_set_error('menu_name', t('Menu name may consist only of lowercase letters, numbers, and hyphens.')); } if ($form['#insert'] && (db_result(db_query("SELECT menu_name FROM {menu_custom} WHERE menu_name = '%s'", $item['menu_name'])) || @@ -592,7 +592,7 @@ function menu_form_alter(&$form, $form_state, $form_id) { $item = $form['#node']->menu; if ($item['mlid']) { - // There is an existing link + // There is an existing link. $form['menu']['delete'] = array( '#type' => 'checkbox', '#title' => t('Check to remove this item from the menu.'), @@ -640,7 +640,7 @@ function menu_form_alter(&$form, $form_state, $form_id) { * titles as the values. */ function menu_get_menus($all = FALSE) { - $sql = 'SELECT * FROM {menu_custom}'. ($all ? '' : " WHERE menu_name NOT IN ('navigation', 'primary-links', 'secondary-links')") . ' ORDER BY title'; + $sql = 'SELECT * FROM {menu_custom}'. ($all ? '' : " WHERE menu_name NOT IN ('navigation', 'primary-links', 'secondary-links')") .' ORDER BY title'; $result = db_query($sql); $rows = array(); -- cgit v1.2.3