- Upgrade to 7.x from 6.x #11
This commit is contained in:
parent
4e44d9d996
commit
bcbd05d7d8
29 changed files with 1289 additions and 647 deletions
40
app/Http/Controllers/Auth/ConfirmPasswordController.php
Normal file
40
app/Http/Controllers/Auth/ConfirmPasswordController.php
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Auth\ConfirmsPasswords;
|
||||
|
||||
class ConfirmPasswordController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Confirm Password Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password confirmations and
|
||||
| uses a simple trait to include the behavior. You're free to explore
|
||||
| this trait and override any functions that require customization.
|
||||
|
|
||||
*/
|
||||
|
||||
use ConfirmsPasswords;
|
||||
|
||||
/**
|
||||
* Where to redirect users when the intended url fails.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
}
|
|
@ -19,14 +19,4 @@ class ForgotPasswordController extends Controller
|
|||
*/
|
||||
|
||||
use SendsPasswordResetEmails;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
|
||||
class LoginController extends Controller
|
||||
|
@ -25,7 +26,7 @@ class LoginController extends Controller
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/settings';
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
|
@ -34,17 +35,6 @@ class LoginController extends Controller
|
|||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest', ['except' => 'logout']);
|
||||
$this->middleware('guest')->except('logout');
|
||||
}
|
||||
|
||||
// public function logout(Request $request)
|
||||
// {
|
||||
// $this->guard()->logout();
|
||||
|
||||
// $request->session()->flush();
|
||||
|
||||
// $request->session()->regenerate();
|
||||
|
||||
// return redirect('/');
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use App\User;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class RegisterController extends Controller
|
||||
{
|
||||
|
@ -27,7 +29,7 @@ class RegisterController extends Controller
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/';
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
|
@ -48,9 +50,9 @@ class RegisterController extends Controller
|
|||
protected function validator(array $data)
|
||||
{
|
||||
return Validator::make($data, [
|
||||
'name' => 'required|max:255',
|
||||
'email' => 'required|email|max:255|unique:users',
|
||||
'password' => 'required|min:6|confirmed',
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
|
||||
'password' => ['required', 'string', 'min:8', 'confirmed'],
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -65,7 +67,7 @@ class RegisterController extends Controller
|
|||
return User::create([
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
'password' => bcrypt($data['password']),
|
||||
'password' => Hash::make($data['password']),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
|
||||
class ResetPasswordController extends Controller
|
||||
|
@ -25,15 +26,5 @@ class ResetPasswordController extends Controller
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
}
|
||||
|
|
42
app/Http/Controllers/Auth/VerificationController.php
Normal file
42
app/Http/Controllers/Auth/VerificationController.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Auth\VerifiesEmails;
|
||||
|
||||
class VerificationController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Email Verification Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling email verification for any
|
||||
| user that recently registered with the application. Emails may also
|
||||
| be re-sent if the user didn't receive the original email message.
|
||||
|
|
||||
*/
|
||||
|
||||
use VerifiesEmails;
|
||||
|
||||
/**
|
||||
* Where to redirect users after verification.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
$this->middleware('signed')->only('verify');
|
||||
$this->middleware('throttle:6,1')->only('verify', 'resend');
|
||||
}
|
||||
}
|
|
@ -31,7 +31,10 @@ class SitelinkController extends Controller
|
|||
// }
|
||||
// }, $years);
|
||||
$this->ids = array();
|
||||
return view('frontend.sitelink.index')->with(['years' => $this->years, 'documents' => $this->ids]);
|
||||
return view(
|
||||
'frontend.sitelink.index',
|
||||
['years' => $this->years, 'documents' => $this->ids]
|
||||
);
|
||||
}
|
||||
|
||||
public function listDocs($year)
|
||||
|
@ -63,8 +66,10 @@ class SitelinkController extends Controller
|
|||
//$select->select('id');
|
||||
//$this->ids = $select->pluck('id');
|
||||
//return view('rdr.sitelink.index')->with(['years'=> $this->years,'ids'=> $this->ids]);
|
||||
return view('frontend.sitelink.index')
|
||||
->with(['years' => $this->years, 'documents' => $documents]);
|
||||
return view(
|
||||
'frontend.sitelink.index',
|
||||
['years' => $this->years, 'documents' => $documents]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ class DoiController extends Controller
|
|||
public function index(): \Illuminate\Contracts\View\View
|
||||
{
|
||||
$datasets = Dataset::query()
|
||||
->has('identifier')
|
||||
->has('identifier')
|
||||
->orderBy('server_date_modified', 'desc')
|
||||
->get();
|
||||
return View::make('workflow.doi.index', [
|
||||
|
@ -164,9 +164,9 @@ class DoiController extends Controller
|
|||
},
|
||||
])->findOrFail($id);
|
||||
|
||||
return View::make('workflow.doi.edit', [
|
||||
return View::make('workflow.doi.edit', [
|
||||
'dataset' => $dataset,
|
||||
]);
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -192,8 +192,8 @@ class DoiController extends Controller
|
|||
$datacite_environment = config('tethys.datacite_environment');
|
||||
if ($datacite_environment == "debug") {
|
||||
$prefix = config('tethys.datacite_test_prefix');
|
||||
$base_domain = config('tethys.test_base_domain');
|
||||
} elseif ($datacite_environment == "production") {
|
||||
$base_domain = config('tethys.test_base_domain');
|
||||
} elseif ($datacite_environment == "production") {
|
||||
$prefix = config('tethys.datacite_prefix');
|
||||
$base_domain = config('tethys.base_domain');
|
||||
}
|
||||
|
@ -227,8 +227,8 @@ class DoiController extends Controller
|
|||
$response = $this->doiClient->updateMetadataForDoi($doiValue, $newXmlMeta);
|
||||
// if operation successful, store dataste identifier
|
||||
if ($response->getStatusCode() == 201) {
|
||||
$doi = $dataset->identifier();
|
||||
// $doi['value'] = $doiValue;
|
||||
$doi = $dataset->identifier;
|
||||
// $doi['value'] = $doiValue;
|
||||
// $doi['type'] = "doi";
|
||||
// $doi['status'] = "findable";
|
||||
// $doi->save();
|
||||
|
|
|
@ -671,8 +671,8 @@ class EditorController extends Controller
|
|||
$datacite_environment = config('tethys.datacite_environment');
|
||||
if ($datacite_environment == "debug") {
|
||||
$prefix = config('tethys.datacite_test_prefix');
|
||||
$base_domain = config('tethys.test_base_domain');
|
||||
} elseif ($datacite_environment == "production") {
|
||||
$base_domain = config('tethys.test_base_domain');
|
||||
} elseif ($datacite_environment == "production") {
|
||||
$prefix = config('tethys.datacite_prefix');
|
||||
$base_domain = config('tethys.base_domain');
|
||||
}
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue