Changeset 766

Show
Ignore:
Timestamp:
12/18/06 19:41:44 (2 years ago)
Author:
ben
Message:

Redirects now work if comment adding fails.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/units/weblogs/weblogs_actions.php

    r765 r766  
    128128        $comment->body = trim(optional_param('new_weblog_comment')); 
    129129        $comment->postedname = trim(optional_param('postedname')); 
     130        $commentbackup = $comment; 
    130131        if (!empty($comment->post_id) && !empty($comment->body) && !empty($comment->postedname)) { 
    131132            $where = run("users:access_level_sql_where",$USER->ident); 
     
    166167                    $messages[] = __gettext("Your comment could not be posted. The system thought it was spam."); 
    167168                } 
    168                 define('redirect_url',url . user_info("username",$page_owner) . "/weblog/" . $comment->post_id . ".html"); 
     169                define('redirect_url',url . user_info("username",$page_owner) . "/weblog/" . $commentbackup->post_id . ".html"); 
    169170            } 
    170171        }