From: Philipp Holzer <admin@philipp.info>
Date: Fri, 1 Mar 2019 09:23:04 +0000 (+0100)
Subject: Moving mod/credits to src/Module/Credits
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a876f132bded2edbfb3cb0d6380cf9e6b7e45833;p=friendica.git

Moving mod/credits to src/Module/Credits
---

diff --git a/mod/credits.php b/mod/credits.php
deleted file mode 100644
index 3d71c54b3a..0000000000
--- a/mod/credits.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * @file mod/credits.php
- * Show a credits page for all the developers who helped with the project
- * (only contributors to the git repositories for friendica core and the
- * addons repository will be listed though ATM)
- */
-
-use Friendica\Core\L10n;
-use Friendica\Core\Renderer;
-
-function credits_content()
-{
-	/* fill the page with credits */
-	$credits_string = file_get_contents('CREDITS.txt');
-	$names = explode("\n", $credits_string);
-	$tpl = Renderer::getMarkupTemplate('credits.tpl');
-	return Renderer::replaceMacros($tpl, [
-		'$title'  => L10n::t('Credits'),
-		'$thanks' => L10n::t('Friendica is a community project, that would not be possible without the help of many people. Here is a list of those who have contributed to the code or the translation of Friendica. Thank you all!'),
-		'$names'  => $names,
-	]);
-}
diff --git a/src/Module/Credits.php b/src/Module/Credits.php
new file mode 100644
index 0000000000..b0a6545c38
--- /dev/null
+++ b/src/Module/Credits.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace Friendica\Module;
+
+use Friendica\BaseModule;
+use Friendica\Core\L10n;
+use Friendica\Core\Renderer;
+
+/**
+ * Show a credits page for all the developers who helped with the project
+ * (only contributors to the git repositories for friendica core and the
+ * addons repository will be listed though ATM)
+ */
+class Credits extends BaseModule
+{
+	public static function content()
+	{
+		/* fill the page with credits */
+		$credits_string = file_get_contents('CREDITS.txt');
+
+		$names = explode("\n", $credits_string);
+
+		$tpl = Renderer::getMarkupTemplate('credits.tpl');
+		return Renderer::replaceMacros($tpl, [
+			'$title'  => L10n::t('Credits'),
+			'$thanks' => L10n::t('Friendica is a community project, that would not be possible without the help of many people. Here is a list of those who have contributed to the code or the translation of Friendica. Thank you all!'),
+			'$names'  => $names,
+		]);
+	}
+}