Browse Source

Update config files

Visman 1 year ago
parent
commit
1a13f93722
3 changed files with 36 additions and 6 deletions
  1. 24 0
      app/Models/Pages/Admin/Update.php
  2. 6 3
      app/config/install.php
  3. 6 3
      app/config/main.dist.php

+ 24 - 0
app/Models/Pages/Admin/Update.php

@@ -893,4 +893,28 @@ class Update extends Admin
 
         return null;
     }
+
+    /**
+     * rev.68 to rev.69
+     */
+    protected function stageNumber68(array $args): ?int
+    {
+        $coreConfig = new CoreConfig($this->configFile);
+
+        $coreConfig->add(
+            'shared=>View',
+            [
+                'class'  => '\\ForkBB\\Core\\View::class',
+                'config' => [
+                    'cache'      => '\'%DIR_CACHE%\'',
+                    'defaultDir' => '\'%DIR_VIEWS%/_default\'',
+                    'userDir'    => '\'%DIR_VIEWS%/_user\'',
+                ],
+            ]
+        );
+
+        $coreConfig->save();
+
+        return null;
+    }
 }

+ 6 - 3
app/config/install.php

@@ -101,9 +101,12 @@ return [
         ],
         'Validator' => \ForkBB\Core\Validator::class,
         'View' => [
-            'class'     => \ForkBB\Core\View::class,
-            'cache_dir' => '%DIR_CACHE%',
-            'views_dir' => '%DIR_VIEWS%',
+            'class'  => \ForkBB\Core\View::class,
+            'config' => [
+                'cache'      => '%DIR_CACHE%',
+                'defaultDir' => '%DIR_VIEWS%/_default',
+                'userDir'    => '%DIR_VIEWS%/_user',
+            ],
         ],
         'Router' => [
             'class'    => \ForkBB\Core\Router::class,

+ 6 - 3
app/config/main.dist.php

@@ -104,9 +104,12 @@ return [
         ],
         'Validator' => \ForkBB\Core\Validator::class,
         'View' => [
-            'class'     => \ForkBB\Core\View::class,
-            'cache_dir' => '%DIR_CACHE%',
-            'views_dir' => '%DIR_VIEWS%',
+            'class'  => \ForkBB\Core\View::class,
+            'config' => [
+                'cache'      => '%DIR_CACHE%',
+                'defaultDir' => '%DIR_VIEWS%/_default',
+                'userDir'    => '%DIR_VIEWS%/_user',
+            ],
         ],
         'Router' => [
             'class'    => \ForkBB\Core\Router::class,