From f2e6e12731f7797637bb3444bebd63693ee319ba Mon Sep 17 00:00:00 2001 From: Simounet Date: Sat, 15 Jul 2023 16:39:08 +0200 Subject: [PATCH 1/4] Fix dynamic properties' creation deprecated with PHP8.2 --- Event.class.php | 2 +- Install.class.php | 1 + MysqlEntity.class.php | 4 ++++ Opml.class.php | 1 + i18n.php | 8 +++++--- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Event.class.php b/Event.class.php index b32fbf92..b1ce6dfc 100644 --- a/Event.class.php +++ b/Event.class.php @@ -8,7 +8,7 @@ class Event extends MysqlEntity{ - protected $id,$title,$guid,$content,$description,$pudate,$link,$feed,$category,$creator,$unread,$favorite; + protected $id,$title,$guid,$content,$description,$pubdate,$link,$feed,$category,$creator,$unread,$favorite,$syncId; protected $TABLE_NAME = 'event'; protected $object_fields = array( diff --git a/Install.class.php b/Install.class.php index 69fb3aee..95f5eb72 100644 --- a/Install.class.php +++ b/Install.class.php @@ -5,6 +5,7 @@ class Install { const DEFAULT_TABLES_PREFIX = 'leed__'; const CONSTANT_FILE = 'constant.php'; public $finished = false; + private $logger; public $logs = array( 'errors' => array(), 'notices' => array() diff --git a/MysqlEntity.class.php b/MysqlEntity.class.php index 0902b549..b2ca797d 100644 --- a/MysqlEntity.class.php +++ b/MysqlEntity.class.php @@ -14,6 +14,10 @@ class MysqlEntity { + protected $object_fields; + protected $TABLE_NAME; + protected $object_fields_index; + protected $object_fields_uniques; protected $dbconnector = false; private $debug = false; private $debugAllQuery = false; diff --git a/Opml.class.php b/Opml.class.php index dba0cd26..e8c98614 100644 --- a/Opml.class.php +++ b/Opml.class.php @@ -10,6 +10,7 @@ class Opml { + private $folders; // liens déjà connus, déjà abonnés, au moment de l'importation public $alreadyKnowns = array(); diff --git a/i18n.php b/i18n.php index 48083827..89585dfb 100644 --- a/i18n.php +++ b/i18n.php @@ -16,9 +16,11 @@ class Translation { const DEFAULT_LANGUAGE = 'fr'; // tableau associatif des traductions - var $trans = array(); - var $language = ''; // langue courante - var $translatedLanguages = array(); // langues traduites + private $trans = array(); + public $languages = []; + public $language = ''; // langue courante + public $translatedLanguages = array(); // langues traduites + private $location = ''; /** @param location L'endroit où se trouve le dossier 'locale' * @param languages Les langues demandées */ From 409a1ea359e000495b87b1c085c6d5fe6a131aa9 Mon Sep 17 00:00:00 2001 From: Simounet Date: Sat, 15 Jul 2023 16:39:54 +0200 Subject: [PATCH 2/4] [Boyscout] Remove duplicated array entry --- Event.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Event.class.php b/Event.class.php index b1ce6dfc..2ec78b91 100644 --- a/Event.class.php +++ b/Event.class.php @@ -21,7 +21,6 @@ class Event extends MysqlEntity{ 'link'=>'longstring', 'unread'=>'integer', 'feed'=>'integer', - 'unread'=>'integer', 'favorite'=>'integer', 'pubdate'=>'integer', 'syncId'=>'integer', From 2ae9da0b7295f042eeb689d326800a942606ad67 Mon Sep 17 00:00:00 2001 From: Simounet Date: Sun, 16 Jul 2023 11:33:37 +0200 Subject: [PATCH 3/4] Fix enclosure type when null --- Feed.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Feed.class.php b/Feed.class.php index 8f02f470..ce20df81 100644 --- a/Feed.class.php +++ b/Feed.class.php @@ -163,7 +163,7 @@ protected function getEnclosureHtml($enclosure) { : substr($enclosureName, strrpos($enclosureName,'.')+1); $html ='

Fichier média :

'; - $enclosureType = $enclosure->get_type(); + $enclosureType = $enclosure->get_type() ?? ''; if (strpos($enclosureType, 'image/') === 0) { $html .= ''; } elseif (strpos($enclosureType, 'audio/') === 0 || strpos($enclosureType, 'application/ogg') === 0) { From fa839a2883dc30e755578e52d238240abb352de1 Mon Sep 17 00:00:00 2001 From: Simounet Date: Sun, 16 Jul 2023 12:41:09 +0200 Subject: [PATCH 4/4] Opml export unused feedManager removed --- Opml.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Opml.class.php b/Opml.class.php index e8c98614..094d458e 100644 --- a/Opml.class.php +++ b/Opml.class.php @@ -18,8 +18,7 @@ class Opml { * Met à jour les données des flux. */ protected function update() { - global $feedManager, $folderManager; - $this->feeds = $feedManager->populate('name'); + global $folderManager; $this->folders = $folderManager->loadAll(array('parent'=>-1),'name'); }