summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2011-10-15 10:40:31 +0200
committerAndreas Gohr <andi@splitbrain.org>2011-10-15 10:40:31 +0200
commit407e65b998d62ef65046facba0d66a5dbbcb2509 (patch)
treef1b9dc7da7cddae747e1ea76a947c2ab3bf28d7a /inc/common.php
parent639f8f436d585d7697a7cbf4d7ad87854798c504 (diff)
downloadrpg-407e65b998d62ef65046facba0d66a5dbbcb2509.tar.gz
rpg-407e65b998d62ef65046facba0d66a5dbbcb2509.tar.bz2
Treat a whitespace-only page as empty and delete it FS#2283
Diffstat (limited to 'inc/common.php')
-rw-r--r--inc/common.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/common.php b/inc/common.php
index ec7f9bece..8b92ebcbc 100644
--- a/inc/common.php
+++ b/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;