[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS Update: gleipnir
- To: cvs@lists.cleannorth.org
- Subject: CVS Update: gleipnir
- From: Dan Brosemer <odin@cleannorth.org>
- Date: Sun, 17 Aug 2008 02:11:45 -0401 (EDT)
- List-help: <mailto:cvs-request@lists.cleannorth.org?subject=help>
- List-post: <mailto:cvs@lists.cleannorth.org>
- List-subscribe: <mailto:cvs-request@lists.cleannorth.org?subject=subscribe>
- List-unsubscribe: <mailto:cvs-request@lists.cleannorth.org?subject=unsubscribe>
- Resent-date: Sun, 17 Aug 2008 02:11:49 -0401 (EDT)
- Resent-from: cvs@lists.cleannorth.org
- Resent-message-id: <ha4JwC.A.NgD.6E8pIB@skroob.cleannorth.org>
- Resent-sender: cvs-request@lists.cleannorth.org
Log Message:
-----------
Yes, there was a better way.
Modified Files:
--------------
gleipnir/public_html/gallery:
upload.pl
Revision Data
-------------
Index: upload.pl
===================================================================
RCS file: /cvs/gleipnir/public_html/gallery/upload.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lpublic_html/gallery/upload.pl -Lpublic_html/gallery/upload.pl -u -r1.2 -r1.3
--- public_html/gallery/upload.pl
+++ public_html/gallery/upload.pl
@@ -107,9 +107,7 @@
# Strip off slashes
$filename =~ s/.*[\/\\](.*)/$1/;
- #Set the xtn to the last value, which we can assume is the file extension, this is pretty fug, there's probably a better way to do it.
- my @filesp = split('.', $filename);
- foreach my $cur (@filesp) { $xtn = $cur; }
+ $xtn = (split /\./, $filename)[-1];
# Copy our original image to somewhere safeish
open ( ORIGIMAGE, ">$originaldir/$id.$xtn" ) or $fail = 1;
- Prev by Date: CVS Update: gleipnir
- Next by Date: CVS Update: svartalfheim.net
- Previous by thread: CVS Update: gleipnir
- Next by thread: CVS Update: gleipnir
- Index(es):