mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 10:47:00 +00:00 
			
		
		
		
	Updated some controllers and routes to exclude not yet finished stuff.
This commit is contained in:
		
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -6,4 +6,5 @@ composer.lock | |||||||
| .env.php | .env.php | ||||||
| .DS_Store | .DS_Store | ||||||
| Thumbs.db | Thumbs.db | ||||||
| .idea/ | .idea/ | ||||||
|  | tests/_output/* | ||||||
| @@ -4,7 +4,7 @@ return [ | |||||||
|     'fetch'       => PDO::FETCH_CLASS, |     'fetch'       => PDO::FETCH_CLASS, | ||||||
|     'default'     => 'mysql', |     'default'     => 'mysql', | ||||||
|     'connections' => [ |     'connections' => [ | ||||||
|         'mysql'  => [ |         'mysql' => [ | ||||||
|             'driver'    => 'mysql', |             'driver'    => 'mysql', | ||||||
|             'host'      => 'localhost', |             'host'      => 'localhost', | ||||||
|             'database'  => 'forge', |             'database'  => 'forge', | ||||||
| @@ -14,18 +14,6 @@ return [ | |||||||
|             'collation' => 'utf8_unicode_ci', |             'collation' => 'utf8_unicode_ci', | ||||||
|             'prefix'    => '', |             'prefix'    => '', | ||||||
|         ], |         ], | ||||||
|         // previous database, if present: |  | ||||||
|         'old-firefly'  => [ |  | ||||||
|             'driver'    => 'mysql', |  | ||||||
|             'host'      => 'localhost', |  | ||||||
|             'database'  => '(previous database)', |  | ||||||
|             'username'  => '', |  | ||||||
|             'password'  => '', |  | ||||||
|             'charset'   => 'utf8', |  | ||||||
|             'collation' => 'utf8_unicode_ci', |  | ||||||
|             'prefix'    => '', |  | ||||||
|         ], |  | ||||||
|  |  | ||||||
|     ], |     ], | ||||||
|     'migrations'  => 'migrations', |     'migrations'  => 'migrations', | ||||||
|     'redis'       => [ |     'redis'       => [ | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
| return [ | return [ | ||||||
|     'driver'     => 'smtp', |     'driver'     => 'smtp', | ||||||
|     'host'       => ';', |     'host'       => '', | ||||||
|     'port'       => 587, |     'port'       => 587, | ||||||
|     'from'       => ['address' => '', 'name' => 'Firefly V'], |     'from'       => ['address' => '', 'name' => 'Firefly V'], | ||||||
|     'encryption' => 'tls', |     'encryption' => 'tls', | ||||||
|   | |||||||
| @@ -2,6 +2,7 @@ | |||||||
|  |  | ||||||
| class MigrationController extends BaseController | class MigrationController extends BaseController | ||||||
| { | { | ||||||
|  |     /* | ||||||
|     public function index() |     public function index() | ||||||
|     { |     { | ||||||
|         // check if database connection is present. |         // check if database connection is present. | ||||||
| @@ -19,7 +20,7 @@ class MigrationController extends BaseController | |||||||
|             return View::make('migrate.index')->with('error', $error); |             return View::make('migrate.index')->with('error', $error); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         return Redirect::route('migrate.select-user'); |         return Redirect::route('migrate.upload'); | ||||||
|  |  | ||||||
|  |  | ||||||
|     } |     } | ||||||
| @@ -47,7 +48,6 @@ class MigrationController extends BaseController | |||||||
|             return View::make('error')->with('message', 'No such user!'); |             return View::make('error')->with('message', 'No such user!'); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public function migrate($userID) |     public function migrate($userID) | ||||||
|     { |     { | ||||||
|         // import the data. |         // import the data. | ||||||
| @@ -424,4 +424,5 @@ class MigrationController extends BaseController | |||||||
|  |  | ||||||
|         return View::make('migrate.result')->with('messages', $messages); |         return View::make('migrate.result')->with('messages', $messages); | ||||||
|     } |     } | ||||||
|  |     */ | ||||||
| } | } | ||||||
| @@ -1,75 +0,0 @@ | |||||||
| <?php |  | ||||||
|  |  | ||||||
| class RemindersController extends Controller { |  | ||||||
|  |  | ||||||
| 	/** |  | ||||||
| 	 * Display the password reminder view. |  | ||||||
| 	 * |  | ||||||
| 	 * @return Response |  | ||||||
| 	 */ |  | ||||||
| 	public function getRemind() |  | ||||||
| 	{ |  | ||||||
| 		return View::make('password.remind'); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	/** |  | ||||||
| 	 * Handle a POST request to remind a user of their password. |  | ||||||
| 	 * |  | ||||||
| 	 * @return Response |  | ||||||
| 	 */ |  | ||||||
| 	public function postRemind() |  | ||||||
| 	{ |  | ||||||
| 		switch ($response = Password::remind(Input::only('email'))) |  | ||||||
| 		{ |  | ||||||
| 			case Password::INVALID_USER: |  | ||||||
| 				return Redirect::back()->with('error', Lang::get($response)); |  | ||||||
|  |  | ||||||
| 			case Password::REMINDER_SENT: |  | ||||||
| 				return Redirect::back()->with('status', Lang::get($response)); |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	/** |  | ||||||
| 	 * Display the password reset view for the given token. |  | ||||||
| 	 * |  | ||||||
| 	 * @param  string  $token |  | ||||||
| 	 * @return Response |  | ||||||
| 	 */ |  | ||||||
| 	public function getReset($token = null) |  | ||||||
| 	{ |  | ||||||
| 		if (is_null($token)) App::abort(404); |  | ||||||
|  |  | ||||||
| 		return View::make('password.reset')->with('token', $token); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	/** |  | ||||||
| 	 * Handle a POST request to reset a user's password. |  | ||||||
| 	 * |  | ||||||
| 	 * @return Response |  | ||||||
| 	 */ |  | ||||||
| 	public function postReset() |  | ||||||
| 	{ |  | ||||||
| 		$credentials = Input::only( |  | ||||||
| 			'email', 'password', 'password_confirmation', 'token' |  | ||||||
| 		); |  | ||||||
|  |  | ||||||
| 		$response = Password::reset($credentials, function($user, $password) |  | ||||||
| 		{ |  | ||||||
| 			$user->password = Hash::make($password); |  | ||||||
|  |  | ||||||
| 			$user->save(); |  | ||||||
| 		}); |  | ||||||
|  |  | ||||||
| 		switch ($response) |  | ||||||
| 		{ |  | ||||||
| 			case Password::INVALID_PASSWORD: |  | ||||||
| 			case Password::INVALID_TOKEN: |  | ||||||
| 			case Password::INVALID_USER: |  | ||||||
| 				return Redirect::back()->with('error', Lang::get($response)); |  | ||||||
|  |  | ||||||
| 			case Password::PASSWORD_RESET: |  | ||||||
| 				return Redirect::to('/'); |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| } |  | ||||||
| @@ -5,10 +5,10 @@ Route::get('/', ['uses' => 'HomeController@index','as' => 'index','before' => 'a | |||||||
| Route::get('/start', ['uses' => 'HomeController@start','as' => 'start','before' => 'auth']); | Route::get('/start', ['uses' => 'HomeController@start','as' => 'start','before' => 'auth']); | ||||||
|  |  | ||||||
| // migration controller: | // migration controller: | ||||||
| Route::get('/migrate/index', ['uses' => 'MigrationController@index','as' => 'migrate.index', 'before' => 'auth']); | //Route::get('/migrate/index', ['uses' => 'MigrationController@index','as' => 'migrate.index', 'before' => 'auth']); | ||||||
| Route::get('/migrate/select-user', ['uses' => 'MigrationController@selectUser','as' => 'migrate.select-user', 'before' => 'auth']); | //Route::get('/migrate/select-user', ['uses' => 'MigrationController@selectUser','as' => 'migrate.select-user', 'before' => 'auth']); | ||||||
| Route::post('/migrate/select-user', ['uses' => 'MigrationController@postSelectUser','before' => 'csrf|auth']); | //Route::post('/migrate/select-user', ['uses' => 'MigrationController@postSelectUser','before' => 'csrf|auth']); | ||||||
| Route::get('/migrate/migrate/{userID}', ['uses' => 'MigrationController@migrate','as' => 'migrate.migrate', 'before' => 'auth']); | //Route::get('/migrate/migrate/{userID}', ['uses' => 'MigrationController@migrate','as' => 'migrate.migrate', 'before' => 'auth']); | ||||||
|  |  | ||||||
| // login, register, logout: | // login, register, logout: | ||||||
| Route::get('/login',['uses' => 'UserController@login','as' => 'login','before' => 'guest']); | Route::get('/login',['uses' => 'UserController@login','as' => 'login','before' => 'guest']); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user