Commit d06ef886 authored by Raphaël Bastide's avatar Raphaël Bastide

Solves a bug related to the list order

parent b2547395
......@@ -32,18 +32,17 @@
$directory = "char/";
$charcats = rglob($directory."{*.charlist}", GLOB_BRACE);
$charcatNbr = 0;
// Sort projects, most recent first
//usort($charcats, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
foreach ($charcats as $charcat) {
$charcat_name = basename($charcat, ".charlist");
// $charcat_name = basename($charcat, ".charlist");
preg_match('/-(.*?)\./s', $charcat, $charcat_name);
$charcatNbr ++;
$cat_content = file_get_contents($charcat);
$cat_content_nospace = str_replace('/^\s+|\n|\r|\s+$/m', '', $cat_content);
?>
<section id="<?php echo $charcat_name; ?>">
<section id="<?php echo $charcat_name[1]; ?>">
<div class="charlist"><?php echo $cat_content_nospace; ?></div>
</section>
<?php } ?>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment