Who is online verbosity improved

main
Inga 🏳‍🌈 14 years ago
parent 354dcf497f
commit 16b7cf77a7
  1. 2
      Builder/IISMainHandler/build.txt
  2. 9
      Common/URL/UrlManager.cs
  3. 3
      IISMainHandler/handlers/response/WhoIsOnlineHandler.cs
  4. 4
      templates/Full/WhoIsOnline.xslt
  5. 5
      templates/Rss/WhoIsOnline.xslt

@ -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;
}
}
}
}

@ -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
)
)
};

@ -50,8 +50,8 @@
</td>
<td>
<a>
<xsl:attribute name="href"><xsl:value-of select="lastUrl"/></xsl:attribute>
<xsl:value-of select="lastUrl"/>
<xsl:attribute name="href"><xsl:value-of select="lastUrl/url"/></xsl:attribute>
<xsl:value-of select="lastUrl/title"/>
</a>
</td>
</tr>

@ -13,7 +13,10 @@
</title>
<description>
<xsl:text>Ïîñåùàåò </xsl:text>
<xsl:value-of select="lastUrl"/>
<xsl:value-of select="lastUrl/url"/>
<xsl:text> (</xsl:text>
<xsl:value-of select="lastUrl/title"/>
<xsl:text>)</xsl:text>
</description>
<link>
<xsl:value-of select="$mainUrl"/>

Loading…
Cancel
Save