From: Chris S. <jac...@us...> - 2001-08-21 08:00:28
|
Update of /cvsroot/gallery/gallery/classes In directory usw-pr-cvs1:/tmp/cvs-serv25473 Modified Files: Tag: skin-job-branch Album.php AlbumDB.php Log Message: merging trunk changes into branch Index: Album.php =================================================================== RCS file: /cvsroot/gallery/gallery/classes/Album.php,v retrieving revision 1.34.2.10 retrieving revision 1.34.2.11 diff -u -r1.34.2.10 -r1.34.2.11 --- Album.php 2001/08/10 07:31:07 1.34.2.10 +++ Album.php 2001/08/21 08:00:25 1.34.2.11 @@ -377,12 +377,8 @@ /* Don't save transient data */ $transient_save = $this->transient; unset($this->transient); - - if ($fd = fs_fopen("$dir/album.dat.new", "w")) { - fwrite($fd, serialize($this)); - fclose($fd); - fs_rename("$dir/album.dat.new", "$dir/album.dat"); - } + + $success = safe_serialize($this, "$dir/album.dat"); /* Restore transient data after saving */ $this->transient = $transient_save; @@ -403,6 +399,8 @@ } $this->updateSerial = 0; } + + return $success; } function delete() { Index: AlbumDB.php =================================================================== RCS file: /cvsroot/gallery/gallery/classes/AlbumDB.php,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -u -r1.5.2.1 -r1.5.2.2 --- AlbumDB.php 2001/07/23 05:34:06 1.5.2.1 +++ AlbumDB.php 2001/08/21 08:00:25 1.5.2.2 @@ -201,13 +201,7 @@ $success = 0; $dir = $gallery->app->albumDir; - if ($fd = fs_fopen("$dir/albumdb.dat.new", "w")) { - fwrite($fd, serialize($this->albumOrder)); - fclose($fd); - $success = fs_rename("$dir/albumdb.dat.new", "$dir/albumdb.dat"); - } - - return $success; + return safe_serialize($this->albumOrder, "$dir/albumdb.dat"); } } |