Make the project field in the tags table nullable so it is (hopefully)

optional on setups with enabled foreign key constraints.
This commit is contained in:
Thomas Keller
2012-04-19 00:14:10 +02:00
parent 169fbe6216
commit 75f62663a9
4 changed files with 52 additions and 5 deletions

View File

@@ -83,7 +83,7 @@ class IDF_Template_MarkdownForge extends Pluf_Template_Tag
$name = $class;
$class = IDF_TAG_DEFAULT_CLASS;
}
$sql = new Pluf_SQL('class=%s AND lcname=%s AND project=0',
$sql = new Pluf_SQL('class=%s AND lcname=%s AND project IS NULL',
array(strtolower($class), mb_strtolower($name)));
$tag = Pluf::factory('IDF_Tag')->getOne(array('filter' => $sql->gen()));
}