* @link http://status.net/
*/
-if (!defined('STATUSNET')) {
- exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
/**
* Form for deleting a group
* Constructor
*
* @param HTMLOutputter $out output channel
- * @param group $group group to join
+ * @param User_group $group group to join
*/
- function __construct($out=null, $group=null)
+ function __construct(HTMLOutputter $out=null, User_group $group=null)
{
parent::__construct($out);
*/
function id()
{
- return 'group-delete-' . $this->group->id;
+ return 'group-delete-' . $this->group->getID();
}
/**
*/
function action()
{
- return common_local_url('deletegroup',
- array('id' => $this->group->id));
+ return common_local_url('deletegroup', array('id' => $this->group->getID()));
}
function formData()
{
$this->out->hidden($this->id() . '-returnto-action', 'groupbyid', 'returnto-action');
- $this->out->hidden($this->id() . '-returnto-id', $this->group->id, 'returnto-id');
+ $this->out->hidden($this->id() . '-returnto-id', $this->group->getID(), 'returnto-id');
}
/**
* @link http://status.net/
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) {
- exit(1);
-}
-
-require_once INSTALLDIR.'/lib/form.php';
+if (!defined('GNUSOCIAL')) { exit(1); }
/**
* Form for joining a group
* Constructor
*
* @param HTMLOutputter $out output channel
- * @param group $group group to join
+ * @param User_group $group group to join
*/
- function __construct($out=null, $group=null)
+ function __construct(HTMLOutputter $out=null, User_group $group=null)
{
parent::__construct($out);
*/
function id()
{
- return 'group-join-' . $this->group->id;
+ return 'group-join-' . $this->group->getID();
}
/**
*/
function action()
{
- return common_local_url('joingroup',
- array('id' => $this->group->id));
+ return common_local_url('joingroup', array('id' => $this->group->getID()));
}
/**
* @link http://status.net/
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) {
- exit(1);
-}
-
-require_once INSTALLDIR.'/lib/form.php';
+if (!defined('GNUSOCIAL')) { exit(1); }
/**
* Form for leaving a group
* Constructor
*
* @param HTMLOutputter $out output channel
- * @param group $group group to leave
+ * @param User_group $group group to leave
*/
- function __construct($out=null, $group=null)
+ function __construct(HTMLOutputter $out=null, User_group $group=null)
{
parent::__construct($out);
*/
function id()
{
- return 'group-leave-' . $this->group->id;
+ return 'group-leave-' . $this->group->getID();
}
/**
*/
function action()
{
- return common_local_url('leavegroup',
- array('id' => $this->group->id));
+ return common_local_url('leavegroup', array('id' => $this->group->getID()));
}
/**
$r2args['action'] = $action;
if ($cur instanceof User && $cur->hasRight(Right::DELETEGROUP)) {
$this->out->elementStart('li', 'entity_delete');
- $df = new DeleteGroupForm($this->out, $this->profile, $r2args);
+ $df = new DeleteGroupForm($this->out, $this->profile->getGroup(), $r2args);
$df->show();
$this->out->elementEnd('li');
}
// XXX: special-case for user looking at own
// subscriptions page
if ($user->isMember($this->profile->getGroup())) {
- $lf = new LeaveForm($this->out, $this->profile);
+ $lf = new LeaveForm($this->out, $this->profile->getGroup());
$lf->show();
- } else if (!Group_block::isBlocked($this->profile, $user->getProfile())) {
- $jf = new JoinForm($this->out, $this->profile);
+ } else if (!Group_block::isBlocked($this->profile->getGroup(), $user->getProfile())) {
+ $jf = new JoinForm($this->out, $this->profile->getGroup());
$jf->show();
}