typo 5.4.2 → 5.4.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,23 +1,15 @@
1
- 3 weeks after releasing Typo 5.4.1, and only 1 month after releasing Typo 5.4, we're happy to release Typo 5.4.2, an important bugfix release. Don't expect many feature here, even though we thought about some of them, it's really a bugfix, and nothing else.
1
+ Typo 5.4.3 fixes some nasty bugs that went through Typo 5.4.2 despite running tests before releasing. If you've been using Typo 5.4.2, you really should upgrade. And if you're running any prior version, you should upgrade too.
2
2
 
3
- ** Features
3
+ Now sorting articles by publication date instead of creation date in the admin.
4
4
 
5
- We've split the attachments between images and non images assets. Provided you're using the simple editor, you can now use a fancy images carousel and insert your images in your text within a single click. This comes with a nice set of thumbnails.
5
+ In the admin, comment forms fields are now filled with the user info. Url and
6
+ email fields have been switched too to fit front end comment forms.
6
7
 
7
- Finally, the long awaited "forgot my password" link is here. It will send you a new password whenever you lose yours. Cool isn't it?
8
-
9
- We've also done some optimization in the way Typo sends assets and manages cache. CSS and Javascript are now sent into 1 file, making them faster to load. RSS generation has also been fastened up.
10
-
11
- ** Bugs
12
-
13
- A bug screwing up the editor when switching from simple to visual, causing users to lose their content when switching. Fixing that is a good reason to release today in itself.
14
-
15
- A bug preventing your registration email to go when creating your account, making you lose your password unless you change it manually before logging out.
16
-
17
- Fixed a security issue making the user passwords to be logged in clear in the application logs.
18
-
19
- Fixed a bug causing CKEditor to crash under MS Windows due to the lack of symlinks on windows.
8
+ Extending the editor a little bit, easier to use now.
20
9
 
10
+ Ticket 143: Publish at post setting does not work
21
11
 
12
+ Fixing a critial bug that made the page editor crash at loading.
22
13
 
14
+ Fixing a bug in RDOC that raised an error when installing.
23
15
 
data/README CHANGED
@@ -13,7 +13,7 @@ Requirements
13
13
  Currently you need all of those things to get typo to run:
14
14
 
15
15
  * Ruby 1.8.6 or Ruby Enterprise Edition.
16
- * Rails 2.2, Typo 5.3 DOES NOT support Rails 2.1.
16
+ * Rails 2.3.5, Typo 5.4.3 DOES NOT support any older Rails version.
17
17
  * A database. Typo supports MySQL, PostgreSQL, and SQLite.
18
18
  * Ruby drivers for your database.
19
19
  * For best performance, you should have a web server running either
@@ -24,7 +24,7 @@ class ArticlesController < ContentController
24
24
  @articles = Article.paginate :page => params[:page], :conditions => { :published_at => time_delta(*params.values_at(:year, :month, :day)), :published => true }, :order => 'published_at DESC', :per_page => @limit
25
25
  else
26
26
  @noindex = 1 unless params[:page].blank?
27
- @articles = Article.paginate :page => params[:page], :conditions => { :published => true }, :order => 'published_at DESC', :per_page => @limit
27
+ @articles = Article.paginate :page => params[:page], :conditions => ['published = ? AND published_at < ?', true, Time.now], :order => 'published_at DESC', :per_page => @limit
28
28
  end
29
29
 
30
30
  @page_title = index_title
@@ -100,7 +100,7 @@ class Article < Content
100
100
  list_function << 'category(search_hash[:category])'
101
101
  end
102
102
 
103
- paginate_hash[:order] = 'created_at DESC'
103
+ paginate_hash[:order] = 'published_at DESC'
104
104
  list_function << "paginate(paginate_hash)"
105
105
  eval(list_function.join('.'))
106
106
  end
@@ -408,7 +408,7 @@ class Article < Content
408
408
 
409
409
  # The web interface no longer distinguishes between separate "body" and
410
410
  # "extended" fields, and instead edits everything in a single edit field,
411
- # separating the extended content using "<!--more-->".
411
+ # separating the extended content using "\<!--more-->".
412
412
  def body_and_extended
413
413
  if extended.nil? || extended.empty?
414
414
  body
@@ -417,7 +417,7 @@ class Article < Content
417
417
  end
418
418
  end
419
419
 
420
- # Split apart value around a "<!--more-->" comment and assign it to our
420
+ # Split apart value around a "\<!--more-->" comment and assign it to our
421
421
  # #body and #extended fields.
422
422
  def body_and_extended= value
423
423
  parts = value.split(/\n?<!--more-->\n?/, 2)
@@ -55,10 +55,10 @@
55
55
  <script type="text/javascript">edToolbar('article_body_and_extended');</script>
56
56
  </div>
57
57
  <div id ='visual_editor' <%= "style='display: none;'" if current_user.editor == 'simple'%> >
58
- <%= ckeditor_textarea('article', 'body_and_extended', {:height => '300px', :class => 'large', :height => '300px', :rows => '15'}) if current_user.editor == 'visual' %>
58
+ <%= ckeditor_textarea('article', 'body_and_extended', {:class => 'large', :height => '300px', :rows => '20'}) if current_user.editor == 'visual' %>
59
59
  </div>
