diff --git a/contrib/tag_history/main.php b/contrib/tag_history/main.php index 6bfa1928..40835fc3 100644 --- a/contrib/tag_history/main.php +++ b/contrib/tag_history/main.php @@ -18,7 +18,7 @@ class Tag_History extends SimpleExtension { $this->install(); } } - + public function onAdminBuildingEvent($event) { global $user; @@ -251,6 +251,18 @@ class Tag_History extends SimpleExtension { return ($row ? $row : array()); } + /* This doesn't actually get _ALL_ IPs as it limits to 1000. */ + public function get_all_user_ips() + { + global $database; + $row = $database->get_all(" + SELECT DISTINCT user_ip + FROM tag_histories + ORDER BY tag_histories.user_ip DESC + LIMIT 1000"); + return ($row ? $row : array()); + } + /* * This function attempts to revert all changes by a given IP within an (optional) timeframe. */