Simplify league table and player list value assignment

This commit is contained in:
Brian Miyaji
2016-04-11 19:46:41 +10:00
parent 8a9af049ca
commit aca031f774
2 changed files with 6 additions and 8 deletions

View File

@@ -543,10 +543,10 @@ class SP_League_Table extends SP_Custom_Post{
// Use static data if key exists and value is not empty, else use placeholder
if ( array_key_exists( $team_id, $tempdata ) && array_key_exists( $key, $tempdata[ $team_id ] ) && $tempdata[ $team_id ][ $key ] != '' ):
$merged[ $team_id ][ $key ] = $tempdata[ $team_id ][ $key ];
else:
$merged[ $team_id ][ $key ] = $value;
$value = $tempdata[ $team_id ][ $key ];
endif;
$merged[ $team_id ][ $key ] = $value;
endforeach;
@@ -645,7 +645,6 @@ class SP_League_Table extends SP_Custom_Post{
return $this->pos;
}
/**
* Calculate and add games back.
*