[prev in list] [next in list] [prev in thread] [next in thread]
List: gallery-checkins
Subject: [Gallery-checkins] CVS: gallery/classes Album.php,1.81,1.82
From: Bharat Mediratta <bharat () users ! sourceforge ! net>
Date: 2003-03-31 0:11:11
[Download RAW message or body]
Update of /cvsroot/gallery/gallery/classes
In directory sc8-pr-cvs1:/tmp/cvs-serv21978/classes
Modified Files:
Album.php
Log Message:
2003-03-30 Bharat Mediratta <bharat@menalto.com> 1.3.4-cvs-b16
* Fixed a bug in the mirroring code on win32 where the serial.dat file
would wind up with a \r instead of a \n causing the comparison to
fail. Now we get rid of the \n altogether.
Index: Album.php
===================================================================
RCS file: /cvsroot/gallery/gallery/classes/Album.php,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- Album.php 29 Jan 2003 06:59:44 -0000 1.81
+++ Album.php 31 Mar 2003 00:11:09 -0000 1.82
@@ -24,7 +24,7 @@
var $photos;
var $dir;
var $version;
- var $tsilb = "TSILB\n";
+ var $tsilb = "TSILB";
/*
* This variable contains data that is useful for the lifetime
@@ -425,6 +425,13 @@
}
}
+ /*
+ * We used to pad TSILB with \n, but on win32 that gets
+ * converted to \r which causes problems. So get rid of it
+ * when we load albums back.
+ */
+ $this->tsilb = trim($this->tsilb);
+
$this->photos = $tmp;
return 1;
@@ -497,7 +504,7 @@
$serial = "$dir/serial." . $this->fields["serial_number"]. ".dat";
if ($fd = fs_fopen($serial, "w")) {
/* This space intentionally left blank */
- fwrite($fd, $this->tsilb);
+ fwrite($fd, trim($this->tsilb));
fclose($fd);
}
@@ -766,7 +773,7 @@
/* Don't use fs_fopen here since we're opening a url */
if ($fd = @fopen($serial, "r")) {
- $serialContents = fgets($fd, 6);
+ $serialContents = fgets($fd, strlen($this->tsilb)+1);
if (!strcmp($serialContents, $this->tsilb)) {
$this->transient->mirrorUrl = $base_url;
return $this->transient->mirrorUrl;
-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
__[ g a l l e r y - c h e c k i n s ]_________________________
[ list info/archive --> http://gallery.sf.net/lists.php ]
[ gallery info/FAQ/download --> http://gallery.sf.net ]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic