Index: /extensions/whois_online/config.php
===================================================================
--- /extensions/whois_online/config.php	(revision 21236)
+++ /extensions/whois_online/config.php	(revision 21237)
@@ -146,5 +146,5 @@
 // The whois_online table summary
 if (isset($_GET['tab']) and $_GET['tab']=='monitor') {
-  $whois_status = mysql_fetch_assoc(pwg_query('SHOW TABLE STATUS LIKE "' . WHOIS_ONLINE_TABLE .'%" ;'));
+  $whois_status = pwg_db_fetch_assoc(pwg_query('SHOW TABLE STATUS LIKE "' . WHOIS_ONLINE_TABLE .'%" ;'));
   $whois_status['table'] = WHOIS_ONLINE_TABLE;
   $whois_status['size'] = ($whois_status['Data_length'] + $whois_status['Index_length']) . ' bytes';
@@ -169,5 +169,5 @@
 	if (!empty($result))
 	{
-		while ($row = mysql_fetch_assoc($result))
+		while ($row = pwg_db_fetch_assoc($result))
 		{
 			$tpl[$row['session_id']] = $row['username'];
@@ -187,5 +187,5 @@
 	if (!empty($result))
 	{
-		while ($row = mysql_fetch_assoc($result))
+		while ($row = pwg_db_fetch_assoc($result))
 		{
 			$tpl[$row['session_id']] = $row['username'];
@@ -218,5 +218,5 @@
 	  'a:1:{s:6:"fields";a:5:{s:10:"date-after";s:10:"2009-09-09";s:11:"date-before";s:10:"2009-09-09";s:5:"types";a:4:{i:0;s:4:"none";i:1;s:7:"picture";i:2;s:4:"high";i:3;s:5:"other";}s:4:"user";s:2:"-1";s:17:"display_thumbnail";s:26:"display_thumbnail_hoverbox";}}'
 	  .'\');');
-	  $conf_whois['Search id'] = mysql_insert_id();
+	  $conf_whois['Search id'] = pwg_db_insert_id();
 		$conf['Whois Online'] = serialize($conf_whois);
 		pwg_query('REPLACE INTO ' . CONFIG_TABLE . " (param,value,comment)
@@ -224,5 +224,5 @@
 	}
 	// Get and Set to current date the stupid History search.
-	list($serialized_rules) = mysql_fetch_row(pwg_query('SELECT rules FROM '.SEARCH_TABLE.'
+	list($serialized_rules) = pwg_db_fetch_row(pwg_query('SELECT rules FROM '.SEARCH_TABLE.'
 	  WHERE id = '.$conf_whois['Search id'].';'));
 	$page['search'] = unserialize($serialized_rules);
@@ -234,5 +234,5 @@
 	// Most members ever online was
 	if (!isset($conf_whois['Users']['count']) or $conf_whois['Users']['count'] == 0) {
-		$count = mysql_fetch_assoc(pwg_query('SELECT MAX(`'. $conf['user_fields']['id'] .'`) AS `ctr` FROM ' . USERS_TABLE));
+		$count = pwg_db_fetch_assoc(pwg_query('SELECT MAX(`'. $conf['user_fields']['id'] .'`) AS `ctr` FROM ' . USERS_TABLE));
 		$conf_whois['Users']['count'] = $count['ctr'];
 	}
Index: /extensions/whois_online/include/wo_functions.inc.php
===================================================================
--- /extensions/whois_online/include/wo_functions.inc.php	(revision 21236)
+++ /extensions/whois_online/include/wo_functions.inc.php	(revision 21237)
@@ -58,5 +58,5 @@
 	$ctr = 0; $Online[0] = '';
 	$result = pwg_query('SELECT * FROM ' . WHOIS_ONLINE_TABLE . $order . ';');
-	while($row=mysql_fetch_array($result)) {
+	while($row=pwg_db_fetch_assoc($result)) {
 		$row['delay'] = (int) time() - $row['last_access'];
 		$row['elm_ids'] = explode(' ', $row['last_elm_ids']);
Index: /extensions/whois_online/main.inc.php
===================================================================
--- /extensions/whois_online/main.inc.php	(revision 21236)
+++ /extensions/whois_online/main.inc.php	(revision 21237)
@@ -30,4 +30,12 @@
 */
 
+// no need to show this info to search engine robots: even if we tell them
+// rel="nofollow" they follow the link. By deactivation this plugin to
+// robots, we avoid wasting resources on servers.
+if (preg_match('/(Googlebot|bingbot|Baiduspider|yandex|AhrefsBot|msnbot)/', $_SERVER["HTTP_USER_AGENT"]))
+{
+  return;
+}
+
 global $prefixeTable, $conf;
 // $conf['debug_l10n'] = true;
Index: /extensions/whois_online/maintain.inc.php
===================================================================
--- /extensions/whois_online/maintain.inc.php	(revision 21236)
+++ /extensions/whois_online/maintain.inc.php	(revision 21237)
@@ -44,5 +44,5 @@
 		pwg_query('DELETE FROM ' . WHOIS_ONLINE_TABLE);
 	}
-	list($hits) = mysql_fetch_row(pwg_query('SELECT SUM(hit) FROM '.IMAGES_TABLE.';'));
+	list($hits) = pwg_db_fetch_row(pwg_query('SELECT SUM(hit) FROM '.IMAGES_TABLE.';'));
 	$pags = floor($hits * 1.69); /* estimate : 1.69 is a frequent ratio between images hits and pages hits */
 	pwg_query('INSERT IGNORE INTO ' . WHOIS_ONLINE_TABLE . ' (`IP`, `hidden_IP`, `session_id`, `user_id`,`username`,`lang`,`permanent`,`last_access`,
Index: /extensions/whois_online/reload.php
===================================================================
--- /extensions/whois_online/reload.php	(revision 21236)
+++ /extensions/whois_online/reload.php	(revision 21237)
@@ -71,5 +71,5 @@
 
 // prefetch to optimize
-$local_guest = mysql_fetch_assoc(pwg_query('SELECT * FROM ' . USER_INFOS_TABLE .
+$local_guest = pwg_db_fetch_assoc(pwg_query('SELECT * FROM ' . USER_INFOS_TABLE .
 	' WHERE user_id = ' . $conf['guest_id'] .';'));
 	
@@ -89,5 +89,5 @@
 $result = pwg_query('SELECT * FROM ' . IMAGES_TABLE .
 	' WHERE id IN (' . $inlist .');');
-while ($row = mysql_fetch_assoc($result)) {
+while ($row = pwg_db_fetch_assoc($result)) {
 	$images[$row['id']] = $row;
 	$images[$row['id']]['tn_url'] = get_thumbnail_url($row);
@@ -113,5 +113,5 @@
 	}
 	else {
-		$online[$k]['user'] = mysql_fetch_assoc(pwg_query('SELECT * FROM ' . USER_INFOS_TABLE .
+		$online[$k]['user'] = pwg_db_fetch_assoc(pwg_query('SELECT * FROM ' . USER_INFOS_TABLE .
 		 ' WHERE user_id = ' . $v['user_id'] .';'));
 		$online[$k]['guest'] =  false;
