X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl-cms.git;a=blobdiff_plain;f=admin_pages.php;h=584aaa0798059210e6dd55c9a2ae9bba4c606b0b;hp=382ff5c78e777290c9733baa68405ff3d711dee8;hb=3ed0f0b53ff1b3ea3e30292bf39eb6e30935e9eb;hpb=e7424acd48ed670f1b8bd8d7c1ff69b37ce6334b diff --git a/admin_pages.php b/admin_pages.php index 382ff5c..584aaa0 100644 --- a/admin_pages.php +++ b/admin_pages.php @@ -75,7 +75,7 @@ function admin_pages_main_delete($id) { # get all images from admin_images (for cms) function admin_pages_get_images() { $out = []; - $rows = db_get_assocs('cms_images', 'image,name,caption', 'order by name, caption, image'); + $rows = db_get_assocs('cms_images', 'image,name,caption', "order by coalesce(nullif(name, ''), caption), created_at"); if ($rows) { $id = -1; foreach($rows as &$row) { $id += 1; @@ -168,6 +168,7 @@ function admin_pages_main_form($id = false) { } tem_set('wfpl_images_json', json_encode(admin_pages_get_images())); + tem_set('wfpl_image_width_full', WFPL_IMAGE_WIDTH_FULL); tem_set('wfpl_image_width_small', WFPL_IMAGE_WIDTH_SMALL); tem_set('wfpl_image_width_thumb', WFPL_IMAGE_WIDTH_THUMB); tem_set('form', $data);