summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Controller/Base.php2
-rw-r--r--app/Core/Helper.php74
-rw-r--r--app/Core/Template.php59
-rw-r--r--app/Helper/AppHelper.php (renamed from app/Helper/App.php)8
-rw-r--r--app/Helper/AssetHelperHelper.php (renamed from app/Helper/Asset.php)6
-rw-r--r--app/Helper/BoardHelper.php (renamed from app/Helper/Board.php)4
-rw-r--r--app/Helper/DateHelper.php (renamed from app/Helper/Dt.php)3
-rw-r--r--app/Helper/FileHelper.php (renamed from app/Helper/File.php)4
-rw-r--r--app/Helper/FormHelper.php (renamed from app/Helper/Form.php)20
-rw-r--r--app/Helper/HookHelper.php (renamed from app/Helper/Hook.php)4
-rw-r--r--app/Helper/LayoutHelper.php (renamed from app/Helper/Layout.php)2
-rw-r--r--app/Helper/ModelHelper.php (renamed from app/Helper/Model.php)2
-rw-r--r--app/Helper/SubtaskHelper.php (renamed from app/Helper/Subtask.php)6
-rw-r--r--app/Helper/TaskHelper.php (renamed from app/Helper/Task.php)2
-rw-r--r--app/Helper/TextHelper.php (renamed from app/Helper/Text.php)15
-rw-r--r--app/Helper/UrlHelper.php (renamed from app/Helper/Url.php)4
-rw-r--r--app/Helper/UserHelper.php (renamed from app/Helper/User.php)6
-rw-r--r--app/ServiceProvider/ClassProvider.php2
-rw-r--r--app/ServiceProvider/HelperProvider.php34
-rw-r--r--app/Template/action/index.php2
-rw-r--r--app/Template/analytic/avg_time_columns.php2
-rw-r--r--app/Template/analytic/compare_hours.php12
-rw-r--r--app/Template/analytic/tasks.php2
-rw-r--r--app/Template/analytic/users.php2
-rw-r--r--app/Template/app/projects.php6
-rw-r--r--app/Template/app/sidebar.php2
-rw-r--r--app/Template/app/subtasks.php8
-rw-r--r--app/Template/app/tasks.php8
-rw-r--r--app/Template/auth/index.php2
-rw-r--r--app/Template/board/table_column.php8
-rw-r--r--app/Template/board/table_swimlane.php2
-rw-r--r--app/Template/board/table_tasks.php2
-rw-r--r--app/Template/board/task_footer.php8
-rw-r--r--app/Template/board/task_private.php10
-rw-r--r--app/Template/board/task_public.php2
-rw-r--r--app/Template/board/tooltip_comments.php2
-rw-r--r--app/Template/board/tooltip_external_links.php4
-rw-r--r--app/Template/board/tooltip_files.php2
-rw-r--r--app/Template/board/tooltip_subtasks.php2
-rw-r--r--app/Template/board/tooltip_tasklinks.php4
-rw-r--r--app/Template/category/index.php2
-rw-r--r--app/Template/column/index.php6
-rw-r--r--app/Template/comment/show.php2
-rw-r--r--app/Template/config/about.php2
-rw-r--r--app/Template/config/api.php2
-rw-r--r--app/Template/config/plugins.php10
-rw-r--r--app/Template/config/webhook.php2
-rw-r--r--app/Template/currency/index.php2
-rw-r--r--app/Template/custom_filter/index.php6
-rw-r--r--app/Template/event/comment_create.php4
-rw-r--r--app/Template/event/comment_update.php4
-rw-r--r--app/Template/event/subtask_create.php6
-rw-r--r--app/Template/event/subtask_update.php6
-rw-r--r--app/Template/event/task_assignee_change.php8
-rw-r--r--app/Template/event/task_close.php4
-rw-r--r--app/Template/event/task_create.php4
-rw-r--r--app/Template/event/task_file_create.php4
-rw-r--r--app/Template/event/task_move_column.php6
-rw-r--r--app/Template/event/task_move_position.php6
-rw-r--r--app/Template/event/task_move_swimlane.php8
-rw-r--r--app/Template/event/task_open.php4
-rw-r--r--app/Template/event/task_update.php4
-rw-r--r--app/Template/feed/project.php2
-rw-r--r--app/Template/feed/user.php2
-rw-r--r--app/Template/file_viewer/show.php4
-rw-r--r--app/Template/group/index.php4
-rw-r--r--app/Template/group/users.php6
-rw-r--r--app/Template/header.php8
-rw-r--r--app/Template/layout.php2
-rw-r--r--app/Template/listing/show.php10
-rw-r--r--app/Template/notification/comment_create.php2
-rw-r--r--app/Template/notification/comment_update.php2
-rw-r--r--app/Template/notification/comment_user_mention.php2
-rw-r--r--app/Template/notification/subtask_create.php10
-rw-r--r--app/Template/notification/subtask_update.php12
-rw-r--r--app/Template/notification/task_assignee_change.php2
-rw-r--r--app/Template/notification/task_close.php2
-rw-r--r--app/Template/notification/task_create.php8
-rw-r--r--app/Template/notification/task_file_create.php2
-rw-r--r--app/Template/notification/task_move_column.php6
-rw-r--r--app/Template/notification/task_move_position.php6
-rw-r--r--app/Template/notification/task_move_swimlane.php8
-rw-r--r--app/Template/notification/task_open.php2
-rw-r--r--app/Template/notification/task_overdue.php4
-rw-r--r--app/Template/notification/task_update.php2
-rw-r--r--app/Template/notification/task_user_mention.php2
-rw-r--r--app/Template/project/index.php8
-rw-r--r--app/Template/project/show.php6
-rw-r--r--app/Template/project_file/remove.php2
-rw-r--r--app/Template/project_header/search.php6
-rw-r--r--app/Template/project_overview/columns.php2
-rw-r--r--app/Template/project_overview/description.php2
-rw-r--r--app/Template/project_overview/files.php8
-rw-r--r--app/Template/project_overview/information.php2
-rw-r--r--app/Template/project_permission/index.php4
-rw-r--r--app/Template/project_user/layout.php2
-rw-r--r--app/Template/project_user/roles.php6
-rw-r--r--app/Template/project_user/tasks.php10
-rw-r--r--app/Template/project_user/tooltip_users.php2
-rw-r--r--app/Template/search/results.php14
-rw-r--r--app/Template/subtask/remove.php2
-rw-r--r--app/Template/subtask/table.php6
-rw-r--r--app/Template/swimlane/table.php6
-rw-r--r--app/Template/task/analytics.php2
-rw-r--r--app/Template/task/color_picker.php2
-rw-r--r--app/Template/task/details.php16
-rw-r--r--app/Template/task/remove.php2
-rw-r--r--app/Template/task/time_tracking_details.php2
-rw-r--r--app/Template/task/time_tracking_summary.php6
-rw-r--r--app/Template/task/transitions.php6
-rw-r--r--app/Template/task_external_link/show.php6
-rw-r--r--app/Template/task_file/remove.php2
-rw-r--r--app/Template/task_file/show.php8
-rw-r--r--app/Template/task_recurrence/info.php8
-rw-r--r--app/Template/tasklink/show.php16
-rw-r--r--app/Template/twofactor/index.php2
-rw-r--r--app/Template/twofactor/show.php4
-rw-r--r--app/Template/user/index.php6
-rw-r--r--app/Template/user/last.php6
-rw-r--r--app/Template/user/password_reset.php4
-rw-r--r--app/Template/user/profile.php6
-rw-r--r--app/Template/user/sessions.php4
-rw-r--r--app/Template/user/show.php6
-rw-r--r--app/Template/user/timesheet.php4
-rw-r--r--app/common.php1
125 files changed, 411 insertions, 357 deletions
diff --git a/app/Controller/Base.php b/app/Controller/Base.php
index 884c439c..2453be18 100644
--- a/app/Controller/Base.php
+++ b/app/Controller/Base.php
@@ -331,7 +331,7 @@ abstract class Base extends \Kanboard\Core\Base
protected function getProjectDescription(array &$project)
{
if ($project['owner_id'] > 0) {
- $description = t('Project owner: ').'**'.$this->template->e($project['owner_name'] ?: $project['owner_username']).'**'.PHP_EOL.PHP_EOL;
+ $description = t('Project owner: ').'**'.$this->helper->text->e($project['owner_name'] ?: $project['owner_username']).'**'.PHP_EOL.PHP_EOL;
if (! empty($project['description'])) {
$description .= '***'.PHP_EOL.PHP_EOL;
diff --git a/app/Core/Helper.php b/app/Core/Helper.php
index 759209f6..3764a67c 100644
--- a/app/Core/Helper.php
+++ b/app/Core/Helper.php
@@ -10,18 +10,18 @@ use Pimple\Container;
* @package core
* @author Frederic Guillot
*
- * @property \Kanboard\Helper\App $app
- * @property \Kanboard\Helper\Asset $asset
- * @property \Kanboard\Helper\Dt $dt
- * @property \Kanboard\Helper\File $file
- * @property \Kanboard\Helper\Form $form
- * @property \Kanboard\Helper\Subtask $subtask
- * @property \Kanboard\Helper\Task $task
- * @property \Kanboard\Helper\Text $text
- * @property \Kanboard\Helper\Url $url
- * @property \Kanboard\Helper\User $user
- * @property \Kanboard\Helper\Layout $layout
- * @property \Kanboard\Helper\Model $model
+ * @property \Kanboard\Helper\AppHelper $app
+ * @property \Kanboard\Helper\AssetHelper $asset
+ * @property \Kanboard\Helper\DateHelper $dt
+ * @property \Kanboard\Helper\FileHelper $file
+ * @property \Kanboard\Helper\FormHelper $form
+ * @property \Kanboard\Helper\ModelHelper $model
+ * @property \Kanboard\Helper\SubtaskHelper $subtask
+ * @property \Kanboard\Helper\TaskHelper $task
+ * @property \Kanboard\Helper\TextHelper $text
+ * @property \Kanboard\Helper\UrlHelper $url
+ * @property \Kanboard\Helper\UserHelper $user
+ * @property \Kanboard\Helper\LayoutHelper $layout
*/
class Helper
{
@@ -29,17 +29,17 @@ class Helper
* Helper instances
*
* @access private
- * @var array
+ * @var \Pimple\Container
*/
- private $helpers = array();
+ private $helpers;
/**
* Container instance
*
- * @access protected
+ * @access private
* @var \Pimple\Container
*/
- protected $container;
+ private $container;
/**
* Constructor
@@ -50,33 +50,49 @@ class Helper
public function __construct(Container $container)
{
$this->container = $container;
+ $this->helpers = new Container;
}
/**
- * Load automatically helpers
+ * Expose helpers with magic getter
*
* @access public
- * @param string $name Helper name
+ * @param string $helper
* @return mixed
*/
- public function __get($name)
+ public function __get($helper)
{
- if (! isset($this->helpers[$name])) {
- $class = '\Kanboard\Helper\\'.ucfirst($name);
- $this->helpers[$name] = new $class($this->container);
- }
+ return $this->getHelper($helper);
+ }
- return $this->helpers[$name];
+ /**
+ * Expose helpers with method
+ *
+ * @access public
+ * @param string $helper
+ * @return mixed
+ */
+ public function getHelper($helper)
+ {
+ return $this->helpers[$helper];
}
/**
- * HTML escaping
+ * Register a new Helper
*
- * @param string $value Value to escape
- * @return string
+ * @access public
+ * @param string $property
+ * @param string $className
+ * @return Helper
*/
- public function e($value)
+ public function register($property, $className)
{
- return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);
+ $container = $this->container;
+
+ $this->helpers[$property] = function() use($className, $container) {
+ return new $className($container);
+ };
+
+ return $this;
}
}
diff --git a/app/Core/Template.php b/app/Core/Template.php
index 8ded6f7c..fa7b65ec 100644
--- a/app/Core/Template.php
+++ b/app/Core/Template.php
@@ -3,63 +3,50 @@
namespace Kanboard\Core;
/**
- * Template class
+ * Template
*
* @package core
* @author Frederic Guillot
*/
-class Template extends Helper
+class Template
{
/**
- * List of template overrides
+ * Helper object
*
* @access private
- * @var array
+ * @var Helper
*/
- private $overrides = array();
+ private $helper;
/**
- * Rendering start time
- *
- * @access private
- * @var float
- */
- private $startTime = 0;
-
- /**
- * Total rendering time
+ * List of template overrides
*
* @access private
- * @var float
+ * @var array
*/
- private $renderingTime = 0;
+ private $overrides = array();
/**
- * Method executed before the rendering
+ * Template constructor
*
- * @access protected
- * @param string $template
+ * @access public
+ * @param Helper $helper
*/
- protected function beforeRender($template)
+ public function __construct(Helper $helper)
{
- if (DEBUG) {
- $this->startTime = microtime(true);
- }
+ $this->helper = $helper;
}
/**
- * Method executed after the rendering
+ * Expose helpers with magic getter
*
- * @access protected
- * @param string $template
+ * @access public
+ * @param string $helper
+ * @return mixed
*/
- protected function afterRender($template)
+ public function __get($helper)
{
- if (DEBUG) {
- $duration = microtime(true) - $this->startTime;
- $this->renderingTime += $duration;
- $this->container['logger']->debug('Rendering '.$template.' in '.$duration.'s, total='.$this->renderingTime);
- }
+ return $this->helper->getHelper($helper);
}
/**
@@ -76,16 +63,10 @@ class Template extends Helper
*/
public function render($__template_name, array $__template_args = array())
{
- $this->beforeRender($__template_name);
-
extract($__template_args);
ob_start();
include $this->getTemplateFile($__template_name);
- $html = ob_get_clean();
-
- $this->afterRender($__template_name);
-
- return $html;
+ return ob_get_clean();
}
/**
diff --git a/app/Helper/App.php b/app/Helper/AppHelper.php
index 79afa5b9..e6f6412d 100644
--- a/app/Helper/App.php
+++ b/app/Helper/AppHelper.php
@@ -5,12 +5,12 @@ namespace Kanboard\Helper;
use Kanboard\Core\Base;
/**
- * Application helpers
+ * Application Helper
*
* @package helper
* @author Frederic Guillot
*/
-class App extends Base
+class AppHelper extends Base
{
/**
* Get config variable
@@ -116,11 +116,11 @@ class App extends Base
$failure_message = $this->flash->getMessage('failure');
if (! empty($success_message)) {
- return '<div class="alert alert-success alert-fade-out">'.$this->helper->e($success_message).'</div>';
+ return '<div class="alert alert-success alert-fade-out">'.$this->helper->text->e($success_message).'</div>';
}
if (! empty($failure_message)) {
- return '<div class="alert alert-error">'.$this->helper->e($failure_message).'</div>';
+ return '<div class="alert alert-error">'.$this->helper->text->e($failure_message).'</div>';
}
return '';
diff --git a/app/Helper/Asset.php b/app/Helper/AssetHelperHelper.php
index c4178e8c..7040a40a 100644
--- a/app/Helper/Asset.php
+++ b/app/Helper/AssetHelperHelper.php
@@ -2,13 +2,15 @@
namespace Kanboard\Helper;
+use Kanboard\Core\Base;
+
/**
- * Assets helpers
+ * Asset Helper
*
* @package helper
* @author Frederic Guillot
*/
-class Asset extends \Kanboard\Core\Base
+class AssetHelper extends Base
{
/**
* Add a Javascript asset
diff --git a/app/Helper/Board.php b/app/Helper/BoardHelper.php
index 430d1858..a86a6c18 100644
--- a/app/Helper/Board.php
+++ b/app/Helper/BoardHelper.php
@@ -2,13 +2,15 @@
namespace Kanboard\Helper;
+use Kanboard\Core\Base;
+
/**
* Board Helper
*
* @package helper
* @author Frederic Guillot
*/
-class Board extends \Kanboard\Core\Base
+class BoardHelper extends Base
{
/**
* Return true if tasks are collapsed
diff --git a/app/Helper/Dt.php b/app/Helper/DateHelper.php
index eb3f93b3..3844ce64 100644
--- a/app/Helper/Dt.php
+++ b/app/Helper/DateHelper.php
@@ -3,6 +3,7 @@
namespace Kanboard\Helper;
use DateTime;
+use Kanboard\Core\Base;
/**
* DateTime helpers
@@ -10,7 +11,7 @@ use DateTime;
* @package helper
* @author Frederic Guillot
*/
-class Dt extends \Kanboard\Core\Base
+class DateHelper extends Base
{
/**
* Get formatted time
diff --git a/app/Helper/File.php b/app/Helper/FileHelper.php
index b493e64f..cabf371c 100644
--- a/app/Helper/File.php
+++ b/app/Helper/FileHelper.php
@@ -2,13 +2,15 @@
namespace Kanboard\Helper;
+use Kanboard\Core\Base;
+
/**
* File helpers
*
* @package helper
* @author Frederic Guillot
*/
-class File extends \Kanboard\Core\Base
+class FileHelper extends Base
{
/**
* Get file icon
diff --git a/app/Helper/Form.php b/app/Helper/FormHelper.php
index bfd75ee3..161fd54c 100644
--- a/app/Helper/Form.php
+++ b/app/Helper/FormHelper.php
@@ -10,7 +10,7 @@ use Kanboard\Core\Base;
* @package helper
* @author Frederic Guillot
*/
-class Form extends Base
+class FormHelper extends Base
{
/**
* Hidden CSRF token field
@@ -52,7 +52,7 @@ class Form extends Base
$html = '<select name="'.$name.'" id="form-'.$name.'" class="'.$class.'" '.implode(' ', $attributes).'>';
foreach ($options as $id => $value) {
- $html .= '<option value="'.$this->helper->e($id).'"';
+ $html .= '<option value="'.$this->helper->text->e($id).'"';
if (isset($values->$name) && $id == $values->$name) {
$html .= ' selected="selected"';
@@ -61,7 +61,7 @@ class Form extends Base
$html .= ' selected="selected"';
}
- $html .= '>'.$this->helper->e($value).'</option>';
+ $html .= '>'.$this->helper->text->e($value).'</option>';
}
$html .= '</select>';
@@ -103,7 +103,7 @@ class Form extends Base
*/
public function radio($name, $label, $value, $selected = false, $class = '')
{
- return '<label><input type="radio" name="'.$name.'" class="'.$class.'" value="'.$this->helper->e($value).'" '.($selected ? 'checked="checked"' : '').'> '.$this->helper->e($label).'</label>';
+ return '<label><input type="radio" name="'.$name.'" class="'.$class.'" value="'.$this->helper->text->e($value).'" '.($selected ? 'checked="checked"' : '').'> '.$this->helper->text->e($label).'</label>';
}
/**
@@ -139,7 +139,7 @@ class Form extends Base
*/
public function checkbox($name, $label, $value, $checked = false, $class = '')
{
- return '<label><input type="checkbox" name="'.$name.'" class="'.$class.'" value="'.$this->helper->e($value).'" '.($checked ? 'checked="checked"' : '').'>&nbsp;'.$this->helper->e($label).'</label>';
+ return '<label><input type="checkbox" name="'.$name.'" class="'.$class.'" value="'.$this->helper->text->e($value).'" '.($checked ? 'checked="checked"' : '').'>&nbsp;'.$this->helper->text->e($label).'</label>';
}
/**
@@ -153,7 +153,7 @@ class Form extends Base
*/
public function label($label, $name, array $attributes = array())
{
- return '<label for="form-'.$name.'" '.implode(' ', $attributes).'>'.$this->helper->e($label).'</label>';
+ return '<label for="form-'.$name.'" '.implode(' ', $attributes).'>'.$this->helper->text->e($label).'</label>';
}
/**
@@ -173,7 +173,7 @@ class Form extends Base
$html = '<textarea name="'.$name.'" id="form-'.$name.'" class="'.$class.'" ';
$html .= implode(' ', $attributes).'>';
- $html .= isset($values->$name) ? $this->helper->e($values->$name) : isset($values[$name]) ? $values[$name] : '';
+ $html .= isset($values->$name) ? $this->helper->text->e($values->$name) : isset($values[$name]) ? $values[$name] : '';
$html .= '</textarea>';
$html .= $this->errorList($errors, $name);
@@ -334,7 +334,7 @@ class Form extends Base
$html .= '<ul class="form-errors">';
foreach ($errors[$name] as $error) {
- $html .= '<li>'.$this->helper->e($error).'</li>';
+ $html .= '<li>'.$this->helper->text->e($error).'</li>';
}
$html .= '</ul>';
@@ -354,9 +354,9 @@ class Form extends Base
private function formValue($values, $name)
{
if (isset($values->$name)) {
- return 'value="'.$this->helper->e($values->$name).'"';
+ return 'value="'.$this->helper->text->e($values->$name).'"';
}
- return isset($values[$name]) ? 'value="'.$this->helper->e($values[$name]).'"' : '';
+ return isset($values[$name]) ? 'value="'.$this->helper->text->e($values[$name]).'"' : '';
}
}
diff --git a/app/Helper/Hook.php b/app/Helper/HookHelper.php
index 7b691949..e8abc875 100644
--- a/app/Helper/Hook.php
+++ b/app/Helper/HookHelper.php
@@ -2,13 +2,15 @@
namespace Kanboard\Helper;
+use Kanboard\Core\Base;
+
/**
* Template Hook helpers
*
* @package helper
* @author Frederic Guillot
*/
-class Hook extends \Kanboard\Core\Base
+class HookHelper extends Base
{
/**
* Add assets JS or CSS
diff --git a/app/Helper/Layout.php b/app/Helper/LayoutHelper.php
index 3db23920..064c11ac 100644
--- a/app/Helper/Layout.php
+++ b/app/Helper/LayoutHelper.php
@@ -10,7 +10,7 @@ use Kanboard\Core\Base;
* @package helper
* @author Frederic Guillot
*/
-class Layout extends Base
+class LayoutHelper extends Base
{
/**
* Render a template without the layout if Ajax request
diff --git a/app/Helper/Model.php b/app/Helper/ModelHelper.php
index 68a52542..d49637c8 100644
--- a/app/Helper/Model.php
+++ b/app/Helper/ModelHelper.php
@@ -10,7 +10,7 @@ use Kanboard\Core\Base;
* @package helper
* @author Frederic Guillot
*/
-class Model extends Base
+class ModelHelper extends Base
{
/**
* Remove keys from an array
diff --git a/app/Helper/Subtask.php b/app/Helper/SubtaskHelper.php
index 1784a2bf..afa3c14e 100644
--- a/app/Helper/Subtask.php
+++ b/app/Helper/SubtaskHelper.php
@@ -2,13 +2,15 @@
namespace Kanboard\Helper;
+use Kanboard\Core\Base;
+
/**
* Subtask helpers
*
* @package helper
* @author Frederic Guillot
*/
-class Subtask extends \Kanboard\Core\Base
+class SubtaskHelper extends Base
{
public function getTitle(array $subtask)
{
@@ -20,7 +22,7 @@ class Subtask extends \Kanboard\Core\Base
$html = '<i class="fa fa-check-square-o fa-fw"></i>';
}
- return $html.$this->helper->e($subtask['title']);
+ return $html.$this->helper->text->e($subtask['title']);
}
/**
diff --git a/app/Helper/Task.php b/app/Helper/TaskHelper.php
index 6058c099..4857d0ee 100644
--- a/app/Helper/Task.php
+++ b/app/Helper/TaskHelper.php
@@ -10,7 +10,7 @@ use Kanboard\Core\Base;
* @package helper
* @author Frederic Guillot
*/
-class Task extends Base
+class TaskHelper extends Base
{
/**
* Local cache for project columns
diff --git a/app/Helper/Text.php b/app/Helper/TextHelper.php
index 83f1e3f9..e5aefdcf 100644
--- a/app/Helper/Text.php
+++ b/app/Helper/TextHelper.php
@@ -11,9 +11,20 @@ use Kanboard\Core\Base;
* @package helper
* @author Frederic Guillot
*/
-class Text extends Base
+class TextHelper extends Base
{
/**
+ * HTML escaping
+ *
+ * @param string $value Value to escape
+ * @return string
+ */
+ public function e($value)
+ {
+ return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);
+ }
+
+ /**
* Markdown transformation
*
* @param string $text Markdown content
@@ -88,7 +99,7 @@ class Text extends Base
public function in($id, array $listing, $default_value = '?')
{
if (isset($listing[$id])) {
- return $this->helper->e($listing[$id]);
+ return $this->helper->text->e($listing[$id]);
}
return $default_value;
diff --git a/app/Helper/Url.php b/app/Helper/UrlHelper.php
index 7de8a571..96c6735a 100644
--- a/app/Helper/Url.php
+++ b/app/Helper/UrlHelper.php
@@ -5,12 +5,12 @@ namespace Kanboard\Helper;
use Kanboard\Core\Base;
/**
- * Url helpers
+ * Url Helper
*
* @package helper
* @author Frederic Guillot
*/
-class Url extends Base
+class UrlHelper extends Base
{
private $base = '';
private $directory = '';
diff --git a/app/Helper/User.php b/app/Helper/UserHelper.php
index 29844dfb..cbdb4af8 100644
--- a/app/Helper/User.php
+++ b/app/Helper/UserHelper.php
@@ -2,13 +2,15 @@
namespace Kanboard\Helper;
+use Kanboard\Core\Base;
+
/**
* User helpers
*
* @package helper
* @author Frederic Guillot
*/
-class User extends \Kanboard\Core\Base
+class UserHelper extends Base
{
/**
* Return true if the logged user as unread notifications
@@ -168,7 +170,7 @@ class User extends \Kanboard\Core\Base
public function avatar($email, $alt = '')
{
if (! empty($email) && $this->config->get('integration_gravatar') == 1) {
- return '<img class="avatar" src="https://www.gravatar.com/avatar/'.md5(strtolower($email)).'?s=25" alt="'.$this->helper->e($alt).'" title="'.$this->helper->e($alt).'">';
+ return '<img class="avatar" src="https://www.gravatar.com/avatar/'.md5(strtolower($email)).'?s=25" alt="'.$this->helper->text->e($alt).'" title="'.$this->helper->text->e($alt).'">';
}
return '';
diff --git a/app/ServiceProvider/ClassProvider.php b/app/ServiceProvider/ClassProvider.php
index f939a9b5..b883c905 100644
--- a/app/ServiceProvider/ClassProvider.php
+++ b/app/ServiceProvider/ClassProvider.php
@@ -117,9 +117,7 @@ class ClassProvider implements ServiceProviderInterface
),
'Core' => array(
'DateParser',
- 'Helper',
'Lexer',
- 'Template',
),
'Core\Event' => array(
'EventManager',
diff --git a/app/ServiceProvider/HelperProvider.php b/app/ServiceProvider/HelperProvider.php
new file mode 100644
index 00000000..42a0c85e
--- /dev/null
+++ b/app/ServiceProvider/HelperProvider.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Kanboard\ServiceProvider;
+
+use Kanboard\Core\Helper;
+use Kanboard\Core\Template;
+use Pimple\Container;
+use Pimple\ServiceProviderInterface;
+
+class HelperProvider implements ServiceProviderInterface
+{
+ public function register(Container $container)
+ {
+ $container['helper'] = new Helper($container);
+ $container['helper']->register('app', '\Kanboard\Helper\AppHelper');
+ $container['helper']->register('asset', '\Kanboard\Helper\AssetHelper');
+ $container['helper']->register('board', '\Kanboard\Helper\BoardHelper');
+ $container['helper']->register('dt', '\Kanboard\Helper\DateHelper');
+ $container['helper']->register('file', '\Kanboard\Helper\FileHelper');
+ $container['helper']->register('form', '\Kanboard\Helper\FormHelper');
+ $container['helper']->register('hook', '\Kanboard\Helper\HookHelper');
+ $container['helper']->register('layout', '\Kanboard\Helper\LayoutHelper');
+ $container['helper']->register('model', '\Kanboard\Helper\ModelHelper');
+ $container['helper']->register('subtask', '\Kanboard\Helper\SubtaskHelper');
+ $container['helper']->register('task', '\Kanboard\Helper\TaskHelper');
+ $container['helper']->register('text', '\Kanboard\Helper\TextHelper');
+ $container['helper']->register('url', '\Kanboard\Helper\UrlHelper');
+ $container['helper']->register('user', '\Kanboard\Helper\UserHelper');
+
+ $container['template'] = new Template($container['helper']);
+
+ return $container;
+ }
+}
diff --git a/app/Template/action/index.php b/app/Template/action/index.php
index 66cfed77..f3165251 100644
--- a/app/Template/action/index.php
+++ b/app/Template/action/index.php
@@ -45,7 +45,7 @@
<?php elseif ($this->text->contains($param_name, 'link_id')): ?>
<?= $this->text->in($param_value, $links_list) ?>
<?php else: ?>
- <?= $this->e($param_value) ?>
+ <?= $this->text->e($param_value) ?>
<?php endif ?>
</strong>
</li>
diff --git a/app/Template/analytic/avg_time_columns.php b/app/Template/analytic/avg_time_columns.php
index 7b9d7cf9..5f6c6b35 100644
--- a/app/Template/analytic/avg_time_columns.php
+++ b/app/Template/analytic/avg_time_columns.php
@@ -16,7 +16,7 @@
</tr>
<?php foreach ($metrics as $column): ?>
<tr>
- <td><?= $this->e($column['title']) ?></td>
+ <td><?= $this->text->e($column['title']) ?></td>
<td><?= $this->dt->duration($column['average']) ?></td>
</tr>
<?php endforeach ?>
diff --git a/app/Template/analytic/compare_hours.php b/app/Template/analytic/compare_hours.php
index bb145d61..8249e7ba 100644
--- a/app/Template/analytic/compare_hours.php
+++ b/app/Template/analytic/compare_hours.php
@@ -4,8 +4,8 @@
<div class="listing">
<ul>
- <li><?= t('Estimated hours: ').'<strong>'.$this->e($metrics['open']['time_estimated'] + $metrics['closed']['time_estimated']) ?></strong></li>
- <li><?= t('Actual hours: ').'<strong>'.$this->e($metrics['open']['time_spent'] + $metrics['closed']['time_spent']) ?></strong></li>
+ <li><?= t('Estimated hours: ').'<strong>'.$this->text->e($metrics['open']['time_estimated'] + $metrics['closed']['time_estimated']) ?></strong></li>
+ <li><?= t('Actual hours: ').'<strong>'.$this->text->e($metrics['open']['time_spent'] + $metrics['closed']['time_spent']) ?></strong></li>
</ul>
</div>
@@ -34,10 +34,10 @@
<?php foreach ($paginator->getCollection() as $task): ?>
<tr>
<td class="task-table color-<?= $task['color_id'] ?>">
- <?= $this->url->link('#'.$this->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
+ <?= $this->url->link('#'.$this->text->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
</td>
<td>
- <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
+ <?= $this->url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
</td>
<td>
<?php if ($task['is_active'] == \Kanboard\Model\Task::STATUS_OPEN): ?>
@@ -47,10 +47,10 @@
<?php endif ?>
</td>
<td>
- <?= $this->e($task['time_estimated']) ?>
+ <?= $this->text->e($task['time_estimated']) ?>
</td>
<td>
- <?= $this->e($task['time_spent']) ?>
+ <?= $this->text->e($task['time_spent']) ?>
</td>
</tr>
<?php endforeach ?>
diff --git a/app/Template/analytic/tasks.php b/app/Template/analytic/tasks.php
index 7392ee56..9e7b1fd7 100644
--- a/app/Template/analytic/tasks.php
+++ b/app/Template/analytic/tasks.php
@@ -18,7 +18,7 @@
<?php foreach ($metrics as $metric): ?>
<tr>
<td>
- <?= $this->e($metric['column_title']) ?>
+ <?= $this->text->e($metric['column_title']) ?>
</td>
<td>
<?= $metric['nb_tasks'] ?>
diff --git a/app/Template/analytic/users.php b/app/Template/analytic/users.php
index 514d7133..9d1d3a1e 100644
--- a/app/Template/analytic/users.php
+++ b/app/Template/analytic/users.php
@@ -18,7 +18,7 @@
<?php foreach ($metrics as $metric): ?>
<tr>
<td>
- <?= $this->e($metric['user']) ?>
+ <?= $this->text->e($metric['user']) ?>
</td>
<td>
<?= $metric['nb_tasks'] ?>
diff --git a/app/Template/app/projects.php b/app/Template/app/projects.php
index 61899c96..668b87c3 100644
--- a/app/Template/app/projects.php
+++ b/app/Template/app/projects.php
@@ -29,9 +29,9 @@
<?= $this->url->link('<i class="fa fa-list"></i>', 'listing', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('List')) ?>&nbsp;
<?= $this->url->link('<i class="fa fa-calendar"></i>', 'calendar', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Calendar')) ?>&nbsp;
- <?= $this->url->link($this->e($project['name']), 'board', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link($this->text->e($project['name']), 'board', 'show', array('project_id' => $project['id'])) ?>
<?php if (! empty($project['description'])): ?>
- <span class="tooltip" title='<?= $this->e($this->text->markdown($project['description'])) ?>'>
+ <span class="tooltip" title='<?= $this->text->e($this->text->markdown($project['description'])) ?>'>
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
@@ -39,7 +39,7 @@
<td class="dashboard-project-stats">
<?php foreach ($project['columns'] as $column): ?>
<strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong>
- <span><?= $this->e($column['title']) ?></span>
+ <span><?= $this->text->e($column['title']) ?></span>
<?php endforeach ?>
</td>
</tr>
diff --git a/app/Template/app/sidebar.php b/app/Template/app/sidebar.php
index 3f0d988b..66d15b14 100644
--- a/app/Template/app/sidebar.php
+++ b/app/Template/app/sidebar.php
@@ -1,5 +1,5 @@
<div class="sidebar">
- <h2><?= $this->e($user['name'] ?: $user['username']) ?></h2>
+ <h2><?= $this->text->e($user['name'] ?: $user['username']) ?></h2>
<ul>
<li <?= $this->app->checkMenuSelection('app', 'index') ?>>
<?= $this->url->link(t('Overview'), 'app', 'index', array('user_id' => $user['id'])) ?>
diff --git a/app/Template/app/subtasks.php b/app/Template/app/subtasks.php
index 6848112c..cca09481 100644
--- a/app/Template/app/subtasks.php
+++ b/app/Template/app/subtasks.php
@@ -18,21 +18,21 @@
<?= $this->render('task/dropdown', array('task' => array('id' => $subtask['task_id'], 'project_id' => $subtask['project_id']))) ?>
</td>
<td>
- <?= $this->url->link($this->e($subtask['project_name']), 'board', 'show', array('project_id' => $subtask['project_id'])) ?>
+ <?= $this->url->link($this->text->e($subtask['project_name']), 'board', 'show', array('project_id' => $subtask['project_id'])) ?>
</td>
<td>
- <?= $this->url->link($this->e($subtask['task_name']), 'task', 'show', array('task_id' => $subtask['task_id'], 'project_id' => $subtask['project_id'])) ?>
+ <?= $this->url->link($this->text->e($subtask['task_name']), 'task', 'show', array('task_id' => $subtask['task_id'], 'project_id' => $subtask['project_id'])) ?>
</td>
<td>
<?= $this->subtask->toggleStatus($subtask, $subtask['project_id']) ?>
</td>
<td>
<?php if (! empty($subtask['time_spent'])): ?>
- <strong><?= $this->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?>
+ <strong><?= $this->text->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?>
<?php endif ?>
<?php if (! empty($subtask['time_estimated'])): ?>
- <strong><?= $this->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
+ <strong><?= $this->text->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
<?php endif ?>
</td>
</tr>
diff --git a/app/Template/app/tasks.php b/app/Template/app/tasks.php
index 786d7159..d7826fb7 100644
--- a/app/Template/app/tasks.php
+++ b/app/Template/app/tasks.php
@@ -18,18 +18,18 @@
<?= $this->render('task/dropdown', array('task' => $task)) ?>
</td>
<td>
- <?= $this->url->link($this->e($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?>
+ <?= $this->url->link($this->text->e($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?>
</td>
<td>
- <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</td>
<td>
<?php if (! empty($task['time_spent'])): ?>
- <strong><?= $this->e($task['time_spent']).'h' ?></strong> <?= t('spent') ?>
+ <strong><?= $this->text->e($task['time_spent']).'h' ?></strong> <?= t('spent') ?>
<?php endif ?>
<?php if (! empty($task['time_estimated'])): ?>
- <strong><?= $this->e($task['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
+ <strong><?= $this->text->e($task['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
<?php endif ?>
</td>
<td>
diff --git a/app/Template/auth/index.php b/app/Template/auth/index.php
index 41441e69..3fcb6bbf 100644
--- a/app/Template/auth/index.php
+++ b/app/Template/auth/index.php
@@ -3,7 +3,7 @@
<?= $this->hook->render('template:auth:login-form:before') ?>
<?php if (isset($errors['login'])): ?>
- <p class="alert alert-error"><?= $this->e($errors['login']) ?></p>
+ <p class="alert alert-error"><?= $this->text->e($errors['login']) ?></p>
<?php endif ?>
<?php if (! HIDE_LOGIN_FORM): ?>
diff --git a/app/Template/board/table_column.php b/app/Template/board/table_column.php
index 58dcaf32..48538c88 100644
--- a/app/Template/board/table_column.php
+++ b/app/Template/board/table_column.php
@@ -26,10 +26,10 @@
<span class="board-column-title">
<?php if ($not_editable): ?>
- <?= $this->e($column['title']) ?>
+ <?= $this->text->e($column['title']) ?>
<?php else: ?>
<span class="dropdown">
- <a href="#" class="dropdown-menu"><?= $this->e($column['title']) ?> <i class="fa fa-caret-down"></i></a>
+ <a href="#" class="dropdown-menu"><?= $this->text->e($column['title']) ?> <i class="fa fa-caret-down"></i></a>
<ul>
<li>
<i class="fa fa-minus-square fa-fw"></i>
@@ -47,7 +47,7 @@
</span>
<?php if (! $not_editable && ! empty($column['description'])): ?>
- <span class="tooltip pull-right" title='<?= $this->e($this->text->markdown($column['description'])) ?>'>
+ <span class="tooltip pull-right" title='<?= $this->text->e($this->text->markdown($column['description'])) ?>'>
&nbsp;<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
@@ -60,7 +60,7 @@
<?php if ($column['task_limit']): ?>
<span title="<?= t('Task limit') ?>">
- (<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>/<?= $this->e($column['task_limit']) ?>)
+ (<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>/<?= $this->text->e($column['task_limit']) ?>)
</span>
<?php else: ?>
<span title="<?= t('Task count') ?>" class="board-column-header-task-count">
diff --git a/app/Template/board/table_swimlane.php b/app/Template/board/table_swimlane.php
index 44607859..349b9acb 100644
--- a/app/Template/board/table_swimlane.php
+++ b/app/Template/board/table_swimlane.php
@@ -8,7 +8,7 @@
</a>
<?php endif ?>
- <?= $this->e($swimlane['name']) ?>
+ <?= $this->text->e($swimlane['name']) ?>
<?php if (! $not_editable && ! empty($swimlane['description'])): ?>
<span
diff --git a/app/Template/board/table_tasks.php b/app/Template/board/table_tasks.php
index e99e14fb..fd9ce5e7 100644
--- a/app/Template/board/table_tasks.php
+++ b/app/Template/board/table_tasks.php
@@ -22,7 +22,7 @@
<div class="board-column-collapsed">
<div class="board-rotation-wrapper">
<div class="board-column-title board-rotation board-toggle-column-view" data-column-id="<?= $column['id'] ?>" title="<?= t('Show this column') ?>">
- <i class="fa fa-plus-square tooltip" title="<?= $this->e($column['title']) ?>"></i> <?= $this->e($column['title']) ?>
+ <i class="fa fa-plus-square tooltip" title="<?= $this->text->e($column['title']) ?>"></i> <?= $this->text->e($column['title']) ?>
</div>
</div>
</div>
diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php
index 73e68602..d8b21a5b 100644
--- a/app/Template/board/task_footer.php
+++ b/app/Template/board/task_footer.php
@@ -2,10 +2,10 @@
<div class="task-board-category-container">
<span class="task-board-category">
<?php if ($not_editable): ?>
- <?= $this->e($task['category_name']) ?>
+ <?= $this->text->e($task['category_name']) ?>
<?php else: ?>
<?= $this->url->link(
- $this->e($task['category_name']),
+ $this->text->e($task['category_name']),
'boardPopover',
'changeCategory',
array('task_id' => $task['id'], 'project_id' => $task['project_id']),
@@ -61,11 +61,11 @@
<?php endif ?>
<?php if ($task['score']): ?>
- <span class="task-score"><?= $this->e($task['score']) ?></span>
+ <span class="task-score"><?= $this->text->e($task['score']) ?></span>
<?php endif ?>
<?php if (! empty($task['time_estimated'])): ?>
- <span class="task-time-estimated" title="<?= t('Time estimated') ?>"><?= $this->e($task['time_estimated']).'h' ?></span>
+ <span class="task-time-estimated" title="<?= t('Time estimated') ?>"><?= $this->text->e($task['time_estimated']).'h' ?></span>
<?php endif ?>
<?php if ($task['is_milestone'] == 1): ?>
diff --git a/app/Template/board/task_private.php b/app/Template/board/task_private.php
index 4880af00..50efe2f6 100644
--- a/app/Template/board/task_private.php
+++ b/app/Template/board/task_private.php
@@ -23,11 +23,11 @@
<?php endif ?>
<?php if (! empty($task['assignee_username'])): ?>
- <span title="<?= $this->e($task['assignee_name'] ?: $task['assignee_username']) ?>">
- <?= $this->e($this->user->getInitials($task['assignee_name'] ?: $task['assignee_username'])) ?>
+ <span title="<?= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?>">
+ <?= $this->text->e($this->user->getInitials($task['assignee_name'] ?: $task['assignee_username'])) ?>
</span> -
<?php endif ?>
- <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-title tooltip', $this->e($task['title'])) ?>
+ <?= $this->url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-title tooltip', $this->text->e($task['title'])) ?>
</div>
<?php else: ?>
<div class="task-board-expanded">
@@ -57,7 +57,7 @@
t('Change assignee')
) ?>
<?php else: ?>
- <?= $this->e($task['assignee_name'] ?: $task['assignee_username']) ?>
+ <?= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?>
<?php endif ?>
</span>
<?php endif ?>
@@ -72,7 +72,7 @@
<?php endif ?>
<div class="task-board-title">
- <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
+ <?= $this->url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
</div>
<?= $this->render('board/task_footer', array(
diff --git a/app/Template/board/task_public.php b/app/Template/board/task_public.php
index d02722bb..9058f897 100644
--- a/app/Template/board/task_public.php
+++ b/app/Template/board/task_public.php
@@ -19,7 +19,7 @@
</span>
<div class="task-board-title">
- <?= $this->url->link($this->e($task['title']), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
+ <?= $this->url->link($this->text->e($task['title']), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
</div>
<?= $this->render('board/task_footer', array(
diff --git a/app/Template/board/tooltip_comments.php b/app/Template/board/tooltip_comments.php
index ca91e13f..6665bc7d 100644
--- a/app/Template/board/tooltip_comments.php
+++ b/app/Template/board/tooltip_comments.php
@@ -2,7 +2,7 @@
<?php foreach ($comments as $comment): ?>
<p class="comment-title">
<?php if (! empty($comment['username'])): ?>
- <span class="comment-username"><?= $this->e($comment['name'] ?: $comment['username']) ?></span> @
+ <span class="comment-username"><?= $this->text->e($comment['name'] ?: $comment['username']) ?></span> @
<?php endif ?>
<span class="comment-date"><?= $this->dt->datetime($comment['date_creation']) ?></span>
</p>
diff --git a/app/Template/board/tooltip_external_links.php b/app/Template/board/tooltip_external_links.php
index 7681c06c..24cd1d88 100644
--- a/app/Template/board/tooltip_external_links.php
+++ b/app/Template/board/tooltip_external_links.php
@@ -10,10 +10,10 @@
<?= $link['type'] ?>
</td>
<td>
- <a href="<?= $link['url'] ?>" target="_blank"><?= $this->e($link['title']) ?></a>
+ <a href="<?= $link['url'] ?>" target="_blank"><?= $this->text->e($link['title']) ?></a>
</td>
<td>
- <?= $this->e($link['dependency_label']) ?>
+ <?= $this->text->e($link['dependency_label']) ?>
</td>
</tr>
<?php endforeach ?>
diff --git a/app/Template/board/tooltip_files.php b/app/Template/board/tooltip_files.php
index 4fa14b57..39823757 100644
--- a/app/Template/board/tooltip_files.php
+++ b/app/Template/board/tooltip_files.php
@@ -3,7 +3,7 @@
<tr>
<th>
<i class="fa <?= $this->file->icon($file['name']) ?> fa-fw"></i>
- <?= $this->e($file['name']) ?>
+ <?= $this->text->e($file['name']) ?>
</th>
</tr>
<tr>
diff --git a/app/Template/board/tooltip_subtasks.php b/app/Template/board/tooltip_subtasks.php
index dc076d26..126a319f 100644
--- a/app/Template/board/tooltip_subtasks.php
+++ b/app/Template/board/tooltip_subtasks.php
@@ -6,7 +6,7 @@
</td>
<td>
<?php if (! empty($subtask['username'])): ?>
- <?= $this->e($subtask['name'] ?: $subtask['username']) ?>
+ <?= $this->text->e($subtask['name'] ?: $subtask['username']) ?>
<?php endif ?>
</td>
</tr>
diff --git a/app/Template/board/tooltip_tasklinks.php b/app/Template/board/tooltip_tasklinks.php
index b51f90ed..cabe43d8 100644
--- a/app/Template/board/tooltip_tasklinks.php
+++ b/app/Template/board/tooltip_tasklinks.php
@@ -6,13 +6,13 @@
<dd>
<span class="progress"><?= $this->task->getProgress($link).'%' ?></span>
<?= $this->url->link(
- $this->e('#'.$link['task_id'].' '.$link['title']),
+ $this->text->e('#'.$link['task_id'].' '.$link['title']),
'task', 'show', array('task_id' => $link['task_id'], 'project_id' => $link['project_id']),
false,
$link['is_active'] ? '' : 'task-link-closed'
) ?>
<?php if (! empty($link['task_assignee_username'])): ?>
- [<?= $this->e($link['task_assignee_name'] ?: $link['task_assignee_username']) ?>]
+ [<?= $this->text->e($link['task_assignee_name'] ?: $link['task_assignee_username']) ?>]
<?php endif ?>
<?php if ($task['project_id'] != $link['project_id']): ?>
(<i><?= $link['project_name'] ?></i>)
diff --git a/app/Template/category/index.php b/app/Template/category/index.php
index e99b6d52..7b1adf78 100644
--- a/app/Template/category/index.php
+++ b/app/Template/category/index.php
@@ -9,7 +9,7 @@
</tr>
<?php foreach ($categories as $category_id => $category_name): ?>
<tr>
- <td><?= $this->e($category_name) ?></td>
+ <td><?= $this->text->e($category_name) ?></td>
<td>
<div class="dropdown">
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog fa-fw"></i><i class="fa fa-caret-down"></i></a>
diff --git a/app/Template/column/index.php b/app/Template/column/index.php
index 1aa44688..eef176f3 100644
--- a/app/Template/column/index.php
+++ b/app/Template/column/index.php
@@ -26,15 +26,15 @@
<tr data-column-id="<?= $column['id'] ?>">
<td>
<i class="fa fa-arrows-alt draggable-row-handle" title="<?= t('Change column position') ?>"></i>
- <?= $this->e($column['title']) ?>
+ <?= $this->text->e($column['title']) ?>
<?php if (! empty($column['description'])): ?>
- <span class="tooltip" title='<?= $this->e($this->text->markdown($column['description'])) ?>'>
+ <span class="tooltip" title='<?= $this->text->e($this->text->markdown($column['description'])) ?>'>
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
</td>
<td>
- <?= $this->e($column['task_limit']) ?>
+ <?= $this->text->e($column['task_limit']) ?>
</td>
<td>
<div class="dropdown">
diff --git a/app/Template/comment/show.php b/app/Template/comment/show.php
index 2c9b426f..873e1470 100644
--- a/app/Template/comment/show.php
+++ b/app/Template/comment/show.php
@@ -6,7 +6,7 @@
<?php endif ?>
<?php if (! empty($comment['username'])): ?>
- <span class="comment-username"><?= $this->e($comment['name'] ?: $comment['username']) ?></span> @
+ <span class="comment-username"><?= $this->text->e($comment['name'] ?: $comment['username']) ?></span> @
<?php endif ?>
<span class="comment-date"><?= $this->dt->datetime($comment['date_creation']) ?></span>
diff --git a/app/Template/config/about.php b/app/Template/config/about.php
index f8534029..968b109a 100644
--- a/app/Template/config/about.php
+++ b/app/Template/config/about.php
@@ -29,7 +29,7 @@
<ul>
<li>
<?= t('Database driver:') ?>
- <strong><?= $this->e(DB_DRIVER) ?></strong>
+ <strong><?= $this->text->e(DB_DRIVER) ?></strong>
</li>
<?php if (DB_DRIVER === 'sqlite'): ?>
<li>
diff --git a/app/Template/config/api.php b/app/Template/config/api.php
index 489f1968..3ebbb956 100644
--- a/app/Template/config/api.php
+++ b/app/Template/config/api.php
@@ -5,7 +5,7 @@
<ul>
<li>
<?= t('API token:') ?>
- <strong><?= $this->e($values['api_token']) ?></strong>
+ <strong><?= $this->text->e($values['api_token']) ?></strong>
</li>
<li>
<?= t('API endpoint:') ?>
diff --git a/app/Template/config/plugins.php b/app/Template/config/plugins.php
index 4a263ce7..04b3f095 100644
--- a/app/Template/config/plugins.php
+++ b/app/Template/config/plugins.php
@@ -17,14 +17,14 @@
<tr>
<td>
<?php if ($plugin->getPluginHomepage()): ?>
- <a href="<?= $plugin->getPluginHomepage() ?>" target="_blank" rel="noreferrer"><?= $this->e($plugin->getPluginName()) ?></a>
+ <a href="<?= $plugin->getPluginHomepage() ?>" target="_blank" rel="noreferrer"><?= $this->text->e($plugin->getPluginName()) ?></a>
<?php else: ?>
- <?= $this->e($plugin->getPluginName()) ?>
+ <?= $this->text->e($plugin->getPluginName()) ?>
<?php endif ?>
</td>
- <td><?= $this->e($plugin->getPluginAuthor()) ?></td>
- <td><?= $this->e($plugin->getPluginVersion()) ?></td>
- <td><?= $this->e($plugin->getPluginDescription()) ?></td>
+ <td><?= $this->text->e($plugin->getPluginAuthor()) ?></td>
+ <td><?= $this->text->e($plugin->getPluginVersion()) ?></td>
+ <td><?= $this->text->e($plugin->getPluginDescription()) ?></td>
</tr>
<?php endforeach ?>
<?php endif ?> \ No newline at end of file
diff --git a/app/Template/config/webhook.php b/app/Template/config/webhook.php
index f1a98f8b..bcf95787 100644
--- a/app/Template/config/webhook.php
+++ b/app/Template/config/webhook.php
@@ -22,7 +22,7 @@
<ul>
<li>
<?= t('Webhook token:') ?>
- <strong><?= $this->e($values['webhook_token']) ?></strong>
+ <strong><?= $this->text->e($values['webhook_token']) ?></strong>
</li>
<li>
<?= t('URL for task creation:') ?>
diff --git a/app/Template/currency/index.php b/app/Template/currency/index.php
index 07b58a8b..f3e20026 100644
--- a/app/Template/currency/index.php
+++ b/app/Template/currency/index.php
@@ -12,7 +12,7 @@
<?php foreach ($rates as $rate): ?>
<tr>
<td>
- <strong><?= $this->e($rate['currency']) ?></strong>
+ <strong><?= $this->text->e($rate['currency']) ?></strong>
</td>
<td>
<?= n($rate['rate']) ?>
diff --git a/app/Template/custom_filter/index.php b/app/Template/custom_filter/index.php
index 28b6a878..12a4eece 100644
--- a/app/Template/custom_filter/index.php
+++ b/app/Template/custom_filter/index.php
@@ -14,8 +14,8 @@
</tr>
<?php foreach ($custom_filters as $filter): ?>
<tr>
- <td><?= $this->e($filter['name']) ?></td>
- <td><?= $this->e($filter['filter']) ?></td>
+ <td><?= $this->text->e($filter['name']) ?></td>
+ <td><?= $this->text->e($filter['filter']) ?></td>
<td>
<?php if ($filter['is_shared'] == 1): ?>
<?= t('Yes') ?>
@@ -30,7 +30,7 @@
<?= t('Replace') ?>
<?php endif ?>
</td>
- <td><?= $this->e($filter['owner_name'] ?: $filter['owner_username']) ?></td>
+ <td><?= $this->text->e($filter['owner_name'] ?: $filter['owner_username']) ?></td>
<td>
<?php if ($filter['user_id'] == $this->user->getId() || $this->user->hasProjectAccess('customfilter', 'edit', $project['id'])): ?>
<div class="dropdown">
diff --git a/app/Template/event/comment_create.php b/app/Template/event/comment_create.php
index 462f15ca..063736b3 100644
--- a/app/Template/event/comment_create.php
+++ b/app/Template/event/comment_create.php
@@ -2,11 +2,11 @@
<p class="activity-title">
<?= e('%s commented the task %s',
- $this->e($author),
+ $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<div class="activity-description">
- <em><?= $this->e($task['title']) ?></em><br/>
+ <em><?= $this->text->e($task['title']) ?></em><br/>
<div class="markdown"><?= $this->text->markdown($comment['comment']) ?></div>
</div> \ No newline at end of file
diff --git a/app/Template/event/comment_update.php b/app/Template/event/comment_update.php
index 0cb10bf6..93f24d8a 100644
--- a/app/Template/event/comment_update.php
+++ b/app/Template/event/comment_update.php
@@ -2,10 +2,10 @@
<p class="activity-title">
<?= e('%s updated a comment on the task %s',
- $this->e($author),
+ $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<div class="activity-description">
- <em><?= $this->e($task['title']) ?></em><br/>
+ <em><?= $this->text->e($task['title']) ?></em><br/>
</div> \ No newline at end of file
diff --git a/app/Template/event/subtask_create.php b/app/Template/event/subtask_create.php
index ca23aa9c..532783d5 100644
--- a/app/Template/event/subtask_create.php
+++ b/app/Template/event/subtask_create.php
@@ -2,16 +2,16 @@
<p class="activity-title">
<?= e('%s created a subtask for the task %s',
- $this->e($author),
+ $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<div class="activity-description">
- <p><em><?= $this->e($task['title']) ?></em></p>
+ <p><em><?= $this->text->e($task['title']) ?></em></p>
<ul>
<li>
- <?= $this->e($subtask['title']) ?> (<strong><?= $this->e($subtask['status_name']) ?></strong>)
+ <?= $this->text->e($subtask['title']) ?> (<strong><?= $this->text->e($subtask['status_name']) ?></strong>)
</li>
<li>
<?php if ($subtask['username']): ?>
diff --git a/app/Template/event/subtask_update.php b/app/Template/event/subtask_update.php
index 11a778de..e9ff6ac6 100644
--- a/app/Template/event/subtask_update.php
+++ b/app/Template/event/subtask_update.php
@@ -2,16 +2,16 @@
<p class="activity-title">
<?= e('%s updated a subtask for the task %s',
- $this->e($author),
+ $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<div class="activity-description">
- <p><em><?= $this->e($task['title']) ?></em></p>
+ <p><em><?= $this->text->e($task['title']) ?></em></p>
<ul>
<li>
- <?= $this->e($subtask['title']) ?> (<strong><?= $this->e($subtask['status_name']) ?></strong>)
+ <?= $this->text->e($subtask['title']) ?> (<strong><?= $this->text->e($subtask['status_name']) ?></strong>)
</li>
<li>
<?php if ($subtask['username']): ?>
diff --git a/app/Template/event/task_assignee_change.php b/app/Template/event/task_assignee_change.php
index cdec8743..580176c7 100644
--- a/app/Template/event/task_assignee_change.php
+++ b/app/Template/event/task_assignee_change.php
@@ -5,14 +5,14 @@
<?php if (! empty($assignee)): ?>
<?= e('%s changed the assignee of the task %s to %s',
- $this->e($author),
+ $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
- $this->e($assignee)
+ $this->text->e($assignee)
) ?>
<?php else: ?>
- <?= e('%s remove the assignee of the task %s', $this->e($author), $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?>
+ <?= e('%s remove the assignee of the task %s', $this->text->e($author), $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?>
<?php endif ?>
</p>
<p class="activity-description">
- <em><?= $this->e($task['title']) ?></em>
+ <em><?= $this->text->e($task['title']) ?></em>
</p> \ No newline at end of file
diff --git a/app/Template/event/task_close.php b/app/Template/event/task_close.php
index 3d8670a6..361458d3 100644
--- a/app/Template/event/task_close.php
+++ b/app/Template/event/task_close.php
@@ -2,10 +2,10 @@
<p class="activity-title">
<?= e('%s closed the task %s',
- $this->e($author),
+ $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<p class="activity-description">
- <em><?= $this->e($task['title']) ?></em>
+ <em><?= $this->text->e($task['title']) ?></em>
</p> \ No newline at end of file
diff --git a/app/Template/event/task_create.php b/app/Template/event/task_create.php
index 773f401c..655bf8f3 100644
--- a/app/Template/event/task_create.php
+++ b/app/Template/event/task_create.php
@@ -2,10 +2,10 @@
<p class="activity-title">
<?= e('%s created the task %s',
- $this->e($author),
+ $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<p class="activity-description">
- <em><?= $this->e($task['title']) ?></em>
+ <em><?= $this->text->e($task['title']) ?></em>
</p> \ No newline at end of file
diff --git a/app/Template/event/task_file_create.php b/app/Template/event/task_file_create.php
index 1a36bc8f..61bf3d61 100644
--- a/app/Template/event/task_file_create.php
+++ b/app/Template/event/task_file_create.php
@@ -2,10 +2,10 @@
<p class="activity-title">
<?= e('%s attached a new file to the task %s',
- $this->e($author),
+ $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<p class="activity-description">
- <em><?= $this->e($file['name']) ?></em>
+ <em><?= $this->text->e($file['name']) ?></em>
</p> \ No newline at end of file
diff --git a/app/Template/event/task_move_column.php b/app/Template/event/task_move_column.php
index ca482e46..904c956c 100644
--- a/app/Template/event/task_move_column.php
+++ b/app/Template/event/task_move_column.php
@@ -2,11 +2,11 @@
<p class="activity-title">
<?= e('%s moved the task %s to the column "%s"',
- $this->e($author),
+ $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
- $this->e($task['column_title'])
+ $this->text->e($task['column_title'])
) ?>
</p>
<p class="activity-description">
- <em><?= $this->e($task['title']) ?></em>
+ <em><?= $this->text->e($task['title']) ?></em>
</p> \ No newline at end of file
diff --git a/app/Template/event/task_move_position.php b/app/Template/event/task_move_position.php
index dcdd3e1b..6580bb79 100644
--- a/app/Template/event/task_move_position.php
+++ b/app/Template/event/task_move_position.php
@@ -2,12 +2,12 @@
<p class="activity-title">
<?= e('%s moved the task %s to the position #%d in the column "%s"',
- $this->e($author),
+ $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
$task['position'],
- $this->e($task['column_title'])
+ $this->text->e($task['column_title'])
) ?>
</p>
<p class="activity-description">
- <em><?= $this->e($task['title']) ?></em>
+ <em><?= $this->text->e($task['title']) ?></em>
</p> \ No newline at end of file
diff --git a/app/Template/event/task_move_swimlane.php b/app/Template/event/task_move_swimlane.php
index ca440dbf..9ffa554c 100644
--- a/app/Template/event/task_move_swimlane.php
+++ b/app/Template/event/task_move_swimlane.php
@@ -3,17 +3,17 @@
<p class="activity-title">
<?php if ($task['swimlane_id'] == 0): ?>
<?= e('%s moved the task %s to the first swimlane',
- $this->e($author),
+ $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
<?php else: ?>
<?= e('%s moved the task %s to the swimlane "%s"',
- $this->e($author),
+ $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
- $this->e($task['swimlane_name'])
+ $this->text->e($task['swimlane_name'])
) ?>
<?php endif ?>
</p>
<p class="activity-description">
- <em><?= $this->e($task['title']) ?></em>
+ <em><?= $this->text->e($task['title']) ?></em>
</p> \ No newline at end of file
diff --git a/app/Template/event/task_open.php b/app/Template/event/task_open.php
index 11fec64b..9db2e3c9 100644
--- a/app/Template/event/task_open.php
+++ b/app/Template/event/task_open.php
@@ -2,10 +2,10 @@
<p class="activity-title">
<?= e('%s opened the task %s',
- $this->e($author),
+ $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<p class="activity-description">
- <em><?= $this->e($task['title']) ?></em>
+ <em><?= $this->text->e($task['title']) ?></em>
</p> \ No newline at end of file
diff --git a/app/Template/event/task_update.php b/app/Template/event/task_update.php
index e8254bcb..72d70495 100644
--- a/app/Template/event/task_update.php
+++ b/app/Template/event/task_update.php
@@ -2,12 +2,12 @@
<p class="activity-title">
<?= e('%s updated the task %s',
- $this->e($author),
+ $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<p class="activity-description">
- <em><?= $this->e($task['title']) ?></em>
+ <em><?= $this->text->e($task['title']) ?></em>
<?php if (isset($changes)): ?>
<div class="activity-changes">
<?= $this->render('task/changes', array('changes' => $changes, 'task' => $task)) ?>
diff --git a/app/Template/feed/project.php b/app/Template/feed/project.php
index 76cf6cf0..1c6d1166 100644
--- a/app/Template/feed/project.php
+++ b/app/Template/feed/project.php
@@ -15,7 +15,7 @@
<published><?= date(DATE_ATOM, $e['date_creation']) ?></published>
<updated><?= date(DATE_ATOM, $e['date_creation']) ?></updated>
<author>
- <name><?= $this->e($e['author']) ?></name>
+ <name><?= $this->text->e($e['author']) ?></name>
</author>
<content type="html">
<![CDATA[
diff --git a/app/Template/feed/user.php b/app/Template/feed/user.php
index 3e9606c6..28847f1f 100644
--- a/app/Template/feed/user.php
+++ b/app/Template/feed/user.php
@@ -15,7 +15,7 @@
<published><?= date(DATE_ATOM, $e['date_creation']) ?></published>
<updated><?= date(DATE_ATOM, $e['date_creation']) ?></updated>
<author>
- <name><?= $this->e($e['author']) ?></name>
+ <name><?= $this->text->e($e['author']) ?></name>
</author>
<content type="html">
<![CDATA[
diff --git a/app/Template/file_viewer/show.php b/app/Template/file_viewer/show.php
index c71ef91c..191aaa6c 100644
--- a/app/Template/file_viewer/show.php
+++ b/app/Template/file_viewer/show.php
@@ -1,9 +1,9 @@
<div class="page-header">
- <h2><?= $this->e($file['name']) ?></h2>
+ <h2><?= $this->text->e($file['name']) ?></h2>
</div>
<div class="file-viewer">
<?php if ($file['is_image']): ?>
- <img src="<?= $this->url->href('FileViewer', 'image', $params) ?>" alt="<?= $this->e($file['name']) ?>">
+ <img src="<?= $this->url->href('FileViewer', 'image', $params) ?>" alt="<?= $this->text->e($file['name']) ?>">
<?php elseif ($type === 'markdown'): ?>
<article class="markdown">
<?= $this->text->markdown($content) ?>
diff --git a/app/Template/group/index.php b/app/Template/group/index.php
index d111b5d9..8302e5a8 100644
--- a/app/Template/group/index.php
+++ b/app/Template/group/index.php
@@ -21,10 +21,10 @@
#<?= $group['id'] ?>
</td>
<td>
- <?= $this->e($group['external_id']) ?>
+ <?= $this->text->e($group['external_id']) ?>
</td>
<td>
- <?= $this->e($group['name']) ?>
+ <?= $this->text->e($group['name']) ?>
</td>
<td>
<div class="dropdown">
diff --git a/app/Template/group/users.php b/app/Template/group/users.php
index f79cb9ad..bbd41525 100644
--- a/app/Template/group/users.php
+++ b/app/Template/group/users.php
@@ -22,13 +22,13 @@
<?= $this->url->link('#'.$user['id'], 'user', 'show', array('user_id' => $user['id'])) ?>
</td>
<td>
- <?= $this->url->link($this->e($user['username']), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link($this->text->e($user['username']), 'user', 'show', array('user_id' => $user['id'])) ?>
</td>
<td>
- <?= $this->e($user['name']) ?>
+ <?= $this->text->e($user['name']) ?>
</td>
<td>
- <a href="mailto:<?= $this->e($user['email']) ?>"><?= $this->e($user['email']) ?></a>
+ <a href="mailto:<?= $this->text->e($user['email']) ?>"><?= $this->text->e($user['email']) ?></a>
</td>
<td>
<?= $this->url->link(t('Remove this user'), 'group', 'dissociate', array('group_id' => $group['id'], 'user_id' => $user['id'])) ?>
diff --git a/app/Template/header.php b/app/Template/header.php
index e646012a..d891118c 100644
--- a/app/Template/header.php
+++ b/app/Template/header.php
@@ -5,10 +5,10 @@
<?= $this->url->link('K<span>B</span>', 'app', 'index', array(), false, '', t('Dashboard')) ?>
</span>
<span class="title">
- <?= $this->e($title) ?>
+ <?= $this->text->e($title) ?>
</span>
<?php if (! empty($description)): ?>
- <span class="tooltip" title='<?= $this->e($this->text->markdown($description)) ?>'>
+ <span class="tooltip" title='<?= $this->text->e($this->text->markdown($description)) ?>'>
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
@@ -26,7 +26,7 @@
data-redirect-url="<?= $this->url->href('board', 'show', array('project_id' => 'PROJECT_ID')) ?>">
<option value=""></option>
<?php foreach ($board_selector as $board_id => $board_name): ?>
- <option value="<?= $board_id ?>"><?= $this->e($board_name) ?></option>
+ <option value="<?= $board_id ?>"><?= $this->text->e($board_name) ?></option>
<?php endforeach ?>
</select>
</li>
@@ -60,7 +60,7 @@
<div class="dropdown">
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-user fa-fw"></i><i class="fa fa-caret-down"></i></a>
<ul>
- <li class="no-hover"><strong><?= $this->e($this->user->getFullname()) ?></strong></li>
+ <li class="no-hover"><strong><?= $this->text->e($this->user->getFullname()) ?></strong></li>
<li>
<i class="fa fa-tachometer fa-fw"></i>
<?= $this->url->link(t('My dashboard'), 'app', 'index', array('user_id' => $this->user->getId())) ?>
diff --git a/app/Template/layout.php b/app/Template/layout.php
index 0c81aac2..a694a96a 100644
--- a/app/Template/layout.php
+++ b/app/Template/layout.php
@@ -30,7 +30,7 @@
<link rel="apple-touch-icon" sizes="114x114" href="<?= $this->url->dir() ?>assets/img/touch-icon-iphone-retina.png">
<link rel="apple-touch-icon" sizes="144x144" href="<?= $this->url->dir() ?>assets/img/touch-icon-ipad-retina.png">
- <title><?= isset($title) ? $this->e($title) : 'Kanboard' ?></title>
+ <title><?= isset($title) ? $this->text->e($title) : 'Kanboard' ?></title>
<?= $this->hook->render('template:layout:head') ?>
</head>
diff --git a/app/Template/listing/show.php b/app/Template/listing/show.php
index 9a5992e3..10dcedcc 100644
--- a/app/Template/listing/show.php
+++ b/app/Template/listing/show.php
@@ -27,20 +27,20 @@
<?= $this->render('task/dropdown', array('task' => $task)) ?>
</td>
<td>
- <?= $this->e($task['swimlane_name'] ?: $task['default_swimlane']) ?>
+ <?= $this->text->e($task['swimlane_name'] ?: $task['default_swimlane']) ?>
</td>
<td>
- <?= $this->e($task['column_name']) ?>
+ <?= $this->text->e($task['column_name']) ?>
</td>
<td>
- <?= $this->e($task['category_name']) ?>
+ <?= $this->text->e($task['category_name']) ?>
</td>
<td>
- <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
+ <?= $this->url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
</td>
<td>
<?php if ($task['assignee_username']): ?>
- <?= $this->e($task['assignee_name'] ?: $task['assignee_username']) ?>
+ <?= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?>
<?php else: ?>
<?= t('Unassigned') ?>
<?php endif ?>
diff --git a/app/Template/notification/comment_create.php b/app/Template/notification/comment_create.php
index 2f2c0fa6..fefc8ba1 100644
--- a/app/Template/notification/comment_create.php
+++ b/app/Template/notification/comment_create.php
@@ -1,4 +1,4 @@
-<h2><?= $this->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<?php if (! empty($comment['username'])): ?>
<h3><?= t('New comment posted by %s', $comment['name'] ?: $comment['username']) ?></h3>
diff --git a/app/Template/notification/comment_update.php b/app/Template/notification/comment_update.php
index a15e5d6d..2477d8b3 100644
--- a/app/Template/notification/comment_update.php
+++ b/app/Template/notification/comment_update.php
@@ -1,4 +1,4 @@
-<h2><?= $this->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<h3><?= t('Comment updated') ?></h3>
diff --git a/app/Template/notification/comment_user_mention.php b/app/Template/notification/comment_user_mention.php
index 59f5127e..372183df 100644
--- a/app/Template/notification/comment_user_mention.php
+++ b/app/Template/notification/comment_user_mention.php
@@ -1,6 +1,6 @@
<h2><?= t('You were mentioned in a comment on the task #%d', $task['id']) ?></h2>
-<p><?= $this->e($task['title']) ?></p>
+<p><?= $this->text->e($task['title']) ?></p>
<?= $this->text->markdown($comment['comment']) ?>
diff --git a/app/Template/notification/subtask_create.php b/app/Template/notification/subtask_create.php
index e1c62b73..f6f8ba13 100644
--- a/app/Template/notification/subtask_create.php
+++ b/app/Template/notification/subtask_create.php
@@ -1,15 +1,15 @@
-<h2><?= $this->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<h3><?= t('New sub-task') ?></h3>
<ul>
- <li><?= t('Title:') ?> <?= $this->e($subtask['title']) ?></li>
- <li><?= t('Status:') ?> <?= $this->e($subtask['status_name']) ?></li>
- <li><?= t('Assignee:') ?> <?= $this->e($subtask['name'] ?: $subtask['username'] ?: '?') ?></li>
+ <li><?= t('Title:') ?> <?= $this->text->e($subtask['title']) ?></li>
+ <li><?= t('Status:') ?> <?= $this->text->e($subtask['status_name']) ?></li>
+ <li><?= t('Assignee:') ?> <?= $this->text->e($subtask['name'] ?: $subtask['username'] ?: '?') ?></li>
<li>
<?= t('Time tracking:') ?>
<?php if (! empty($subtask['time_estimated'])): ?>
- <strong><?= $this->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
+ <strong><?= $this->text->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
<?php endif ?>
</li>
</ul>
diff --git a/app/Template/notification/subtask_update.php b/app/Template/notification/subtask_update.php
index cfde9db6..e6785f2c 100644
--- a/app/Template/notification/subtask_update.php
+++ b/app/Template/notification/subtask_update.php
@@ -1,19 +1,19 @@
-<h2><?= $this->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<h3><?= t('Sub-task updated') ?></h3>
<ul>
- <li><?= t('Title:') ?> <?= $this->e($subtask['title']) ?></li>
- <li><?= t('Status:') ?> <?= $this->e($subtask['status_name']) ?></li>
- <li><?= t('Assignee:') ?> <?= $this->e($subtask['name'] ?: $subtask['username'] ?: '?') ?></li>
+ <li><?= t('Title:') ?> <?= $this->text->e($subtask['title']) ?></li>
+ <li><?= t('Status:') ?> <?= $this->text->e($subtask['status_name']) ?></li>
+ <li><?= t('Assignee:') ?> <?= $this->text->e($subtask['name'] ?: $subtask['username'] ?: '?') ?></li>
<li>
<?= t('Time tracking:') ?>
<?php if (! empty($subtask['time_spent'])): ?>
- <strong><?= $this->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?>
+ <strong><?= $this->text->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?>
<?php endif ?>
<?php if (! empty($subtask['time_estimated'])): ?>
- <strong><?= $this->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
+ <strong><?= $this->text->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
<?php endif ?>
</li>
</ul>
diff --git a/app/Template/notification/task_assignee_change.php b/app/Template/notification/task_assignee_change.php
index c9729ac9..53f7c5c1 100644
--- a/app/Template/notification/task_assignee_change.php
+++ b/app/Template/notification/task_assignee_change.php
@@ -1,4 +1,4 @@
-<h2><?= $this->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<ul>
<li>
diff --git a/app/Template/notification/task_close.php b/app/Template/notification/task_close.php
index 463223a0..4202e092 100644
--- a/app/Template/notification/task_close.php
+++ b/app/Template/notification/task_close.php
@@ -1,4 +1,4 @@
-<h2><?= $this->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<p><?= t('The task #%d have been closed.', $task['id']) ?></p>
diff --git a/app/Template/notification/task_create.php b/app/Template/notification/task_create.php
index fb7898fc..3cd68ac0 100644
--- a/app/Template/notification/task_create.php
+++ b/app/Template/notification/task_create.php
@@ -1,4 +1,4 @@
-<h2><?= $this->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<ul>
<li>
@@ -25,12 +25,12 @@
</li>
<li>
<?= t('Column on the board:') ?>
- <strong><?= $this->e($task['column_title']) ?></strong>
+ <strong><?= $this->text->e($task['column_title']) ?></strong>
</li>
- <li><?= t('Task position:').' '.$this->e($task['position']) ?></li>
+ <li><?= t('Task position:').' '.$this->text->e($task['position']) ?></li>
<?php if (! empty($task['category_name'])): ?>
<li>
- <?= t('Category:') ?> <strong><?= $this->e($task['category_name']) ?></strong>
+ <?= t('Category:') ?> <strong><?= $this->text->e($task['category_name']) ?></strong>
</li>
<?php endif ?>
</ul>
diff --git a/app/Template/notification/task_file_create.php b/app/Template/notification/task_file_create.php
index 63f7d1b8..feab8dd2 100644
--- a/app/Template/notification/task_file_create.php
+++ b/app/Template/notification/task_file_create.php
@@ -1,4 +1,4 @@
-<h2><?= $this->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<p><?= t('New attachment added "%s"', $file['name']) ?></p>
diff --git a/app/Template/notification/task_move_column.php b/app/Template/notification/task_move_column.php
index 88ab8ab5..263adebf 100644
--- a/app/Template/notification/task_move_column.php
+++ b/app/Template/notification/task_move_column.php
@@ -1,11 +1,11 @@
-<h2><?= $this->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<ul>
<li>
<?= t('Column on the board:') ?>
- <strong><?= $this->e($task['column_title']) ?></strong>
+ <strong><?= $this->text->e($task['column_title']) ?></strong>
</li>
- <li><?= t('Task position:').' '.$this->e($task['position']) ?></li>
+ <li><?= t('Task position:').' '.$this->text->e($task['position']) ?></li>
</ul>
<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/task_move_position.php b/app/Template/notification/task_move_position.php
index 88ab8ab5..263adebf 100644
--- a/app/Template/notification/task_move_position.php
+++ b/app/Template/notification/task_move_position.php
@@ -1,11 +1,11 @@
-<h2><?= $this->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<ul>
<li>
<?= t('Column on the board:') ?>
- <strong><?= $this->e($task['column_title']) ?></strong>
+ <strong><?= $this->text->e($task['column_title']) ?></strong>
</li>
- <li><?= t('Task position:').' '.$this->e($task['position']) ?></li>
+ <li><?= t('Task position:').' '.$this->text->e($task['position']) ?></li>
</ul>
<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/task_move_swimlane.php b/app/Template/notification/task_move_swimlane.php
index 04de7cc6..cbbd620d 100644
--- a/app/Template/notification/task_move_swimlane.php
+++ b/app/Template/notification/task_move_swimlane.php
@@ -1,4 +1,4 @@
-<h2><?= $this->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<ul>
<li>
@@ -6,14 +6,14 @@
<?= t('The task have been moved to the first swimlane') ?>
<?php else: ?>
<?= t('The task have been moved to another swimlane:') ?>
- <strong><?= $this->e($task['swimlane_name']) ?></strong>
+ <strong><?= $this->text->e($task['swimlane_name']) ?></strong>
<?php endif ?>
</li>
<li>
<?= t('Column on the board:') ?>
- <strong><?= $this->e($task['column_title']) ?></strong>
+ <strong><?= $this->text->e($task['column_title']) ?></strong>
</li>
- <li><?= t('Task position:').' '.$this->e($task['position']) ?></li>
+ <li><?= t('Task position:').' '.$this->text->e($task['position']) ?></li>
</ul>
<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/task_open.php b/app/Template/notification/task_open.php
index cb02a79c..6eb4ec08 100644
--- a/app/Template/notification/task_open.php
+++ b/app/Template/notification/task_open.php
@@ -1,4 +1,4 @@
-<h2><?= $this->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<p><?= t('The task #%d have been opened.', $task['id']) ?></p>
diff --git a/app/Template/notification/task_overdue.php b/app/Template/notification/task_overdue.php
index d7e6ff5a..ac0665a2 100644
--- a/app/Template/notification/task_overdue.php
+++ b/app/Template/notification/task_overdue.php
@@ -5,9 +5,9 @@
<li>
(<strong>#<?= $task['id'] ?></strong>)
<?php if ($application_url): ?>
- <a href="<?= $this->url->href('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', true) ?>"><?= $this->e($task['title']) ?></a>
+ <a href="<?= $this->url->href('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', true) ?>"><?= $this->text->e($task['title']) ?></a>
<?php else: ?>
- <?= $this->e($task['title']) ?>
+ <?= $this->text->e($task['title']) ?>
<?php endif ?>
(<?= $this->dt->date($task['date_due']) ?>)
<?php if ($task['assignee_username']): ?>
diff --git a/app/Template/notification/task_update.php b/app/Template/notification/task_update.php
index 54f5c6d1..8adb2553 100644
--- a/app/Template/notification/task_update.php
+++ b/app/Template/notification/task_update.php
@@ -1,4 +1,4 @@
-<h2><?= $this->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<?= $this->render('task/changes', array('changes' => $changes, 'task' => $task)) ?>
<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/task_user_mention.php b/app/Template/notification/task_user_mention.php
index 40ddddca..3d8c8e95 100644
--- a/app/Template/notification/task_user_mention.php
+++ b/app/Template/notification/task_user_mention.php
@@ -1,5 +1,5 @@
<h2><?= t('You were mentioned in the task #%d', $task['id']) ?></h2>
-<p><?= $this->e($task['title']) ?></p>
+<p><?= $this->text->e($task['title']) ?></p>
<h2><?= t('Description') ?></h2>
<?= $this->text->markdown($task['description']) ?>
diff --git a/app/Template/project/index.php b/app/Template/project/index.php
index 8d384e58..10d4aaa2 100644
--- a/app/Template/project/index.php
+++ b/app/Template/project/index.php
@@ -49,12 +49,12 @@
<?php endif ?>
<?php if (! empty($project['description'])): ?>
- <span class="tooltip" title='<?= $this->e($this->text->markdown($project['description'])) ?>'>
+ <span class="tooltip" title='<?= $this->text->e($this->text->markdown($project['description'])) ?>'>
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
- <?= $this->url->link($this->e($project['name']), 'project', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link($this->text->e($project['name']), 'project', 'show', array('project_id' => $project['id'])) ?>
</td>
<td>
<?= $this->dt->date($project['start_date']) ?>
@@ -64,7 +64,7 @@
</td>
<td>
<?php if ($project['owner_id'] > 0): ?>
- <?= $this->e($project['owner_name'] ?: $project['owner_username']) ?>
+ <?= $this->text->e($project['owner_name'] ?: $project['owner_username']) ?>
<?php endif ?>
</td>
<?php if ($this->user->hasAccess('projectuser', 'managers')): ?>
@@ -76,7 +76,7 @@
<td class="dashboard-project-stats">
<?php foreach ($project['columns'] as $column): ?>
<strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong>
- <span><?= $this->e($column['title']) ?></span>
+ <span><?= $this->text->e($column['title']) ?></span>
<?php endforeach ?>
</td>
</tr>
diff --git a/app/Template/project/show.php b/app/Template/project/show.php
index 166b8902..42eeec4d 100644
--- a/app/Template/project/show.php
+++ b/app/Template/project/show.php
@@ -5,7 +5,7 @@
<li><strong><?= $project['is_active'] ? t('Active') : t('Inactive') ?></strong></li>
<?php if ($project['owner_id'] > 0): ?>
- <li><?= t('Project owner: ') ?><strong><?= $this->e($project['owner_name'] ?: $project['owner_username']) ?></strong></li>
+ <li><?= t('Project owner: ') ?><strong><?= $this->text->e($project['owner_name'] ?: $project['owner_username']) ?></strong></li>
<?php endif ?>
<?php if ($project['is_private']): ?>
@@ -61,9 +61,9 @@
<?php foreach ($stats['columns'] as $column): ?>
<tr>
<td>
- <?= $this->e($column['title']) ?>
+ <?= $this->text->e($column['title']) ?>
<?php if (! empty($column['description'])): ?>
- <span class="tooltip" title='<?= $this->e($this->text->markdown($column['description'])) ?>'>
+ <span class="tooltip" title='<?= $this->text->e($this->text->markdown($column['description'])) ?>'>
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
diff --git a/app/Template/project_file/remove.php b/app/Template/project_file/remove.php
index 4f0ba465..ba834288 100644
--- a/app/Template/project_file/remove.php
+++ b/app/Template/project_file/remove.php
@@ -4,7 +4,7 @@
<div class="confirm">
<p class="alert alert-info">
- <?= t('Do you really want to remove this file: "%s"?', $this->e($file['name'])) ?>
+ <?= t('Do you really want to remove this file: "%s"?', $this->text->e($file['name'])) ?>
</p>
<div class="form-actions">
diff --git a/app/Template/project_header/search.php b/app/Template/project_header/search.php
index 2b2a2c39..42216352 100644
--- a/app/Template/project_header/search.php
+++ b/app/Template/project_header/search.php
@@ -12,7 +12,7 @@
<a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('Custom filters') ?>"><i class="fa fa-bookmark fa-fw"></i><i class="fa fa-caret-down"></i></a>
<ul>
<?php foreach ($custom_filters_list as $filter): ?>
- <li><a href="#" class="filter-helper" data-<?php if ($filter['append']): ?><?= 'append-' ?><?php endif ?>filter='<?= $this->e($filter['filter']) ?>'><?= $this->e($filter['name']) ?></a></li>
+ <li><a href="#" class="filter-helper" data-<?php if ($filter['append']): ?><?= 'append-' ?><?php endif ?>filter='<?= $this->text->e($filter['filter']) ?>'><?= $this->text->e($filter['name']) ?></a></li>
<?php endforeach ?>
</ul>
</div>
@@ -24,7 +24,7 @@
<ul>
<li><a href="#" class="filter-helper" data-append-filter="assignee:nobody"><?= t('Not assigned') ?></a></li>
<?php foreach ($users_list as $user): ?>
- <li><a href="#" class="filter-helper" data-append-filter='assignee:"<?= $this->e($user) ?>"'><?= $this->e($user) ?></a></li>
+ <li><a href="#" class="filter-helper" data-append-filter='assignee:"<?= $this->text->e($user) ?>"'><?= $this->text->e($user) ?></a></li>
<?php endforeach ?>
</ul>
</div>
@@ -36,7 +36,7 @@
<ul>
<li><a href="#" class="filter-helper" data-append-filter="category:none"><?= t('No category') ?></a></li>
<?php foreach ($categories_list as $category): ?>
- <li><a href="#" class="filter-helper" data-append-filter='category:"<?= $this->e($category) ?>"'><?= $this->e($category) ?></a></li>
+ <li><a href="#" class="filter-helper" data-append-filter='category:"<?= $this->text->e($category) ?>"'><?= $this->text->e($category) ?></a></li>
<?php endforeach ?>
</ul>
</div>
diff --git a/app/Template/project_overview/columns.php b/app/Template/project_overview/columns.php
index 870d753f..cc5782bd 100644
--- a/app/Template/project_overview/columns.php
+++ b/app/Template/project_overview/columns.php
@@ -2,7 +2,7 @@
<?php foreach ($project['columns'] as $column): ?>
<div class="project-overview-column">
<strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong><br>
- <span><?= $this->e($column['title']) ?></span>
+ <span><?= $this->text->e($column['title']) ?></span>
</div>
<?php endforeach ?>
</div>
diff --git a/app/Template/project_overview/description.php b/app/Template/project_overview/description.php
index 4137bf9f..cd6e2450 100644
--- a/app/Template/project_overview/description.php
+++ b/app/Template/project_overview/description.php
@@ -1,6 +1,6 @@
<?php if (! empty($project['description'])): ?>
<div class="page-header">
- <h2><?= $this->e($project['name']) ?></h2>
+ <h2><?= $this->text->e($project['name']) ?></h2>
</div>
<article class="markdown">
<?= $this->text->markdown($project['description']) ?>
diff --git a/app/Template/project_overview/files.php b/app/Template/project_overview/files.php
index 7eb8c762..605431ed 100644
--- a/app/Template/project_overview/files.php
+++ b/app/Template/project_overview/files.php
@@ -18,11 +18,11 @@
<div class="file-thumbnails">
<?php foreach ($images as $file): ?>
<div class="file-thumbnail">
- <a href="<?= $this->url->href('FileViewer', 'show', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?>" class="popover"><img src="<?= $this->url->href('FileViewer', 'thumbnail', array('file_id' => $file['id'], 'project_id' => $project['id'])) ?>" title="<?= $this->e($file['name']) ?>" alt="<?= $this->e($file['name']) ?>"></a>
+ <a href="<?= $this->url->href('FileViewer', 'show', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?>" class="popover"><img src="<?= $this->url->href('FileViewer', 'thumbnail', array('file_id' => $file['id'], 'project_id' => $project['id'])) ?>" title="<?= $this->text->e($file['name']) ?>" alt="<?= $this->text->e($file['name']) ?>"></a>
<div class="file-thumbnail-content">
<div class="file-thumbnail-title">
<div class="dropdown">
- <a href="#" class="dropdown-menu dropdown-menu-link-text"><?= $this->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
+ <a href="#" class="dropdown-menu dropdown-menu-link-text"><?= $this->text->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
<ul>
<li>
<i class="fa fa-download fa-fw"></i>
@@ -62,7 +62,7 @@
<td>
<i class="fa <?= $this->file->icon($file['name']) ?> fa-fw"></i>
<div class="dropdown">
- <a href="#" class="dropdown-menu dropdown-menu-link-text"><?= $this->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
+ <a href="#" class="dropdown-menu dropdown-menu-link-text"><?= $this->text->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
<ul>
<?php if ($this->file->getPreviewType($file['name']) !== null): ?>
<li>
@@ -84,7 +84,7 @@
</div>
</td>
<td>
- <?= $this->e($file['user_name'] ?: $file['username']) ?>
+ <?= $this->text->e($file['user_name'] ?: $file['username']) ?>
</td>
<td>
<?= $this->dt->date($file['date']) ?>
diff --git a/app/Template/project_overview/information.php b/app/Template/project_overview/information.php
index 12a1317d..95508d98 100644
--- a/app/Template/project_overview/information.php
+++ b/app/Template/project_overview/information.php
@@ -4,7 +4,7 @@
<div class="listing">
<ul>
<?php if ($project['owner_id'] > 0): ?>
- <li><?= t('Project owner: ') ?><strong><?= $this->e($project['owner_name'] ?: $project['owner_username']) ?></strong></li>
+ <li><?= t('Project owner: ') ?><strong><?= $this->text->e($project['owner_name'] ?: $project['owner_username']) ?></strong></li>
<?php endif ?>
<?php if (! empty($users)): ?>
diff --git a/app/Template/project_permission/index.php b/app/Template/project_permission/index.php
index 5f0edc2b..6135ad9d 100644
--- a/app/Template/project_permission/index.php
+++ b/app/Template/project_permission/index.php
@@ -19,7 +19,7 @@
</tr>
<?php foreach ($users as $user): ?>
<tr>
- <td><?= $this->e($user['name'] ?: $user['username']) ?></td>
+ <td><?= $this->text->e($user['name'] ?: $user['username']) ?></td>
<td>
<?= $this->form->select(
'role-'.$user['id'],
@@ -79,7 +79,7 @@
</tr>
<?php foreach ($groups as $group): ?>
<tr>
- <td><?= $this->e($group['name']) ?></td>
+ <td><?= $this->text->e($group['name']) ?></td>
<td>
<?= $this->form->select(
'role-'.$group['id'],
diff --git a/app/Template/project_user/layout.php b/app/Template/project_user/layout.php
index 3ced5590..1103e9bc 100644
--- a/app/Template/project_user/layout.php
+++ b/app/Template/project_user/layout.php
@@ -19,7 +19,7 @@
<div class="sidebar-content">
<div class="page-header">
- <h2><?= $this->e($title) ?></h2>
+ <h2><?= $this->text->e($title) ?></h2>
</div>
<?= $content_for_sublayout ?>
</div>
diff --git a/app/Template/project_user/roles.php b/app/Template/project_user/roles.php
index 35d16241..17fb709b 100644
--- a/app/Template/project_user/roles.php
+++ b/app/Template/project_user/roles.php
@@ -10,19 +10,19 @@
<?php foreach ($paginator->getCollection() as $project): ?>
<tr>
<td>
- <?= $this->e($this->user->getFullname($project)) ?>
+ <?= $this->text->e($this->user->getFullname($project)) ?>
</td>
<td>
<?= $this->url->link('<i class="fa fa-th"></i>', 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Board')) ?>
<?= $this->url->link('<i class="fa fa-sliders fa-fw"></i>', 'gantt', 'project', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Gantt chart')) ?>
<?= $this->url->link('<i class="fa fa-cog fa-fw"></i>', 'project', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Project settings')) ?>
- <?= $this->e($project['project_name']) ?>
+ <?= $this->text->e($project['project_name']) ?>
</td>
<td class="dashboard-project-stats">
<?php foreach ($project['columns'] as $column): ?>
<strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong>
- <span><?= $this->e($column['title']) ?></span>
+ <span><?= $this->text->e($column['title']) ?></span>
<?php endforeach ?>
</td>
</tr>
diff --git a/app/Template/project_user/tasks.php b/app/Template/project_user/tasks.php
index 8d1cbd96..108d3b33 100644
--- a/app/Template/project_user/tasks.php
+++ b/app/Template/project_user/tasks.php
@@ -14,20 +14,20 @@
<?php foreach ($paginator->getCollection() as $task): ?>
<tr>
<td class="task-table color-<?= $task['color_id'] ?>">
- <?= $this->url->link('#'.$this->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
+ <?= $this->url->link('#'.$this->text->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
</td>
<td>
- <?= $this->url->link($this->e($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?>
+ <?= $this->url->link($this->text->e($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?>
</td>
<td>
- <?= $this->e($task['column_name']) ?>
+ <?= $this->text->e($task['column_name']) ?>
</td>
<td>
- <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
+ <?= $this->url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
</td>
<td>
<?php if ($task['assignee_username']): ?>
- <?= $this->e($task['assignee_name'] ?: $task['assignee_username']) ?>
+ <?= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?>
<?php else: ?>
<?= t('Unassigned') ?>
<?php endif ?>
diff --git a/app/Template/project_user/tooltip_users.php b/app/Template/project_user/tooltip_users.php
index 7a07caad..f75d964b 100644
--- a/app/Template/project_user/tooltip_users.php
+++ b/app/Template/project_user/tooltip_users.php
@@ -6,7 +6,7 @@
<strong><?= $role_name ?></strong>
<ul>
<?php foreach ($users[$role] as $user_id => $user): ?>
- <li><?= $this->url->link($this->e($user), 'Projectuser', 'opens', array('user_id' => $user_id)) ?></li>
+ <li><?= $this->url->link($this->text->e($user), 'Projectuser', 'opens', array('user_id' => $user_id)) ?></li>
<?php endforeach ?>
</ul>
<?php endif ?>
diff --git a/app/Template/search/results.php b/app/Template/search/results.php
index 3bb0e603..79df3544 100644
--- a/app/Template/search/results.php
+++ b/app/Template/search/results.php
@@ -13,26 +13,26 @@
<?php foreach ($paginator->getCollection() as $task): ?>
<tr>
<td>
- <?= $this->url->link($this->e($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?>
+ <?= $this->url->link($this->text->e($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?>
</td>
<td class="task-table color-<?= $task['color_id'] ?>">
- <?= $this->url->link('#'.$this->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
+ <?= $this->url->link('#'.$this->text->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
</td>
<td>
- <?= $this->e($task['swimlane_name'] ?: $task['default_swimlane']) ?>
+ <?= $this->text->e($task['swimlane_name'] ?: $task['default_swimlane']) ?>
</td>
<td>
- <?= $this->e($task['column_name']) ?>
+ <?= $this->text->e($task['column_name']) ?>
</td>
<td>
- <?= $this->e($task['category_name']) ?>
+ <?= $this->text->e($task['category_name']) ?>
</td>
<td>
- <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
+ <?= $this->url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
</td>
<td>
<?php if ($task['assignee_username']): ?>
- <?= $this->e($task['assignee_name'] ?: $task['assignee_username']) ?>
+ <?= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?>
<?php else: ?>
<?= t('Unassigned') ?>
<?php endif ?>
diff --git a/app/Template/subtask/remove.php b/app/Template/subtask/remove.php
index 9aef6842..374256fd 100644
--- a/app/Template/subtask/remove.php
+++ b/app/Template/subtask/remove.php
@@ -7,7 +7,7 @@
<?= t('Do you really want to remove this sub-task?') ?>
</p>
- <p><strong><?= $this->e($subtask['title']) ?></strong></p>
+ <p><strong><?= $this->text->e($subtask['title']) ?></strong></p>
<div class="form-actions">
<?= $this->url->link(t('Yes'), 'subtask', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), true, 'btn btn-red') ?>
diff --git a/app/Template/subtask/table.php b/app/Template/subtask/table.php
index 13d2c7cc..0af02dcf 100644
--- a/app/Template/subtask/table.php
+++ b/app/Template/subtask/table.php
@@ -26,18 +26,18 @@
</td>
<td>
<?php if (! empty($subtask['username'])): ?>
- <?= $this->e($subtask['name'] ?: $subtask['username']) ?>
+ <?= $this->text->e($subtask['name'] ?: $subtask['username']) ?>
<?php endif ?>
</td>
<td>
<ul class="no-bullet">
<li>
<?php if (! empty($subtask['time_spent'])): ?>
- <strong><?= $this->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?>
+ <strong><?= $this->text->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?>
<?php endif ?>
<?php if (! empty($subtask['time_estimated'])): ?>
- <strong><?= $this->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
+ <strong><?= $this->text->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
<?php endif ?>
</li>
<?php if ($editable && $subtask['user_id'] == $this->user->getId()): ?>
diff --git a/app/Template/swimlane/table.php b/app/Template/swimlane/table.php
index 1e6a86bc..17be6924 100644
--- a/app/Template/swimlane/table.php
+++ b/app/Template/swimlane/table.php
@@ -10,7 +10,7 @@
<?php if (! empty($default_swimlane)): ?>
<tr>
<td>
- <?= $this->e($default_swimlane['default_swimlane']) ?>
+ <?= $this->text->e($default_swimlane['default_swimlane']) ?>
<?php if ($default_swimlane['default_swimlane'] !== t('Default swimlane')): ?>
&nbsp;(<?= t('Default swimlane') ?>)
<?php endif ?>
@@ -42,10 +42,10 @@
<i class="fa fa-arrows-alt draggable-row-handle" title="<?= t('Change column position') ?>"></i>
<?php endif ?>
- <?= $this->e($swimlane['name']) ?>
+ <?= $this->text->e($swimlane['name']) ?>
<?php if (! empty($swimlane['description'])): ?>
- <span class="tooltip" title='<?= $this->e($this->text->markdown($swimlane['description'])) ?>'>
+ <span class="tooltip" title='<?= $this->text->e($this->text->markdown($swimlane['description'])) ?>'>
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
diff --git a/app/Template/task/analytics.php b/app/Template/task/analytics.php
index 306dd021..2f2c23a1 100644
--- a/app/Template/task/analytics.php
+++ b/app/Template/task/analytics.php
@@ -18,7 +18,7 @@
</tr>
<?php foreach ($time_spent_columns as $column): ?>
<tr>
- <td><?= $this->e($column['title']) ?></td>
+ <td><?= $this->text->e($column['title']) ?></td>
<td><?= $this->dt->duration($column['time_spent']) ?></td>
</tr>
<?php endforeach ?>
diff --git a/app/Template/task/color_picker.php b/app/Template/task/color_picker.php
index a849b9ce..0c62fa70 100644
--- a/app/Template/task/color_picker.php
+++ b/app/Template/task/color_picker.php
@@ -3,7 +3,7 @@
<div
data-color-id="<?= $color_id ?>"
class="color-square color-<?= $color_id ?> <?= isset($values['color_id']) && $values['color_id'] === $color_id ? 'color-square-selected' : '' ?>"
- title="<?= $this->e($color_name) ?>">
+ title="<?= $this->text->e($color_name) ?>">
</div>
<?php endforeach ?>
</div>
diff --git a/app/Template/task/details.php b/app/Template/task/details.php
index 5c2e3cff..61f6c848 100644
--- a/app/Template/task/details.php
+++ b/app/Template/task/details.php
@@ -1,5 +1,5 @@
<section id="task-summary">
- <h2><?= $this->e($task['title']) ?></h2>
+ <h2><?= $this->text->e($task['title']) ?></h2>
<div class="task-summary-container color-<?= $task['color_id'] ?>">
<div class="task-summary-column">
<ul class="no-bullet">
@@ -18,12 +18,12 @@
</li>
<?php if (! empty($task['reference'])): ?>
<li>
- <strong><?= t('Reference:') ?></strong> <span><?= $this->e($task['reference']) ?></span>
+ <strong><?= t('Reference:') ?></strong> <span><?= $this->text->e($task['reference']) ?></span>
</li>
<?php endif ?>
<?php if (! empty($task['score'])): ?>
<li>
- <strong><?= t('Complexity:') ?></strong> <span><?= $this->e($task['score']) ?></span>
+ <strong><?= t('Complexity:') ?></strong> <span><?= $this->text->e($task['score']) ?></span>
</li>
<?php endif ?>
<?php if ($project['is_public']): ?>
@@ -39,18 +39,18 @@
<?php if (! empty($task['category_name'])): ?>
<li>
<strong><?= t('Category:') ?></strong>
- <span><?= $this->e($task['category_name']) ?></span>
+ <span><?= $this->text->e($task['category_name']) ?></span>
</li>
<?php endif ?>
<?php if (! empty($task['swimlane_name'])): ?>
<li>
<strong><?= t('Swimlane:') ?></strong>
- <span><?= $this->e($task['swimlane_name']) ?></span>
+ <span><?= $this->text->e($task['swimlane_name']) ?></span>
</li>
<?php endif ?>
<li>
<strong><?= t('Column:') ?></strong>
- <span><?= $this->e($task['column_title']) ?></span>
+ <span><?= $this->text->e($task['column_title']) ?></span>
</li>
<li>
<strong><?= t('Position:') ?></strong>
@@ -64,7 +64,7 @@
<strong><?= t('Assignee:') ?></strong>
<span>
<?php if ($task['assignee_username']): ?>
- <?= $this->e($task['assignee_name'] ?: $task['assignee_username']) ?>
+ <?= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?>
<?php else: ?>
<?= t('not assigned') ?>
<?php endif ?>
@@ -73,7 +73,7 @@
<?php if ($task['creator_username']): ?>
<li>
<strong><?= t('Creator:') ?></strong>
- <span><?= $this->e($task['creator_name'] ?: $task['creator_username']) ?></span>
+ <span><?= $this->text->e($task['creator_name'] ?: $task['creator_username']) ?></span>
</li>
<?php endif ?>
<?php if ($task['date_due']): ?>
diff --git a/app/Template/task/remove.php b/app/Template/task/remove.php
index e0d655fe..eb0809b1 100644
--- a/app/Template/task/remove.php
+++ b/app/Template/task/remove.php
@@ -4,7 +4,7 @@
<div class="confirm">
<p class="alert alert-info">
- <?= t('Do you really want to remove this task: "%s"?', $this->e($task['title'])) ?>
+ <?= t('Do you really want to remove this task: "%s"?', $this->text->e($task['title'])) ?>
</p>
<div class="form-actions">
diff --git a/app/Template/task/time_tracking_details.php b/app/Template/task/time_tracking_details.php
index 147c5109..e2b599a5 100644
--- a/app/Template/task/time_tracking_details.php
+++ b/app/Template/task/time_tracking_details.php
@@ -14,7 +14,7 @@
</tr>
<?php foreach ($subtask_paginator->getCollection() as $record): ?>
<tr>
- <td><?= $this->url->link($this->e($record['user_fullname'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?></td>
+ <td><?= $this->url->link($this->text->e($record['user_fullname'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?></td>
<td><?= t($record['subtask_title']) ?></td>
<td><?= $this->dt->datetime($record['start']) ?></td>
<td><?= $this->dt->datetime($record['end']) ?></td>
diff --git a/app/Template/task/time_tracking_summary.php b/app/Template/task/time_tracking_summary.php
index 0210be7e..9886ccfa 100644
--- a/app/Template/task/time_tracking_summary.php
+++ b/app/Template/task/time_tracking_summary.php
@@ -5,9 +5,9 @@
</div>
<ul class="listing">
- <li><?= t('Estimate:') ?> <strong><?= $this->e($task['time_estimated']) ?></strong> <?= t('hours') ?></li>
- <li><?= t('Spent:') ?> <strong><?= $this->e($task['time_spent']) ?></strong> <?= t('hours') ?></li>
- <li><?= t('Remaining:') ?> <strong><?= $this->e($task['time_estimated'] - $task['time_spent']) ?></strong> <?= t('hours') ?></li>
+ <li><?= t('Estimate:') ?> <strong><?= $this->text->e($task['time_estimated']) ?></strong> <?= t('hours') ?></li>
+ <li><?= t('Spent:') ?> <strong><?= $this->text->e($task['time_spent']) ?></strong> <?= t('hours') ?></li>
+ <li><?= t('Remaining:') ?> <strong><?= $this->text->e($task['time_estimated'] - $task['time_spent']) ?></strong> <?= t('hours') ?></li>
</ul>
<?php endif ?> \ No newline at end of file
diff --git a/app/Template/task/transitions.php b/app/Template/task/transitions.php
index d79c2fd9..57f1e0ff 100644
--- a/app/Template/task/transitions.php
+++ b/app/Template/task/transitions.php
@@ -16,9 +16,9 @@
<?php foreach ($transitions as $transition): ?>
<tr>
<td><?= $this->dt->datetime($transition['date']) ?></td>
- <td><?= $this->e($transition['src_column']) ?></td>
- <td><?= $this->e($transition['dst_column']) ?></td>
- <td><?= $this->url->link($this->e($transition['name'] ?: $transition['username']), 'user', 'show', array('user_id' => $transition['user_id'])) ?></td>
+ <td><?= $this->text->e($transition['src_column']) ?></td>
+ <td><?= $this->text->e($transition['dst_column']) ?></td>
+ <td><?= $this->url->link($this->text->e($transition['name'] ?: $transition['username']), 'user', 'show', array('user_id' => $transition['user_id'])) ?></td>
<td><?= $this->dt->duration($transition['time_spent']) ?></td>
</tr>
<?php endforeach ?>
diff --git a/app/Template/task_external_link/show.php b/app/Template/task_external_link/show.php
index 12d8e4f6..7dce107e 100644
--- a/app/Template/task_external_link/show.php
+++ b/app/Template/task_external_link/show.php
@@ -22,13 +22,13 @@
<?= $link['type'] ?>
</td>
<td>
- <a href="<?= $link['url'] ?>" target="_blank"><?= $this->e($link['title']) ?></a>
+ <a href="<?= $link['url'] ?>" target="_blank"><?= $this->text->e($link['title']) ?></a>
</td>
<td>
- <?= $this->e($link['dependency_label']) ?>
+ <?= $this->text->e($link['dependency_label']) ?>
</td>
<td>
- <?= $this->e($link['creator_name'] ?: $link['creator_username']) ?>
+ <?= $this->text->e($link['creator_name'] ?: $link['creator_username']) ?>
</td>
<td>
<?= $this->dt->date($link['date_creation']) ?>
diff --git a/app/Template/task_file/remove.php b/app/Template/task_file/remove.php
index 5e6c83f2..fe601f6f 100644
--- a/app/Template/task_file/remove.php
+++ b/app/Template/task_file/remove.php
@@ -4,7 +4,7 @@
<div class="confirm">
<p class="alert alert-info">
- <?= t('Do you really want to remove this file: "%s"?', $this->e($file['name'])) ?>
+ <?= t('Do you really want to remove this file: "%s"?', $this->text->e($file['name'])) ?>
</p>
<div class="form-actions">
diff --git a/app/Template/task_file/show.php b/app/Template/task_file/show.php
index c3f2bb98..21bf79ef 100644
--- a/app/Template/task_file/show.php
+++ b/app/Template/task_file/show.php
@@ -8,11 +8,11 @@
<div class="file-thumbnails">
<?php foreach ($images as $file): ?>
<div class="file-thumbnail">
- <a href="<?= $this->url->href('FileViewer', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>" class="popover"><img src="<?= $this->url->href('FileViewer', 'thumbnail', array('file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" title="<?= $this->e($file['name']) ?>" alt="<?= $this->e($file['name']) ?>"></a>
+ <a href="<?= $this->url->href('FileViewer', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>" class="popover"><img src="<?= $this->url->href('FileViewer', 'thumbnail', array('file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" title="<?= $this->text->e($file['name']) ?>" alt="<?= $this->text->e($file['name']) ?>"></a>
<div class="file-thumbnail-content">
<div class="file-thumbnail-title">
<div class="dropdown">
- <a href="#" class="dropdown-menu dropdown-menu-link-text"><?= $this->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
+ <a href="#" class="dropdown-menu dropdown-menu-link-text"><?= $this->text->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
<ul>
<li>
<i class="fa fa-download fa-fw"></i>
@@ -52,7 +52,7 @@
<td>
<i class="fa <?= $this->file->icon($file['name']) ?> fa-fw"></i>
<div class="dropdown">
- <a href="#" class="dropdown-menu dropdown-menu-link-text"><?= $this->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
+ <a href="#" class="dropdown-menu dropdown-menu-link-text"><?= $this->text->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
<ul>
<?php if ($this->file->getPreviewType($file['name']) !== null): ?>
<li>
@@ -74,7 +74,7 @@
</div>
</td>
<td>
- <?= $this->e($file['user_name'] ?: $file['username']) ?>
+ <?= $this->text->e($file['user_name'] ?: $file['username']) ?>
</td>
<td>
<?= $this->dt->date($file['date']) ?>
diff --git a/app/Template/task_recurrence/info.php b/app/Template/task_recurrence/info.php
index 83ca0960..1a6574df 100644
--- a/app/Template/task_recurrence/info.php
+++ b/app/Template/task_recurrence/info.php
@@ -5,16 +5,16 @@
<li><?= t('Recurrent task has been generated:') ?>
<ul>
<li>
- <?= t('Trigger to generate recurrent task: ') ?><strong><?= $this->e($recurrence_trigger_list[$task['recurrence_trigger']]) ?></strong>
+ <?= t('Trigger to generate recurrent task: ') ?><strong><?= $this->text->e($recurrence_trigger_list[$task['recurrence_trigger']]) ?></strong>
</li>
<li>
- <?= t('Factor to calculate new due date: ') ?><strong><?= $this->e($task['recurrence_factor']) ?></strong>
+ <?= t('Factor to calculate new due date: ') ?><strong><?= $this->text->e($task['recurrence_factor']) ?></strong>
</li>
<li>
- <?= t('Timeframe to calculate new due date: ') ?><strong><?= $this->e($recurrence_timeframe_list[$task['recurrence_timeframe']]) ?></strong>
+ <?= t('Timeframe to calculate new due date: ') ?><strong><?= $this->text->e($recurrence_timeframe_list[$task['recurrence_timeframe']]) ?></strong>
</li>
<li>
- <?= t('Base date to calculate new due date: ') ?><strong><?= $this->e($recurrence_basedate_list[$task['recurrence_basedate']]) ?></strong>
+ <?= t('Base date to calculate new due date: ') ?><strong><?= $this->text->e($recurrence_basedate_list[$task['recurrence_basedate']]) ?></strong>
</li>
</ul>
</li>
diff --git a/app/Template/tasklink/show.php b/app/Template/tasklink/show.php
index fd8b37a6..82c3d6c9 100644
--- a/app/Template/tasklink/show.php
+++ b/app/Template/tasklink/show.php
@@ -27,7 +27,7 @@
<td>
<?php if ($is_public): ?>
<?= $this->url->link(
- $this->e('#'.$link['task_id'].' '.$link['title']),
+ $this->text->e('#'.$link['task_id'].' '.$link['title']),
'task',
'readonly',
array('task_id' => $link['task_id'], 'token' => $project['token']),
@@ -36,7 +36,7 @@
) ?>
<?php else: ?>
<?= $this->url->link(
- $this->e('#'.$link['task_id'].' '.$link['title']),
+ $this->text->e('#'.$link['task_id'].' '.$link['title']),
'task',
'show',
array('task_id' => $link['task_id'], 'project_id' => $link['project_id']),
@@ -48,21 +48,21 @@
<br>
<?php if (! empty($link['task_time_spent'])): ?>
- <strong><?= $this->e($link['task_time_spent']).'h' ?></strong> <?= t('spent') ?>
+ <strong><?= $this->text->e($link['task_time_spent']).'h' ?></strong> <?= t('spent') ?>
<?php endif ?>
<?php if (! empty($link['task_time_estimated'])): ?>
- <strong><?= $this->e($link['task_time_estimated']).'h' ?></strong> <?= t('estimated') ?>
+ <strong><?= $this->text->e($link['task_time_estimated']).'h' ?></strong> <?= t('estimated') ?>
<?php endif ?>
</td>
- <td><?= $this->e($link['project_name']) ?></td>
- <td><?= $this->e($link['column_title']) ?></td>
+ <td><?= $this->text->e($link['project_name']) ?></td>
+ <td><?= $this->text->e($link['column_title']) ?></td>
<td>
<?php if (! empty($link['task_assignee_username'])): ?>
<?php if ($editable): ?>
- <?= $this->url->link($this->e($link['task_assignee_name'] ?: $link['task_assignee_username']), 'user', 'show', array('user_id' => $link['task_assignee_id'])) ?>
+ <?= $this->url->link($this->text->e($link['task_assignee_name'] ?: $link['task_assignee_username']), 'user', 'show', array('user_id' => $link['task_assignee_id'])) ?>
<?php else: ?>
- <?= $this->e($link['task_assignee_name'] ?: $link['task_assignee_username']) ?>
+ <?= $this->text->e($link['task_assignee_name'] ?: $link['task_assignee_username']) ?>
<?php endif ?>
<?php endif ?>
</td>
diff --git a/app/Template/twofactor/index.php b/app/Template/twofactor/index.php
index b9ee4b49..6e701273 100644
--- a/app/Template/twofactor/index.php
+++ b/app/Template/twofactor/index.php
@@ -4,7 +4,7 @@
<form method="post" action="<?= $this->url->href('twofactor', $user['twofactor_activated'] == 1 ? 'deactivate' : 'show', array('user_id' => $user['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
- <p><?= t('Two-Factor Provider: ') ?><strong><?= $this->e($provider) ?></strong></p>
+ <p><?= t('Two-Factor Provider: ') ?><strong><?= $this->text->e($provider) ?></strong></p>
<div class="form-actions">
<?php if ($user['twofactor_activated'] == 1): ?>
<input type="submit" value="<?= t('Disable two-factor authentication') ?>" class="btn btn-red"/>
diff --git a/app/Template/twofactor/show.php b/app/Template/twofactor/show.php
index d6d8f405..df408035 100644
--- a/app/Template/twofactor/show.php
+++ b/app/Template/twofactor/show.php
@@ -5,7 +5,7 @@
<?php if (! empty($secret) || ! empty($qrcode_url) || ! empty($key_url)): ?>
<div class="listing">
<?php if (! empty($secret)): ?>
- <p><?= t('Secret key: ') ?><strong><?= $this->e($secret) ?></strong></p>
+ <p><?= t('Secret key: ') ?><strong><?= $this->text->e($secret) ?></strong></p>
<?php endif ?>
<?php if (! empty($qrcode_url)): ?>
@@ -13,7 +13,7 @@
<?php endif ?>
<?php if (! empty($key_url)): ?>
- <p><?= t('This QR code contains the key URI: ') ?><a href="<?= $this->e($key_url) ?>"><?= $this->e($key_url) ?></a></p>
+ <p><?= t('This QR code contains the key URI: ') ?><a href="<?= $this->text->e($key_url) ?>"><?= $this->text->e($key_url) ?></a></p>
<?php endif ?>
</div>
<?php endif ?>
diff --git a/app/Template/user/index.php b/app/Template/user/index.php
index 494c1465..364fd965 100644
--- a/app/Template/user/index.php
+++ b/app/Template/user/index.php
@@ -27,13 +27,13 @@
<tr>
<td>
<?= '#'.$user['id'] ?>&nbsp;
- <?= $this->url->link($this->e($user['username']), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link($this->text->e($user['username']), 'user', 'show', array('user_id' => $user['id'])) ?>
</td>
<td>
- <?= $this->e($user['name']) ?>
+ <?= $this->text->e($user['name']) ?>
</td>
<td>
- <a href="mailto:<?= $this->e($user['email']) ?>"><?= $this->e($user['email']) ?></a>
+ <a href="mailto:<?= $this->text->e($user['email']) ?>"><?= $this->text->e($user['email']) ?></a>
</td>
<td>
<?= $this->user->getRoleName($user['role']) ?>
diff --git a/app/Template/user/last.php b/app/Template/user/last.php
index d6c86391..3de4d5e2 100644
--- a/app/Template/user/last.php
+++ b/app/Template/user/last.php
@@ -15,9 +15,9 @@
<?php foreach ($last_logins as $login): ?>
<tr>
<td><?= $this->dt->datetime($login['date_creation']) ?></td>
- <td><?= $this->e($login['auth_type']) ?></td>
- <td><?= $this->e($login['ip']) ?></td>
- <td><?= $this->e($login['user_agent']) ?></td>
+ <td><?= $this->text->e($login['auth_type']) ?></td>
+ <td><?= $this->text->e($login['ip']) ?></td>
+ <td><?= $this->text->e($login['user_agent']) ?></td>
</tr>
<?php endforeach ?>
</table>
diff --git a/app/Template/user/password_reset.php b/app/Template/user/password_reset.php
index 4e9063ef..1371ce11 100644
--- a/app/Template/user/password_reset.php
+++ b/app/Template/user/password_reset.php
@@ -18,8 +18,8 @@
<td><?= $this->dt->datetime($token['date_creation']) ?></td>
<td><?= $this->dt->datetime($token['date_expiration']) ?></td>
<td><?= $token['is_active'] == 0 ? t('No') : t('Yes') ?></td>
- <td><?= $this->e($token['ip']) ?></td>
- <td><?= $this->e($token['user_agent']) ?></td>
+ <td><?= $this->text->e($token['ip']) ?></td>
+ <td><?= $this->text->e($token['user_agent']) ?></td>
</tr>
<?php endforeach ?>
</table>
diff --git a/app/Template/user/profile.php b/app/Template/user/profile.php
index 176a1491..80a633e3 100644
--- a/app/Template/user/profile.php
+++ b/app/Template/user/profile.php
@@ -1,8 +1,8 @@
<section id="main">
<br>
<ul class="listing">
- <li><?= t('Username:') ?> <strong><?= $this->e($user['username']) ?></strong></li>
- <li><?= t('Name:') ?> <strong><?= $this->e($user['name']) ?: t('None') ?></strong></li>
- <li><?= t('Email:') ?> <strong><?= $this->e($user['email']) ?: t('None') ?></strong></li>
+ <li><?= t('Username:') ?> <strong><?= $this->text->e($user['username']) ?></strong></li>
+ <li><?= t('Name:') ?> <strong><?= $this->text->e($user['name']) ?: t('None') ?></strong></li>
+ <li><?= t('Email:') ?> <strong><?= $this->text->e($user['email']) ?: t('None') ?></strong></li>
</ul>
</section> \ No newline at end of file
diff --git a/app/Template/user/sessions.php b/app/Template/user/sessions.php
index 8db02430..d7fe895d 100644
--- a/app/Template/user/sessions.php
+++ b/app/Template/user/sessions.php
@@ -17,8 +17,8 @@
<tr>
<td><?= $this->dt->datetime($session['date_creation']) ?></td>
<td><?= $this->dt->datetime($session['expiration']) ?></td>
- <td><?= $this->e($session['ip']) ?></td>
- <td><?= $this->e($session['user_agent']) ?></td>
+ <td><?= $this->text->e($session['ip']) ?></td>
+ <td><?= $this->text->e($session['user_agent']) ?></td>
<td><?= $this->url->link(t('Remove'), 'User', 'removeSession', array('user_id' => $user['id'], 'id' => $session['id']), true) ?></td>
</tr>
<?php endforeach ?>
diff --git a/app/Template/user/show.php b/app/Template/user/show.php
index 9da56666..df0affb8 100644
--- a/app/Template/user/show.php
+++ b/app/Template/user/show.php
@@ -2,9 +2,9 @@
<h2><?= t('Summary') ?></h2>
</div>
<ul class="listing">
- <li><?= t('Username:') ?> <strong><?= $this->e($user['username']) ?></strong></li>
- <li><?= t('Name:') ?> <strong><?= $this->e($user['name']) ?: t('None') ?></strong></li>
- <li><?= t('Email:') ?> <strong><?= $this->e($user['email']) ?: t('None') ?></strong></li>
+ <li><?= t('Username:') ?> <strong><?= $this->text->e($user['username']) ?></strong></li>
+ <li><?= t('Name:') ?> <strong><?= $this->text->e($user['name']) ?: t('None') ?></strong></li>
+ <li><?= t('Email:') ?> <strong><?= $this->text->e($user['email']) ?: t('None') ?></strong></li>
<li><?= t('Status:') ?> <strong><?= $user['is_active'] ? t('Active') : t('Inactive') ?></strong></li>
</ul>
diff --git a/app/Template/user/timesheet.php b/app/Template/user/timesheet.php
index 4a6e42c5..92ebafb5 100644
--- a/app/Template/user/timesheet.php
+++ b/app/Template/user/timesheet.php
@@ -16,8 +16,8 @@
</tr>
<?php foreach ($subtask_paginator->getCollection() as $record): ?>
<tr>
- <td><?= $this->url->link($this->e($record['task_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td>
- <td><?= $this->url->link($this->e($record['subtask_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td>
+ <td><?= $this->url->link($this->text->e($record['task_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td>
+ <td><?= $this->url->link($this->text->e($record['subtask_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td>
<td><?= $this->dt->datetime($record['start']) ?></td>
<td><?= $this->dt->datetime($record['end']) ?></td>
<td><?= n($record['time_spent']).' '.t('hours') ?></td>
diff --git a/app/common.php b/app/common.php
index e2fe6aff..71f80c75 100644
--- a/app/common.php
+++ b/app/common.php
@@ -26,6 +26,7 @@ require __DIR__.'/constants.php';
require __DIR__.'/check_setup.php';
$container = new Pimple\Container;
+$container->register(new Kanboard\ServiceProvider\HelperProvider);
$container->register(new Kanboard\ServiceProvider\SessionProvider);
$container->register(new Kanboard\ServiceProvider\LoggingProvider);
$container->register(new Kanboard\ServiceProvider\DatabaseProvider);