<!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>[3512] sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory: Plugin Directory: Documentation and formatting update.</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 { 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/3512">3512</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/3512","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>obenland</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-06-20 17:50:53 +0000 (Mon, 20 Jun 2016)</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'>Plugin Directory: Documentation and formatting update.

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

<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorytoolsclassfilesystemphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tools/class-filesystem.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorytoolsclasssvnphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tools/class-svn.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorywidgetsclassdonatephp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-donate.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorywidgetsclassratingsphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-ratings.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorywidgetsclasssupportphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-support.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorytoolsclassfilesystemphp"></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/plugin-directory/tools/class-filesystem.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/plugin-directory/tools/class-filesystem.php      2016-06-20 17:34:18 UTC (rev 3511)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tools/class-filesystem.php        2016-06-20 17:50:53 UTC (rev 3512)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7,6 +7,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * @package WordPressdotorg\Plugin_Directory\Tools
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> class Filesystem {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+       /**
+        * Path to temporary directory.
+        *
+        * @var string
+        */
</ins><span class="cx" style="display: block; padding: 0 10px">         const TMP_DIR = '/tmp/plugin-directory/';
</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">@@ -14,8 +20,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * The temporary directory returned will be removed upon script termination.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @param string $prefix The prefix for the directory, 'hello-dolly' for example. Optional.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @static
</ins><span class="cx" style="display: block; padding: 0 10px">          *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * @param string $prefix Optional. The prefix for the directory, 'hello-dolly' for example. Default: empty string.
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return string The temporary directory.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public static function temp_directory( $prefix = '' ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -23,10 +30,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        mkdir( self::TMP_DIR, 0777 );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Generate a unique filename
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // Generate a unique filename.
</ins><span class="cx" style="display: block; padding: 0 10px">                 $tmp_dir = tempnam( self::TMP_DIR, $prefix );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Replace that filename with a directory
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // Replace that filename with a directory.
</ins><span class="cx" style="display: block; padding: 0 10px">                 unlink( $tmp_dir );
</span><span class="cx" style="display: block; padding: 0 10px">                mkdir( $tmp_dir, 0777 );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -39,9 +46,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="cx" style="display: block; padding: 0 10px">         * Extract a ZIP file to a directory.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * @static
+        *
</ins><span class="cx" style="display: block; padding: 0 10px">          * @param string $zip_file  The ZIP file to extract.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @param string $directory The Directory to extract the ZIP to. Optional. Default: A Temporary directory.
-        *
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string $directory Optional. The Directory to extract the ZIP to. Default: A Temporary directory.
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return string The directory the ZIP was extracted to.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public static function unzip( $zip_file, $directory = '' ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -67,10 +75,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="cx" style="display: block; padding: 0 10px">         * Returns all (usable) files of a given directory.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * @static
+        *
</ins><span class="cx" style="display: block; padding: 0 10px">          * @param string $directory Path to directory to search.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @param bool   $recursive Whether to recurse into subdirectories. Default: false.
-        * @param string $pattern   A regular expression to match files against. Optional.
-        *
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param bool   $recursive Optional. Whether to recurse into subdirectories. Default: false.
+        * @param string $pattern   Optional. A regular expression to match files against. Default: null.
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return array All files within the passed directory.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public static function list_files( $directory, $recursive = false, $pattern = null ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -103,8 +112,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="cx" style="display: block; padding: 0 10px">         * Forcibly remove a directory recursively.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * @static
+        *
</ins><span class="cx" style="display: block; padding: 0 10px">          * @param string $dir The directory to remove.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         *
</del><span class="cx" style="display: block; padding: 0 10px">          * @return bool Whether the directory was removed.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public static function rmdir( $dir ) {
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorytoolsclasssvnphp"></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/plugin-directory/tools/class-svn.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/plugin-directory/tools/class-svn.php     2016-06-20 17:34:18 UTC (rev 3511)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tools/class-svn.php       2016-06-20 17:50:53 UTC (rev 3512)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -11,19 +11,20 @@
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="cx" style="display: block; padding: 0 10px">         * Import a local directory to a SVN path.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @param string $path    The local folder to import into SVN.
-        * @param string $url     The URL to import to.
-        * @param string $message The commit message.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @static
</ins><span class="cx" style="display: block; padding: 0 10px">          *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * @param string $path     The local folder to import into SVN.
+        * @param string $url      The URL to import to.
+        * @param string $message  The commit message.
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return array {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         *   @type bool $result   The result of the operation.
-        *   @type int  $revision The revision imported.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  *     @type bool $result   The result of the operation.
+        *     @type int  $revision The revision imported.
</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">        public static function import( $path, $url, $message ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $options = array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $options     = array(
</ins><span class="cx" style="display: block; padding: 0 10px">                         'non-interactive',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'm' => $message,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 'm'    => $message,
</ins><span class="cx" style="display: block; padding: 0 10px">                         'user' => PLUGIN_SVN_MANAGEMENT_USER,
</span><span class="cx" style="display: block; padding: 0 10px">                        'pass' => PLUGIN_SVN_MANAGEMENT_PASS,
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -47,26 +48,27 @@
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="cx" style="display: block; padding: 0 10px">         * Create an SVN Export of a URL to a local directory.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * @static
+        *
</ins><span class="cx" style="display: block; padding: 0 10px">          * @param string $url         The URL to export.
</span><span class="cx" style="display: block; padding: 0 10px">         * @param string $destination The local folder to export into.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @param array  $options     A list of options to pass to SVN. Optional.
-        *
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param array  $options     Optional. A list of options to pass to SVN. Default: empty array.
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return array {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         *   @type bool $result   The result of the operation.
-        *   @type int  $revision The revision exported.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  *     @type bool $result   The result of the operation.
+        *     @type int  $revision The revision exported.
</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">        public static function export( $url, $destination, $options = array() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $options[] = 'non-interactive';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $options[]   = 'non-interactive';
</ins><span class="cx" style="display: block; padding: 0 10px">                 $esc_options = self::parse_esc_parameters( $options );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $esc_url = escapeshellarg( $url );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $esc_url         = escapeshellarg( $url );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $esc_destination = escapeshellarg( $destination );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $output = self::shell_exec( "svn export $esc_options $esc_url $esc_destination 2>&1" );
</span><span class="cx" style="display: block; padding: 0 10px">                if ( preg_match( '/Exported revision (?P<revision>\d+)[.]/i', $output, $m ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $revision = (int) $m['revision'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $result = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $result   = true;
</ins><span class="cx" style="display: block; padding: 0 10px">                 } else {
</span><span class="cx" style="display: block; padding: 0 10px">                        $result = false;
</span><span class="cx" style="display: block; padding: 0 10px">                        $errors = self::parse_svn_errors( $output );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -78,23 +80,24 @@
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="cx" style="display: block; padding: 0 10px">         * List the files in a remote SVN destination.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * @static
+        *
</ins><span class="cx" style="display: block; padding: 0 10px">          * @param string $url     The URL to export.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @param bool   $verbose Whether to list the files verbosely with extra metadata.
-        *
-        * @return array If non-verbose a list of files, if verbose an array of items containing the filename, date, filesize, author and revision.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param bool   $verbose Optional. Whether to list the files verbosely with extra metadata. Default: false.
+        * @return array If non-verbose a list of files, if verbose an array of items containing the filename, date,
+        *               filesize, author and revision.
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public static function ls( $url, $verbose = false ) {
</span><span class="cx" style="display: block; padding: 0 10px">                $options = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'non-interactive'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 'non-interactive',
</ins><span class="cx" style="display: block; padding: 0 10px">                 );
</span><span class="cx" style="display: block; padding: 0 10px">                if ( $verbose ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $options[] = 'v';
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px">                $esc_options = self::parse_esc_parameters( $options );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $esc_url = escapeshellarg( $url );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $esc_url     = escapeshellarg( $url );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $output = self::shell_exec( "svn ls $esc_options $esc_url 2>&1" );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px">                 $errors = self::parse_svn_errors( $output );
</span><span class="cx" style="display: block; padding: 0 10px">                if ( $errors ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        return false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -103,12 +106,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">                if ( ! $verbose ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        return array_filter( array_map( 'trim', explode( "\n", $output ) ) );
</span><span class="cx" style="display: block; padding: 0 10px">                } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        // Parse SVN verbose output.
-                       // ^revision author [filesize] date filename$
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+                       /*
+                        * Parse SVN verbose output.
+                        * ^revision author [filesize] date filename$
+                        */
</ins><span class="cx" style="display: block; padding: 0 10px">                         preg_match_all( '!^\s*(?P<revision>\d+)\s(?P<author>\S+)\s*(?P<filesize>\d+)?\s*(?P<date>.+?)\s*(?P<filename>\S+)\s*$!im', $output, $files, PREG_SET_ORDER );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        // Remove numeric keys from output
-                       $files = array_map( function( $item ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 // Remove numeric keys from output.
+                       $files = array_map( function ( $item ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                                 return array_filter( $item, 'is_string', ARRAY_FILTER_USE_KEY );
</span><span class="cx" style="display: block; padding: 0 10px">                        }, $files );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -119,36 +125,39 @@
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="cx" style="display: block; padding: 0 10px">         * Fetch SVN revisions for a given revision or range of revisions.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * @static
+        *
</ins><span class="cx" style="display: block; padding: 0 10px">          * @param string       $url      The URL to fetch.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @param string|array $revision The revision to get information about. Default HEAD.
-        * @param array        $options  A list of options to pass to SVN. Optional.
-        *
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string|array $revision Optional. The revision to get information about. Default HEAD.
+        * @param array        $options  Optional. A list of options to pass to SVN. Default: empty array.
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return array {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         *   @type array|false $errors   Whether any errors or warnings were encountered.
-        *   @type array       $log     The SVN log data struct.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  *     @type array|false $errors Whether any errors or warnings were encountered.
+        *     @type array       $log    The SVN log data struct.
</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">        public static function log( $url, $revision = 'HEAD', $options = array() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $options[] = 'non-interactive';
-               $options[] = 'verbose';
-               $options[] = 'xml';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $options[]           = 'non-interactive';
+               $options[]           = 'verbose';
+               $options[]           = 'xml';
</ins><span class="cx" style="display: block; padding: 0 10px">                 $options['revision'] = is_array( $revision ) ? "{$revision[0]}:{$revision[1]}" : $revision;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $esc_options = self::parse_esc_parameters( $options );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $esc_options         = self::parse_esc_parameters( $options );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $esc_url = escapeshellarg( $url );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $output = self::shell_exec( "svn log $esc_options $esc_url 2>&1" );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px">                 $errors = self::parse_svn_errors( $output );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $log = array();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // We use funky string mangling here to extract the XML as it may have been truncated by a SVN error, or suffixed by a SVN warning
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         /*
+                * We use funky string mangling here to extract the XML as it may have been truncated by a SVN error,
+                * or suffixed by a SVN warning.
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 $xml = substr( $output, $start = stripos( $output, '<?xml' ), $end = ( strripos( $output, '</log>' ) - $start + 6 ) );
</span><span class="cx" style="display: block; padding: 0 10px">                if ( $xml && false !== $start && false !== $end ) {
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        $user_errors = libxml_use_internal_errors( true );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $simple_xml = simplexml_load_string( $xml );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $simple_xml  = simplexml_load_string( $xml );
</ins><span class="cx" style="display: block; padding: 0 10px">                         libxml_use_internal_errors( $user_errors );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( ! $simple_xml ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -156,9 +165,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        } else {
</span><span class="cx" style="display: block; padding: 0 10px">                                foreach ( $simple_xml->logentry as $entry ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                        $revision = (int) $entry->attributes()['revision'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        $paths = array();
-                                       foreach ( $entry->paths->children() as $p ) {
-                                               $paths[] = (string) $p;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 $paths    = array();
+
+                                       foreach ( $entry->paths->children() as $child_path ) {
+                                               $paths[] = (string) $child_path;
</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">                                        $log[ $revision ] = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -181,18 +191,22 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Parameters can be passed as [ param ] or [ param = value ], if the argument is not
</span><span class="cx" style="display: block; padding: 0 10px">         * prefixed with -, it'll be prefixed with 1 or 2 dashes as appropriate.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * @static
+        * @access protected
+        *
</ins><span class="cx" style="display: block; padding: 0 10px">          * @param array $params The array of parameters provided.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         *
</del><span class="cx" style="display: block; padding: 0 10px">          * @return string The parameters formatted and escaped for CLI usage.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         protected static function parse_esc_parameters( $params ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ protected static function parse_esc_parameters( $params ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                 $result = array();
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px">                 foreach ( $params as $key => $value ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $no_parameters = is_numeric( $key );
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( $no_parameters ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                $key = $value;
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        // Prefix options with `-` or `--` if they're longer than 2 characters
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+                       // Prefix options with `-` or `--` if they're longer than 2 characters.
</ins><span class="cx" style="display: block; padding: 0 10px">                         if ( '-' != substr( $key, 0, 1 ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                $key = '-' . ( strlen( $key ) > 2 ? '-' : '' ) . $key;
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -206,16 +220,21 @@
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="cx" style="display: block; padding: 0 10px">         * Parses SVN output to detect SVN errors and throw an exception.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * @static
+        * @access protected
+        *
</ins><span class="cx" style="display: block; padding: 0 10px">          * @param string $output The output from SVN.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         *
-        * @return false|array False if no errors/warnings detected in output, An array of arrays containing warning/error_code/error_message if detected.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @return false|array False if no errors/warnings detected in output, An array of arrays containing
+        *                     warning/error_code/error_message if detected.
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        protected static function parse_svn_errors( $output ) {
</span><span class="cx" style="display: block; padding: 0 10px">                if ( preg_match_all( '!^svn: (?P<warning>warning:)?\s*(?<error_code>[EW]\d+):\s*(?P<error_message>.+)$!im', $output, $messages, PREG_SET_ORDER ) ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px">                         // We only want the string keys - strip out the numeric keys
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $messages = array_map( function( $item ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $messages = array_map( function ( $item ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                                 return array_filter( $item, 'is_string', ARRAY_FILTER_USE_KEY );
</span><span class="cx" style="display: block; padding: 0 10px">                        }, $messages );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px">                         return $messages;
</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">@@ -227,6 +246,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * so that utf8 strings are handled correctly.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * WordPress.org uses the en_US.UTF-8 locale.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         *
+        * @static
+        * @access protected
+        *
+        * @param string $command The command to be executed.
+        * @return mixed The output from the executed command or NULL if an error occurred or the command produces no
+        *               output.
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        protected static function shell_exec( $command ) {
</span><span class="cx" style="display: block; padding: 0 10px">                return shell_exec( 'export LC_CTYPE="en_US.UTF-8" LANG="en_US.UTF-8"; ' . $command );
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorywidgetsclassdonatephp"></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/plugin-directory/widgets/class-donate.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/plugin-directory/widgets/class-donate.php        2016-06-20 17:34:18 UTC (rev 3511)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-donate.php  2016-06-20 17:50:53 UTC (rev 3512)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -35,7 +35,11 @@
</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">                        <p class="aside"><?php _e( 'Would you like to support the advancement of this plugin?', 'wporg-plugins' ); ?></p>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        <p><a class="button button-secondary" href="<?php echo esc_url( $donate_link ); ?>" rel="nofollow"><?php _e( 'Donate to this plugin', 'wporg-plugins' ); ?></a></p>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 <p>
+                               <a class="button button-secondary" href="<?php echo esc_url( $donate_link ); ?>" rel="nofollow">
+                                       <?php _e( 'Donate to this plugin', 'wporg-plugins' ); ?>
+                               </a>
+                       </p>
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        <?php
</span><span class="cx" style="display: block; padding: 0 10px">                        echo $args['after_widget'];
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorywidgetsclassratingsphp"></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/plugin-directory/widgets/class-ratings.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/plugin-directory/widgets/class-ratings.php       2016-06-20 17:34:18 UTC (rev 3511)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-ratings.php 2016-06-20 17:50:53 UTC (rev 3512)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -63,7 +63,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        </ul>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                <?php else : ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px">                         <div class="rating">
</span><span class="cx" style="display: block; padding: 0 10px">                                <p><?php _e( 'This plugin has not been rated yet.', 'wporg-plugins' ); ?></p>
</span><span class="cx" style="display: block; padding: 0 10px">                        </div>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -74,7 +74,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        <div class="user-rating">
</span><span class="cx" style="display: block; padding: 0 10px">                                <a class="button button-secondary" href="<?php echo esc_url( 'https://wordpress.org/support/view/plugin-reviews/' . $post->post_name . '#postform' ); ?>"><?php _e( 'Add your review', 'wporg-plugins' ); ?></a>
</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">-                <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 <?php
</ins><span class="cx" style="display: block; padding: 0 10px">                 endif;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                echo $args['after_widget'];
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorywidgetsclasssupportphp"></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/plugin-directory/widgets/class-support.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/plugin-directory/widgets/class-support.php       2016-06-20 17:34:18 UTC (rev 3511)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-support.php 2016-06-20 17:50:53 UTC (rev 3512)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -58,7 +58,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                <span class="counter-count">
</span><span class="cx" style="display: block; padding: 0 10px">                                        <?php
</span><span class="cx" style="display: block; padding: 0 10px">                                        /* Translators: 1: AMount of resolved threads; 2: Amount of total threads; */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        printf( __( '%1$s out of %2$s'), $resolved, $threads );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 printf( __( '%1$s out of %2$s' ), $resolved, $threads );
</ins><span class="cx" style="display: block; padding: 0 10px">                                         ?>
</span><span class="cx" style="display: block; padding: 0 10px">                                </span>
</span><span class="cx" style="display: block; padding: 0 10px">                        </p>
</span></span></pre>
</div>
</div>

</body>
</html>