[pLog-svn] r2445 - in plog/branches/plog-1.0.2: class/action/admin class/gallery/dao templates/admin

jondaley at devel.plogworld.net jondaley at devel.plogworld.net
Sat Sep 3 15:56:04 GMT 2005


Author: jondaley
Date: 2005-09-03 15:56:04 +0000 (Sat, 03 Sep 2005)
New Revision: 2445

Modified:
   plog/branches/plog-1.0.2/class/action/admin/adminaddresourcealbumaction.class.php
   plog/branches/plog-1.0.2/class/gallery/dao/galleryalbums.class.php
   plog/branches/plog-1.0.2/templates/admin/newresourcealbum.template
Log:
allow users to set whether the album is visible or not when creating an album, rather than having to create visible, and then edit it.  most recently reported here: http://forums.plogworld.net/viewtopic.php?t=3214

Modified: plog/branches/plog-1.0.2/class/action/admin/adminaddresourcealbumaction.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/action/admin/adminaddresourcealbumaction.class.php	2005-09-03 11:28:58 UTC (rev 2444)
+++ plog/branches/plog-1.0.2/class/action/admin/adminaddresourcealbumaction.class.php	2005-09-03 15:56:04 UTC (rev 2445)
@@ -45,7 +45,8 @@
         	$this->_albumName = Textfilter::filterAllHTML($this->_request->getValue( "albumName" ));
             $this->_albumDescription = Textfilter::filterAllHTML($this->_request->getValue( "albumDescription" ));
             $this->_parentId = $this->_request->getValue( "parentId" );			
-			
+            $showAlbum = $this->_request->getValue("showAlbum") ? 1 : 0;
+            
 			// create the album
         	$albums = new GalleryAlbums();			
 			$t = new Timestamp();
@@ -55,7 +56,7 @@
 									   $this->_parentId, 
 									   $t->getTimestamp(),
 									   Array(),
-									   true );
+									   $showAlbum);
 									   
 			$this->notifyEvent( EVENT_PRE_ALBUM_ADD, Array( "album" => &$album ));
 			// and add it to the database

Modified: plog/branches/plog-1.0.2/class/gallery/dao/galleryalbums.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/gallery/dao/galleryalbums.class.php	2005-09-03 11:28:58 UTC (rev 2444)
+++ plog/branches/plog-1.0.2/class/gallery/dao/galleryalbums.class.php	2005-09-03 15:56:04 UTC (rev 2445)
@@ -216,7 +216,7 @@
                       VALUES (".
                       $album->getOwnerId().", '".Db::qstr($album->getDescription())."', '".
 					  Db::qstr($album->getName())."', 0, ".$album->getParentId().", '".
-                      serialize($album->getProperties())."', 1,'".
+                      serialize($album->getProperties())."', ".$album->getShowAlbum()." ,'".
                       Db::qstr($tf->normalizeText($album->getName()))."','".
                       Db::qstr($tf->normalizeText($album->getDescription()))."', '".
 					  $tf->urlize($album->getName())."');";

Modified: plog/branches/plog-1.0.2/templates/admin/newresourcealbum.template
===================================================================
--- plog/branches/plog-1.0.2/templates/admin/newresourcealbum.template	2005-09-03 11:28:58 UTC (rev 2444)
+++ plog/branches/plog-1.0.2/templates/admin/newresourcealbum.template	2005-09-03 15:56:04 UTC (rev 2445)
@@ -35,7 +35,14 @@
 	<div class="formHelp">{$locale->tr("album_description_help")}</div>
     <textarea name="albumDescription" id="albumDescription" rows="10" cols="60">{$albumDescription}</textarea>
    </div>
-   </fieldset>
+   <div class="field">
+    <label for="showAlbum">{$locale->tr("show")}</label>
+    <div class="formHelp">
+     <input class="checkbox" type="checkbox" id="showAlbum" name="showAlbum" value="1" 
+          checked="checked" />
+     {$locale->tr("show_album_help")}
+   </div> 
+   </div>   </fieldset>
    <div class="buttons">
 	<input type="reset" name="reset" value="{$locale->tr("reset")}" />
     <input type="submit" name="addAlbum" value="{$locale->tr("add")}" />




More information about the pLog-svn mailing list