Minor - Avoid warning in homepage edition if tabs files do not exist

1.9.x
Yannick Warnier 11 years ago
parent 6b936273ff
commit 4459345350
  1. 10
      main/admin/configure_homepage.php

@ -171,11 +171,17 @@ $homef = array($menuf, $newsf, $topf, $noticef, $menutabs, $mtloggedin);
foreach ($homef as $my_file) {
if (api_is_multiple_url_enabled()) {
if (!file_exists($homep_new.$my_file.'_'.$lang.$ext)) {
copy($homep.$my_file.$ext, $homep_new.$my_file.'_'.$lang.$ext);
if (!file_exists($homep.$my_file.$ext)) {
touch($homep.$my_file.$ext);
}
@copy($homep.$my_file.$ext, $homep_new.$my_file.'_'.$lang.$ext);
}
} else {
if (!file_exists($homep.$my_file.'_'.$lang.$ext)) {
copy($homep.$my_file.$ext, $homep.$my_file.'_'.$lang.$ext);
if (!file_exists($homep.$my_file.$ext)) {
touch($homep.$my_file.$ext);
}
@copy($homep.$my_file.$ext, $homep.$my_file.'_'.$lang.$ext);
}
}
}

Loading…
Cancel
Save