Ignore:
Timestamp:
Feb 11, 2009, 9:28:18 PM (11 years ago)
Author:
fil@…
Message:

passer la key

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/_stable_/yagloo/inc/prepare_recherche.php

    r26526 r26527  
    6262
    6363                        $yagloo = 'Yagloo_recherche_'.$config['service'];
    64                         $results = $yagloo($recherche, $domains);
     64                        $key = $config[$config['service'].'key'];
     65                        $results = $yagloo($recherche, $domains, $key);
    6566
    6667                        $urls = array();
     
    188189}
    189190
    190 function Yagloo_recherche_boss($recherche, $domains='') {
    191         $appid = '';
     191function Yagloo_recherche_boss($recherche, $domains='', $key='') {
    192192        $api = 'http://boss.yahooapis.com/ysearch/web/v1/';
    193193        $page = 50;
    194         $urlapi = $api . urlencode($recherche) . '?appid=' . $appid
     194        $urlapi = $api . urlencode($recherche) . '?appid=' . $key
    195195                . '&format=json&sites=' . urlencode($domains) . '&count=' . $page;
    196196
     
    198198}
    199199
    200 function Yagloo_recherche_google($recherche, $domains='') {
    201         $apikey = '';
     200function Yagloo_recherche_google($recherche, $domains='', $key='') {
    202201        $api = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&rsz=large';
    203202        $urlapi = $api . '&q=site:' . urlencode($domains) . '+' . urlencode($recherche);
    204         if ($apikey)
    205                 $urlapi .= '&key='.urlencode($apikey);
     203        if ($key)
     204                $urlapi .= '&key='.urlencode($key);
    206205        if (strlen($GLOBALS['spip_lang']))
    207206                $urlapi .= '&hl=' . $GLOBALS['spip_lang'];
Note: See TracChangeset for help on using the changeset viewer.