]> git.mxchange.org Git - quix0rs-gnu-social.git/commit
NewgroupAction converted to extend FormAction
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 31 Aug 2013 13:03:59 +0000 (15:03 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 31 Aug 2013 16:01:13 +0000 (18:01 +0200)
commitcfa699e445641c2f81eec1c44d12c122efbc1797
tree3f011051cea49c60b46a9de1a720f8a78eac4302
parent8d57fb7dc064bb6000467fa07864856c97dd2bcf
NewgroupAction converted to extend FormAction

Had to change Action function 'prepare' to 'protected', as you can't
(of course) protect something that's been public in a parent class. The
other way around seems fine for PHP... Eventually all actions will have
protected 'prepare' (use execute/run)

A feature of the previously fixed initialization of Action classes, is
that we now have $this->scoped which is the current profile in use. As
of now that is always a local User, except the corresponding Profile
object.

Also, instead of calling 'showForm' everywhere, in case of an error we
just throw an exception of some sort and pass the message along there.

I've also introduced in FormAction the 'showInstructions' function in
order to get a unified instructions/info/error display method.

TODO: Improve info/error message handling, and what/when/where to show.
actions/newgroup.php
lib/action.php
lib/formaction.php