...
 
Commits (13)
......@@ -149,7 +149,7 @@ class Factory
'status' => 'success', //should success be assumed?
), $data);
ob_end_clean();
@ob_end_clean();
header('Content-type: application/json');
header("Access-Control-Allow-Origin: *");
......@@ -173,7 +173,9 @@ class Factory
}
$entities[$k] = $entity->export();
$entities[$k]['guid'] = (string) $entities[$k]['guid']; //javascript doesn't like long numbers..
if (isset($entities[$k]['guid'])) {
$entities[$k]['guid'] = (string)$entities[$k]['guid']; //javascript doesn't like long numbers..
}
if (isset($entities[$k]['ownerObj']['guid'])) {
$entities[$k]['ownerObj']['guid'] = (string) $entity->ownerObj['guid'];
}
......
......@@ -64,7 +64,7 @@ class ElasticRepository
];
}
if ($opts['entity_guid']) {
if (isset($opts['entity_guid'])) {
$must[] = [
'term' => [
'entity_guid' => $opts['entity_guid']
......
......@@ -18,7 +18,7 @@ class Client
$config = Config::_()->get('redis');
try {
$this->redis->connect($config['pubsub'] ?: $config['master'] ?: '127.0.0.1');
$this->redis->connect(@$config['pubsub'] ?: $config['master'] ?: '127.0.0.1');
} catch (\Exception $e) { }
}
}
......
......@@ -33,7 +33,7 @@ class Mailer
$this->mailer->isSMTP();
//$this->mailer->SMTPKeepAlive = true;
$this->mailer->Host = Core\Config::_()->email['smtp']['host'];
$this->mailer->Auth = Core\Config::_()->email['smtp']['auth'];
$this->mailer->AuthType = @Core\Config::_()->email['smtp']['auth'];
$this->mailer->SMTPAuth = true;
$this->mailer->Username = Core\Config::_()->email['smtp']['username'];
$this->mailer->Password = Core\Config::_()->email['smtp']['password'];
......
......@@ -69,8 +69,8 @@ class Entities extends base
}
}
if (!property_exists($row, 'type') || !$row->type) {
//return null;
if (!property_exists($row, 'type') || !$row->type) {
$row->type = 'Unknown';
}
$default = "Minds\\Entities\\" . ucfirst($row->type);
if (class_exists($default) && is_subclass_of($default, 'ElggEntity')) {
......
......@@ -38,6 +38,7 @@ class Events
*/
Core\Events\Dispatcher::register('export:extender', 'all', function ($event) {
$params = $event->getParameters();
$export = null;
if ($params['entity'] instanceof User) {
$keystore = (new Messenger\Keystore())
......
......@@ -18,7 +18,7 @@ use Minds\Traits\MagicAttributes;
* @method string getEntityGuid()
* @method Notification setEntityGuid(string $value)
* @method string getEntityUrn()
* @method Notification getEntityUrn(string $value)
* @method Notification setEntityUrn(string $value)
* @method string getType()
* @method Notification setType(string $value)
* @method array getData()
......
......@@ -12,6 +12,7 @@ use Minds\Entities\User;
*/
class Session extends base
{
/** @var User $user */
private static $user;
private $session_name = 'minds';
......
......@@ -8,6 +8,7 @@ date_default_timezone_set('UTC');
$minds = new Minds\Core\Minds();
$minds->loadLegacy();
//$minds->loadConfigs();
$CONFIG = Minds\Core\Di\Di::_()->get('Config');
$CONFIG->default_access = 2;
......
......@@ -199,7 +199,7 @@ abstract class ElggEntity extends ElggData implements
* @param string $name Name
* @param mixed $value Value
*
* @return bool
* @return self
*/
public function set($name, $value) {
......@@ -211,9 +211,7 @@ abstract class ElggEntity extends ElggData implements
$this->attributes[$name] = $value;
break;
}
if($this->guid){
// $this->save();
}
return $this;
}
......
......@@ -933,10 +933,10 @@ function fatalErrorShutdownHandler(){
if($last_error['type'] == E_ERROR && php_sapi_name() != "cli"){
error_log('Fatal error: '.nl2br(htmlentities(print_r($last_error, true), ENT_QUOTES, 'UTF-8')));
// Wipe any existing output buffer
ob_end_clean();
@ob_end_clean();
_elgg_php_error_handler($last_error['type'], $last_error['message'], $last_error['file'], $last_error['line']);
// Wipe any existing output buffer
ob_end_clean();
@ob_end_clean();
header('Fatal error', true, 500);
echo file_get_contents(dirname(dirname(dirname(__FILE__))) . '/errors/500.html');
......
......@@ -250,6 +250,9 @@ $CONFIG->set('google', [
'key_path' => __DIR__ . '/.auth/analytics.json',
],
'ads' => '', // get it from https://ga-dev-tools.appspot.com/account-explorer/
],
'recaptcha' => [
'site_key' => '12345'
]
]);
......@@ -356,6 +359,7 @@ $CONFIG->set('blockchain', [
'contract_address' => '0x4b637bba81d24657d4c6acc173275f3e11a8d5d7',
'wallet_address' => '0x4CDc1C1fd1A3F4DD63231afF8c16501BcC11Df95',
'wallet_pkey' => '',
'plus_address' => '12345'
],
],
......@@ -367,7 +371,11 @@ $CONFIG->set('blockchain', [
'cap' => 1000
],
'mw3' => '/usr/bin/env node ' . __MINDS_ROOT__ . '/../mw3/index.js'
'mw3' => '/usr/bin/env node ' . __MINDS_ROOT__ . '/../mw3/index.js',
'token_distribution_event_address' => '12345',
'wallet_address' => '12345',
'network_address' => '12345'
]);
$CONFIG->set('blockchain_override', [
......