From: Hypolite Petovan <mrpetovan@gmail.com>
Date: Sat, 28 Apr 2018 22:39:29 +0000 (-0400)
Subject: Replace current_theme() and current_theme_url() calls
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=82fd1df5dd39071c1185cd74997cd60a25a205a5;p=friendica-addons.git

Replace current_theme() and current_theme_url() calls
---

diff --git a/membersince/membersince.php b/membersince/membersince.php
index 982a704d..c11f9b53 100644
--- a/membersince/membersince.php
+++ b/membersince/membersince.php
@@ -21,9 +21,9 @@ function membersince_uninstall()
 	Addon::unregisterHook('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display');
 }
 
-function membersince_display(&$a, &$b)
+function membersince_display(Friendica\App $a, &$b)
 {
-	if (current_theme() == 'frio') {
+	if ($a->getCurrentTheme() == 'frio') {
 		// Works in Frio.
 		$doc = new DOMDocument();
 		$doc->loadHTML(mb_convert_encoding($b, 'HTML-ENTITIES', 'UTF-8'));
diff --git a/smileybutton/smileybutton.php b/smileybutton/smileybutton.php
index 2d4a0743..f613d290 100644
--- a/smileybutton/smileybutton.php
+++ b/smileybutton/smileybutton.php
@@ -24,10 +24,10 @@ function smileybutton_uninstall() {
 
 
 
-function show_button($a, &$b) {
+function show_button(Friendica\App $a, &$b) {
 	// Disable if theme is quattro
 	// TODO add style for quattro
-	if (current_theme() == 'quattro')
+	if ($a->getCurrentTheme() == 'quattro')
 		return;
 
 	// Disable for mobile because most mobiles have a smiley key for ther own
@@ -112,7 +112,7 @@ function show_button($a, &$b) {
 	$s .= "\t</tr></table>";
 
 	//Add css to header
-	$css_file = 'addon/smileybutton/view/'.current_theme().'.css';
+	$css_file = 'addon/smileybutton/view/' . $a->getCurrentTheme() . '.css';
 	if (! file_exists($css_file))
 		$css_file = 'addon/smileybutton/view/default.css';
 	$css_url = $a->get_baseurl().'/'.$css_file;
@@ -121,7 +121,7 @@ function show_button($a, &$b) {
 
 
 	//Get the correct image for the theme
-	$image = 'addon/smileybutton/view/'.current_theme().'.png';
+	$image = 'addon/smileybutton/view/' . $a->getCurrentTheme() . '.png';
 	if (! file_exists($image))
 		$image = 'addon/smileybutton/view/default.png';
 	$image_url = $a->get_baseurl().'/'.$image;