From ffb16f0627ecbaaaf18b6d7b01d05a47d74cf950 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Sun, 2 Mar 2014 00:47:21 +1100 Subject: [PATCH] Fix player list table warning --- functions.php | 2 +- languages/sportpress-sv_SE.mo | Bin 0 -> 11316 bytes languages/sportpress-sv_SE.po | 20 +++---- lib/fallbacks/date-diff.php | 99 ---------------------------------- readme.txt | 2 +- sportspress.php | 1 - 6 files changed, 12 insertions(+), 112 deletions(-) create mode 100644 languages/sportpress-sv_SE.mo delete mode 100644 lib/fallbacks/date-diff.php diff --git a/functions.php b/functions.php index 35cc6064..acee158d 100644 --- a/functions.php +++ b/functions.php @@ -1971,7 +1971,7 @@ if ( !function_exists( 'sportspress_get_player_list_data' ) ) { $placeholders[ $player_id ] = array( 'eventsplayed' => 0 ); // Add static statistics to placeholders - if ( array_key_exists( $league_id, $static ) && array_key_exists( $div_id, $static[ $league_id ] ) ): + if ( is_array( $static ) && array_key_exists( $league_id, $static ) && array_key_exists( $div_id, $static[ $league_id ] ) ): $placeholders[ $player_id ] = array_merge( $placeholders[ $player_id ], $static[ $league_id ][ $div_id ] ); endif; endforeach; diff --git a/languages/sportpress-sv_SE.mo b/languages/sportpress-sv_SE.mo new file mode 100644 index 0000000000000000000000000000000000000000..dc20aa819bbfeeb7b25029d7bb1f64ff3bc32972 GIT binary patch literal 11316 zcmbuE3y>T~dB+>eFJzO4F~kH6BV!54zCG(?3FOtoK1nC(@SSwNJ6VXAGPm2eH`>{m zWoGuIGckr390v$77y^daBp?Ci;RFl{U@!(!5MC*qsssoS5>tc%oK%2HLK2GP_wVU_ zoa9g@Ox?G??w)>p{rbAUxxc^Q%r_XGPa#i1hR!zToW~fm^?aoo^PFEZ=3ICPJ|51& z3*jPsB7BwS+aN{FN8n2M0DK($f=~Y%+(P^x;Je{de%+WSz|X>A_)W+wbN&Ui4=?sy z?OA~3$KC{F+2VH13vu)Q2I9DlVIDwf2B`<9h81=f!D!zK-KpXDE-f%lfMEV z3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languages/sportpress-sv_SE.po b/languages/sportpress-sv_SE.po index 6404dd07..a5d791e6 100644 --- a/languages/sportpress-sv_SE.po +++ b/languages/sportpress-sv_SE.po @@ -3,8 +3,8 @@ msgstr "" "Project-Id-Version: SportsPress 0.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-02-21 15:18+1000\n" -"PO-Revision-Date: 2014-02-25 23:53+0100\n" -"Last-Translator: \n" +"PO-Revision-Date: 2014-02-28 20:56+1000\n" +"Last-Translator: ThemeBoy \n" "Language-Team: ThemeBoy \n" "Language: en_US\n" "MIME-Version: 1.0\n" @@ -470,8 +470,8 @@ msgid "" "SportsPress theme :)" msgstr "" "Ditt tema stöder kanske inte SportsPress – om du " -"stöter pÃ¥ layout-problem, var god läs vÃ¥r integrationsguide eller väl ett " -"Sportpress-tema :)" +"stöter pÃ¥ layout-problem, var god läs vÃ¥r integrationsguide eller väl " +"ett Sportpress-tema :)" #: ../admin/includes/notice-theme-support.php:7 msgid "Theme Integration Guide" @@ -856,8 +856,8 @@ msgid "" "Hi there! Choose a .csv file to upload, then click \"Upload file and import" "\"." msgstr "" -"Hej! Väl en .csv-fil att ladda upp, klicka sedan pÃ¥ \"Upload file and import" -"\"." +"Hej! Väl en .csv-fil att ladda upp, klicka sedan pÃ¥ \"Upload file and " +"import\"." #: ../admin/tools/player-importer.php:288 #, php-format @@ -865,8 +865,8 @@ msgid "" "Players need to be defined with columns in a specific order (7 columns). Click here to download a sample." msgstr "" -"Spelare mÃ¥ste definieras med kolumner i en särskild ordning (7 kolumner). Ladda ner exempel." +"Spelare mÃ¥ste definieras med kolumner i en särskild ordning (7 kolumner). " +"Ladda ner exempel." #: ../admin/tools/player-importer.php:296 ../admin/tools/team-importer.php:255 msgid "" @@ -918,8 +918,8 @@ msgid "" "Teams need to be defined with columns in a specific order (3 columns). Click here to download a sample." msgstr "" -"Spelare mÃ¥ste definieras med kolumner i en särskild ordning (3 kolumner). Ladda ner exempel." +"Spelare mÃ¥ste definieras med kolumner i en särskild ordning (3 kolumner). " +"Ladda ner exempel." #: ../admin/widgets/countdown.php:5 msgid "A clock that counts down to an upcoming event." diff --git a/lib/fallbacks/date-diff.php b/lib/fallbacks/date-diff.php deleted file mode 100644 index 9c7c0a99..00000000 --- a/lib/fallbacks/date-diff.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - */ - -if(!function_exists('date_diff')) { - class DateInterval { - public $y; - public $m; - public $d; - public $h; - public $i; - public $s; - public $invert; - public $days; - - public function format($format) { - $format = str_replace('%R%y', - ($this->invert ? '-' : '+') . $this->y, $format); - $format = str_replace('%R%m', - ($this->invert ? '-' : '+') . $this->m, $format); - $format = str_replace('%R%d', - ($this->invert ? '-' : '+') . $this->d, $format); - $format = str_replace('%R%h', - ($this->invert ? '-' : '+') . $this->h, $format); - $format = str_replace('%R%i', - ($this->invert ? '-' : '+') . $this->i, $format); - $format = str_replace('%R%s', - ($this->invert ? '-' : '+') . $this->s, $format); - - $format = str_replace('%y', $this->y, $format); - $format = str_replace('%m', $this->m, $format); - $format = str_replace('%d', $this->d, $format); - $format = str_replace('%h', $this->h, $format); - $format = str_replace('%i', $this->i, $format); - $format = str_replace('%s', $this->s, $format); - - return $format; - } - } - - function date_diff(DateTime $date1, DateTime $date2) { - - $diff = new DateInterval(); - - if($date1 > $date2) { - $tmp = $date1; - $date1 = $date2; - $date2 = $tmp; - $diff->invert = 1; - } else { - $diff->invert = 0; - } - - $diff->y = ((int) $date2->format('Y')) - ((int) $date1->format('Y')); - $diff->m = ((int) $date2->format('n')) - ((int) $date1->format('n')); - if($diff->m < 0) { - $diff->y -= 1; - $diff->m = $diff->m + 12; - } - $diff->d = ((int) $date2->format('j')) - ((int) $date1->format('j')); - if($diff->d < 0) { - $diff->m -= 1; - $diff->d = $diff->d + ((int) $date1->format('t')); - } - $diff->h = ((int) $date2->format('G')) - ((int) $date1->format('G')); - if($diff->h < 0) { - $diff->d -= 1; - $diff->h = $diff->h + 24; - } - $diff->i = ((int) $date2->format('i')) - ((int) $date1->format('i')); - if($diff->i < 0) { - $diff->h -= 1; - $diff->i = $diff->i + 60; - } - $diff->s = ((int) $date2->format('s')) - ((int) $date1->format('s')); - if($diff->s < 0) { - $diff->i -= 1; - $diff->s = $diff->s + 60; - } - - $start_ts = $date1->format('U'); - $end_ts = $date2->format('U'); - $days = $end_ts - $start_ts; - $diff->days = round($days / 86400); - - if (($diff->h > 0 || $diff->i > 0 || $diff->s > 0)) - $diff->days += ((bool) $diff->invert) - ? 1 - : -1; - - return $diff; - - } - -} diff --git a/readme.txt b/readme.txt index 3f48627e..a887bfcf 100644 --- a/readme.txt +++ b/readme.txt @@ -1,5 +1,5 @@ === SportsPress - automated league statistics === -Contributors: ThemeBoy, aylaview, jenszackrisson +Contributors: ThemeBoy Tags: sports, sports journalism, teams, team management, fixtures, results, standings, league tables, leagues, reporting, themeboy, wordpress sports, configurable Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=support@themeboy.com&item_name=Donation+for+SportsPress Requires at least: 3.8 diff --git a/sportspress.php b/sportspress.php index cd90b9c5..67e97a88 100644 --- a/sportspress.php +++ b/sportspress.php @@ -24,7 +24,6 @@ define( 'SPORTSPRESS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); define( 'SPORTSPRESS_PLUGIN_FILE', __FILE__ ); // Libraries -require_once dirname( __FILE__ ) . '/lib/fallbacks/date-diff.php' ; require_once dirname( __FILE__ ) . '/lib/eos/eos.class.php' ; // Globals