Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 289155 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java (-6 / +13 lines)
Lines 435-441 Link Here
435
			authenticate(new SubProgressMonitor(monitor, 1));
435
			authenticate(new SubProgressMonitor(monitor, 1));
436
			String queryUrl = query.getUrl();
436
			String queryUrl = query.getUrl();
437
			int start = queryUrl.indexOf('?');
437
			int start = queryUrl.indexOf('?');
438
438
			BugzillaVersion bugzillaVersion;
439
			if (repositoryConfiguration != null) {
440
				bugzillaVersion = repositoryConfiguration.getInstallVersion();
441
			} else {
442
				bugzillaVersion = BugzillaVersion.MIN_VERSION;
443
			}
444
			boolean newNameForLongDesc = !(bugzillaVersion.compareMajorMinorOnly(BugzillaVersion.BUGZILLA_3_4) < 0);
439
			List<NameValuePair> pairs = new ArrayList<NameValuePair>();
445
			List<NameValuePair> pairs = new ArrayList<NameValuePair>();
440
			if (start != -1) {
446
			if (start != -1) {
441
				queryUrl = queryUrl.substring(start + 1);
447
				queryUrl = queryUrl.substring(start + 1);
Lines 448-460 Link Here
448
						} else if (nameValue.length == 2 && nameValue[0] != null && nameValue[1] != null) {
454
						} else if (nameValue.length == 2 && nameValue[0] != null && nameValue[1] != null) {
449
455
450
							//Hack around bugzilla's change of attribute name for comment search field bug#289155
456
							//Hack around bugzilla's change of attribute name for comment search field bug#289155
451
							if (nameValue[0].startsWith("long_desc")) {
457
							// This is for Bugzilla Versions >= 3.4
452
								pairs.add(new NameValuePair(nameValue[0].replace("long_desc", "longdesc"),
458
							if (newNameForLongDesc && nameValue[0].startsWith("long_desc")) { //$NON-NLS-1$
459
								pairs.add(new NameValuePair(nameValue[0].replace("long_desc", "longdesc"), //$NON-NLS-1$//$NON-NLS-2$
453
										URLDecoder.decode(nameValue[1].trim(), getCharacterEncoding())));
460
										URLDecoder.decode(nameValue[1].trim(), getCharacterEncoding())));
461
							} else {
462
								pairs.add(new NameValuePair(nameValue[0].trim(), URLDecoder.decode(nameValue[1].trim(),
463
										getCharacterEncoding())));
454
							}
464
							}
455
456
							pairs.add(new NameValuePair(nameValue[0].trim(), URLDecoder.decode(nameValue[1].trim(),
457
									getCharacterEncoding())));
458
						}
465
						}
459
					}
466
					}
460
				}
467
				}

Return to bug 289155