Commit bd7f232b authored by Dominik Hebeler's avatar Dominik Hebeler

Update auf Laravel 5.5

Achtung damit funktioniert gulp nicht mehr über einen direkten Aufruf.
Stattdessen bitte "npm run dev" bzw. "npm run production" verwenden.
parent 7e12de35
...@@ -28,7 +28,7 @@ update(144.76.113.134): ...@@ -28,7 +28,7 @@ update(144.76.113.134):
- chmod -R 777 storage - chmod -R 777 storage
- chmod -R 777 bootstrap/cache - chmod -R 777 bootstrap/cache
- npm install - npm install
- ./gulpbuild.sh - npm run prodution
- if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi - if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
- cd ~/ - cd ~/
- while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done - while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done
...@@ -67,7 +67,7 @@ update(metager2): ...@@ -67,7 +67,7 @@ update(metager2):
- chmod -R 777 storage - chmod -R 777 storage
- chmod -R 777 bootstrap/cache - chmod -R 777 bootstrap/cache
- npm install - npm install
- ./gulpbuild.sh - npm run prodution
- if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi - if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
- cd ~/ - cd ~/
- while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done - while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done
......
...@@ -35,5 +35,6 @@ class Kernel extends ConsoleKernel ...@@ -35,5 +35,6 @@ class Kernel extends ConsoleKernel
protected function commands() protected function commands()
{ {
require base_path('routes/console.php'); require base_path('routes/console.php');
$this->load(__DIR__.'/Commands');
} }
} }
...@@ -49,7 +49,7 @@ class MailController extends Controller ...@@ -49,7 +49,7 @@ class MailController extends Controller
$replyTo = $request->input('email'); $replyTo = $request->input('email');
} }
if (!$request->has('message') || !$request->has('subject')) { if (!$request->filled('message') || !$request->filled('subject')) {
$messageType = "error"; $messageType = "error";
$returnMessage = "Tut uns leid, aber leider haben wir mit Ihrer Kontaktanfrage keine Daten erhalten. Die Nachricht wurde nicht versandt."; $returnMessage = "Tut uns leid, aber leider haben wir mit Ihrer Kontaktanfrage keine Daten erhalten. Die Nachricht wurde nicht versandt.";
} else { } else {
...@@ -95,7 +95,7 @@ class MailController extends Controller ...@@ -95,7 +95,7 @@ class MailController extends Controller
# Kontonummer ( IBAN ) # Kontonummer ( IBAN )
# Bankleitzahl ( BIC ) # Bankleitzahl ( BIC )
# Nachricht # Nachricht
if (!$request->has('Kontonummer') || !$request->has('Bankleitzahl') || !$request->has('Betrag')) { if (!$request->filled('Kontonummer') || !$request->filled('Bankleitzahl') || !$request->filled('Betrag')) {
$messageToUser = "Sie haben eins der folgenden Felder nicht ausgefüllt: IBAN, BIC, Nachricht. Bitte korrigieren Sie Ihre Eingabe und versuchen es erneut.\n"; $messageToUser = "Sie haben eins der folgenden Felder nicht ausgefüllt: IBAN, BIC, Nachricht. Bitte korrigieren Sie Ihre Eingabe und versuchen es erneut.\n";
$messageType = "error"; $messageType = "error";
} else { } else {
......
...@@ -10,7 +10,7 @@ class Pictureproxy extends Controller ...@@ -10,7 +10,7 @@ class Pictureproxy extends Controller
{ {
public function get(Request $request) public function get(Request $request)
{ {
if ($request->has('url')) { if ($request->filled('url')) {
try { try {
$arrContextOptions = array( $arrContextOptions = array(
"ssl" => array( "ssl" => array(
......
...@@ -145,7 +145,7 @@ class StartpageController extends Controller ...@@ -145,7 +145,7 @@ class StartpageController extends Controller
{ {
$link = ""; $link = "";
$password = ""; $password = "";
if ($request->has('eingabe')) { if ($request->filled('eingabe')) {
$password = getenv('berlin'); $password = getenv('berlin');
$password = md5($request->input('eingabe') . " -host:userpage.fu-berlin.de" . $password); $password = md5($request->input('eingabe') . " -host:userpage.fu-berlin.de" . $password);
$link = "/meta/meta.ger3?eingabe=" . $request->input('eingabe') . " -host:userpage.fu-berlin.de&focus=web&password=" . $password . "&encoding=utf8&lang=all&site=fu-berlin.de&quicktips=off&out=results-with-style"; $link = "/meta/meta.ger3?eingabe=" . $request->input('eingabe') . " -host:userpage.fu-berlin.de&focus=web&password=" . $password . "&encoding=utf8&lang=all&site=fu-berlin.de&quicktips=off&out=results-with-style";
......
...@@ -9,7 +9,7 @@ class ZitatController extends Controller ...@@ -9,7 +9,7 @@ class ZitatController extends Controller
public function zitatSuche(Request $request) public function zitatSuche(Request $request)
{ {
$validResults = []; $validResults = [];
if ($request->has("q")) { if ($request->filled("q")) {
# The user searched for something # The user searched for something
$fileName = storage_path() . "/app/public/zitate.txt"; $fileName = storage_path() . "/app/public/zitate.txt";
$fileContent = file_get_contents($fileName); $fileContent = file_get_contents($fileName);
......
...@@ -482,7 +482,7 @@ class MetaGer ...@@ -482,7 +482,7 @@ class MetaGer
public function createSearchEngines(Request $request) public function createSearchEngines(Request $request)
{ {
# Wenn es kein Suchwort gibt # Wenn es kein Suchwort gibt
if (!$request->has("eingabe") || $this->q === "") { if (!$request->filled("eingabe") || $this->q === "") {
return; return;
} }
...@@ -607,7 +607,7 @@ class MetaGer ...@@ -607,7 +607,7 @@ class MetaGer
public function sumaIsSelected($suma, $request, $custom) public function sumaIsSelected($suma, $request, $custom)
{ {
if ($custom) { if ($custom) {
if ($request->has("engine_" . $suma["name"])) { if ($request->filled("engine_" . $suma["name"])) {
return true; return true;
} }
} else { } else {
...@@ -707,7 +707,7 @@ class MetaGer ...@@ -707,7 +707,7 @@ class MetaGer
public function requestIsCached($request) public function requestIsCached($request)
{ {
return return
$request->has('next') $request->filled('next')
&& Cache::has($request->input('next')) && Cache::has($request->input('next'))
&& unserialize(Cache::get($request->input('next')))['page'] > 1; && unserialize(Cache::get($request->input('next')))['page'] > 1;
} }
...@@ -972,14 +972,14 @@ class MetaGer ...@@ -972,14 +972,14 @@ class MetaGer
# Ergebnisse pro Seite: # Ergebnisse pro Seite:
$this->resultCount = $request->input('resultCount', '20'); $this->resultCount = $request->input('resultCount', '20');
# Manchmal müssen wir Parameter anpassen um den Sucheinstellungen gerecht zu werden: # Manchmal müssen wir Parameter anpassen um den Sucheinstellungen gerecht zu werden:
if ($request->has('dart')) { if ($request->filled('dart')) {
$this->time = 10000; $this->time = 10000;
$this->warnings[] = trans('metaGer.formdata.dartEurope'); $this->warnings[] = trans('metaGer.formdata.dartEurope');
} }
if ($this->time <= 500 || $this->time > 20000) { if ($this->time <= 500 || $this->time > 20000) {
$this->time = 1000; $this->time = 1000;
} }
if ($request->has('minism') && ($request->has('fportal') || $request->has('harvest'))) { if ($request->filled('minism') && ($request->filled('fportal') || $request->filled('harvest'))) {
$input = $request->all(); $input = $request->all();
$newInput = []; $newInput = [];
foreach ($input as $key => $value) { foreach ($input as $key => $value) {
...@@ -995,14 +995,14 @@ class MetaGer ...@@ -995,14 +995,14 @@ class MetaGer
if ($this->resultCount <= 0 || $this->resultCount > 200) { if ($this->resultCount <= 0 || $this->resultCount > 200) {
$this->resultCount = 1000; $this->resultCount = 1000;
} }
if ($request->has('onenewspageAll') || $request->has('onenewspageGermanyAll')) { if ($request->filled('onenewspageAll') || $request->filled('onenewspageGermanyAll')) {
$this->time = 5000; $this->time = 5000;
$this->cache = "cache"; $this->cache = "cache";
} }
if ($request->has('password')) { if ($request->filled('password')) {
$this->password = $request->input('password'); $this->password = $request->input('password');
} }
if ($request->has('quicktips')) { if ($request->filled('quicktips')) {
$this->quicktips = false; $this->quicktips = false;
} else { } else {
$this->quicktips = true; $this->quicktips = true;
...@@ -1045,7 +1045,7 @@ class MetaGer ...@@ -1045,7 +1045,7 @@ class MetaGer
public function checkSpecialSearches(Request $request) public function checkSpecialSearches(Request $request)
{ {
if ($request->has('site')) { if ($request->filled('site')) {
$site = $request->input('site'); $site = $request->input('site');
} else { } else {
$site = ""; $site = "";
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"type": "project", "type": "project",
"require": { "require": {
"php": ">=5.6.4", "php": ">=5.6.4",
"laravel/framework": "5.4.*", "laravel/framework": "5.5.*",
"predis/predis": "^1.1", "predis/predis": "^1.1",
"mcamara/laravel-localization": "^1.1", "mcamara/laravel-localization": "^1.1",
"jenssegers/agent": "^2.3", "jenssegers/agent": "^2.3",
...@@ -16,41 +16,47 @@ ...@@ -16,41 +16,47 @@
}, },
"require-dev": { "require-dev": {
"fzaninotto/faker": "~1.4", "fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*", "mockery/mockery": "~1.0",
"phpunit/phpunit": "~5.7", "phpunit/phpunit": "~6.0",
"symfony/css-selector": "3.1.*", "symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*" "symfony/dom-crawler": "3.1.*",
"filp/whoops": "~2.0"
}, },
"autoload": { "autoload": {
"classmap": [ "classmap": [
"database" "database/seeds",
"database/factories"
], ],
"psr-4": { "psr-4": {
"App\\": "app/" "App\\": "app/"
} }
}, },
"autoload-dev": { "autoload-dev": {
"classmap": [ "psr-4": {
"tests/TestCase.php" "Tests\\": "tests/"
] }
},
"extra": {
"laravel": {
"dont-discover": [
]
}
}, },
"scripts": { "scripts": {
"post-root-package-install": [ "post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\"" "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
], ],
"post-create-project-cmd": [ "post-create-project-cmd": [
"php artisan key:generate" "@php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
], ],
"post-update-cmd": [ "post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate", "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"php artisan optimize" "@php artisan package:discover"
] ]
}, },
"config": { "config": {
"preferred-install": "dist" "preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
} }
} }
This diff is collapsed.
#!/bin/bash
rm -R public/build/
gulp -production
\ No newline at end of file
const elixir = require('laravel-elixir')
require('laravel-elixir-vue-2')
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for our application, as well as publishing vendor resources.
|
*/
elixir(function (mix) {
// less
mix.less('default.less', 'public/css/themes/default.css')
mix.less('metager/beitritt.less', 'public/css/beitritt.css')
// js
mix.scripts(['lib/jquery.js', 'lib/jquery-ui.min.js', 'lib/bootstrap.js', 'lib/lightslider.js', 'lib/masonry.js', 'lib/imagesloaded.js', 'lib/openpgp.min.js', 'lib/iframeResizer.min.js', 'lib/md5.js'], 'public/js/lib.js')
mix.scripts(['scriptStartPage.js', 'result-saver.js'], 'public/js/scriptStartPage.js');
mix.scripts(['scriptResultPage.js', 'result-saver.js'], 'public/js/scriptResultPage.js');
mix.scripts(['searchbar.js', 'focus-creator.js'], 'public/js/searchbar.js');
// utility
mix.scripts(['utility.js'], 'public/js/utility.js');
mix.less('utility.less', 'public/css/utility.css');
// Versioning
mix.version(['css/themes/default.css', 'js/lib.js', 'js/utility.js', 'css/utility.css', 'js/widgets.js', 'js/editLanguage.js', 'js/scriptResultPage.js', 'js/scriptStartPage.js', 'js/settings.js', 'css/beitritt.css']);
})
{ {
"private": true, "private": true,
"scripts": { "scripts": {
"prod": "gulp --production", "dev": "npm run development",
"dev": "gulp watch" "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
}, },
"devDependencies": { "devDependencies": {
"axios": "^0.17",
"bootstrap-sass": "^3.3.7", "bootstrap-sass": "^3.3.7",
"gulp": "^3.9.1", "cross-env": "^5.1",
"gulp-clean-css": "^3.9.2", "jquery": "^3.2",
"gulp-uglify": "^2.1.2", "laravel-mix": "^2.0",
"jquery": "^3.3.1", "less": "^2.7.3",
"laravel-elixir": "^6.0.0-17", "less-loader": "^4.0.5",
"laravel-elixir-vue-2": "^0.2.0", "lodash": "^4.17.4",
"laravel-elixir-webpack-official": "^1.0.2", "vue": "^2.5.7"
"lodash": "^4.16.2",
"vue": "^2.5.13",
"vue-resource": "^1.3.5"
} }
} }
{
"/css/themes/default.css": "/css/themes/default.css?id=6098eddf62bab5891cb8",
"/css/beitritt.css": "/css/beitritt.css?id=c595bec46361326dfbf2",
"/css/utility.css": "/css/utility.css?id=85c3493ababe7e660284",
"/js/lib.js": "/js/lib.js?id=18f3b7492c527b15f2e1",
"/js/scriptStartPage.js": "/js/scriptStartPage.js?id=7c1289bf78f8169b2145",
"/js/scriptResultPage.js": "/js/scriptResultPage.js?id=c503c31a8854b5ffdd82",
"/js/searchbar.js": "/js/searchbar.js?id=4c39a2b171ae1f1ba681",
"/js/utility.js": "/js/utility.js?id=13366a4c704a4fef198b"
}
\ No newline at end of file
let mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.less('resources/assets/less/default.less', 'public/css/themes/default.css')
.less('resources/assets/less/metager/beitritt.less', 'public/css/beitritt.css')
.less('resources/assets/less/utility.less', 'public/css/utility.css')
// js
.scripts(['resources/assets/js/lib/jquery.js', 'resources/assets/js/lib/jquery-ui.min.js', 'resources/assets/js/lib/bootstrap.js', 'resources/assets/js/lib/lightslider.js',
'resources/assets/js/lib/masonry.js', 'resources/assets/js/lib/imagesloaded.js', 'resources/assets/js/lib/openpgp.min.js', 'resources/assets/js/lib/iframeResizer.min.js',
'resources/assets/js/lib/md5.js'], 'public/js/lib.js')
.scripts(['resources/assets/js/scriptStartPage.js', 'resources/assets/js/result-saver.js'], 'public/js/scriptStartPage.js')
.scripts(['resources/assets/js/scriptResultPage.js', 'resources/assets/js/result-saver.js'], 'public/js/scriptResultPage.js')
.scripts(['resources/assets/js/searchbar.js', 'resources/assets/js/focus-creator.js'], 'public/js/searchbar.js')
// utility
.scripts(['resources/assets/js/utility.js'], 'public/js/utility.js').version();
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment