Skip to content

Commit

Permalink
??
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafabarmshory committed Oct 17, 2020
1 parent 1ab5692 commit d2b63c1
Show file tree
Hide file tree
Showing 13 changed files with 554 additions and 513 deletions.
52 changes: 46 additions & 6 deletions .buildpath
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
<attribute name="composer" value="source"/>
</attributes>
</buildpathentry>
<buildpathentry kind="src" path="vendor/composer/package-versions-deprecated/src/PackageVersions">
<attributes>
<attribute name="composer" value="vendor"/>
</attributes>
</buildpathentry>
<buildpathentry kind="src" path="vendor/composer/semver/src">
<attributes>
<attribute name="composer" value="vendor"/>
Expand All @@ -43,7 +48,7 @@
<attribute name="composer" value="vendor"/>
</attributes>
</buildpathentry>
<buildpathentry excluding="semver/|spdx-licenses/|xdebug-handler/" kind="src" path="vendor/composer">
<buildpathentry excluding="package-versions-deprecated/|semver/|spdx-licenses/|xdebug-handler/" kind="src" path="vendor/composer">
<attributes>
<attribute name="composer" value="vendor"/>
</attributes>
Expand Down Expand Up @@ -138,11 +143,6 @@
<attribute name="composer" value="vendor"/>
</attributes>
</buildpathentry>
<buildpathentry kind="src" path="vendor/ocramius/package-versions/src/PackageVersions">
<attributes>
<attribute name="composer" value="vendor"/>
</attributes>
</buildpathentry>
<buildpathentry kind="src" path="vendor/pear/archive_tar">
<attributes>
<attribute name="composer" value="vendor"/>
Expand Down Expand Up @@ -378,11 +378,41 @@
<attribute name="composer" value="vendor"/>
</attributes>
</buildpathentry>
<buildpathentry kind="src" path="vendor/symfony/polyfill-intl-idn">
<attributes>
<attribute name="composer" value="vendor"/>
</attributes>
</buildpathentry>
<buildpathentry excluding="Resources/stubs/" kind="src" path="vendor/symfony/polyfill-intl-normalizer">
<attributes>
<attribute name="composer" value="vendor"/>
</attributes>
</buildpathentry>
<buildpathentry kind="src" path="vendor/symfony/polyfill-intl-normalizer/Resources/stubs">
<attributes>
<attribute name="composer" value="vendor"/>
</attributes>
</buildpathentry>
<buildpathentry kind="src" path="vendor/symfony/polyfill-mbstring">
<attributes>
<attribute name="composer" value="vendor"/>
</attributes>
</buildpathentry>
<buildpathentry excluding="Resources/stubs/" kind="src" path="vendor/symfony/polyfill-php70">
<attributes>
<attribute name="composer" value="vendor"/>
</attributes>
</buildpathentry>
<buildpathentry kind="src" path="vendor/symfony/polyfill-php70/Resources/stubs">
<attributes>
<attribute name="composer" value="vendor"/>
</attributes>
</buildpathentry>
<buildpathentry kind="src" path="vendor/symfony/polyfill-php72">
<attributes>
<attribute name="composer" value="vendor"/>
</attributes>
</buildpathentry>
<buildpathentry excluding="Resources/stubs/" kind="src" path="vendor/symfony/polyfill-php73">
<attributes>
<attribute name="composer" value="vendor"/>
Expand All @@ -393,6 +423,16 @@
<attribute name="composer" value="vendor"/>
</attributes>
</buildpathentry>
<buildpathentry excluding="Resources/stubs/" kind="src" path="vendor/symfony/polyfill-php80">
<attributes>
<attribute name="composer" value="vendor"/>
</attributes>
</buildpathentry>
<buildpathentry kind="src" path="vendor/symfony/polyfill-php80/Resources/stubs">
<attributes>
<attribute name="composer" value="vendor"/>
</attributes>
</buildpathentry>
<buildpathentry kind="src" path="vendor/symfony/service-contracts">
<attributes>
<attribute name="composer" value="vendor"/>
Expand Down
12 changes: 4 additions & 8 deletions src6/Data/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Pluf\Options;
use Pluf\Db\Connection;
use Pluf\Db\Expression;
use Pluf_Utils;
use Pluf\Utils;

/**
* Create the schema of a given Pluf_Model for a given database.
Expand Down Expand Up @@ -373,9 +373,7 @@ public function getFields(ModelDescription $md, ?string $alias = null)
$alias = $alias . '.';
}
foreach ($md as $name => $property) {
if ($property->type == self::MANY_TO_MANY ||
$property->type == self::MANY_TO_ONE ||
$property->type == self::ONE_TO_MANY) {
if ($property->type == self::MANY_TO_MANY || $property->type == self::MANY_TO_ONE || $property->type == self::ONE_TO_MANY) {
continue;
}
$field[$name] = $alias . $this->getFieldName($md, $property, $autoPrefix);
Expand Down Expand Up @@ -720,9 +718,7 @@ public function getValues(ModelDescription $md, $model)
// DB is responsible for ID
continue;
}
if ($property->type == self::MANY_TO_MANY ||
$property->type == self::ONE_TO_MANY ||
$property->isMapped()) {
if ($property->type == self::MANY_TO_MANY || $property->type == self::ONE_TO_MANY || $property->isMapped()) {
// Virtural attributes
continue;
}
Expand Down Expand Up @@ -1180,7 +1176,7 @@ public static function passwordToDb($val)
return $val;
}
// We need to hash the value.
$salt = Pluf_Utils::getRandomString(5);
$salt = Utils::getRandomString(5);
return 'sha1:' . $salt . ':' . sha1($salt . $val);
}

Expand Down
Loading

0 comments on commit d2b63c1

Please sign in to comment.