/**
* Check that we have the necessary tools to allow image uploading.
*
* @return bool
*/
public static function canUploadImages()
{
// Is the Uploads directory available and correctly permissioned?
if (!Gdn_Upload::canUpload()) {
return false;
}
// Do we have GD?
if (!function_exists('gd_info')) {
return false;
}
$GdInfo = gd_info();
// Do we have a good version of GD?
$GdVersion = preg_replace('/[a-z ()]+/i', '', $GdInfo['GD Version']);
if ($GdVersion < 2) {
return false;
}
return true;
}