summaryrefslogtreecommitdiff
path: root/modules/title.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/title.module')
-rw-r--r--modules/title.module13
1 files changed, 3 insertions, 10 deletions
diff --git a/modules/title.module b/modules/title.module
index 5e6c2e6bd..47c956c3e 100644
--- a/modules/title.module
+++ b/modules/title.module
@@ -1,18 +1,11 @@
<?php
// $Id$
-function title_system($field){
- $output = "";
-
- if ($field == "description") {$output = title_help("admin/system/modules"); };
- return $output;
-}
-
function title_help($section) {
$output = "";
switch ($section) {
- case 'admin/system/modules':
+ case 'admin/system/modules#description':
$output = t("Enables users to link to stories, articles or similar content by title.");
break;
}
@@ -29,7 +22,7 @@ function title_page() {
if (db_num_rows($result) == 0) {
// No node with exact title found, try substring.
- $result = db_query("SELECT n.*, u.name, u.uid FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.title LIKE '%". check_query($title). "%' AND n.status = 1 ORDER BY n.created DESC");
+ $result = db_query("SELECT n.*, u.name, u.uid FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.title LIKE '%". check_query($title) ."%' AND n.status = 1 ORDER BY n.created DESC");
}
if (db_num_rows($result) == 0 && module_exist("search")) {
@@ -70,7 +63,7 @@ function title_page() {
// filter [node title|description] links. '|description' is optional.
function title_filter($text) {
- if(variable_get("title_filter_link", 0)) {
+ if (variable_get("title_filter_link", 0)) {
$pattern = '\[([^\|\]]+)(?>\|?)(.*?)\]'; // $1 == title: matches at least 1 char up to the first '|' or ']'
// $2 == text: matches all after a following '|' (if there is) up to the next ']'. may include '|'s.
$replacement = 'l("$2" ? "$2" : "$1", "title/". urlencode("$1"))';