Skip to content

Commit

Permalink
[skip ci] fail to merge
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafabarmshory committed Sep 11, 2020
1 parent 00f755d commit 1ab5692
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
3 changes: 1 addition & 2 deletions src6/Db/Engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

use Pluf\Options;
use Pluf\Data\Schema;
use Pluf_Utils;
use WKT;
use geoPHP;

Expand Down Expand Up @@ -337,7 +336,7 @@ public static function passwordToDb($val, $db)
return $val;
}
// We need to hash the value.
$salt = Pluf_Utils::getRandomString(5);
$salt = \Pluf\Utils::getRandomString(5);
return 'sha1:' . $salt . ':' . sha1($salt . $val);
}

Expand Down
5 changes: 2 additions & 3 deletions src6/Db/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
namespace Pluf\Db;

use Pluf\Options;
use Pluf\Pluf\Tenant;
use Pluf;
use Pluf_Model;
use Pluf_SQL;
use Pluf_Tenant;

/**
* Create the schema of a given Pluf_Model for a given database.
Expand Down Expand Up @@ -101,7 +100,7 @@ public function getRelationTable(Pluf_Model $from, Pluf_Model $to, ?string $rela
public function createQuery(Pluf_Model $model)
{
if (Pluf::f('multitenant', false) && $model->_a['multitenant']) {
$model->tenant = Pluf_Tenant::getCurrent();
$model->tenant = Tenant::getCurrent();
}

// $engine = $model->getEngine();
Expand Down
17 changes: 8 additions & 9 deletions src6/Pluf/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
use Pluf\Pluf\Search\Word;
use Exception;
use Pluf;
use Pluf_SQL;

/**
* Class implementing a small search engine.
Expand Down Expand Up @@ -185,10 +184,10 @@ public static function index($doc, $stemmer = 'Pluf_Text_Stemmer_Porter')
}
// Drop the last indexation.
$gocc = new Occ();
$sql = new Pluf_SQL('DELETE FROM ' . $gocc->getSqlTable() . ' WHERE model_class=%s AND model_id=%s', array(
$doc->_model,
$doc->id
));
// $sql = new Pluf_SQL('DELETE FROM ' . $gocc->getSqlTable() . ' WHERE model_class=%s AND model_id=%s', array(
// $doc->_model,
// $doc->id
// ));
$db = &Pluf::db();
$db->execute($sql->gen());
// Get the ids for each word.
Expand Down Expand Up @@ -230,10 +229,10 @@ public static function index($doc, $stemmer = 'Pluf_Text_Stemmer_Porter')
$occ->create();
}
// update the stats
$sql = new Pluf_SQL('model_class=%s AND model_id=%s', array(
$doc->_model,
$doc->id
));
// $sql = new Pluf_SQL('model_class=%s AND model_id=%s', array(
// $doc->_model,
// $doc->id
// ));
$last_index = Pluf::factory(Stats::class)->getList(array(
'filter' => $sql->gen()
));
Expand Down
6 changes: 0 additions & 6 deletions src6/Pluf/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,8 @@ function init()
$this->_a['cols'] = array(
// It is mandatory to have an "id" column.
'id' => array(
<<<<<<< HEAD:src6/Pluf/Session.php
'type' => Schema::SEQUENCE,
'blank' => true
=======
'type' => 'Sequence',
// It is automatically added.
'is_null' => false
>>>>>>> 93ec36415c2420a23445480ce9e3ac27f04bf0e1:src/Pluf/Session.php
),
'version' => array(
'type' => 'Integer',
Expand Down

0 comments on commit 1ab5692

Please sign in to comment.