Implemented CMS storage for user and nodes.
Implemented role and permission storage.
Introduced the CMS_PARTIAL_NODE and CMS_PARTIAL_USER.
Added support for node storage extension
- storage of data specific to each node content type,
- in addition to the core CMS_NODE)
- For now, only implemented for SQL storage.
Note: in current version, CMS_PAGE support is hard coded in the core,
(as opposed to be only supported by the node module.)
Commented/removed for now, the Web API code to update node summary, title, via REST request.
This commit is contained in:
@@ -26,7 +26,9 @@ feature -- Access
|
||||
do
|
||||
create {ARRAYED_LIST [CMS_NODE]} Result.make (0)
|
||||
across nodes_iterator as ic loop
|
||||
Result.force (ic.item)
|
||||
if attached ic.item as l_node then
|
||||
Result.force (l_node)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -34,27 +36,29 @@ feature -- Access
|
||||
-- List of recent `a_count' nodes with an offset of `lower'.
|
||||
do
|
||||
create {ARRAYED_LIST [CMS_NODE]} Result.make (a_count)
|
||||
across recent_nodes_iterator (a_lower, a_count) as c loop
|
||||
Result.force (c.item)
|
||||
across recent_nodes_iterator (a_lower, a_count) as ic loop
|
||||
if attached ic.item as l_node then
|
||||
Result.force (l_node)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
feature -- Access: iterator
|
||||
|
||||
nodes_iterator: DATABASE_ITERATION_CURSOR [CMS_NODE]
|
||||
nodes_iterator: DATABASE_ITERATION_CURSOR [detachable CMS_NODE]
|
||||
-- List of nodes.
|
||||
local
|
||||
l_parameters: STRING_TABLE [ANY]
|
||||
do
|
||||
error_handler.reset
|
||||
log.write_information (generator + ".nodes_iterator")
|
||||
write_information_log (generator + ".nodes_iterator")
|
||||
create l_parameters.make (0)
|
||||
sql_query (select_nodes, l_parameters)
|
||||
sql_query (sql_select_nodes, l_parameters)
|
||||
create Result.make (db_handler, agent fetch_node)
|
||||
sql_post_execution
|
||||
end
|
||||
|
||||
recent_nodes_iterator (a_lower, a_rows: INTEGER): DATABASE_ITERATION_CURSOR [CMS_NODE]
|
||||
recent_nodes_iterator (a_lower, a_rows: INTEGER): DATABASE_ITERATION_CURSOR [detachable CMS_NODE]
|
||||
-- The most recent `a_rows'.
|
||||
local
|
||||
l_parameters: STRING_TABLE [ANY]
|
||||
@@ -62,11 +66,11 @@ feature -- Access: iterator
|
||||
do
|
||||
-- FIXME: check implementation...
|
||||
error_handler.reset
|
||||
log.write_information (generator + ".recent_nodes_iterator")
|
||||
write_information_log (generator + ".recent_nodes_iterator")
|
||||
create l_parameters.make (2)
|
||||
l_parameters.put (a_rows, "rows")
|
||||
l_parameters.put (a_lower, "offset")
|
||||
create l_query.make_from_string (select_recent_nodes)
|
||||
create l_query.make_from_string (sql_select_recent_nodes)
|
||||
sql_query (l_query, l_parameters)
|
||||
create Result.make (db_handler, agent fetch_node)
|
||||
sql_post_execution
|
||||
|
||||
Reference in New Issue
Block a user