]> git.bts.cx Git - cx.git/blobdiff - cx/lib/posts.php
Updated Parsedown and fixed some bugs for pages
[cx.git] / cx / lib / posts.php
index f056c8834797ada3b96a028e07c61a5f6c283b80..d8f056d970d74c73af96978283630d6124db4890 100644 (file)
@@ -135,6 +135,7 @@ function cx_posts_get(int $limit = 0, int $offset = 0, bool $include_drafts = fa
                post_id,
                post_slug,
                post_date,
                post_id,
                post_slug,
                post_date,
+               post_is_page,
                post_is_draft,
                post_title,
                post_data
                post_is_draft,
                post_title,
                post_data
@@ -188,6 +189,7 @@ function cx_posts_find_post($post_id) {
                post_id,
                post_slug,
                post_date,
                post_id,
                post_slug,
                post_date,
+               post_is_page,
                post_is_draft,
                post_title,
                post_data
                post_is_draft,
                post_title,
                post_data
@@ -240,13 +242,14 @@ function cx_pages_get() {
                post_id,
                post_slug,
                post_date,
                post_id,
                post_slug,
                post_date,
+               post_is_page,
                post_is_draft,
                post_title,
                post_data
                FROM posts
                WHERE post_is_page == TRUE
                AND post_is_draft == FALSE
                post_is_draft,
                post_title,
                post_data
                FROM posts
                WHERE post_is_page == TRUE
                AND post_is_draft == FALSE
-               ORDER BY post_creation_time DESC;';
+               ORDER BY post_creation_time ASC;';
 
        foreach (cx_db_query($sql) as $post) {
                $p = new Post($post);
 
        foreach (cx_db_query($sql) as $post) {
                $p = new Post($post);