bludit/bl-kernel/ajax/generate-slug.php

15 lines
412 B
PHP
Raw Normal View History

2015-05-05 03:00:01 +02:00
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
$text = isset($_POST['text']) ? $_POST['text'] : '';
$parent = isset($_POST['parentKey']) ? $_POST['parentKey'] : '';
2017-07-13 22:39:04 +02:00
$oldKey = isset($_POST['currentKey']) ? $_POST['currentKey'] : '';
2015-05-05 03:00:01 +02:00
2018-08-03 18:59:23 +02:00
$slug = $pages->generateKey($text, $parent, $returnSlug=true, $oldKey);
2015-05-05 03:00:01 +02:00
2017-10-06 18:28:06 +02:00
exit (json_encode(array(
'status'=>0,
'slug'=>$slug
)));
2015-05-05 03:00:01 +02:00
2016-01-21 02:46:13 +01:00
?>