You are here

function _pm_icon_urlencode_helper in Drupal PM (Project Management) 7.2

Same name and namespace in other branches
  1. 8 pm.module \_pm_icon_urlencode_helper()
  2. 7.3 includes/pm.icon.inc \_pm_icon_urlencode_helper()
  3. 7 pm.module \_pm_icon_urlencode_helper()

Encodes URL for icon links.

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

File

./pm.module, line 531
Main module file for the Project Management module.

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;
}