Multiple changes:

- Shift ProfileField API so that new returns undef on invalid fields.
    This makes it possible for Shortcut::www_saveUserPrefs to execute.
    The class methods in ProfileField are now also actually class methods.

    + Also fix up other modules that created dummy ProfileFields so that
      they don't need to do that anymore, because it's now invalid.

  - Merge contradictory-looking code from Shortcut's view and www_view
    into a reasonable compromise in view, and then have www_view call
    $self->view in a manner similar to that of the default Asset::view.

    + The profile field overrides still don't work, because there's no
      obvious mechanism for "transclude asset in context".  This may
      require some fiddling to get right...
This commit is contained in:
Drake 2006-08-31 00:14:56 +00:00
parent 84e8d8f689
commit 565119fa1a
5 changed files with 57 additions and 36 deletions

View file

@ -442,7 +442,7 @@ sub www_editUserSave {
}
# Loop through all profile fields, and update them with new values.
foreach my $field (@{WebGUI::ProfileField->new($session,'dummy')->getFields}) {
foreach my $field (@{WebGUI::ProfileField->getFields($session)}) {
next if $field->getId =~ /contentPositions/;
$u->profileField($field->getId,$field->formProcess);
}