Merge branch 'develop'
This commit is contained in:
commit
389ba9059f
2 changed files with 19 additions and 8 deletions
|
@ -93,15 +93,19 @@ class RecryptFromMcrypt extends Command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($legacy_cipher){
|
if ($legacy_cipher){
|
||||||
$mcrypter = new McryptEncrypter($legacy_key,$legacy_cipher);
|
$mcrypter = new McryptEncrypter($legacy_key,$legacy_cipher);
|
||||||
}else{
|
}else{
|
||||||
$mcrypter = new McryptEncrypter($legacy_key);
|
$mcrypter = new McryptEncrypter($legacy_key);
|
||||||
}
|
}
|
||||||
$settings = Setting::getSettings();
|
$settings = Setting::getSettings();
|
||||||
|
|
||||||
if ($settings->ldap_password=='') {
|
if ($settings->ldap_pword=='') {
|
||||||
$this->comment('INFO: No LDAP password found. Skipping... ');
|
$this->comment('INFO: No LDAP password found. Skipping... ');
|
||||||
|
} else {
|
||||||
|
$decrypted_ldap_pword = $mcrypter->decrypt($settings->ldap_pword);
|
||||||
|
$settings->ldap_pword = \Crypt::encrypt($decrypted_ldap_pword);
|
||||||
|
$settings->save();
|
||||||
}
|
}
|
||||||
/** @var CustomField[] $custom_fields */
|
/** @var CustomField[] $custom_fields */
|
||||||
$custom_fields = CustomField::where('field_encrypted','=', 1)->get();
|
$custom_fields = CustomField::where('field_encrypted','=', 1)->get();
|
||||||
|
|
|
@ -376,7 +376,10 @@ class AssetModelsController extends Controller
|
||||||
*/
|
*/
|
||||||
public function postBulkEdit(Request $request)
|
public function postBulkEdit(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
$models_raw_array = Input::get('ids');
|
$models_raw_array = Input::get('ids');
|
||||||
|
|
||||||
|
if (is_array($models_raw_array)) {
|
||||||
$models = AssetModel::whereIn('id', $models_raw_array)->get();
|
$models = AssetModel::whereIn('id', $models_raw_array)->get();
|
||||||
$nochange = ['NC' => 'No Change'];
|
$nochange = ['NC' => 'No Change'];
|
||||||
$fieldset_list = $nochange + Helper::customFieldsetList();
|
$fieldset_list = $nochange + Helper::customFieldsetList();
|
||||||
|
@ -390,6 +393,10 @@ class AssetModelsController extends Controller
|
||||||
->with('category_list', $category_list)
|
->with('category_list', $category_list)
|
||||||
->with('fieldset_list', $fieldset_list)
|
->with('fieldset_list', $fieldset_list)
|
||||||
->with('depreciation_list', $depreciation_list);
|
->with('depreciation_list', $depreciation_list);
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->route('models.index')
|
||||||
|
->with('error', 'You must select at least one model to edit.');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue