From: Bharat M. <bh...@us...> - 2001-09-28 07:27:47
|
Update of /cvsroot/gallery/gallery In directory usw-pr-cvs1:/tmp/cvs-serv7202 Modified Files: Tag: skin-job-branch do_command.php edit.php index.php init.php search.php util.php version.php view_album.php view_photo.php Log Message: Changed all references to albums.php -> view_album.php to work with the new AlbumDB -> Root Album migration. Index: do_command.php =================================================================== RCS file: /cvsroot/gallery/gallery/do_command.php,v retrieving revision 1.22.4.3 retrieving revision 1.22.4.4 diff -u -r1.22.4.3 -r1.22.4.4 --- do_command.php 2001/09/18 04:53:39 1.22.4.3 +++ do_command.php 2001/09/28 07:27:44 1.22.4.4 @@ -135,7 +135,7 @@ $gallery->session->albumName); header("Location: $url"); } else { - header("Location: albums.php"); + header("Location: view_album.php"); } } else if (!strcmp($cmd, "reset-album-clicks")) { $myAlbum = new Album(); @@ -145,7 +145,7 @@ // this is a popup do dismiss and reload! dismissAndReload(); } else { - header("Location: albums.php"); + header("Location: view_album.php"); } } else if (!strcmp($cmd, "delete-comment")) { @@ -154,7 +154,7 @@ $gallery->album->save(); dismissAndReload(); } else { - header("Location: albums.php"); + header("Location: view_album.php"); } } else if (!empty($return)) { Index: edit.php =================================================================== RCS file: /cvsroot/gallery/gallery/Attic/edit.php,v retrieving revision 1.1.2.12 retrieving revision 1.1.2.13 diff -u -r1.1.2.12 -r1.1.2.13 --- edit.php 2001/09/21 05:17:37 1.1.2.12 +++ edit.php 2001/09/28 07:27:44 1.1.2.13 @@ -44,12 +44,12 @@ //-- Hack check. You have to have permission to see the album --- if (!$user->canReadAlbum($album)) { - header("Location: albums.php"); + header("Location: view_album.php"); return; } if (!$album->isLoaded()) { - header("Location: albums.php"); + header("Location: view_album.php"); return; } Index: index.php =================================================================== RCS file: /cvsroot/gallery/gallery/index.php,v retrieving revision 1.4.6.1 retrieving revision 1.4.6.2 diff -u -r1.4.6.1 -r1.4.6.2 --- index.php 2001/09/18 04:53:39 1.4.6.1 +++ index.php 2001/09/28 07:27:44 1.4.6.2 @@ -46,11 +46,11 @@ $GALLERY_EMBEDDED_INSIDE = "nuke"; if (!$include) { - $include = "albums.php"; + $include = "view_album.php"; } include(${GALLERY_BASEDIR} . $include); } else { - include("albums.php"); + include("view_album.php"); } ?> Index: init.php =================================================================== RCS file: /cvsroot/gallery/gallery/init.php,v retrieving revision 1.28.2.4 retrieving revision 1.28.2.5 diff -u -r1.28.2.4 -r1.28.2.5 --- init.php 2001/09/18 04:53:39 1.28.2.4 +++ init.php 2001/09/28 07:27:44 1.28.2.5 @@ -138,6 +138,12 @@ $gallery->session->username = ""; } +/* If we don't have an album name, point at the root */ +if (!$gallery->session->albumName) { + $albumDB = new AlbumDB; + $gallery->session->albumName = $albumDB->rootAlbum; +} + /* Load the correct album object */ if ($gallery->session->albumName) { $gallery->album = new Album; Index: search.php =================================================================== RCS file: /cvsroot/gallery/gallery/search.php,v retrieving revision 1.9.2.5 retrieving revision 1.9.2.6 diff -u -r1.9.2.5 -r1.9.2.6 --- search.php 2001/09/25 20:10:33 1.9.2.5 +++ search.php 2001/09/28 07:27:44 1.9.2.6 @@ -65,7 +65,7 @@ <!-- search.header ends --> <!-- Top Nav --> <? -$breadtext[0] = "Gallery: <a href=". makeGalleryUrl("albums.php") . ">".$gallery->app->galleryTitle."</a>"; +$breadtext[0] = "Gallery: <a href=". makeGalleryUrl("view_album.php") . ">".$gallery->app->galleryTitle."</a>"; $breadcrumb["text"] = $breadtext; $breadcrumb["bordercolor"] = $borderColor; $breadcrumb["top"] = true; @@ -202,7 +202,7 @@ <? } echo "<br>"; -$breadtext[0] = "Gallery: <a href=". makeGalleryUrl("albums.php") . ">".$gallery->app->galleryTitle."</a>"; +$breadtext[0] = "Gallery: <a href=". makeGalleryUrl("view_album.php") . ">".$gallery->app->galleryTitle."</a>"; $breadcrumb["text"] = $breadtext; $breadcrumb["bordercolor"] = $borderColor; $breadcrumb["top"] = true; Index: util.php =================================================================== RCS file: /cvsroot/gallery/gallery/util.php,v retrieving revision 1.63.2.10 retrieving revision 1.63.2.11 diff -u -r1.63.2.10 -r1.63.2.11 --- util.php 2001/09/21 05:11:42 1.63.2.10 +++ util.php 2001/09/28 07:27:44 1.63.2.11 @@ -687,7 +687,7 @@ $target .= "/$photoId"; } } else { - $target = "albums.php"; + $target = "view_album.php"; } } else { if ($albumName) { @@ -699,7 +699,7 @@ $target = "view_album.php"; } } else { - $target = "albums.php"; + $target = "view_album.php"; } } Index: version.php =================================================================== RCS file: /cvsroot/gallery/gallery/version.php,v retrieving revision 1.37.2.5 retrieving revision 1.37.2.6 diff -u -r1.37.2.5 -r1.37.2.6 --- version.php 2001/09/21 05:16:42 1.37.2.5 +++ version.php 2001/09/28 07:27:44 1.37.2.6 @@ -41,5 +41,6 @@ $gallery->version = "CVS:skin-job-branch"; $gallery->config_version = 23; $gallery->album_version = 4; +$gallery->albumdb_version = 2; $gallery->url = "http://gallery.sourceforge.net"; ?> Index: view_album.php =================================================================== RCS file: /cvsroot/gallery/gallery/view_album.php,v retrieving revision 1.75.2.12 retrieving revision 1.75.2.13 diff -u -r1.75.2.12 -r1.75.2.13 --- view_album.php 2001/09/25 20:12:39 1.75.2.12 +++ view_album.php 2001/09/28 07:27:44 1.75.2.13 @@ -40,12 +40,14 @@ //-- Hack check. You have to have permission to see the album --- if (!$user->canReadAlbum($album)) { - header("Location: albums.php"); + $gallery->sesson->albumName = ""; + header("Location: view_album.php"); return; } if (!$album->isLoaded()) { - header("Location: albums.php"); + $gallery->sesson->albumName = ""; + header("Location: view_album.php"); return; } @@ -127,7 +129,7 @@ //-- we're at the top! --- $breadLevels[$breadCount]['level'] = "Gallery"; $breadLevels[$breadCount]['name'] = $gallery->app->galleryTitle; - $breadLevels[$breadCount]['href'] = makeGalleryUrl("albums.php"); + $breadLevels[$breadCount]['href'] = makeGalleryUrl("view_album.php"); } $breadCount++; if ($pAlbum) { @@ -340,7 +342,6 @@ includeHtmlWrap("wrapper.header"); includeLayout("view_album"); includeHtmlWrap("wrapper.footer"); - ?> Index: view_photo.php =================================================================== RCS file: /cvsroot/gallery/gallery/view_photo.php,v retrieving revision 1.65.2.11 retrieving revision 1.65.2.12 diff -u -r1.65.2.11 -r1.65.2.12 --- view_photo.php 2001/09/18 04:53:39 1.65.2.11 +++ view_photo.php 2001/09/28 07:27:44 1.65.2.12 @@ -38,7 +38,8 @@ //-- Hack check. You have to have permission to see the album --- if (!$user->canReadAlbum($album)) { - header("Location: albums.php"); + $gallery->session->albumName = ""; + header("Location: view_album.php"); return; } @@ -251,7 +252,7 @@ //-- we're at the top! --- $breadLevels[$breadCount]['level'] = "Gallery"; $breadLevels[$breadCount]['name'] = $gallery->app->galleryTitle; - $breadLevels[$breadCount]['href'] = makeGalleryUrl("albums.php"); + $breadLevels[$breadCount]['href'] = makeGalleryUrl("view_album.php"); } $breadCount++; if ($pAlbum) { |