Changeset 8
- Timestamp:
- 10/03/07 17:00:17 (1 year ago)
- Files:
-
- trunk/apps/frontend/config/app.yml (modified) (1 diff)
- trunk/apps/frontend/modules/sfSimpleForum/actions/actions.class.php (modified) (2 diffs)
- trunk/apps/frontend/modules/sfSimpleForum/templates/_topic_moderator_actions.php (modified) (1 diff)
- trunk/apps/frontend/modules/sfSimpleForum/templates/forumListSuccess.php (modified) (1 diff)
- trunk/apps/frontend/templates/layout.php (modified) (2 diffs)
- trunk/data/sql (modified) (1 prop)
- trunk/lib/model (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/apps/frontend/config/app.yml
r7 r8 1 1 all: 2 2 sfSimpleForumPlugin: 3 forum_name: Mot ile forums3 forum_name: Motyle forums 4 4 display_categories: true 5 5 use_feeds: true # requires sfFeed2Plugin trunk/apps/frontend/modules/sfSimpleForum/actions/actions.class.php
r7 r8 11 11 $this->forward404Unless($topic); 12 12 13 // Spam all topic's posts 14 $posts = $topic->getPosts(); 15 foreach ($posts as $post) 16 { 17 $post->setModerationStatus(sfPropelModerationBehavior::TAGGED_UNSAFE); 18 $post->save(); 19 } 20 // Spam topic 13 21 $topic->setModerationStatus(sfPropelModerationBehavior::TAGGED_UNSAFE); 14 22 $topic->save(); … … 28 36 29 37 $post->setModerationStatus(sfPropelModerationBehavior::TAGGED_UNSAFE); 30 $post->save( );38 $post->save(null, true); 31 39 32 40 $topic = $post->getsfSimpleForumTopic(); 33 34 $this->redirect('sfSimpleForum/topic?id='.$topic->getId().'&page='.$page); 41 if($topic->getNbPosts() == 0) 42 { 43 // Last post of the topic was moderated 44 // Spam topic too (to avoid errors on counts) 45 $topic->setModerationStatus(sfPropelModerationBehavior::TAGGED_UNSAFE); 46 $topic->save(); 47 // redirect to the forum 48 $this->redirect('sfSimpleForum/forum?forum_name='.$topic->getsfSimpleForumForum()->getStrippedName()); 49 } 50 else 51 { 52 // redirecto to the topic 53 $this->redirect('sfSimpleForum/topic?id='.$topic->getId().'&page='.$page); 54 } 35 55 } 36 56 trunk/apps/frontend/modules/sfSimpleForum/templates/_topic_moderator_actions.php
r7 r8 1 1 <?php echo use_helper('I18N') ?> 2 <?php if ($user_is_moderator): ?> 2 3 <ul class="post_actions"> 3 4 <li><?php echo link_to(__('Moderate'), 'sfSimpleForum/spamTopic?id='.$topic->getId()) ?></li> 4 5 <li><?php echo link_to(__('Delete'), 'sfSimpleForum/deleteTopic?id='.$topic->getId(), array('confirm' =>__('Are you sure you want to delete this topic?'))) ?></li> 5 6 </ul> 7 <?php endif; ?> trunk/apps/frontend/modules/sfSimpleForum/templates/forumListSuccess.php
r6 r8 1 1 <?php use_helper('I18N', 'sfSimpleForum') ?> 2 2 3 <?php $sf_context->getResponse()->setTitle('Mot ile forums') ?>3 <?php $sf_context->getResponse()->setTitle('Motyle forums') ?> 4 4 5 5 <div class="sfSimpleForum"> trunk/apps/frontend/templates/layout.php
r6 r8 25 25 </ul> 26 26 <div id="main_title"> 27 <?php echo link_to(image_tag('motile.gif', 'align=absbottom') . ' Mot ile', 'sfSimpleForum/forumList') ?>27 <?php echo link_to(image_tag('motile.gif', 'align=absbottom') . ' Motyle', 'sfSimpleForum/forumList') ?> 28 28 </div> 29 29 </div> … … 38 38 39 39 <div id="footer"> 40 <?php echo __('Powered by %sfSimpleForum%', array('%sfSimpleForum%' => link_to('Mot ile', 'http://trac.symfony-project.com/wiki/sfSimpleForumPlugin'))) ?>40 <?php echo __('Powered by %sfSimpleForum%', array('%sfSimpleForum%' => link_to('Motyle', 'http://trac.symfony-project.com/wiki/sfSimpleForumPlugin'))) ?> 41 41 </div> 42 42 trunk/data/sql
- Property svn:ignore set to
*
- Property svn:ignore set to
trunk/lib/model
- Property svn:ignore set to
om
map
- Property svn:ignore set to
