Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@kohanajs/mod-cms

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kohanajs/mod-cms - npm Package Compare versions

Comparing version 5.4.0 to 5.4.1

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [5.4.1](https://gitlab.com/kohana-js/proposals/level0/mod-cms/compare/v5.4.0...v5.4.1) (2022-03-01)
### Bug Fixes
* block and item sort is not order by weight ([b601da2](https://gitlab.com/kohana-js/proposals/level0/mod-cms/commit/b601da2106d1ac3f9ab9ae11d753d0f011a83e4b))
## [5.4.0](https://gitlab.com/kohana-js/proposals/level0/mod-cms/compare/v5.3.0...v5.4.0) (2022-02-21)

@@ -7,0 +14,0 @@

7

classes/controller/admin/Page.js

@@ -98,3 +98,6 @@ const {SQL} = require("@kohanajs/constants");

const assignItem = (obj, its, prop) => {
its.sort((a, b) => (a.weight || 0) - (b.weight || 0));
its.forEach(it => {
console.log(it.weight);
obj.items[it.name] = obj.items[it.name] || [];

@@ -121,3 +124,3 @@ const item = JSON.parse(i18nValueJSON);

//add blocks to version
const blocks = await ORM.readBy(PageBlock, 'page_id', [pageId], {database, asArray: true});
const blocks = await ORM.readBy(PageBlock, 'page_id', [pageId], {database, asArray: true, orderBy: new Map([['weight', 'ASC']])});
await ORM.eagerLoad(blocks, {

@@ -131,3 +134,3 @@ with:["PageBlockAttribute", "PageBlockValue", "PageBlockItem"],

name: it.name,
attributes:{},
attributes:{weight: it.weight},
values:JSON.parse(i18nValueJSON),

@@ -134,0 +137,0 @@ items: {}

{
"name": "@kohanajs/mod-cms",
"version": "5.4.0",
"version": "5.4.1",
"description": "The CMS module for KohanaJS",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc