summaryrefslogtreecommitdiff
path: root/modules/story.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-08-11 14:54:39 +0000
committerDries Buytaert <dries@buytaert.net>2001-08-11 14:54:39 +0000
commit808b6b6cae71afd741023a0c08a6c925f2198752 (patch)
treed17e890898959601d841227fecd538f135371bfc /modules/story.module
parent876536a955b783c4f82185dc45557ef3b1bd949f (diff)
downloadbrdo-808b6b6cae71afd741023a0c08a6c925f2198752.tar.gz
brdo-808b6b6cae71afd741023a0c08a6c925f2198752.tar.bz2
- Changed the authentication and login scheme as discussed on the mailing
list. - Fixed the export function in book.module (patch my Julian). - Fixed the comment alignment (comments got truncated).
Diffstat (limited to 'modules/story.module')
-rw-r--r--modules/story.module6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/story.module b/modules/story.module
index 9ce78fd2c..a6bae74d2 100644
--- a/modules/story.module
+++ b/modules/story.module
@@ -16,7 +16,7 @@ function story_search($keys) {
global $status, $user;
$result = db_query("SELECT n.*, s.* FROM story s LEFT JOIN node n ON n.nid = s.nid AND n.lid = s.lid WHERE n.status = '$status[posted]' AND (n.title LIKE '%$keys%' OR s.abstract LIKE '%$keys%' OR s.body LIKE '%$keys%') ORDER BY n.timestamp DESC LIMIT 20");
while ($story = db_fetch_object($result)) {
- $find[$i++] = array("title" => check_output($story->title), "link" => (user_access("administer nodes") ? "admin.php?mod=node&type=story&op=edit&id=$story->nid" : "node.php?id=$story->nid"), "user" => $story->userid, "date" => $story->timestamp);
+ $find[$i++] = array("title" => check_output($story->title), "link" => (user_access("administer nodes") ? "admin.php?mod=node&type=story&op=edit&id=$story->nid" : "node.php?id=$story->nid"), "user" => $story->name, "date" => $story->timestamp);
}
return $find;
}
@@ -46,8 +46,8 @@ function story_form($edit = array()) {
story_view(new Story(node_preview($edit)));
}
- $form .= form_item(t("Your name"), format_username(($edit[userid] ? $edit[userid] : $user->userid)));
- $form .= form_hidden("userid", $edit[userid]);
+ $form .= form_item(t("Your name"), format_name(($edit[name] ? $edit[name] : $user->name)));
+ $form .= form_hidden("name", $edit[name]);
$form .= form_textfield(t("Subject"), "title", $edit[title], 50, 64);
$form .= node_attributes_edit("story", $edit);
$form .= form_textarea(t("Abstract"), "abstract", $edit[abstract], 70, 10, t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "")));