diff --git a/ChangeLog b/ChangeLog index 7b054099e..f43d97a1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ Version 1.0.20 (unreleased) --------------------------- +Breaking changes: + +- Add namespace Kanboard + New features: * Add CSV import for users and tasks diff --git a/app/Action/Base.php b/app/Action/Base.php index c8ff02a4e..4d2d6da69 100644 --- a/app/Action/Base.php +++ b/app/Action/Base.php @@ -1,8 +1,8 @@ userSession->isLogged()) { return false; } - + $column = $this->board->getColumn($data['column_id']); return (bool) $this->comment->create(array( diff --git a/app/Action/TaskMoveAnotherProject.php b/app/Action/TaskMoveAnotherProject.php index ee212998d..476e2036b 100644 --- a/app/Action/TaskMoveAnotherProject.php +++ b/app/Action/TaskMoveAnotherProject.php @@ -1,8 +1,8 @@ taskFinder->getOverdueTasks(); } - + public function getOverdueTasksByProject($project_id) { $this->checkProjectPermission($project_id); diff --git a/app/Api/TaskLink.php b/app/Api/TaskLink.php index 6b23d051e..47d70d1eb 100644 --- a/app/Api/TaskLink.php +++ b/app/Api/TaskLink.php @@ -1,6 +1,6 @@ 0); } - + if (! isset($values['append'])) { $values += array('append' => 0); } diff --git a/app/Controller/Doc.php b/app/Controller/Doc.php index f9f0a6753..282f5d151 100644 --- a/app/Controller/Doc.php +++ b/app/Controller/Doc.php @@ -1,6 +1,6 @@ helpers[$name])) { - $class = '\Helper\\'.ucfirst($name); + $class = '\Kanboard\Helper\\'.ucfirst($name); $this->helpers[$name] = new $class($this->container); } diff --git a/app/Core/HttpClient.php b/app/Core/HttpClient.php index 99534cfe9..4ec5396e2 100644 --- a/app/Core/HttpClient.php +++ b/app/Core/HttpClient.php @@ -1,6 +1,6 @@ container); Tool::buildDic($this->container, $instance->getClasses()); @@ -90,7 +90,7 @@ class Loader extends \Core\Base */ public function migrateSchema($plugin) { - $last_version = constant('\Plugin\\'.$plugin.'\Schema\VERSION'); + $last_version = constant('\Kanboard\Plugin\\'.$plugin.'\Schema\VERSION'); $current_version = $this->getSchemaVersion($plugin); try { @@ -99,7 +99,7 @@ class Loader extends \Core\Base $this->db->getDriver()->disableForeignKeys(); for ($i = $current_version + 1; $i <= $last_version; $i++) { - $function_name = '\Plugin\\'.$plugin.'\Schema\version_'.$i; + $function_name = '\Kanboard\Plugin\\'.$plugin.'\Schema\version_'.$i; if (function_exists($function_name)) { call_user_func($function_name, $this->db->getConnection()); diff --git a/app/Core/Request.php b/app/Core/Request.php index d0fcdb8e0..f553d7cdb 100644 --- a/app/Core/Request.php +++ b/app/Core/Request.php @@ -1,6 +1,6 @@ controller) : '\Plugin\\'.ucfirst($plugin).'\Controller\\'.ucfirst($this->controller); + $class = '\Kanboard\\'; + $class .= empty($plugin) ? 'Controller\\'.ucfirst($this->controller) : 'Plugin\\'.ucfirst($plugin).'\Controller\\'.ucfirst($this->controller); $instance = new $class($this->container); $instance->beforeAction($this->controller, $this->action); diff --git a/app/Core/Security.php b/app/Core/Security.php index 0bd7c9916..126de2fd9 100644 --- a/app/Core/Security.php +++ b/app/Core/Security.php @@ -1,6 +1,6 @@ $classes) { foreach ($classes as $name) { - $class = '\\'.$namespace.'\\'.$name; + $class = '\\Kanboard\\'.$namespace.'\\'.$name; $container[lcfirst($name)] = function ($c) use ($class) { return new $class($c); }; diff --git a/app/Core/Translator.php b/app/Core/Translator.php index e9aa1f3fb..7dd673633 100644 --- a/app/Core/Translator.php +++ b/app/Core/Translator.php @@ -1,6 +1,6 @@ container, $project_id, $event); } diff --git a/app/Model/Authentication.php b/app/Model/Authentication.php index 93a463f1e..acd563bce 100644 --- a/app/Model/Authentication.php +++ b/app/Model/Authentication.php @@ -1,8 +1,8 @@ container[$name])) { - $class = '\Auth\\'.ucfirst($name); + $class = '\Kanboard\Auth\\'.ucfirst($name); $this->container[$name] = new $class($this->container); } diff --git a/app/Model/Base.php b/app/Model/Base.php index 902ab2696..4c7ada7c4 100644 --- a/app/Model/Base.php +++ b/app/Model/Base.php @@ -1,6 +1,6 @@ taskFinder->getDetails($event['task_id']); $values['changes'] = isset($event['changes']) ? $event['changes'] : array(); break; - case 'Event\SubtaskEvent': + case 'Kanboard\Event\SubtaskEvent': $values['subtask'] = $this->subtask->getById($event['id'], true); $values['task'] = $this->taskFinder->getDetails($values['subtask']['task_id']); break; - case 'Event\FileEvent': + case 'Kanboard\Event\FileEvent': $values['file'] = $event->getAll(); $values['task'] = $this->taskFinder->getDetails($values['file']['task_id']); break; - case 'Event\CommentEvent': + case 'Kanboard\Event\CommentEvent': $values['comment'] = $this->comment->getById($event['id']); $values['task'] = $this->taskFinder->getDetails($values['comment']['task_id']); break; diff --git a/app/Subscriber/ProjectActivitySubscriber.php b/app/Subscriber/ProjectActivitySubscriber.php index 82b13d8e3..f8d5d1506 100644 --- a/app/Subscriber/ProjectActivitySubscriber.php +++ b/app/Subscriber/ProjectActivitySubscriber.php @@ -1,14 +1,14 @@ - + - + diff --git a/app/Template/listing/show.php b/app/Template/listing/show.php index fc8a607b8..aa17b2284 100644 --- a/app/Template/listing/show.php +++ b/app/Template/listing/show.php @@ -46,7 +46,7 @@ = dt('%B %e, %Y', $task['date_due']) ?>