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:
authorpebosi <mail@pebosi.net>2017-04-09 19:50:26 +0300
committerStefan Giehl <stefan@piwik.org>2017-04-09 19:50:26 +0300
commit6f5eabe302883122d47e4fc766b78afa42af8964 (patch)
treee73ba598f66f11af1a4f902847009d10533c79e0 /plugins/SEO
parent3f4d252e70e6c55ec63ac90f1e458bd4faa80a40 (diff)
Remove dmoz entries, as dmoz is offline (#11597)
* Delete Dmoz.php * Remove dmoz entries, as dmoz is offline * Remove dmoz entries, as dmoz is offline * Remove dmoz entries, as dmoz is offline
Diffstat (limited to 'plugins/SEO')
-rw-r--r--plugins/SEO/API.php2
-rw-r--r--plugins/SEO/Metric/Aggregator.php1
-rw-r--r--plugins/SEO/Metric/Dmoz.php62
-rw-r--r--plugins/SEO/lang/en.json3
4 files changed, 2 insertions, 66 deletions
diff --git a/plugins/SEO/API.php b/plugins/SEO/API.php
index fdadbf518f..879df5940e 100644
--- a/plugins/SEO/API.php
+++ b/plugins/SEO/API.php
@@ -23,7 +23,7 @@ require_once PIWIK_INCLUDE_PATH . '/plugins/Referrers/functions.php';
/**
* The SEO API lets you access a list of SEO metrics for the specified URL: Google PageRank, Google/Bing indexed pages
- * Alexa Rank, age of the Domain name and count of DMOZ entries.
+ * Alexa Ranka and age of the Domain name.
*
* @method static API getInstance()
*/
diff --git a/plugins/SEO/Metric/Aggregator.php b/plugins/SEO/Metric/Aggregator.php
index ef3c93e606..6b81744087 100644
--- a/plugins/SEO/Metric/Aggregator.php
+++ b/plugins/SEO/Metric/Aggregator.php
@@ -50,7 +50,6 @@ class Aggregator implements MetricsProvider
$container->get('Piwik\Plugins\SEO\Metric\Bing'),
$container->get('Piwik\Plugins\SEO\Metric\Alexa'),
$container->get('Piwik\Plugins\SEO\Metric\DomainAge'),
- $container->get('Piwik\Plugins\SEO\Metric\Dmoz'),
);
/**
diff --git a/plugins/SEO/Metric/Dmoz.php b/plugins/SEO/Metric/Dmoz.php
deleted file mode 100644
index c14792aa31..0000000000
--- a/plugins/SEO/Metric/Dmoz.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/**
- * Piwik - free/libre analytics platform
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-
-namespace Piwik\Plugins\SEO\Metric;
-
-use Piwik\Http;
-use Piwik\NumberFormatter;
-use Psr\Log\LoggerInterface;
-
-/**
- * Retrieves the number of Dmoz.org entries.
- */
-class Dmoz implements MetricsProvider
-{
- const URL = 'http://www.dmoz.org/search?q=';
-
- /**
- * @var LoggerInterface
- */
- private $logger;
-
- /**
- * @param LoggerInterface $logger
- */
- public function __construct(LoggerInterface $logger)
- {
- $this->logger = $logger;
- }
-
- public function getMetrics($domain)
- {
- try {
- $response = Http::sendHttpRequest(self::URL . urlencode($domain), $timeout = 10, @$_SERVER['HTTP_USER_AGENT']);
-
- preg_match('#[0-9] - [0-9]+ of ([0-9]+)#', $response, $p);
- if (!empty($p[1])) {
- $value = NumberFormatter::getInstance()->formatNumber((int)$p[1]);
- } else {
- $value = 0;
- }
-
- // Add DMOZ only if > 0 entries found
- if ($value == 0) {
- return array();
- }
- } catch (\Exception $e) {
- $this->logger->warning('Error while getting Dmoz SEO stats: {message}', array('message' => $e->getMessage()));
- $value = null;
- }
-
- $logo = "plugins/Morpheus/icons/dist/SEO/dmoz.org.png";
-
- return array(
- new Metric('dmoz', 'SEO_Dmoz', $value, $logo)
- );
- }
-}
diff --git a/plugins/SEO/lang/en.json b/plugins/SEO/lang/en.json
index 7007ad48f2..589d445fd2 100644
--- a/plugins/SEO/lang/en.json
+++ b/plugins/SEO/lang/en.json
@@ -3,11 +3,10 @@
"PluginDescription": "This Plugin extracts and displays SEO metrics: Alexa web ranking, Google Pagerank, number of Indexed pages and backlinks of the currently selected website.",
"AlexaRank": "Alexa Rank",
"Bing_IndexedPages": "Bing indexed pages",
- "Dmoz": "DMOZ entries",
"DomainAge": "Domain Age",
"Google_IndexedPages": "Google indexed pages",
"Rank": "Rank",
"SeoRankings": "SEO Rankings",
"SEORankingsFor": "SEO Rankings for %s"
}
-} \ No newline at end of file
+}