diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-10-07 18:16:41 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-10-07 18:16:41 +0000 |
commit | 22c889e7c05b1c2dd98ad5e6b3547234a3f6596f (patch) | |
tree | 8b63c79053762af3284384a7e8c54a2d3e9b0d45 /modules/title.module | |
parent | fbc674f14301fd92f97f2506a72c22b7d51c1c43 (diff) | |
download | brdo-22c889e7c05b1c2dd98ad5e6b3547234a3f6596f.tar.gz brdo-22c889e7c05b1c2dd98ad5e6b3547234a3f6596f.tar.bz2 |
- Help system improvements: eliminated the _system hook. Patch by Michael.
- Bloggerapi module fixes. Patch by Kjartan.
- Coding style fixes. Patch by Michael.
Diffstat (limited to 'modules/title.module')
-rw-r--r-- | modules/title.module | 13 |
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"))'; |