mirror of https://github.com/BOINC/boinc.git
Added handling for 200 OK responses in Transifex requests
(DBOINCP-141)
This commit is contained in:
parent
65fb1d1049
commit
316c42fb52
|
@ -420,6 +420,15 @@ function boinctranslate_update_official_boinc_translations() {
|
|||
);
|
||||
break;
|
||||
}
|
||||
elseif ($result == 'success') {
|
||||
drupal_set_message("Updated {$language_name} official BOINC translations");
|
||||
}
|
||||
else {
|
||||
drupal_set_message(
|
||||
"Unexpected response for {$language_name}: {$result}",
|
||||
'warning'
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
drupal_set_message("Updated {$language_name} official BOINC translations");
|
||||
|
@ -489,6 +498,9 @@ function boinctranslate_transifex_request($path, $post = NULL, $json = TRUE, $us
|
|||
elseif (strstr($response_header, '405 METHOD NOT ALLOWED')) {
|
||||
return "ERROR: User not allowed to perform this action";
|
||||
}
|
||||
elseif (strstr($response_header, '200 OK')) {
|
||||
return 'success';
|
||||
}
|
||||
}
|
||||
elseif ($json) {
|
||||
// Process as JSON
|
||||
|
|
Loading…
Reference in New Issue