Skip to content

Commit f3b181c

Browse files
committed
Incapsuated language.
1 parent a8fa33b commit f3b181c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Gwt/Client.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ protected function getDownloadUrls($site)
541541
{
542542
$url = sprintf(
543543
self::SERVICEURI.'downloads-list?hl=%s&siteUrl=%s',
544-
$this->_language, urlencode($site)
544+
$this->getLanguage(), urlencode($site)
545545
);
546546
$downloadList = $this->getData($url);
547547

@@ -561,13 +561,13 @@ private function downloadCSV_XTRA($site, $tableName, DateTime $dateStart, DateTi
561561

562562
$uri = sprintf(
563563
self::SERVICEURI . $options['token_uri'] . '?hl=%s&siteUrl=%s',
564-
$this->_language, $site
564+
$this->getLanguage(), $site
565565
);
566566
$token = $this->getToken($uri, $options['token_delimiter'], $options['dl_uri']);
567567

568568
$url = sprintf(
569569
self::SERVICEURI . $options['dl_uri'] . '?hl=%s&siteUrl=%s&security_token=%s&prop=ALL&db=%s&de=%s&more=true',
570-
$this->_language, $site, $token, $dateStart->format('Ymd'), $dateEnd->format('Ymd')
570+
$this->getLanguage(), $site, $token, $dateStart->format('Ymd'), $dateEnd->format('Ymd')
571571
);
572572

573573
return $this->getData($url);
@@ -602,7 +602,7 @@ private function downloadCSV_CrawlErrors($site, $separated = false)
602602
$finalName = "$savepath/CRAWL_ERRORS-$typename-$sortname-$filename.csv";
603603
$url = sprintf(
604604
self::SERVICEURI . 'crawl-errors-dl?hl=%s&siteUrl=%s&security_token=%s&type=%s&sort=%s',
605-
$this->_language, $site, $token, $typeid, $sortid
605+
$this->getLanguage(), $site, $token, $typeid, $sortid
606606
);
607607

608608
// TODO: find a better solution - this one might require a lot of memory
@@ -616,7 +616,7 @@ private function downloadCSV_CrawlErrors($site, $separated = false)
616616
$token = $this->getToken($uri, 'x26');
617617
$url = sprintf(
618618
self::SERVICEURI.'crawl-errors-dl?hl=%s&siteUrl=%s&security_token=%s&type=0',
619-
$this->_language, $site, $token
619+
$this->getLanguage(), $site, $token
620620
);
621621

622622
return $this->getData($url);
@@ -637,7 +637,7 @@ public function downloadCSV($site, $savepath = '.')
637637
$tables = $this->_tables;
638638
foreach ($tables as $table) {
639639
$this->saveData(
640-
$this->getTableData($table, $site, $this->_dateStart, $this->_dateEnd, $this->_language),
640+
$this->getTableData($table, $site, $this->_dateStart, $this->_dateEnd, $this->getLanguage()),
641641
"$savepath/$table-$filename.csv"
642642
);
643643
}

0 commit comments

Comments
 (0)