Dotclear

Changeset 3260:cf9f7abdac2e for inc


Ignore:
Timestamp:
07/01/16 11:54:57 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add /var directory, closes #236 (until further needs)

Location:
inc
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • inc/config.php.in

    r3137 r3260  
    5252define('DC_TPL_CACHE',path::real(dirname(__FILE__).'/..').'/cache'); 
    5353 
     54// Var directory 
     55define('DC_VAR',path::real(dirname(__FILE__).'/..').'/var'); 
     56 
    5457 
    5558// If you have PATH_INFO issue, uncomment following lines 
  • inc/dbschema/upgrade.php

    r3237 r3260  
    544544               @unlink(DC_ROOT.'/'.'admin/js/jsUpload/vendor/jquery.ui.widget.js'); 
    545545               @rmdir(DC_ROOT.'/'.'admin/js/jsUpload/vendor'); 
     546 
     547               # Create new var directory 
     548               @files::makeDir(DC_VAR); 
    546549          } 
    547550 
  • inc/prepend.php

    r3255 r3260  
    197197     if (strlen(crypt::hmac(DC_MASTER_KEY,DC_VENDOR_NAME,DC_CRYPT_ALGO)) < 40) { 
    198198          if (!defined('DC_CONTEXT_ADMIN')) { 
    199                exit('Site temporarily unavailable'); 
     199               __error('Server error','Site temporarily unavailable'); 
    200200          } else { 
    201                exit(DC_CRYPT_ALGO.' cryptographic algorithm configured is not strong enough, please change it.'); 
    202           } 
     201               __error('Dotclear error',DC_CRYPT_ALGO.' cryptographic algorithm configured is not strong enough, please change it.'); 
     202          } 
     203          exit; 
     204     } 
     205} 
     206 
     207if (!defined('DC_VAR')) { 
     208     define('DC_VAR',path::real(dirname(__FILE__).'/..').'/var'); 
     209} 
     210// Check existence of var directory 
     211if (!is_dir(DC_VAR)) { 
     212     // Try to create it 
     213     @files::makeDir(DC_VAR); 
     214     if (!is_dir(DC_VAR)) { 
     215          // Admin must create it 
     216          if (!defined('DC_CONTEXT_ADMIN')) { 
     217               __error('Server error','Site temporarily unavailable'); 
     218          } else { 
     219               __error('Dotclear error',DC_VAR.' directory does not exist. Please create it.'); 
     220          } 
     221          exit; 
    203222     } 
    204223} 
  • inc/public/prepend.php

    r3059 r3260  
    1313if (!empty($_GET['pf'])) { 
    1414     require dirname(__FILE__).'/../load_plugin_file.php'; 
     15     exit; 
     16} 
     17 
     18if (!empty($_GET['vf'])) { 
     19     require dirname(__FILE__).'/../load_var_file.php'; 
    1520     exit; 
    1621} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map