mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-07-16 13:43:48 +03:00
Compare commits
3 Commits
v26.05.1
...
snyk-actio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7df78b91b | ||
|
|
c511f7d935 | ||
|
|
79a2e017bb |
@@ -22,7 +22,7 @@ jobs:
|
||||
uses: https://github.com/shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.5
|
||||
extensions: gd, mbstring, json, curl, xml, mysql, ldap
|
||||
extensions: gd, mbstring, json, curl, xml, dom, mysql, ldap
|
||||
|
||||
- name: Get Composer Cache Directory
|
||||
id: composer-cache
|
||||
|
||||
@@ -23,6 +23,14 @@ jobs:
|
||||
services:
|
||||
mysql:
|
||||
image: docker.io/library/mariadb:12.2.2-noble
|
||||
options: --tmpfs /var/lib/mysql:rw
|
||||
cmd:
|
||||
- --innodb-flush-log-at-trx-commit=0
|
||||
- --innodb-flush-method=O_DIRECT
|
||||
- --innodb-doublewrite=0
|
||||
- --innodb-buffer-pool-size=256M
|
||||
- --skip-log-bin
|
||||
- --sync-binlog=0
|
||||
env:
|
||||
MARIADB_USER: bookstack-test
|
||||
MARIADB_PASSWORD: bookstack-test
|
||||
@@ -35,7 +43,7 @@ jobs:
|
||||
uses: https://github.com/shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: gd, mbstring, json, curl, xml, mysql, ldap
|
||||
extensions: gd, mbstring, json, curl, xml, dom, mysql, ldap
|
||||
|
||||
- name: Get Composer Cache Directory
|
||||
id: composer-cache
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
matrix:
|
||||
php: ['8.2', '8.3', '8.4', '8.5']
|
||||
env:
|
||||
phpextensions: gd, mbstring, json, curl, xml, mysql, ldap, gmp
|
||||
phpextensions: gd, mbstring, json, curl, xml, dom, mysql, ldap, gmp
|
||||
phpextensioncachekey: cache-v1
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@v6
|
||||
|
||||
33
.forgejo/workflows/update-snyk.yml
Normal file
33
.forgejo/workflows/update-snyk.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
name: update-snyk
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- 'composer*'
|
||||
- 'package*'
|
||||
branches:
|
||||
- 'development'
|
||||
- 'release'
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: docker.io/library/node:24-trixie
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@v6
|
||||
|
||||
- name: Update Snyk for monitoring - Composer
|
||||
uses: https://github.com/snyk/actions/node@master
|
||||
env:
|
||||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
||||
with:
|
||||
args: snyk monitor --file=composer.lock --project-name=bookstack-${{forgejo.ref_name}}-composer
|
||||
|
||||
- name: Update Snyk for monitoring - NPM
|
||||
uses: https://github.com/snyk/actions/node@master
|
||||
env:
|
||||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
||||
with:
|
||||
args: snyk monitor --file=package-lock.json --project-name=bookstack-${{forgejo.ref_name}}-npm
|
||||
@@ -4,37 +4,12 @@ namespace BookStack\Sorting;
|
||||
|
||||
class BookSortMapItem
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $id;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $sort;
|
||||
|
||||
/**
|
||||
* @var ?int
|
||||
*/
|
||||
public $parentChapterId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $parentBookId;
|
||||
|
||||
public function __construct(int $id, int $sort, ?int $parentChapterId, string $type, int $parentBookId)
|
||||
{
|
||||
$this->id = $id;
|
||||
$this->sort = $sort;
|
||||
$this->parentChapterId = $parentChapterId;
|
||||
$this->type = $type;
|
||||
$this->parentBookId = $parentBookId;
|
||||
public function __construct(
|
||||
public int $id,
|
||||
public int $sort,
|
||||
public int|null $parentChapterId,
|
||||
public string $type,
|
||||
public int $parentBookId,
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ class BookSorter
|
||||
$model->priority = $sortMapItem->sort;
|
||||
}
|
||||
|
||||
if ($chapterChanged || $priorityChanged) {
|
||||
if ($priorityChanged || $chapterChanged) {
|
||||
$model::withoutTimestamps(fn () => $model->save());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@ class ConfiguredHtmlPurifier
|
||||
$this->configureHtmlDefinition($htmlDef);
|
||||
}
|
||||
|
||||
/** @var \HTMLPurifier_URIDefinition $uriDef */
|
||||
$uriDef = $config->getDefinition('URI', true, true);
|
||||
if ($uriDef instanceof HTMLPurifier_URIDefinition) {
|
||||
$this->configureUriDefinition($uriDef);
|
||||
|
||||
Reference in New Issue
Block a user