Révision b4adf10d
Ajouté par Assos Assos il y a plus de 9 ans
drupal7/modules/system/system.admin.inc | ||
---|---|---|
640 | 640 |
|
641 | 641 |
// If the user provided a path for a logo or favicon file, make sure a file |
642 | 642 |
// exists at that path. |
643 |
if ($form_state['values']['logo_path']) {
|
|
643 |
if (!empty($form_state['values']['logo_path'])) {
|
|
644 | 644 |
$path = _system_theme_settings_validate_path($form_state['values']['logo_path']); |
645 | 645 |
if (!$path) { |
646 | 646 |
form_set_error('logo_path', t('The custom logo path is invalid.')); |
647 | 647 |
} |
648 | 648 |
} |
649 |
if ($form_state['values']['favicon_path']) {
|
|
649 |
if (!empty($form_state['values']['favicon_path'])) {
|
|
650 | 650 |
$path = _system_theme_settings_validate_path($form_state['values']['favicon_path']); |
651 | 651 |
if (!$path) { |
652 | 652 |
form_set_error('favicon_path', t('The custom favicon path is invalid.')); |
... | ... | |
703 | 703 |
|
704 | 704 |
// If the user uploaded a new logo or favicon, save it to a permanent location |
705 | 705 |
// and use it in place of the default theme-provided file. |
706 |
if ($file = $values['logo_upload']) { |
|
706 |
if (!empty($values['logo_upload'])) { |
|
707 |
$file = $values['logo_upload']; |
|
707 | 708 |
unset($values['logo_upload']); |
708 | 709 |
$filename = file_unmanaged_copy($file->uri); |
709 | 710 |
$values['default_logo'] = 0; |
710 | 711 |
$values['logo_path'] = $filename; |
711 | 712 |
$values['toggle_logo'] = 1; |
712 | 713 |
} |
713 |
if ($file = $values['favicon_upload']) { |
|
714 |
if (!empty($values['favicon_upload'])) { |
|
715 |
$file = $values['favicon_upload']; |
|
714 | 716 |
unset($values['favicon_upload']); |
715 | 717 |
$filename = file_unmanaged_copy($file->uri); |
716 | 718 |
$values['default_favicon'] = 0; |
Formats disponibles : Unified diff
Udpate to 7.33