Skip to content

Commit

Permalink
Merge pull request #4 from WinterSilence/patch-1
Browse files Browse the repository at this point in the history
По мелочи
  • Loading branch information
samdark committed Jul 13, 2015
2 parents e9ebff5 + 618ce68 commit a387694
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Sitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private function getCurrentFilePath()
}

$parts = pathinfo($this->filePath);
return $parts['dirname'] . '/' . $parts['filename'] . '_' . $this->fileCount . '.' . $parts['extension'];
return $parts['dirname'] . DIRECTORY_SEPARATOR . $parts['filename'] . '_' . $this->fileCount . '.' . $parts['extension'];
}

/**
Expand All @@ -197,8 +197,7 @@ public function getSitemapUrls($baseUrl)
{
$urls = [];
foreach ($this->writtenFilePaths as $file) {
$parts = pathinfo($file);
$urls[] = $baseUrl . $parts['basename'];
$urls[] = $baseUrl . pathinfo($file, PATHINFO_BASENAME);
}
return $urls;
}
Expand All @@ -210,7 +209,7 @@ public function getSitemapUrls($baseUrl)
*/
public function setMaxUrls($number)
{
$this->maxUrls = $number;
$this->maxUrls = (int)$number;
}

/**
Expand All @@ -221,6 +220,6 @@ public function setMaxUrls($number)
*/
public function setBufferSize($number)
{
$this->bufferSize = $number;
$this->bufferSize = (int)$number;
}
}

0 comments on commit a387694

Please sign in to comment.