Fixed cms library compilation.
CMS_FILE_BLOCK was missing `is_empty' implementation.
This commit is contained in:
@@ -57,12 +57,39 @@ feature -- Access
|
|||||||
root_path: detachable PATH
|
root_path: detachable PATH
|
||||||
-- Root location for files universe.
|
-- Root location for files universe.
|
||||||
|
|
||||||
|
resolved_location: PATH
|
||||||
|
-- Path of related file, taking into account `root_path' and `location'.
|
||||||
|
do
|
||||||
|
-- Process html generation
|
||||||
|
if attached root_path as l_root_path then
|
||||||
|
Result := l_root_path.extended_path (location)
|
||||||
|
else
|
||||||
|
Result := location
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
feature -- Status report
|
feature -- Status report
|
||||||
|
|
||||||
|
is_empty: BOOLEAN
|
||||||
|
-- Is current block empty?
|
||||||
|
do
|
||||||
|
Result := not exists
|
||||||
|
debug ("cms")
|
||||||
|
Result := True
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
is_raw: BOOLEAN
|
is_raw: BOOLEAN
|
||||||
-- Is raw?
|
-- Is raw?
|
||||||
-- If True, do not get wrapped it with block specific div
|
-- If True, do not get wrapped it with block specific div
|
||||||
|
|
||||||
|
exists: BOOLEAN
|
||||||
|
local
|
||||||
|
ut: FILE_UTILITIES
|
||||||
|
do
|
||||||
|
Result := ut.file_path_exists (resolved_location)
|
||||||
|
end
|
||||||
|
|
||||||
feature -- Element change
|
feature -- Element change
|
||||||
|
|
||||||
set_is_raw (b: BOOLEAN)
|
set_is_raw (b: BOOLEAN)
|
||||||
@@ -94,11 +121,7 @@ feature -- Conversion
|
|||||||
ut: FILE_UTILITIES
|
ut: FILE_UTILITIES
|
||||||
do
|
do
|
||||||
-- Process html generation
|
-- Process html generation
|
||||||
if attached root_path as l_root_path then
|
p := resolved_location
|
||||||
p := l_root_path.extended_path (location)
|
|
||||||
else
|
|
||||||
p := location
|
|
||||||
end
|
|
||||||
if ut.file_path_exists (p) then
|
if ut.file_path_exists (p) then
|
||||||
create f.make_with_path (p)
|
create f.make_with_path (p)
|
||||||
if f.exists and then f.is_access_readable then
|
if f.exists and then f.is_access_readable then
|
||||||
@@ -145,4 +168,7 @@ feature -- Debug
|
|||||||
end
|
end
|
||||||
Result.append ("%N")
|
Result.append ("%N")
|
||||||
end
|
end
|
||||||
|
note
|
||||||
|
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||||
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user