<!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 '&lt;p style=&quot;color: red; margin: 3px 0 0 0; border-top: 1px solid #ddd; padding-top: 3px&quot;&gt;IMPORTANT: &lt;a href=&quot;http://codex.buddypress.org/getting-started/upgrading-from-10x/&quot;&gt;Read this before attempting to update BuddyPress&lt;/p&gt;';
</del><ins>+        echo '&lt;p style=&quot;color: red; margin: 3px 0 0 0; border-top: 1px solid #ddd; padding-top: 3px&quot;&gt;' . __( 'IMPORTANT: &lt;a href=&quot;http://codex.buddypress.org/getting-started/upgrading-from-10x/&quot;&gt;Read this before attempting to update BuddyPress&lt;/a&gt;', 'buddypress' ) . '&lt;/p&gt;';
</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-&gt;topic-&gt;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-&gt;loggedin_user-&gt;id == $forum_template-&gt;topic-&gt;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' =&gt; '|'
</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  = '&lt;a href=&quot;' . wp_nonce_url( bp_get_the_topic_permalink() . 'edit', 'bp_forums_edit_topic' ) . '&quot;&gt;' . __( 'Edit', 'buddypress' ) . '&lt;/a&gt; ' . $seperator . ' ';
</del><ins>+                $links[] = '&lt;a href=&quot;' . wp_nonce_url( bp_get_the_topic_permalink() . 'edit', 'bp_forums_edit_topic' ) . '&quot;&gt;' . __( 'Edit', 'buddypress' ) . '&lt;/a&gt;';
+                
+                if ( $bp-&gt;is_item_admin || $bp-&gt;is_item_mod || is_site_admin() ) {
+                        if ( 0 == (int)$forum_template-&gt;topic-&gt;topic_sticky )
+                                $links[] = '&lt;a href=&quot;' . wp_nonce_url( bp_get_the_topic_permalink() . 'stick', 'bp_forums_stick_topic' ) . '&quot;&gt;' . __( 'Sticky', 'buddypress' ) . '&lt;/a&gt;';
+                        else
+                                $links[] = '&lt;a href=&quot;' . wp_nonce_url( bp_get_the_topic_permalink() . 'unstick', 'bp_forums_unstick_topic' ) . '&quot;&gt;' . __( 'Un-stick', 'buddypress' ) . '&lt;/a&gt;';
</ins><span class="cx"> 
</span><del>-                if ( 0 == (int)$forum_template-&gt;topic-&gt;topic_sticky )
-                        $links .= '&lt;a href=&quot;' . wp_nonce_url( bp_get_the_topic_permalink() . 'stick', 'bp_forums_stick_topic' ) . '&quot;&gt;' . __( 'Sticky', 'buddypress' ) . '&lt;/a&gt; ' . $seperator . ' ';
-                else
-                        $links .= '&lt;a href=&quot;' . wp_nonce_url( bp_get_the_topic_permalink() . 'unstick', 'bp_forums_unstick_topic' ) . '&quot;&gt;' . __( 'Un-stick', 'buddypress' ) . '&lt;/a&gt; ' . $seperator . ' ';
</del><ins>+                        if ( 0 == (int)$forum_template-&gt;topic-&gt;topic_open )
+                                $links[] = '&lt;a href=&quot;' . wp_nonce_url( bp_get_the_topic_permalink() . 'open', 'bp_forums_open_topic' ) . '&quot;&gt;' . __( 'Open', 'buddypress' ) . '&lt;/a&gt;';
+                        else
+                                $links[] = '&lt;a href=&quot;' . wp_nonce_url( bp_get_the_topic_permalink() . 'close', 'bp_forums_close_topic' ) . '&quot;&gt;' . __( 'Close', 'buddypress' ) . '&lt;/a&gt;';
</ins><span class="cx"> 
</span><del>-                if ( 0 == (int)$forum_template-&gt;topic-&gt;topic_open )
-                        $links .= '&lt;a href=&quot;' . wp_nonce_url( bp_get_the_topic_permalink() . 'open', 'bp_forums_open_topic' ) . '&quot;&gt;' . __( 'Open', 'buddypress' ) . '&lt;/a&gt; ' . $seperator . ' ';
-                else
-                        $links .= '&lt;a href=&quot;' . wp_nonce_url( bp_get_the_topic_permalink() . 'close', 'bp_forums_close_topic' ) . '&quot;&gt;' . __( 'Close', 'buddypress' ) . '&lt;/a&gt; ' . $seperator . ' ';
-
-                $links .= '&lt;a class=&quot;confirm&quot; id=&quot;topic-delete-link&quot; href=&quot;' . wp_nonce_url( bp_get_the_topic_permalink() . 'delete', 'bp_forums_delete_topic' ) . '&quot;&gt;' . __( 'Delete', 'buddypress' ) . '&lt;/a&gt;';
-
-                return $links;
</del><ins>+                        $links[] = '&lt;a class=&quot;confirm&quot; id=&quot;topic-delete-link&quot; href=&quot;' . wp_nonce_url( bp_get_the_topic_permalink() . 'delete', 'bp_forums_delete_topic' ) . '&quot;&gt;' . __( 'Delete', 'buddypress' ) . '&lt;/a&gt;';
+                }
+                
+                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">                                                         &lt;span class=&quot;small&quot;&gt;&lt;a href=&quot;&lt;?php bp_forum_permalink() ?&gt;&quot;&gt;&amp;larr; &lt;?php _e( 'Group Forum', 'buddypress' ) ?&gt;&lt;/a&gt; | &lt;a href=&quot;&lt;?php bp_forum_directory_permalink() ?&gt;&quot;&gt;&lt;?php _e( 'Forum Topic Directory', 'buddypress') ?&gt;&lt;/a&gt;&lt;/span&gt;
</span><span class="cx">                                                         &lt;h3&gt;&lt;?php bp_the_topic_title() ?&gt; (&lt;?php bp_the_topic_total_post_count() ?&gt;)&lt;/h3&gt;
</span><span class="cx">                                                         
</span><del>-                                                        &lt;?php if ( bp_group_is_admin() || bp_group_is_mod() ) : ?&gt;
</del><ins>+                                                        &lt;?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_is_mine() ) : ?&gt;
</ins><span class="cx">                                                                 &lt;div class=&quot;admin-links&quot;&gt;&lt;?php bp_the_topic_admin_links() ?&gt;&lt;/div&gt;
</span><span class="cx">                                                         &lt;?php endif; ?&gt;
</span><span class="cx">                                                 &lt;/li&gt;
</span></span></pre>
</div>
</div>

</body>
</html>