Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-07-19 05:14:38 +0400
committermattab <matthieu.aubry@gmail.com>2013-07-19 05:14:38 +0400
commit6e2ac9c07ce24b3b7e9062ef4ef7d35b60920499 (patch)
tree739fb399b00f5fc6944547838cf02bc1266cb5eb /plugins/SEO
parenta2d2412414e3b5dabc15f6c49a34ced878db67dd (diff)
Fix Google Indexed Pages metric for sites with less than dozens pages listed (where the "about" string is not displayed in search output)
Diffstat (limited to 'plugins/SEO')
-rw-r--r--plugins/SEO/RankChecker.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/SEO/RankChecker.php b/plugins/SEO/RankChecker.php
index 33c1956759..62803e4875 100644
--- a/plugins/SEO/RankChecker.php
+++ b/plugins/SEO/RankChecker.php
@@ -114,8 +114,9 @@ class Piwik_SEO_RankChecker
{
$url = 'http://www.google.com/search?hl=en&q=site%3A' . urlencode($this->url);
$data = $this->getPage($url);
- if (preg_match('#about ([0-9\,]+) results#i', $data, $p)) {
- return (int)str_replace(',', '', $p[1]);
+ if (preg_match('#([0-9\,]+) results#i', $data, $p)) {
+ $indexedPages = (int)str_replace(',', '', $p[1]);
+ return $indexedPages;
}
return 0;
}