Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
Install themes and plugins in migration
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBack committed Dec 25, 2020
1 parent 85a1376 commit e209f15
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ The database needs to be setup on initial clone, to do this run this command:
php bin/cli.php migrate
```

This will create all necessary tables
This will create all necessary tables, install plugins and themes.

<!--
No longer required ,managed by migrations
### Install crisp theme
Expand All @@ -79,5 +82,6 @@ To install the core plugin you need shell access and execute the following comma
```bash
php bin/cli.php plugin install core
```
-->

Your instance is ready now!
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function run() {
array("order", $this::DB_INTEGER, "NOT NULL DEFAULT 0"),
);

$this->Database->query("INSERT INTO loadedPlugins (Name) VALUES('core')");
\crisp\core\Plugins::install("core", null, __FILE__, "migration");


return $this->end();
Expand Down
19 changes: 19 additions & 0 deletions pixelcatproductions/class/crisp/migrations/7_installtheme.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace crisp\migrations;

class installtheme extends \crisp\core\Migrations {

public function run() {
try {
$this->begin();
\crisp\core\Themes::install("crisp");
return $this->end();
} catch (\Exception $ex) {
echo $ex->getMessage() . PHP_EOL;
$this->rollback();
return false;
}
}

}
2 changes: 1 addition & 1 deletion pixelcatproductions/crisp.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
class core {
/* Some important constants */

const CRISP_VERSION = "0.0.8-beta.RC2";
const CRISP_VERSION = "0.0.8-beta.RC3";

/**
* This is my autoloader.
Expand Down

0 comments on commit e209f15

Please sign in to comment.