Changeset 2102


Ignore:
Timestamp:
Sep 21, 2007, 11:06:00 AM (17 years ago)
Author:
patdenice
Message:

0000421 : call a function to create empty local files during install and upgrade
Avoid log errors

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_upgrade.php

    r2096 r2102  
    7979}
    8080
     81// Create empty local files to avoid log errors
     82function create_empty_local_files()
     83{
     84   $files =
     85      array (
     86         PHPWG_ROOT_PATH . 'template-common/local-layout.css',
     87         PHPWG_ROOT_PATH . 'template/yoga/local-layout.css'
     88         );
     89
     90   foreach ($files as $path)
     91   {
     92      if (!file_exists ($path))
     93      {
     94         $file = @fopen($path, "w");
     95         @fwrite($file , '/* You can modify this file */');
     96         @fclose($file);
     97      }
     98   }
     99}
     100
    81101?>
  • trunk/install.php

    r1930 r2102  
    205205include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
    206206include(PHPWG_ROOT_PATH . 'admin/include/functions.php');
     207include(PHPWG_ROOT_PATH . 'admin/include/functions_upgrade.php');
    207208include(PHPWG_ROOT_PATH . 'include/template.php');
     209
     210// Create empty local files to avoid log errors
     211create_empty_local_files();
    208212
    209213if ( isset( $_POST['language'] ))
  • trunk/upgrade.php

    r2096 r2102  
    247247      $datas
    248248      );
     249
     250    // Create empty local files to avoid log errors
     251    create_empty_local_files();
    249252   
    250253    $page['upgrade_end'] = get_moment();
Note: See TracChangeset for help on using the changeset viewer.