diff --git a/activity_hub.php b/activity_hub.php index 511cbfc1c..c396eb123 100644 --- a/activity_hub.php +++ b/activity_hub.php @@ -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") { @@ -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] = @@ -431,7 +431,7 @@ function summarize_stage($stage, $desired_states, $show_filtered_projects = fals echo ""; // Rounds and Pools also get project totals. - if (is_a($stage, 'Round') || is_a($stage, 'Pool')) { + if ($stage instanceof Round || $stage instanceof Pool) { echo "$total_projects"; foreach ($desired_states as $desired_state) { echo ""; @@ -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 "{$round_stats->curr_day_goal}"; echo "{$round_stats->curr_day_actual}"; echo "
 

$percent_complete%

"; @@ -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 ""; - if (is_a($stage, 'Round')) { + if ($stage instanceof Round) { echo ""; } else { echo ""; diff --git a/pinc/Activity.inc b/pinc/Activity.inc index 1c437ed16..404e17813 100644 --- a/pinc/Activity.inc +++ b/pinc/Activity.inc @@ -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); } diff --git a/pinc/showavailablebooks.inc b/pinc/showavailablebooks.inc index c1338d577..4cd22853a 100644 --- a/pinc/showavailablebooks.inc +++ b/pinc/showavailablebooks.inc @@ -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 .= ','; @@ -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()) {