Updated the CMS pagination component.
Harmonized count type to NATURAL_64 for recent_nodes (more to do later). Fix get is active code.
This commit is contained in:
@@ -43,6 +43,8 @@ feature {NONE} -- Implementation
|
||||
|
||||
extended_store (a_node: CMS_NODE)
|
||||
-- Store extended data from `a_node'.
|
||||
require
|
||||
not error_handler.has_error
|
||||
do
|
||||
if attached node_storage_extension (a_node) as ext then
|
||||
ext.store_node (a_node)
|
||||
@@ -51,16 +53,17 @@ feature {NONE} -- Implementation
|
||||
|
||||
extended_load (a_node: CMS_NODE)
|
||||
-- Load extended data into `a_node'.
|
||||
require
|
||||
not error_handler.has_error
|
||||
do
|
||||
if attached node_storage_extension (a_node) as ext then
|
||||
ext.load_node (a_node)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
feature -- Access
|
||||
|
||||
nodes_count: INTEGER_64
|
||||
nodes_count: NATURAL_64
|
||||
-- Count of nodes.
|
||||
deferred
|
||||
end
|
||||
|
||||
@@ -30,7 +30,7 @@ feature -- Error Handling
|
||||
|
||||
feature -- Access: node
|
||||
|
||||
nodes_count: INTEGER_64
|
||||
nodes_count: NATURAL_64
|
||||
-- Count of nodes.
|
||||
do
|
||||
end
|
||||
|
||||
@@ -22,14 +22,14 @@ create
|
||||
|
||||
feature -- Access
|
||||
|
||||
nodes_count: INTEGER_64
|
||||
nodes_count: NATURAL_64
|
||||
-- Number of items nodes.
|
||||
do
|
||||
error_handler.reset
|
||||
write_information_log (generator + ".nodes_count")
|
||||
sql_query (sql_select_nodes_count, Void)
|
||||
if sql_rows_count = 1 then
|
||||
Result := sql_read_integer_64 (1)
|
||||
Result := sql_read_natural_64 (1)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -267,8 +267,14 @@ feature {NONE} -- Implementation
|
||||
a_node.set_revision (1) -- New object.
|
||||
end
|
||||
end
|
||||
extended_store (a_node)
|
||||
sql_commit_transaction
|
||||
if not error_handler.has_error then
|
||||
extended_store (a_node)
|
||||
end
|
||||
if error_handler.has_error then
|
||||
sql_rollback_transaction
|
||||
else
|
||||
sql_commit_transaction
|
||||
end
|
||||
end
|
||||
|
||||
feature -- Helpers
|
||||
|
||||
Reference in New Issue
Block a user