<!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" />
<title>[8497] sites/trunk/wordpress.org/public_html/wp-content/plugins: Translate: Extend contributors table for locale projects with a toggle to view per-project stats.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/8497">8497</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/8497","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>ocean90</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2019-03-24 17:14:26 +0000 (Sun, 24 Mar 2019)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Translate: Extend contributors table for locale projects with a toggle to view per-project stats.

Fixes <a href="http://meta.trac.wordpress.org/ticket/3613">#3613</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggpcustomizationstemplateslocaleprojectphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/locale-project.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggpcustomizationstemplatesstylecss">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/style.css</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggproutesincroutesclasslocalephp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggpcustomizationstemplateslocaleprojectphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/locale-project.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/locale-project.php     2019-03-24 15:15:29 UTC (rev 8496)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/locale-project.php       2019-03-24 17:14:26 UTC (rev 8497)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -206,18 +206,122 @@
</span><span class="cx" style="display: block; padding: 0 10px">                <?php if ( $locale_contributors['contributors'] ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px">                <table class="locale-project-contributors-table">
</span><span class="cx" style="display: block; padding: 0 10px">                        <thead>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <th class="contributor-name">Contributor</th>
-                               <th class="contributor-stats">Translations*</th>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <tr>
+                                       <th class="contributor-name">Contributor</th>
+                                       <th class="contributor-stats">Translations</th>
+                               </tr>
</ins><span class="cx" style="display: block; padding: 0 10px">                         </thead>
</span><span class="cx" style="display: block; padding: 0 10px">                        <tbody>
</span><span class="cx" style="display: block; padding: 0 10px">                        <?php
</span><span class="cx" style="display: block; padding: 0 10px">                        foreach ( $locale_contributors['contributors'] as $contributor ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                $detailed = '';
+
+                               if ( 'wp-plugins' === $project->path ) {
+                                       // Ensure consistent order of development and stable projects.
+                                       usort( $contributor->detailed, function( $a, $b ) {
+                                               return strnatcasecmp( $a->project->name, $b->project->name );
+                                       } );
+                               }
+
+                               foreach ( $contributor->detailed as $detail_project_id => $detail_data ) {
+                                       $detailed .= '<strong class="detailed__project-name">' . $detail_data->project->name . ':</strong>';
+
+                                       if ( $detail_data->total_count > 0 ) {
+                                               $total_count = gp_link_get(
+                                                       gp_url_project(
+                                                               $detail_data->project->path,
+                                                               gp_url_join( $locale->slug, $set_slug ),
+                                                               [
+                                                                       'filters[translated]' => 'yes',
+                                                                       'filters[status]'     => 'current_or_waiting_or_fuzzy_or_untranslated',
+                                                                       'filters[user_login]' => $contributor->login,
+                                                               ]
+                                                       ),
+                                                       number_format_i18n( $detail_data->total_count )
+                                               );
+                                       } else {
+                                               $total_count = number_format_i18n( $detail_data->total_count );
+                                       }
+
+                                       if ( $detail_data->current_count > 0 ) {
+                                               $current_count = gp_link_get(
+                                                       gp_url_project(
+                                                               $detail_data->project->path,
+                                                               gp_url_join( $locale->slug, $set_slug ),
+                                                               [
+                                                                       'filters[translated]' => 'yes',
+                                                                       'filters[status]'     => 'current',
+                                                                       'filters[user_login]' => $contributor->login,
+                                                               ]
+                                                       ),
+                                                       number_format_i18n( $detail_data->current_count )
+                                               );
+                                       } else {
+                                               $current_count = number_format_i18n( $detail_data->current_count );
+                                       }
+
+                                       if ( $detail_data->waiting_count > 0 ) {
+                                               $waiting_count = gp_link_get(
+                                                       gp_url_project(
+                                                               $detail_data->project->path,
+                                                               gp_url_join( $locale->slug, $set_slug ),
+                                                               [
+                                                                       'filters[translated]' => 'yes',
+                                                                       'filters[status]'     => 'waiting',
+                                                                       'filters[user_login]' => $contributor->login,
+                                                               ]
+                                                       ),
+                                                       number_format_i18n( $detail_data->waiting_count )
+                                               );
+                                       } else {
+                                               $waiting_count = number_format_i18n( $detail_data->waiting_count );
+                                       }
+
+                                       if ( $detail_data->fuzzy_count > 0 ) {
+                                               $fuzzy_count = gp_link_get(
+                                                       gp_url_project(
+                                                               $detail_data->project->path,
+                                                               gp_url_join( $locale->slug, $set_slug ),
+                                                               [
+                                                                       'filters[translated]' => 'yes',
+                                                                       'filters[status]'     => 'fuzzy',
+                                                                       'filters[user_login]' => $contributor->login,
+                                                               ]
+                                                       ),
+                                                       number_format_i18n( $detail_data->fuzzy_count )
+                                               );
+                                       } else {
+                                               $fuzzy_count = number_format_i18n( $detail_data->fuzzy_count );
+                                       }
+
+                                       $detailed .= sprintf(
+                                               '
+                                                       <div class="total">
+                                                               <p>%s</p>
+                                                       </div>
+                                                       <div class="current">
+                                                               <p>%s</p>
+                                                       </div>
+                                                       <div class="waiting">
+                                                               <p>%s</p>
+                                                       </div>
+                                                       <div class="fuzzy">
+                                                               <p>%s</p>
+                                                       </div>
+                                               ',
+                                               $total_count,
+                                               $current_count,
+                                               $waiting_count,
+                                               $fuzzy_count
+                                       );
+                               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                                 printf(
</span><span class="cx" style="display: block; padding: 0 10px">                                        '<tr>
</span><span class="cx" style="display: block; padding: 0 10px">                                                <td class="contributor-name">
</span><span class="cx" style="display: block; padding: 0 10px">                                                        %s
</span><span class="cx" style="display: block; padding: 0 10px">                                                        <a href="https://profiles.wordpress.org/%s/">%s %s</a>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                                        <span>Last Activity: %s ago</span>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                                 <span>Last translation submitted: %s ago</span>
</ins><span class="cx" style="display: block; padding: 0 10px">                                                 </td>
</span><span class="cx" style="display: block; padding: 0 10px">                                                <td class="contributor-stats">
</span><span class="cx" style="display: block; padding: 0 10px">                                                        <div class="total">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -236,23 +340,29 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                                <span>Fuzzy</span>
</span><span class="cx" style="display: block; padding: 0 10px">                                                                <p>%s</p>
</span><span class="cx" style="display: block; padding: 0 10px">                                                        </div>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                                <td>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                                 <div class="detailed">
+                                                               <details>
+                                                                       <summary>Per project</summary>
+                                                                       %s
+                                                               </details>
+                                                       </div>
+                                               </td>
</ins><span class="cx" style="display: block; padding: 0 10px">                                         </tr>',
</span><span class="cx" style="display: block; padding: 0 10px">                                        $contributor->is_editor ? '<span class="translation-editor">Editor</span>' : '',
</span><span class="cx" style="display: block; padding: 0 10px">                                        $contributor->nicename,
</span><span class="cx" style="display: block; padding: 0 10px">                                        get_avatar( $contributor->email, 40 ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        $contributor->display_name ? $contributor->display_name : $contributor->nicename,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 $contributor->display_name ?: $contributor->nicename,
</ins><span class="cx" style="display: block; padding: 0 10px">                                         human_time_diff( strtotime( $contributor->last_update ) ),
</span><span class="cx" style="display: block; padding: 0 10px">                                        number_format_i18n( $contributor->total_count ),
</span><span class="cx" style="display: block; padding: 0 10px">                                        number_format_i18n( $contributor->current_count ),
</span><span class="cx" style="display: block; padding: 0 10px">                                        number_format_i18n( $contributor->waiting_count ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        number_format_i18n( $contributor->fuzzy_count )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 number_format_i18n( $contributor->fuzzy_count ),
+                                       $detailed
</ins><span class="cx" style="display: block; padding: 0 10px">                                 );
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px">                        ?>
</span><span class="cx" style="display: block; padding: 0 10px">                        </tbody>
</span><span class="cx" style="display: block; padding: 0 10px">                </table>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                <p class="stats-hint">* Data for the last 365 days.</p>
</del><span class="cx" style="display: block; padding: 0 10px">                 <?php else : ?>
</span><span class="cx" style="display: block; padding: 0 10px">                        <p>None, be the first?</p>
</span><span class="cx" style="display: block; padding: 0 10px">                <?php endif; ?>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -271,7 +381,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                '<li><a href="https://profiles.wordpress.org/%s/">%s %s</a></li>',
</span><span class="cx" style="display: block; padding: 0 10px">                                                $editor->nicename,
</span><span class="cx" style="display: block; padding: 0 10px">                                                get_avatar( $editor->email, 40 ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                                $editor->display_name ? $editor->display_name : $editor->nicename
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                         $editor->display_name ?: $editor->nicename
</ins><span class="cx" style="display: block; padding: 0 10px">                                         );
</span><span class="cx" style="display: block; padding: 0 10px">                                }
</span><span class="cx" style="display: block; padding: 0 10px">                                ?>
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggpcustomizationstemplatesstylecss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/style.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/style.css      2019-03-24 15:15:29 UTC (rev 8496)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/style.css        2019-03-24 17:14:26 UTC (rev 8497)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1774,6 +1774,27 @@
</span><span class="cx" style="display: block; padding: 0 10px">        color: #f78b53;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.locale-project-contributors-table td.contributor-stats .detailed {
+       width: 100%;
+       clear: left;
+       float: none;
+}
+
+.detailed summary {
+       text-align: right;
+       font-size: 10px;
+       outline: none;
+       cursor: pointer;
+}
+
+.detailed__project-name {
+       display: block;
+       clear: left;
+       text-align: left;
+       font-size: 10px;
+       padding-top: 5px;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .locale-project-contributors-table tbody td {
</span><span class="cx" style="display: block; padding: 0 10px">        padding: 10px 0;
</span><span class="cx" style="display: block; padding: 0 10px">        border-bottom: 1px solid #eee;
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggproutesincroutesclasslocalephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php      2019-03-24 15:15:29 UTC (rev 8496)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php        2019-03-24 17:14:26 UTC (rev 8497)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -502,6 +502,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                $projects = [];
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 // Get the names of the contributors.
</span><span class="cx" style="display: block; padding: 0 10px">                foreach ( $contributors as $contributor ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( isset( $locale_contributors['contributors'][ $contributor->user_id ] ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -515,6 +517,19 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                $locale_contributors['contributors'][ $contributor->user_id ]->current_count += $contributor->current_count;
</span><span class="cx" style="display: block; padding: 0 10px">                                $locale_contributors['contributors'][ $contributor->user_id ]->waiting_count += $contributor->waiting_count;
</span><span class="cx" style="display: block; padding: 0 10px">                                $locale_contributors['contributors'][ $contributor->user_id ]->fuzzy_count   += $contributor->fuzzy_count;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+                               if ( ! isset( $projects[ $contributor->project_id ] ) ) {
+                                       $projects[ $contributor->project_id ] = GP::$project->get( $contributor->project_id );
+                               }
+
+                               $locale_contributors['contributors'][ $contributor->user_id ]->detailed[ $contributor->project_id ] = (object) [
+                                       'total_count'   => $contributor->total_count,
+                                       'current_count' => $contributor->current_count,
+                                       'waiting_count' => $contributor->waiting_count,
+                                       'fuzzy_count'   => $contributor->fuzzy_count,
+                                       'project'       => $projects[ $contributor->project_id ],
+                               ];
+
</ins><span class="cx" style="display: block; padding: 0 10px">                                 continue;
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -523,7 +538,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                continue;
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        if ( ! isset( $projects[ $contributor->project_id ] ) ) {
+                               $projects[ $contributor->project_id ] = GP::$project->get( $contributor->project_id );
+                       }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                         $locale_contributors['contributors'][ $contributor->user_id ] = (object) array(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'login'         => $user->user_login,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'nicename'      => $user->user_nicename,
</span><span class="cx" style="display: block; padding: 0 10px">                                'display_name'  => $this->_encode( $user->display_name ),
</span><span class="cx" style="display: block; padding: 0 10px">                                'email'         => $user->user_email,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -532,6 +552,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'current_count' => $contributor->current_count,
</span><span class="cx" style="display: block; padding: 0 10px">                                'waiting_count' => $contributor->waiting_count,
</span><span class="cx" style="display: block; padding: 0 10px">                                'fuzzy_count'   => $contributor->fuzzy_count,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'detailed'      => [
+                                       $contributor->project_id => (object) [
+                                               'total_count'   => $contributor->total_count,
+                                               'current_count' => $contributor->current_count,
+                                               'waiting_count' => $contributor->waiting_count,
+                                               'fuzzy_count'   => $contributor->fuzzy_count,
+                                               'project'       => $projects[ $contributor->project_id ],
+                                       ],
+                               ],
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'is_editor'     => in_array( $user->ID, $editor_ids ),
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -556,6 +585,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $contributors = $wpdb->get_results( $wpdb->prepare( "
</span><span class="cx" style="display: block; padding: 0 10px">                        SELECT
</span><span class="cx" style="display: block; padding: 0 10px">                                `t`.`user_id` as `user_id`,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                `o`.`project_id` as `project_id`,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 MAX( `t`.`date_added` ) AS `last_update`,
</span><span class="cx" style="display: block; padding: 0 10px">                                COUNT( * ) as `total_count`,
</span><span class="cx" style="display: block; padding: 0 10px">                                COUNT( CASE WHEN `t`.`status` = 'current' THEN `t`.`status` END ) AS `current_count`,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -568,9 +598,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                `t`.`translation_set_id` = %d
</span><span class="cx" style="display: block; padding: 0 10px">                                AND `t`.`user_id` IS NOT NULL AND `t`.`user_id` != 0
</span><span class="cx" style="display: block; padding: 0 10px">                                AND `t`.`status` IN( 'current', 'waiting', 'fuzzy' )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                AND `t`.`date_modified` > %s
</del><span class="cx" style="display: block; padding: 0 10px">                         GROUP BY `t`.`user_id`
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                ", $translation_set->id, date( 'Y-m-d', time() - YEAR_IN_SECONDS ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         ", $translation_set->id ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                return $contributors;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span></span></pre>
</div>
</div>

</body>
</html>