summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-11-23 21:38:39 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-11-23 21:38:39 +0100
commit040eeb280297459cdab6c47d6064341fc5875da8 (patch)
treee2dc18a32e88a898a648c442ab6efb2b28d0182f /tools
parentb888ebbf6d42dd36943399df04087fbc236c5103 (diff)
downloadMana-040eeb280297459cdab6c47d6064341fc5875da8.tar.gz
Mana-040eeb280297459cdab6c47d6064341fc5875da8.tar.bz2
Mana-040eeb280297459cdab6c47d6064341fc5875da8.tar.xz
Mana-040eeb280297459cdab6c47d6064341fc5875da8.zip
Display obsolete files in gray and links to svn
Old change that never made it into version control. Will be updating this to git now.
Diffstat (limited to 'tools')
-rw-r--r--tools/upalyzer/analyze.php23
1 files changed, 19 insertions, 4 deletions
diff --git a/tools/upalyzer/analyze.php b/tools/upalyzer/analyze.php
index 106fcbb5..3758eae4 100644
--- a/tools/upalyzer/analyze.php
+++ b/tools/upalyzer/analyze.php
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
header("Content-type: text/html");
-header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
@@ -31,6 +31,9 @@ header("Pragma: no-cache");
List of current updates:
<?php
+$svn_url_base = 'http://themanaworld.svn.sourceforge.net/viewvc/themanaworld/tmwdata/trunk/';
+$download_url_base = 'http://themanaworld.svn.sourceforge.net/viewvc/*checkout*/themanaworld/tmwdata/trunk/';
+$svn_checkout_path = '/home/eathena/public_html/updates/tmwdata/';
$update_file = array_filter(array_reverse(file('resources2.txt')));
$updates = array();
$update_file_maxlen = 0;
@@ -107,7 +110,7 @@ function print_update_name($update, $pad = true)
foreach (array_reverse($updates) as $update)
{
print_update_name($update);
- echo ' '. $update['adler32'];
+ printf(" %8s", $update['adler32']);
printf(" %4d kb", $update['filesize'] / 1024);
if (!$update['zip_error']) {
printf(" %4d kb", $update['uncompressed_size'] / 1024);
@@ -140,8 +143,20 @@ ksort($update_entries);
foreach ($update_entries as $entry => $update)
{
- printf("%-{$update_entry_maxlen}s ", $entry);
- print_update_name($update, false);
+ $exists = file_exists($svn_checkout_path . $entry);
+ printf("<span style=\"color: %s;\">%-{$update_entry_maxlen}s</span> ",
+ $exists ? "black" : "rgb(100,100,100)",
+ $entry);
+ print_update_name($update, true);
+
+ if ($exists) {
+ // Temporary hack to make URLs to map files work
+ $entry = str_replace('.tmx.gz', '.tmx', $entry);
+
+ printf(' <a href="%s%s?view=log">svn</a>', $svn_url_base, $entry);
+ if (substr($entry, strlen($entry) - 1) != '/')
+ printf(' <a href="%s%s">download</a>', $download_url_base, $entry);
+ }
echo "\n";
}