File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -226,8 +226,10 @@ private function parse_tree(array $tree): array {
226226 }
227227
228228 // Chapter files: sections/NN-name/NN-bookname/NN-chapter.html.
229- if (preg_match ('#^sections/([^/]+)/([^/]+)/([^/]+\.html)$# ' , $ path , $ matches )
230- && $ item ['type ' ] === 'blob ' ) {
229+ if (
230+ preg_match ('#^sections/([^/]+)/([^/]+)/([^/]+\.html)$# ' , $ path , $ matches )
231+ && $ item ['type ' ] === 'blob '
232+ ) {
231233 $ dirname = $ matches [1 ];
232234 $ bookdir = $ matches [2 ];
233235 $ chapterfile = $ matches [3 ];
@@ -602,8 +604,10 @@ private function update_existing_book(
602604
603605 if ($ chaptermapping && $ chaptermapping ->content_hash === $ contenthash ) {
604606 // Content unchanged — but still update pagenum in case ordering changed.
605- $ existingchapter = $ DB ->get_record ('book_chapters ' ,
606- ['bookid ' => $ bookid , 'importsrc ' => $ chapterpath ]);
607+ $ existingchapter = $ DB ->get_record (
608+ 'book_chapters ' ,
609+ ['bookid ' => $ bookid , 'importsrc ' => $ chapterpath ]
610+ );
607611 if ($ existingchapter && (int ) $ existingchapter ->pagenum !== $ pagenum ) {
608612 $ existingchapter ->pagenum = $ pagenum ;
609613 $ existingchapter ->timemodified = time ();
You can’t perform that action at this time.
0 commit comments