Added redirect flag and updated 'git-describe' command reference.
This commit is contained in:
parent
dcada45e31
commit
7dd8ccd135
2
Makefile
2
Makefile
@ -12,7 +12,7 @@ OBJS=obj/main.o obj/util.o obj/galleries.o obj/gallery.o obj/varray.o \
|
||||
$(CS_PATH)/lib/libneo_cgi.a $(CS_PATH)/lib/libneo_cs.a \
|
||||
$(CS_PATH)/lib/libneo_utl.a
|
||||
|
||||
VERSIONSTAMP=$(shell if [ -d .git ]; then git-describe; else cat version; fi)
|
||||
VERSIONSTAMP=$(shell if [ -d .git ]; then git describe; else cat version; fi)
|
||||
COMPILESTAMP=$(shell date "+%Y-%m-%d %H:%M:%S %z" )
|
||||
|
||||
gallery.cgi: $(OBJS)
|
||||
|
10
src/main.c
10
src/main.c
@ -418,6 +418,16 @@ void photo_handler( struct gallery_info* gallery,
|
||||
|
||||
/* Shut down ImageMagick */
|
||||
MagickWandTerminus();
|
||||
|
||||
/*
|
||||
* Were we just asked for an image?
|
||||
* If so, just point them to the file and leave it at that.
|
||||
*/
|
||||
if ( hdf_get_int_value( cgi->hdf, "Query.redirect", 0 ) ) {
|
||||
/* We will do this ignoring the ClearSilver library */
|
||||
printf("Location: %s/%s\n\n", get_cgiuri(), resized);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Populate HDF structure */
|
||||
hdf_set_value( cgi->hdf, "gallery.name", gallery->gallery_name );
|
||||
|
Loading…
Reference in New Issue
Block a user