Add debug option
This commit is contained in:
@@ -13,6 +13,7 @@ use Pimple\Container;
|
|||||||
* @property \Model\Acl $acl
|
* @property \Model\Acl $acl
|
||||||
* @property \Model\LastLogin $lastLogin
|
* @property \Model\LastLogin $lastLogin
|
||||||
* @property \Model\User $user
|
* @property \Model\User $user
|
||||||
|
* @property \Model\UserSession $userSession
|
||||||
*/
|
*/
|
||||||
abstract class Base
|
abstract class Base
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -100,9 +100,11 @@ abstract class Base
|
|||||||
*/
|
*/
|
||||||
public function __destruct()
|
public function __destruct()
|
||||||
{
|
{
|
||||||
// foreach ($this->container['db']->getLogMessages() as $message) {
|
if (DEBUG) {
|
||||||
// $this->container['logger']->addDebug($message);
|
foreach ($this->container['db']->getLogMessages() as $message) {
|
||||||
// }
|
$this->container['logger']->addDebug($message);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -574,7 +574,7 @@ class Project extends Base
|
|||||||
*/
|
*/
|
||||||
public function create(array $values = array(), array $errors = array())
|
public function create(array $values = array(), array $errors = array())
|
||||||
{
|
{
|
||||||
$is_private = $this->request->getIntegerParam('private', ! $this->userSession->isAdmin());
|
$is_private = $this->request->getIntegerParam('private', $this->userSession->isAdmin() ? 0 : 1);
|
||||||
|
|
||||||
$this->response->html($this->template->layout('project/new', array(
|
$this->response->html($this->template->layout('project/new', array(
|
||||||
'board_selector' => $this->projectPermission->getAllowedProjects($this->userSession->getId()),
|
'board_selector' => $this->projectPermission->getAllowedProjects($this->userSession->getId()),
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class DatabaseProvider implements ServiceProviderInterface
|
|||||||
public function register(Container $container)
|
public function register(Container $container)
|
||||||
{
|
{
|
||||||
$container['db'] = $this->getInstance();
|
$container['db'] = $this->getInstance();
|
||||||
|
$container['db']->stopwatch = DEBUG;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13,8 +13,11 @@ class LoggingProvider implements ServiceProviderInterface
|
|||||||
public function register(Container $container)
|
public function register(Container $container)
|
||||||
{
|
{
|
||||||
$logger = new Logger('app');
|
$logger = new Logger('app');
|
||||||
$logger->pushHandler(new StreamHandler(__DIR__.'/../../data/debug.log', Logger::DEBUG));
|
$logger->pushHandler(new SyslogHandler('kanboard', LOG_USER, Logger::INFO));
|
||||||
$logger->pushHandler(new SyslogHandler('kanboard', LOG_USER, Logger::DEBUG));
|
|
||||||
|
if (DEBUG) {
|
||||||
|
$logger->pushHandler(new StreamHandler(__DIR__.'/../../data/debug.log', Logger::DEBUG));
|
||||||
|
}
|
||||||
|
|
||||||
$container['logger'] = $logger;
|
$container['logger'] = $logger;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// Enable/disable debug
|
||||||
|
defined('DEBUG') or define('DEBUG', false);
|
||||||
|
|
||||||
// Application version
|
// Application version
|
||||||
defined('APP_VERSION') or define('APP_VERSION', 'master');
|
defined('APP_VERSION') or define('APP_VERSION', 'master');
|
||||||
|
|
||||||
|
|||||||
8
composer.lock
generated
8
composer.lock
generated
@@ -88,12 +88,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/fguillot/picoDb.git",
|
"url": "https://github.com/fguillot/picoDb.git",
|
||||||
"reference": "5d1d8d6e898975fc30a241614d9bf06d5728db7d"
|
"reference": "682616b9accbfd719677ed0b3f478107cea2dacc"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/fguillot/picoDb/zipball/5d1d8d6e898975fc30a241614d9bf06d5728db7d",
|
"url": "https://api.github.com/repos/fguillot/picoDb/zipball/682616b9accbfd719677ed0b3f478107cea2dacc",
|
||||||
"reference": "5d1d8d6e898975fc30a241614d9bf06d5728db7d",
|
"reference": "682616b9accbfd719677ed0b3f478107cea2dacc",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Minimalist database query builder",
|
"description": "Minimalist database query builder",
|
||||||
"homepage": "https://github.com/fguillot/picoDb",
|
"homepage": "https://github.com/fguillot/picoDb",
|
||||||
"time": "2014-12-26 17:10:34"
|
"time": "2014-12-31 17:44:58"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "fguillot/simple-validator",
|
"name": "fguillot/simple-validator",
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// Enable/Disable debug
|
||||||
|
define('DEBUG', false);
|
||||||
|
|
||||||
// E-mail address for the "From" header (notifications)
|
// E-mail address for the "From" header (notifications)
|
||||||
define('MAIL_FROM', 'notifications@kanboard.local');
|
define('MAIL_FROM', 'notifications@kanboard.local');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user