Index: trunk/tools/subversion/users.php |
— | — | @@ -1,8 +1,8 @@ |
2 | | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
3 | | -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> |
| 2 | +<!DOCTYPE html> |
| 3 | +<html lang="en" dir="ltr"> |
4 | 4 | <head> |
5 | 5 | <title>Wikimedia Subversion user list</title> |
6 | | - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 6 | + <meta charset="UTF-8"> |
7 | 7 | </head> |
8 | 8 | <body> |
9 | 9 | <h1>Wikimedia Subversion user list</h1> |
— | — | @@ -15,14 +15,14 @@ |
16 | 16 | <?php |
17 | 17 | |
18 | 18 | $time = microtime( true ); |
| 19 | +$svnUsersDir = '/var/cache/svnusers'; |
19 | 20 | exec( "getent passwd", $lines ); |
20 | | -exec( "HOME=/tmp /usr/bin/svn up /var/cache/svnusers 2>&1", $output, $retval ); |
| 21 | +exec( "HOME=/tmp /usr/bin/svn up $svnUsersDir 2>&1", $output, $retval ); |
21 | 22 | if ( $retval ) { |
22 | 23 | $error = implode( "\n", $output ); |
23 | 24 | } else { |
24 | 25 | $error = false; |
25 | 26 | } |
26 | | -$committed = file( '/home/demon/commit' ); |
27 | 27 | |
28 | 28 | foreach ( $lines as $line ) { |
29 | 29 | $parts = explode( ':', trim( $line ) ); |
— | — | @@ -34,7 +34,6 @@ |
35 | 35 | $userInfo = array_map( 'htmlspecialchars', $userInfo ); |
36 | 36 | $link = $userInfo['url'] ? "<a href=\"{$userInfo['url']}\">$encUsername</a>" : $encUsername; |
37 | 37 | $readyForGit = isset( $userInfo['name'] ) && isset( $userInfo['email'] ) ? 'Y' : 'N'; |
38 | | - $haveCommitted = in_array( $parts[0], $committed ) ? 'Y' : 'N'; |
39 | 38 | |
40 | 39 | $rows[$parts[0]] = <<<EOT |
41 | 40 | <tr id="$encUsername"> |
— | — | @@ -58,7 +57,7 @@ |
59 | 58 | 'name' => '', |
60 | 59 | 'url' => '' |
61 | 60 | ); |
62 | | - $userFileLines = @file( "/var/cache/svnusers/$userName" ); |
| 61 | + $userFileLines = @file( "$svnUsersDir/$userName" ); |
63 | 62 | if ( $userFileLines ) { |
64 | 63 | foreach ( $userFileLines as $userLine ) { |
65 | 64 | if ( preg_match( '/^([\w-]+):\s*(.*?)\s*$/', $userLine, $m ) ) { |