Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
[BugFix] Date in the changelog of v3.4 was wrong
Browse files Browse the repository at this point in the history
[BugFix] Manual redirects not working with root set to / ([#62](#62))
[Improvement] 404 Not Found View CSS ([#27](#27))
  • Loading branch information
kipusoep committed Feb 20, 2015
1 parent 63b8764 commit a2af5ec
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Modules/UrlTrackerModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ static void UrlTrackerDo(string callingEventName, bool ignoreHttpStatusCode = fa
if (!redirectHttpCode.HasValue)
{
// Regex matching
query = "SELECT * FROM icUrlTracker WHERE Is404 = 0 AND ForceRedirect = @forceRedirect AND RedirectRootNodeId = @redirectRootNodeId AND OldRegex IS NOT NULL ORDER BY Inserted DESC";
query = "SELECT * FROM icUrlTracker WHERE Is404 = 0 AND ForceRedirect = @forceRedirect AND (RedirectRootNodeId = @redirectRootNodeId OR RedirectRootNodeId = -1) AND OldRegex IS NOT NULL ORDER BY Inserted DESC";
using (IRecordsReader reader = _sqlHelper.ExecuteReader(query, _sqlHelper.CreateParameter("forceRedirect", ignoreHttpStatusCode ? 1 : 0), _sqlHelper.CreateParameter("redirectRootNodeId", rootNodeId)))

{
Expand Down Expand Up @@ -351,7 +351,7 @@ static void UrlTrackerDo(string callingEventName, bool ignoreHttpStatusCode = fa

static void LoadUrlTrackerMatchesFromDatabase(HttpRequest request, string urlWithoutQueryString, bool urlHasQueryString, string shortestUrl, int rootNodeId, ref string redirectUrl, ref int? redirectHttpCode, ref bool redirectPassThroughQueryString)
{
string query = "SELECT * FROM icUrlTracker WHERE Is404 = 0 AND ForceRedirect = 0 AND (RedirectRootNodeId = @redirectRootNodeId OR RedirectRootNodeId IS NULL) AND (OldUrl = @url OR OldUrl = @shortestUrl) ORDER BY CASE WHEN RedirectHttpCode = 410 THEN 2 ELSE 1 END, OldUrlQueryString DESC";
string query = "SELECT * FROM icUrlTracker WHERE Is404 = 0 AND ForceRedirect = 0 AND (RedirectRootNodeId = @redirectRootNodeId OR RedirectRootNodeId IS NULL OR RedirectRootNodeId = -1) AND (OldUrl = @url OR OldUrl = @shortestUrl) ORDER BY CASE WHEN RedirectHttpCode = 410 THEN 2 ELSE 1 END, OldUrlQueryString DESC";
using (IRecordsReader reader = _sqlHelper.ExecuteReader(query, _sqlHelper.CreateParameter("redirectRootNodeId", rootNodeId), _sqlHelper.CreateParameter("url", urlWithoutQueryString), _sqlHelper.CreateParameter("shortestUrl", shortestUrl)))
{
while (reader.Read())
Expand Down Expand Up @@ -443,7 +443,7 @@ static void LoadUrlTrackerMatchesFromCache(HttpRequest request, string urlWithou
if (forcedRedirects == null || !forcedRedirects.Any())
return;

foreach (UrlTrackerModel forcedRedirect in forcedRedirects.Where(x => !x.Is404 && x.RedirectRootNodeId == rootNodeId && (x.OldUrl.ToLower() == urlWithoutQueryString.ToLower() || x.OldUrl.ToLower() == shortestUrl.ToLower())).OrderBy(x => x.RedirectHttpCode == 410 ? 2 : 1).ThenByDescending(x => x.OldUrlQueryString))
foreach (UrlTrackerModel forcedRedirect in forcedRedirects.Where(x => !x.Is404 && (x.RedirectRootNodeId == rootNodeId || x.RedirectRootNodeId == -1) && (x.OldUrl.ToLower() == urlWithoutQueryString.ToLower() || x.OldUrl.ToLower() == shortestUrl.ToLower())).OrderBy(x => x.RedirectHttpCode == 410 ? 2 : 1).ThenByDescending(x => x.OldUrlQueryString))
{
LoggingHelper.LogInformation("UrlTracker HttpModule | URL match found");
if (forcedRedirect.RedirectNodeId.HasValue && forcedRedirect.RedirectHttpCode != (int)HttpStatusCode.Gone)
Expand Down
2 changes: 1 addition & 1 deletion Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.4.*")]
[assembly: AssemblyVersion("3.5.*")]

// SQL
[assembly: WebResource("InfoCaster.Umbraco.UrlTracker.SQL.MicrosoftSqlServer.create-table-1.sql", "text/plain")]
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ Set to true to disable tracking not found (404) requests.
Set to false to disable appending a port number to redirect URLs

## Changelog ##
* 3.4 [2014/01/28]
* 3.5 [2015/02/20]
* [BugFix] Date in the changelog of v3.4 was wrong
* [BugFix] Manual redirects not working with root set to / ([#62](https://github.com/kipusoep/UrlTracker/issues/62))
* [Improvement] 404 Not Found View CSS ([#27](https://github.com/kipusoep/UrlTracker/issues/27))
* 3.4 [2015/01/28]
* [BugFix] "Remove at" not working properly ([#49](https://github.com/kipusoep/UrlTracker/issues/49))
* [BugFix] Error during installation: 'ASP.UmbracoHelper' does not contain a definition for 'IsVersion7OrNewer' ([#52](https://github.com/kipusoep/UrlTracker/issues/52))
* [BugFix] JavaScripts errors in backend in IE11 ([#31](https://github.com/kipusoep/UrlTracker/issues/31), updated jQuery)
Expand Down
10 changes: 9 additions & 1 deletion UI/UrlTrackerInfo.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@
<div class="tab-pane" id="changeLog">
<ul>
<li>
3.4 [2014/01/28]
3.5 [2015/02/20]
<ul>
<li>[BugFix] Date in the changelog of v3.4 was wrong</li>
<li>[BugFix] Manual redirects not working with root set to / (<a target="_blank" href="https://github.com/kipusoep/UrlTracker/issues/62">#62</a>)</li>
<li>[Improvement] 404 Not Found View CSS (<a target="_blank" href="https://github.com/kipusoep/UrlTracker/issues/27">#27</a>)</li>
</ul>
</li>
<li>
3.4 [2015/01/28]
<ul>
<li>[BugFix] "Remove at" not working properly (<a target="_blank" href="https://github.com/kipusoep/UrlTracker/issues/49">#49</a>)</li>
<li>[BugFix] Error during installation: 'ASP.UmbracoHelper' does not contain a definition for 'IsVersion7OrNewer' (<a target="_blank" href="https://github.com/kipusoep/UrlTracker/issues/52">#52</a>)</li>
Expand Down
2 changes: 0 additions & 2 deletions UI/UrlTrackerManagerWrapper.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<img src="<%= Page.ClientScript.GetWebResourceUrl(typeof(UrlTrackerResources), "InfoCaster.Umbraco.UrlTracker.UI.res.img.info.png") %>" alt="Info" /></a>
<img src="<%= Page.ClientScript.GetWebResourceUrl(typeof(UrlTrackerResources), "InfoCaster.Umbraco.UrlTracker.UI.res.img.urltracker-icon.png") %>" alt="UrlTracker" class="dashboardIcon" />
<script type="text/javascript">
//<![CDATA[
var $urlTrackerIframe;
$(function () {
$urlTrackerIframe = $("#urlTrackerIframe");
Expand All @@ -28,7 +27,6 @@
}
$urlTrackerIframe.height(parseInt($heightElement.height()) - heightToSubtract);
}
//]]>
</script>
<iframe scrolling="auto" frameborder="0" marginheight="0" marginwidth="0" id="urlTrackerIframe" seamless="seamless" name="urltracker" src="<%= UrlTrackerResources.UrlTrackerManagerUrl %>" style="width: 100%;"></iframe>
</div>
9 changes: 9 additions & 0 deletions UI/res/css/urltracker.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ table {
word-break: break-all;
}

.table td, .table th {
-ms-text-overflow: ellipsis;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 400px;
overflow: hidden;
}

.error, .warning, .success, .info {
padding: 10px;
margin-bottom: .5em;
Expand Down

0 comments on commit a2af5ec

Please sign in to comment.