summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Action/Base.php2
-rw-r--r--app/Action/TaskAssignCategoryLink.php10
-rw-r--r--app/Locale/fr_FR/translations.php3
3 files changed, 11 insertions, 4 deletions
diff --git a/app/Action/Base.php b/app/Action/Base.php
index 4d2d6da6..81e2ccc6 100644
--- a/app/Action/Base.php
+++ b/app/Action/Base.php
@@ -241,7 +241,7 @@ abstract class Base extends \Kanboard\Core\Base
}
if (DEBUG) {
- $this->container['logger']->debug(get_called_class().' => '.($result ? 'true' : 'false'));
+ $this->logger->debug(get_called_class().' => '.($result ? 'true' : 'false'));
}
return $result;
diff --git a/app/Action/TaskAssignCategoryLink.php b/app/Action/TaskAssignCategoryLink.php
index 8398facf..3d00e8d3 100644
--- a/app/Action/TaskAssignCategoryLink.php
+++ b/app/Action/TaskAssignCategoryLink.php
@@ -9,6 +9,7 @@ use Kanboard\Model\TaskLink;
*
* @package action
* @author Olivier Maridat
+ * @author Frederic Guillot
*/
class TaskAssignCategoryLink extends Base
{
@@ -35,7 +36,7 @@ class TaskAssignCategoryLink extends Base
{
return array(
'category_id' => t('Category'),
- 'link_id' => t('Link id'),
+ 'link_id' => t('Link type'),
);
}
@@ -79,6 +80,11 @@ class TaskAssignCategoryLink extends Base
*/
public function hasRequiredCondition(array $data)
{
- return $data['link_id'] == $this->getParam('link_id');
+ if ($data['link_id'] == $this->getParam('link_id')) {
+ $task = $this->taskFinder->getById($data['task_id']);
+ return empty($task['category_id']);
+ }
+
+ return false;
}
}
diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php
index 05bc5e04..2ef77f16 100644
--- a/app/Locale/fr_FR/translations.php
+++ b/app/Locale/fr_FR/translations.php
@@ -1066,6 +1066,7 @@ return array(
'Duplicates are not imported' => 'Les doublons ne sont pas importés',
'Usernames must be lowercase and unique' => 'Les noms d\'utilisateurs doivent être en minuscule et unique',
'Passwords will be encrypted if present' => 'Les mots de passe seront chiffrés si présent',
- 'Assign automatically a category based on a color' => 'Assigner automatiquement une catégorie par rapport à un lien',
'%s attached a new file to the task %s' => '%s a attaché un nouveau fichier à la tâche %s',
+ 'Link type' => 'Type de lien',
+ 'Assign automatically a category based on a link' => 'Assigner automatiquement une catégorie en fonction d\'un lien',
);