From 485c04f092482e0679d03b0d449247c6130ef6bd Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 24 Aug 2017 20:29:55 +0200 Subject: [PATCH] fixed 5.4 issue and insert position for PDF editor --- lam/lib/pdfstruct.inc | 2 +- lam/templates/pdfedit/pdfpage.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lam/lib/pdfstruct.inc b/lam/lib/pdfstruct.inc index 5cedd21b..6d5e6568 100644 --- a/lam/lib/pdfstruct.inc +++ b/lam/lib/pdfstruct.inc @@ -652,7 +652,7 @@ class PDFEntrySection { * @return boolean is attribute */ public function isAttributeTitle() { - return boolval(preg_match('/^_([a-zA-Z0-9_-])+$/', $this->title)); + return (bool) preg_match('/^_([a-zA-Z0-9_-])+$/', $this->title); } /** diff --git a/lam/templates/pdfedit/pdfpage.php b/lam/templates/pdfedit/pdfpage.php index b6e77381..eb1c8b31 100644 --- a/lam/templates/pdfedit/pdfpage.php +++ b/lam/templates/pdfedit/pdfpage.php @@ -553,14 +553,14 @@ function addSection(&$structure) { } else { $section = new PDFEntrySection($_POST['new_section_text']); - array_splice($sections, $_POST['add_text_position'], 0, array($section)); + array_splice($sections, $_POST['add_sectionText_position'], 0, array($section)); $structure->setSections($sections); } } // Add a new section with item as headline elseif(isset($_POST['add_section'])) { $section = new PDFEntrySection('_' . $_POST['new_section_item']); - array_splice($sections, $_POST['add_text_position'], 0, array($section)); + array_splice($sections, $_POST['add_section_position'], 0, array($section)); $structure->setSections($sections); } }