mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-30 07:02:20 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
36f8311204
2
.github/workflows/tests-mysql.yml
vendored
2
.github/workflows/tests-mysql.yml
vendored
|
@ -43,7 +43,7 @@ jobs:
|
|||
id: composer-cache
|
||||
run: |
|
||||
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
|
|
2
.github/workflows/tests-sqlite.yml
vendored
2
.github/workflows/tests-sqlite.yml
vendored
|
@ -31,7 +31,7 @@ jobs:
|
|||
id: composer-cache
|
||||
run: |
|
||||
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
|
|
|
@ -88,18 +88,20 @@ class LdapSync extends Command
|
|||
/**
|
||||
* if a location ID has been specified, use that OU
|
||||
*/
|
||||
if ( $this->option('location_id') != '') {
|
||||
if ( $this->option('location_id') ) {
|
||||
|
||||
foreach($this->option('location_id') as $location_id){
|
||||
$location_ou = Location::where('id', '=', $location_id)->value('ldap_ou');
|
||||
$search_base = $location_ou;
|
||||
Log::debug('Importing users from specified location OU: \"'.$search_base.'\".');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Otherwise if a manual base DN has been specified, use that
|
||||
* if a manual base DN has been specified, use that. Allow the Base DN to override
|
||||
* even if there's a location-based DN - if you picked it, you must have picked it for a reason.
|
||||
*/
|
||||
} elseif ($this->option('base_dn') != '') {
|
||||
if ($this->option('base_dn') != '') {
|
||||
$search_base = $this->option('base_dn');
|
||||
Log::debug('Importing users from specified base DN: \"'.$search_base.'\".');
|
||||
}
|
||||
|
@ -125,14 +127,14 @@ class LdapSync extends Command
|
|||
|
||||
/* Determine which location to assign users to by default. */
|
||||
$location = null; // TODO - this would be better called "$default_location", which is more explicit about its purpose
|
||||
if ($this->option('location') != '') {
|
||||
if ($location = Location::where('name', '=', $this->option('location'))->first()) {
|
||||
Log::debug('Location name ' . $this->option('location') . ' passed');
|
||||
Log::debug('Importing to ' . $location->name . ' (' . $location->id . ')');
|
||||
}
|
||||
if ($this->option('location') != '') {
|
||||
if ($location = Location::where('name', '=', $this->option('location'))->first()) {
|
||||
Log::debug('Location name ' . $this->option('location') . ' passed');
|
||||
Log::debug('Importing to ' . $location->name . ' (' . $location->id . ')');
|
||||
}
|
||||
|
||||
} elseif ($this->option('location_id') != '') {
|
||||
foreach($this->option('location_id') as $location_id) {
|
||||
} elseif ($this->option('location_id')) {
|
||||
foreach($this->option('location_id') as $location_id) {
|
||||
if ($location = Location::where('id', '=', $location_id)->first()) {
|
||||
Log::debug('Location ID ' . $location_id . ' passed');
|
||||
Log::debug('Importing to ' . $location->name . ' (' . $location->id . ')');
|
||||
|
|
|
@ -718,10 +718,10 @@ class ReportsController extends Controller
|
|||
if ($request->filled('exclude_archived')) {
|
||||
$assets->notArchived();
|
||||
}
|
||||
if ($request->input('deleted_assets') == '1') {
|
||||
if ($request->input('deleted_assets') == 'include_deleted') {
|
||||
$assets->withTrashed();
|
||||
}
|
||||
if ($request->input('deleted_assets') == '0') {
|
||||
if ($request->input('deleted_assets') == 'only_deleted') {
|
||||
$assets->onlyTrashed();
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
return array(
|
||||
|
||||
'support_url_help' => 'Variables <code>{LOCALE}</code>, <code>{SERIAL}</code>, <code>{MODEL_NUMBER}</code>, and <code>{MODEL_NAME}</code> may be used in your URL to have those values auto-populate when viewing assets - for example https://support.apple.com/{LOCALE}/{SERIAL}.',
|
||||
'support_url_help' => 'Variables <code>{LOCALE}</code>, <code>{SERIAL}</code>, <code>{MODEL_NUMBER}</code>, and <code>{MODEL_NAME}</code> may be used in your URL to have those values auto-populate when viewing assets - for example https://checkcoverage.apple.com/{LOCALE}/{SERIAL}.',
|
||||
'does_not_exist' => 'Manufacturer does not exist.',
|
||||
'assoc_users' => 'This manufacturer is currently associated with at least one model and cannot be deleted. Please update your models to no longer reference this manufacturer and try again. ',
|
||||
|
||||
|
|
|
@ -434,15 +434,15 @@
|
|||
<div class="col-md-9 col-md-offset-3">
|
||||
|
||||
<label class="form-control">
|
||||
{{ Form::radio('deleted_assets', '', true, ['aria-label'=>'deleted_assets', 'id'=>'deleted_assets_exclude_deleted'])}}
|
||||
{{ Form::radio('deleted_assets', 'exclude_deleted', true, ['aria-label'=>'deleted_assets', 'id'=>'deleted_assets_exclude_deleted'])}}
|
||||
{{ trans('general.exclude_deleted') }}
|
||||
</label>
|
||||
<label class="form-control">
|
||||
{{ Form::radio('deleted_assets', '1', old('deleted_assets'), ['aria-label'=>'deleted_assets', 'id'=>'deleted_assets_include_deleted']) }}
|
||||
{{ Form::radio('deleted_assets', 'include_deleted', old('deleted_assets'), ['aria-label'=>'deleted_assets', 'id'=>'deleted_assets_include_deleted']) }}
|
||||
{{ trans('general.include_deleted') }}
|
||||
</label>
|
||||
<label class="form-control">
|
||||
{{ Form::radio('deleted_assets', '0', old('deleted_assets'), ['aria-label'=>'deleted_assets','id'=>'deleted_assets_only_deleted']) }}
|
||||
{{ Form::radio('deleted_assets', 'only_deleted', old('deleted_assets'), ['aria-label'=>'deleted_assets','id'=>'deleted_assets_only_deleted']) }}
|
||||
{{ trans('general.only_deleted') }}
|
||||
</label>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue