Commit graph

87 commits

Author SHA1 Message Date
Jacques Distler 4be1a58a24 Update RedCloth to 4.x
Use Bundler to manage RedCloth
gem. 4.x should be much faster
and less buggy. Unfortunately,
it doesn't support mixed
Textile/Markdown syntax. So
we keep an (appropriately
renamed) copy of 3.x around,
for the users of the "Mixed"
text filter.
2010-11-03 23:32:55 -05:00
Jacques Distler 46da49485f More bugs in tex_list
Fix some more bugs in the new
tex_list action.
Make the drag-reorder *not*
result in a (superfluous)
AJAX request.
2010-10-11 10:57:26 -05:00
Jacques Distler 8a989b1a7b Make reordering work in Ruby 1.8.x
I was fooled: Ruby 1.9 has ordered
hashes; 1.8 doesn't. So what I did
in Revision 689 works in Ruby 1.9,
but fails in 1.8.

Now we parse the POST params ourselves.
2010-10-10 13:24:05 -05:00
Jacques Distler 9c11c384d4 Some more tweaks to the tex_list feature 2010-10-09 15:41:25 -05:00
Jacques Distler aee4f8b3a9 Export Multiple Pages to TeX
Per a suggestion of Marco Gualtieri.
2010-10-09 02:57:37 -05:00
Jacques Distler 90ad482ed2 Rename stringsupport.rb => instiki_stringsupport.rb 2010-06-09 11:47:39 -05:00
Jacques Distler dead710e69 Revert #633
MathPlayer doesn't like the HTML5 DOCTYPE.
Revert to sending XHTML+MathML+SVG DOCTYPE.
2010-06-04 12:10:26 -05:00
Jacques Distler 1da034e2be Fix some to-be-deprecated stuff 2010-05-26 14:16:34 -05:00
Jacques Distler d2c4623bf7 HTML5 Doctype 2010-05-22 16:11:27 -05:00
Jacques Distler bafa7743f1 Allow Periods in Page Names
Thanks to Jeff Zellman.
2010-01-26 00:18:30 -06:00
Jacques Distler d3db9d1229 Export Zipballs Include BlahTeX PNGs
It's as simple as recursing through the
files/ directory, when adding to the zipball.
2010-01-24 22:54:35 -06:00
Jacques Distler b9db67073d Ruby 1.9 fix
Make the previous fixes work under Ruby 1.9
as well.
2010-01-23 18:30:17 -06:00
Jacques Distler 09e885d299 Small Cleanup
Small cleanup to the zip export.
2010-01-23 18:24:14 -06:00
Jacques Distler 8ed5a88db0 Fix Zip Export and Print View
Fix http://bug.to/issues/show/335
and
http://bug.to/issues/show/334

We now bundle the uploaded files directory
(and the public/ directory for the (X)HTML
export) in the Zipball when exporting a Web.

Also, correct the Print View to produce proper links
uploaded files.
2010-01-23 18:01:02 -06:00
Jacques Distler d67ce28855 Prevent Renaming to a Null Page Name
Fix http://rubyforge.org/tracker/index.php?func=detail&aid=27649&group_id=186&atid=783
2010-01-07 08:12:22 -06:00
Jacques Distler 0c2bc65e7a All I want for Christmas ...
... is to settle these encoding issues 
once and for all.

Let's override the accessor methods, which 
seems to offer a simpler solution.

