Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions activity_hub.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ function progress_snapshot_table($show_filtered_projects, $show_filtering_links,

// Stage rows
foreach (Stages::get_all() as $stage) {
if (is_a($stage, 'Pool') || is_a($stage, 'Round')) {
if ($stage instanceof Pool || $stage instanceof Round) {
continue;
}
if ($stage->id == "SR") {
Expand Down Expand Up @@ -324,7 +324,7 @@ function summarize_stage($stage, $desired_states, $show_filtered_projects = fals
}

// If we're a round, get page information and calculate status.
if (is_a($stage, 'Round')) {
if ($stage instanceof Round) {
$round_stats = get_site_page_tally_summary($stage->id);

[$progress_bar_width, $progress_bar_class, $percent_complete] =
Expand Down Expand Up @@ -431,7 +431,7 @@ function summarize_stage($stage, $desired_states, $show_filtered_projects = fals
echo "</td>";

// Rounds and Pools also get project totals.
if (is_a($stage, 'Round') || is_a($stage, 'Pool')) {
if ($stage instanceof Round || $stage instanceof Pool) {
echo "<td>$total_projects</td>";
foreach ($desired_states as $desired_state) {
echo "<td>";
Expand All @@ -449,7 +449,7 @@ function summarize_stage($stage, $desired_states, $show_filtered_projects = fals
}

// Rounds also get page totals.
if (is_a($stage, 'Round')) {
if ($stage instanceof Round) {
echo "<td class='pages-goal'>{$round_stats->curr_day_goal}</td>";
echo "<td class='pages-completed'>{$round_stats->curr_day_actual}</td>";
echo "<td><div class='progressbar $progress_bar_class' style='width: $progress_bar_width%;'>&nbsp;</div><p style='clear: both; margin: 0;'>$percent_complete%</p></td>";
Expand All @@ -470,7 +470,7 @@ function summarize_stage($stage, $desired_states, $show_filtered_projects = fals
// specificity of inline style is needed to override default style to
// force the filter links to align to the left.
echo "<tr>";
if (is_a($stage, 'Round')) {
if ($stage instanceof Round) {
echo "<td colspan='7' style='text-align: left;'>";
} else {
echo "<td colspan='3' style='text-align: left;'>";
Expand Down
2 changes: 1 addition & 1 deletion pinc/Activity.inc
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class Activity
// which seems worse.
// TODO: We should probably have a function for declaring criteria.
global $ACCESS_CRITERIA;
if (is_a($this, 'Round')) {
if ($this instanceof Round) {
$ACCESS_CRITERIA[$this->id] =
sprintf(_("'%s' pages completed"), $this->id);
}
Expand Down
4 changes: 2 additions & 2 deletions pinc/showavailablebooks.inc
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ function show_project_listing(
// $presort allows us to place certain projects at the top of all project
// listings such as BEGIN projects, but only for Rounds.
$presort = "";
if (is_a($stage, 'Round')) {
if ($stage instanceof Round) {
$presort = round_project_listing_presort($stage);
if (!empty($presort)) {
$presort .= ',';
Expand Down Expand Up @@ -521,7 +521,7 @@ function show_project_listing(
} elseif ($col_id == "genre") {
$genre = $book['trans_genre'];
if ($book['difficulty'] == "beginner") {
if (is_a($stage, 'Round')) {
if ($stage instanceof Round) {
if ($stage->is_a_mentee_round()) {
$genre = _("BEGINNERS ONLY")." ".$genre;
} elseif ($stage->is_a_mentor_round()) {
Expand Down