summaryrefslogtreecommitdiff
path: root/modules/blog
diff options
context:
space:
mode:
Diffstat (limited to 'modules/blog')
-rw-r--r--modules/blog/blog.module6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index d3e4a49c8..5b853ddbe 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -185,7 +185,7 @@ function blog_page_last() {
*/
function blog_form(&$node) {
global $nid;
- $iid = $_GET['iid'];
+ $iid = isset($_GET['iid']) ? (int)$_GET['iid'] : 0;
$type = node_get_types('type', $node);
@@ -207,8 +207,8 @@ function blog_form(&$node) {
}
- $form['title'] = array('#type' => 'textfield', '#title' => check_plain($type->title_label), '#required' => TRUE, '#default_value' => $node->title, '#weight' => -5);
- $form['body_filter']['body'] = array('#type' => 'textarea', '#title' => check_plain($type->body_label), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
+ $form['title'] = array('#type' => 'textfield', '#title' => check_plain($type->title_label), '#required' => TRUE, '#default_value' => !empty($node->title) ? $node->title : NULL, '#weight' => -5);
+ $form['body_filter']['body'] = array('#type' => 'textarea', '#title' => check_plain($type->body_label), '#default_value' => !empty($node->body) ? $node->title : NULL, '#rows' => 20, '#required' => TRUE);
$form['body_filter']['filter'] = filter_form($node->format);
return $form;
}