mirror of
https://github.com/danpros/htmly.git
synced 2026-04-19 20:16:22 +05:30
ContentManagement of SubPages Finished.
(BUG) Active link if Page and Page/subPage have the same Name.
This commit is contained in:
parent
614c64e62d
commit
be5c20d63e
3 changed files with 17 additions and 7 deletions
|
|
@ -141,7 +141,7 @@ get("/:static/:sub/edit", function($static,$sub) {
|
|||
header("location: $login");
|
||||
}
|
||||
});
|
||||
post("/:static/:sub/edit", function() {
|
||||
post("/:static/:sub/edit", function($static,$sub) {
|
||||
$proper = is_csrf_proper(from($_REQUEST, 'csrf_token'));
|
||||
|
||||
if(!login())
|
||||
|
|
@ -155,6 +155,10 @@ post("/:static/:sub/edit", function() {
|
|||
$content = from($_REQUEST, 'content');
|
||||
$oldfile = from($_REQUEST, 'oldfile');
|
||||
$destination = from($_GET, 'destination');
|
||||
if($destination === null)
|
||||
{
|
||||
$destination = $static . "/" . $sub;
|
||||
}
|
||||
if ($proper && !empty($title) && !empty($content)) {
|
||||
if (!empty($url)) {
|
||||
edit_page($title, $url, $content, $oldfile, $destination);
|
||||
|
|
@ -1252,7 +1256,7 @@ get('/:static/add', function($static) {
|
|||
header("location: $login");
|
||||
}
|
||||
});
|
||||
post('/:static/add', function($static) {//not working
|
||||
post('/:static/add', function($static) {
|
||||
|
||||
$proper = is_csrf_proper(from($_REQUEST, 'csrf_token'));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue