From: Pierre-Luc P. <pa...@us...> - 2004-01-31 04:06:26
|
Update of /cvsroot/gallery/gallery In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14271 Modified Files: ChangeLog Version.php add_photos.php view_album.php Added Files: add_photos_frame.php add_photos_refresh.php Log Message: 2004-01-29 Pierre-Luc Paour <pa...@us...> 1.4.3-cvs-b14 * Added pretty nasty hack to reload the album page in Mini applet mode after upload completes (this relies on add_photos_frame.php and add_photos_refresh.php; if anyone has a better way of executing JavaScript from Java, I'd like to know). * Added cookie so that add_photos opens on same tab the user selected last time he used add_photos. ***** Error reading new file[Errno 2] No such file or directory: 'add_photos_frame.php' --- NEW FILE --- <html> <head> <title>Refresh</title> </head> <body onLoad="parent.opener.hideProgressAndReload(); window.close();"> <!-- This is a hack that's needed for the GR applet to be able to refresh the album page after a successful upload... --> </body> </html> Index: ChangeLog =================================================================== RCS file: /cvsroot/gallery/gallery/ChangeLog,v retrieving revision 1.818 retrieving revision 1.819 diff -u -r1.818 -r1.819 --- ChangeLog 29 Jan 2004 21:37:29 -0000 1.818 +++ ChangeLog 30 Jan 2004 01:53:21 -0000 1.819 @@ -1,3 +1,12 @@ +2004-01-29 Pierre-Luc Paour <pa...@us...> 1.4.3-cvs-b14 + + * Added pretty nasty hack to reload the album page in Mini applet + mode after upload completes (this relies on add_photos_frame.php + and add_photos_refresh.php; if anyone has a better way of + executing JavaScript from Java, I'd like to know). + * Added cookie so that add_photos opens on same tab the user + selected last time he used add_photos. + 2004-01-29 Jens Tkotz <je...@pe...> 1.4.3-cvs-b13 * Bugfix: Added GALLERY_BASEDIR for inclusion of includes files. @@ -12,7 +21,7 @@ * New: Added "(un)check all" and "invert" selection in config wizard for languages. - * Chane: Added possible for an addon below multiple choices in config wizard. + * Change: Added possible for an addon below multiple choices in config wizard. * Bugfix: In javascript in the 2nd parameter (name) in window.open are no spaces allowed. Index: Version.php =================================================================== RCS file: /cvsroot/gallery/gallery/Version.php,v retrieving revision 1.586 retrieving revision 1.587 diff -u -r1.586 -r1.587 --- Version.php 29 Jan 2004 21:21:16 -0000 1.586 +++ Version.php 30 Jan 2004 01:53:21 -0000 1.587 @@ -40,7 +40,7 @@ $gallery = new stdClass(); } -$gallery->version = '1.4.3-cvs-b13'; +$gallery->version = '1.4.3-cvs-b14'; $gallery->config_version = 79; $gallery->album_version = 25; $gallery->user_version = 5; Index: add_photos.php =================================================================== RCS file: /cvsroot/gallery/gallery/add_photos.php,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- add_photos.php 29 Jan 2004 21:37:29 -0000 1.53 +++ add_photos.php 30 Jan 2004 01:53:21 -0000 1.54 @@ -19,6 +19,10 @@ * * $Id$ */ +?><?php +// we need to turn on output buffering because all the includes leak +// some text before we're ready to set the cookies! +ob_start(); ?> <?php // Hack prevention. @@ -38,7 +42,20 @@ if (!$gallery->user->canAddToAlbum($gallery->album)) { exit; } - +?> +<?php +$cookieName = $gallery->app->sessionVar."add_photos_mode"; +$modeCookie = $HTTP_COOKIE_VARS[$cookieName]; +if (isset($mode)) { + if ($modeCookie != $mode) { + setcookie($cookieName, $mode, time()+60*60*24*365, "/" ); + } +} else { + if (isset($modeCookie)) { + $mode = $modeCookie; + } +} +ob_end_flush(); ?> <html> @@ -117,7 +134,8 @@ $modes["form"] = _("Form"); -$modes["form_one"] = _("Form (1)"); +// todo: this mode is broken. Fix it before enabling it again... +//$modes["form_one"] = _("Form (1)"); $modes["url"] = _("URL"); $modes["other"] = _("Other"); Index: view_album.php =================================================================== RCS file: /cvsroot/gallery/gallery/view_album.php,v retrieving revision 1.188 retrieving revision 1.189 diff -u -r1.188 -r1.189 --- view_album.php 29 Jan 2004 18:19:47 -0000 1.188 +++ view_album.php 30 Jan 2004 01:53:21 -0000 1.189 @@ -308,7 +308,7 @@ 'add_photos' => array('name' => _('add photos'), 'requirements' => array('canAddToAlbum'), 'action' => 'popup', - 'value' => makeGalleryUrl('add_photos.php', + 'value' => makeGalleryUrl('add_photos_frame.php', array('set_albumName' => $gallery->session->albumName))), 'rename_album' => array('name' => _('rename album'), 'requirements' => array('isAlbumOwner'), |