Skip to content
Extraits de code Groupes Projets
Valider 8933a13d rédigé par sgiehl's avatar sgiehl
Parcourir les fichiers

adjust used repo

parent d9bbb09a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -54,8 +54,8 @@ ...@@ -54,8 +54,8 @@
"symfony/event-dispatcher": "~2.6.0", "symfony/event-dispatcher": "~2.6.0",
"pear/pear_exception": "~1.0.0", "pear/pear_exception": "~1.0.0",
"piwik/referrer-spam-blacklist": "~1.0", "piwik/referrer-spam-blacklist": "~1.0",
"tecnickcom/tcpdf": "~6.0", "piwik/searchengine-and-social-list": "~1.0",
"piwik/searchengine-and-social-definitions": "dev-master" "tecnickcom/tcpdf": "~6.0"
}, },
"require-dev": { "require-dev": {
"aws/aws-sdk-php": "2.7.1", "aws/aws-sdk-php": "2.7.1",
...@@ -91,20 +91,8 @@ ...@@ -91,20 +91,8 @@
"reference": "master" "reference": "master"
} }
} }
}, }
{ ],
"type": "package",
"package": {
"name": "piwik/searchengine-and-social-definitions",
"type": "library",
"version": "master",
"source": {
"type": "git",
"url": "https://github.com/sgiehl/searchengine-and-social-definitions",
"reference": "master"
}
}
} ],
"scripts": { "scripts": {
"pre-update-cmd": [ "pre-update-cmd": [
"Piwik\\Composer\\ScriptHandler::cleanXhprof" "Piwik\\Composer\\ScriptHandler::cleanXhprof"
......
...@@ -959,15 +959,26 @@ ...@@ -959,15 +959,26 @@
"time": "2015-10-07 10:17:59" "time": "2015-10-07 10:17:59"
}, },
{ {
"name": "piwik/searchengine-and-social-definitions", "name": "piwik/searchengine-and-social-list",
"version": "master", "version": "1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sgiehl/searchengine-and-social-definitions", "url": "https://github.com/piwik/searchengine-and-social-list.git",
"reference": "master" "reference": "e2b97a1cd9ed2dde735de49f8ef9afc26b3df80b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/piwik/searchengine-and-social-list/zipball/e2b97a1cd9ed2dde735de49f8ef9afc26b3df80b",
"reference": "e2b97a1cd9ed2dde735de49f8ef9afc26b3df80b",
"shasum": ""
}, },
"type": "library", "type": "library",
"time": "2015-10-31 15:36:36" "notification-url": "https://packagist.org/downloads/",
"license": [
"Public Domain"
],
"description": "Search engine and social network definitions used by Piwik",
"time": "2015-11-06 21:32:51"
}, },
{ {
"name": "psr/log", "name": "psr/log",
...@@ -2656,7 +2667,6 @@ ...@@ -2656,7 +2667,6 @@
"minimum-stability": "stable", "minimum-stability": "stable",
"stability-flags": { "stability-flags": {
"php-di/php-di": 10, "php-di/php-di": 10,
"piwik/searchengine-and-social-definitions": 20,
"facebook/xhprof": 20 "facebook/xhprof": 20
}, },
"prefer-stable": false, "prefer-stable": false,
......
...@@ -23,7 +23,7 @@ class SearchEngine extends Singleton ...@@ -23,7 +23,7 @@ class SearchEngine extends Singleton
const OPTION_STORAGE_NAME = 'SearchEngineDefinitions'; const OPTION_STORAGE_NAME = 'SearchEngineDefinitions';
/** @var string location of definition file (relative to PIWIK_INCLUDE_PATH) */ /** @var string location of definition file (relative to PIWIK_INCLUDE_PATH) */
const DEFINITION_FILE = '/vendor/piwik/searchengine-and-social-definitions/SearchEngines.yml'; const DEFINITION_FILE = '/vendor/piwik/searchengine-and-social-list/SearchEngines.yml';
protected $definitionList = null; protected $definitionList = null;
......
...@@ -22,7 +22,7 @@ class Social extends Singleton ...@@ -22,7 +22,7 @@ class Social extends Singleton
const OPTION_STORAGE_NAME = 'SocialDefinitions'; const OPTION_STORAGE_NAME = 'SocialDefinitions';
/** @var string location of definition file (relative to PIWIK_INCLUDE_PATH) */ /** @var string location of definition file (relative to PIWIK_INCLUDE_PATH) */
const DEFINITION_FILE = '/vendor/piwik/searchengine-and-social-definitions/Socials.yml'; const DEFINITION_FILE = '/vendor/piwik/searchengine-and-social-list/Socials.yml';
protected $definitionList = null; protected $definitionList = null;
......
...@@ -23,26 +23,32 @@ class Tasks extends \Piwik\Plugin\Tasks ...@@ -23,26 +23,32 @@ class Tasks extends \Piwik\Plugin\Tasks
/** /**
* Update the search engine definitions * Update the search engine definitions
* *
* @see https://github.com/piwik/searchengine-and-social-definitions * @see https://github.com/piwik/searchengine-and-social-list
*/ */
public function updateSearchEngines() public function updateSearchEngines()
{ {
$url = 'https://raw.githubusercontent.com/piwik/searchengine-and-social-definitions/master/SearchEngines.yml'; $url = 'https://raw.githubusercontent.com/piwik/searchengine-and-social-list/master/SearchEngines.yml';
$list = Http::sendHttpRequest($url, 30); $list = Http::sendHttpRequest($url, 30);
$searchEngines = SearchEngine::getInstance()->loadYmlData($list); $searchEngines = SearchEngine::getInstance()->loadYmlData($list);
if (count($searchEngines) < 200) {
return;
}
Option::set(SearchEngine::OPTION_STORAGE_NAME, base64_encode(serialize($searchEngines))); Option::set(SearchEngine::OPTION_STORAGE_NAME, base64_encode(serialize($searchEngines)));
} }
/** /**
* Update the social definitions * Update the social definitions
* *
* @see https://github.com/piwik/searchengine-and-social-definitions * @see https://github.com/piwik/searchengine-and-social-list
*/ */
public function updateSocials() public function updateSocials()
{ {
$url = 'https://raw.githubusercontent.com/piwik/searchengine-and-social-definitions/master/Socials.yml'; $url = 'https://raw.githubusercontent.com/piwik/searchengine-and-social-list/master/Socials.yml';
$list = Http::sendHttpRequest($url, 30); $list = Http::sendHttpRequest($url, 30);
$socials = Social::getInstance()->loadYmlData($list); $socials = Social::getInstance()->loadYmlData($list);
if (count($socials) < 50) {
return;
}
Option::set(Social::OPTION_STORAGE_NAME, base64_encode(serialize($socials))); Option::set(Social::OPTION_STORAGE_NAME, base64_encode(serialize($socials)));
} }
} }
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter