Changeset 2103 for branches


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

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

Location:
branches/branch-1_7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1_7/admin/include/functions_upgrade.php

    r1912 r2103  
    4141}
    4242
     43// Create empty local files to avoid log errors
     44function create_empty_local_files()
     45{
     46   $files =
     47      array (
     48         PHPWG_ROOT_PATH . 'template-common/local-layout.css',
     49         PHPWG_ROOT_PATH . 'template/yoga/local-layout.css'
     50         );
     51 
     52   foreach ($files as $path)
     53   {
     54      if (!file_exists ($path))
     55      {
     56         $file = @fopen($path, "w");
     57         @fwrite($file , '/* You can modify this file */');
     58         @fclose($file);
     59      }
     60   }
     61}
    4362
    4463?>
  • branches/branch-1_7/install.php

    r1930 r2103  
    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'] ))
  • branches/branch-1_7/upgrade.php

    r1998 r2103  
    248248      $datas
    249249      );
     250
     251    // Create empty local files to avoid log errors
     252    create_empty_local_files();
    250253   
    251254    $page['upgrade_end'] = get_moment();
Note: See TracChangeset for help on using the changeset viewer.