Skip to content

Commit

Permalink
Merge pull request #120 from Leantime/hotfixes-2.0.11
Browse files Browse the repository at this point in the history
fixed multiple reset email issue
  • Loading branch information
marcelfolaron authored Feb 24, 2020
2 parents d8dccd0 + 01d13fd commit 8a3f540
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
ob_start();
}

$application = new leantime\core\application();
$application = new leantime\core\application($login);
$application->start();

if(ob_get_length() > 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/core/class.application.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ class application
private $frontController;
private $projectService;

public function __construct()
public function __construct(login $login)
{
$this->config = new config();// Used in template
$this->settings = new settings(); //Used in templates to show app version
$this->login = new login(session::getSID());
$this->login = $login;
$this->frontController = frontcontroller::getInstance(ROOT);

}
Expand Down
4 changes: 0 additions & 4 deletions src/domain/general/controllers/class.header.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ public function run()

$tpl = new core\template();

$login = new core\login(core\session::getSID());

$tpl->assign('login', $login);

$tpl->displayPartial('general.header');
}
}
Expand Down
11 changes: 5 additions & 6 deletions src/resetPassword.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
<script type="text/javascript">
jQuery(document).ready(function(){

if(jQuery('.login-alert .alert').text() != ''){
jQuery('.login-alert').fadeIn();
if(jQuery('.login-alert .alert-error').text() != ''){
jQuery('.login-error').fadeIn();
}

if(jQuery('.login-success .alert').text() != ''){
if(jQuery('.login-alert .alert-success').text() != ''){
jQuery('.login-success').fadeIn();
}

Expand Down Expand Up @@ -82,11 +82,10 @@

<form id="resetPassword" action="" method="post">

<div class="inputwrapper login-alert">
<div class="inputwrapper login-alert login-error">
<div class="alert alert-error"><?php echo $login->error;?></div>
</div>

<div class="inputwrapper login-success">
<div class="inputwrapper login-alert login-success">
<div class="alert alert-success"><?php echo $login->success;?></div>
</div>

Expand Down

0 comments on commit 8a3f540

Please sign in to comment.