From 9c9ed02cd7ebc5dbbc99bcaed6f80988ce8a9677 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 13 Oct 2015 22:19:17 -0400 Subject: Change namespace to add Kanboard as prefix --- app/Action/Base.php | 6 +- app/Action/CommentCreation.php | 8 +- app/Action/TaskAssignCategoryColor.php | 4 +- app/Action/TaskAssignCategoryLabel.php | 4 +- app/Action/TaskAssignColorCategory.php | 4 +- app/Action/TaskAssignColorColumn.php | 4 +- app/Action/TaskAssignColorLink.php | 4 +- app/Action/TaskAssignColorUser.php | 4 +- app/Action/TaskAssignCurrentUser.php | 4 +- app/Action/TaskAssignSpecificUser.php | 4 +- app/Action/TaskAssignUser.php | 6 +- app/Action/TaskClose.php | 10 +- app/Action/TaskCreation.php | 8 +- app/Action/TaskDuplicateAnotherProject.php | 4 +- app/Action/TaskEmail.php | 4 +- app/Action/TaskLogMoveAnotherColumn.php | 8 +- app/Action/TaskMoveAnotherProject.php | 4 +- app/Action/TaskMoveColumnAssigned.php | 4 +- app/Action/TaskMoveColumnCategoryChange.php | 4 +- app/Action/TaskMoveColumnUnAssigned.php | 4 +- app/Action/TaskOpen.php | 6 +- app/Action/TaskUpdateStartDate.php | 4 +- app/Api/Action.php | 4 +- app/Api/App.php | 4 +- app/Api/Auth.php | 2 +- app/Api/Base.php | 4 +- app/Api/Board.php | 2 +- app/Api/Category.php | 4 +- app/Api/Comment.php | 4 +- app/Api/File.php | 6 +- app/Api/Link.php | 4 +- app/Api/Me.php | 6 +- app/Api/Project.php | 2 +- app/Api/ProjectPermission.php | 4 +- app/Api/Subtask.php | 4 +- app/Api/Swimlane.php | 4 +- app/Api/Task.php | 6 +- app/Api/TaskLink.php | 4 +- app/Api/User.php | 6 +- app/Auth/Base.php | 4 +- app/Auth/Database.php | 6 +- app/Auth/Github.php | 8 +- app/Auth/Gitlab.php | 8 +- app/Auth/Google.php | 8 +- app/Auth/Ldap.php | 4 +- app/Auth/RememberMe.php | 8 +- app/Auth/ReverseProxy.php | 4 +- app/Console/Base.php | 2 +- app/Console/LocaleComparator.php | 2 +- app/Console/LocaleSync.php | 2 +- app/Console/ProjectDailyColumnStatsExport.php | 4 +- app/Console/ProjectDailyStatsCalculation.php | 4 +- app/Console/SubtaskExport.php | 4 +- app/Console/TaskExport.php | 4 +- app/Console/TaskOverdueNotification.php | 2 +- app/Console/TransitionExport.php | 4 +- app/Controller/Action.php | 2 +- app/Controller/Activity.php | 2 +- app/Controller/Analytic.php | 2 +- app/Controller/App.php | 4 +- app/Controller/Auth.php | 2 +- app/Controller/Base.php | 20 +-- app/Controller/Board.php | 2 +- app/Controller/Calendar.php | 4 +- app/Controller/Category.php | 2 +- app/Controller/Column.php | 2 +- app/Controller/Comment.php | 2 +- app/Controller/Config.php | 2 +- app/Controller/Currency.php | 2 +- app/Controller/Customfilter.php | 4 +- app/Controller/Doc.php | 2 +- app/Controller/Export.php | 2 +- app/Controller/Feed.php | 2 +- app/Controller/File.php | 4 +- app/Controller/Gantt.php | 4 +- app/Controller/Ical.php | 4 +- app/Controller/Link.php | 2 +- app/Controller/Listing.php | 4 +- app/Controller/Oauth.php | 2 +- app/Controller/Project.php | 2 +- app/Controller/Projectuser.php | 6 +- app/Controller/Search.php | 2 +- app/Controller/Subtask.php | 4 +- app/Controller/Swimlane.php | 4 +- app/Controller/Task.php | 2 +- app/Controller/TaskImport.php | 4 +- app/Controller/Taskcreation.php | 2 +- app/Controller/Taskduplication.php | 2 +- app/Controller/Tasklink.php | 2 +- app/Controller/Taskmodification.php | 2 +- app/Controller/Taskstatus.php | 2 +- app/Controller/Timer.php | 2 +- app/Controller/Twofactor.php | 2 +- app/Controller/User.php | 4 +- app/Controller/UserImport.php | 4 +- app/Controller/Webhook.php | 2 +- app/Controller/Webnotification.php | 2 +- app/Core/Base.php | 162 ++++++++++----------- app/Core/Cache/Base.php | 2 +- app/Core/Cache/CacheInterface.php | 2 +- app/Core/Cache/MemoryCache.php | 2 +- app/Core/Csv.php | 2 +- app/Core/EmailClient.php | 2 +- app/Core/Helper.php | 4 +- app/Core/HttpClient.php | 2 +- app/Core/Lexer.php | 2 +- app/Core/Markdown.php | 4 +- app/Core/NotificationInterface.php | 2 +- app/Core/OAuth2.php | 2 +- app/Core/ObjectStorage/FileStorage.php | 2 +- app/Core/ObjectStorage/ObjectStorageException.php | 2 +- app/Core/ObjectStorage/ObjectStorageInterface.php | 2 +- app/Core/Paginator.php | 2 +- app/Core/Plugin/Base.php | 4 +- app/Core/Plugin/Hook.php | 2 +- app/Core/Plugin/Loader.php | 12 +- app/Core/Request.php | 2 +- app/Core/Response.php | 2 +- app/Core/Router.php | 5 +- app/Core/Security.php | 2 +- app/Core/Session.php | 2 +- app/Core/Template.php | 2 +- app/Core/Tool.php | 4 +- app/Core/Translator.php | 2 +- app/Event/AuthEvent.php | 2 +- app/Event/CommentEvent.php | 2 +- app/Event/FileEvent.php | 2 +- app/Event/GenericEvent.php | 2 +- app/Event/SubtaskEvent.php | 2 +- app/Event/TaskEvent.php | 2 +- app/Event/TaskLinkEvent.php | 2 +- app/Formatter/FormatterInterface.php | 2 +- app/Formatter/ProjectGanttFormatter.php | 4 +- app/Formatter/TaskFilterAutoCompleteFormatter.php | 6 +- app/Formatter/TaskFilterCalendarEvent.php | 4 +- app/Formatter/TaskFilterCalendarFormatter.php | 2 +- app/Formatter/TaskFilterGanttFormatter.php | 4 +- app/Formatter/TaskFilterICalendarFormatter.php | 2 +- app/Helper/App.php | 4 +- app/Helper/Asset.php | 4 +- app/Helper/Board.php | 4 +- app/Helper/Dt.php | 4 +- app/Helper/File.php | 4 +- app/Helper/Form.php | 6 +- app/Helper/Hook.php | 4 +- app/Helper/Subtask.php | 4 +- app/Helper/Task.php | 4 +- app/Helper/Text.php | 6 +- app/Helper/Url.php | 8 +- app/Helper/User.php | 4 +- app/Integration/BitbucketWebhook.php | 8 +- app/Integration/GithubWebhook.php | 8 +- app/Integration/GitlabWebhook.php | 8 +- app/Integration/HipchatWebhook.php | 4 +- app/Integration/Jabber.php | 4 +- app/Integration/Mailgun.php | 6 +- app/Integration/Postmark.php | 4 +- app/Integration/Sendgrid.php | 6 +- app/Integration/SlackWebhook.php | 4 +- app/Integration/Smtp.php | 4 +- app/Model/Acl.php | 2 +- app/Model/Action.php | 10 +- app/Model/Authentication.php | 6 +- app/Model/Base.php | 4 +- app/Model/Board.php | 2 +- app/Model/Category.php | 2 +- app/Model/Color.php | 2 +- app/Model/Comment.php | 4 +- app/Model/Config.php | 8 +- app/Model/Currency.php | 2 +- app/Model/CustomFilter.php | 2 +- app/Model/DateParser.php | 2 +- app/Model/EmailNotification.php | 4 +- app/Model/File.php | 8 +- app/Model/LastLogin.php | 2 +- app/Model/Link.php | 2 +- app/Model/Notification.php | 4 +- app/Model/NotificationFilter.php | 2 +- app/Model/NotificationType.php | 2 +- app/Model/OverdueNotification.php | 2 +- app/Model/Project.php | 4 +- app/Model/ProjectActivity.php | 2 +- app/Model/ProjectAnalytic.php | 2 +- app/Model/ProjectDailyColumnStats.php | 2 +- app/Model/ProjectDailyStats.php | 2 +- app/Model/ProjectDuplication.php | 2 +- app/Model/ProjectIntegration.php | 2 +- app/Model/ProjectPermission.php | 2 +- app/Model/Subtask.php | 4 +- app/Model/SubtaskExport.php | 2 +- app/Model/SubtaskTimeTracking.php | 2 +- app/Model/Swimlane.php | 2 +- app/Model/Task.php | 2 +- app/Model/TaskAnalytic.php | 2 +- app/Model/TaskCreation.php | 4 +- app/Model/TaskDuplication.php | 4 +- app/Model/TaskExport.php | 2 +- app/Model/TaskFilter.php | 2 +- app/Model/TaskFinder.php | 2 +- app/Model/TaskImport.php | 4 +- app/Model/TaskLink.php | 4 +- app/Model/TaskModification.php | 4 +- app/Model/TaskPermission.php | 2 +- app/Model/TaskPosition.php | 4 +- app/Model/TaskStatus.php | 4 +- app/Model/TaskValidator.php | 2 +- app/Model/Transition.php | 2 +- app/Model/User.php | 6 +- app/Model/UserImport.php | 4 +- app/Model/UserSession.php | 4 +- app/Model/WebNotification.php | 4 +- app/Model/Webhook.php | 2 +- app/Schema/Mysql.php | 4 +- app/Schema/Postgres.php | 4 +- app/Schema/Sqlite.php | 4 +- app/ServiceProvider/ClassProvider.php | 18 +-- app/ServiceProvider/DatabaseProvider.php | 2 +- app/ServiceProvider/EventDispatcherProvider.php | 24 +-- app/ServiceProvider/LoggingProvider.php | 2 +- app/Subscriber/AuthSubscriber.php | 8 +- app/Subscriber/BootstrapSubscriber.php | 4 +- app/Subscriber/NotificationSubscriber.php | 22 +-- app/Subscriber/ProjectActivitySubscriber.php | 12 +- app/Subscriber/ProjectDailySummarySubscriber.php | 8 +- .../ProjectModificationDateSubscriber.php | 8 +- app/Subscriber/RecurringTaskSubscriber.php | 8 +- app/Subscriber/SubtaskTimeTrackingSubscriber.php | 8 +- app/Subscriber/TaskMovedDateSubscriber.php | 8 +- app/Subscriber/TransitionSubscriber.php | 8 +- app/Subscriber/WebhookSubscriber.php | 18 +-- app/Template/board/task_footer.php | 4 +- app/Template/listing/show.php | 2 +- app/Template/search/results.php | 2 +- app/Template/task/details.php | 2 +- app/Template/task/recurring_info.php | 4 +- app/Template/task_modification/edit_recurrence.php | 4 +- app/common.php | 8 +- app/constants.php | 1 - app/functions.php | 2 +- 239 files changed, 568 insertions(+), 568 deletions(-) (limited to 'app') diff --git a/app/Action/Base.php b/app/Action/Base.php index c8ff02a4..4d2d6da6 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 ee212998..476e2036 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 6b23d051..47d70d1e 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 f9f0a675..282f5d15 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 99534cfe..4ec5396e 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 d0fcdb8e..f553d7cd 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 0bd7c991..126de2fd 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 e9aa1f3f..7dd67363 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 93a463f1..acd563bc 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 902ab269..4c7ada7c 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 82b13d8e..f8d5d150 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 fc8a607b..aa17b228 100644 --- a/app/Template/listing/show.php +++ b/app/Template/listing/show.php @@ -46,7 +46,7 @@ - + diff --git a/app/Template/search/results.php b/app/Template/search/results.php index 04cb6a19..88eed87c 100644 --- a/app/Template/search/results.php +++ b/app/Template/search/results.php @@ -41,7 +41,7 @@ - + diff --git a/app/Template/task/details.php b/app/Template/task/details.php index e8fdf5cd..9cd10dda 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -86,7 +86,7 @@ - +
  • render('task/recurring_info', array( diff --git a/app/Template/task/recurring_info.php b/app/Template/task/recurring_info.php index ad64ae19..83ca0960 100644 --- a/app/Template/task/recurring_info.php +++ b/app/Template/task/recurring_info.php @@ -1,7 +1,7 @@