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 !
fixed bug with redcloth, simplified routes

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@1124 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Sun Apr 30 14:40:02 -0700 2006
commit  9cd9a8541fc24a1b50fccc53b84a949cfba532e0
tree    185f794601089831bde6c60628fc14083e4599c4
parent  69dd3d930af14ff6340c8f496114dd55279b1d97
...
14
15
16
 
17
18
19
...
14
15
16
17
18
19
20
0
@@ -14,6 +14,7 @@ Rails::Initializer.class_eval do
0
   end
0
 end
0
 
0
+require 'vendor/RedCloth-3.0.4/lib/redcloth'
0
 Rails::Initializer.run do |config|
0
   # Settings in config/environments/* take precedence those specified here
0
   
...
6
7
8
9
 
10
11
 
12
13
 
14
15
16
 
 
17
18
19
 
 
20
21
22
23
 
 
24
25
26
 
 
27
28
29
 
 
30
31
32
 
 
33
34
35
 
 
36
37
38
...
6
7
8
 
9
10
 
11
12
 
13
14
 
 
15
16
17
 
 
18
19
20
21
 
 
22
23
24
 
 
25
26
27
 
 
28
29
30
 
 
31
32
33
 
 
34
35
36
37
38
0
@@ -6,33 +6,33 @@ ActionController::Routing::Routes.draw do |map|
0
     m.js 'javascripts/*path', :dir => 'javascripts'
0
     m.images 'images/*path', :dir => 'images'
0
   end
0
-
0
+
0
   map.overview 'admin/overview.xml', :controller => 'admin/overview', :action => 'feed'
0
-
0
+
0
   map.admin 'admin', :controller => 'admin/overview', :action => 'index'
0
-
0
+
0
   map.connect ':controller/:action/:id/:version', :version => nil,
0
- :requirements => { :controller => /account|(admin\/\w+)/ }
0
-
0
+ :controller => /account|(admin\/\w+)/
0
+
0
   map.comment ':year/:month/:day/:permalink/comment', :controller => 'comments', :action => 'create',
0
- :requirements => { :year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/ }
0
-
0
+ :year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/
0
+
0
   map.with_options :controller => 'mephisto' do |m|
0
     m.article ':year/:month/:day/:permalink', :action => 'show',
0
- :requirements => { :year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/ }
0
-
0
+ :year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/
0
+
0
     m.daily ':year/:month/:day', :action => 'day',
0
- :requirements => { :year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/ }
0
-
0
+ :year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/
0
+
0
     m.paged_monthly ':year/:month/page/:page', :action => 'month',
0
- :requirements => { :year => /\d{4}/, :month => /\d{1,2}/, :page => /\d+/ }
0
-
0
+ :year => /\d{4}/, :month => /\d{1,2}/, :page => /\d+/
0
+
0
     m.monthly ':year/:month', :action => 'month',
0
- :requirements => { :year => /\d{4}/, :month => /\d{1,2}/ }
0
-
0
+ :year => /\d{4}/, :month => /\d{1,2}/
0
+
0
     m.yearly ':year', :action => 'yearly',
0
- :requirements => { :year => /\d{4}/ }
0
-
0
+ :year => /\d{4}/
0
+
0
     m.paged_search 'search/:q/page/:page', :action => 'search'
0
     m.search 'search/:q', :action => 'search', :q => nil
0
     m.section '*sections', :action => 'list'
...
7
8
9
10
 
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
 
 
 
 
 
 
 
 
 
 
 
26
27
28
29
 
30
31
32
...
34
35
36
37
38
39
40
 
 
 
 
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
91
92
...
94
95
96
97
 
98
99
100
 
 
101
102
103
 
 
104
105
106
107
 
108
109
110
111
112
 
 
 
 
113
114
115
116
117
 
118
119
120
121
122
123
124
125
126
127
128
 
 
 
 
 
129
130
 
131
132
133
134
135
136
137
138
139
140
141
142
 
 
 
 
 
 
 
 
 
143
144
145
...
7
8
9
 
10
11
12
13
 
 
 
 
 
 
 
 
 
 
 
 
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
29
30
31
32
...
34
35
36
 
 
 
 
37
38
39
40
41
42
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
...
94
95
96
 
97
98
 
 
99
100
101
 
 
102
103
104
105
106
 
107
108
 
 
 
 
109
110
111
112
113
114
115
116
 
117
118
119
120
121
122
123
 
 
 
 
 
124
125
126
127
128
129
 
130
131
132
133
 
 
 
 
 
 
 
 
 
134
135
136
137
138
139
140
141
142
143
144
145
0
@@ -7,26 +7,26 @@ ActiveRecord::Schema.define(:version => 23) do
0
   create_table "assigned_sections", :force => true do |t|
