summaryrefslogtreecommitdiff
path: root/modules/title.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/title.module')
-rw-r--r--modules/title.module17
1 files changed, 10 insertions, 7 deletions
diff --git a/modules/title.module b/modules/title.module
index 78b7177c4..907dd007e 100644
--- a/modules/title.module
+++ b/modules/title.module
@@ -6,7 +6,7 @@
*/
function title_help($section) {
switch ($section) {
- case 'admin/system/modules#description':
+ case 'admin/modules#description':
return t('Enables users to link to stories, articles or similar content by title.');
case 'filter#short-tip' :
return t('<a href=\"%title-help\">Link to content</a> on this site using <em>[title|text]</em>.', array("%title-help" => url('filter/tips', NULL, 'filter-title')));
@@ -16,12 +16,15 @@ function title_help($section) {
}
/**
- * Implementation of hook_link().
+ * Implementation of hook_menu().
*/
-function title_link($type) {
- if ($type == 'system') {
- menu('title', t('search'), user_access('access content') ? 'title_page' : MENU_DENIED, 0, MENU_HIDE, MENU_LOCKED);
- }
+function title_menu() {
+ $items = array();
+ $items[] = array('path' => 'title', 'title' => t('search'),
+ 'callback' => 'title_page',
+ 'access' => user_access('access content'),
+ 'type' => MENU_CALLBACK);
+ return $items;
}
/**
@@ -50,7 +53,7 @@ function title_page($query) {
$header = array(t('Type'), t('Title'), t('Author'));
while ($node = db_fetch_object($result)) {
$type = ucfirst(module_invoke($node->type, 'node', 'name'));
- $title = l($node->title, "node/view/$node->nid");
+ $title = l($node->title, "node/$node->nid");
$author = format_name($node);
$rows[] = array(array('data' => $type, 'class' => 'type'), array('data' => $title, 'class' => 'content'), array('data' => $author, 'class' => 'author'));
}