diff --git a/index.php b/index.php index edd991f..4a9e82a 100644 --- a/index.php +++ b/index.php @@ -998,13 +998,16 @@ Size the image to at most 120px wide and have it float at the right ahnd size of register_module([ "name" => "Page list", - "version" => "0.5", + "version" => "0.6", "author" => "Starbeamrainbowlabs", "description" => "Adds a page that lists all the pages in the index along with their metadata.", "id" => "page-list", "code" => function() { add_action("list", function() { global $pageindex, $settings; + + $sorted_pageindex = get_object_vars($pageindex); + ksort($sorted_pageindex, SORT_NATURAL); $title = "All Pages"; $content = "

$title on $settings->sitename

@@ -1015,7 +1018,7 @@ register_module([ \n"; // todo list the pages in alphabetical order - foreach($pageindex as $pagename => $pagedetails) + foreach($sorted_pageindex as $pagename => $pagedetails) { $content .= "\t\t diff --git a/module_index.json b/module_index.json index 61c2c51..b6ba6d1 100644 --- a/module_index.json +++ b/module_index.json @@ -41,11 +41,11 @@ }, { "name": "Page list", - "version": "0.5", + "version": "0.6", "author": "Starbeamrainbowlabs", "description": "Adds a page that lists all the pages in the index along with their metadata.", "id": "page-list", - "lastupdate": 1436796812 + "lastupdate": 1436976553 }, { "name": "Login", diff --git a/modules/page-list.php b/modules/page-list.php index f0ae22b..6883397 100644 --- a/modules/page-list.php +++ b/modules/page-list.php @@ -1,13 +1,16 @@ "Page list", - "version" => "0.5", + "version" => "0.6", "author" => "Starbeamrainbowlabs", "description" => "Adds a page that lists all the pages in the index along with their metadata.", "id" => "page-list", "code" => function() { add_action("list", function() { global $pageindex, $settings; + + $sorted_pageindex = get_object_vars($pageindex); + ksort($sorted_pageindex, SORT_NATURAL); $title = "All Pages"; $content = "

$title on $settings->sitename

Last Edit Time
$pagename
@@ -18,7 +21,7 @@ register_module([ \n"; // todo list the pages in alphabetical order - foreach($pageindex as $pagename => $pagedetails) + foreach($sorted_pageindex as $pagename => $pagedetails) { $content .= "\t\t
Last Edit Time
$pagename