X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Frobotstxt.php;h=fdfc2bd1bd650cdee7bbaf76d3c03a3a642619e7;hb=64b72a3c9b8c9ee2d8716a3271834293d1e863f8;hp=5131097c8c533eeb3a5ad376cf9e133c09ae8007;hpb=ebf4e497f6e520b011a2a364a9a866fb2d7fb262;p=quix0rs-gnu-social.git diff --git a/actions/robotstxt.php b/actions/robotstxt.php index 5131097c8c..fdfc2bd1bd 100644 --- a/actions/robotstxt.php +++ b/actions/robotstxt.php @@ -27,9 +27,7 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET')) { - exit(1); -} +if (!defined('GNUSOCIAL')) { exit(1); } /** * Prints out a static robots.txt @@ -40,21 +38,9 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ */ - -class RobotstxtAction extends Action +class RobotstxtAction extends ManagedAction { - /** - * Handles requests - * - * Since this is a relatively static document, we - * don't do a prepare() - * - * @param array $args GET, POST, and URL params; unused. - * - * @return void - */ - - function handle($args) + public function showPage() { if (Event::handle('StartRobotsTxt', array($this))) { @@ -65,9 +51,7 @@ class RobotstxtAction extends Action if (common_config('site', 'private')) { print "Disallow: /\n"; - } else { - $disallow = common_config('robotstxt', 'disallow'); foreach ($disallow as $dir) { @@ -92,7 +76,6 @@ class RobotstxtAction extends Action * * @return boolean is read only action? */ - function isReadOnly($args) { return true;