Browse files

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

  • Loading branch information...
1 parent 639f8f4 commit 407e65b998d62ef65046facba0d66a5dbbcb2509 @splitbrain splitbrain committed Oct 15, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 inc/common.php
View
2 inc/common.php
@@ -980,7 +980,7 @@ function saveWikiText($id,$text,$summary,$minor=false){
$file = wikiFN($id);
$old = @filemtime($file); // from page
- $wasRemoved = empty($text);
+ $wasRemoved = (trim($text) == ''); // check for empty or whitespace only
$wasCreated = !@file_exists($file);
$wasReverted = ($REV==true);
$newRev = false;

0 comments on commit 407e65b

Please sign in to comment.