Renamed some methods.

This commit is contained in:
James Cole
2015-03-29 08:24:56 +02:00
parent 4c8bc49a7e
commit a7501c396f
3 changed files with 19 additions and 19 deletions

View File

@@ -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 = [

View File

@@ -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!';