Now with tests (for whatever that helps)...
2010-01-06 08:15:34 -06:00
Jacques Distler 6cf1463525 Revert Revision 520; This is more thorough
This ensures that @page.name has the right (utf8)
encoding.
2010-01-04 18:43:27 -06:00
Jacques Distler fe877a10b4 Make html_ext Available as a Helper
... and protected.
2009-12-16 00:59:33 -06:00
Jacques Distler 2c5e5a0015 Refactoring
Move the truncate() method into ApplicationHelper.
Move another method around, for no particularly
good reason. Controllers really shouldn't have
public methods that don't correspond to actions.
2009-12-14 02:01:50 -06:00
Jacques Distler dc3d202665 Cache Source View
Also, fix a cache-sweeping bug reported,
long ago, by Toby Bartels.
2009-12-13 21:09:12 -06:00
Jacques Distler 1613973929 Array#collect is faster than Array#inject
Also add some more tests.
2009-12-13 20:00:18 -06:00
Jacques Distler 282515d907 Source View
Add a Source view. [Based on a suggestion by Andrew Stacey]
Fix a well-formedness bug in the list action, due to
boneheaded truncation algorithm. [Reported by Roby Bartels]
2009-12-13 19:25:14 -06:00
Jacques Distler 2c5c6dc78a S5 Fix
Omit a (seemingly superfluous)
javascript hack which causes
Gecko-based browsers to request
   /my_wiki/s5/null
when they load an s5 slideshow.

Also a stylistic cleanup in
the wiki_controller.
2009-12-07 15:27:40 -06:00
Jacques Distler f7044ecbb4 Ruby 1.9.1 Fixes
Some more fixes to deal with Ruby 1.9.1.
2009-12-02 12:46:15 -06:00
Jacques Distler 34b63a8375 Fix a Ruby 1.9 Character Encoding Bug
Wow, this stuff is complicated!
Some things really want to be UTF-8;
others really want to be byte strings.
2009-12-01 12:03:15 -06:00
Jacques Distler 79c8572053 Use Rails.root
A little cleanup.
2009-11-22 01:32:58 -06:00
Jacques Distler 5df1504255 Tests for Revision 456
Functional tests for Revision 456.
Also, fix a buglet in handling rescues
for new pages.
2009-10-19 22:57:11 -05:00
Jacques Distler 20c99df440 Work around Rails flash bug
When redirected to another page, flash 
messages will not display if the query
string is longer than 10192 bytes. In
Instiki, certain rescue operations 
involve redirection, with the updated
content of the page passed as a query
parameter. Fall back to using the stored
content (ie, don't pass a query parameter)
if the content is too long.
2009-10-19 18:19:31 -05:00
Jacques Distler affc47fc22 Fix TeX Rendering Bug
Make sure we

  require 'maruku/ext/math'

before calling the Maruku#to_latex method.

Also, update test for itex2MML 1.3.11 .
2009-09-13 11:23:57 -05:00
Jacques Distler c79fef9c01 Clean, rather than Complain
Previously, if the user tried to submit content which was
malformed utf-8, Instiki would complain loudly to him.

A slightly more user-friendly approach was suggested by
the latest Rails 2.3.4, and a conversation with Sam Ruby
(who suggested some improvements).

Now, instead of complaining, we remove the offending bytes,
leaving a well-formed utf-8 string, which we pretend is what
the user meant to submit.
2009-09-07 16:02:36 -05:00
Jacques Distler 34c4306867 More ActiveRecord Association .length -> .size Optimizations 2009-09-04 00:09:39 -05:00
Jacques Distler 342298ed0e Wikilinks to Published Webs
Should be to the published action. This
didn't work right for inter-web links.
(Reported by Mike Shulman)

Also, change some .length's to .size's
(for Andrew Stacey)
2009-09-03 23:09:10 -05:00
Jacques Distler 329fafafce Fix Two bugs from Toby Bartels
1. Ensure that "rollback" respects locked pages.
2. Expire revisions of an edited page. Use a before_save
   hook to deal with the situation where a page's name
   has been changed.
2009-08-04 00:02:04 -05:00
Jacques Distler 0e0f666fb4 Rollbacks and Relative URLs
Ensure "rollback" locks page for editing. (reported by Toby Bartels)
Generate relative URLs, when possible. (Patch by Dennis Knauf)
2009-07-27 22:49:12 -05:00
Jacques Distler 7448b7981b Minor fixes
1) WEBrick should respond to TERM signals
(needed by MacOSX and, perhaps, others).
2) HTTP redirects for redirected pages should be 301's.
3) Add a flash message for redirection to "new" page
when the target of "show" action is not found.
2009-06-14 22:55:41 -05:00
Jacques Distler e341d62809 Close another hole
I believe this addresses Jason's issue.
2009-06-05 22:26:25 -05:00
Jacques Distler a2b1c7e66c HTTP Redirects for Redirected Pages
If a page isn't found, but there is a page that redirects for it,
don't show a 404!
2009-06-05 09:02:05 -05:00
Jacques Distler d7832ba262 Wiki Redirects and Page Renaming
Added the ability to rename existing pages.
[[!redirects Some Page Name]] redirects Wikilinks [[Some Page Name]] to
  the current page (assuming "Some Page Name" does not exist).
  Real pages trump redirects (though this may change, depending on 
  user feedback).
