mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Renamed some methods.
This commit is contained in:
@@ -32,7 +32,7 @@ class HelpController extends Controller
|
||||
return Response::json($content);
|
||||
}
|
||||
|
||||
if ($this->_inCache($route)) {
|
||||
if ($this->inCache($route)) {
|
||||
$content = [
|
||||
'text' => Cache::get('help.' . $route . '.text'),
|
||||
'title' => Cache::get('help.' . $route . '.title'),
|
||||
@@ -40,7 +40,7 @@ class HelpController extends Controller
|
||||
|
||||
return Response::json($content);
|
||||
}
|
||||
$content = $this->_getFromGithub($route);
|
||||
$content = $this->getFromGithub($route);
|
||||
|
||||
|
||||
Cache::put('help.' . $route . '.text', $content['text'], 10080); // a week.
|
||||
@@ -55,7 +55,7 @@ class HelpController extends Controller
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function _inCache($route)
|
||||
protected function inCache($route)
|
||||
{
|
||||
return Cache::has('help.' . $route . '.title') && Cache::has('help.' . $route . '.text');
|
||||
}
|
||||
@@ -65,7 +65,7 @@ class HelpController extends Controller
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function _getFromGithub($route)
|
||||
protected function getFromGithub($route)
|
||||
{
|
||||
$uri = 'https://raw.githubusercontent.com/JC5/firefly-iii-help/master/' . e($route) . '.md';
|
||||
$content = [
|
||||
|
@@ -45,7 +45,7 @@ class ProfileController extends Controller
|
||||
|
||||
return Redirect::route('change-password');
|
||||
}
|
||||
$result = $this->_validatePassword($request->get('current_password'), $request->get('new_password'), $request->get('new_password_confirmation'));
|
||||
$result = $this->validatePassword($request->get('current_password'), $request->get('new_password'), $request->get('new_password_confirmation'));
|
||||
if (!($result === true)) {
|
||||
Session::flash('error', $result);
|
||||
|
||||
@@ -70,7 +70,7 @@ class ProfileController extends Controller
|
||||
*
|
||||
* @return string|bool
|
||||
*/
|
||||
protected function _validatePassword($old, $new1, $new2)
|
||||
protected function validatePassword($old, $new1, $new2)
|
||||
{
|
||||
if (strlen($new1) == 0 || strlen($new2) == 0) {
|
||||
return 'Do fill in a password!';
|
||||
|
Reference in New Issue
Block a user