Changeset 1401
- Timestamp:
- 12/06/07 22:09:24 (1 year ago)
- Files:
-
- devel/mod/blog/lib/weblogs_actions.php (modified) (6 diffs)
- devel/mod/blog/lib/weblogs_posts_add.php (modified) (2 diffs)
- devel/mod/blog/lib/weblogs_posts_edit.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/mod/blog/lib/weblogs_actions.php
r1395 r1401 24 24 if(!empty($assigned)){ 25 25 $post->weblog = $assigned; 26 define('redirect_url',url . user_info("username",$assigned) . "/$extensionContext/");27 26 } 28 }29 else{30 define('redirect_url',url . user_info("username",$page_owner) . "/$extensionContext/");31 27 } 32 28 … … 47 43 $type = strtolower(blog_get_extension($extensionContext, 'type', 'post')); 48 44 45 // redirect to post view 46 define('redirect_url', url.user_info('username', $post->weblog)."/{$extensionContext}/{$post->ident}.html"); 49 47 if (user_type($post->weblog) == "person") { 50 48 $messages[] = sprintf(__gettext("Your %s has been added."),$type); … … 53 51 $messages[] = sprintf(__gettext("Your %s has been added to the %s group."),$type,user_info("name",$post->weblog)); 54 52 } 53 } else { 54 define('redirect_url', url.user_info('username', $post->weblog)."/{$extensionContext}/"); 55 55 } 56 56 } else { … … 174 174 $comment = plugin_hook("weblog_comment","publish",$comment); 175 175 176 $messages[] = __gettext("Your comment has been added."); // gettext variable 177 176 178 // If we're logged on and not the owner of this post, add post to our watchlist 177 179 if (logged_on && $comment->owner != $post->owner) { … … 190 192 $message = wordwrap($message); 191 193 message_user($post->owner,$comment->owner,stripslashes($post->title),$message); 192 $messages[] = __gettext("Your comment has been added."); // gettext variable193 194 } 194 195 … … 216 217 define('redirect_url',url . user_info("username",$post->owner) . "/$extensionContext/" . $commentbackup->post_id . ".html"); 217 218 } 219 } else { 220 $messages[] = __gettext("Your comment body or name is empty."); 218 221 } 219 222 break; devel/mod/blog/lib/weblogs_posts_add.php
r1395 r1401 33 33 $contentBody = trim(optional_param('body')); 34 34 35 $redirect = url . user_info('username', $page_owner) . "/ weblog/";35 $redirect = url . user_info('username', $page_owner) . "/$extensionContext/"; 36 36 37 37 $username = $_SESSION['username']; … … 118 118 } else { 119 119 120 $body = ''; 120 121 $run_result .= "<p>" . __gettext("You must be logged in to post a new entry. You may do so using the login pane to the right of the screen.") . "</p>"; 121 122 devel/mod/blog/lib/weblogs_posts_edit.php
r1396 r1401 59 59 $body = <<< END 60 60 61 <form method="post" name="elggform" action="{$CFG->wwwroot}{$username}/ weblog/{$post->ident}.html" onsubmit="return submitForm();" enctype="multipart/form-data">61 <form method="post" name="elggform" action="{$CFG->wwwroot}{$username}/{$extensionContext}/{$post->ident}.html" onsubmit="return submitForm();" enctype="multipart/form-data"> 62 62 63 63 <h2>$editPost</h2>
