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 00000000..dc20aa81 Binary files /dev/null and b/languages/sportpress-sv_SE.mo differ diff --git a/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