public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
small tweaks and extra db queries fixed

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@2135 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Sun Sep 10 01:45:04 -0700 2006
commit  c99011e25addbe95727e18f088e54ec293e02fb8
tree    5748a9c85d7b9934e810df3dfd880f83b81ad79d
parent  8a4a68e46fd19c2cbc86fa76c6e74eee01e76ec8
...
75
76
77
78
79
 
 
80
81
82
...
75
76
77
 
 
78
79
80
81
82
0
@@ -75,8 +75,8 @@ class MephistoController < ApplicationController
0
     end
0
 
0
     def dispatch_archives
0
- @articles = site.articles.find_all_in_month(@dispatch_path.shift, @dispatch_path.shift, :include => :user)
0
- render_liquid_template_for(:archive, 'articles' => @articles, 'archive_date' => @articles.first.published_at)
0
+ @articles = @section.articles.find_all_in_month(@dispatch_path.shift, @dispatch_path.shift, :include => :user)
0
+ render_liquid_template_for(:archive, 'articles' => @articles, 'archive_date' => (@articles.first.published_at rescue nil))
0
     end
0
 
0
     def dispatch_search
...
16
17
18
19
20
 
 
21
22
23
...
16
17
18
 
 
19
20
21
22
23
0
@@ -16,8 +16,8 @@ module Mephisto
0
           'permalink' => @source.permalink,
0
           'body' => @source.body_html,
0
           'excerpt' => @source.excerpt_html,
0
- 'published_at' => (@source.site.timezone.utc_to_local(@source.published_at) rescue nil),
0
- 'updated_at' => (@source.site.timezone.utc_to_local(@source.updated_at) rescue nil),
0
+ 'published_at' => (@site.timezone.utc_to_local(@source.published_at) rescue nil),
0
+ 'updated_at' => (@site.timezone.utc_to_local(@source.updated_at) rescue nil),
0
           'comments_count' => @source.comments_count,
0
           'author' => @source.user.to_liquid,
0
           'accept_comments' => @source.accept_comments?,
...
10
11
12
13
 
 
14
15
16
...
10
11
12
 
13
14
15
16
17
0
@@ -10,7 +10,8 @@ module Mephisto
0
       def initialize(source, current = false)
0
         @source = source
0
         @current = current
0
- @section_liquid = [:id, :name, :path, :articles_count].inject({}) { |h, k| h.merge k.to_s => @source.send(k) }
0
+ @section_liquid = [:id, :name, :path].inject({}) { |h, k| h.update k.to_s => @source.send(k) }
0
+ @section_liquid[:articles_count] = @source.send(:read_attribute, :articles_count)
0
       end
0
 
0
       def before_method(method)

Comments

    No one has commented yet.