| Commit message (Expand) | Author | Age |
* | protect $@ whenever a block using $@ is non-trivial•••As noted in the Try::Tiny man page, eval/$@ can be quite awkward in
corner cases, because $@ has the same properties and problems as C's
errno. While writing a regression test for definetemplate
in which it couldn't find an appropriate template, I received
<span class="error">Error: failed to process template
<span class="createlink">deftmpl</span> </span>
instead of the intended
<span class="error">Error: failed to process template
<span class="createlink">deftmpl</span> template deftmpl not
found</span>
which turned out to be because the "catch"-analogous block called
gettext before it used $@, and gettext can call define_gettext,
which uses eval.
This commit alters all current "catch"-like blocks that use $@, except
those that just do trivial things with $@ (string interpolation, string
concatenation) and call a function (die, error, print, etc.)
| Simon McVittie | 2014-02-21 |
* | Fix committing attachments when using svn. | Joey Hess | 2013-07-10 |
* | prune: do not prune beyond an optional base directory, and add a test•••Previously, prune("wiki/srcdir/sandbox/test.mdwn") could delete srcdir
or even wiki, if they happened to be empty. This is rarely what you
want: there's usually some base directory (destdir, srcdir, transientdir
or another subdirectory of wikistatedir) beyond which you do not want to
delete.
| Simon McVittie | 2012-04-07 |
* | avoid unnecessary uses of UNIVERSAL•••Foo->Bar->can("method") works just as well, even if Foo::Bar is not
loaded. Using UNIVERSAL::can is deprecated.
But, I was unable to easily eliminate conditional.pm's use of UNIVERSAL::can
| Joey Hess | 2012-03-18 |
* | attachment: Fix utf-8 display bug. | Joey Hess | 2012-01-15 |
* | attachment: Bugfix to create directory when moving attachment out of holding... | Joey Hess | 2011-07-11 |
* | attachment: Bugfix to move upload attachments out of holding area when saving. | Joey Hess | 2011-07-11 |
* | Bugfix for trying to attach files to a subpage of the index page. | Joey Hess | 2011-07-07 |
* | improve detection of ajax request•••Firefox sent an accept header for application/xml, not application/json,
and also weakened the priority to 0.8. So that stuff is not to be trusted;
instead I found a better way: When an ajax upload is *not* being made,
the Upload Attachment button will be used, so enable ajax if an upload
is being made without that button having been used.
Also, testing with firefox revealed it refused to process a response that
was type application/json, and checking the demo page for the jquery file
upload plugin, it actually returns the json with type text/html. Ugh.
Followed suite.
Now tested with: chromium, chromium (w/o js), firefox, firefox (w/o js),
and w3m.
| Joey Hess | 2011-06-17 |
* | show ikiwiki error when attachment is rejected | Joey Hess | 2011-06-16 |
* | let thru HTTP_ACCEPT•••Needed for attachment to return json when requested.
I think some browsers send Accept: * , so I made sure to check that json
was explicitly listed as to be accepted, as well as having a high
priority.
| Joey Hess | 2011-06-15 |
* | bugfixes•••Make sure staged attachments sort as earlier, even if they're not really.
| Joey Hess | 2011-06-15 |
* | typo | Joey Hess | 2011-06-15 |
* | use jquery underlay | Joey Hess | 2011-06-15 |
* | load attachment javascript into template the clean way | Joey Hess | 2011-06-15 |
* | WIP | Joey Hess | 2011-06-15 |
* | WIP | Joey Hess | 2011-06-15 |
* | remove trailing slash from attachment_holding_dir•••If it's passed a filename, it should return the filename inside the holding
dir. If passed a page, the directory sans slash. All code adds the slash.
| Joey Hess | 2011-06-14 |
* | more generic interface | Joey Hess | 2011-06-14 |
* | bugfixes | Joey Hess | 2011-06-14 |
* | bugfix for attachments of non-index pages | Joey Hess | 2011-06-14 |
* | fix removal of helf attachments•••Left out confirmation of removal for held attachments because
a) they're not in the wiki yet, so confirmation is a bit unnecessary
b) it would be hard
c) eases later integration of jquery file upload interface
Also changed where attachments of index are held (to match where they're
stored in the srcdir).
Note that the attachment formbuilder hook was made to run last, so that
the list of attachments is not generated before removal, in the fast path
w/o confirm.
| Joey Hess | 2011-06-14 |
* | fixed previewing of attachments from holding area | Joey Hess | 2011-06-14 |
* | fixed saving attachments on page save•••Also saved on preview, but previewing is a bit broken, does not see the
newly saved attachment yet.
| Joey Hess | 2011-06-14 |
* | attachment list includes new attachments in holding area•••Note that it's possible for an attachment in the holding area to be older
than an attachemnt in the wiki with the same name. I intentionally
show the one in the holding area in this (unlikely) case, since saving the
page will overwrite the wiki's file with the held attachment. It does not
seem worth the bother of doing something more intelligent, since in this
case two people have basically conflicted with one-another.. and both
attachment contents will be stored in revision control in case it needs to
be sorted out.
I had to remove the hyperlink for attachments in the holding area, since
they're not yet live on the web. This could be annoying/confusing. Added
a moseover notice instead.
| Joey Hess | 2011-06-14 |
* | untaint and linkpage the page name used in attachment holding directory | Joey Hess | 2011-06-14 |
* | store filename in holding dir in linkpage form•••Avoids any unpleasantness with .. or other special chars in the attachment
filename.
| Joey Hess | 2011-06-14 |
* | store attachments in holding area; commit to wiki on page save•••This makes uploading a lot of attachments somewhat faster, because
the user does not need to wait for a long website refresh after each
upload. Still probably somewhat slow, since ikiwiki has to run for each
upload.
More importantly, this opens the door for integration of things like
the jquery file upload interface, which allow drag-n-drop and multiple
file uploads to be queued and then ran.
It uses rcs_commit_staged, which leaves out tla and mercurual which lack
that, but since rename, remove, autoindex, etc also use that, I think it's
fine for attachments to also depend on it.
The attachment list is currently broken; it does not look in the holding
area yet, and its links to the attached files won't work since they're not
yet in the wiki. previewing is also currently broken.
Work sponsored by TOVA.
| Joey Hess | 2011-06-14 |
* | refactor | Joey Hess | 2011-06-14 |
* | remove second parameter to include_javascript•••function used to take a second parameter to control absoluteness, no longer
does
| Joey Hess | 2011-01-02 |
* | attachment: Fix attachment file size display. | Joey Hess | 2010-09-21 |
* | don't run check_canedit in nonfatal mode | Joey Hess | 2010-08-30 |
* | rcs_commit and rcs_commit_staged api changes•••Using named parameters for these is overdue. Passing the session in a
parameter instead of passing username and IP separately will later allow
storing other session info, like username or part of the email.
Note that these functions are not part of the exported API,
and the prototype change will catch (most) skew, so I am not changing
API versions. Any third-party plugins that call them will need updated
though.
| Joey Hess | 2010-06-23 |
* | stop using REMOTE_ADDR•••Everywhere that REMOTE_ADDR was used, a session object is available, so
instead use its remote_addr method.
In IkiWiki::Receive, stop setting a dummy REMOTE_ADDR.
Note that it's possible for a session cookie to be obtained using one IP
address, and then used from another IP. In this case, the first IP will now
be used. I think that should be ok.
| Joey Hess | 2010-06-23 |
* | attachment: Support Windows paths when taking basename of client-supplied fil... | Joey Hess | 2010-06-16 |
* | attachment: When inserting links, insert img directives for images, if that p... | Joey Hess | 2010-06-12 |
* | attachment: Show files from underlay in attachments list.•••While those files cannot be removed or renamed, this allows easy
downloading of them, and a new version can after all be uploaded.
| Joey Hess | 2010-06-12 |
* | unfinished file_prune revamp•••Many calls to file_prune were incorrectly calling it with 2 parameters.
In cases where the filename being checked is relative to the srcdir,
that is not needed.
Made absolute filenames be pruned. (This won't work for the 2 parameter call
style.)
| Joey Hess | 2010-04-17 |
* | add section information | Joey Hess | 2010-02-12 |
* | attachment: Fix reversion in attachment sorting by age.•••Reversion was introduced by over-eager removal of mtime_raw in
2b569f99d9e7f1d4d30c7f3adde9729ff4d868cf
| Joey Hess | 2009-12-14 |
* | attachment: Fix several utf-8 problems.•••Similar to those in the rename plugin, although here we can't use
the form object.
| Joey Hess | 2009-12-14 |
* | remove deprecated admin prefs•••A new ikiwiki-transition moveprefs subcommand can pull the old data out of
the userdb and inject it into the setup file.
Note that it leaves the old values behind in the userdb too. I did this
because I didn't want to lose data if it fails writing the setup file for
some reason, and the old data in the userdb will only use a small amount of
space. Running the command multiple times will mostly not change anything.
| Joey Hess | 2008-12-24 |
* | finalise version 3.00 of the plugin api | Joey Hess | 2008-12-23 |
* | Coding style change: Remove explcit vim folding markers. | Joey Hess | 2008-12-17 |
* | fix relativedate timezone inclusion•••The machine parseable date needs to include a timezone.
Also, simplified the interface for date display.
| Joey Hess | 2008-10-19 |
* | Add an underlay for javascript, and add ikiwiki.js containing some utility code.•••* Add an underlay for javascript, and add ikiwiki.js containing some utility
code.
* toggle: Stop embedding the full toggle code on each page using it, and
move it to toggle.js in the javascript underlay.
| Joey Hess | 2008-10-17 |
* | lockedit: Support specifying which users (and IP addresses) a page is locked ... | Joey Hess | 2008-10-08 |
* | attachment: Support adding attachments to pages even as they are being created. | Joey Hess | 2008-10-02 |
* | Export pagetitle, titlepage, linkpage. | Joey Hess | 2008-09-27 |
* | pagetype is exported | Joey Hess | 2008-09-27 |