/[drupal]/contributions/modules/nodeprofile/nodeprofile.module
ViewVC logotype

Diff of /contributions/modules/nodeprofile/nodeprofile.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.7.2.34, Mon Apr 7 18:17:39 2008 UTC revision 1.7.2.35, Sun Apr 20 20:57:14 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: nodeprofile.module,v 1.7.2.33 2008/02/04 11:29:32 fago Exp $  // $Id: nodeprofile.module,v 1.7.2.34 2008/04/07 18:17:39 fago Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 435  function nodeprofile_user($op, &$edit, & Line 435  function nodeprofile_user($op, &$edit, &
435          }          }
436        }        }
437        break;        break;
438    
439      case 'register':      case 'register':
440        return nodeprofile_get_register_form();        //without data separation adding new users as admin won't worky any more (see #207802),
441          //so we turn the nodeprofile integration of there
442          if (arg(0) != 'admin' || arg(2) != 'user') {
443            return nodeprofile_get_register_form();
444          }
445          break;
446    
447      case 'insert':      case 'insert':
448        global $new_account;        global $new_account;
# Line 528  function nodeprofile_get_register_form() Line 533  function nodeprofile_get_register_form()
533        $form[$type]['form'] = array(        $form[$type]['form'] = array(
534          '#type' => 'subform',          '#type' => 'subform',
535          '#id' => $type. '_node_form',          '#id' => $type. '_node_form',
536          //data separation should be set to FALSE, so that imagefield works (see #201804),          //data separation should be set to FALSE, so that imagefield works (see #201804)
537          //but without data separation adding new users as admin won't worky any more (see #207802),          '#data_separation' => FALSE,
         //so we turn it on for the admin's "Add user" page only.  
         '#data_separation' => (arg(0) == 'admin' && arg(2) == 'user'),  
538          '#arguments' => array($node),          '#arguments' => array($node),
539          '#subform_after_build' => array('nodeprofile_integration_adapt_node_form'),          '#subform_after_build' => array('nodeprofile_integration_adapt_node_form'),
540        );        );

Legend:
Removed from v.1.7.2.34  
changed lines
  Added in v.1.7.2.35

  ViewVC Help
Powered by ViewVC 1.1.2