]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/RobotsTxt.php
Decouple conversation creation from rendering
[friendica.git] / src / Module / RobotsTxt.php
index ec7ee086ec640388d668f7bc811885dc77b47d10..49aab147136da57865335a67a13bdec27bf1e591 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
 namespace Friendica\Module;
 
 use Friendica\BaseModule;
+use Friendica\Core\System;
 
 /**
  * Return the default robots.txt
  */
 class RobotsTxt extends BaseModule
 {
-       public function rawContent()
+       protected function rawContent(array $request = [])
        {
-               $allDisalloweds = [
+               $allDisallowed = [
                        '/settings/',
                        '/admin/',
                        '/message/',
@@ -41,9 +42,9 @@ class RobotsTxt extends BaseModule
 
                header('Content-Type: text/plain');
                echo 'User-agent: *' . PHP_EOL;
-               foreach ($allDisalloweds as $disallowed) {
+               foreach ($allDisallowed as $disallowed) {
                        echo 'Disallow: ' . $disallowed . PHP_EOL;
                }
-               exit();
+               System::exit();
        }
 }