Fix minor issues

This commit is contained in:
Frederic Guillot 2015-07-19 18:54:00 -04:00
parent 56c08e55f7
commit 33a3196001
9 changed files with 18 additions and 12 deletions

View File

@ -5,3 +5,7 @@ filter:
- app/Schema/*
- app/Template/*
- app/Locale/*
- app/Library/*
- app/constants.php
- app/common.php
- app/check_setup.php

View File

@ -140,7 +140,7 @@ class Comment extends Base
$this->session->flashError(t('Unable to update your comment.'));
}
$this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), 'comment-'.$comment['id']);
$this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comment-'.$comment['id']));
}
$this->edit($values, $errors);
@ -181,6 +181,6 @@ class Comment extends Base
$this->session->flashError(t('Unable to remove this comment.'));
}
$this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), 'comments');
$this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comments'));
}
}

View File

@ -50,7 +50,7 @@ class Taskduplication extends Base
if ($this->request->isPost()) {
$values = $this->request->getValues();
list($valid, $errors) = $this->taskValidator->validateProjectModification($values);
list($valid,) = $this->taskValidator->validateProjectModification($values);
if ($valid && $this->taskDuplication->moveToProject($task['id'],
$values['project_id'],
@ -81,7 +81,7 @@ class Taskduplication extends Base
if ($this->request->isPost()) {
$values = $this->request->getValues();
list($valid, $errors) = $this->taskValidator->validateProjectModification($values);
list($valid,) = $this->taskValidator->validateProjectModification($values);
if ($valid && $this->taskDuplication->duplicateToProject($task['id'],
$values['project_id'],
@ -104,6 +104,8 @@ class Taskduplication extends Base
* Choose destination when move/copy task to another project
*
* @access private
* @param array $task
* @param string $template
*/
private function chooseDestination(array $task, $template)
{

View File

@ -18,6 +18,9 @@ use Pimple\Container;
* @property \Core\Session $session
* @property \Core\Template $template
* @property \Core\MemoryCache $memoryCache
* @property \Core\OAuth2 $oauth
* @property \Core\Router $router
* @property \Core\Lexer $lexer
* @property \Integration\BitbucketWebhook $bitbucketWebhook
* @property \Integration\GithubWebhook $githubWebhook
* @property \Integration\GitlabWebhook $gitlabWebhook
@ -58,6 +61,7 @@ use Pimple\Container;
* @property \Model\SubtaskTimeTracking $subtaskTimeTracking
* @property \Model\Swimlane $swimlane
* @property \Model\Task $task
* @property \Model\TaskAnalytic $taskAnalytic
* @property \Model\TaskCreation $taskCreation
* @property \Model\TaskDuplication $taskDuplication
* @property \Model\TaskExport $taskExport

View File

@ -313,7 +313,7 @@ class Paginator
$this->page = 1;
}
$this->offset = ($this->page - 1) * $this->limit;
$this->offset = (int) (($this->page - 1) * $this->limit);
return $this;
}

View File

@ -81,7 +81,7 @@ class Jabber extends \Core\Base
$payload = '['.$project['name'].'] '.str_replace('"', '"', $this->projectActivity->getTitle($event)).(isset($event['task']['title']) ? ' ('.$event['task']['title'].')' : '');
if ($this->config->get('application_url')) {
$payload .= ' '.$this->helper->url->to('task', 'show', array('task_id' => $task_id, 'project_id' => $project_id), false, '', true);
$payload .= ' '.$this->helper->url->to('task', 'show', array('task_id' => $task_id, 'project_id' => $project_id), '', true);
}
$this->sendMessage($project_id, $payload);

View File

@ -216,7 +216,6 @@ class Action extends Base
*/
public function remove($action_id)
{
// $this->container['fileCache']->remove('proxy_action_getAll');
return $this->db->table(self::TABLE)->eq('id', $action_id)->remove();
}
@ -260,8 +259,6 @@ class Action extends Base
$this->db->closeTransaction();
// $this->container['fileCache']->remove('proxy_action_getAll');
return $action_id;
}
@ -272,7 +269,6 @@ class Action extends Base
*/
public function attachEvents()
{
//$actions = $this->container['fileCache']->proxy('action', 'getAll');
$actions = $this->getAll();
foreach ($actions as $action) {

View File

@ -281,7 +281,7 @@ class Board extends Base
$sum = 0;
foreach ($tasks as $task) {
$sum += $task['score'];
$sum += $task[$field];
}
return $sum;

View File

@ -100,7 +100,7 @@ class DateParser extends Base
* Get all combinations of date/time formats
*
* @access public
* @return []string
* @return string[]
*/
public function getAllFormats()
{