Skip to content

Commit

Permalink
*6233* Remove columns that rely on the "acting-as" user group. - intr…
Browse files Browse the repository at this point in the history
…oduce temporary placeholders to avoid execution errors after removing the acting-as code.
  • Loading branch information
fgrandel committed Nov 26, 2010
1 parent 8944446 commit b64e8e6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
Expand Up @@ -140,31 +140,28 @@ function initialize(&$request) {
'controllers/grid/gridCell.tpl',
$cellProvider)
);
$session =& $request->getSession();
$actingAsUserGroupId = $session->getActingAsUserGroupId();
$userGroupDao =& DAORegistry::getDAO('UserGroupDAO');
$actingAsUserGroup =& $userGroupDao->getById($actingAsUserGroupId);

// add a column for the role the user is acting as
// Add a column for the uploader.
// FIXME: We're just adding some placeholder text here until this
// is correctly implemented, see #6233.
$this->addColumn(
new GridColumn(
$actingAsUserGroupId,
'FIXME',
null,
$actingAsUserGroup->getLocalizedAbbrev(),
'FIXME',
'controllers/grid/common/cell/roleCell.tpl',
$cellProvider
)
);

// Add another column for the submitter's role
$monographDao =& DAORegistry::getDAO('MonographDAO');
$monograph =& $monographDao->getMonograph($monographId);
$uploaderUserGroup =& $userGroupDao->getById($monograph->getUserGroupId());
// Add another column for the uploader's role
// FIXME: We're just adding some placeholder text here until this
// is correctly implemented, see #6233.
$this->addColumn(
new GridColumn(
$uploaderUserGroup->getId(),
'FIXME',
null,
$uploaderUserGroup->getLocalizedAbbrev(),
'FIXME',
'controllers/grid/common/cell/roleCell.tpl',
$cellProvider
)
Expand Down
14 changes: 6 additions & 8 deletions controllers/grid/users/reviewer/ReviewerGridHandler.inc.php
Expand Up @@ -125,22 +125,20 @@ function initialize(&$request) {
)
);

$session =& $request->getSession();
$actingAsUserGroupId = $session->getActingAsUserGroupId();
$userGroupDao =& DAORegistry::getDAO('UserGroupDAO');
$actingAsUserGroup =& $userGroupDao->getById($actingAsUserGroupId);

// add a column for the role the user is acting as
// Add a column for the stage editor.
// FIXME: We're just adding some placeholder text here until this
// is correctly implemented, see #6233.
$this->addColumn(
new GridColumn(
$actingAsUserGroupId,
'FIXME',
null,
$actingAsUserGroup->getLocalizedName(),
'FIXME',
'controllers/grid/common/cell/roleCell.tpl',
$cellProvider
)
);

// Add a column for the assigned reviewer.
$this->addColumn(
new GridColumn(
'reviewer',
Expand Down

0 comments on commit b64e8e6

Please sign in to comment.