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

Commit e209f15

Browse files
committed
Install themes and plugins in migration
1 parent 85a1376 commit e209f15

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ The database needs to be setup on initial clone, to do this run this command:
6262
php bin/cli.php migrate
6363
```
6464

65-
This will create all necessary tables
65+
This will create all necessary tables, install plugins and themes.
66+
67+
<!--
68+
No longer required ,managed by migrations
6669
6770
### Install crisp theme
6871
@@ -79,5 +82,6 @@ To install the core plugin you need shell access and execute the following comma
7982
```bash
8083
php bin/cli.php plugin install core
8184
```
85+
-->
8286

8387
Your instance is ready now!

pixelcatproductions/class/crisp/migrations/5_createplugins.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function run() {
1414
array("order", $this::DB_INTEGER, "NOT NULL DEFAULT 0"),
1515
);
1616

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

1919

2020
return $this->end();
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace crisp\migrations;
4+
5+
class installtheme extends \crisp\core\Migrations {
6+
7+
public function run() {
8+
try {
9+
$this->begin();
10+
\crisp\core\Themes::install("crisp");
11+
return $this->end();
12+
} catch (\Exception $ex) {
13+
echo $ex->getMessage() . PHP_EOL;
14+
$this->rollback();
15+
return false;
16+
}
17+
}
18+
19+
}

pixelcatproductions/crisp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
class core {
2828
/* Some important constants */
2929

30-
const CRISP_VERSION = "0.0.8-beta.RC2";
30+
const CRISP_VERSION = "0.0.8-beta.RC3";
3131

3232
/**
3333
* This is my autoloader.

0 commit comments

Comments
 (0)