function _pm_icon_urlencode_helper in Drupal PM (Project Management) 7.2
Same name and namespace in other branches
- 8 pm.module \_pm_icon_urlencode_helper()
- 7.3 includes/pm.icon.inc \_pm_icon_urlencode_helper()
- 7 pm.module \_pm_icon_urlencode_helper()
Encodes URL for icon links.
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;
}