Indefero

Indefero Commit Details


Date:2011-05-31 03:51:24 (13 years 6 months ago)
Author:Thomas Keller
Branch:develop, feature.content-md5, feature.diff-whitespace, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, release-1.2, release-1.3
Commit:9bcb5f9456b72b565faf56b3c97bb71fbf98c565
Parents: f412099f690debaab49e220e9fab70ae75ccbd6b
Message:Fix a PHP notice / Pluf exception in case any issue type field is cleared.

Changes:

File differences

src/IDF/Form/IssueCreate.php
373373
374374
375375
376
377
378
379
380
381
382
383
384
385
386
387
376
377
378
379
380
388381
389
390
391
392
393
394
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
395398
396399
397400
foreach ($tags as $tag) {
$issue->setAssoc($tag);
}
// add relations
$verb = $this->cleaned_data['relation_type0'];
$other_verb = $this->relation_types[$verb];
$related_issues = preg_split('/\s*,\s*/', $this->cleaned_data['relation_issue0'], -1, PREG_SPLIT_NO_EMPTY);
foreach ($related_issues as $related_issue_id) {
$related_issue = new IDF_Issue($related_issue_id);
$rel = new IDF_IssueRelation();
$rel->issue = $issue;
$rel->verb = $verb;
$rel->other_issue = $related_issue;
$rel->submitter = $this->user;
$rel->create();
// add relations (if any)
if (!empty($this->cleaned_data['relation_type0'])) {
$verb = $this->cleaned_data['relation_type0'];
$other_verb = $this->relation_types[$verb];
$related_issues = preg_split('/\s*,\s*/', $this->cleaned_data['relation_issue0'], -1, PREG_SPLIT_NO_EMPTY);
$other_rel = new IDF_IssueRelation();
$other_rel->issue = $related_issue;
$other_rel->verb = $other_verb;
$other_rel->other_issue = $issue;
$other_rel->submitter = $this->user;
$other_rel->create();
foreach ($related_issues as $related_issue_id) {
$related_issue = new IDF_Issue($related_issue_id);
$rel = new IDF_IssueRelation();
$rel->issue = $issue;
$rel->verb = $verb;
$rel->other_issue = $related_issue;
$rel->submitter = $this->user;
$rel->create();
$other_rel = new IDF_IssueRelation();
$other_rel->issue = $related_issue;
$other_rel->verb = $other_verb;
$other_rel->other_issue = $issue;
$other_rel->submitter = $this->user;
$other_rel->create();
}
}
// add the first comment
src/IDF/Form/IssueUpdate.php
208208
209209
210210
211
212
213
211214
212215
213216
$normRelatedIssues = array();
for ($idx = 0; isset($this->cleaned_data['relation_type'.$idx]); ++$idx) {
$verb = $this->cleaned_data['relation_type'.$idx];
if (empty($verb))
continue;
$ids = preg_split('/\s*,\s*/', $this->cleaned_data['relation_issue'.$idx],
-1, PREG_SPLIT_NO_EMPTY);
if (count($ids) == 0)

Archive Download the corresponding diff file

Page rendered in 0.08958s using 13 queries.