bludit/bl-kernel/ajax/slug.php

17 lines
423 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'] : '';
2017-07-13 22:39:04 +02:00
$parent = isset($_POST['parentKey']) ? $_POST['parentKey'] : PARENT;
$oldKey = isset($_POST['currentKey']) ? $_POST['currentKey'] : '';
2015-05-05 03:00:01 +02:00
2017-07-13 22:39:04 +02:00
$slug = $dbPages->generateKey($text, $parent, $returnSlug=true, $oldKey);
2015-05-05 03:00:01 +02:00
2017-07-13 22:39:04 +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
?>