<?php
// PukiWiki - Yet another WikiWikiWeb clone.
// file.php
-// Copyright (C)
-// 2002-2016 PukiWiki Development Team
+// Copyright
+// 2002-2017 PukiWiki Development Team
// 2001-2002 Originally written by yu-ji
// License: GPL v2 or (at your option) any later version
//
// Do nothing when it has no changes
$oldpostdata = is_page($page) ? join('', get_source($page)) : '';
$oldtext_without_author = remove_author_info($oldpostdata);
- if ($text_without_author === $oldtext_without_author) {
+ if (!$is_delete && $text_without_author === $oldtext_without_author) {
// Do nothing on updating with unchanged content
return;
}
}
$postdata = @join('', get_source($page));
- if ($postdata == '') $postdata = auto_template($page);
+ if ($postdata === '') $postdata = auto_template($page);
$postdata = remove_author_info($postdata);
return array('msg'=>$_title_edit, 'body'=>edit_form($page, $postdata));
}
}
$body = $_msg_preview . '<br />' . "\n";
- if ($postdata == '')
+ if ($postdata === '')
$body .= '<strong>' . $_msg_preview_delete . '</strong>';
$body .= '<br />' . "\n";
}
// NULL POSTING, OR removing existing page
- if ($postdata == '') {
+ if ($postdata === '') {
page_write($page, $postdata);
$retvars['msg' ] = $_title_deleted;
$retvars['body'] = str_replace('$1', htmlsc($page), $_title_deleted);