From: nupplaPhil <admin@philipp.info>
Date: Mon, 16 Dec 2019 00:08:47 +0000 (+0100)
Subject: Remove deprecated App::registerStylesheet()/FooterScript() - replace with DI::page... 
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c7230932d688def50f752ffcf5f82994b59c8013;p=friendica.git

Remove deprecated App::registerStylesheet()/FooterScript() - replace with DI::page()->registerStylesheet()/FooterScript()
---

diff --git a/doc/Addons.md b/doc/Addons.md
index 06b05bdff5..6e97565003 100644
--- a/doc/Addons.md
+++ b/doc/Addons.md
@@ -104,7 +104,7 @@ function <addon>_install()
 
 function <addon>_head(App $a)
 {
-	$a->registerStylesheet(__DIR__ . '/relative/path/to/addon/stylesheet.css');
+	\Friendica\DI::page()->registerStylesheet(__DIR__ . '/relative/path/to/addon/stylesheet.css');
 }
 ```
 
@@ -126,7 +126,7 @@ function <addon>_install()
 
 function <addon>_footer(App $a)
 {
-	$a->registerFooterScript(__DIR__ . '/relative/path/to/addon/script.js');
+	\Friendica\DI::page()->registerFooterScript(__DIR__ . '/relative/path/to/addon/script.js');
 }
 ```
 
diff --git a/src/App.php b/src/App.php
index a8650de389..5c2118f73d 100644
--- a/src/App.php
+++ b/src/App.php
@@ -153,24 +153,6 @@ class App
 		return $this->config->getCache()->get('system', 'basepath');
 	}
 
-	/**
-	 * @deprecated 2019.09 - use Page->registerStylesheet instead
-	 * @see        Page::registerStylesheet()
-	 */
-	public function registerStylesheet($path)
-	{
-		$this->page->registerStylesheet($path);
-	}
-
-	/**
-	 * @deprecated 2019.09 - use Page->registerFooterScript instead
-	 * @see        Page::registerFooterScript()
-	 */
-	public function registerFooterScript($path)
-	{
-		$this->page->registerFooterScript($path);
-	}
-
 	/**
 	 * @param Database        $database The Friendica Database
 	 * @param Configuration   $config   The Configuration