AttributeForm question

Mike Baptiste <[email protected]>
Newsgroups gmane.comp.horde.whups
Organization MSB Networks
Message-ID <[email protected]>
-----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 - [email protected]
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-----


-- 
Whups mailing list
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.