summaryrefslogtreecommitdiff
path: root/modules/profile/profile.admin.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-09-18 00:12:48 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-09-18 00:12:48 +0000
commitdf02fa3ca46e16974192de77580762188ad47f49 (patch)
tree91b2354aae786d7b187028dbc61fb3893b04ae64 /modules/profile/profile.admin.inc
parente18feedfdb429e35173b85fc7182aadabee0a166 (diff)
downloadbrdo-df02fa3ca46e16974192de77580762188ad47f49.tar.gz
brdo-df02fa3ca46e16974192de77580762188ad47f49.tar.bz2
#571086 by sun and merlinofchaos: Added a 'wrapper callback' that executes
before a form builder function, to facilitate common form elements. Clean-up from form_builder changes from CTools patch. Has nice side-benefit of making all form functions' signatures consistent.
Diffstat (limited to 'modules/profile/profile.admin.inc')
-rw-r--r--modules/profile/profile.admin.inc7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/profile/profile.admin.inc b/modules/profile/profile.admin.inc
index df07bdeec..b01d7a0be 100644
--- a/modules/profile/profile.admin.inc
+++ b/modules/profile/profile.admin.inc
@@ -12,10 +12,9 @@
* @ingroup forms
* @see profile_admin_overview_submit()
*/
-function profile_admin_overview() {
+function profile_admin_overview($form) {
$result = db_query('SELECT title, name, type, category, fid, weight FROM {profile_field} ORDER BY category, weight');
- $form = array();
$categories = array();
foreach ($result as $field) {
// Collect all category information
@@ -170,7 +169,7 @@ function theme_profile_admin_overview($form) {
* @see profile_field_form_validate()
* @see profile_field_form_submit()
*/
-function profile_field_form(&$form_state, $arg = NULL) {
+function profile_field_form($form, &$form_state, $arg = NULL) {
if (arg(4) == 'edit') {
if (is_numeric($arg)) {
$fid = $arg;
@@ -380,7 +379,7 @@ function profile_field_form_submit($form, &$form_state) {
/**
* Menu callback; deletes a field from all user profiles.
*/
-function profile_field_delete(&$form_state, $fid) {
+function profile_field_delete($form, &$form_state, $fid) {
$field = db_query("SELECT title FROM {profile_field} WHERE fid = :fid", array(':fid' => $fid))->fetchObject();
if (!$field) {
drupal_not_found();