Fix ambiguous column name with very old version of Sqlite

This commit is contained in:
Frederic Guillot 2016-03-04 22:21:54 -05:00
parent f9f5d7188b
commit 9b68c3bc77
3 changed files with 7 additions and 2 deletions

View File

@ -9,6 +9,10 @@ Security issues:
* Access allowed to any tasks from the shared public board by changing the URL parameters
Bug fixes:
* Ambiguous column name with very old version of Sqlite
Version 1.0.26
--------------

View File

@ -2,6 +2,7 @@
namespace Kanboard\Controller;
use Kanboard\Model\Project as ProjectModel;
use Kanboard\Model\Subtask as SubtaskModel;
/**
@ -26,7 +27,7 @@ class App extends Base
return $this->paginator
->setUrl('app', $action, array('pagination' => 'projects', 'user_id' => $user_id))
->setMax($max)
->setOrder('name')
->setOrder(ProjectModel::TABLE.'.name')
->setQuery($this->project->getQueryColumnStats($this->projectPermission->getActiveProjectIds($user_id)))
->calculateOnlyIf($this->request->getStringParam('pagination') === 'projects');
}

View File

@ -8,7 +8,7 @@
<tr>
<th class="column-5"><?= $paginator->order('Id', 'id') ?></th>
<th class="column-3"><?= $paginator->order('<i class="fa fa-lock fa-fw" title="'.t('Private project').'"></i>', 'is_private') ?></th>
<th class="column-25"><?= $paginator->order(t('Project'), 'name') ?></th>
<th class="column-25"><?= $paginator->order(t('Project'), \Kanboard\Model\Project::TABLE.'.name') ?></th>
<th><?= t('Columns') ?></th>
</tr>
<?php foreach ($paginator->getCollection() as $project): ?>