mirror of
https://github.com/danpros/htmly.git
synced 2026-04-23 14:06:23 +05:30
Rename to scan_images()
Rename for more meaningful
This commit is contained in:
parent
675cf51259
commit
8d58741b88
2 changed files with 9 additions and 8 deletions
|
|
@ -222,19 +222,19 @@ function get_zip_files()
|
|||
}
|
||||
|
||||
// Get images in content/images folder
|
||||
function get_gallery() {
|
||||
static $_gallery = array();
|
||||
if (empty($_gallery)) {
|
||||
function scan_images() {
|
||||
static $_images = array();
|
||||
if (empty($_images)) {
|
||||
$tmp = array();
|
||||
$tmp = glob('content/images/*', GLOB_NOSORT);
|
||||
if (is_array($tmp)) {
|
||||
foreach ($tmp as $file) {
|
||||
$_gallery[] = pathinfo($file);
|
||||
$_images[] = pathinfo($file);
|
||||
}
|
||||
}
|
||||
usort($_gallery, "sortfile_d");
|
||||
usort($_images, "sortfile_d");
|
||||
}
|
||||
return $_gallery;
|
||||
return $_images;
|
||||
}
|
||||
|
||||
// usort function. Sort by filename.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue