# 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;
}
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);