]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1450008 - documentation link in API errors is wrong
authorDylan William Hardison <dylan@hardison.net>
Thu, 29 Mar 2018 19:13:33 +0000 (15:13 -0400)
committerGitHub <noreply@github.com>
Thu, 29 Mar 2018 19:13:33 +0000 (15:13 -0400)
Bugzilla/Constants.pm
Bugzilla/WebService/Server/REST.pm

index 00f0f81042ee4b9846a88135d24fec41f25503e1..6e3a1273623f97af498c60446198b6f8ee6d4997 100644 (file)
@@ -19,7 +19,6 @@ use Memoize;
 
 @Bugzilla::Constants::EXPORT = qw(
     BUGZILLA_VERSION
-    REST_DOC
 
     REMOTE_FILE
     LOCAL_FILE
@@ -209,10 +208,6 @@ sub BUGZILLA_VERSION {
     eval { Bugzilla->VERSION } || $bugzilla_version;
 }
 
-# A base link to the current REST Documentation. We place it here
-# as it will need to be updated to whatever the current release is.
-use constant REST_DOC => "https://bugzilla.readthedocs.io/en/latest/api/";
-
 # Location of the remote and local XML files to track new releases.
 use constant REMOTE_FILE => 'http://updates.bugzilla.org/bugzilla-update.xml';
 use constant LOCAL_FILE  => 'bugzilla-update.xml'; # Relative to datadir.
index 6fb86fdd41180b33d3fcccead9050bbc64e09518..b8884b7533d673927f8109dfad8cc4db5a25dbb4 100644 (file)
@@ -132,7 +132,8 @@ sub response {
     if (exists $json_data->{error}) {
         $result = $json_data->{error};
         $result->{error} = $self->type('boolean', 1);
-        $result->{documentation} = REST_DOC;
+
+        $result->{documentation} = Bugzilla->params->{docs_urlbase} . "api/";
         delete $result->{'name'}; # Remove JSONRPCError
     }
     elsif (exists $json_data->{result}) {