Skip to content

Commit

Permalink
Ensure WebKit survey results are always visible in the admin
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=249584

Reviewed by Tim Nguyen.

* Websites/webkit.org/wp-content/plugins/webkit-survey/plugin.php:
* Websites/webkit.org/wp-content/plugins/webkit-survey/results.php:

Canonical link: https://commits.webkit.org/258086@main
  • Loading branch information
jdatapple committed Dec 19, 2022
1 parent e791aff commit 07d853d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -86,7 +86,7 @@ public function admin_box() {
</style>
<?php
include(dirname(__FILE__) . '/results.php');
echo "$total Total Votes";
echo '<strong>' . number_format($total) . '</strong> Total Votes';
}

public function process_vote() {
Expand Down
Expand Up @@ -61,7 +61,7 @@
foreach ($SurveyResults->survey as $id => $Entry): $total = isset($Entry->scores['total']) ? $Entry->scores['total'] : 1;

$results_classes = ['webkit-survey-results'];
if ($SurveyResults->status == 'closed' || $SurveyResults->results == 'visible' || WebKit_Survey::responded())
if ($SurveyResults->status == 'closed' || $SurveyResults->results == 'visible' || WebKit_Survey::responded() || is_admin())
$results_classes[] = 'visible';
?>
<div class="<?php esc_attr_e(join(' ', $results_classes)); ?>">
Expand Down

0 comments on commit 07d853d

Please sign in to comment.