diff --git a/delete.php b/delete.php index 429112597a2..0103a174794 100644 --- a/delete.php +++ b/delete.php @@ -1,4 +1,4 @@ -id, 'pagenum', 'id, subchapter'); $found = false; foreach($chapters as $ch) { - if ($ch->id === $chapter->id) { + if ($ch->id == $chapter->id) { $found = true; } else if ($found and $ch->subchapter) { if (!delete_records('book_chapters', 'id', $ch->id)) { diff --git a/import.php b/import.php index 0cbed029c54..3f345a59856 100644 --- a/import.php +++ b/import.php @@ -1,4 +1,4 @@ -id === $ch->id) { + if ($chapter->id == $ch->id) { $chs = $i; $che = $chs; if ($ch->subchapter) { @@ -39,14 +39,14 @@ foreach ($oldchapters as $ch) { // find target chapter(s) if ($chapters[$chs]->subchapter) { //moving single subchapter up or down if ($up) { - if ($chs === 1) { + if ($chs == 1) { $nothing = 1; //already first } else { $ts = $chs - 1; $te = $ts; } } else { //down - if ($che === count($chapters)) { + if ($che == count($chapters)) { $nothing = 1; //already last } else { $ts = $che + 1; @@ -55,7 +55,7 @@ if ($chapters[$chs]->subchapter) { //moving single subchapter up or down } } else { // moving chapter and looking for next/previous chapter if ($up) { //up - if ($chs === 1) { + if ($chs == 1) { $nothing = 1; //already first } else { $te = $chs - 1; @@ -69,7 +69,7 @@ if ($chapters[$chs]->subchapter) { //moving single subchapter up or down } } } else { //down - if ($che === count($chapters)) { + if ($che == count($chapters)) { $nothing = 1; //already last } else { $ts = $che + 1; diff --git a/show.php b/show.php index a4104feed4c..8104067ee27 100644 --- a/show.php +++ b/show.php @@ -1,4 +1,4 @@ -subchapter) { $chapters = get_records('book_chapters', 'bookid', $book->id, 'pagenum', 'id, subchapter, hidden'); $found = 0; foreach($chapters as $ch) { - if ($ch->id === $chapter->id) { + if ($ch->id == $chapter->id) { $found = 1; } else if ($found and $ch->subchapter) { $ch->hidden = $chapter->hidden;