Mail Index


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ApacheGallery] Bug w/ GalleryCopyrightImage



I am getting random errors in apache's logs:

"[error] GalleryCopyrightImage  was not found"

I do not have GalleryCopyrightImage defined in my httpd.conf.

I chased it down in the code (r215).  The problem is in sub resizepicture.  
It prints an error meant for invalid file names.

Here is a diff that fixes it (It's all really in the first new line line, everything else is just indented over):

-       if (-f $copyrightfile and (my $logo=Image::Imlib2->load($copyrightfile))) {
-               my $x = $image->get_width();
-               my $y = $image->get_height();
-               my $logox = $logo->get_width();
-               my $logoy = $logo->get_height();
-               $image->blend($logo, 0, 0, 0, $logox, $logoy, $x-$logox, $y-$logoy, $logox, $logoy);
-       }
-       else {
-               Apache->request->log_error("GalleryCopyrightImage $copyrightfile was not found\n");
-       }
+  if ($copyrightfile ne '') {
+    if (-f $copyrightfile and (my $logo=Image::Imlib2->load($copyrightfile))) {
+      my $x = $image->get_width();
+      my $y = $image->get_height();
+      my $logox = $logo->get_width();
+      my $logoy = $logo->get_height();
+      $image->blend($logo, 0, 0, 0, $logox, $logoy, $x-$logox, $y-$logoy, $logox, $logoy);
+    }
+    else {
+      Apache->request->log_error("GalleryCopyrightImage $copyrightfile was not found\n");
+    }
+  }
_______________________________________________
users mailing list
users@xxxxxxxxxxxxxxxx
http://ufo.hestdesign.com/cgi-bin/mailman/listinfo/agusers