Source for file groups.php
Documentation is available at groups.php
* Interface for editing details of groups
* @author Stuart Prescott
* @copyright Copyright Stuart Prescott
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* path (bumblebee root)/inc/actions/groups.php
/** Load ancillary functions */
require_once 'inc/typeinfo.php';
require_once 'inc/bb/group.php';
require_once 'inc/formslib/anchortablelist.php';
require_once 'inc/actions/actionaction.php';
* Interface for editing details of groups
* @param BumblebeeAuth $auth Authorisation object
* @param array $pdata extra state data from the call path
if (! isset
($this->PD['id'])) {
} elseif (isset
($this->PD['delete'])) {
echo
"<br /><br /><a href='".
makeURL('groups').
"'>".
T_('Return to group list').
"</a>";
function select($deleted=
false) {
$select->deleted =
$deleted;
$select->connectDB('groups', array('id', 'name', 'longname'));
$select->list->prepend(array('-1', T_('Create new group')));
$select->list->append(array('showdeleted', T_('Show deleted groups')));
$select->hrefbase =
makeURL('groups', array('id'=>
'__id__'));
$select->setFormat('id', '%s', array('name'), ' %50.50s', array('longname'));
#echo $select->list->text_dump();
$group =
new Group($this->PD['id']);
$group->update($this->PD);
STATUS_OK =>
($this->PD['id'] <
0 ?
T_('Group created') :
T_('Group updated')),
STATUS_ERR =>
T_('Group could not be changed:').
' '.
$group->errorMessage
$submit =
T_('Create new group');
$submit =
T_('Update entry');
$delete =
$group->isDeleted ?
T_('Undelete entry') :
T_('Delete entry');
#$submit = ($PD['id'] < 0 ? "Create new" : "Update entry");
echo
"<input type='submit' name='submit' value='$submit' />";
if ($delete) echo
"<input type='submit' name='delete' value='$delete' />";
$group =
new Group($this->PD['id']);
STATUS_OK =>
$group->isDeleted ?
T_('Group undeleted') :
T_('Group deleted'),
STATUS_ERR =>
T_('Group could not be deleted:').
'<br/><br/>'.
$group->errorMessage
Documentation generated on Tue, 06 Mar 2007 10:01:33 +0000 by phpDocumentor 1.3.0