Fix the link noted 'contribute to features' in status.html
[WebKit-https.git] / Websites / perf.webkit.org / public / privileged-api / create-test-group.php
index d1c75607cd8c6a2622b93904352adf5d9f7c3829..d180b30a85d4494e2d22a6d9168b999e1fb45698 100644 (file)
@@ -3,9 +3,9 @@
 require_once('../include/json-header.php');
 
 function main() {
-    $data = ensure_privileged_api_data_and_token();
-
-    $author = remote_user_name();
+    $db = connect();
+    $data = ensure_privileged_api_data_and_token_or_slave($db);
+    $author = remote_user_name($data);
 
     $task_id = array_get($data, 'task');
     $name = array_get($data, 'name');
@@ -19,7 +19,6 @@ function main() {
     if ($repetition_count < 1)
         exit_with_error('InvalidRepetitionCount', array('repetitionCount' => $repetition_count));
 
-    $db = connect();
     $task = $db->select_first_row('analysis_tasks', 'task', array('id' => $task_id));
     if (!$task)
         exit_with_error('InvalidTask', array('task' => $task_id));