Welcome! Log In Create A New Profile

Advanced

Spidering Logs in Random Order in Admin Statistics (fixed with mod)

Posted by Wayne_Sallee 
Spidering Logs in Random Order in Admin Statistics (fixed with mod)
May 20, 2010 02:57AM
I got tired of looking for the log file I wanted to view because all the log files were listed in random order, instead of order by date.

edit commonfuctions.php in the includes folder

Add the following line
rsort($contents);

So that it looks like
function get_dir_contents($dir) {
	$contents = Array();
	if ($handle = opendir($dir)) {
		while (false !== ($file = readdir($handle))) {
			if ($file != "." && $file != ".."winking smiley {
				$contents[] = $file;
			}
		}
		closedir($handle);
	}
	rsort($contents);
	return $contents;
}

Wayne Sallee
Wayne@WayneSallee.com



Edited 2 time(s). Last edit at 07/23/2010 10:48PM by Wayne_Sallee.
Re: Spidering Logs in Random Order in Admin Statistics (fixed with mod)
May 20, 2010 03:01AM
Looks like this forum needs a mod to get rid of the smileys in the formatted code boxes.

Smileys should not be showing up in formatted code boxes.

Wayne Sallee
Wayne@WayneSallee.com
Re: spider
May 24, 2010 05:43PM
hello

I have a problem with indexing files .ppt and .xls. I utilise "catppt" and "xsl2csv" but i not succed to do this.
can you help me
Re: Spidering Logs in Random Order in Admin Statistics (fixed with mod)
July 23, 2010 10:49PM
Update:

I changed the "sort($contents);" to "rsort($contents);" so that the newest logs are on top.

Also the commonfuctions.php is in the includes folder.

Wayne Sallee
Wayne@WayneSallee.com
Sorry, only registered users may post in this forum.

Click here to login