Changeset 6172
- Timestamp:
- May 13, 2010, 9:37:29 PM (14 years ago)
- Location:
- extensions/whois_online
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/whois_online/Changelog.txt.php
r5954 r6172 3 3 Plugin Name: Whois online 4 4 ** History ** 5 2010-04-24 2.0.n 6 Fix: Flags are coming back 7 5 8 2010-04-24 2.0.m 6 9 Fix: IE8 User agent could be too long 7 10 Fix: Failure on localisation (a French internet provider blocks external get_files) 8 11 Fix: Loss of previous collected data 9 10 12 2010-04-18 2.0.l 11 13 "Undefined index: Code" is removed -
extensions/whois_online/include/wo_functions.inc.php
r5954 r6172 151 151 function whois_country($trace, $bypass = false) { 152 152 if (!isset($trace['country'])) { 153 pwg_query('ALTER TABLE ' . WHOIS_ONLINE_TABLE . ' ADD `country` VARCHAR( 25 5) NOT NULL AFTER `lang` ;');153 pwg_query('ALTER TABLE ' . WHOIS_ONLINE_TABLE . ' ADD `country` VARCHAR( 254 ) NOT NULL AFTER `lang` ;'); 154 154 $trace['country']=''; 155 155 } … … 157 157 if ($trace['country']!='') $c = @unserialize(htmlspecialchars_decode($trace['country'])); 158 158 if (isset($c['Code']) and $c['Code']!='' and $c['Code']!='__') return $c; 159 if ($bypass and isset($c['Code']) and $c['Code']=='__') return $c;159 if ($bypass and isset($c['Code'])) return $c; 160 160 $result = pwg_get_contents ('http://api.hostip.info/get_html.php?ip=' . $trace['IP'], 'r'); 161 161 if ( $result !== false ) { … … 163 163 $c = array ('Name' => $tokens[1], 'City' => substr($tokens[3],0,-3)); 164 164 if (strpos ($c['Name'], '?') === FALSE) { 165 $tokens = preg_split ("/[\(\)]/", $c['Name']); 166 $c['Code'] = isset($tokens[1]) ? $tokens[1]:'__'; 165 $c['Code'] = substr($c['Name'],-8,2); # " (Private Address) (XX) City" 167 166 $c['Name'] = ucwords ( strtolower( substr($c['Name'],0,-5))); 168 167 } … … 170 169 } 171 170 if (stripos($c['Name'], 'Squid')!==false) $c = Array('Code' => '__', 'Name' => l10n('Unknown country'), 'City' => 'N/A',); 172 else $c = Array('Code' => '__', 'Name' => l10n('Unknown country'), 'City' => 'N/A',);171 // else $c = Array('Code' => '__', 'Name' => l10n('Unknown country'), 'City' => 'N/A',); 173 172 if ($c['Code'] == 'Private Address') { 174 173 $c['Name'] = l10n('Private Address'); … … 186 185 function whois_flag($trace, &$step, $limit = 10) { 187 186 $flag = WHOIS_ONLINE_PATH . 'flags/' . $trace['Country']['Code'] . '.jpg'; 188 if (file_exists($flag) ) return $flag;187 if (file_exists($flag) and $flag != '__' ) return $flag; 189 188 if ( $step > $limit ) return WHOIS_ONLINE_PATH . 'flags/__.jpg'; 190 189 $f = fopen ('http://api.hostip.info/flag.php?ip=' . $trace['IP'], 'r'); -
extensions/whois_online/main.inc.php
r5954 r6172 23 23 /* 24 24 Plugin Name: Whois online 25 Version: 2.0. m25 Version: 2.0.n 26 26 Description: Who is online? 27 27 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=279 … … 29 29 Author URI: http://www.vdigital.org 30 30 */ 31 define('WHOIS_ONLINE_VER', '2.0. m');31 define('WHOIS_ONLINE_VER', '2.0.n'); 32 32 global $prefixeTable, $conf; 33 33 // $conf['debug_l10n'] = true;
Note: See TracChangeset
for help on using the changeset viewer.