From: <var...@us...> - 2012-12-11 14:02:36
|
Revision: 8642 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8642&view=rev Author: vargenau Date: 2012-12-11 14:02:25 +0000 (Tue, 11 Dec 2012) Log Message: ----------- Remove unused function get_host Modified Paths: -------------- trunk/lib/AccessLog.php trunk/lib/Request.php Modified: trunk/lib/AccessLog.php =================================================================== --- trunk/lib/AccessLog.php 2012-12-11 14:01:42 UTC (rev 8641) +++ trunk/lib/AccessLog.php 2012-12-11 14:02:25 UTC (rev 8642) @@ -141,34 +141,6 @@ } /** - * Return iterator of matching host items reverse sorted (latest first). - */ - function get_host($host, $since_minutes = 20) - { - if ($this->logtable) { - // mysql specific only: - return $this->read_sql("request_host=" . $this->_dbi->quote($host) - . " AND time_stamp > " . (time() - $since_minutes * 60) - . " ORDER BY time_stamp DESC"); - } else { - $iter = new WikiDB_Array_generic_iter(); - $logs =& $iter->_array; - $logentry = new Request_AccessLogEntry($this); - while ($logentry->read_file()) { - if (!empty($logentry->referer)) { - $iter->_array[] = $logentry; - if ($limit and count($logs) > $limit) - array_shift($logs); - $logentry = new Request_AccessLogEntry($this); - } - } - $logs = array_reverse($logs); - $logs = array_slice($logs, 0, min($limit, count($logs))); - return $iter; - } - } - - /** * Read sequentially backwards all previous entries from log file. * FIXME! */ Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2012-12-11 14:01:42 UTC (rev 8641) +++ trunk/lib/Request.php 2012-12-11 14:02:25 UTC (rev 8642) @@ -971,33 +971,6 @@ } /** - * Return iterator of matching host items reverse sorted (latest first). - */ - function get_host($host, $since_minutes = 20) - { - if ($this->logtable) { - // mysql specific only: - return $this->read_sql("request_host=" . $this->_dbi->quote($host) . " AND time_stamp > " . (time() - $since_minutes * 60) - . " ORDER BY time_stamp DESC"); - } else { - $iter = new WikiDB_Array_generic_iter(); - $logs =& $iter->_array; - $logentry = new Request_AccessLogEntry($this); - while ($logentry->read_file()) { - if (!empty($logentry->referer)) { - $iter->_array[] = $logentry; - if ($limit and count($logs) > $limit) - array_shift($logs); - $logentry = new Request_AccessLogEntry($this); - } - } - $logs = array_reverse($logs); - $logs = array_slice($logs, 0, min($limit, count($logs))); - return $iter; - } - } - - /** * Read sequentially all previous entries from log file. */ function read_file() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |