<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[BuddyPress] [2012] trunk: Fixing missing translation,
updating group forums so topic posters can edit their post.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>2012</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2009-09-30 17:49:55 +0000 (Wed, 30 Sep 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fixing missing translation, updating group forums so topic posters can edit their post.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcorephp">trunk/bp-core.php</a></li>
<li><a href="#trunkbpforumsbpforumstemplatetagsphp">trunk/bp-forums/bp-forums-templatetags.php</a></li>
<li><a href="#trunkbpthemesbpsnparentgroupssingleforumtopicphp">trunk/bp-themes/bp-sn-parent/groups/single/forum/topic.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcorephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core.php (2011 => 2012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core.php        2009-09-30 17:30:40 UTC (rev 2011)
+++ trunk/bp-core.php        2009-09-30 17:49:55 UTC (rev 2012)
</span><span class="lines">@@ -1750,7 +1750,7 @@
</span><span class="cx"> * @package BuddyPress Core
</span><span class="cx"> */
</span><span class="cx"> function bp_core_update_message() {
</span><del>-        echo '<p style="color: red; margin: 3px 0 0 0; border-top: 1px solid #ddd; padding-top: 3px">IMPORTANT: <a href="http://codex.buddypress.org/getting-started/upgrading-from-10x/">Read this before attempting to update BuddyPress</p>';
</del><ins>+        echo '<p style="color: red; margin: 3px 0 0 0; border-top: 1px solid #ddd; padding-top: 3px">' . __( 'IMPORTANT: <a href="http://codex.buddypress.org/getting-started/upgrading-from-10x/">Read this before attempting to update BuddyPress</a>', 'buddypress' ) . '</p>';
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'in_plugin_update_message-buddypress/bp-loader.php', 'bp_core_update_message' );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpforumsbpforumstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-templatetags.php (2011 => 2012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-templatetags.php        2009-09-30 17:30:40 UTC (rev 2011)
+++ trunk/bp-forums/bp-forums-templatetags.php        2009-09-30 17:49:55 UTC (rev 2012)
</span><span class="lines">@@ -509,11 +509,20 @@
</span><span class="cx">                 return apply_filters( 'bp_get_the_topic_time_since_last_post', bp_core_time_since( strtotime( $forum_template->topic->topic_time ) ) );
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+function bp_the_topic_is_mine() {
+        echo bp_get_the_topic_is_mine();
+}
+        function bp_get_the_topic_is_mine() {
+                global $bp, $forum_template;
+        
+                return $bp->loggedin_user->id == $forum_template->topic->topic_poster;
+        }
+
</ins><span class="cx"> function bp_the_topic_admin_links( $args = '' ) {
</span><span class="cx">         echo bp_get_the_topic_admin_links( $args );
</span><span class="cx"> }
</span><span class="cx">         function bp_get_the_topic_admin_links( $args = '' ) {
</span><del>-                global $forum_template;        
</del><ins>+                global $bp, $forum_template;        
</ins><span class="cx">                 
</span><span class="cx">                 $defaults = array(
</span><span class="cx">                         'seperator' => '|'
</span><span class="lines">@@ -522,21 +531,23 @@
</span><span class="cx">                 $r = wp_parse_args( $args, $defaults );
</span><span class="cx">                 extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><del>-                $links = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'edit', 'bp_forums_edit_topic' ) . '">' . __( 'Edit', 'buddypress' ) . '</a> ' . $seperator . ' ';
</del><ins>+                $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'edit', 'bp_forums_edit_topic' ) . '">' . __( 'Edit', 'buddypress' ) . '</a>';
+                
+                if ( $bp->is_item_admin || $bp->is_item_mod || is_site_admin() ) {
+                        if ( 0 == (int)$forum_template->topic->topic_sticky )
+                                $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'stick', 'bp_forums_stick_topic' ) . '">' . __( 'Sticky', 'buddypress' ) . '</a>';
+                        else
+                                $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'unstick', 'bp_forums_unstick_topic' ) . '">' . __( 'Un-stick', 'buddypress' ) . '</a>';
</ins><span class="cx">
</span><del>-                if ( 0 == (int)$forum_template->topic->topic_sticky )
-                        $links .= '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'stick', 'bp_forums_stick_topic' ) . '">' . __( 'Sticky', 'buddypress' ) . '</a> ' . $seperator . ' ';
-                else
-                        $links .= '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'unstick', 'bp_forums_unstick_topic' ) . '">' . __( 'Un-stick', 'buddypress' ) . '</a> ' . $seperator . ' ';
</del><ins>+                        if ( 0 == (int)$forum_template->topic->topic_open )
+                                $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'open', 'bp_forums_open_topic' ) . '">' . __( 'Open', 'buddypress' ) . '</a>';
+                        else
+                                $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'close', 'bp_forums_close_topic' ) . '">' . __( 'Close', 'buddypress' ) . '</a>';
</ins><span class="cx">
</span><del>-                if ( 0 == (int)$forum_template->topic->topic_open )
-                        $links .= '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'open', 'bp_forums_open_topic' ) . '">' . __( 'Open', 'buddypress' ) . '</a> ' . $seperator . ' ';
-                else
-                        $links .= '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'close', 'bp_forums_close_topic' ) . '">' . __( 'Close', 'buddypress' ) . '</a> ' . $seperator . ' ';
-
-                $links .= '<a class="confirm" id="topic-delete-link" href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'delete', 'bp_forums_delete_topic' ) . '">' . __( 'Delete', 'buddypress' ) . '</a>';
-
-                return $links;
</del><ins>+                        $links[] = '<a class="confirm" id="topic-delete-link" href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'delete', 'bp_forums_delete_topic' ) . '">' . __( 'Delete', 'buddypress' ) . '</a>';
+                }
+                
+                return implode( ' ' . $seperator . ' ', (array) $links );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_the_topic_css_class() {
</span></span></pre></div>
<a id="trunkbpthemesbpsnparentgroupssingleforumtopicphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-parent/groups/single/forum/topic.php (2011 => 2012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/groups/single/forum/topic.php        2009-09-30 17:30:40 UTC (rev 2011)
+++ trunk/bp-themes/bp-sn-parent/groups/single/forum/topic.php        2009-09-30 17:49:55 UTC (rev 2012)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">                                                         <span class="small"><a href="<?php bp_forum_permalink() ?>">&larr; <?php _e( 'Group Forum', 'buddypress' ) ?></a> | <a href="<?php bp_forum_directory_permalink() ?>"><?php _e( 'Forum Topic Directory', 'buddypress') ?></a></span>
</span><span class="cx">                                                         <h3><?php bp_the_topic_title() ?> (<?php bp_the_topic_total_post_count() ?>)</h3>
</span><span class="cx">                                                         
</span><del>-                                                        <?php if ( bp_group_is_admin() || bp_group_is_mod() ) : ?>
</del><ins>+                                                        <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_is_mine() ) : ?>
</ins><span class="cx">                                                                 <div class="admin-links"><?php bp_the_topic_admin_links() ?></div>
</span><span class="cx">                                                         <?php endif; ?>
</span><span class="cx">                                                 </li>
</span></span></pre>
</div>
</div>
</body>
</html>