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 9.2.0 to 9.3.0

7

CHANGELOG.md

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

## [9.3.0](https://gitlab.com/kohana-js/proposals/level0/mod-cms/compare/v9.2.0...v9.3.0) (2022-07-27)
### Features
* auto slug ([361b091](https://gitlab.com/kohana-js/proposals/level0/mod-cms/commit/361b0918bb8aaeec74391745ad4c7f522b6d148d))
## [9.2.0](https://gitlab.com/kohana-js/proposals/level0/mod-cms/compare/v9.1.0...v9.2.0) (2022-07-27)

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

2

classes/controller/admin/Content.js

@@ -40,3 +40,3 @@ const path = require('path');

page.live_weight = livePage.weight;
page.synced = page.original === livePage.original;
page.synced = page.original === livePage.original && page.slug === livePage.slug;
}

@@ -43,0 +43,0 @@ });

@@ -58,2 +58,13 @@ const { ControllerAdmin } = require('@kohanajs/mod-admin');

const database = this.state.get(ControllerMixinDatabase.DATABASES).get('draft');
//auto slug
if($_POST[':slug'] === String(instance.id)){
const slug = $_POST[':name'].toLowerCase().replace(/ /g, '-').replace(/[^\w-]+/g, '');
console.log(slug);
const slugExist = await ORM.readBy(Page, 'slug', [slug], {database, asArray:false});
instance.slug = slugExist ? (slug + instance.id) : slug;
}
const original = HelperPageText.getOriginal(instance);

@@ -66,3 +77,2 @@ //update original

//collect tags and write to original
const database = this.state.get(ControllerMixinDatabase.DATABASES).get('content');
await instance.eagerLoad({with:['PageTag']}, {database});

@@ -159,3 +169,3 @@

templateData.published = !!livePage;
templateData.sync = page.original === livePage?.original;
templateData.sync = page.original === livePage?.original && page.slug === livePage.slug;
templateData.page_type = page.page_type;

@@ -162,0 +172,0 @@ templateData.tags = tags;

{
"name": "@kohanajs/mod-cms",
"version": "9.2.0",
"version": "9.3.0",
"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