<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>db/migrate/20090815015221_add_indexes.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rails_footnotes</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,8 +1,8 @@
 {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf460
 {\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
 {\colortbl;\red255\green255\blue255;\red255\green3\blue0;\red255\green0\blue0;\red0\green0\blue153;
-\red255\green15\blue0;\red217\green11\blue0;}
-\margl1440\margr1440\margb1800\margt1800\vieww10500\viewh8400\viewkind0
+\red255\green15\blue0;\red217\green11\blue0;\red255\green15\blue0;}
+\margl1440\margr1440\margb1800\margt1800\vieww15220\viewh15000\viewkind0
 \deftab720
 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\sa280\ql\qnatural\pardirnatural
 
@@ -194,7 +194,7 @@ Visual representation of unread topics (including previously read topics with ne
 	\'95	\cf6 \expnd0\expndtw0\kerning0
 Ability to mark forums as active (shown/hidden) (mark[oz])\cf0 \expnd0\expndtw0\kerning0
 \
-	\'95	Ability to mark forums as open (allows new posts) (mark[oz])\
+	\'95	\cf7 Ability to mark forums as open (allows new posts) (mark[oz])\cf0 \
 	\'95	\cf2 \expnd0\expndtw0\kerning0
 Customise how many sub forums are shown on the index page (mark[oz])\cf0 \expnd0\expndtw0\kerning0
 \</diff>
      <filename>TODO.rtf</filename>
    </modified>
    <modified>
      <diff>@@ -32,7 +32,7 @@ class ForumsController &lt; ApplicationController
   # Shows a forum.
   # Checks first if the current user can see it.
   def show
-    @topics = @forum.topics.sorted.paginate :page =&gt; params[:page], :per_page =&gt; 30, :order =&gt; &quot;sticky DESC&quot;
+    @topics = @forum.topics.sorted.paginate :page =&gt; params[:page], :per_page =&gt; per_page
     @forums = @forum.children
     @all_forums = Forum.all(:select =&gt; &quot;id, title&quot;, :order =&gt; &quot;title ASC&quot;) - [@forum] if current_user.can?(:move_topics, @forum)
     @moderated_topics_count = @forum.moderations.topics.for_user(current_user).count</diff>
      <filename>app/controllers/forums_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,8 +4,9 @@ class Forum &lt; ActiveRecord::Base
   acts_as_list :scope =&gt; :parent_id
   acts_as_tree :order =&gt; :position
   
-  named_scope :without_category, :conditions =&gt; { :category_id =&gt; nil }, :include =&gt; :permissions, :order =&gt; &quot;position&quot;
-  named_scope :without_parent, :conditions =&gt; { :parent_id =&gt; nil }, :include =&gt; :permissions, :order =&gt; &quot;position&quot; 
+  includes = [:children, :permissions, { :last_post =&gt; [:topic, :user] }, :last_post_forum]
+  named_scope :without_category, :conditions =&gt; { :category_id =&gt; nil }, :include =&gt; includes, :order =&gt; &quot;position&quot;
+  named_scope :without_parent, :conditions =&gt; { :parent_id =&gt; nil }, :include =&gt; includes, :order =&gt; &quot;position&quot; 
   named_scope :active, :conditions =&gt; { :active =&gt; true }
   
   </diff>
      <filename>app/models/forum.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,6 @@
 class Topic &lt; ActiveRecord::Base
+  default_scope :order =&gt; &quot;sticky desc&quot;
+  
   belongs_to :user
   belongs_to :ip  
   belongs_to :forum</diff>
      <filename>app/models/topic.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@
 #
 # It's strongly recommended to check this file into your version control system.
 
-ActiveRecord::Schema.define(:version =&gt; 20090804210918) do
+ActiveRecord::Schema.define(:version =&gt; 20090815015221) do
 
   create_table &quot;banned_ips&quot;, :force =&gt; true do |t|
     t.string   &quot;ip&quot;
@@ -18,6 +18,8 @@ ActiveRecord::Schema.define(:version =&gt; 20090804210918) do
     t.datetime &quot;ban_time&quot;
   end
 
+  add_index &quot;banned_ips&quot;, [&quot;ban_time&quot;], :name =&gt; &quot;index_banned_ips_on_ban_time&quot;
+
   create_table &quot;categories&quot;, :force =&gt; true do |t|
     t.string  &quot;name&quot;
     t.integer &quot;parent_id&quot;
@@ -26,6 +28,8 @@ ActiveRecord::Schema.define(:version =&gt; 20090804210918) do
     t.string  &quot;description&quot;
   end
 
+  add_index &quot;categories&quot;, [&quot;parent_id&quot;], :name =&gt; &quot;index_categories_on_parent_id&quot;
+
   create_table &quot;configurations&quot;, :force =&gt; true do |t|
     t.string &quot;key&quot;
     t.string &quot;value&quot;
@@ -65,6 +69,7 @@ ActiveRecord::Schema.define(:version =&gt; 20090804210918) do
 
   add_index &quot;forums&quot;, [&quot;category_id&quot;], :name =&gt; &quot;index_forums_on_category_id&quot;
   add_index &quot;forums&quot;, [&quot;open&quot;], :name =&gt; &quot;index_forums_on_open&quot;
+  add_index &quot;forums&quot;, [&quot;parent_id&quot;], :name =&gt; &quot;index_forums_on_parent_id&quot;
   add_index &quot;forums&quot;, [&quot;posts_count&quot;], :name =&gt; &quot;index_forums_on_posts_count&quot;
   add_index &quot;forums&quot;, [&quot;topics_count&quot;], :name =&gt; &quot;index_forums_on_topics_count&quot;
 
@@ -169,6 +174,10 @@ ActiveRecord::Schema.define(:version =&gt; 20090804210918) do
     t.boolean &quot;can_post_in_closed_forums&quot;,        :default =&gt; false
   end
 
+  add_index &quot;permissions&quot;, [&quot;category_id&quot;], :name =&gt; &quot;index_permissions_on_category_id&quot;
+  add_index &quot;permissions&quot;, [&quot;forum_id&quot;], :name =&gt; &quot;index_permissions_on_forum_id&quot;
+  add_index &quot;permissions&quot;, [&quot;group_id&quot;], :name =&gt; &quot;index_permissions_on_group_id&quot;
+
   create_table &quot;posts&quot;, :force =&gt; true do |t|
     t.text     &quot;text&quot;
     t.datetime &quot;created_at&quot;
@@ -281,5 +290,7 @@ ActiveRecord::Schema.define(:version =&gt; 20090804210918) do
   end
 
   add_index &quot;users&quot;, [&quot;id&quot;, &quot;user_level_id&quot;], :name =&gt; &quot;index_users_on_id_and_user_level_id&quot;
+  add_index &quot;users&quot;, [&quot;login&quot;], :name =&gt; &quot;index_users_on_login&quot;
+  add_index &quot;users&quot;, [&quot;login_time&quot;], :name =&gt; &quot;index_users_on_login_time&quot;
 
 end</diff>
      <filename>db/schema.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0e0ad9632718d80b16ac3b38bee723347a8f3b3a</id>
    </parent>
  </parents>
  <author>
    <name>Ryan Bigg</name>
    <email>radarlistener@gmail.com</email>
  </author>
  <url>http://github.com/radar/rboard/commit/2694c8d4f83416eefde4dcd3439e2aa6e6f7ae42</url>
  <id>2694c8d4f83416eefde4dcd3439e2aa6e6f7ae42</id>
  <committed-date>2009-08-14T19:08:28-07:00</committed-date>
  <authored-date>2009-08-14T19:08:28-07:00</authored-date>
  <message>Marked off ability to closed forums as complete and added performance enhancements.</message>
  <tree>11e1986da0e09cf68270a333c2ffdf58f15b8a5f</tree>
  <committer>
    <name>Ryan Bigg</name>
    <email>radarlistener@gmail.com</email>
  </committer>
</commit>
