Commit ff1e4c66 authored by Dries's avatar Dries

- Reverting #367711 ...

parent 1e86a912
......@@ -1883,9 +1883,13 @@ function drupal_page_footer() {
* An associative array.
*/
function drupal_map_assoc($array, $function = NULL) {
if (!isset($function) && !empty($array)) {
return array_combine($array, $array);
}
if (!isset($function)) {
$result = array();
foreach ($array as $value) {
$result[$value] = $value;
}
return $result;
}
elseif (function_exists($function)) {
$result = array();
foreach ($array as $value) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment