When importing, do not change modification date.

Display /nodes sorted by changed date.
Improved the import form, and report wrong import folder. Only import from folder inside site/import for security reason.
This commit is contained in:
2017-01-27 23:12:02 +01:00
parent 2568e85c59
commit 32a47fbba3
15 changed files with 95 additions and 48 deletions

View File

@@ -15,14 +15,22 @@ feature {NONE} -- Initialization
make (a_location: PATH)
do
location := a_location
location := a_location.absolute_path.canonical_path
create logs.make (10)
end
feature -- Access
location: PATH
-- Location of import folder.
-- Location of import folder.
location_exists: BOOLEAN
-- Does location of import folder exist?
local
ut: FILE_UTILITIES
do
Result := ut.directory_path_exists (location)
end
feature -- Logs

View File

@@ -336,6 +336,16 @@ feature -- Internationalization (i18n)
Result := l_formatter.formatted_string (a_text, args)
end
formatted_date_time_ago (dt: DATE_TIME): STRING_32
-- Output date `dt` using time ago duration.
local
ago: DATE_TIME_AGO_CONVERTER
do
create ago.make
create Result.make (10)
Result.append_string_general (ago.smart_date_duration (dt))
end
feature -- Emails
new_email (a_to_address: READABLE_STRING_8; a_subject: READABLE_STRING_8; a_content: READABLE_STRING_8): CMS_EMAIL