Commit 1d623fd7 authored by Brian Hatchet's avatar Brian Hatchet
Browse files

Merge remote-tracking branch 'upstream/master' into firehose-images-video-saving-properly

parents 240e5431 335d885a
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -70,8 +70,10 @@ class register implements Interfaces\Api, Interfaces\ApiIgnorePam
            $user = register_user($_POST['username'], $_POST['password'], $_POST['username'], $_POST['email'], false);
            $user = register_user($_POST['username'], $_POST['password'], $_POST['username'], $_POST['email'], false);
            $guid = $user->guid;
            $guid = $user->guid;


            if (isset($_POST['Homepage121118'])) {
            if (isset($_COOKIE['mexp'])) {
                $user->expHomepage121818 = $_POST['Homepage121118'];
                $manager = Core\Di\Di::_()->get('Experiments\Manager');
                $bucket = $manager->getBucketForExperiment('Homepage200619');
                $user->expHomepage200619 = $bucket->getId();
                $user->save();
                $user->save();
            }
            }


+1 −1
Original line number Original line Diff line number Diff line
@@ -26,7 +26,7 @@ class Message
    {
    {
        $this->from = [
        $this->from = [
          'name' => 'Minds',
          'name' => 'Minds',
          'email' => 'info@minds.com',
          'email' => 'no-reply@minds.com',
        ];
        ];
    }
    }


+3 −0
Original line number Original line Diff line number Diff line
@@ -25,6 +25,9 @@ class Manager
        'clickmail.info',
        'clickmail.info',
        'marketlink.info',
        'marketlink.info',
        'atnextmail.com',
        'atnextmail.com',
        'hostguru.top',
        'daymailonline.com',
        'uber-mail.com',
    ];
    ];


    public function __construct($service = null, $spamBlocksManager = null)
    public function __construct($service = null, $spamBlocksManager = null)
+37 −0
Original line number Original line Diff line number Diff line
<?php
/**
 * 
 */
namespace Minds\Core\Experiments\Hypotheses;

use Minds\Core\Experiments\Bucket;

class Homepage200619 implements HypothesisInterface
{

    /**
     * Return the id for the hypothesis
     * @return string
     */
    public function getId()
    {
        return "Homepage200619";
    }

    /**
     * Return the buckets for the hypothesis
     * @return Bucket[]
     */
    public function getBuckets()
    {
        return [
            (new Bucket)
                ->setId('base')
                ->setWeight(75),
            (new Bucket)
                ->setId('variant1')
                ->setWeight(25), //25 pct of users will be in this bucket
        ];
    }

}
 No newline at end of file
+1 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@ class Manager
    /** @param array $experiments */
    /** @param array $experiments */
    private $experiments = [
    private $experiments = [
        'Homepage121118' => Hypotheses\Homepage121118::class,
        'Homepage121118' => Hypotheses\Homepage121118::class,
        'Homepage200619' => Hypotheses\Homepage200619::class,
    ];
    ];


    public function __construct($sampler = null)
    public function __construct($sampler = null)
Loading