Skip to content

Commit

Permalink
Fixed using default limit
Browse files Browse the repository at this point in the history
  • Loading branch information
kozi committed Jun 25, 2018
1 parent dfcd26f commit ce01539
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions src/Simpletipp/Modules/SimpletippMatches.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,14 @@ private function getMatches()
$params = array_merge(
array($this->simpletippUserId, $this->simpletipp->leagueID, $this->simpletippUserId),
$this->matches_filter->params
);
);

$result = $this->Database->prepare($sql.$this->matches_filter->stmt.$this->matches_filter->order_by)
->limit($this->matches_filter->limit)->execute($params);
$dbStmt = $this->Database->prepare($sql.$this->matches_filter->stmt.$this->matches_filter->order_by);
if($this->matches_filter->limit != 0) {
$dbStmt->limit($this->matches_filter->limit);
}

$result = $dbStmt->execute($params);
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions src/Simpletipp/SimpletippMatchUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,15 +374,15 @@ private function groupMapper($arrMatch)
$replaceFrom = [];
$replaceTo = [];

$replaceFrom[] = 'Gruppenphase'; $replaceTo[] = 'GP';
$replaceFrom[] = 'Gruppenphase'; $replaceTo[] = 'G';
$replaceFrom[] = 'Achtelfinale'; $replaceTo[] = '';
$replaceFrom[] = 'Viertelfinale'; $replaceTo[] = '¼';
$replaceFrom[] = 'Halbfinale'; $replaceTo[] = '½';
$replaceFrom[] = 'Spiel um Platz 3'; $replaceTo[] = 'P3';
$replaceFrom[] = 'Finale'; $replaceTo[] = 'F';
$replaceFrom[] = 'Gruppe'; $replaceTo[] = '';
$replaceFrom[] = '. Spieltag'; $replaceTo[] = '';

$arrGroup['short'] = $strName = trim(str_replace($replaceFrom, $replaceTo, $arrGroup['name']));

return $arrGroup;
Expand Down

0 comments on commit ce01539

Please sign in to comment.