mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-21 15:36:58 +00:00
Started widening of activity logging
In progress, Need to implement much of the logging in controllers. Also cleaned up base controller along the way.
This commit is contained in:
parent
712ccd23c4
commit
3f7180fa99
11 changed files with 115 additions and 60 deletions
app/Http/Controllers
|
@ -1,5 +1,6 @@
|
|||
<?php namespace BookStack\Http\Controllers;
|
||||
|
||||
use BookStack\Actions\ActivityType;
|
||||
use BookStack\Auth\User;
|
||||
use BookStack\Uploads\ImageRepo;
|
||||
use Illuminate\Http\Request;
|
||||
|
@ -47,10 +48,10 @@ class SettingController extends Controller
|
|||
|
||||
// Cycles through posted settings and update them
|
||||
foreach ($request->all() as $name => $value) {
|
||||
$key = str_replace('setting-', '', trim($name));
|
||||
if (strpos($name, 'setting-') !== 0) {
|
||||
continue;
|
||||
}
|
||||
$key = str_replace('setting-', '', trim($name));
|
||||
setting()->put($key, $value);
|
||||
}
|
||||
|
||||
|
@ -68,8 +69,10 @@ class SettingController extends Controller
|
|||
setting()->remove('app-logo');
|
||||
}
|
||||
|
||||
$section = $request->get('section', '');
|
||||
$this->logActivity(ActivityType::SETTINGS_UPDATE, $section);
|
||||
$this->showSuccessNotification(trans('settings.settings_save_success'));
|
||||
$redirectLocation = '/settings#' . $request->get('section', '');
|
||||
$redirectLocation = '/settings#' . $section;
|
||||
return redirect(rtrim($redirectLocation, '#'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue