From 8677ae95ee79c3aa503edbfa236991aed6ba7543 Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Mon, 7 Jun 2010 20:20:03 +0000 Subject: [PATCH] Small fixes --- Common/dataobjects/Board.cs | 2 +- IISMainHandler/handlers/DebugHandler.cs | 8 +++----- MySQLConnector/Connection.cs | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Common/dataobjects/Board.cs b/Common/dataobjects/Board.cs index 248eb28..bdb2078 100644 --- a/Common/dataobjects/Board.cs +++ b/Common/dataobjects/Board.cs @@ -53,7 +53,7 @@ namespace FLocal.Common.dataobjects { protected override void doFromHash(Dictionary data) { this._name = data["name"]; - this._description = data["description"]; + this._description = data["comment"]; this._lastPostId = int.Parse(data["lastPostId"]); this._categoryId = int.Parse(data["categoryId"]); } diff --git a/IISMainHandler/handlers/DebugHandler.cs b/IISMainHandler/handlers/DebugHandler.cs index 6d1180d..1c95c85 100644 --- a/IISMainHandler/handlers/DebugHandler.cs +++ b/IISMainHandler/handlers/DebugHandler.cs @@ -26,13 +26,11 @@ namespace FLocal.IISHandler.handlers { context.httpresponse.WriteLine(transaction.GetHashCode().ToString()); } } - if(context.httprequest.Path == "/boards") { - /*Board board = Board.LoadById(1); + if(context.httprequest.Path == "/boards/") { + Board board = Board.LoadById(1); context.httpresponse.WriteLine("name: " + board.name); context.httpresponse.WriteLine("description: " + board.description); - context.httpresponse.WriteLine("categoryname: " + board.category.name);*/ - Category category = Category.LoadById(1); - context.httpresponse.WriteLine("categoryname: " + category.name); + context.httpresponse.WriteLine("categoryname: " + board.category.name); } } diff --git a/MySQLConnector/Connection.cs b/MySQLConnector/Connection.cs index 80d53dd..70e2090 100644 --- a/MySQLConnector/Connection.cs +++ b/MySQLConnector/Connection.cs @@ -40,6 +40,7 @@ namespace FLocal.MySQLConnector { } command.CommandText = "SELECT * FROM " + table.compile() + " WHERE " + table.getIdSpec().compile() + " IN (" + string.Join(", ", placeholder.ToArray()) + ")"; + command.Prepare(); foreach(KeyValuePair kvp in paramsHolder.data) { command.Parameters.AddWithValue(kvp.Key, kvp.Value); }