freebsd-ports/www/drupal4-taxonomy_access/files/patch-taxonomy_access_admin.inc
Rong-En Fan 07dd81dc25 Let's do the real thing:
- Fix permissions on drupal taxonomy_access module. See
  http://drupal.org/node/115502 for details

PR:             ports/109457
Submitted by:   Nick Hilliard <nick at foobar.org> (maintainer)
Pointy hat to:	rafan
2007-03-25 09:57:53 +00:00

36 lines
1.6 KiB
PHP

--- taxonomy_access_admin.inc.orig Sat Nov 4 22:50:38 2006
+++ taxonomy_access_admin.inc Fri Feb 23 10:57:47 2007
@@ -127,7 +127,7 @@
$form['taxonomy_access'][$vocab->vid]['default'][$grant] = array(
'#type' => 'radios',
'#options' => $radios,
- '#default_value' => $default[$vocab->vid][$grant],
+ '#default_value' => isset($default[$vocab->vid][$grant]) ? $default[$vocab->vid][$grant] : 0,
);
}
foreach (array('create', 'list') as $grant) {
@@ -137,7 +137,7 @@
);
$form['taxonomy_access'][$vocab->vid]['default'][$grant] = array(
'#type' => 'checkbox',
- '#default_value' => $default[$vocab->vid][$grant],
+ '#default_value' => isset($default[$vocab->vid][$grant]) ? $default[$vocab->vid][$grant] : 0,
);
}
@@ -150,13 +150,13 @@
$form['taxonomy_access'][$vocab->vid]['term'][$term->tid][$grant] = array(
'#type' => 'radios',
'#options' => $radios,
- '#default_value' => $perm[$term->tid][$grant],
+ '#default_value' => isset($perm[$term->tid][$grant]) ? $perm[$term->tid][$grant] : 0,
);
}
foreach (array('create', 'list') as $grant) {
$form['taxonomy_access'][$vocab->vid]['term'][$term->tid][$grant] = array (
'#type' => 'checkbox',
- '#default_value' => $perm[$term->tid][$grant],
+ '#default_value' => isset($perm[$term->tid][$grant]) ? $perm[$term->tid][$grant] : 0,
);
}
}