PageRenderTime 41ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/puppet/modules/multiwiki/files/CommonSettings.php

https://github.com/hexmode/mediawiki-vagrant-rh
PHP | 32 lines | 18 code | 7 blank | 7 comment | 3 complexity | 288c54beab68404cfe17f478a526679f MD5 | raw file
Possible License(s): JSON, Apache-2.0
  1. <?php
  2. // This file is managed by Puppet.
  3. if ( PHP_SAPI !== 'cli' ) {
  4. header( 'Cache-control: no-cache' );
  5. }
  6. if ( isset( $_SERVER['SERVER_ADDR'] ) ) {
  7. ini_set( 'error_append_string', ' (' . $_SERVER['SERVER_ADDR'] . ')' );
  8. }
  9. if ( !class_exists( 'MWMultiVersion' ) ) {
  10. print "No MWMultiVersion instance initialized! MWScript.php wrapper not used?\n";
  11. exit(1);
  12. }
  13. $multiVersion = MWMultiVersion::getInstance();
  14. // This must be set *after* the DefaultSettings.php inclusion
  15. $wgDBname = $multiVersion->getDatabase();
  16. include_once __DIR__ . '/LoadWgConf.php';
  17. $wgDebugLogFile = "/vagrant/logs/mediawiki-{$wgDBname}-debug.log";
  18. foreach(
  19. array_merge(
  20. glob( __DIR__ . "/$wgDBname/settings.d/puppet-managed/*.php" ),
  21. glob( __DIR__ . "/$wgDBname/settings.d/*.php" )
  22. ) as $conffile
  23. ) {
  24. include_once $conffile;
  25. }