0
     t.column "article_id", :integer
0
     t.column "section_id", :integer
0
- t.column "position", :integer, :default => 1
0
+ t.column "position", :integer, :default => 1
0
   end
0
 
0
   create_table "attachments", :force => true do |t|
0
- t.column "type", :string, :limit => 15
0
- t.column "content_type", :string, :limit => 100
0
- t.column "filename", :string
0
- t.column "path", :string
0
- t.column "db_file_id", :integer
0
- t.column "parent_id", :integer
0
- t.column "size", :integer
0
- t.column "width", :integer
0
- t.column "height", :integer
0
- t.column "attachable_id", :integer
0
- t.column "attachable_type", :string, :limit => 20
0
- t.column "site_id", :integer
0
+ t.column "type", :string, :limit => 15
0
+ t.column "content_type", :string, :limit => 100
0
+ t.column "filename", :string
0
+ t.column "path", :string
0
+ t.column "db_file_id", :integer
0
+ t.column "parent_id", :integer
0
+ t.column "size", :integer
0
+ t.column "width", :integer
0
+ t.column "height", :integer
0
+ t.column "attachable_id", :integer
0
+ t.column "attachable_type", :string, :limit => 20
0
+ t.column "site_id", :integer
0
   end
0
 
0
   create_table "cached_pages", :force => true do |t|
0
- t.column "url", :string
0
+ t.column "url", :string
0
     t.column "references", :text
0
     t.column "updated_at", :datetime
0
   end
0
@@ -34,59 +34,59 @@ ActiveRecord::Schema.define(:version => 23) do
0
   create_table "content_drafts", :force => true do |t|
0
     t.column "article_id", :integer
0
     t.column "updated_at", :datetime
0
- t.column "title", :string
0
- t.column "body", :text
0
- t.column "excerpt", :text
0
- t.column "site_id", :integer
0
+ t.column "title", :string
0
+ t.column "body", :text
0
+ t.column "excerpt", :text
0
+ t.column "site_id", :integer
0
   end
0
 
0
   create_table "content_versions", :force => true do |t|
0
- t.column "content_id", :integer
0
- t.column "version", :integer
0
- t.column "article_id", :integer
0
- t.column "user_id", :integer
0
- t.column "title", :string
0
- t.column "permalink", :string
0
- t.column "excerpt", :text
0
- t.column "body", :text
0
- t.column "excerpt_html", :text
0
- t.column "body_html", :text
0
- t.column "created_at", :datetime
0
- t.column "updated_at", :datetime
0
- t.column "published_at", :datetime
0
- t.column "author", :string, :limit => 100
0
- t.column "author_url", :string
0
- t.column "author_email", :string
0
- t.column "author_ip", :string, :limit => 100
0
- t.column "comments_count", :integer, :default => 0
0
- t.column "filters", :text
0
- t.column "updater_id", :integer
0
- t.column "versioned_type", :string, :limit => 20
0
- t.column "site_id", :integer
0
+ t.column "content_id", :integer
0
+ t.column "version", :integer
0
+ t.column "article_id", :integer
0
+ t.column "user_id", :integer
0
+ t.column "title", :string
0
+ t.column "permalink", :string
0
+ t.column "excerpt", :text
0
+ t.column "body", :text
0
+ t.column "excerpt_html", :text
0
+ t.column "body_html", :text
0
+ t.column "created_at", :datetime
0
+ t.column "updated_at", :datetime
0
+ t.column "published_at", :datetime
0
+ t.column "author", :string, :limit => 100
0
+ t.column "author_url", :string
0
+ t.column "author_email", :string
0
+ t.column "author_ip", :string, :limit => 100
0
+ t.column "comments_count", :integer, :default => 0
0
+ t.column "filters", :text
0
+ t.column "updater_id", :integer
0
+ t.column "versioned_type", :string, :limit => 20
0
+ t.column "site_id", :integer
0
   end
0
 
0
   create_table "contents", :force => true do |t|
