set_robots.php 256 B

123456789101112131415
  1. <?php
  2. /**
  3. * Set robots.txt action
  4. */
  5. $content = get_input('text');
  6. $site = elgg_get_site_entity();
  7. if ($site->setPrivateSetting('robots.txt', $content)) {
  8. system_message(elgg_echo('save:success'));
  9. } else {
  10. register_error(elgg_echo('save:fail'));
  11. }