/**
 * @deprecated 1.5.0
 */
function checkIco($file, $maxFileSize = 0)
{
    Tools::displayAsDeprecated();
    return ImageManager::validateIconUpload($file, $maxFileSize);
}
예제 #2
0
 protected function uploadIco($name, $dest)
 {
     if (isset($_FILES[$name]['tmp_name']) && !empty($_FILES[$name]['tmp_name'])) {
         // Check ico validity
         if ($error = ImageManager::validateIconUpload($_FILES[$name])) {
             $this->errors[] = $error;
         } elseif (!copy($_FILES[$name]['tmp_name'], $dest)) {
             $this->errors[] = sprintf(Tools::displayError('An error occurred while uploading favicon: %s to %s'), $_FILES[$name]['tmp_name'], $dest);
         }
     }
     return !count($this->errors) ? true : false;
 }
예제 #3
0
 protected function uploadIco($name, $dest)
 {
     if (isset($_FILES[$name]['tmp_name']) && !empty($_FILES[$name]['tmp_name'])) {
         // Check ico validity
         if ($error = ImageManager::validateIconUpload($_FILES[$name])) {
             $this->errors[] = $error;
         } elseif (!copy($_FILES[$name]['tmp_name'], $dest)) {
             // Copy new ico
             $this->errors[] = sprintf(Tools::displayError('An error occurred while uploading the favicon: cannot copy file "%s" to folder "%s".'), $_FILES[$name]['tmp_name'], $dest);
         }
     }
     return !count($this->errors);
 }