[whups] AttributeForm question

Mike Baptiste mike@msbnetworks.net
Fri Nov 22 02:47:01 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm working on attachments and am creating my form objects.  While
looking through Search.php to get a handle on how it all works, I
noticed that the new class EditAttributesForm has a group restriction
variable at the end, but never creates to group object to test in the if.

In other words, doesn't this:

~        if (isset($grouptype)) {
~            $this->addVariable(_("Viewable only by members of"),
'group', $grouptype, true);
~        }

require the following to be called earlier in the method:

~        $groups = &Group::singleton();
~        $grouplist = $groups->getGroupMemberships(Auth::getAuth());
~        if (count($grouplist)) {
~            $grouptype = _getEnumType(array(0 => _("Any Group")) +
$grouplist);
~        }

That's how the other group restrictable classes seem to function.  Just
thought I'd mention it.  I'd spin a patch, but my Search.php has a bunch
of other stuff added to it so it would be ugly :)  With any luck I'll be
adding attachments via VFS to tickets by the weekend.

Mike
- --
Mike Baptiste - MSB Networks - mike@msbnetworks.net
Download my GnuPG key at http://msbnetworks.net/msbnet.gpg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE93Zqltbf8BjvL+3ERApyYAJ4+400uTxhkB5VOsrpDM11Jq1vngwCbBiTw
3NhwYMgGoGR9r4S/Y9x+gQA=
=iMkS
-----END PGP SIGNATURE-----



More information about the whups mailing list