Commit 36d44fbf authored by Steven Wittens's avatar Steven Wittens

#84146: Use 'Sentence capitalization' for menu items, page titles, form items, etc

parent c93c0fc7
...@@ -362,7 +362,7 @@ function theme_page($content) { ...@@ -362,7 +362,7 @@ function theme_page($content) {
$output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; $output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
$output .= '<html xmlns="http://www.w3.org/1999/xhtml">'; $output .= '<html xmlns="http://www.w3.org/1999/xhtml">';
$output .= '<head>'; $output .= '<head>';
$output .= ' <title>'. (drupal_get_title() ? strip_tags(drupal_get_title()) : variable_get('site_name', 'drupal')) .'</title>'; $output .= ' <title>'. (drupal_get_title() ? strip_tags(drupal_get_title()) : variable_get('site_name', 'Drupal')) .'</title>';
$output .= drupal_get_html_head(); $output .= drupal_get_html_head();
$output .= drupal_get_css(); $output .= drupal_get_css();
$output .= drupal_get_js(); $output .= drupal_get_js();
......
...@@ -51,33 +51,33 @@ function aggregator_menu($may_cache) { ...@@ -51,33 +51,33 @@ function aggregator_menu($may_cache) {
'callback' => 'aggregator_admin_overview', 'callback' => 'aggregator_admin_overview',
'access' => $edit); 'access' => $edit);
$items[] = array('path' => 'admin/content/aggregator/add/feed', $items[] = array('path' => 'admin/content/aggregator/add/feed',
'title' => t('add feed'), 'title' => t('Add feed'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('aggregator_form_feed'), 'callback arguments' => array('aggregator_form_feed'),
'access' => $edit, 'access' => $edit,
'type' => MENU_LOCAL_TASK); 'type' => MENU_LOCAL_TASK);
$items[] = array('path' => 'admin/content/aggregator/add/category', $items[] = array('path' => 'admin/content/aggregator/add/category',
'title' => t('add category'), 'title' => t('Add category'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('aggregator_form_category'), 'callback arguments' => array('aggregator_form_category'),
'access' => $edit, 'access' => $edit,
'type' => MENU_LOCAL_TASK); 'type' => MENU_LOCAL_TASK);
$items[] = array('path' => 'admin/content/aggregator/remove', $items[] = array('path' => 'admin/content/aggregator/remove',
'title' => t('remove items'), 'title' => t('Remove items'),
'callback' => 'aggregator_admin_remove_feed', 'callback' => 'aggregator_admin_remove_feed',
'access' => $edit, 'access' => $edit,
'type' => MENU_CALLBACK); 'type' => MENU_CALLBACK);
$items[] = array('path' => 'admin/content/aggregator/update', $items[] = array('path' => 'admin/content/aggregator/update',
'title' => t('update items'), 'title' => t('Update items'),
'callback' => 'aggregator_admin_refresh_feed', 'callback' => 'aggregator_admin_refresh_feed',
'access' => $edit, 'access' => $edit,
'type' => MENU_CALLBACK); 'type' => MENU_CALLBACK);
$items[] = array('path' => 'admin/content/aggregator/list', $items[] = array('path' => 'admin/content/aggregator/list',
'title' => t('list'), 'title' => t('List'),
'type' => MENU_DEFAULT_LOCAL_TASK, 'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10); 'weight' => -10);
$items[] = array('path' => 'admin/content/aggregator/settings', $items[] = array('path' => 'admin/content/aggregator/settings',
'title' => t('settings'), 'title' => t('Settings'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('aggregator_admin_settings'), 'callback arguments' => array('aggregator_admin_settings'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_TASK,
...@@ -85,16 +85,16 @@ function aggregator_menu($may_cache) { ...@@ -85,16 +85,16 @@ function aggregator_menu($may_cache) {
'access' => $edit); 'access' => $edit);
$items[] = array('path' => 'aggregator', $items[] = array('path' => 'aggregator',
'title' => t('news aggregator'), 'title' => t('News aggregator'),
'callback' => 'aggregator_page_last', 'callback' => 'aggregator_page_last',
'access' => $view, 'access' => $view,
'weight' => 5); 'weight' => 5);
$items[] = array('path' => 'aggregator/sources', $items[] = array('path' => 'aggregator/sources',
'title' => t('sources'), 'title' => t('Sources'),
'callback' => 'aggregator_page_sources', 'callback' => 'aggregator_page_sources',
'access' => $view); 'access' => $view);
$items[] = array('path' => 'aggregator/categories', $items[] = array('path' => 'aggregator/categories',
'title' => t('categories'), 'title' => t('Categories'),
'callback' => 'aggregator_page_categories', 'callback' => 'aggregator_page_categories',
'access' => $view, 'access' => $view,
'type' => MENU_ITEM_GROUPING); 'type' => MENU_ITEM_GROUPING);
...@@ -132,17 +132,17 @@ function aggregator_menu($may_cache) { ...@@ -132,17 +132,17 @@ function aggregator_menu($may_cache) {
'access' => $view, 'access' => $view,
'type' => MENU_CALLBACK); 'type' => MENU_CALLBACK);
$items[] = array('path' => 'aggregator/sources/'. $feed['fid'] .'/view', $items[] = array('path' => 'aggregator/sources/'. $feed['fid'] .'/view',
'title' => t('view'), 'title' => t('View'),
'type' => MENU_DEFAULT_LOCAL_TASK, 'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10); 'weight' => -10);
$items[] = array('path' => 'aggregator/sources/'. $feed['fid'] .'/categorize', $items[] = array('path' => 'aggregator/sources/'. $feed['fid'] .'/categorize',
'title' => t('categorize'), 'title' => t('Categorize'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('aggregator_page_source'), 'callback arguments' => array('aggregator_page_source'),
'access' => $edit, 'access' => $edit,
'type' => MENU_LOCAL_TASK); 'type' => MENU_LOCAL_TASK);
$items[] = array('path' => 'aggregator/sources/'. $feed['fid'] .'/configure', $items[] = array('path' => 'aggregator/sources/'. $feed['fid'] .'/configure',
'title' => t('configure'), 'title' => t('Configure'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('aggregator_form_feed', $feed), 'callback arguments' => array('aggregator_form_feed', $feed),
'access' => $edit, 'access' => $edit,
...@@ -154,17 +154,17 @@ function aggregator_menu($may_cache) { ...@@ -154,17 +154,17 @@ function aggregator_menu($may_cache) {
$category = aggregator_get_category(arg(2)); $category = aggregator_get_category(arg(2));
if ($category) { if ($category) {
$items[] = array('path' => 'aggregator/categories/'. $category['cid'] .'/view', $items[] = array('path' => 'aggregator/categories/'. $category['cid'] .'/view',
'title' => t('view'), 'title' => t('View'),
'type' => MENU_DEFAULT_LOCAL_TASK, 'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10); 'weight' => -10);
$items[] = array('path' => 'aggregator/categories/'. $category['cid'] .'/categorize', $items[] = array('path' => 'aggregator/categories/'. $category['cid'] .'/categorize',
'title' => t('categorize'), 'title' => t('Categorize'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('aggregator_page_category'), 'callback arguments' => array('aggregator_page_category'),
'access' => $edit, 'access' => $edit,
'type' => MENU_LOCAL_TASK); 'type' => MENU_LOCAL_TASK);
$items[] = array('path' => 'aggregator/categories/'. $category['cid'] .'/configure', $items[] = array('path' => 'aggregator/categories/'. $category['cid'] .'/configure',
'title' => t('configure'), 'title' => t('Configure'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('aggregator_form_category', $category), 'callback arguments' => array('aggregator_form_category', $category),
'access' => $edit, 'access' => $edit,
...@@ -178,7 +178,7 @@ function aggregator_menu($may_cache) { ...@@ -178,7 +178,7 @@ function aggregator_menu($may_cache) {
$feed = aggregator_get_feed(arg(5)); $feed = aggregator_get_feed(arg(5));
if ($feed) { if ($feed) {
$items[] = array('path' => 'admin/content/aggregator/edit/feed/'. $feed['fid'], $items[] = array('path' => 'admin/content/aggregator/edit/feed/'. $feed['fid'],
'title' => t('edit feed'), 'title' => t('Edit feed'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('aggregator_form_feed', $feed), 'callback arguments' => array('aggregator_form_feed', $feed),
'access' => $edit, 'access' => $edit,
...@@ -189,7 +189,7 @@ function aggregator_menu($may_cache) { ...@@ -189,7 +189,7 @@ function aggregator_menu($may_cache) {
$category = aggregator_get_category(arg(5)); $category = aggregator_get_category(arg(5));
if ($category) { if ($category) {
$items[] = array('path' => 'admin/content/aggregator/edit/category/'. $category['cid'], $items[] = array('path' => 'admin/content/aggregator/edit/category/'. $category['cid'],
'title' => t('edit category'), 'title' => t('Edit category'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('aggregator_form_category', $category), 'callback arguments' => array('aggregator_form_category', $category),
'access' => $edit, 'access' => $edit,
...@@ -1035,7 +1035,7 @@ function aggregator_admin_overview() { ...@@ -1035,7 +1035,7 @@ function aggregator_admin_overview() {
* Menu callback; displays the most recent items gathered from any feed. * Menu callback; displays the most recent items gathered from any feed.
*/ */
function aggregator_page_last() { function aggregator_page_last() {
drupal_add_feed(url('aggregator/rss'), variable_get('site_name', 'drupal') . ' ' . t('aggregator')); drupal_add_feed(url('aggregator/rss'), variable_get('site_name', 'Drupal') . ' ' . t('aggregator'));
return _aggregator_page_list('SELECT i.*, f.title AS ftitle, f.link AS flink FROM {aggregator_item} i INNER JOIN {aggregator_feed} f ON i.fid = f.fid ORDER BY i.timestamp DESC, i.iid DESC', arg(1)); return _aggregator_page_list('SELECT i.*, f.title AS ftitle, f.link AS flink FROM {aggregator_item} i INNER JOIN {aggregator_feed} f ON i.fid = f.fid ORDER BY i.timestamp DESC, i.iid DESC', arg(1));
} }
...@@ -1056,7 +1056,7 @@ function aggregator_page_source() { ...@@ -1056,7 +1056,7 @@ function aggregator_page_source() {
function aggregator_page_category() { function aggregator_page_category() {
$category = db_fetch_object(db_query('SELECT cid, title FROM {aggregator_category} WHERE cid = %d', arg(2))); $category = db_fetch_object(db_query('SELECT cid, title FROM {aggregator_category} WHERE cid = %d', arg(2)));
drupal_add_feed(url('aggregator/rss/'. arg(2)), variable_get('site_name', 'drupal') . ' ' . t('aggregator - @title', array('@title' => $category->title))); drupal_add_feed(url('aggregator/rss/'. arg(2)), variable_get('site_name', 'Drupal') . ' ' . t('aggregator - @title', array('@title' => $category->title)));
return _aggregator_page_list('SELECT i.*, f.title AS ftitle, f.link AS flink FROM {aggregator_category_item} c LEFT JOIN {aggregator_item} i ON c.iid = i.iid LEFT JOIN {aggregator_feed} f ON i.fid = f.fid WHERE cid = '. $category->cid .' ORDER BY timestamp DESC, iid DESC', arg(3)); return _aggregator_page_list('SELECT i.*, f.title AS ftitle, f.link AS flink FROM {aggregator_category_item} c LEFT JOIN {aggregator_item} i ON c.iid = i.iid LEFT JOIN {aggregator_feed} f ON i.fid = f.fid WHERE cid = '. $category->cid .' ORDER BY timestamp DESC, iid DESC', arg(3));
} }
...@@ -1175,7 +1175,7 @@ function aggregator_page_sources() { ...@@ -1175,7 +1175,7 @@ function aggregator_page_sources() {
$output .= theme('item_list', $list); $output .= theme('item_list', $list);
$link['sources'] = array( $link['sources'] = array(
'title' => t('more'), 'title' => t('More'),
'href' => 'aggregator/sources/'. $feed->fid 'href' => 'aggregator/sources/'. $feed->fid
); );
...@@ -1279,7 +1279,7 @@ function aggregator_page_categories() { ...@@ -1279,7 +1279,7 @@ function aggregator_page_categories() {
} }
$link['categories'] = array( $link['categories'] = array(
'title' => t('more'), 'title' => t('More'),
'href' => 'aggregator/categories/'. $category->cid 'href' => 'aggregator/categories/'. $category->cid
); );
......
...@@ -66,24 +66,24 @@ function block_menu($may_cache) { ...@@ -66,24 +66,24 @@ function block_menu($may_cache) {
if ($may_cache) { if ($may_cache) {
$items[] = array( $items[] = array(
'path' => 'admin/build/block', 'path' => 'admin/build/block',
'title' => t('blocks'), 'title' => t('Blocks'),
'access' => user_access('administer blocks'), 'access' => user_access('administer blocks'),
'description' => t('Configure what block content appears in your site\'s sidebars and other regions.'), 'description' => t('Configure what block content appears in your site\'s sidebars and other regions.'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('block_admin_display')); 'callback arguments' => array('block_admin_display'));
$items[] = array('path' => 'admin/build/block/list', 'title' => t('list'), $items[] = array('path' => 'admin/build/block/list', 'title' => t('List'),
'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10);
$items[] = array('path' => 'admin/build/block/configure', 'title' => t('configure block'), $items[] = array('path' => 'admin/build/block/configure', 'title' => t('Configure block'),
'access' => user_access('administer blocks'), 'access' => user_access('administer blocks'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('block_admin_configure'), 'callback arguments' => array('block_admin_configure'),
'type' => MENU_CALLBACK); 'type' => MENU_CALLBACK);
$items[] = array('path' => 'admin/build/block/delete', 'title' => t('delete block'), $items[] = array('path' => 'admin/build/block/delete', 'title' => t('Delete block'),
'access' => user_access('administer blocks'), 'access' => user_access('administer blocks'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('block_box_delete'), 'callback arguments' => array('block_box_delete'),
'type' => MENU_CALLBACK); 'type' => MENU_CALLBACK);
$items[] = array('path' => 'admin/build/block/add', 'title' => t('add block'), $items[] = array('path' => 'admin/build/block/add', 'title' => t('Add block'),
'access' => user_access('administer blocks'), 'access' => user_access('administer blocks'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('block_box_form'), 'callback arguments' => array('block_box_form'),
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
function blog_node_info() { function blog_node_info() {
return array( return array(
'blog' => array( 'blog' => array(
'name' => t('blog entry'), 'name' => t('Blog entry'),
'module' => 'blog', 'module' => 'blog',
'description' => t('A blog is a regularly updated journal or diary made up of individual posts shown in reversed chronological order. Each member of the site may create and maintain a blog.'), 'description' => t('A blog is a regularly updated journal or diary made up of individual posts shown in reversed chronological order. Each member of the site may create and maintain a blog.'),
) )
...@@ -104,7 +104,7 @@ function blog_feed_user($uid = 0) { ...@@ -104,7 +104,7 @@ function blog_feed_user($uid = 0) {
*/ */
function blog_feed_last() { function blog_feed_last() {
$result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, r.teaser, n.created, u.name, u.uid FROM {node} n INNER JOIN {node_revisions} r ON n.vid = r.vid INNER JOIN {users} u ON n.uid = u.uid WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, variable_get('feed_default_items', 10)); $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, r.teaser, n.created, u.name, u.uid FROM {node} n INNER JOIN {node_revisions} r ON n.vid = r.vid INNER JOIN {users} u ON n.uid = u.uid WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, variable_get('feed_default_items', 10));
$channel['title'] = variable_get('site_name', 'drupal') .' blogs'; $channel['title'] = variable_get('site_name', 'Drupal') .' blogs';
$channel['link'] = url('blog', NULL, NULL, TRUE); $channel['link'] = url('blog', NULL, NULL, TRUE);
$channel['description'] = $term->description; $channel['description'] = $term->description;
node_feed($result, $channel); node_feed($result, $channel);
...@@ -228,7 +228,7 @@ function blog_form(&$node) { ...@@ -228,7 +228,7 @@ function blog_form(&$node) {
function blog_view($node, $teaser = FALSE, $page = FALSE) { function blog_view($node, $teaser = FALSE, $page = FALSE) {
if ($page) { if ($page) {
// Breadcrumb navigation // Breadcrumb navigation
$breadcrumb[] = array('path' => 'blog', 'title' => t('blogs')); $breadcrumb[] = array('path' => 'blog', 'title' => t('Blogs'));
$breadcrumb[] = array('path' => 'blog/'. $node->uid, 'title' => t("@name's blog", array('@name' => $node->name))); $breadcrumb[] = array('path' => 'blog/'. $node->uid, 'title' => t("@name's blog", array('@name' => $node->name)));
$breadcrumb[] = array('path' => 'node/'. $node->nid); $breadcrumb[] = array('path' => 'node/'. $node->nid);
menu_set_location($breadcrumb); menu_set_location($breadcrumb);
...@@ -263,13 +263,13 @@ function blog_menu($may_cache) { ...@@ -263,13 +263,13 @@ function blog_menu($may_cache) {
$items = array(); $items = array();
if ($may_cache) { if ($may_cache) {
$items[] = array('path' => 'node/add/blog', 'title' => t('blog entry'), $items[] = array('path' => 'node/add/blog', 'title' => t('Blog entry'),
'access' => user_access('edit own blog')); 'access' => user_access('edit own blog'));
$items[] = array('path' => 'blog', 'title' => t('blogs'), $items[] = array('path' => 'blog', 'title' => t('Blogs'),
'callback' => 'blog_page', 'callback' => 'blog_page',
'access' => user_access('access content'), 'access' => user_access('access content'),
'type' => MENU_SUGGESTED_ITEM); 'type' => MENU_SUGGESTED_ITEM);
$items[] = array('path' => 'blog/'. $user->uid, 'title' => t('my blog'), $items[] = array('path' => 'blog/'. $user->uid, 'title' => t('My blog'),
'access' => user_access('edit own blog'), 'access' => user_access('edit own blog'),
'type' => MENU_DYNAMIC_ITEM); 'type' => MENU_DYNAMIC_ITEM);
} }
......
...@@ -576,7 +576,7 @@ function blogapi_menu($may_cache) { ...@@ -576,7 +576,7 @@ function blogapi_menu($may_cache) {
'type' => MENU_CALLBACK); 'type' => MENU_CALLBACK);
$items[] = array( $items[] = array(
'path' => 'admin/settings/blogapi', 'path' => 'admin/settings/blogapi',
'title' => t('blog APIs'), 'title' => t('Blog APIs'),
'description' => t('Configure which content types and engines external blog clients can use.'), 'description' => t('Configure which content types and engines external blog clients can use.'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('blogapi_admin_settings'), 'callback arguments' => array('blogapi_admin_settings'),
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
function book_node_info() { function book_node_info() {
return array( return array(
'book' => array( 'book' => array(
'name' => t('book page'), 'name' => t('Book page'),
'module' => 'book', 'module' => 'book',
'description' => t("A book is a collaborative writing effort: users can collaborate writing the pages of the book, positioning the pages in the right order, and reviewing or modifying pages previously written. So when you have some information to share or when you read a page of the book and you didn't like it, or if you think a certain page could have been written better, you can do something about it."), 'description' => t("A book is a collaborative writing effort: users can collaborate writing the pages of the book, positioning the pages in the right order, and reviewing or modifying pages previously written. So when you have some information to share or when you read a page of the book and you didn't like it, or if you think a certain page could have been written better, you can do something about it."),
) )
...@@ -65,13 +65,13 @@ function book_link($type, $node = NULL, $teaser = FALSE) { ...@@ -65,13 +65,13 @@ function book_link($type, $node = NULL, $teaser = FALSE) {
if (!$teaser) { if (!$teaser) {
if (book_access('create', $node)) { if (book_access('create', $node)) {
$links['book_add_child'] = array( $links['book_add_child'] = array(
'title' => t('add child page'), 'title' => t('Add child page'),
'href' => "node/add/book/parent/$node->nid" 'href' => "node/add/book/parent/$node->nid"
); );
} }
if (user_access('see printer-friendly version')) { if (user_access('see printer-friendly version')) {
$links['book_printer'] = array( $links['book_printer'] = array(
'title' => t('printer-friendly version'), 'title' => t('Printer-friendly version'),
'href' => 'book/export/html/'. $node->nid, 'href' => 'book/export/html/'. $node->nid,
'attributes' => array('title' => t('Show a printer-friendly version of this book page and its sub-pages.')) 'attributes' => array('title' => t('Show a printer-friendly version of this book page and its sub-pages.'))
); );
...@@ -91,24 +91,24 @@ function book_menu($may_cache) { ...@@ -91,24 +91,24 @@ function book_menu($may_cache) {
if ($may_cache) { if ($may_cache) {
$items[] = array( $items[] = array(
'path' => 'admin/content/book', 'path' => 'admin/content/book',
'title' => t('books'), 'title' => t('Books'),
'description' => t('Manage site\'s books and orphaned book pages.'), 'description' => t('Manage site\'s books and orphaned book pages.'),
'callback' => 'book_admin', 'callback' => 'book_admin',
'access' => user_access('administer nodes')); 'access' => user_access('administer nodes'));
$items[] = array( $items[] = array(
'path' => 'admin/content/book/list', 'path' => 'admin/content/book/list',
'title' => t('list'), 'title' => t('List'),
'type' => MENU_DEFAULT_LOCAL_TASK); 'type' => MENU_DEFAULT_LOCAL_TASK);
$items[] = array( $items[] = array(
'path' => 'admin/content/book/orphan', 'path' => 'admin/content/book/orphan',
'title' => t('orphan pages'), 'title' => t('Orphan pages'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('book_admin_orphan'), 'callback arguments' => array('book_admin_orphan'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_TASK,
'weight' => 8); 'weight' => 8);
$items[] = array( $items[] = array(
'path' => 'book', 'path' => 'book',
'title' => t('books'), 'title' => t('Books'),
'callback' => 'book_render', 'callback' => 'book_render',
'access' => user_access('access content'), 'access' => user_access('access content'),
'type' => MENU_SUGGESTED_ITEM); 'type' => MENU_SUGGESTED_ITEM);
...@@ -131,7 +131,7 @@ function book_menu($may_cache) { ...@@ -131,7 +131,7 @@ function book_menu($may_cache) {
if (db_num_rows($result) > 0) { if (db_num_rows($result) > 0) {
$items[] = array( $items[] = array(
'path' => 'node/'. arg(1) .'/outline', 'path' => 'node/'. arg(1) .'/outline',
'title' => t('outline'), 'title' => t('Outline'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('book_outline', arg(1)), 'callback arguments' => array('book_outline', arg(1)),
'access' => user_access('outline posts in books'), 'access' => user_access('outline posts in books'),
......
...@@ -100,20 +100,20 @@ function comment_menu($may_cache) { ...@@ -100,20 +100,20 @@ function comment_menu($may_cache) {
$access = user_access('administer comments'); $access = user_access('administer comments');
$items[] = array( $items[] = array(
'path' => 'admin/content/comment', 'path' => 'admin/content/comment',
'title' => t('comments'), 'title' => t('Comments'),
'description' => t('List and edit site comments and the comment moderation queue.'), 'description' => t('List and edit site comments and the comment moderation queue.'),
'callback' => 'comment_admin', 'callback' => 'comment_admin',
'access' => $access 'access' => $access
); );
// Tabs: // Tabs:
$items[] = array('path' => 'admin/content/comment/list', 'title' => t('list'), $items[] = array('path' => 'admin/content/comment/list', 'title' => t('List'),
'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10);
// Subtabs: // Subtabs:
$items[] = array('path' => 'admin/content/comment/list/new', 'title' => t('published comments'), $items[] = array('path' => 'admin/content/comment/list/new', 'title' => t('Published comments'),
'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10);
$items[] = array('path' => 'admin/content/comment/list/approval', 'title' => t('approval queue'), $items[] = array('path' => 'admin/content/comment/list/approval', 'title' => t('Approval queue'),
'callback' => 'comment_admin', 'callback' => 'comment_admin',
'callback arguments' => array('approval'), 'callback arguments' => array('approval'),
'access' => $access, 'access' => $access,
...@@ -121,18 +121,18 @@ function comment_menu($may_cache) { ...@@ -121,18 +121,18 @@ function comment_menu($may_cache) {
$items[] = array( $items[] = array(
'path' => 'admin/content/comment/settings', 'path' => 'admin/content/comment/settings',
'title' => t('settings'), 'title' => t('Settings'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('comment_admin_settings'), 'callback arguments' => array('comment_admin_settings'),
'access' => $access, 'access' => $access,
'weight' => 10, 'weight' => 10,
'type' => MENU_LOCAL_TASK); 'type' => MENU_LOCAL_TASK);
$items[] = array('path' => 'comment/delete', 'title' => t('delete comment'), $items[] = array('path' => 'comment/delete', 'title' => t('Delete comment'),
'callback' => 'comment_delete', 'access' => $access, 'type' => MENU_CALLBACK); 'callback' => 'comment_delete', 'access' => $access, 'type' => MENU_CALLBACK);
$access = user_access('post comments'); $access = user_access('post comments');
$items[] = array('path' => 'comment/edit', 'title' => t('edit comment'), $items[] = array('path' => 'comment/edit', 'title' => t('Edit comment'),
'callback' => 'comment_edit', 'callback' => 'comment_edit',
'access' => $access, 'type' => MENU_CALLBACK); 'access' => $access, 'type' => MENU_CALLBACK);
} }
...@@ -140,12 +140,12 @@ function comment_menu($may_cache) { ...@@ -140,12 +140,12 @@ function comment_menu($may_cache) {
if (arg(0) == 'comment' && arg(1) == 'reply' && is_numeric(arg(2))) { if (arg(0) == 'comment' && arg(1) == 'reply' && is_numeric(arg(2))) {
$node = node_load(arg(2)); $node = node_load(arg(2));
if ($node->nid) { if ($node->nid) {
$items[] = array('path' => 'comment/reply', 'title' => t('reply to comment'), $items[] = array('path' => 'comment/reply', 'title' => t('Reply to comment'),
'callback' => 'comment_reply', 'access' => node_access('view', $node), 'type' => MENU_CALLBACK); 'callback' => 'comment_reply', 'access' => node_access('view', $node), 'type' => MENU_CALLBACK);
} }
} }
if ((arg(0) == 'node') && is_numeric(arg(1)) && is_numeric(arg(2))) { if ((arg(0) == 'node') && is_numeric(arg(1)) && is_numeric(arg(2))) {
$items[] = array('path' => ('node/'. arg(1) .'/'. arg(2)), 'title' => t('view'), $items[] = array('path' => ('node/'. arg(1) .'/'. arg(2)), 'title' => t('View'),
'callback' => 'node_page', 'callback' => 'node_page',
'type' => MENU_CALLBACK); 'type' => MENU_CALLBACK);
} }
...@@ -244,7 +244,7 @@ function comment_link($type, $node = NULL, $teaser = FALSE) { ...@@ -244,7 +244,7 @@ function comment_link($type, $node = NULL, $teaser = FALSE) {
if (user_access('post comments')) { if (user_access('post comments')) {
if (variable_get('comment_form_location', COMMENT_FORM_SEPARATE_PAGE) == COMMENT_FORM_SEPARATE_PAGE) { if (variable_get('comment_form_location', COMMENT_FORM_SEPARATE_PAGE) == COMMENT_FORM_SEPARATE_PAGE) {
$links['comment_add'] = array( $links['comment_add'] = array(
'title' => t('add new comment'), 'title' => t('Add new comment'),
'href' => "comment/reply/$node->nid", 'href' => "comment/reply/$node->nid",
'attributes' => array('title' => t('Share your thoughts and opinions related to this posting.')), 'attributes' => array('title' => t('Share your thoughts and opinions related to this posting.')),
'fragment' => 'comment_form' 'fragment' => 'comment_form'
......
...@@ -49,19 +49,19 @@ function contact_menu($may_cache) { ...@@ -49,19 +49,19 @@ function contact_menu($may_cache) {
$items = array(); $items = array();
if ($may_cache) { if ($may_cache) {
$items[] = array('path' => 'admin/build/contact', $items[] = array('path' => 'admin/build/contact',
'title' => t('contact form'), 'title' => t('Contact form'),
'description' => t('Create a system contact form and set up categories for the form to use.'), 'description' => t('Create a system contact form and set up categories for the form to use.'),
'callback' => 'contact_admin_categories', 'callback' => 'contact_admin_categories',
'access' => user_access('administer site configuration'), 'access' => user_access('administer site configuration'),
); );
$items[] = array('path' => 'admin/build/contact/list', $items[] = array('path' => 'admin/build/contact/list',
'title' => t('list'), 'title' => t('List'),
'callback' => 'contact_admin_categories', 'callback' => 'contact_admin_categories',
'access' => user_access('administer site configuration'), 'access' => user_access('administer site configuration'),
'type' => MENU_DEFAULT_LOCAL_TASK, 'type' => MENU_DEFAULT_LOCAL_TASK,
); );
$items[] = array('path' => 'admin/build/contact/add', $items[] = array('path' => 'admin/build/contact/add',
'title' => t('add category'), 'title' => t('Add category'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('contact_admin_edit'), 'callback arguments' => array('contact_admin_edit'),
'access' => user_access('administer site configuration'), 'access' => user_access('administer site configuration'),
...@@ -69,21 +69,21 @@ function contact_menu($may_cache) { ...@@ -69,21 +69,21 @@ function contact_menu($may_cache) {
'weight' => 1, 'weight' => 1,
); );
$items[] = array('path' => 'admin/build/contact/edit', $items[] = array('path' => 'admin/build/contact/edit',
'title' => t('edit contact category'), 'title' => t('Edit contact category'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('contact_admin_edit'), 'callback arguments' => array('contact_admin_edit'),
'access' => user_access('administer site configuration'), 'access' => user_access('administer site configuration'),
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
); );
$items[] = array('path' => 'admin/build/contact/delete', $items[] = array('path' => 'admin/build/contact/delete',
'title' => t('delete contact'), 'title' => t('Delete contact'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('contact_admin_delete'), 'callback arguments' => array('contact_admin_delete'),
'access' => user_access('administer site configuration'), 'access' => user_access('administer site configuration'),
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
); );
$items[] = array('path' => 'admin/build/contact/settings', $items[] = array('path' => 'admin/build/contact/settings',
'title' => t('settings'), 'title' => t('Settings'),
'callback' => 'drupal_get_form', 'callback' => 'drupal_get_form',
'callback arguments' => array('contact_admin_settings'), 'callback arguments' => array('contact_admin_settings'),
'access' => user_access('administer site configuration'), 'access' => user_access('administer site configuration'),
...@@ -91,7 +91,7 @@ function contact_menu($may_cache) { ...@@ -91,7 +91,7 @@ function contact_menu($may_cache) {
'weight' => 2, 'weight' => 2,
); );
$items[] = array('path' => 'contact', $items[] = array('path' => 'contact',
'title' => t('contact'), 'title' => t('Contact'),
'callback' => 'contact_site_page', 'callback' => 'contact_site_page',
'access' => user_access('access site-wide contact form'), 'access' => user_access('access site-wide contact form'),
'type' => MENU_SUGGESTED_ITEM, 'type' => MENU_SUGGESTED_ITEM,
...@@ -103,7 +103,7 @@ function contact_menu($may_cache) { ...@@ -103,7 +103,7 @@ function contact_menu($may_cache) {
$account = user_load(array('uid' => arg(1))); $account = user_load(array('uid' => arg(1)));
if (($user->uid != $account->uid && $account->contact) || user_access('administer users')) { if (($user->uid != $account->uid && $account->contact) || user_access('administer users')) {
$items[] = array('path' => 'user/'. arg(1) .'/contact', $items[] = array('path' => 'user/'. arg(1) .'/contact',
'title' => t('contact'), 'title' => t('Contact'),
'callback' => 'contact_user_page', 'callback' => 'contact_user_page',
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_TASK,
'access' => $user->uid, 'access' => $user->uid,
...@@ -365,7 +365,7 @@ function contact_mail_user_submit($form_id, $form_values) { ...@@ -365,7 +365,7 @@ function contact_mail_user_submit($form_id, $form_values) {
$account = user_load(array('uid' => arg(1), 'status' => 1)); $account = user_load(array('uid' => arg(1), 'status' => 1));
// Compose the body: // Compose the body:
$message[] = "$account->name,"; $message[] = "$account->name,";
$message[] = t("!name (!name-url) has sent you a message via your contact form (!form-url) at !site.", array('!name' => $user->name, '!name-url' => url("user/$user->uid", NULL, NULL, TRUE), '!form-url' => url($_GET['q'], NULL, NULL, TRUE), '!site' => variable_get('site_name', 'drupal'))); $message[] = t("!name (!name-url) has sent you a message via your contact form (!form-url) at !site.", array('!name' => $user->name, '!name-url' => url("user/$user->uid", NULL, NULL, TRUE), '!form-url' => url($_GET['q'], NULL, NULL, TRUE), '!site' => variable_get('site_name', 'Drupal')));
$message[] = t("If you don't want to receive such e-mails, you can change your settings at !url.", array('!url' => url("user/$account->uid", NULL, NULL, TRUE))); $message[] = t("If you don't want to receive such e-mails, you can change your settings at !url.", array('!url' => url("user/$account->uid", NULL, NULL, TRUE)));
$message[] = t('Message:'); $message[] = t('Message:');
$message[] = $form_values['message']; $message[] = $form_values['message'];
...@@ -380,7 +380,7 @@ function contact_mail_user_submit($form_id, $form_values) { ...@@ -380,7 +380,7 @@ function contact_mail_user_submit($form_id, $form_values) {
$from = $user->mail; $from = $user->mail;