2009-06-02 22:17:15 -05:00
Jacques Distler 69bfc1028b Cache Revisions
Fix config/routes.rb to make revisions cacheable.
Cache revisions.
Modify the history page so that it links to the current page (and diff).
2009-03-31 15:54:41 -05:00
Jacques Distler 73a7ceef03 Cache History Pages
Implement caching for the "history" pages
introduced in Revision 377.
2009-03-31 08:52:46 -05:00
Jacques Distler d5a65e6ac8 History Pages
From Jason Blevins:
  Create a "History" page for each wiki page.
  Link to it, and to the "Diff" page from "Recently Revised".
Also, correct a bug in listing/deleting links to uploaded
video and audio files.
2009-03-30 23:50:06 -05:00
Jacques Distler 0b2a6935a2 Export XHTML Pages
When a Web uses one of the Markdown Text Filters, and you export
all the pages as a zip file, you'd like the MathML and SVG to
render when the pages are viewed locally. This means saving them
with a .xhtml extension. Users of non-XHTML-capable browsers or
Textile users should still get .html files.
2009-01-23 11:02:16 -06:00
Jacques Distler b9f5c32755 Cache file_list Action
Also, slightly smarter cache expiry, upon uploading/deleting a file.
2009-01-10 22:33:30 -06:00
Jacques Distler b74d298196 Manage Uploaded Files
Allow alternate sort-orders (by filename, by date).
Restrict to files in the given Web.
2008-12-31 11:30:33 -06:00
Jacques Distler 1d3f7007c6 Manage Uploaded Files
A less abstruse interface for deleting files (this time, many at-a-shot).
Available from the Edit Web page.
2008-12-31 03:54:23 -06:00
Jacques Distler 23e28f3702 Exports are expensive
Dnsbl filter them as well.
2008-12-17 00:26:52 -06:00
Jacques Distler a503e2b8ac Gentler
Be a little gentler in recovering from Instiki::ValidationErrors, when saving a page.
Previously, we threw away all the user's changes upon the redirect. Now we attempt
to salvage what he wrote.
2008-12-17 00:07:21 -06:00
Jacques Distler 5d2b0da4d5 Faster
Update dnsbl_check plugin to latest version.
Update Maruku to latest version.
In the wiki_controller, only apply the dnsbl_check before_filter 
  to the :edit, :new, and :save actions, instead of all actions.
  This makes mundane "show" requests faster, but does not 
  compromise spam-fighting ability.
2008-12-16 00:40:30 -06:00
Jacques Distler 6e2d11e00d Don't Cache Pages With Flash Messages on Them
This was a long-standing annoyance. Fortunately, Rails 2.1 and later offers
a way to avoid it.
2008-12-09 02:20:59 -06:00
Jacques Distler daa12e575d Mo Better Exception Handling
A little more cleanup of Instiki's exception handling.
Add some tests.
2008-11-06 10:38:25 -06:00