+2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
+
+ Unreviewed build fix after r179591.
+
+ * public/api/commits.php:
+
2015-02-13 Ryosuke Niwa <rniwa@webkit.org>
The status of a A/B testing request always eventually becomes "Failed"
if (!$db->connect())
exit_with_error('DatabaseConnectionFailure');
- $repository_id = intval($paths[0]);
+ if (!is_numeric($paths[0])) {
+ $repository_name = $paths[0];
+ $repository_row = $db->select_first_row('repositories', 'repository', array('name' => $repository_name));
+ if (!$repository_row)
+ exit_with_error('RepositoryNotFound', array('repositoryName' => $repository_name));
+ $repository_id = $repository_row['repository_id'];
+ } else
+ $repository_id = intval($paths[0]);
$filter = array_get($paths, 1);
$single_commit = NULL;