60
60
  <div id='simple_editor' <%= "style='display: none;'" if current_user.editor == 'visual'%> >
61
- <%= text_area('article', 'body_and_extended', {:height => '300px', :class => 'large', :height => '300px', :rows => '15'}) %>
61
+ <%= text_area('article', 'body_and_extended', {:class => 'large', :height => '300px', :rows => '20'}) %>
62
62
  <%= render_macros(@macros) if current_user.editor == 'simple' %>
63
63
  </div>
64
64
  </div>
@@ -6,7 +6,7 @@
6
6
  $('text_filter').value = $('user_textfilter').value;
7
7
  content = CKEDITOR.instances.article__body_and_extended_editor.getData();
8
8
  </script>
9
- <%= text_area('article', 'body_and_extended', {:class => 'large', :height => '300px', :rows => '15'}) %>
9
+ <%= text_area('article', 'body_and_extended', {:class => 'large', :height => '300px', :rows => '20'}) %>
10
10
  <script type="text/javascript">
11
11
  $('visual_editor').innerHTML = "";
12
12
  $('visual_editor').style.display = 'none';
@@ -12,7 +12,7 @@
12
12
  delete(CKEDITOR.instances.article__body_and_extended_editor);
13
13
  }
14
14
  </script>
15
- <%= ckeditor_textarea('article', 'body_and_extended', {:height => '300', :class => 'medium'}) %>
15
+ <%= ckeditor_textarea('article', 'body_and_extended', {:height => '300', :class => 'large'}) %>
16
16
  <script type="text/javascript">
17
17
  content = CKEDITOR.instances.article__body_and_extended_editor.setData(html);
18
18
  </script>
@@ -8,19 +8,19 @@
8
8
  <div>
9
9
  <label for="comment_author" class='float'><%= _("Author")%></label>
10
10
  <p class='input_text_title'>
11
- <%= text_field 'comment', 'author', :class => 'small medium' %>
11
+ <%= text_field 'comment', 'author', :class => 'small medium', :value => current_user.display_name %>
12
12
  </p>
13
13
  </div>
14
14
  <div>
15
- <label for="comment_url" class='float'><%= _("Url") %></label>
15
+ <label for="comment_email" class='float'><%= _("Email")%></label>
16
16
  <p class='input_text_title'>
17
- <%= text_field 'comment', 'url', :class => 'small medium' %>
17
+ <%= text_field 'comment', 'email', :class => 'small medium', :value => current_user.email %>
18
18
  </p>
19
19
  </div>
20
20
  <div>
21
- <label for="comment_email" class='float'><%= _("Email")%></label>
21
+ <label for="comment_url" class='float'><%= _("Url") %></label>
22
22
  <p class='input_text_title'>
23
- <%= text_field 'comment', 'email', :class => 'small medium' %>
23
+ <%= text_field 'comment', 'url', :class => 'small medium', :value => current_user.url %>
24
24
  </p>
25
25
  </div>
26
26
  <div>
@@ -1,3 +1,5 @@
1
+ <input type="hidden" name="current_editor" id="current_editor" value="<%= current_user.editor %>" />
2
+ <input type="hidden" name="user_textfilter" id="user_textfilter" value="<%= current_user.text_filter.name %>" />
1
3
  <%= error_messages_for 'page' %>
2
4
 
3
5
  <div id='editor-right'>
@@ -33,10 +35,12 @@
33
35
  <div id='quicktags' style='<%= "display: none;" if current_user.editor == 'visual' %>'>
34
36
  <script type="text/javascript">edToolbar('page_body');</script>
35
37
  </div>
36
- <div id='<%= alternate_editor %>_editor' style='display: none;'></div>
37
- <div id='<%= "#{current_user.editor}_editor" %>'>
38
- <%= t_textarea 'page', 'body', {:height => '300', :class => 'large'} %>
39
- <%= render_macros(@macros) if current_user.editor == 'visual' %>
38
+ <div id ='visual_editor' <%= "style='display: none;'" if current_user.editor == 'simple'%> >
39
+ <%= ckeditor_textarea('page', 'body', {:class => 'large', :height => '300px', :rows => '20'}) if current_user.editor == 'visual' %>
40
+ </div>
41
+ <div id='simple_editor' <%= "style='display: none;'" if current_user.editor == 'visual'%> >
42
+ <%= text_area('page', 'body', {:class => 'large', :height => '300px', :rows => '20'}) %>
43
+ <%= render_macros(@macros) if current_user.editor == 'simple' %>
40
44
  </div>
41
45
  </div>
42
46
  <div class='editor_bottom'>
@@ -1,15 +1,16 @@
1
1
  <script type="text/javascript">
2
2
  $('quicktags').style.display = 'block';
3
+ $('simple_editor').style.display = 'block';
3
4
  $('s').className = 'active';
4
5
  $('f').className = 'inactive';
5
- $('simple_editor').style.display = 'block';
6
- html = FCKeditorAPI.GetInstance('page__body_editor').GetHTML();
6
+ $('text_filter').value = $('user_textfilter').value;
7
+ content = CKEDITOR.instances.page__body_editor.getData();
7
8
  </script>
