MyBB Community Forums
[F] Admin IP search [C-Rcpalace] - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: Archived Bug Reports (https://community.mybb.com/forum-74.html)
+------ Forum: MyBB 1.4.4 (https://community.mybb.com/forum-110.html)
+------ Thread: [F] Admin IP search [C-Rcpalace] (/thread-41791.html)



[F] Admin IP search [C-Rcpalace] - labrocca - 12-11-2008

It doesn't work right...it never has since 1.4x move.

The partial search doesn't work at all as far as I can tell.


RE: Admin IP search - [NEO] - 12-11-2008

Yep, I have reported this many times.
Last time I have, Ryan has warned me through PM to do not lie/FUD, and now I do not post any bug in order not to be banned.

Is this normal ?
Forgive me if my english is not very correct and maybe appear some misunderstandings of the words.

I confirm labrocca's issue.


RE: Admin IP search - topps - 12-11-2008

same here, the mod cp ip search does but not the admin cp?


RE: Admin IP search - labrocca - 12-11-2008

To be clear it's from the User Search form. There was an issue before with the options links for "search all posts with this IP" or whatever that option is...but the User Search form with IP searching gives poor results. The partial doesn't work period. I can't get any results from it.

Can I ask what the longipaddress is being used for since the regular IP is still listed? Is ipaddress going to be depricated at some point? Seems having both is useless but it would be best imho to just have straight forward regular IP and that's for a number of reasons. Such as export sql searching or from phpmyadmin. Having to convert a known ip to the longipaddress format seems...well...the long way to do things.


RE: Admin IP search - Ryan Gordon - 12-11-2008

(12-11-2008, 01:40 PM)mihails_univers Wrote: Yep, I have reported this many times.
Last time I have, Ryan has warned me through PM to do not lie/FUD, and now I do not post any bug in order not to be banned.

Is this normal ?
Forgive me if my english is not very correct and maybe appear some misunderstandings of the words.

I confirm labrocca's issue.

Ryan Gordon Wrote:
(11-27-2008, 01:44 PM)mihails_univers Wrote: I have reported the ADminCP search by IP bug from the beggining of 1.4, and till 1.4.4 every release it's written that was fixed, but in real it is not.

You even confirmed the bug fix for your second report, posted by Zinga Burga (Yumi). If you still have an issue make a support thread. If it turns out to still be a problem it will be reported as a bug and a developer will look into it. Once that happens SQA will test the fix if they can. If you want to test the fix too then request it.

Also, you only reported the problem twice. We've had a total of 4 releases. Last time I checked 2 was less then 4.

Ryan



RE: Admin IP search - Ryan Gordon - 12-11-2008

(12-11-2008, 01:40 PM)mihails_univers Wrote: Yep, I have reported this many times.
Last time I have, Ryan has warned me through PM to do not lie/FUD, and now I do not post any bug in order not to be banned.

Is this normal ?
Forgive me if my english is not very correct and maybe appear some misunderstandings of the words.

I confirm labrocca's issue.

Okay in admin/modules/user/users.php find:

// IPv6 IP
if(strpos($view['conditions'][$search_field], ":") !== false)
{
	$view['conditions'][$search_field] = str_replace("*", "%", $view['conditions'][$search_field]);
	$ip_sql = "{$search_field} LIKE '".$db->escape_string($view['conditions'][$search_field])."'";
}
else
{
	$ip_range = fetch_longipv4_range($view['conditions'][$search_field]);
	$view['conditions'][$search_field] = str_replace("*", "%", $view['conditions'][$search_field]);
	if(!is_array($ip_range))
	{
		$ip_sql = "long{$search_field}='{$ip_range}'";
	}
	else
	{
		$ip_sql = "long{$search_field} > '{$ip_range[0]}' AND long{$search_field} < '{$ip_range[1]}'";
	}
}

and replace with

// IPv6 IP
if(strpos($view['conditions'][$search_field], ":") !== false)
{
	$view['conditions'][$search_field] = str_replace("*", "%", $view['conditions'][$search_field]);
	$ip_sql = "{$search_field} LIKE '".$db->escape_string($view['conditions'][$search_field])."'";
}
else
{
	$ip_range = fetch_longipv4_range($view['conditions'][$search_field]);
	if(!is_array($ip_range))
	{
		$ip_sql = "long{$search_field}='{$ip_range}'";
	}
	else
	{
		$ip_sql = "long{$search_field} > '{$ip_range[0]}' AND long{$search_field} < '{$ip_range[1]}'";
	}
}

Also find:

// IPv6 IP
if(strpos($view['conditions']['postip'], ":") !== false)
{
	$view['conditions']['postip'] = str_replace("*", "%", $view['conditions']['postip']);
	$ip_sql = "ipaddress LIKE '".$db->escape_string($view['conditions']['postip'])."'";
}
else
{
	$ip_range = fetch_longipv4_range($view['conditions']['postip']);
	$view['conditions']['postip'] = str_replace("*", "%", $view['conditions']['postip']);
	if(!is_array($ip_range))
	{
		$ip_sql = "longipaddress='{$ip_range}'";
	}
	else
	{
		$ip_sql = "longipaddress > '{$ip_range[0]}' AND longipaddress < '{$ip_range[1]}'";
	}
}

and replace with

// IPv6 IP
if(strpos($view['conditions']['postip'], ":") !== false)
{
	$view['conditions']['postip'] = str_replace("*", "%", $view['conditions']['postip']);
	$ip_sql = "ipaddress LIKE '".$db->escape_string($view['conditions']['postip'])."'";
}
else
{
	$ip_range = fetch_longipv4_range($view['conditions']['postip']);
	if(!is_array($ip_range))
	{
		$ip_sql = "longipaddress='{$ip_range}'";
	}
	else
	{
		$ip_sql = "longipaddress > '{$ip_range[0]}' AND longipaddress < '{$ip_range[1]}'";
	}
}

And this time please test it.


RE: Admin IP search - Imad Jomaa - 12-16-2008

I'll be testing this as soon as I have access to my machine.
Best Regards.


[F] Admin IP search - Ryan Gordon - 12-22-2008

Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group