Skip to content

Commit

Permalink
Merge branch 'develop' into steve/no-issue/deprecate-remove-admin-not…
Browse files Browse the repository at this point in the history
…ices
  • Loading branch information
SteveJonesDev committed Jan 9, 2025
2 parents 0e7f6ae + f7b5220 commit 06fdcd4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ jobs:
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")

# Some images won't have svn available. Install it if that's the case.
- name: Install SVN
run: sudo apt-get update && sudo apt-get install -y subversion

- name: Install WP
shell: bash
run: tests/bin/install-wp-tests.sh wordpress_tests root '' 127.0.0.1:3306 ${{ matrix.wp_version }}
Expand Down
7 changes: 4 additions & 3 deletions admin/class-scans-stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,18 @@ public function clear_cache() {
/**
* Gets summary information about all scans
*
* @return array .
* @param boolean $skip_cache whether to skip the cache.
* @return array
*/
public function summary() {
public function summary( $skip_cache = false ) {

global $wpdb;

$transient_name = $this->cache_name_prefix . '_summary';

$cache = get_transient( $transient_name );

if ( $this->cache_time && $cache ) {
if ( ! $skip_cache && ( $this->cache_time && $cache ) ) {

if ( $cache['expires_at'] >= time() && $cache['cached_at'] + $this->cache_time >= time()
) {
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/helper-functions/OrdinalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ public function edac_ordinal_data() {
// Tests for the `ar` locale.
'integer 1, ar' => [
'numeric_value' => 1,
'ordinal_value' => '١.',
'ordinal_value' => '١',
'locale' => 'ar',
'ordinal_value_no_php-intl' => '1st',
],

// Tests for the `el_GR` locale.
'integer 1, el_GR' => [
'numeric_value' => 1,
'ordinal_value' => '1.',
'ordinal_value' => '1',
'locale' => 'el_GR',
'ordinal_value_no_php-intl' => '1st',
],
Expand Down

0 comments on commit 06fdcd4

Please sign in to comment.