Browse Source

Add folder for extensions

Visman 1 năm trước cách đây
mục cha
commit
2cd5513c48
4 tập tin đã thay đổi với 20 bổ sung0 xóa
  1. 1 0
      .gitignore
  2. 18 0
      app/Models/Pages/Admin/Update.php
  3. 1 0
      app/config/main.dist.php
  4. 0 0
      ext/.gitkeep

+ 1 - 0
.gitignore

@@ -7,6 +7,7 @@
 /app/cache/**/*.lock
 /app/cache/**/*.tmp
 /app/log/*
+/ext/*
 /public/img/avatars/*
 /public/img/og/*
 /public/.htaccess

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

@@ -921,4 +921,22 @@ class Update extends Admin
 
         return null;
     }
+
+    /**
+     * rev.69 to rev.70
+     */
+    protected function stageNumber69(array $args): ?int
+    {
+        $coreConfig = new CoreConfig($this->configFile);
+
+        $coreConfig->add(
+            'shared=>%DIR_EXT%',
+            '\'%DIR_ROOT%/ext\'',
+            '%DIR_VIEWS%'
+        );
+
+        $coreConfig->save();
+
+        return null;
+    }
 }

+ 1 - 0
app/config/main.dist.php

@@ -84,6 +84,7 @@ return [
         '%DIR_LANG%'   => '%DIR_APP%/lang',
         '%DIR_LOG%'    => '%DIR_APP%/log',
         '%DIR_VIEWS%'  => '%DIR_APP%/templates',
+        '%DIR_EXT%'    => '%DIR_ROOT%/ext',
 
         'DB' => [
             'class' => \ForkBB\Core\DB::class,

+ 0 - 0
ext/.gitkeep