1. <?php
  2. require __DIR__ . '/boot.php';
  3.  
  4. class Moebooru extends Rails\Application
  5. {
  6. private $moe_config;
  7.  
  8. public function moe_config()
  9. {
  10. return $this->moe_config;
  11. }
  12.  
  13. protected function init()
  14. {
  15. require __DIR__ . '/default_config.php';
  16. require __DIR__ . '/config.php';
  17. $this->moe_config = new Moebooru_Config();
  18. }
  19.  
  20. protected function init_config($config)
  21. {
  22. $config->encoding = 'utf-8';
  23.  
  24. $config->load_files = [
  25. 'app_functions.php',
  26. 'Moebooru/Resizer.php',
  27. 'dtext.php'
  28. ];
  29.  
  30. $config->safe_ips = [
  31. '127.0.0.1'
  32. ];
  33.  
  34. $config->exception_handler->controller_name = 'ExceptionController';
  35.  
  36. $config->active_record->table_schema_from_files = true;
  37.  
  38. $config->assets->enabled = true;
  39.  
  40. $config->action_view->layout = 'default';
  41.  
  42. $config->i18n->file_type = 'php';
  43.  
  44. $config->date->timezone = 'Europe/Berlin';
  45. }
  46. {
  47. return [
  48. 'app' => [
  49. 'encoding' => 'utf-8',
  50.  
  51. 'load_files' => [
  52. 'app_functions.php',
  53. 'Moebooru/Resizer.php',
  54. 'dtext.php'
  55. ],
  56.  
  57. 'rails_panel_path' => 'sysadmin',
  58. 'safe_ips' => [
  59. '127.0.0.1'
  60. ],
  61.  
  62. 'environment' => 'production'
  63. ],
  64.  
  65. 'active_record' => [
  66. 'connection'=> 'mysql:host=127.0.0.1;dbname=myimouto;charset=utf8;',
  67. 'username' => '**********',
  68. 'password' => '**********',
  69.  
  70. 'table_schema_from_files' => true,
  71.  
  72. 'load_models' => [
  73. 'Post',
  74. 'User',
  75. 'Pool',
  76. 'PoolPost',
  77. 'ForumPost',
  78. 'Comment'
  79. ]
  80. ],
  81.  
  82. 'action_view' => [
  83. 'layout' => 'default'
  84. ],
  85.  
  86. 'date' => [
  87. 'timezone' => 'Europe/Berlin'
  88. ],
  89.  
  90. 'assets' => [
  91. 'enabled' => true
  92. ]
  93. ];
  94. }
  95. }