Indefero

Indefero Commit Details


Date:2011-01-06 03:26:29 (13 years 11 months ago)
Author:William MARTIN
Branch:develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:5635cdcac7af2f798c24c8ae474dfa94ee42abc4
Parents: dd05a58c8c94f52eb24ed093eb0ea5381d181f02
Message:Remove the use of GROUP_CONCAT in SQL request.

Changes:

File differences

src/IDF/Views/Issue.php
174174
175175
176176
177
178
179
177
178
179
180
181
182
180183
181184
182185
// Get the id list of issue in the user watch list (for all projects !)
$db =& Pluf::db();
$issues_id = $db->select('SELECT GROUP_CONCAT(idf_issue_id) as id FROM '.Pluf::f('db_table_prefix', '').'idf_issue_pluf_user_assoc WHERE pluf_user_id='.$request->user->id.' GROUP BY pluf_user_id');
if (empty ($issues_id)) $issues_id = "";
else $issues_id = $issues_id[0]['id'];
$sql_results = $db->select('SELECT idf_issue_id as id FROM '.Pluf::f('db_table_prefix', '').'idf_issue_pluf_user_assoc WHERE pluf_user_id='.$request->user->id);
$issues_id = array();
foreach ($sql_results as $id) {
array_push($issues_id, $id['id']);
}
$issues_id = implode (',', $issues_id);
// Count open and close issues
$sql = new Pluf_SQL('id IN ('.$issues_id.') AND status IN ('.implode(', ', $otags).')', array());

Archive Download the corresponding diff file

Page rendered in 0.07255s using 13 queries.