Skip to content

Commit

Permalink
Upgrade all vendors and fix BC breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Sep 7, 2011
1 parent b364f71 commit 41a460b
Show file tree
Hide file tree
Showing 26 changed files with 124 additions and 29 deletions.
1 change: 1 addition & 0 deletions app/cache
1 change: 1 addition & 0 deletions app/config/comment.yml
Expand Up @@ -3,6 +3,7 @@ fos_comment:
class:
model:
comment: Ltc\CommentBundle\Document\Comment
thread: Ltc\CommentBundle\Document\Thread
form:
comment:
type: ltc_comment.comment
Expand Down
1 change: 1 addition & 0 deletions app/logs
2 changes: 0 additions & 2 deletions deps
Expand Up @@ -3,7 +3,6 @@

[twig]
git=git://github.com/fabpot/Twig.git
version=v1.1.0

[monolog]
git=git://github.com/Seldaek/monolog.git
Expand All @@ -16,7 +15,6 @@

[doctrine-mongodb-odm]
git=git://github.com/ornicar/mongodb-odm.git
version=annotations

[doctrine-data-fixtures]
git=git://github.com/doctrine/data-fixtures.git
Expand Down
32 changes: 32 additions & 0 deletions deps.lock
@@ -0,0 +1,32 @@
symfony 89df6bbfc4075e530e668ad05316cf73ef0ce56c
twig 4ea393adb08085f916c2029de41fc382a8bc4bda
monolog 5267b03b1e4861c4657ede17a88f13ef479db482
doctrine-common f2aca9b747158aeb32d0dee4e1740a3c9a36dae3
doctrine-mongodb 8ecdda68fb0a8ea2eb8cd32aa0ce433c5638cb4e
doctrine-mongodb-odm 06e761e77844c3048b05b76a5ed122ca0e33360c
doctrine-data-fixtures 4a8464ef83093de2378cef2770e13da7e4858ffc
assetic 44abd94dc388eaa7680ed170916cbde9607733c8
imagine 21fa973942e5424ffa810f4f60998300d32257bf
metadata f88e63448fda6199d03cbd52c36faa610c40bec5
pagerfanta 3322c75c4904787068674c5ccfe03d95706bd9ab
elastica 136b09c684879e7d6bb598c4b33c06aa1388bc2f
gaufrette b6b479fb10c6b227cfe36a0c9a4fc187c6e2abd7
doctrine-extensions 4e5ad66173b4739fc9b2976eedabbf402284fd3a
zend-service b4cdbcc5b0554c96fe464293e49d565ee53042c8
zend-uri 39a3eb0e57d6a5af0b83da075c1f35a348008bc2
zend-validator 36355c2f7864e8babd644ecbe08397775b92961b
zend-http e0818fed9d094fc0848c97bc6289deab4429ba3b
SensioDistributionBundle 029151792beac272548fe9df183e15b9be521870
SensioGeneratorBundle 019aa5ab8ed5017bb27b39f04cf2a659ff31ef74
AsseticBundle 19a2bbfa38eb9e124a168309df62467a3c285006
DoctrineMongoDBBundle 7c5f880fa4aab4005b439c08caf411a27fb7165c
DoctrineFixturesBundle 275e33be3ed4aa76afc21ff0aa5517b0e4795ba1
ApcBundle c325435fb20eade3819b46ecf0d931616f15c5e8
FOSUserBundle 0e2180e8c7f97c13e7747221b126f06ee76496e7
FOSCommentBundle 6236f8277487e7a861569e1b88654e672a6e5a49
FOQElasticaBundle 5ced74641d08dc91a3c81792e1168ed26ffd8d94
AkismetBundle 087462524a6ef202cce4159baf4038395717911a
PagerfantaBundle 3c660273cbd609baae92e2c9d8b39cbbaa0dd3eb
ImagineBundle 1b7d587ba84a0d3505493acc9608a47aa203632f
GaufretteBundle 6ca918cc2631415ee623ac3cb73e2941f9d62dec
MarkdownBundle 9a45c697d018c89a582a74440b29a797e531569b
15 changes: 0 additions & 15 deletions src/Ltc/ArticleBundle/Controller/ArticleController.php
Expand Up @@ -8,21 +8,6 @@

