aboutsummaryrefslogtreecommitdiff
path: root/src/guff.cr
diff options
context:
space:
mode:
Diffstat (limited to 'src/guff.cr')
-rw-r--r--src/guff.cr20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/guff.cr b/src/guff.cr
index d3817d0..dc04fbe 100644
--- a/src/guff.cr
+++ b/src/guff.cr
@@ -276,6 +276,8 @@ module Guff
ON (b.state_id = a.state_id)
JOIN sites c
ON (c.site_id = a.site_id)
+ JOIN users d
+ ON (d.user_id = a.created_by)
LEFT JOIN blogs x
ON (x.post_id = a.post_id)
LEFT JOIN pages y
@@ -291,8 +293,22 @@ module Guff
a.site_id,
c.name AS site_name,
b.state,
+ d.user_id,
+ d.name AS user_name,
+ d.email AS user_email,
+
+ a.created_at,
+ date(a.created_at) AS created_at_text,
+ datetime(a.created_at) AS created_at_text_full,
+
a.posted_at,
+ date(a.posted_at) AS posted_at_text,
+ datetime(a.posted_at) AS posted_at_text_full,
+
a.expires_at,
+ date(a.expires_at) AS expires_at_text,
+ datetime(a.expires_at) AS expires_at_text_full,
+
a.slug,
a.slug_lock,
a.name,
@@ -310,7 +326,7 @@ module Guff
strftime('/%%Y/%%m/%%d/', a.posted_at) || a.slug || '.html'
WHEN y.post_id IS NOT NULL THEN
'/' || a.slug || '.html'
- WHEN x.post_id IS NOT NULL THEN
+ WHEN z.post_id IS NOT NULL THEN
'/' || a.slug || '/'
END
ELSE
@@ -322,6 +338,8 @@ module Guff
ON (b.state_id = a.state_id)
JOIN sites c
ON (c.site_id = a.site_id)
+ JOIN users d
+ ON (d.user_id = a.created_by)
LEFT JOIN blogs x
ON (x.post_id = a.post_id)