Dotclear


Ignore:
Timestamp:
12/18/12 14:36:48 (13 years ago)
Author:
Dsls <dsls@…>
Branch:
twig
Parents:
1079:e3bf3d268635 (diff), 1077:e80b1a400723 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Fusion avec default

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inc/prepend.php

    r1069 r1080  
    1212 
    1313/* ------------------------------------------------------------------------------------------- */ 
    14 #  ClearBricks, DotClear classes auto-loader 
     14#  ClearBricks, Twig, DotClear classes auto-loader 
    1515if (@is_dir('/usr/lib/clearbricks')) { 
    1616     define('CLEARBRICKS_PATH','/usr/lib/clearbricks'); 
     
    4646$__autoload['dcWorkspace']              = dirname(__FILE__).'/core/class.dc.workspace.php'; 
    4747$__autoload['dcPrefs']                  = dirname(__FILE__).'/core/class.dc.prefs.php'; 
     48$__autoload['dcTwigPage']               = dirname(__FILE__).'/core/class.dc.twig.page.php'; 
    4849 
    4950$__autoload['rsExtPost']                = dirname(__FILE__).'/core/class.dc.rs.extensions.php'; 
     
    5253$__autoload['rsExtUser']                = dirname(__FILE__).'/core/class.dc.rs.extensions.php'; 
    5354 
     55$__autoload['dcAdminContext']                = dirname(__FILE__).'/admin/class.dc.admincontext.php'; 
    5456$__autoload['dcMenu']                   = dirname(__FILE__).'/admin/class.dc.menu.php'; 
    5557$__autoload['dcPage']                   = dirname(__FILE__).'/admin/lib.dc.page.php'; 
     
    6365$__autoload['context']                  = dirname(__FILE__).'/public/lib.tpl.context.php'; 
    6466$__autoload['dcUrlHandlers']            = dirname(__FILE__).'/public/lib.urlhandlers.php'; 
     67$__autoload['dcForm']              = dirname(__FILE__).'/admin/class.dc.form.php'; 
     68$__autoload['dcFormExtension']               = dirname(__FILE__).'/admin/class.dc.form.php'; 
    6569 
    6670# Clearbricks extensions 
    6771html::$absolute_regs[] = '/(<param\s+name="movie"\s+value=")(.*?)(")/msu'; 
    6872html::$absolute_regs[] = '/(<param\s+name="FlashVars"\s+value=".*?(?:mp3|flv)=)(.*?)(&|")/msu'; 
     73 
     74if (@is_dir('/usr/lib/twig')) { 
     75     define('TWIG_PATH','/usr/lib/twig'); 
     76} elseif (is_dir(dirname(__FILE__).'/libs/twig')) { 
     77     define('TWIG_PATH',dirname(__FILE__).'/libs/twig'); 
     78} elseif (isset($_SERVER['TWIG_PATH']) && is_dir($_SERVER['TWIG_PATH'])) { 
     79     define('TWIG_PATH',$_SERVER['TWIG_PATH']); 
     80} 
     81 
     82if (!defined('TWIG_PATH') || !is_dir(TWIG_PATH)) { 
     83     exit('No Twig path defined'); 
     84} 
     85require TWIG_PATH.'/Autoloader.php'; 
     86Twig_Autoloader::register(); 
     87 
    6988/* ------------------------------------------------------------------------------------------- */ 
    7089 
  • inc/prepend.php

    r1014 r1080  
    181181} catch (Exception $e) { 
    182182     init_prepend_l10n(); 
    183      __error(__('Unable to connect to database') 
    184           ,$e->getCode() == 0 ? 
    185           sprintf(__('<p>This either means that the username and password information in '. 
    186           'your <strong>config.php</strong> file is incorrect or we can\'t contact '. 
    187           'the database server at "<em>%s</em>". This could mean your '. 
    188           'host\'s database server is down.</p> '. 
    189           '<ul><li>Are you sure you have the correct username and password?</li>'. 
    190           '<li>Are you sure that you have typed the correct hostname?</li>'. 
    191           '<li>Are you sure that the database server is running?</li></ul>'. 
    192           '<p>If you\'re unsure what these terms mean you should probably contact '. 
    193           'your host. If you still need help you can always visit the '. 
    194           '<a href="http://forum.dotclear.net/">Dotclear Support Forums</a>.</p>'). 
    195           (DC_DEBUG ? 
    196                __('The following error was encountered while trying to read the database:').'</p><ul><li>'.$e->getMessage().'</li></ul>' :  '') 
    197           ,(DC_DBHOST != '' ? DC_DBHOST : 'localhost') 
    198           ) 
    199           : '' 
    200           ,20); 
     183     if (!defined('DC_CONTEXT_ADMIN')) { 
     184          __error(__('Site temporarily unavailable'), 
     185               __('<p>We apologize for this temporary unavailability.<br />'. 
     186               'Thank you for your understanding.</p>'), 
     187               20); 
     188     } else { 
     189          __error(__('Unable to connect to database') 
     190               ,$e->getCode() == 0 ? 
     191               sprintf(__('<p>This either means that the username and password information in '. 
     192               'your <strong>config.php</strong> file is incorrect or we can\'t contact '. 
     193               'the database server at "<em>%s</em>". This could mean your '. 
     194               'host\'s database server is down.</p> '. 
     195               '<ul><li>Are you sure you have the correct username and password?</li>'. 
     196               '<li>Are you sure that you have typed the correct hostname?</li>'. 
     197               '<li>Are you sure that the database server is running?</li></ul>'. 
     198               '<p>If you\'re unsure what these terms mean you should probably contact '. 
     199               'your host. If you still need help you can always visit the '. 
     200               '<a href="http://forum.dotclear.net/">Dotclear Support Forums</a>.</p>'). 
     201               (DC_DEBUG ? 
     202                    __('The following error was encountered while trying to read the database:').'</p><ul><li>'.$e->getMessage().'</li></ul>' :  '') 
     203               ,(DC_DBHOST != '' ? DC_DBHOST : 'localhost') 
     204               ) 
     205               : '' 
     206               ,20); 
     207     } 
    201208} 
    202209 
Note: See TracChangeset for help on using the changeset viewer.

Sites map