[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gallery-checkins
Subject:    [Gallery-checkins] CVS: gallery ChangeLog,1.249,1.250 Version.php,1.79,1.80 albums.php,1.63,1.64 do_
From:       Bharat Mediratta <bharat () users ! sourceforge ! net>
Date:       2002-10-31 17:56:40
[Download RAW message or body]

Update of /cvsroot/gallery/gallery
In directory usw-pr-cvs1:/tmp/cvs-serv19908

Modified Files:
	ChangeLog Version.php albums.php do_command.php 
	gallery_remote.php gallery_remote2.php move_album.php 
	move_photo.php rename_album.php upgrade_album.php 
Log Message:
2002-10-31  Bharat Mediratta  <bharat@menalto.com> 1.3.2-cvs-b16 
 
        * Minor tweak: if the full name is empty, display the username in the 
          "Welcome, xxx" message on albums.php 
 
        * Integrated Jesse Mullan's albumdb refactoring code in a separate 
          branch.  This code separates out the information about each photo 
          from the album metadata which allows us to load much less data into 
          memory when we load an album.  This will speed up cross-album 
          operations and use less memory (yay Jesse!) 
 


Index: ChangeLog
===================================================================
RCS file: /cvsroot/gallery/gallery/ChangeLog,v
retrieving revision 1.249
retrieving revision 1.250
diff -u -r1.249 -r1.250
--- ChangeLog	18 Oct 2002 07:54:47 -0000	1.249
+++ ChangeLog	31 Oct 2002 17:56:36 -0000	1.250
@@ -1,3 +1,14 @@
+2002-10-31  Bharat Mediratta  <bharat@menalto.com> 1.3.2-cvs-b16
+
+	* Minor tweak: if the full name is empty, display the username in the
+	  "Welcome, xxx" message on albums.php
+
+	* Integrated Jesse Mullan's albumdb refactoring code in a separate
+	  branch.  This code separates out the information about each photo
+	  from the album metadata which allows us to load much less data into
+	  memory when we load an album.  This will speed up cross-album
+	  operations and use less memory (yay Jesse!)
+
 2002-10-18  Bharat Mediratta  <bharat@menalto.com> 1.3.2-cvs-b14
 
 	* Enhanced the config wizard to behave reasonably when open_basedir is

Index: Version.php
===================================================================
RCS file: /cvsroot/gallery/gallery/Version.php,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- Version.php	23 Oct 2002 04:35:26 -0000	1.79
+++ Version.php	31 Oct 2002 17:56:36 -0000	1.80
@@ -38,9 +38,9 @@
 	$gallery = new stdClass();
 }
 
-$gallery->version = "1.3.2-cvs-b15";
+$gallery->version = "1.3.2-cvs-b16";
 $gallery->config_version = 31;
-$gallery->album_version = 5;
+$gallery->album_version = 6;
 $gallery->remote_protocol_version = 1;
 $gallery->url = "http://gallery.sourceforge.net";
 

Index: albums.php
===================================================================
RCS file: /cvsroot/gallery/gallery/albums.php,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- albums.php	11 Sep 2002 04:29:31 -0000	1.63
+++ albums.php	31 Oct 2002 17:56:36 -0000	1.64
@@ -31,13 +31,13 @@
 
 <?php
 /* Read the album list */
-$albumDB = new AlbumDB();
+$albumDB = new AlbumDB(FALSE);
 $gallery->session->albumName = "";
 $page = 1;
 
 /* If there are albums in our list, display them in the table */
 $numAlbums = $albumDB->numAlbums($gallery->user);
