Changeset 1080:4f4478e9973d for inc/prepend.php
- Timestamp:
- 12/18/12 14:36:48 (13 years ago)
- 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. - Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/prepend.php
r1069 r1080 12 12 13 13 /* ------------------------------------------------------------------------------------------- */ 14 # ClearBricks, DotClear classes auto-loader14 # ClearBricks, Twig, DotClear classes auto-loader 15 15 if (@is_dir('/usr/lib/clearbricks')) { 16 16 define('CLEARBRICKS_PATH','/usr/lib/clearbricks'); … … 46 46 $__autoload['dcWorkspace'] = dirname(__FILE__).'/core/class.dc.workspace.php'; 47 47 $__autoload['dcPrefs'] = dirname(__FILE__).'/core/class.dc.prefs.php'; 48 $__autoload['dcTwigPage'] = dirname(__FILE__).'/core/class.dc.twig.page.php'; 48 49 49 50 $__autoload['rsExtPost'] = dirname(__FILE__).'/core/class.dc.rs.extensions.php'; … … 52 53 $__autoload['rsExtUser'] = dirname(__FILE__).'/core/class.dc.rs.extensions.php'; 53 54 55 $__autoload['dcAdminContext'] = dirname(__FILE__).'/admin/class.dc.admincontext.php'; 54 56 $__autoload['dcMenu'] = dirname(__FILE__).'/admin/class.dc.menu.php'; 55 57 $__autoload['dcPage'] = dirname(__FILE__).'/admin/lib.dc.page.php'; … … 63 65 $__autoload['context'] = dirname(__FILE__).'/public/lib.tpl.context.php'; 64 66 $__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'; 65 69 66 70 # Clearbricks extensions 67 71 html::$absolute_regs[] = '/(<param\s+name="movie"\s+value=")(.*?)(")/msu'; 68 72 html::$absolute_regs[] = '/(<param\s+name="FlashVars"\s+value=".*?(?:mp3|flv)=)(.*?)(&|")/msu'; 73 74 if (@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 82 if (!defined('TWIG_PATH') || !is_dir(TWIG_PATH)) { 83 exit('No Twig path defined'); 84 } 85 require TWIG_PATH.'/Autoloader.php'; 86 Twig_Autoloader::register(); 87 69 88 /* ------------------------------------------------------------------------------------------- */ 70 89 -
inc/prepend.php
r1014 r1080 181 181 } catch (Exception $e) { 182 182 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 } 201 208 } 202 209
Note: See TracChangeset
for help on using the changeset viewer.