From: <lu...@us...> - 2009-03-04 17:19:11
|
Revision: 9131 http://armagetronad.svn.sourceforge.net/armagetronad/?rev=9131&view=rev Author: luke-jr Date: 2009-03-04 17:19:05 +0000 (Wed, 04 Mar 2009) Log Message: ----------- find latest version with version_compare instead of mtime (which reflects when the res was added, not made Modified Paths: -------------- www/beta/trunk/www-aabeta/resource-browser/preview.php Modified: www/beta/trunk/www-aabeta/resource-browser/preview.php =================================================================== --- www/beta/trunk/www-aabeta/resource-browser/preview.php 2009-03-04 17:16:01 UTC (rev 9130) +++ www/beta/trunk/www-aabeta/resource-browser/preview.php 2009-03-04 17:19:05 UTC (rev 9131) @@ -80,9 +80,12 @@ foreach($files as $file) { list($name, $version) = explode('-', $file, 2); $version = preg_replace(RESOURCE_EXT_PREG, '', $version); +/* $mtime = stat(ereg_replace('/+', '/', $searchpath . '/' . $file)); $mtime = $mtime[10]; if(isset($latest[$name]) && $mtime < $latest[$name]['mtime']) +*/ + if(isset($latest[$name]) && version_compare($version,$latest[$name]['version'], '<')) continue; else $latest[$name] = array('mtime' => $mtime, 'version' => $version); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |