]> git.mxchange.org Git - friendica.git/blobdiff - mod/randprof.php
Merge pull request #4933 from annando/bugfix-distribute
[friendica.git] / mod / randprof.php
index 08157a3851a40ff8bba7723112498a817c90de21..c5154c12d0b1292ef39fced53c93ef88aadc3e66 100644 (file)
@@ -1,14 +1,19 @@
 <?php
+/**
+ * @file mod/randprof.php
+ */
+use Friendica\App;
+use Friendica\Core\System;
+use Friendica\Model\GContact;
+use Friendica\Model\Profile;
 
-
-function randprof_init(App &$a) {
-       require_once('include/Contact.php');
-
-       $x = random_profile();
+function randprof_init(App $a)
+{
+       $x = GContact::getRandomUrl();
 
        if ($x) {
-               goaway(zrl($x));
+               goaway(Profile::zrl($x));
        }
 
-       goaway(App::get_baseurl() . '/profile');
+       goaway(System::baseUrl() . '/profile');
 }