class ArticleController extends Controller
{
public function listByCategoryAction(Category $category, $page)
{
$paginator = $this->get('ltc_core.paginator_factory')->paginate(
$this->get('ltc_article.repository.article')->createPublishedSortedByCategoryQueryBuilder($category),
$page
);
$all = $this->get('ltc_article.repository.article')->findPublishedTitleAndSlugByCategory($category);

return $this->render('LtcArticleBundle:Article:listByCategory.html.twig', array(
'category' => $category,
'docs' => $paginator,
'allDocs' => $all
));
}

public function viewAction($categorySlug, $slug)
{
$article = $this->get('ltc_article.provider')->findArticle($categorySlug, $slug);
Expand Down
11 changes: 9 additions & 2 deletions src/Ltc/ArticleBundle/Controller/CategoryController.php
Expand Up @@ -28,9 +28,16 @@ public function viewAction($slug)
throw new NotFoundHttpException(sprintf('No category found with slug "%s"', $slug));
}

return $this->forward('LtcArticleBundle:Article:listByCategory', array(
$paginator = $this->get('ltc_core.paginator_factory')->paginate(
$this->get('ltc_article.repository.article')->createPublishedSortedByCategoryQueryBuilder($category),
$this->get('request')->query->get('page', 1)
);
$all = $this->get('ltc_article.repository.article')->findPublishedTitleAndSlugByCategory($category);

return $this->render('LtcArticleBundle:Article:listByCategory.html.twig', array(
'category' => $category,
'page' => $this->get('request')->query->get('page', 1)
'docs' => $paginator,
'allDocs' => $all
));
}
}
Expand Up @@ -156,7 +156,7 @@ public function load($manager)
}
if (isset($comments[$a['id']])) {
$thread = $this->threadManager->createThread();
$thread->setIdentifier($o->getCommentIdentifier());
$thread->setId($o->getCommentThreadId());
$manager->persist($thread);
foreach ($comments[$a['id']] as $commentArray) {
$comment = $this->commentManager->createComment($thread);
Expand Down
2 changes: 1 addition & 1 deletion src/Ltc/ArticleBundle/Document/Article.php
Expand Up @@ -93,7 +93,7 @@ public function getCategoryTitle()
*
* @return string
**/
public function getCommentIdentifier()
public function getCommentThreadId()
{
return $this->getCategory()->getSlug().'-'.$this->getSlug();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Ltc/BlogBundle/Document/BlogEntry.php
Expand Up @@ -48,7 +48,7 @@ public function hasPublicationDate()
*
* @return string
**/
public function getCommentIdentifier()
public function getCommentThreadId()
{
return 'table-ronde-'.$this->getSlug();
}
Expand Down
24 changes: 24 additions & 0 deletions src/Ltc/CommentBundle/Document/Comment.php
Expand Up @@ -27,6 +27,30 @@ class Comment extends BaseComment
*/
protected $authorName = 'Anonyme';

/**
* The thread
*
* @MongoDB\ReferenceOne(targetDocument="Ltc\CommentBundle\Document\Thread")
* @var Thread
*/
protected $thread;

/**
* @return Thread
*/
public function getThread()
{
return $this->thread;
}

/**
* @param Thread
*/
public function setThread($thread)
{
$this->thread = $thread;
}

/**
* Get authorName
* @return string
Expand Down
15 changes: 15 additions & 0 deletions src/Ltc/CommentBundle/Document/Thread.php
@@ -0,0 +1,15 @@
<?php

namespace Ltc\CommentBundle\Document;
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;

use FOS\CommentBundle\Document\Thread as BaseThread;

/**
* @MongoDB\Document(
* collection="comment_thread"
* )
*/
class Thread extends BaseThread
{
}
@@ -1,4 +1,4 @@
<form class="fos_comment_comment_form" action="{{ path("fos_comment_comment_create", { "threadIdentifier": thread.identifier }) }}" method="POST">
<form class="fos_comment_comment_form" action="{{ path("fos_comment_comment_create", { "threadId": thread.id }) }}" method="POST">

{% block fos_comment_form_title %}{% endblock %}

Expand Down
@@ -1,5 +1,5 @@
<div class="fos_comment_thread_show">
{% include "FOSCommentBundle:Comment:new.html.twig" with {"form": form} %}
{% include "FOSCommentBundle:Comment:new.html.twig" with {"form": newCommentForm} %}

<div class="fos_comment_thread_comments">
{% render "FOSCommentBundle:Comment:tree" with {"thread": thread} %}
Expand Down
5 changes: 5 additions & 0 deletions src/Ltc/ConfigBundle/Form/AuthorType.php
Expand Up @@ -25,4 +25,9 @@ public function getDefaultOptions(array $options)
'data_class' => 'Ltc\ConfigBundle\Document\Author',
);
}

public function getName()
{
return 'author';
}
}
5 changes: 5 additions & 0 deletions src/Ltc/ConfigBundle/Form/FeaturedArticleType.php
Expand Up @@ -19,4 +19,9 @@ public function getDefaultOptions(array $options)
'data_class' => 'Ltc\ConfigBundle\Document\FeaturedArticle',
);
}

