diff --git a/Doctrine/Form.php b/Doctrine/Form.php
index 31c6e3e42..0ccacd474 100644
--- a/Doctrine/Form.php
+++ b/Doctrine/Form.php
@@ -50,6 +50,7 @@ class Doctrine_Form implements Iterator {
} else {
$elements[$column] = "\n";
}
+
}
return $elements[$column];
} else {
diff --git a/manual/docs/Basic Components - Query - DQL - SQL conversion.php b/manual/docs/Basic Components - Query - DQL - SQL conversion.php
index 1229ccf80..5fcb1dbe0 100644
--- a/manual/docs/Basic Components - Query - DQL - SQL conversion.php
+++ b/manual/docs/Basic Components - Query - DQL - SQL conversion.php
@@ -24,7 +24,7 @@ DQL QUERY: FROM User(id) WHERE User.Group.Phonenumber.phonenumber LIKE '123 123'
SQL QUERY: SELECT entity.id AS entity__id FROM entity LEFT JOIN groupuser ON entity.id = groupuser.user_id LEFT JOIN entity AS entity2 ON entity2.id = groupuser.group_id LEFT JOIN phonenumber ON entity2.id = phonenumber.entity_id WHERE phonenumber.phonenumber LIKE '123 123' AND (entity.type = 0 AND (entity2.type = 1 OR entity2.type IS NULL))
";
-
+function renderQueries($str) {
$e = explode("\n",$str);
$color = "367FAC";
@@ -37,16 +37,50 @@ foreach($e as $line) {
$l = str_replace("SELECT","
SELECT",$line);
$l = str_replace("FROM","
FROM",$l);
$l = str_replace("LEFT JOIN","
LEFT JOIN",$l);
+ $l = str_replace("INNER JOIN","
INNER JOIN",$l);
$l = str_replace("WHERE","
WHERE",$l);
$l = str_replace("AS","AS",$l);
$l = str_replace("ON","ON",$l);
$l = str_replace("ORDER BY","ORDER BY",$l);
$l = str_replace("LIMIT","LIMIT",$l);
$l = str_replace("OFFSET","OFFSET",$l);
+ $l = str_replace("DISTINCT","DISTINCT",$l);
$l = str_replace(" ","