} $tryFile = '/imthumb-source-' . strtolower(str_replace('ImThumbSource_', '', $class)) . '.class.php'; if (file_exists(IMTHUMB_BASE . $tryFile)) { require_once IMTHUMB_BASE . $tryFile; return true; } if ($this->params['extraSourceHandlerPath'] && file_exists($this->params['extraSourceHandlerPath'] . $tryFile)) { require_once $this->params['extraSourceHandlerPath'] . $tryFile; return true; } return false; } //-------------------------------------------------------------------------- // Rate limiting /** * @return true if rate is OK, false if exceeded */ public function checkRateLimits() { if ($limiter = $this->param('rateLimiter')) { $limiter->setGenerator($this); if (!$limiter->checkRateLimits()) { return false; } } return true; } } ImThumb::$HAS_MBSTRING = extension_loaded('mbstring'); ImThumb::$MBSTRING_SHADOW = (int) ini_get('mbstring.func_overload');