/[drupal]/contributions/modules/browscap/browscap.module
ViewVC logotype

Diff of /contributions/modules/browscap/browscap.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.6.2.3.2.6, Mon Jun 8 11:37:43 2009 UTC revision 1.6.2.3.2.7, Wed Sep 16 22:11:57 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: browscap.module,v 1.6.2.3.2.5 2009/03/08 11:09:27 robloach Exp $  // $Id: browscap.module,v 1.6.2.3.2.6 2009/06/08 11:37:43 robloach Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 193  function browscap_top_useragents($view = Line 193  function browscap_top_useragents($view =
193        array('data' => t('Percent'), 'field' => 'percent')        array('data' => t('Percent'), 'field' => 'percent')
194      );      );
195    }    }
196    
197    drupal_set_title($title);    drupal_set_title($title);
198    
199    $query .= tablesort_sql($header);    $query .= tablesort_sql($header);
# Line 229  function browscap_top_useragents($view = Line 229  function browscap_top_useragents($view =
229    print theme('page', $output, $title);    print theme('page', $output, $title);
230  }  }
231    
   
   
232  function browscap_get_browser($useragent = NULL) {  function browscap_get_browser($useragent = NULL) {
233    if (!$useragent) {    if (!$useragent) {
234      $useragent = $_SERVER['HTTP_USER_AGENT'];      $useragent = $_SERVER['HTTP_USER_AGENT'];
# Line 316  function _browscap_import($cron = TRUE) Line 314  function _browscap_import($cron = TRUE)
314    $browscapfp = fopen($browscapfile, "w");    $browscapfp = fopen($browscapfile, "w");
315    fwrite($browscapfp, $browscap->data);    fwrite($browscapfp, $browscap->data);
316    fclose($browscapfp);    fclose($browscapfp);
317    
318    $a = parse_ini_file($browscapfile, TRUE);    $a = parse_ini_file($browscapfile, TRUE);
319    if ($a) {    if ($a) {
320      // the first entry in the array is the version info      // the first entry in the array is the version info
# Line 335  function _browscap_import($cron = TRUE) Line 333  function _browscap_import($cron = TRUE)
333        db_query("DELETE FROM {browscap} WHERE useragent = '%s'", $useragent);        db_query("DELETE FROM {browscap} WHERE useragent = '%s'", $useragent);
334        db_query("INSERT INTO {browscap} (useragent, data) VALUES ('%s', '%s')", $useragent, serialize($e));        db_query("INSERT INTO {browscap} (useragent, data) VALUES ('%s', '%s')", $useragent, serialize($e));
335      }      }
336    
337      cache_clear_all('*', 'cache_browscap', TRUE);      cache_clear_all('*', 'cache_browscap', TRUE);
338      variable_set('browscap_version', $browscapversion);      variable_set('browscap_version', $browscapversion);
339      watchdog('browscap', 'New version of browscap imported: '. $browscapversion);      watchdog('browscap', 'New version of browscap imported: '. $browscapversion);

Legend:
Removed from v.1.6.2.3.2.6  
changed lines
  Added in v.1.6.2.3.2.7

  ViewVC Help
Powered by ViewVC 1.1.2