You are here

function _pm_icon_urlencode_helper in Drupal PM (Project Management) 7.3

Same name and namespace in other branches
  1. 8 pm.module \_pm_icon_urlencode_helper()
  2. 7 pm.module \_pm_icon_urlencode_helper()
  3. 7.2 pm.module \_pm_icon_urlencode_helper()

Encodes URL for icon links.

1 call to _pm_icon_urlencode_helper()
pm_icon_l in includes/pm.icon.inc
Provides an icon link.

File

includes/pm.icon.inc, line 110
Icon handling by Drupal PM.

Code

function _pm_icon_urlencode_helper($params, $org_key = "") {
  $new_params = array();
  foreach ($params as $key => $value) {
    if (!empty($org_key)) {
      $new_key = $org_key . "[" . $key . "]";
    }
    else {
      $new_key = $key;
    }
    if (is_array($value)) {
      $new_params = array_merge(_pm_icon_urlencode_helper($value, $new_key), $new_params);
    }
    else {
      $new_params[$new_key] = urlencode($value);
    }
  }
  return $new_params;
}