diff --git a/api/v1/entries/projectissue.php b/api/v1/entries/projectissue.php index f0edfcaf7c..70e0d1a92c 100644 --- a/api/v1/entries/projectissue.php +++ b/api/v1/entries/projectissue.php @@ -106,17 +106,17 @@ class projectIssueEntry extends entry private function createLink($module, $method, $vars) { $link = helper::createLink($module, $method, $vars, 'html'); + $pos = strpos($link, '.php'); + + /* The requestTypes are: GET, PATH_INFO2, PATH_INFO */ if($this->config->requestType == 'GET') { - $pos = strpos($link, '.php'); $link = '/index' . substr($link, $pos); } - else + elseif($this->config->requestType == 'PATH_INFO2') { - $pos = strpos($link, '.php'); $link = substr($link, $pos + 4); } - return common::getSysURL() . $link; } diff --git a/api/v1/entries/projectissues.php b/api/v1/entries/projectissues.php index f3f13839a9..36e0e207a4 100644 --- a/api/v1/entries/projectissues.php +++ b/api/v1/entries/projectissues.php @@ -222,17 +222,17 @@ class projectIssuesEntry extends entry private function createLink($module, $method, $vars) { $link = helper::createLink($module, $method, $vars, 'html'); + $pos = strpos($link, '.php'); + + /* The requestTypes are: GET, PATH_INFO2, PATH_INFO */ if($this->config->requestType == 'GET') { - $pos = strpos($link, '.php'); $link = '/index' . substr($link, $pos); } - else + elseif($this->config->requestType == 'PATH_INFO2') { - $pos = strpos($link, '.php'); $link = substr($link, $pos + 4); } - return common::getSysURL() . $link; }