From f9c5f252547370acd34608ff65f560f8593a5bd5 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 14 Sep 2007 23:33:51 +0000 Subject: [PATCH] mlanthaler: Bugfix: Make sure *Priority* is set, otherwise an invalid SQL statement will be generated when the page is published (Priority = ). (merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41818 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/SiteTree.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index f66c60873..06f127763 100644 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -1,4 +1,5 @@ Priority) || + (($this->Priority < 0) || ($this->Priority > 1))) + $this->Priority = self::$defaults['Priority']; + parent::onBeforeWrite(); }