diff -r 10be6b9e55e7 -r 774ba82dca59 Entity/DocumentRepository.php --- a/Entity/DocumentRepository.php Fri Dec 09 06:43:49 2011 +0100 +++ b/Entity/DocumentRepository.php Wed Dec 14 23:28:57 2011 +0100 @@ -243,7 +243,7 @@ public function getTagsStr($document) { $em = $this->getEntityManager(); - $query = $em->createQuery("SELECT t.label FROM WikiTagBundle:DocumentTag dt JOIN dt.tag t WHERE dt.document = :docid"); + $query = $em->createQuery("SELECT t.label FROM WikiTagBundle:DocumentTag dt JOIN dt.tag t WHERE dt.document = :docid ORDER BY dt.tagOrder"); $query = $query->setParameter("docid", $document); $result = $query->getScalarResult(); $tagstr = array(); @@ -253,6 +253,7 @@ return $tagstr; } + /** * Update a wikitag document tags string. * @param DocumentInterface $document the wikitag document