diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index 10c8942..478c1d4 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -1409 \ No newline at end of file +1411 \ No newline at end of file diff --git a/Common/URL/UrlManager.cs b/Common/URL/UrlManager.cs index 37e1c7d..59ebb2c 100644 --- a/Common/URL/UrlManager.cs +++ b/Common/URL/UrlManager.cs @@ -323,5 +323,14 @@ namespace FLocal.Common.URL { } } + public static string TryGetTitle(string Path) { + try { + AbstractUrl url = Parse(Path, new NameValueCollection(), true); + return url.title; + } catch(Exception) { + return Path; + } + } + } } diff --git a/IISMainHandler/handlers/response/WhoIsOnlineHandler.cs b/IISMainHandler/handlers/response/WhoIsOnlineHandler.cs index 4450204..9503441 100644 --- a/IISMainHandler/handlers/response/WhoIsOnlineHandler.cs +++ b/IISMainHandler/handlers/response/WhoIsOnlineHandler.cs @@ -9,6 +9,7 @@ using FLocal.Common.dataobjects; using FLocal.Core; using FLocal.Core.DB; using FLocal.Core.DB.conditions; +using FLocal.Common.URL; namespace FLocal.IISHandler.handlers.response { @@ -55,7 +56,7 @@ namespace FLocal.IISHandler.handlers.response { select account.user.exportToXmlForViewing( context, new XElement("lastActivity", session.lastHumanActivity.ToXml()), - !account.isDetailedStatusHidden ? new XElement("lastUrl", session.lastUrl) : null + !account.isDetailedStatusHidden ? new XElement("lastUrl", new XElement("url", session.lastUrl), new XElement("title", UrlManager.TryGetTitle(session.lastUrl))) : null ) ) }; diff --git a/templates/Full/WhoIsOnline.xslt b/templates/Full/WhoIsOnline.xslt index 586bcc2..762dd00 100644 --- a/templates/Full/WhoIsOnline.xslt +++ b/templates/Full/WhoIsOnline.xslt @@ -50,8 +50,8 @@ - - + + diff --git a/templates/Rss/WhoIsOnline.xslt b/templates/Rss/WhoIsOnline.xslt index 2238c80..18e499a 100644 --- a/templates/Rss/WhoIsOnline.xslt +++ b/templates/Rss/WhoIsOnline.xslt @@ -13,7 +13,10 @@ Посещает - + + ( + + )