Commit bd7f232b authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

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
} }
} }
...@@ -4,25 +4,24 @@ ...@@ -4,25 +4,24 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "2d365039b51b8b38781d3176aa2627fd", "content-hash": "27d7554c4cf4ca03f97a076d1628bd02",
"content-hash": "75e2db96a94e8c9439f5fc071e380fd6",
"packages": [ "packages": [
{ {
"name": "doctrine/inflector", "name": "doctrine/inflector",
"version": "v1.2.0", "version": "v1.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/inflector.git", "url": "https://github.com/doctrine/inflector.git",
"reference": "e11d84c6e018beedd929cff5220969a3c6d1d462" "reference": "5527a48b7313d15261292c149e55e26eae771b0a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/e11d84c6e018beedd929cff5220969a3c6d1d462", "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a",
"reference": "e11d84c6e018beedd929cff5220969a3c6d1d462", "reference": "5527a48b7313d15261292c149e55e26eae771b0a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.0" "php": "^7.1"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^6.2" "phpunit/phpunit": "^6.2"
...@@ -30,7 +29,7 @@ ...@@ -30,7 +29,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.2.x-dev" "dev-master": "1.3.x-dev"
} }
}, },
"autoload": { "autoload": {
...@@ -72,7 +71,118 @@ ...@@ -72,7 +71,118 @@
"singularize", "singularize",
"string" "string"
], ],
"time": "2017-07-22 12:18:28" "time": "2018-01-09T20:05:19+00:00"
},
{
"name": "doctrine/lexer",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/lexer.git",
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c",
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-0": {
"Doctrine\\Common\\Lexer\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
"description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"lexer",
"parser"
],
"time": "2014-09-09T13:34:57+00:00"
},
{
"name": "egulias/email-validator",
"version": "2.1.3",
"source": {
"type": "git",
"url": "https://github.com/egulias/EmailValidator.git",
"reference": "1bec00a10039b823cc94eef4eddd47dcd3b2ca04"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/1bec00a10039b823cc94eef4eddd47dcd3b2ca04",
"reference": "1bec00a10039b823cc94eef4eddd47dcd3b2ca04",
"shasum": ""
},
"require": {
"doctrine/lexer": "^1.0.1",
"php": ">= 5.5"
},
"require-dev": {
"dominicsayers/isemail": "dev-master",
"phpunit/phpunit": "^4.8.35",
"satooshi/php-coveralls": "^1.0.1"
},
"suggest": {
"ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Egulias\\EmailValidator\\": "EmailValidator"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Eduardo Gulias Davis"
}
],
"description": "A library for validating emails against several RFCs",
"homepage": "https://github.com/egulias/EmailValidator",
"keywords": [
"email",
"emailvalidation",
"emailvalidator",
"validation",
"validator"
],
"time": "2017-11-15T23:40:40+00:00"
}, },
{ {
"name": "erusev/parsedown", "name": "erusev/parsedown",
...@@ -117,7 +227,7 @@ ...@@ -117,7 +227,7 @@
"markdown", "markdown",
"parser" "parser"
], ],
"time": "2017-11-14 20:44:03" "time": "2017-11-14T20:44:03+00:00"
}, },
{ {
"name": "fideloper/proxy", "name": "fideloper/proxy",
...@@ -174,7 +284,7 @@ ...@@ -174,7 +284,7 @@
"proxy", "proxy",
"trusted proxy" "trusted proxy"
], ],
"time": "2017-06-15 17:19:42" "time": "2017-06-15T17:19:42+00:00"
}, },
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
...@@ -239,7 +349,7 @@ ...@@ -239,7 +349,7 @@
"rest", "rest",
"web service" "web service"
], ],
"time": "2017-06-22 18:50:49" "time": "2017-06-22T18:50:49+00:00"
}, },
{ {
"name": "guzzlehttp/promises", "name": "guzzlehttp/promises",
...@@ -290,7 +400,7 @@ ...@@ -290,7 +400,7 @@
"keywords": [ "keywords": [
"promise" "promise"
], ],
"time": "2016-12-20 10:07:11" "time": "2016-12-20T10:07:11+00:00"
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
...@@ -355,20 +465,20 @@ ...@@ -355,20 +465,20 @@
"uri", "uri",
"url" "url"
], ],
"time": "2017-03-20 17:10:46" "time": "2017-03-20T17:10:46+00:00"
}, },
{ {
"name": "jaybizzle/crawler-detect", "name": "jaybizzle/crawler-detect",
"version": "v1.2.54", "version": "v1.2.57",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/JayBizzle/Crawler-Detect.git", "url": "https://github.com/JayBizzle/Crawler-Detect.git",
"reference": "9af25770d9382917b680009a88497162405bbe48" "reference": "2f1502a434baad1da0fa43c3f3e2b09504fa6b81"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/9af25770d9382917b680009a88497162405bbe48", "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/2f1502a434baad1da0fa43c3f3e2b09504fa6b81",
"reference": "9af25770d9382917b680009a88497162405bbe48", "reference": "2f1502a434baad1da0fa43c3f3e2b09504fa6b81",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -404,7 +514,7 @@ ...@@ -404,7 +514,7 @@
"crawlerdetect", "crawlerdetect",
"php crawler detect" "php crawler detect"
], ],
"time": "2017-10-28 13:05:55" "time": "2018-02-03T12:01:03+00:00"
}, },
{ {
"name": "jenssegers/agent", "name": "jenssegers/agent",
...@@ -470,20 +580,20 @@ ...@@ -470,20 +580,20 @@
"user agent", "user agent",
"useragent" "useragent"
], ],
"time": "2017-11-10 10:35:35" "time": "2017-11-10T10:35:35+00:00"
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v5.4.36", "version": "v5.5.33",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "1062a22232071c3e8636487c86ec1ae75681bbf9" "reference": "ef7880e665390f999f4def7c9f78133636f973cf"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/1062a22232071c3e8636487c86ec1ae75681bbf9", "url": "https://api.github.com/repos/laravel/framework/zipball/ef7880e665390f999f4def7c9f78133636f973cf",
"reference": "1062a22232071c3e8636487c86ec1ae75681bbf9", "reference": "ef7880e665390f999f4def7c9f78133636f973cf",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -492,21 +602,22 @@ ...@@ -492,21 +602,22 @@
"ext-mbstring": "*", "ext-mbstring": "*",