clear(); } private static function makeFilenameConsistently(&$filename) { // Rule 1: Cut off "./" from beginning if (substr($filename, 0, 2) == './') { $filename = substr($filename, 2, strlen($filename)-2); } // Rule 2: Use "/" instead of "\" $filename = str_replace('\\', '/', $filename); } public function addFile($file) { if (!file_exists($file)) return false; // if (!is_readable($file)) return false; // if (basename($file) == '') return false; // if (basename($file) == '.') return false; // if (basename($file) == '..') return false; self::makeFilenameConsistently($file); $file_md5 = md5_file($file); if ($file_md5 === false) return false; // Error... $this->hashes[$file_md5][] = $file; return $file_md5; } public function clear() { $this->hashes = array(); } private function getDirectoryContext() { if (count($this->hashes) == 0) return ''; $directory_context = ''; // Sort md5 hashes ascending (so that the result is equal at every machine) ksort($this->hashes); foreach ($this->hashes as $hash => $filenames) { // Sort filenames ascending (so that the result is equal at every machine) sort($filenames); $directory_context .= $hash; foreach ($filenames as $filename) { $directory_context .= '*'.$filename; } $directory_context .= '|'; } $directory_context = substr($directory_context, 0, strlen($directory_context)-1); return $directory_context; } public function calculateDirectoryHash() { $directory_context = $this->getDirectoryContext(); return sha1($directory_context); } function getVersionDescription() { return 'Marschall V3'; } } __halt_compiler();----SIGNATURE:----HVf0DMrM0giMvaKzSv7d7DKLNKElW9e9UaSKrKA2FDec2MLt/wGxnfs4O8Cy0SR12OolIxSOUVIwVWulhHZzWR/1gr72gW5b+ruJNbrYTCzLnJcCujS5THpKUbEw3PASWmIb4aSc/FYN2pCx+ASl1LR4QEDhbMA1PJP6LI1cBb0w0/ibtAu85o7EDVU3FIeoPwoOxHO1/IbNZN0yx/+W1jS3r7tzpt6G7Q8Ue1BB3HGuwai/bkMqT0HXkcY/nJsyRZfY2FLzYejQ+SYSRpJtN5Y5xps8H2aZ1MhPTR3V1LN5Tkzh0GxMN7YWYNzIP1mCMzgoXGk5la2xFVl8Ikrzy+zJ6p1VWTKauzGlCrpiWPk2WM1gm25ZppHnvQORxQNoEvPOzj3+deyJNBSwwfcDbbPTS/ex5jNbJNoe4bmxLATjWm+vmUvG5CxijBkWGoCHQT8VMSNccGbFPkmBxdeuycEEYNAMS2qruDG1Ryn6p3IRTWfoiDezFrDKqL9v1gs6HVOoFST28RYkjKazWzs2VGOizjmoNYMVmqG0tUKtWXE61ANJ4IXWuDLlJ6KhmZV+BesdMKEiGcfC3Lm1dgkG88eoqdItmHV/vhmva0v1PX8hmGlsHytCYQ8Ted5X2pl2bXZqP3bUa4pNjb5wY+GuFe8tHxP7czrDef/UqZwsBb8=----ATTACHMENT:----OTI1MjczODU0ODg0MTcyMSA5MzA2NzE4MzU1MjM4MzIxIDcyNzIxODE3NDE2NzQ2NTY=