This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Parent + Nested validation changes (#1138) * #1121 (#1126) * Public Role : UserId should be set 0 instead of null * Change : invalid token * Issue Fix #1109 (#1146) * Added file support for 7.0 (Explained) (#1124) * Bump version to 2.3.0 (#1120) * Added file support for 7.0 (Explained) Having `public` in front of `const` completely breaks the application for `PHP 7.0` usage, which broke everything when I pulled origin. Though I understand `PHP 7.0` isn't officially supported, and that `PHP 7.1+` is, there is no reason to use public alongside const as the default visibility of class constants are public. We might as well provide support where possible if it doesn't hurt. Explained here: https://stackoverflow.com/a/51568547 * Issue Fix #1114 (#1128) * Issue Fix #1114 * Change exception message * Update .gitignore (#1129) * Bump version to 2.3.0 (#1120) * Update .gitignore * Update .gitignore * Update .gitignore * Update .gitignore * Issue Fix #1125 (#1134) * Issue Fix #1131 (#1135) * create thumb for pdf if imagick is available (#1123) * Bump version to 2.3.0 (#1120) * create thumb for pdf if imagick is available * Issue Fix #1109 * Add Special characters in the radom string generator * Issue Fix #1109 * Remove other option * Imagick changes * Issue Fix #1148 (#1152) * Fix 1149 (#1156) * Process relation & non relatinal fields sequentially to solve logical operator issue * Process relation & non relatinal fields sequentially to solve logical operator issue * Fixed namespace of InvalidLoggerConfigurationException (#1153) * Bump version to v2.3.1
- Loading branch information
1 parent
ff05f58
commit bf1330e
Showing
19 changed files
with
386 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
migrations/upgrades/schemas/20190722110232_password_validation_setting_field.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
class PasswordValidationSettingField extends AbstractMigration | ||
{ | ||
public function up() | ||
{ | ||
$conn = $this->getAdapter()->getConnection(); | ||
|
||
$fieldObject = [ | ||
'field' => 'password_policy', | ||
'type' => 'string', | ||
'note' => 'Weak : Minimum length 8; Strong : 1 small-case letter, 1 capital letter, 1 digit, 1 special character and the length should be minimum 8', | ||
'interface' => 'dropdown', | ||
'options' => ['choices' => ['' => 'None', '/^.{8,}$/' => 'Weak', '/(?=^.{8,}$)(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()_+}{\';\'?>.<,])(?!.*\s).*$/' => 'Strong']] | ||
]; | ||
$collection = 'directus_settings'; | ||
$checkSql = sprintf('SELECT 1 FROM `directus_fields` WHERE `collection` = "%s" AND `field` = "%s";', $collection, $fieldObject['field']); | ||
$result = $this->query($checkSql)->fetch(); | ||
if (!$result) { | ||
$insertSqlFormat = "INSERT INTO `directus_fields` (`collection`, `field`, `type`, `interface`, `options`, `note`) VALUES ('%s', '%s', '%s', '%s' , %s, '%s');"; | ||
$insertSql = sprintf($insertSqlFormat, $collection, $fieldObject['field'], $fieldObject['type'], $fieldObject['interface'], $conn->quote(json_encode($fieldObject['options'])) , $fieldObject['note']); | ||
$this->execute($insertSql); | ||
} | ||
|
||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
migrations/upgrades/schemas/20190726064001_update_note_for_default_limit.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
class UpdateNoteForDefaultLimit extends AbstractMigration | ||
{ | ||
public function up() | ||
{ | ||
$this->execute(\Directus\phinx_update( | ||
$this->getAdapter(), | ||
'directus_fields', | ||
[ | ||
'note' => 'The color that best fits your brand.' | ||
], | ||
['collection' => 'directus_settings', 'field' => 'color'] | ||
)); | ||
|
||
$this->execute(\Directus\phinx_update( | ||
$this->getAdapter(), | ||
'directus_fields', | ||
[ | ||
'note' => 'Default max amount of items that\'s returned at a time in the API.' | ||
], | ||
['collection' => 'directus_settings', 'field' => 'default_limit'] | ||
)); | ||
|
||
$this->execute(\Directus\phinx_update( | ||
$this->getAdapter(), | ||
'directus_fields', | ||
[ | ||
'width' => 'half', | ||
], | ||
['collection' => 'directus_settings', 'field' => 'password_policy'] | ||
)); | ||
|
||
$this->execute(\Directus\phinx_update( | ||
$this->getAdapter(), | ||
'directus_fields', | ||
[ | ||
'width' => 'half', | ||
], | ||
['collection' => 'directus_settings', 'field' => 'file_max_size'] | ||
)); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.