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;
using FLocal.Core.DB; using FLocal.Core.DB;
using FLocal.Core.DB.conditions; using FLocal.Core.DB.conditions;
using FLocal.Common.URL;
namespace FLocal.IISHandler.handlers.response { namespace FLocal.IISHandler.handlers.response {
@ -55,7 +56,7 @@ namespace FLocal.IISHandler.handlers.response {
select account.user.exportToXmlForViewing( select account.user.exportToXmlForViewing(
context, context,
new XElement("lastActivity", session.lastHumanActivity.ToXml()), 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>
<td> <td>
<a> <a>
<xsl:attribute name="href"><xsl:value-of select="lastUrl"/></xsl:attribute> <xsl:attribute name="href"><xsl:value-of select="lastUrl/url"/></xsl:attribute>
<xsl:value-of select="lastUrl"/> <xsl:value-of select="lastUrl/title"/>
</a> </a>
</td> </td>
</tr> </tr>

@ -13,7 +13,10 @@
</title> </title>
<description> <description>
<xsl:text>Ïîñåùàåò </xsl:text> <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> </description>
<link> <link>
<xsl:value-of select="$mainUrl"/> <xsl:value-of select="$mainUrl"/>

Loading…
Cancel
Save