Dotclear

Changeset 3260:cf9f7abdac2e


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

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

Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r2999 r3260  
    2525            ./$(DC)/features ./$(DC)/travis ./$(DC)/behat.yml.dist ./$(DC)/composer.* 
    2626 
    27      ## Create cache, db, plugins and public folders 
    28      mkdir ./$(DC)/cache ./$(DC)/db ./$(DC)/plugins ./$(DC)/public ./$(DC)/themes 
     27     ## Create cache, var, db, plugins, themes and public folders 
     28     mkdir ./$(DC)/cache ./$(DC)/var ./$(DC)/db ./$(DC)/plugins ./$(DC)/themes ./$(DC)/public 
    2929     cp -p inc/.htaccess ./$(DC)/cache/ 
     30     cp -p inc/.htaccess ./$(DC)/var/ 
    3031     cp -p inc/.htaccess ./$(DC)/db/ 
    3132     cp -p inc/.htaccess ./$(DC)/plugins/ 
     
    7374     ## Create digest 
    7475     cd $(DC) && ( \ 
    75           md5sum `find . -type f -not -path "./inc/digest" -not -path "./cache/*" -not -path "./db/*" -not -path ./CHANGELOG` \ 
     76          md5sum `find . -type f -not -path "./inc/digest" -not -path "./cache/*" -not -path "./var/*" -not -path "./db/*" -not -path ./CHANGELOG` \ 
    7677          > inc/digests \ 
    7778     ) 
  • admin/index.php

    r3238 r3260  
    1313if (!empty($_GET['pf'])) { 
    1414     require dirname(__FILE__).'/../inc/load_plugin_file.php'; 
     15     exit; 
     16} 
     17 
     18if (!empty($_GET['vf'])) { 
     19     require dirname(__FILE__).'/../inc/load_var_file.php'; 
    1520     exit; 
    1621} 
  • 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