Skip to content

Commit 639d5d5

Browse files
committed
Merge branch 'master' of https://github.com/Laravel-Backpack/CRUD into fix-for-left-join-clauses
2 parents d9a748a + 8e30181 commit 639d5d5

File tree

14 files changed

+202
-112
lines changed

14 files changed

+202
-112
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ Quickly build an admin interface for your Eloquent models. Then customize every
5353

5454
But professionals don't love Backpack just because it's feature-packed. They also love it because it's ridiculously easy to overwrite a functionality. Generally, you just need to create a function with the right name or create a blade file with the right name. Yes, it can be _that_ easy. See why thousands of Laravel professionals have been using Backpack, every day, since 2016.
5555

56+
## Screenshots
57+
58+
![https://user-images.githubusercontent.com/1032474/86720524-c5a1d480-c02d-11ea-87ed-d03b0197eb25.gif](https://user-images.githubusercontent.com/1032474/86720524-c5a1d480-c02d-11ea-87ed-d03b0197eb25.gif)
59+
60+
The GIF above should give you with a good idea about what Backpack will help you build. But you can also see it in action in our [live demo](https://demo.backpackforlaravel.com/admin), to get a deeper understanding of how Backpack admin panels look & feel and the amount of features it provides.
61+
5662
## Getting started
5763

5864
Start with the ["Getting Started" series](https://backpackforlaravel.com/docs/4.0/introduction) in our docs. We try to nudge you towards creating a Backpack acccount, but you don't _need_ one, if you're just trying it out.
@@ -73,12 +79,6 @@ Installation guides:
7379
- [Install Backpack 3.x on Laravel 5.3](https://laravel-backpack.readme.io/docs/installation-on-laravel-53) - last feature update was 02 Feb 2017;
7480
- [Install Backpack 3.x on Laravel 5.2](https://laravel-backpack.readme.io/docs/installation) - deprecated, lacks a lot of features;
7581

76-
## Screenshots
77-
78-
![https://user-images.githubusercontent.com/1032474/86720524-c5a1d480-c02d-11ea-87ed-d03b0197eb25.gif](https://user-images.githubusercontent.com/1032474/86720524-c5a1d480-c02d-11ea-87ed-d03b0197eb25.gif)
79-
80-
Play around in our [live demo](https://demo.backpackforlaravel.com/admin).
81-
8282
## Change Log
8383

8484
For the current release (4.1.x) please see [the Releases tab](https://github.com/Laravel-Backpack/CRUD/releases). For previous versions (Backpack <=4.0.x), please see our old [CHANGELOG](CHANGELOG.md) file.

package-lock.json

Lines changed: 85 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"cross-env": "^7.0.0",
1414
"css-loader": "^3.6.0",
1515
"laravel-mix": "^5.0.0",
16-
"lodash": "^4.17.13",
16+
"lodash": "^4.17.19",
1717
"pace": "0.0.4",
1818
"resolve-url-loader": "^3.1.1",
19-
"sass": "^1.26.9",
19+
"sass": "^1.26.10",
2020
"sass-loader": "^8.0.2",
2121
"vue-template-compiler": "^2.6.11"
2222
},
@@ -37,7 +37,7 @@
3737
"datatables.net-fixedheader-bs4": "^3.1.6",
3838
"datatables.net-responsive": "^2.2.5",
3939
"datatables.net-responsive-bs4": "^2.2.5",
40-
"easymde": "^2.10.1",
40+
"easymde": "^2.11.0",
4141
"jquery": "^3.5.1",
4242
"jquery-colorbox": "^1.6.4",
4343
"jquery-cropper": "^1.0.1",
@@ -54,11 +54,11 @@
5454
"popper.js": "^1.16.1",
5555
"select2": "^4.0.13",
5656
"select2-bootstrap-theme": "0.1.0-beta.10",
57-
"simple-line-icons": "^2.4.1",
57+
"simple-line-icons": "^2.5.2",
5858
"simplemde": "^1.11.2",
5959
"source-sans-pro": "^3.6",
6060
"summernote": "^0.8.18",
6161
"sweetalert": "^2.1.2",
62-
"tinymce": "^5.4.0"
62+
"tinymce": "^5.4.1"
6363
}
6464
}

src/LicenseCheck.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ private function checkLicenseCodeExists()
4646
*/
4747
private function validCode($j)
4848
{
49-
$k = str_replace('-', '', $j); $s = substr($k, 0, 8); $c = substr($k, 8, 2); $a = substr($k, 10, 2); $l = substr($k, 12, 2); $p = substr($k, 14, 2); $n = substr($k, 16, 2); $m = substr($k, 18, 2); $z = substr($k, 20, 24); $w = 'ADEFHKLMVWXYZ146'; $x = $s; for ($i = 0; $i < strlen($w); $i++) { $r = $w[$i]; $x = str_replace($r, '-', $x); } $x = str_replace('-', '', $x); if ($x != '') { return false; } if (substr_count($j, '-') != 5) { return false; } $e = substr(crc32(substr($k, 0, 20)), -4); if ($z !== $e) { return false; } $o = strrev(substr(preg_replace('/[0-9]+/', '', strtoupper(sha1($a.'sand('.$s.')'.$n.'tos()'))), 2, 2)); if ($m !== $o) { return false; } return true;
49+
$k = str_replace('-', '', $j); $s = substr($k, 0, 8); $c = substr($k, 8, 2); $a = substr($k, 10, 2); $l = substr($k, 12, 2); $p = substr($k, 14, 2); $n = substr($k, 16, 2); $m = substr($k, 18, 2); $z = substr($k, 20, 24); $w = 'ADEFHKLMVWXYZ146'; $x = $s; for ($i = 0; $i < strlen($w); $i++) { $r = $w[$i]; $x = str_replace($r, '-', $x); } $x = str_replace('-', '', $x); if ($x != '') { return false; } if (substr_count($j, '-') != 5) { return false; } $e = substr(hexdec(hash('crc32b', substr($k, 0, 20))), -4); if ($z !== $e) { return false; } $o = strrev(substr(preg_replace('/[0-9]+/', '', strtoupper(sha1($a.'sand('.$s.')'.$n.'tos()'))), 2, 2)); if ($m !== $o) { return false; } $o2 = substr(((int)preg_replace('/[^0-9]/','', $s.$c)==0 ? 8310 : (int)preg_replace('/[^0-9]/','', $s.$c) )*9971, -2);if ($a !== $o2) {return false;} return true;
5050
}
5151
}

src/app/Library/CrudPanel/CrudFilter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Backpack\CRUD\app\Library\CrudPanel;
44

5+
use Closure;
56
use Illuminate\Support\Str;
67
use Symfony\Component\HttpFoundation\ParameterBag;
78

src/app/Library/CrudPanel/Traits/SaveActions.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,19 @@ public function getSaveActionDefaultForCurrentOperation()
2424
*/
2525
public function getFallBackSaveAction()
2626
{
27-
//we get the higher order in save actions array. It will return something only when explicit by developer
27+
//we get the higher order in save actions array. By default it would be `save_and_back`
2828
$higherAction = $this->getSaveActionByOrder(1);
2929

30-
if (empty($higherAction)) {
31-
if ($this->hasOperationSetting('defaultSaveAction')) {
32-
return $this->getOperationSetting('defaultSaveAction');
33-
}
30+
//if there is an higher action and that action is not the backpack default higher one `save_and_back` we return it.
31+
if (! empty($higherAction) && key($higherAction) !== 'save_and_back') {
32+
return key($higherAction);
33+
}
3434

35-
return $this->getSaveActionDefaultForCurrentOperation();
35+
if ($this->hasOperationSetting('defaultSaveAction')) {
36+
return $this->getOperationSetting('defaultSaveAction');
3637
}
3738

38-
return key($higherAction);
39+
return $this->getSaveActionDefaultForCurrentOperation();
3940
}
4041

4142
/**

src/helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function backpack_users_have_email()
5555
*/
5656
function backpack_avatar_url($user)
5757
{
58-
$firstLetter = $user->getAttribute('name') ? $user->name[0] : 'A';
58+
$firstLetter = $user->getAttribute('name') ? mb_substr($user->name, 0, 1, 'UTF-8') : 'A';
5959
$placeholder = 'https://placehold.it/160x160/00a65a/ffffff/&text='.$firstLetter;
6060

6161
switch (config('backpack.base.avatar_type')) {

src/resources/lang/de/base.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
'send_reset_link' => 'Link senden, um Passwort zurückzusetzen',
3131
'click_here_to_reset' => 'Klicken Sie hier um Ihr Passwort zurückzusetzen',
3232
'change_password' => 'Passwort ändern',
33-
'unauthorized' => 'Unberechtigt.',
33+
'unauthorized' => 'Nicht Autorisiert',
3434
'dashboard' => 'Übersicht',
3535
'handcrafted_by' => 'Handgemacht von',
3636
'powered_by' => 'Erstellt mit',
@@ -39,6 +39,7 @@
3939
'save' => 'Speichern',
4040
'cancel' => 'Abbrechen',
4141
'error' => 'Fehler',
42+
'warning' => 'Achtung',
4243
'success' => 'Erfolg',
4344
'old_password_incorrect' => 'Altes Passwort ist falsch.',
4445
'password_dont_match' => 'Passwörter stimmen nicht überein.',

src/resources/lang/lv/base.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
'registration_closed' => 'Reģistrācija aizvērta.',
12+
'no_email_column' => 'Lietotājiem nav piesaistītas e-pasta adreses.',
1213
'first_page_you_see' => 'Pirmā lapa ko redzat pēc pieslēgšanās',
1314
'login_status' => 'Pieslēgšanās statuss',
1415
'logged_in' => 'Jūs esat pieslēgušies!',
@@ -40,13 +41,17 @@
4041
'cancel' => 'Atcelt',
4142
'error' => 'Kļūda',
4243
'success' => 'Darbība veiksmīga',
44+
'warning' => 'Brīdinājums',
45+
'notice' => 'Paziņojums',
4346
'old_password_incorrect' => 'Vecā parole nav pareiza.',
4447
'password_dont_match' => 'Paroles nesakrīt.',
4548
'password_empty' => 'Pārliecinies vai abi paroļu lauki ir aizpildīti.',
4649
'password_updated' => 'Parole nomainīta.',
4750
'account_updated' => 'Konta rediģēšana veiksmīga.',
4851
'unknown_error' => 'Nezināma kļūda. Lūdzu mēģini vēlreiz.',
4952
'error_saving' => 'Kļūda saglabājot. Lūdzu mēģini vēlreiz.',
53+
'welcome' => 'Laipni lūgti!',
54+
'use_sidebar' => 'Izmantojiet sānjoslu pa kreisi, lai izveidotu, rediģētu vai izdzēstu saturu.',
5055

5156
'password_reset' => [
5257
'greeting' => 'Labdien!',

0 commit comments

Comments
 (0)