8
- <%= text_area('page', 'body', {:class => 'medium', :height => '300'}) %>
9
+
10
+ <%= text_area('page', 'body', {:class => 'large', :height => '300px', :rows => '20'}) %>
9
11
 
10
12
  <script type="text/javascript">
11
- $('page_body').innerHTML = html;
12
13
  $('visual_editor').innerHTML = "";
13
14
  $('visual_editor').style.display = 'none';
14
- html = null;
15
+ $('page_body').innerHTML = content;
15
16
  </script>
@@ -4,6 +4,7 @@
4
4
  $('visual_editor').style.display = 'block';
5
5
  $('s').className = 'inactive';
6
6
  $('f').className = 'active';
7
+ $('text_filter').value = 'none';
7
8
  html = $('page_body').value;
8
9
 
9
10
  if (CKEDITOR.instances.page__body_editor &&
@@ -12,7 +13,7 @@
12
13
  }
13
14
 
14
15
  </script>
15
- <%= ckeditor_textarea('page', 'body', {:height => '300', :class => 'medium'}) %>
16
+ <%= ckeditor_textarea('page', 'body', {:height => '300', :class => 'large'}) %>
16
17
  <script type="text/javascript">
17
18
  content = CKEDITOR.instances.page__body_editor.setData(html);
18
19
  </script>
@@ -6,4 +6,4 @@
6
6
  </div>
7
7
  <% end -%>
8
8
 
9
- <p id="pagination"><%= will_paginate @articles %></p>
9
+ <%= will_paginate @articles %>
@@ -5,4 +5,4 @@
5
5
  </div>
6
6
  <% end -%>
7
7
 
8
- <p id="pagination"><%= will_paginate @articles %></p>
8
+ <%= will_paginate @articles %>
data/db/typo_dev ADDED
Binary file
@@ -1,7 +1,7 @@
1
1
  require 'rake/gempackagetask'
2
2
  require 'rake/contrib/rubyforgepublisher'
3
3
 
4
- PKG_VERSION = "5.4.2"
4
+ PKG_VERSION = "5.4.3"
5
5
  PKG_NAME = "typo"
6
6
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
7
7
  RUBY_FORGE_PROJECT = 'typo'
data/lib/typo_version.rb CHANGED
@@ -1 +1 @@
1
- TYPO_VERSION = '5.4.2'
1
+ TYPO_VERSION = '5.4.3'
@@ -0,0 +1,13 @@
1
+ require File.dirname(__FILE__) + '/../../spec_helper'
2
+
3
+ describe Admin::DashboardController do
4
+ before do
5
+ request.session = { :user => users(:tobi).id }
6
+ end
7
+
8
+ it "test_index" do
9
+ get :index
10
+ response.should render_template('index')
11
+ end
12
+
13
+ end
@@ -33,6 +33,10 @@ with_each_theme do |theme, view_path|
33
33
  response.should have_tag("p", "body")
34
34
  response.should_not have_tag("p>p", "body")
35
35
  end
36
+
37
+ it "should not have div nested inside p" do
38
+ response.should_not have_tag("p>div")
39
+ end
36
40
  end
37
41
 
38
42
  # *notice
@@ -1,3 +1,3 @@
1
1
  <%= render :partial => 'articles/article', :collection => @articles %>
2
2
 
3
- <p class="pagination"><%= will_paginate @articles %></p>
3
+ <%= will_paginate @articles %>
@@ -1,3 +1,3 @@
1
1
  <%= render :partial => 'articles/article', :collection => @articles %>
2
2
 
3
- <p class="pagination"><%= will_paginate @articles %></p>
3
+ <%= will_paginate @articles %>
@@ -1,3 +1,3 @@
1
1
  <%= render :partial => 'articles/article', :collection => @articles %>
2
2
 
3
- <p class="pagination"><%= will_paginate @articles %></p>
3
+ <%= will_paginate @articles %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typo
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.2
4
+ version: 5.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Fr\xC3\xA9d\xC3\xA9ric de Villamil"
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-23 00:00:00 +01:00
12
+ date: 2010-02-14 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -497,6 +497,7 @@ files:
497
497
  - db/schema.sqlserver.sql
498
498
  - db/schema_version
499
499
  - db/scripts/fix_permalinks.rb
500
+ - db/typo_dev
500
501
  - db/updates/update.168.to.200.mysql.sql
501
502
  - db/updates/update.168.to.200.psql.sql
502
503
  - doc/Installer.txt
@@ -905,6 +906,7 @@ files:
905
906
  - spec/controllers/admin/cache_controller_spec.rb
906
907
  - spec/controllers/admin/categories_controller_spec.rb
907
908
  - spec/controllers/admin/content_controller_spec.rb
909
+ - spec/controllers/admin/dashboard_controller_spec.rb
908
910
  - spec/controllers/admin/feedback_controller_spec.rb
909
911
  - spec/controllers/admin/pages_controller_spec.rb
910
912
  - spec/controllers/admin/profiles_controller_spec.rb