summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--.gitmodules7
-rw-r--r--README-ENG.md2
-rw-r--r--README.md2
-rw-r--r--composer.json20
-rw-r--r--includes/engelsystem_provider.php7
l---------public/vendor/bootstrap2
m---------themes/assets/bootstrap (renamed from vendor/bootstrap)0
-rw-r--r--themes/base.less2
-rwxr-xr-xthemes/build-themes.sh20
-rw-r--r--themes/theme1.less2
-rw-r--r--themes/theme2.less2
-rw-r--r--themes/theme3.less2
-rw-r--r--themes/theme4.less2
m---------vendor/parsedown0
15 files changed, 55 insertions, 19 deletions
diff --git a/.gitignore b/.gitignore
index febc6812..d712148b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,7 @@ _vimrc_local.vim
# Project files
/config/config.php
/test/coverage
+
+# Composer files
+/vendor/
+/composer.lock
diff --git a/.gitmodules b/.gitmodules
index 8684a4ee..2d19e8e9 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,3 @@
-[submodule "vendor/parsedown"]
- path = vendor/parsedown
- url = https://github.com/erusev/parsedown.git
[submodule "vendor/bootstrap"]
- path = vendor/bootstrap
- url = https://github.com/twbs/bootstrap.git
+ path = themes/assets/bootstrap
+ url = https://github.com/twbs/bootstrap.git \ No newline at end of file
diff --git a/README-ENG.md b/README-ENG.md
index 3632882c..d379e192 100644
--- a/README-ENG.md
+++ b/README-ENG.md
@@ -7,6 +7,8 @@
## Directions:
* Clone the master branch with the submodules: `git clone --recursive https://github.com/engelsystem/engelsystem.git`
+ * Install [Composer](https://getcomposer.org/download/)
+ * Install project dependencies: `composer install`
* Webserver must have write access to the 'import' directory and read access for all other directories
* Webserver must be public.
diff --git a/README.md b/README.md
index 57d81d52..7ee7320a 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,8 @@
## Vorgehen:
* Klonen des `master` inkl. submodules in lokales Verzeichnis: `git clone --recursive https://github.com/engelsystem/engelsystem.git`
+ * [Composer](https://getcomposer.org/download/) installieren
+ * Abhängigkeiten installieren: `composer install`
* Der Webserver muss Schreibrechte auf das Verzeichnis `import` bekommen, für alle anderen Dateien reichen Leserechte.
* Der Webserver muss auf `public` als http-root zeigen.
diff --git a/composer.json b/composer.json
new file mode 100644
index 00000000..5b56395b
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,20 @@
+{
+ "name": "engelsystem/engelsystem",
+ "description": "Shift planning system for chaos events",
+ "type": "project",
+ "license": "GPL-2.0",
+ "authors": [
+ {
+ "name": "msquare",
+ "email": "msquare@notrademark.de"
+ },
+ {
+ "name": "MyIgel",
+ "email": "igor.scheller@igorshp.de"
+ }
+ ],
+ "require": {
+ "php": ">=5.4",
+ "erusev/parsedown": "1.6.*"
+ }
+}
diff --git a/includes/engelsystem_provider.php b/includes/engelsystem_provider.php
index 595af9f9..c2b979d8 100644
--- a/includes/engelsystem_provider.php
+++ b/includes/engelsystem_provider.php
@@ -2,6 +2,11 @@
/**
* This file includes all needed functions, connects to the db etc.
*/
+if(!is_readable(__DIR__ . '/../vendor/autoload.php')){
+ die('Please run composer.phar install');
+}
+require __DIR__ . '/../vendor/autoload.php';
+
require_once realpath(__DIR__ . '/../includes/mysqli_provider.php');
require_once realpath(__DIR__ . '/../includes/sys_auth.php');
@@ -91,8 +96,6 @@ require_once realpath(__DIR__ . '/../includes/pages/user_questions.php');
require_once realpath(__DIR__ . '/../includes/pages/user_settings.php');
require_once realpath(__DIR__ . '/../includes/pages/user_shifts.php');
-require_once realpath(__DIR__ . '/../vendor/parsedown/Parsedown.php');
-
session_start();
gettext_init();
diff --git a/public/vendor/bootstrap b/public/vendor/bootstrap
index 66500d68..250b0a66 120000
--- a/public/vendor/bootstrap
+++ b/public/vendor/bootstrap
@@ -1 +1 @@
-../../vendor/bootstrap/dist \ No newline at end of file
+../../themes/assets/bootstrap/dist \ No newline at end of file
diff --git a/vendor/bootstrap b/themes/assets/bootstrap
-Subproject ad716b9ea9506456f28e2c1bcdd7b4a81b44c11
+Subproject ad716b9ea9506456f28e2c1bcdd7b4a81b44c11
diff --git a/themes/base.less b/themes/base.less
index 713119ff..a4fa7e77 100644
--- a/themes/base.less
+++ b/themes/base.less
@@ -1,4 +1,4 @@
-@import "../vendor/bootstrap/less/bootstrap";
+@import "assets/bootstrap/less/bootstrap";
@icon-font-path: "../fonts/";
diff --git a/themes/build-themes.sh b/themes/build-themes.sh
index 404b6890..8657b691 100755
--- a/themes/build-themes.sh
+++ b/themes/build-themes.sh
@@ -1,7 +1,15 @@
-#!/bin/sh
+#!/bin/bash
-lessc theme0.less > ../public/css/theme0.css
-lessc theme1.less > ../public/css/theme1.css
-lessc theme2.less > ../public/css/theme2.css
-lessc theme3.less > ../public/css/theme3.css
-lessc theme4.less > ../public/css/theme4.css
+FILE_PATH="$(dirname "$0")"
+
+for file in $(ls "${FILE_PATH}/"*.less); do
+ filename="${file##*/}"
+ themeName="${filename%.less}"
+
+ if [[ "$filename" == "base.less" ]]; then
+ continue;
+ fi
+
+ echo "Building ${themeName}"
+ lessc "${file}" > "${FILE_PATH}/../public/css/${themeName}.css"
+done
diff --git a/themes/theme1.less b/themes/theme1.less
index 2b13601e..134e79b7 100644
--- a/themes/theme1.less
+++ b/themes/theme1.less
@@ -1,4 +1,4 @@
-@import "../vendor/bootstrap/less/variables";
+@import "assets/bootstrap/less/variables";
/*
The MIT License (MIT)
diff --git a/themes/theme2.less b/themes/theme2.less
index d5cac763..344e23c6 100644
--- a/themes/theme2.less
+++ b/themes/theme2.less
@@ -1,4 +1,4 @@
-@import "../vendor/bootstrap/less/variables";
+@import "assets/bootstrap/less/variables";
@brand-primary: #758499;
@brand-success: #7b9c41;
diff --git a/themes/theme3.less b/themes/theme3.less
index 7029db68..7e7e0f69 100644
--- a/themes/theme3.less
+++ b/themes/theme3.less
@@ -1,4 +1,4 @@
-@import "../vendor/bootstrap/less/variables";
+@import "assets/bootstrap/less/variables";
@brand-primary: #f19224;
@brand-success: #39AB50;
diff --git a/themes/theme4.less b/themes/theme4.less
index 4d4060ca..2ad8593d 100644
--- a/themes/theme4.less
+++ b/themes/theme4.less
@@ -1,4 +1,4 @@
-@import "../vendor/bootstrap/less/variables";
+@import "assets/bootstrap/less/variables";
/*
The MIT License (MIT)
diff --git a/vendor/parsedown b/vendor/parsedown
deleted file mode 160000
-Subproject 3ebbd730b5c2cf5ce78bc1bf64071407fc6674b