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

List:       gallery-checkins
Subject:    [Gallery-checkins] CVS: gallery2/modules/imagemagick/classes ImageMagickGraphics.class,1.1,1.2
From:       Bharat Mediratta <bharat () users ! sourceforge ! net>
Date:       2002-11-25 10:22:54
[Download RAW message or body]

Update of /cvsroot/gallery/gallery2/modules/imagemagick/classes
In directory sc8-pr-cvs1:/tmp/cvs-serv32227/modules/imagemagick/classes

Modified Files:
	ImageMagickGraphics.class 
Log Message:
* Classic layout now displays number of children each album contains 
 
* GalleryDataItems have a new propery, "canBeViewedInline".  The layout 
  will use that to determine if the full size image should be displayed 
  inline (like a photo) or if it should be downloaded externally (like 
  a word document) 
        - XXX: might want to make this an actual property of the item 
               instead of a property of a specific class, so that we can 
               support some GalleryMovieItem's that are inline and 
               others that aren't 
 
* Fixed minor open_basedir issue with imagemagick module 
 
* Fixed bugs in the way that GalleryModule::getItemLinks were returning 
  links. 
 
* Added GalleryItemHelper 
 
* Registered GalleryUnknownItem to hold any items with mime types 
  that we don't explicitly support 
 


Index: ImageMagickGraphics.class
===================================================================
RCS file: /cvsroot/gallery/gallery2/modules/imagemagick/classes/ImageMagickGraphics.class,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ImageMagickGraphics.class	23 Nov 2002 04:22:51 -0000	1.1
+++ ImageMagickGraphics.class	25 Nov 2002 10:22:51 -0000	1.2
@@ -57,8 +57,12 @@
      */
     function getImageDimensions($mimeType, $filename) {
 
-	/* Run it through PHP first, it's faster and more portable. */
-	$ret = getimagesize($filename);
+	/*
+	 * Run it through PHP first, it's faster and more portable.  Suppress
+	 * output, though, since this may run afoul of open_basedir.  If it
+	 * does, then it'll return false and we can use ImageMagick.
+	 */
+	$ret = @getimagesize($filename);
 	if (($ret != false) &&
 	    (($ret[0] > 1) && ($ret[1] > 1))) {
 	    return array(GalleryStatus::success(), $ret[0], $ret[1]);



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
__[ 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