Remove useless class and add new plugin hooks

This commit is contained in:
Frederic Guillot 2015-10-18 18:13:54 -04:00
parent 2f3563714b
commit 43cffe2828
10 changed files with 14 additions and 35 deletions

View File

@ -1,34 +0,0 @@
<?php
namespace Kanboard\Auth;
use Pimple\Container;
/**
* Base auth class
*
* @package auth
* @author Frederic Guillot
*/
abstract class Base extends \Kanboard\Core\Base
{
/**
* Database instance
*
* @access protected
* @var \PicoDb\Database
*/
protected $db;
/**
* Constructor
*
* @access public
* @param \Pimple\Container $container
*/
public function __construct(Container $container)
{
$this->container = $container;
$this->db = $this->container['db'];
}
}

View File

@ -2,6 +2,7 @@
namespace Kanboard\Auth; namespace Kanboard\Auth;
use Kanboard\Core\Base;
use Kanboard\Model\User; use Kanboard\Model\User;
use Kanboard\Event\AuthEvent; use Kanboard\Event\AuthEvent;

View File

@ -2,6 +2,7 @@
namespace Kanboard\Auth; namespace Kanboard\Auth;
use Kanboard\Core\Base;
use Kanboard\Event\AuthEvent; use Kanboard\Event\AuthEvent;
/** /**
@ -85,7 +86,7 @@ class Github extends Base
* Get OAuth2 configured service * Get OAuth2 configured service
* *
* @access public * @access public
* @return KanboardCore\OAuth2 * @return Kanboard\Core\OAuth2
*/ */
public function getService() public function getService()
{ {

View File

@ -2,6 +2,7 @@
namespace Kanboard\Auth; namespace Kanboard\Auth;
use Kanboard\Core\Base;
use Kanboard\Event\AuthEvent; use Kanboard\Event\AuthEvent;
/** /**

View File

@ -2,6 +2,7 @@
namespace Kanboard\Auth; namespace Kanboard\Auth;
use Kanboard\Core\Base;
use Kanboard\Event\AuthEvent; use Kanboard\Event\AuthEvent;
/** /**

View File

@ -2,6 +2,7 @@
namespace Kanboard\Auth; namespace Kanboard\Auth;
use Kanboard\Core\Base;
use Kanboard\Event\AuthEvent; use Kanboard\Event\AuthEvent;
/** /**

View File

@ -2,6 +2,7 @@
namespace Kanboard\Auth; namespace Kanboard\Auth;
use Kanboard\Core\Base;
use Kanboard\Core\Request; use Kanboard\Core\Request;
use Kanboard\Event\AuthEvent; use Kanboard\Event\AuthEvent;
use Kanboard\Core\Security; use Kanboard\Core\Security;

View File

@ -2,6 +2,7 @@
namespace Kanboard\Auth; namespace Kanboard\Auth;
use Kanboard\Core\Base;
use Kanboard\Event\AuthEvent; use Kanboard\Event\AuthEvent;
/** /**

View File

@ -1,5 +1,7 @@
<div class="form-login"> <div class="form-login">
<?= $this->hook->render('template:auth:login-form:before') ?>
<?php if (isset($errors['login'])): ?> <?php if (isset($errors['login'])): ?>
<p class="alert alert-error"><?= $this->e($errors['login']) ?></p> <p class="alert alert-error"><?= $this->e($errors['login']) ?></p>
<?php endif ?> <?php endif ?>
@ -31,6 +33,8 @@
</form> </form>
<?php endif ?> <?php endif ?>
<?= $this->hook->render('template:auth:login-form:after') ?>
<?php if (GOOGLE_AUTH || GITHUB_AUTH || GITLAB_AUTH): ?> <?php if (GOOGLE_AUTH || GITHUB_AUTH || GITLAB_AUTH): ?>
<ul class="no-bullet"> <ul class="no-bullet">
<?php if (GOOGLE_AUTH): ?> <?php if (GOOGLE_AUTH): ?>

View File

@ -131,6 +131,8 @@ Template name without prefix are core templates.
List of template hooks: List of template hooks:
- `template:auth:login-form:before`
- `template:auth:login-form:after`
- `template:dashboard:sidebar` - `template:dashboard:sidebar`
- `template:config:sidebar` - `template:config:sidebar`
- `template:config:integrations` - `template:config:integrations`