fixed: dots in url-es (now only one dot is available in the whole name and it cannot be only one dot ".")
added: cmslu can act as an authorizer (fast cgi authorize role) added: Item::static_auth we can have additional static content on the file system this content is authorized through cmslu (fastcgi authorizer mode) changed: some changes in config changed: the way how the www server is using cmslu added new virtuals: static static_auth changed: cmslu returns correct http headers (200, 404, 403) changed: in cookie parser: we get the last cookie (if the server has more than one cookie with the same name) git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@540 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
15
core/db.cpp
15
core/db.cpp
@@ -420,7 +420,8 @@ Error Db::AddItemIntoItem(Item & item)
|
||||
{
|
||||
AssertConnection();
|
||||
std::ostringstream query;
|
||||
query << "insert into core.item (user_id, group_id, privileges, date_creation, date_modification, type, parent_id, content_id, default_item, subject, guest_name, url) values (";
|
||||
query << "insert into core.item (user_id, group_id, privileges, date_creation, date_modification, type, "
|
||||
"parent_id, content_id, static_auth, default_item, subject, guest_name, url) values (";
|
||||
query << '\'' << item.user_id << "', ";
|
||||
query << '\'' << item.group_id << "', ";
|
||||
query << '\'' << item.privileges << "', ";
|
||||
@@ -429,9 +430,11 @@ Error Db::AddItemIntoItem(Item & item)
|
||||
query << '\'' << static_cast<int>(item.type) << "', ";
|
||||
query << '\'' << item.parent_id << "', ";
|
||||
query << '\'' << item.content_id << "', ";
|
||||
query << '\'' << static_cast<int>(item.static_auth) << "', ";
|
||||
query << '\'' << item.default_item << "', ";
|
||||
query << '\'' << Escape(item.subject) << "', ";
|
||||
query << '\'' << Escape(item.guest_name) << "', ";
|
||||
|
||||
|
||||
url_without_id = AddItemCreateUrlSubject(item);
|
||||
|
||||
@@ -523,7 +526,8 @@ Error Db::EditItemInItem(Item & item, bool with_url)
|
||||
{
|
||||
AssertConnection();
|
||||
std::ostringstream query;
|
||||
query << "update core.item set (user_id, group_id, privileges, date_creation, date_modification, type, default_item, parent_id, subject, guest_name";
|
||||
query << "update core.item set (user_id, group_id, privileges, date_creation, date_modification, type, "
|
||||
"default_item, parent_id, subject, guest_name, static_auth";
|
||||
|
||||
if( with_url )
|
||||
query << ", url";
|
||||
@@ -538,7 +542,8 @@ Error Db::EditItemInItem(Item & item, bool with_url)
|
||||
query << '\'' << item.default_item << "', ";
|
||||
query << '\'' << item.parent_id << "', ";
|
||||
query << '\'' << Escape(item.subject) << "', ";
|
||||
query << '\'' << Escape(item.guest_name) << "' ";
|
||||
query << '\'' << Escape(item.guest_name) << "', ";
|
||||
query << '\'' << static_cast<int>(item.static_auth) << "' ";
|
||||
|
||||
if( with_url )
|
||||
{
|
||||
@@ -583,7 +588,6 @@ Error Db::EditItemInContent(Item & item)
|
||||
|
||||
query << '\'' << Escape(item.content) << "', ";
|
||||
query << '\'' << item.content_type << "' ";
|
||||
|
||||
query << ") where id='" << item.content_id << "';";
|
||||
|
||||
r = AssertQuery(query.str());
|
||||
@@ -751,7 +755,8 @@ return result;
|
||||
PGresult * Db::GetItemsQuery(long parent_id, Item::Type type, bool with_subject, bool with_content, bool sort_asc)
|
||||
{
|
||||
std::ostringstream query;
|
||||
query << "select item.id, user_id, group_id, privileges, date_creation, date_modification, url, type, parent_id, content_id, default_item, guest_name";
|
||||
query << "select item.id, user_id, group_id, privileges, date_creation, date_modification, url, type, parent_id, "
|
||||
"content_id, default_item, guest_name, static_auth";
|
||||
|
||||
if( type != Item::dir )
|
||||
{
|
||||
|
Reference in New Issue
Block a user