Skip to content
Snippets Groups Projects
Commit 407e65b9 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

Treat a whitespace-only page as empty and delete it FS#2283

parent 639f8f43
No related branches found
No related tags found
No related merge requests found
...@@ -980,7 +980,7 @@ function saveWikiText($id,$text,$summary,$minor=false){ ...@@ -980,7 +980,7 @@ function saveWikiText($id,$text,$summary,$minor=false){
$file = wikiFN($id); $file = wikiFN($id);
$old = @filemtime($file); // from page $old = @filemtime($file); // from page
$wasRemoved = empty($text); $wasRemoved = (trim($text) == ''); // check for empty or whitespace only
$wasCreated = !@file_exists($file); $wasCreated = !@file_exists($file);
$wasReverted = ($REV==true); $wasReverted = ($REV==true);
$newRev = false; $newRev = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment