a note on billls,

+refactoring

* instdbws.sql:
* BlogsController.cs:
* NpgsqlBlogProvider.cs: Implements the note

* robots.txt:
* Web.config:
* Web.csproj:
* Catalog.xml:
* Global.asax.cs:
* pgsql.xcf:
* p8-av4.png:
* pgsql.jpeg:
* logoDev.png:
* logoDev.xcf:
* debian-pb.gif:
* apache_pb.gif:
* theme.css:
* style.css:
* apache_pby.gif:
* apache_pbw.gif:
* Book.aspx:
* jquery-ui.css:
* Login.aspx:
* debian-powered.png:
* BlogManager.cs:
* FhHRx.gif:
* pgsql.png:
* TagControl.ascx:
* jquery-ui.min.css:
* BlogProvider.cs:
* theme.css:
* p8-av4.s.jpg:
* test-domain-TestAPI.config:
* noavatar.png:
* p8-av4.xxs.jpg:
* apache_pbw.png:
* debian-logo.png:
* TestCatalogInit.cs:
* Mono-powered.png:
* helix-nebula-1400x1400.l.jpg:
* star-939235_1280.jpg:
* animated-overlay.gif:
* star-939235_1280.s.jpg:
* sign-in-with-google.png:
* star-939235_1280.xxs.jpg:
* sign-in-with-google-s.png:
* helix-nebula-1400x1400.jpg:
* helix-nebula-1400x1400.s.jpg:
* helix-nebula-1400x1400.xxs.jpg: removes the /images folder from the app root folder,
  all images are moved to /App_Themes/images
This commit is contained in:
2015-11-04 11:04:22 +01:00
parent c90b54d642
commit 7bf9b6a771
53 changed files with 217 additions and 103 deletions

View File

@ -1,3 +1,7 @@
2015-11-04 Paul Schneider <paul@pschneider.fr>
* NpgsqlBlogProvider.cs: Implements the note
2015-10-19 Paul Schneider <paul@pschneider.fr>
* NpgsqlTagInfo.cs: Fixes the photo retreival

View File

@ -21,6 +21,25 @@ namespace Npgsql.Web.Blog
string connectionString;
#region implemented abstract members of BlogProvider
/// <summary>
/// Note the specified postid and note.
/// </summary>
/// <param name="postid">Postid.</param>
/// <param name="note">Note.</param>
public override void Note (long postid, int note)
{
using (NpgsqlConnection cnx = new NpgsqlConnection (connectionString))
using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
cmd.CommandText = "update blogs set note = :note where _id = :pid)";
cmd.Parameters.AddWithValue ("note", note);
cmd.Parameters.AddWithValue ("pid", postid);
cnx.Open ();
cmd.ExecuteNonQuery ();
cnx.Close ();
}
}
/// <summary>
/// Gets the tag info.
/// </summary>
@ -147,7 +166,7 @@ namespace Npgsql.Web.Blog
}
cnx.Close ();
}
UpdatePostCircles (postid, cids);
if (cids != null) UpdatePostCircles (postid, cids);
}
/// <summary>
@ -555,7 +574,8 @@ namespace Npgsql.Web.Blog
}
cnx.Close ();
}
UpdatePostCircles (pid, circles);
if (circles != null)
UpdatePostCircles (pid, circles);
return pid;
}
@ -587,7 +607,6 @@ namespace Npgsql.Web.Blog
cmd.Parameters.AddWithValue ("pid", pid);
cmd.ExecuteNonQuery ();
}
if (circles != null)
if (circles.Length > 0)
using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
cmd.CommandText = "insert into blog_access (post_id,circle_id) values (:pid,:cid)";