Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 15 additions and 10 deletions.
  1. +15 −10 includes/core.php
View
25 includes/core.php
@@ -1023,34 +1023,39 @@ static public function makeTarget($entry, $action)
* @static
* @access public
* @param string $target an inKWell target to redirect to
- * @param array $query_data an associative array containing parameters => values
+ * @param array $query an associative array containing parameters => values
* @param string $hash Optional hash tag
* @param boolean $encode Whether or not to encode for HTML, default TRUE
* @return string The appropriate URL for the provided parameters
*/
- static public function makeLink($target, $query_data = array(), $hash = NULL, $encode = TRUE)
+ static public function makeLink($target, $query = array(), $hash = NULL, $encode = TRUE)
{
if (!is_callable($target) && strpos($target, '*') !== 0) {
- $ampersand = $encode ? '&' : '&';
- $query_data = (count($query_data))
- ? '?' . @http_build_query($query_data, '', $ampersand, PHP_QUERY_RFC3986)
- : NULL;
+ $ampersand = $encode ? '&' : '&';
+
+ if (!count($query)) {
+ $query = NULL;
+ } elseif (fCore::checkVersion('5.4')) {
+ $query = '?' . http_build_query($query, '', $ampersand, PHP_QUERY_RFC3986);
+ } else {
+ $query = '?' . http_build_query($query, '', $ampersand);
+ }
if (strpos($target, '/') === 0 && Moor::getActiveProxyURI()) {
- return Moor::getActiveProxyURI() . $target . $query_data;
+ return Moor::getActiveProxyURI() . $target . $query;
}
- return $target . $query_data . ($hash ? '#' . $hash : NULL);
+ return $target . $query . ($hash ? '#' . $hash : NULL);
}
- $params = array_keys($query_data);
+ $params = array_keys($query);
$target = (array_unshift($params, $target) == 1)
? $target
: implode(' ', $params);
- $params = array_merge(array($target), $query_data);
+ $params = array_merge(array($target), $query);
return call_user_func_array('Moor::linkTo', $params) . ($hash ? '#' . $hash : NULL);
}

No commit comments for this range

Something went wrong with that request. Please try again.