diff options
| author | Zach DeCook <zachdecook@gmail.com> | 2018-04-18 11:51:41 -0400 |
|---|---|---|
| committer | Zach DeCook <zachdecook@gmail.com> | 2018-04-18 11:51:41 -0400 |
| commit | 35e7deee4b4de0e24e3d9c41a63528114ad209e1 (patch) | |
| tree | 9e0d65a771745dd125dc5af7100ceb49326b0fad /sort.php | |
| parent | 895f7ae639b916287dee4184f3a2a4bdc8424e3e (diff) | |
| download | prosongsa-35e7deee4b4de0e24e3d9c41a63528114ad209e1.tar.gz | |
* Index: Detect authors, allow sorting by author.
Diffstat (limited to 'sort.php')
| -rw-r--r-- | sort.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sort.php b/sort.php index 4048956..f99b60c 100644 --- a/sort.php +++ b/sort.php @@ -12,6 +12,12 @@ function tocTitleSort( $a, $b ){ return strcmp( $aTitle, $bTitle ); } +function tocAuthorSort( $a, $b ){ + $aTitle = strtolower($a['author']) ?: 'z'; + $bTitle = strtolower($b['author']) ?: 'z'; + return strcmp( $aTitle, $bTitle ); +} + define( "BOOK_ORDER", array( 'Genesis', 'Exodus', |