0
- t.column "article_id", :integer
0
- t.column "user_id", :integer
0
- t.column "title", :string
0
- t.column "permalink", :string
0
- t.column "excerpt", :text
0
- t.column "body", :text
0
- t.column "excerpt_html", :text
0
- t.column "body_html", :text
0
- t.column "created_at", :datetime
0
- t.column "updated_at", :datetime
0
- t.column "published_at", :datetime
0
- t.column "type", :string, :limit => 20
0
- t.column "author", :string, :limit => 100
0
- t.column "author_url", :string
0
- t.column "author_email", :string
0
- t.column "author_ip", :string, :limit => 100
0
- t.column "comments_count", :integer, :default => 0
0
- t.column "filters", :text
0
- t.column "version", :integer
0
- t.column "updater_id", :integer
0
- t.column "site_id", :integer
0
+ t.column "article_id", :integer
0
+ t.column "user_id", :integer
0
+ t.column "title", :string
0
+ t.column "permalink", :string
0
+ t.column "excerpt", :text
0
+ t.column "body", :text
0
+ t.column "excerpt_html", :text
0
+ t.column "body_html", :text
0
+ t.column "created_at", :datetime
0
+ t.column "updated_at", :datetime
0
+ t.column "published_at", :datetime
0
+ t.column "type", :string, :limit => 20
0
+ t.column "author", :string, :limit => 100
0
+ t.column "author_url", :string
0
+ t.column "author_email", :string
0
+ t.column "author_ip", :string, :limit => 100
0
+ t.column "comments_count", :integer, :default => 0
0
+ t.column "filters", :text
0
+ t.column "version", :integer
0
+ t.column "updater_id", :integer
0
+ t.column "site_id", :integer
0
   end
0
 
0
   create_table "db_files", :force => true do |t|
0
@@ -94,52 +94,52 @@ ActiveRecord::Schema.define(:version => 23) do
0
   end
0
 
0
   create_table "events", :force => true do |t|
0
- t.column "mode", :string
0
+ t.column "mode", :string
0
     t.column "article_id", :integer
0
- t.column "title", :text
0
- t.column "body", :text
0
+ t.column "title", :text
0
+ t.column "body", :text
0
     t.column "created_at", :datetime
0
- t.column "user_id", :integer
0
- t.column "author", :string, :limit => 100
0
+ t.column "user_id", :integer
0
+ t.column "author", :string, :limit => 100
0
   end
0
 
0
   create_table "sections", :force => true do |t|
0
- t.column "name", :string
0
+ t.column "name", :string
0
     t.column "show_paged_articles", :boolean, :default => false
0
- t.column "articles_per_page", :integer, :default => 15
0
- t.column "layout", :string
0
- t.column "template", :string
0
- t.column "site_id", :integer
0
+ t.column "articles_per_page", :integer, :default => 15
0
+ t.column "layout", :string
0
+ t.column "template", :string
0
+ t.column "site_id", :integer
0
   end
0
 
0
   create_table "sessions", :force => true do |t|
0
     t.column "session_id", :string
0
- t.column "data", :text
0
+ t.column "data", :text
0
     t.column "updated_at", :datetime
0
   end
0
 
0
   add_index "sessions", ["session_id"], :name => "sessions_session_id_index"
0
 
0
   create_table "sites", :force => true do |t|
0
- t.column "title", :string
0
- t.column "subtitle", :string
0
- t.column "email", :string
0
- t.column "ping_urls", :text
0
- t.column "filters", :text
0
+ t.column "title", :string
0
+ t.column "subtitle", :string
0
+ t.column "email", :string
0
+ t.column "ping_urls", :text
0
+ t.column "filters", :text
0
     t.column "articles_per_page", :integer, :default => 15
0
- t.column "host", :string
0
+ t.column "host", :string
0
   end
0
 
0
   create_table "users", :force => true do |t|
0
- t.column "login", :string, :limit => 40
0
- t.column "email", :string, :limit => 100
0
- t.column "crypted_password", :string, :limit => 40
0
- t.column "salt", :string, :limit => 40
0
- t.column "activation_code", :string, :limit => 40
0
- t.column "activated_at", :datetime
0
- t.column "created_at", :datetime
0
- t.column "updated_at", :datetime
0
- t.column "filters", :text
0
+ t.column "login", :string, :limit => 40
0
+ t.column "email", :string, :limit => 100
0
+ t.column "crypted_password", :string, :limit => 40
0
+ t.column "salt", :string, :limit => 40
0
+ t.column "activation_code", :string, :limit => 40
0
+ t.column "activated_at", :datetime
0
+ t.column "created_at", :datetime
0
+ t.column "updated_at", :datetime
0
+ t.column "filters", :text
0
   end
0
 
0
 end
...
115
116
117
118
 
119
120
121
...
115
116
117
 
118
119
120
121
0
@@ -115,7 +115,7 @@ module AuthenticatedSystem
0
       headers["WWW-Authenticate"] = "Basic realm=\"#{realm}\""
0
       render :text => error_message, :status => '401 Unauthorized'
0
     end
0
- end
0
+ end
0
 
0
   # adds ActionView helper methods
0
   def self.included(base)
...
6
7
8
9
 
10
11
12
...
6
7
8
 
9
10
11
12
0
@@ -6,7 +6,7 @@ module Mephisto
0
 
0
       def render(context)
0
         collection = context['pages']
0
- @section = context['section']
0
+ @section = context['section']
0
         @page = context['article']
0
         result = []
0
         context.stack do

Comments

    No one has commented yet.