added: 'rm' function can remove auth content now

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@597 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-03-15 17:09:45 +00:00
parent 6fbcffe63b
commit aff4cc516e
7 changed files with 162 additions and 79 deletions

View File

@@ -1352,8 +1352,6 @@ Error Db::DelItemCountContents(const Item & item, long & contents)
AssertResultStatus(r, PGRES_TUPLES_OK);
contents = atol( AssertValue(r, 0, 0) );
log << log2 << "counters: " << contents << logend; // !! nie potrzebne w logach
}
catch(const Error & e)
{
@@ -1830,8 +1828,13 @@ Error Db::RemoveThread(long dir_id)
query << "delete from core.thread where dir_id='" << dir_id << "';";
const char * crows = PQcmdTuples(r);
long rows = 0;
if( crows )
log << log2 << "Db: deleted " << atol(crows) << " rows from core.thread" << logend;
rows = atol(crows);
if( rows > 0 )
log << log2 << "Db: deleted " << rows << " rows from core.thread" << logend;
r = AssertQuery(query.str());
AssertResultStatus(r, PGRES_COMMAND_OK);
@@ -2081,8 +2084,13 @@ Error Db::RemoveTicket(long dir_id)
query << "delete from core.ticket where dir_id='" << dir_id << "';";
const char * crows = PQcmdTuples(r);
long rows = 0;
if( crows )
log << log2 << "Db: deleted " << atol(crows) << " rows from core.ticket" << logend;
rows = atol(crows);
if( rows > 0 )
log << log2 << "Db: deleted " << rows << " rows from core.ticket" << logend;
r = AssertQuery(query.str());
AssertResultStatus(r, PGRES_COMMAND_OK);