<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:rniwa&#64;webkit.org" title="Ryosuke Niwa &lt;rniwa&#64;webkit.org&gt;"> <span class="fn">Ryosuke Niwa</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Commit should order by 'commit_order' as secondary key."
   href="https://bugs.webkit.org/show_bug.cgi?id=168866">bug 168866</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #302736 Flags</td>
           <td>review?
           </td>
           <td>review+
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Commit should order by 'commit_order' as secondary key."
   href="https://bugs.webkit.org/show_bug.cgi?id=168866#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Commit should order by 'commit_order' as secondary key."
   href="https://bugs.webkit.org/show_bug.cgi?id=168866">bug 168866</a>
              from <span class="vcard"><a class="email" href="mailto:rniwa&#64;webkit.org" title="Ryosuke Niwa &lt;rniwa&#64;webkit.org&gt;"> <span class="fn">Ryosuke Niwa</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=302736&amp;action=diff" name="attach_302736" title="Patch">attachment 302736</a> <a href="attachment.cgi?id=302736&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=302736&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=302736&amp;action=review</a>

<span class="quote">&gt; Websites/perf.webkit.org/public/include/commit-log-fetcher.php:87
&gt; -        return $this-&gt;format_single_commit($this-&gt;db-&gt;select_first_row('commits', 'commit', array('repository' =&gt; $repository_id), 'time'));
&gt; +        return $this-&gt;format_single_commit($this-&gt;db-&gt;select_first_row('commits', 'commit', array('repository' =&gt; $repository_id), ['time', 'order']));</span >

[] syntax doesn't work on an older versions of PHP.
So please use array() instead.

<span class="quote">&gt; Websites/perf.webkit.org/public/include/db.php:217
&gt; +            if (!is_array($order_by)) {
&gt; +                $order_by = array($order_by);
&gt; +            }</span >

Nit: No curtly braces around a single line statement.

<span class="quote">&gt; Websites/perf.webkit.org/public/include/db.php:223
&gt; +                $order_column = $this-&gt;prefixed_name($order_key, $prefix);
&gt; +                if ($descending_order)
&gt; +                    $order_column .= ' DESC';</span >

Might be cleaner to always specify ASC/DES using tertiary expression as in:
$order_column = $this-&gt;prefixed_name($order_key, $prefix) . ' ' . ($descending_order ? 'DESC' : 'ASC');

<span class="quote">&gt; Websites/perf.webkit.org/server-tests/api-commits.js:137
&gt; +        it(&quot;should return the list of ordered commits for a given repository&quot;, () =&gt; {</span >

Please also add tests for latest, &amp; oldest, and last-reported.

<span class="quote">&gt; Websites/perf.webkit.org/server-tests/api-commits.js:146
&gt; +                assert.equal(commits.length, 6);</span >

You can just check against submittedCommits.length here.

<span class="quote">&gt; Websites/perf.webkit.org/server-tests/api-commits.js:147
&gt; +                var submittedCommits = systemVersionCommits['commits'];</span >

Use const instead of var.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>