From: rniwa@webkit.org Date: Wed, 4 Feb 2015 01:26:13 +0000 (+0000) Subject: Unreviewed build fix. Declare $repository_id_to_name in the global scope. X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=ce61f81767585d56754824c1b680bf98e239f0c0 Unreviewed build fix. Declare $repository_id_to_name in the global scope. * public/api/runs.php: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179585 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Websites/perf.webkit.org/ChangeLog b/Websites/perf.webkit.org/ChangeLog index c9e9dbd5a5de..e1444c1c8252 100644 --- a/Websites/perf.webkit.org/ChangeLog +++ b/Websites/perf.webkit.org/ChangeLog @@ -1,3 +1,9 @@ +2015-02-03 Ryosuke Niwa + + Unreviewed build fix. Declare $repository_id_to_name in the global scope. + + * public/api/runs.php: + 2015-02-03 Ryosuke Niwa /api/runs.php should have main function diff --git a/Websites/perf.webkit.org/public/api/runs.php b/Websites/perf.webkit.org/public/api/runs.php index 50f233b45673..46c17788bcde 100644 --- a/Websites/perf.webkit.org/public/api/runs.php +++ b/Websites/perf.webkit.org/public/api/runs.php @@ -50,7 +50,11 @@ function format_run($run) { 'builder' => $run['build_builder']); } +$repository_id_to_name = array(); + function main($path) { + global $repository_id_to_name; + if (count($path) != 1) exit_with_error('InvalidRequest'); @@ -74,7 +78,6 @@ function main($path) { if (!$config_rows) exit_with_error('ConfigurationNotFound'); - $repository_id_to_name = array(); if ($repository_table = $db->fetch_table('repositories')) { foreach ($repository_table as $repository) $repository_id_to_name[$repository['repository_id']] = $repository['repository_name'];