public function getName()
{
return 'article';
}
}
5 changes: 5 additions & 0 deletions src/Ltc/ConfigBundle/Form/FeaturedStoryType.php
Expand Up @@ -18,4 +18,9 @@ public function getDefaultOptions(array $options)
'data_class' => 'Ltc\ConfigBundle\Document\FeaturedStory',
);
}

public function getName()
{
return 'story';
}
}
5 changes: 5 additions & 0 deletions src/Ltc/ConfigBundle/Form/PhotoType.php
Expand Up @@ -23,4 +23,9 @@ public function getDefaultOptions(array $options)
'data_class' => 'Ltc\ConfigBundle\Document\Photo',
);
}

public function getName()
{
return 'photo';
}
}
2 changes: 1 addition & 1 deletion src/Ltc/CoreBundle/Resources/js/front.js
Expand Up @@ -5,7 +5,7 @@ $(function() {
$('.infinitescroll').each(function() {
$(this).infinitescroll({
navSelector: "div.pager",
nextSelector: "div.pager a.next",
nextSelector: "div.pager a:last",
itemSelector: ".infinitescroll .paginated_item",
loadingText: "Chargement des articles suivants...",
donetext: "Fin de la liste des articles."
Expand Down
2 changes: 1 addition & 1 deletion src/Ltc/DocBundle/Document/Doc.php
Expand Up @@ -164,7 +164,7 @@ abstract public function hasPublicationDate();
*
* @return string
**/
abstract public function getCommentIdentifier();
abstract public function getCommentThreadId();

/**
* @return string
Expand Down
5 changes: 5 additions & 0 deletions src/Ltc/DocBundle/Form/DocFormType.php
Expand Up @@ -23,4 +23,9 @@ public function buildForm(FormBuilder $builder, array $options)
->add('image', 'ltc_image')
;
}

public function getName()
{
return 'doc';
}
}
2 changes: 1 addition & 1 deletion src/Ltc/DocBundle/Resources/views/Doc/view.html.twig
Expand Up @@ -60,7 +60,7 @@
{% endif %}

<span class="title">Discussion</span>
{% render "FOSCommentBundle:Thread:show" with {"identifier": doc.commentIdentifier} %}
{% render "FOSCommentBundle:Thread:show" with {"id": doc.commentThreadId} %}
</article>

</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Ltc/StoryBundle/Document/Story.php
Expand Up @@ -292,7 +292,7 @@ public function setCreatedAt(DateTime $createdAt)
*
* @return string
**/
public function getCommentIdentifier()
public function getCommentThreadId()
{
return 'actu-'.$this->getSlug();
}
Expand Down
5 changes: 5 additions & 0 deletions src/Ltc/StoryBundle/Form/StoryFormType.php
Expand Up @@ -16,4 +16,9 @@ public function buildForm(FormBuilder $builder, array $options)
->add('authorName')
;
}

public function getName()
{
return 'story';
}
}
2 changes: 1 addition & 1 deletion src/Ltc/StoryBundle/Resources/views/Story/view.html.twig
Expand Up @@ -22,7 +22,7 @@
<div class="body">{{ story.body|markdown }}</div>

<span class="title">Discussion</span>
{% render "FOSCommentBundle:Thread:show" with {"identifier": story.commentIdentifier} %}
{% render "FOSCommentBundle:Thread:show" with {"id": story.commentThreadId} %}
</article>

</div>
Expand Down
1 change: 1 addition & 0 deletions web/bundles/whiteoctoberpagerfanta

0 comments on commit 41a460b

Please sign in to comment.