Rev 1050 | Rev 1083 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1050 | Rev 1082 | ||
---|---|---|---|
Line 110... | Line 110... | ||
110 | foreach ($mine as $filename_old => $hash_old) { |
110 | foreach ($mine as $filename_old => $hash_old) { |
111 | if (isset($theirs[$filename_old])) { |
111 | if (isset($theirs[$filename_old])) { |
112 | $hash_new = $theirs[$filename_old]; |
112 | $hash_new = $theirs[$filename_old]; |
113 | if ($hash_old != $hash_new) { |
113 | if ($hash_old != $hash_new) { |
114 | $num++; |
114 | $num++; |
- | 115 | // Server runs https://websvnphp.github.io/ Web UI |
|
- | 116 | $svn_url = "https://svn.viathinksoft.com/websvn/filedetails.php?repname=oidplus&path=%2Ftrunk%2F".urlencode($filename_old)."&rev=".urlencode($ver); |
|
115 | $out['text'] .= "<b>"._L('Checksum mismatch').":</b> $filename_old (<a target=\"_blank\" href=\"https://svn.viathinksoft.com/cgi-bin/viewvc.cgi/oidplus/trunk/$filename_old?revision=$ver&view=co\">"._L('Expected file contents')."</a>)\n"; |
117 | $out['text'] .= "<b>"._L('Checksum mismatch').":</b> $filename_old (<a target=\"_blank\" href=\"$svn_url\">"._L('Expected file contents')."</a>)\n"; |
116 | } |
118 | } |
117 | } |
119 | } |
118 | } |
120 | } |
119 | 121 | ||
120 | if ($num == 0) { |
122 | if ($num == 0) { |
Line 157... | Line 159... | ||
157 | $basepath = realpath($basepath) . DIRECTORY_SEPARATOR; |
159 | $basepath = realpath($basepath) . DIRECTORY_SEPARATOR; |
158 | $dir = realpath($dir) . DIRECTORY_SEPARATOR; |
160 | $dir = realpath($dir) . DIRECTORY_SEPARATOR; |
159 | $files = scandir($dir); |
161 | $files = scandir($dir); |
160 | foreach ($files as $file) { |
162 | foreach ($files as $file) { |
161 | $path = realpath($dir . DIRECTORY_SEPARATOR . $file); |
163 | $path = realpath($dir . DIRECTORY_SEPARATOR . $file); |
- | 164 | if (empty($path)) $path = $dir . DIRECTORY_SEPARATOR . $file; |
|
162 | if (!is_dir($path)) { |
165 | if (!is_dir($path)) { |
163 | $xpath = substr($path, strlen($basepath)); |
166 | $xpath = substr($path, strlen($basepath)); |
164 | $xpath = str_replace('\\', '/', $xpath); |
167 | $xpath = str_replace('\\', '/', $xpath); |
165 | $results[$xpath] = hash_file('sha256', $path); |
168 | $results[$xpath] = @hash_file('sha256', $path); |
166 | } else if ($file != "." && $file != ".." && $file != ".svn" && $file != ".git") { |
169 | } else if ($file != "." && $file != ".." && $file != ".svn" && $file != ".git") { |
167 | self::getDirContents($path, $basepath, $results); |
170 | self::getDirContents($path, $basepath, $results); |
168 | $xpath = substr($path, strlen($basepath)); |
171 | $xpath = substr($path, strlen($basepath)); |
169 | $xpath = str_replace('\\', '/', $xpath); |
172 | $xpath = str_replace('\\', '/', $xpath); |
170 | $results[$xpath] = hash('sha256', ''); |
173 | $results[$xpath] = hash('sha256', ''); |