From: <mo...@us...> - 2004-04-08 23:08:24
|
Update of /cvsroot/tikiwiki/tiki/lib/imagegals In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1633/lib/imagegals Modified Files: imagegallib.php Log Message: Instant-Auto-Merge from BRANCH to HEAD Index: imagegallib.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/lib/imagegals/imagegallib.php,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- imagegallib.php 29 Mar 2004 21:26:34 -0000 1.41 +++ imagegallib.php 8 Apr 2004 22:55:11 -0000 1.42 @@ -1031,10 +1031,11 @@ if ($xsize != 0 && $ysize != 0) { if ($ysize == $xsize) { // we don't know yet. - $mid = "and greatest(d.`xsize`,d.`ysize`) = greatest(?,?) "; + $mid = "and (d.`xsize`=? or d.`ysize`=?) order by `xysize` desc "; $bindvars=array((int)$id,$itype,(int)$xsize,(int)$ysize); } else { //exact match + //comment from redflo: does that make any sense? $mid = "and d.`xsize`=? and d.`ysize`=? "; $bindvars=array((int)$id,$itype,(int)$xsize,(int)$ysize); } @@ -1050,14 +1051,15 @@ i.`description`, i.`created`, i.`user`, i.`hits`, i.`path`, d.`xsize`,d.`ysize`,d.`type`,d.`filesize`, - d.`filetype`,d.`filename`,d.`data` + d.`filetype`,d.`filename`,d.`data`, + d.`xsize` * d.`ysize` as `xysize` from `tiki_images` i, `tiki_images_data` d where i.`imageId`=? and d.`imageId`=i.`imageId` and d.`type`=? $mid"; - $result = $this->query($query,$bindvars); + $result = $this->query($query,$bindvars,1); $res = $result->fetchRow(); $this->imageId = $res["imageId"]; |