[www] r705 - trunk/packs.matroska.org/data
| Newsgroups | gmane.comp.multimedia.matroska.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: toff
Date: 2004-09-18 13:23:08 +0400 (Sat, 18 Sep 2004)
New Revision: 705
Modified:
trunk/packs.matroska.org/data/download.php
trunk/packs.matroska.org/data/index.php.de
trunk/packs.matroska.org/data/index.php.en
Log:
Add some locking capability
Modified: trunk/packs.matroska.org/data/download.php
===================================================================
--- trunk/packs.matroska.org/data/download.php 2004-09-18 09:22:22 UTC (rev 704)
+++ trunk/packs.matroska.org/data/download.php 2004-09-18 09:23:08 UTC (rev 705)
@@ -26,16 +26,13 @@
}
// Save Download Stats
- $download = unserialize(implode('', file($logfilename)));
+ $download = unserialize(safe_read_file($logfilename));
// Make sure we opened the logfile correctly, otherwise we're gonna trash it
if (count($download) != 0)
{
$download[$version][$_REQUEST["id"]]++;
-
- $file = fopen($logfilename,"w");
- fputs($file, serialize($download));
- fclose($file);
+ safe_write_file($logfilename,serialize($download));
}
// Create New Header
Modified: trunk/packs.matroska.org/data/index.php.de
===================================================================
--- trunk/packs.matroska.org/data/index.php.de 2004-09-18 09:22:22 UTC (rev 704)
+++ trunk/packs.matroska.org/data/index.php.de 2004-09-18 09:23:08 UTC (rev 705)
@@ -1,6 +1,6 @@
<?php
- $download = unserialize(implode('', file('logs.txt')));
include("links.txt");
+ $download = unserialize(safe_read_file('logs.txt'));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
Modified: trunk/packs.matroska.org/data/index.php.en
===================================================================
--- trunk/packs.matroska.org/data/index.php.en 2004-09-18 09:22:22 UTC (rev 704)
+++ trunk/packs.matroska.org/data/index.php.en 2004-09-18 09:23:08 UTC (rev 705)
@@ -1,6 +1,6 @@
-<?php
- $download = unserialize(implode('', file('logs.txt')));
+<?php
include("links.txt");
+ $download = unserialize(safe_read_file('logs.txt'));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>