]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Issue 11853/11867: Fix reshare of public posts
[friendica.git] / boot.php
index c759bb93d25f1880f77ac2d82504962b5cb87882..ea4f28b74174e9611891af4376a04ef0799ebdb4 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -169,18 +169,13 @@ function remote_user()
  * This function save text in session, to be shown to the user at next page load
  *
  * @param string $s - Text of notice
+ *
+ * @return void
+ * @deprecated since version 2022.09, use \Friendica\Navigation\SystemMessages instead
  */
 function notice(string $s)
 {
-       if (empty($_SESSION)) {
-               return;
-       }
-
-       if (empty($_SESSION['sysmsg'])) {
-               $_SESSION['sysmsg'] = [];
-       }
-
-       $_SESSION['sysmsg'][] = $s;
+       \Friendica\DI::sysmsg()->addNotice($s);
 }
 
 /**
@@ -189,16 +184,11 @@ function notice(string $s)
  * This function save text in session, to be shown to the user at next page load
  *
  * @param string $s - Text of notice
+ *
+ * @return void
+ * @deprecated since version 2022.09, use \Friendica\Navigation\SystemMessages instead
  */
 function info(string $s)
 {
-       if (empty($_SESSION)) {
-               return;
-       }
-
-       if (empty($_SESSION['sysmsg_info'])) {
-               $_SESSION['sysmsg_info'] = [];
-       }
-
-       $_SESSION['sysmsg_info'][] = $s;
+       \Friendica\DI::sysmsg()->addInfo($s);
 }