Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*8319* Allow assistant roles to access the submission archive #46

Merged
merged 3 commits into from
Aug 7, 2013
Merged

*8319* Allow assistant roles to access the submission archive #46

merged 3 commits into from
Aug 7, 2013

Conversation

MichaelThessel
Copy link
Contributor


if ($contextId && is_int($contextId))
$params[] = (int) $contextId;
if ($status && is_int($status)) $status = (int) $status;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If $status is now optional, there should be a default (null) in the parameter list. Also, I'm starting to work through Doxygen and improve our code self-documentation, so it's a good time to start adding missing parameter descriptions when working with code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Status is not optional. I can add the descriptions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking again, I can see this addresses my concern about int casts. I still prefer to have the int casts inline with the SQL if possible -- it's easy to tell at a glance that it's being done. But the "if ($status)" part of the check looks like it's only relevant to optional parameters -- is it needed here if $status is not optional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will move the int casts into the SQL and remove the first part of the conditional.

@asmecher
Copy link
Member

asmecher commented Aug 7, 2013

OTOH I don't think this works for reviewers; they aren't tracked using stage_assignments, but rather with review_assignments.

@MichaelThessel
Copy link
Contributor Author

I see. I didn't know that reviewer assignments are tracked in review_assignments. I will incorporate this too.

@MichaelThessel
Copy link
Contributor Author

I incorporated the requested changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants