Yup, quite right again. If a user has taken the time to create and upload small and large images that are exactly the same size and taken the time to rename them accordingly then it may well confuse the issue. But this hypothetical user is quite a confused individual anyway. And actually the way that $this-sizetype is used in the rest of the class, on first glance, it really doesn't matter. But for consistency let's change it.
Code:function determine_image_sizetype() { global $ihConf; $this->sizetype = 'generic'; if ((intval($this->width) == intval($ihConf['small']['width'])) && (intval($this->height) == intval($ihConf['small']['height']))) { $this->sizetype = 'small'; } if($ihConf['medium']['suffix'] != '') { if (strstr($this->src, $ihConf['medium']['suffix'])) { $this->sizetype = 'medium'; } } if($ihConf['large']['suffix'] != '') { if (strstr($this->src, $ihConf['large']['suffix'])) { $this->sizetype = 'large'; } } }


Reply With Quote
