diff options
| author | spider@app2 <spiderr@bitweaver.org> | 2017-09-14 19:03:07 -0400 |
|---|---|---|
| committer | spider@app2 <spiderr@bitweaver.org> | 2017-09-14 19:03:07 -0400 |
| commit | bccb13134c9ab41616893c56c30750ec5aec4af5 (patch) | |
| tree | d0430f3c8643efefe3c9a7a678a621edac6a9386 | |
| parent | 1658433d0f46a6d75cf004928f59f4590153ccfc (diff) | |
| download | wiki-bccb13134c9ab41616893c56c30750ec5aec4af5.tar.gz wiki-bccb13134c9ab41616893c56c30750ec5aec4af5.tar.bz2 wiki-bccb13134c9ab41616893c56c30750ec5aec4af5.zip | |
only show isPublic in sitemap
| -rw-r--r-- | sitemap.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sitemap.php b/sitemap.php index 0256774..3556a4e 100644 --- a/sitemap.php +++ b/sitemap.php @@ -25,8 +25,12 @@ $listHash = array(); if( $bookList = $book->getList( $listHash ) ) { foreach( $bookList['data'] as $bookHash ) { $bookStructure = new LibertyStructure( $bookHash['structure_id'] ); - $listBook = $bookStructure->buildTreeToc( $bookHash['structure_id'] ); - process_book_list( $listBook ); + if( $rootObject = LibertyContent::getLibertyObject( $bookStructure->getField( 'content_id' ), $bookStructure->getField( 'content_type_guid' ) ) ) { + if( $rootObject->isPublic() ) { + $listBook = $bookStructure->buildTreeToc( $bookHash['structure_id'] ); + process_book_list( $listBook ); + } + } } } |