-$numPhotos = $albumDB->numPhotos($gallery->user);
+$numPhotos = $albumDB->getCachedNumPhotos($gallery->user);
 
 if (!$gallery->session->albumListPage) {
 	$gallery->session->albumListPage = 1;
@@ -104,7 +104,11 @@
 $adminCommands = "<span class=\"admin\">";
 
 if ($gallery->user->isLoggedIn()) {
-	$adminCommands .= "Welcome, " . $gallery->user->getFullname() . "&nbsp;&nbsp;<br>";
+	$displayName = $gallery->user->getFullname();
+	if (empty($displayName)) {
+		$displayName = $gallery->user->getUsername();
+	}
+	$adminCommands .= "Welcome, $displayName &nbsp;&nbsp;<br>";
 }
 
 if ($gallery->user->canCreateAlbums()) { 

Index: do_command.php
===================================================================
RCS file: /cvsroot/gallery/gallery/do_command.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- do_command.php	11 Sep 2002 04:29:31 -0000	1.31
+++ do_command.php	31 Oct 2002 17:56:36 -0000	1.32
@@ -91,7 +91,7 @@
 } else if (!strcmp($cmd, "new-album")) {
 	if ($gallery->user->canCreateAlbums() ||
 	    $gallery->user->canCreateSubAlbum($gallery->album)) {
-		$albumDB = new AlbumDB();
+		$albumDB = new AlbumDB(FALSE);
 		$gallery->session->albumName = $albumDB->newAlbumName();
 		$gallery->album = new Album();
 		$gallery->album->fields["name"] = $gallery->session->albumName;
@@ -126,7 +126,6 @@
 			$gallery->album->save();
 		} else {
 			/* move the album to the top if not a nested album*/
-			$albumDB = new AlbumDB();
                 	$numAlbums = $albumDB->numAlbums($gallery->user);
                 	$albumDB->moveAlbum($gallery->user, $numAlbums, 1);
                 	$albumDB->save();

Index: gallery_remote.php
===================================================================
RCS file: /cvsroot/gallery/gallery/gallery_remote.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- gallery_remote.php	11 Sep 2002 04:29:31 -0000	1.7
+++ gallery_remote.php	31 Oct 2002 17:56:37 -0000	1.8
@@ -61,7 +61,7 @@
 
 if (!strcmp($cmd, "fetch-albums")) {
 
-	$albumDB = new AlbumDB();
+	$albumDB = new AlbumDB(FALSE);
     $mynumalbums = $albumDB->numAlbums($gallery->user);
 
     // display all albums that the user can move album to

Index: gallery_remote2.php
===================================================================
RCS file: /cvsroot/gallery/gallery/gallery_remote2.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gallery_remote2.php	13 Oct 2002 11:20:04 -0000	1.1
+++ gallery_remote2.php	31 Oct 2002 17:56:37 -0000	1.2
@@ -147,7 +147,7 @@
 	$response = new Properties();
 	check_proto_version( $response );
 	
-	$albumDB = new AlbumDB();
+	$albumDB = new AlbumDB(FALSE);
     $mynumalbums = $albumDB->numAlbums($gallery->user);
 	
 	$album_index = 0;

Index: move_album.php
===================================================================
RCS file: /cvsroot/gallery/gallery/move_album.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- move_album.php	11 Sep 2002 04:29:31 -0000	1.18
+++ move_album.php	31 Oct 2002 17:56:37 -0000	1.19
@@ -44,7 +44,7 @@
 
 <?php
 /* Read the album list */
-$albumDB = new AlbumDB();
+$albumDB = new AlbumDB(FALSE);
 
 if ($gallery->session->albumName && isset($index)) {
 

Index: move_photo.php
===================================================================
RCS file: /cvsroot/gallery/gallery/move_photo.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- move_photo.php	11 Sep 2002 04:29:31 -0000	1.31
+++ move_photo.php	31 Oct 2002 17:56:37 -0000	1.32
@@ -34,7 +34,7 @@
 	exit;
 }
 
-$albumDB = new AlbumDB(); // read album database
+$albumDB = new AlbumDB(FALSE); // read album database
 
 ?>
 <html>
@@ -55,7 +55,7 @@
 
         if ($newAlbum) {	// we are moving from one album to another
             	$postAlbum = $albumDB->getAlbumbyName($newAlbum);
-	    	if ($gallery->album != $postAlbum) {
+	    	if ($gallery->album->fields[name] != $postAlbum->fields[name]) {
 			//$startPhoto=$index;
 			//$endPhoto=$startPhoto+max($numPhotosToMove,1);
 

Index: rename_album.php
===================================================================
RCS file: /cvsroot/gallery/gallery/rename_album.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- rename_album.php	11 Sep 2002 04:29:31 -0000	1.19
+++ rename_album.php	31 Oct 2002 17:56:37 -0000	1.20
@@ -46,7 +46,7 @@
 
 <?php
 /* Read the album list */
-$albumDB = new AlbumDB();
+$albumDB = new AlbumDB(FALSE);
 
 if ($newName) {
 	$newName = str_replace("'", "", $newName);

Index: upgrade_album.php
===================================================================
RCS file: /cvsroot/gallery/gallery/upgrade_album.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- upgrade_album.php	11 Sep 2002 04:29:32 -0000	1.8
+++ upgrade_album.php	31 Oct 2002 17:56:37 -0000	1.9
@@ -58,7 +58,7 @@
 	exit;
 }
 
-$albumDB = new AlbumDB();
+$albumDB = new AlbumDB(FALSE);
 
 function close_button() {
 	print "<center>";



-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
__[ 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