From 02ee03b991d4cd92505ef6c4223ae1aa765a5c10 Mon Sep 17 00:00:00 2001 From: Alexandra Nantel Date: Wed, 17 May 2017 13:47:05 -0400 Subject: [PATCH] Fix compatibility warnings for PHP7 Picked from 2d0869f Re #75 Fixes #79 --- fields/field.multilingual_textbox.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/fields/field.multilingual_textbox.php b/fields/field.multilingual_textbox.php index 1229638..b397dbd 100644 --- a/fields/field.multilingual_textbox.php +++ b/fields/field.multilingual_textbox.php @@ -107,7 +107,7 @@ public function createHandle($value, $entry_id, $lc = null) return $handle; } - public function getCurrentHandle($entry_id, $lc) + public function getCurrentHandle($entry_id, $lc = null) { return Symphony::Database()->fetchVar('handle', 0, sprintf( " @@ -125,7 +125,7 @@ public function getCurrentHandle($entry_id, $lc) )); } - public function isHandleLocked($handle, $entry_id, $lc) + public function isHandleLocked($handle, $entry_id, $lc = null) { return (boolean) Symphony::Database()->fetchVar('id', 0, sprintf( " @@ -143,7 +143,7 @@ public function isHandleLocked($handle, $entry_id, $lc) )); } - public function isHandleFresh($handle, $value, $entry_id, $lc) + public function isHandleFresh($handle, $value, $entry_id, $lc = null) { return (boolean) Symphony::Database()->fetchVar('id', 0, sprintf( " @@ -350,7 +350,7 @@ public function commit() /* Publish */ /*------------------------------------------------------------------------------------------------*/ - public function displayPublishPanel(&$wrapper, $data = null, $error = null, $prefix = null, $postfix = null) + public function displayPublishPanel(XMLElement &$wrapper, $data = null, $flagWithError = null, $fieldnamePrefix = null, $fieldnamePostfix = null, $entry_id = null) { // We've been called out of context: Publish Filter $callback = Administration::instance()->getPageCallback(); @@ -459,7 +459,7 @@ public function displayPublishPanel(&$wrapper, $data = null, $error = null, $pre // Input box: if ($this->get('text_size') === 'single') { $input = Widget::Input( - "fields{$prefix}[$element_name]{$postfix}[{$lc}]", General::sanitize($data["value-$lc"]) + "fields{$fieldnamePrefix}[$element_name]{$fieldnamePostfix}[{$lc}]", General::sanitize($data["value-$lc"]) ); ### @@ -471,7 +471,7 @@ public function displayPublishPanel(&$wrapper, $data = null, $error = null, $pre // Text Box: else { $input = Widget::Textarea( - "fields{$prefix}[$element_name]{$postfix}[{$lc}]", 20, 50, General::sanitize($data["value-$lc"]) + "fields{$fieldnamePrefix}[$element_name]{$fieldnamePostfix}[{$lc}]", 20, 50, General::sanitize($data["value-$lc"]) ); ### @@ -653,7 +653,7 @@ public function fetchIncludableElements() return $includable_elements; } - public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = false, $mode = null) + public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = false, $mode = null, $entry_id = null) { // all-languages $all_languages = strpos($mode, 'all-languages'); @@ -725,7 +725,7 @@ public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = fa } // @todo: remove and fallback to default (Symphony 2.5 only?) - public function prepareTableValue($data, XMLElement $link = null) + public function prepareTableValue($data, XMLElement $link = null, $entry_id = NULL) { $lc = $this->getLang($data); @@ -764,7 +764,7 @@ protected function getLang($data = null) return $lc; } - public function getParameterPoolValue($data) + public function getParameterPoolValue(array $data, $entry_id = NULL) { $lc = $this->getLang(); return $data["value-$lc"]; @@ -868,7 +868,7 @@ public function buildDSRetrievalSQL($data, &$joins, &$where, $andOperation = fal Sorting: -------------------------------------------------------------------------*/ - public function buildSortingSQL(&$joins, &$where, &$sort, $order = 'ASC') + public function buildSortingSQL(&$joins, &$where, &$sort, $order = 'ASC', &$select = NULL) { $lc = FLang::getLangCode();