Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

43 lines
854 B

  1. <?php
  2. /**
  3. * @file include/create_shadowentry.php
  4. * @brief This script creates posts with UID = 0 for a given public post.
  5. *
  6. * This script is started from mod/item.php to save some time when doing a post.
  7. */
  8. use \Friendica\Core\Config;
  9. require_once("boot.php");
  10. require_once("include/threads.php");
  11. function create_shadowentry_run($argv, $argc) {
  12. global $a, $db;
  13. if (is_null($a))
  14. $a = new App;
  15. if (is_null($db)) {
  16. @include(".htconfig.php");
  17. require_once("include/dba.php");
  18. $db = new dba($db_host, $db_user, $db_pass, $db_data);
  19. unset($db_host, $db_user, $db_pass, $db_data);
  20. }
  21. Config::load();
  22. if ($argc != 2) {
  23. return;
  24. }
  25. $message_id = intval($argv[1]);
  26. add_shadow_entry($message_id);
  27. }
  28. if (array_search(__file__,get_included_files())===0){
  29. create_shadowentry_run($_SERVER["argv"],$_SERVER["argc"]);
  30. killme();
  31. }
  32. ?>