forgotten $
[friendica.git/.git] / mod / randprof.php
index 08157a3..18bcb23 100644 (file)
@@ -1,14 +1,20 @@
 <?php
+/**
+ * @file mod/randprof.php
+ */
+use Friendica\App;
+use Friendica\Core\System;
+use Friendica\Model\Contact;
+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(Contact::magicLink($x));
        }
 
-       goaway(App::get_baseurl() . '/profile');
+       goaway(System::baseUrl() . '/profile');
 }