Commit Graph

930 Commits

Author SHA1 Message Date
Alex Schroeder
c3f6e21399 (LatestChanges): Handle "to" parameter.
(RcHeader): Report use of "to" parameter
(RcHtml): Add More... link.
(DebugInterLinks): Moved to debug.pl.
2009-10-06 14:33:00 +00:00
Alex Schroeder
9d589bbf0b (SearchRegexp, SearchString): Remove the test for
invalid regular expressions.
(DoSearch): Report invalid regular expressions as an error.
2009-08-19 16:17:50 +00:00
Alex Schroeder
a2c44a9082 (SearchRegexp): Keep the test for invalid regular
expressions but do not return it as a result because the value
cannot be passed to grep.
2009-08-19 13:59:07 +00:00
Alex Schroeder
af53662ef7 (SearchString, SearchRegexp): Handle invalid regular
expressions by compiling the regular expression, and if that
fails, use quotemeta on it and use that instead.
2009-08-15 22:11:14 +00:00
Alex Schroeder
08ff5e4d7e (DoPost): Apparently we cannot count on <$file> to
always work within the eval, so we use a local variable. (Showed
up on a site.)
2009-08-03 22:24:24 +00:00
Alex Schroeder
1dab234836 (GetRcLines): Fix bug that prevented the oldrc.log file
from being read if rc.log was missing or empty.
2009-07-03 09:23:01 +00:00
Alex Schroeder
478db470c6 (SearchTitleAndBody): Unquote the search string. 2009-06-25 22:52:16 +00:00
Alex Schroeder
eebc1707d3 (GetFeeds): Fix link to follow-up RSS feed. 2009-06-23 22:27:12 +00:00
Alex Schroeder
87825589d2 (ApplyRules): No longer localize $OpenPageName and %Page
for the <search regexp> rule.
(PrintJournal): No longer localize $OpenPageName and %Page before
calling PrintAllPages().
(PrintAllPages, SearchTitleAndBody): Instead, localize them here.
This will prevent bugs when the OpenPage is called from other
locations.
2009-06-22 00:28:22 +00:00
Alex Schroeder
12010d81bc (TouchIndexFile): New sub.
(Save): Use it.
2009-06-04 06:32:56 +00:00
Alex Schroeder
21d1823942 (GetCommentForm): Default to ten lines for comments (bugfix). 2009-05-24 13:34:51 +00:00
Alex Schroeder
d4a7ebb293 (GetCommentForm): Default to ten lines for comments. 2009-05-24 13:32:17 +00:00
Alex Schroeder
dadbc118ed (GetCommentForm): Added a span around each input field
below the textarea.
(DoMaintain): Do not a newline if the rc.log file contains no more
entries (by default this only happens if the wiki has not been
edited in 90 days).
2009-05-22 18:58:57 +00:00
Alex Schroeder
4bf8a17a46 (DoHistory): Handle date changes here in order to avoid
declaring a variable and having to pass it by reference to
GetHistoryLine.
(GetHistoryLine): Simplified. Also, don't set a revision if
comparing an older revision with the current one.
2009-05-09 12:38:30 +00:00
Alex Schroeder
1b56cbc262 (ApplyRules): Make sure we store $_ whenever we store
pos because of recursive calls to ApplyRules.
2009-05-07 20:04:09 +00:00
Alex Schroeder
701aaee319 (GrepFiltered): Short circuit if we end up with an empty
regular expression. This can happen when using tags.pl and only
specifying -tag:foo.
2009-04-05 22:07:40 +00:00
Alex Schroeder
b436ca802b (GrepFiltered): Sort output because grep -r doesn't
produce sorted output.
2009-03-27 23:33:45 +00:00
Alex Schroeder
4cbde83973 (GrepFiltered): Rewrite to use grep -r instead of -R. I'm not sure
which one is more widely accepted.
2009-03-27 22:42:46 +00:00
Alex Schroeder
1ec78f7933 (GrepFiltered): Rewrite to use grep -R instead of find.
(DoShowVersion): Undo last change.
2009-03-27 21:54:41 +00:00
Alex Schroeder
a2b3167d92 (GrepFiltered): Use find and grep because on larger
wikis the command line is too large.
(DoShowVersion): Print find version as well.
2009-03-27 21:40:20 +00:00
Alex Schroeder
6d44c6da8e Whitespace. 2009-03-27 11:13:12 +00:00
Alex Schroeder
f6323e4750 *** empty log message *** 2009-03-21 08:29:13 +00:00
Alex Schroeder
fdb8d4e27e *** empty log message *** 2009-03-21 08:25:13 +00:00
Alex Schroeder
8067ba5254 (GetId): Do not return $HomePage if no id has been
specified.
(DoBrowseRequest): Don't report an invalid URL if no id has been
specified. Just browse the HomePage instead.
2009-03-16 17:11:54 +00:00
Alex Schroeder
451f871c70 (GetId): Fix it by no longer short-circuiting to return HomePage. 2009-03-14 20:07:01 +00:00
Alex Schroeder
59de7cc66c (GetId): Use keywords when determining the default page
for the wiki, since recent versions will set parameters.
2009-03-14 19:33:15 +00:00
Alex Schroeder
cefd238221 (InitCookie): We need to fall back on %OldCookie if no explicit
parameter was provided.
2009-03-13 17:53:53 +00:00
Alex Schroeder
5217c78112 (GetParam): We need to fall back on %OldCookie if no explicit
parameter was provided.
2009-03-13 17:41:06 +00:00
Alex Schroeder
c9eabd72d2 (DoShowVersion): Print version info for grep. 2009-03-13 17:00:58 +00:00
Alex Schroeder
f828cf67c6 (GrepFiltered): Make sure matches in page content do not
duplicate matches in page names.
2009-03-13 16:57:41 +00:00
Alex Schroeder
07ab369e1b ($NewCookie): Deleted.
(InitCookie, CookieUsernameFix, CookieRollbackFix, GetParam)
(SetParam): Get rid of $NewCookie.
(CookieUsernameFix): Make sure that with $FreeLinks and $WikiLinks
unset, single words are still allowed.
2009-03-12 21:20:56 +00:00
Alex Schroeder
847b2e0877 (GrepFiltered): Return pagename matches, then page
content matches.
2009-03-11 14:09:32 +00:00
Alex Schroeder
4335b6019e (DoSearch, ApplyRules): Replace HighlightRegex with SearchRegexp.
(GrepFiltered): Use SearchRegexp, too. And search AllPagesList.
(HighlightRegex): Deleted.
(SearchRegexp): New.
2009-03-11 08:48:19 +00:00
Alex Schroeder
8949c8248b Whitespace. 2009-03-10 13:06:14 +00:00
Alex Schroeder
ff13b8b592 Whitespace. 2009-03-10 07:20:58 +00:00
Alex Schroeder
d19483978d Whitespace changes 2009-03-07 16:21:33 +00:00
Alex Schroeder
09a53a4270 (GetParam): Get result from NewCookie before getting it
from $q->param -- this will make SetParam have the intended effect.
(DoBrowseRequest): Fake a search action before calling DoSearch;
since the action is now explicitly not browse, GetRobots will
produce a NOFOLLOW header.
2009-02-22 10:07:47 +00:00
Alex Schroeder
fcbb43e6fe (DelayRequired): Fix an off-by one error. 2009-01-05 00:30:21 +00:00
Alex Schroeder
23267e7a19 (GetEditForm): Remove extra closing div.
(@MyBeforeApplyRules, @MyAfterApplyRules): Removed.
(ApplyRules): Removed call of code on @MyBeforeApplyRules.
(PrintWikiToHTML): Removed call of code on @MyAfterApplyRules.
2008-12-08 01:10:03 +00:00
Alex Schroeder
198ebb2e26 (GetEditForm): Remove extra closing div. 2008-12-07 23:58:28 +00:00
Alex Schroeder
2f8793a3c9 (GrepFiltered): Ignore grep error messages (which happen
on an empty wiki, for example).
2008-12-06 01:57:40 +00:00
Brian Curry
fae5852035 * wiki.pl (PrintWikiToHTML): Moved "@MyBeforeApplyRules"-specific
code into the ApplyRules() routine. This corrects a number of
subtle issues with the Crossbar module: especially, the Crossbar
module's erroneous handling of uploaded files. (Thanks, Ingo
Belka!)
* modules/crossbar.pl (CrossbarBeforeApplyRule): Corrected this
module's erroneous handling of uploaded files.
(RunMyRulesTocCrossbar): New function, offloading a Crossbar-
specific hack from "toc.pl" into this file. (This is still...
slightly hacky, but a bit better.)
* modules/toc.pl (TocRule): Allowed more than one table of contents
per page. Before, this module only recognized the first "<toc...>"
markup for a Wiki page: all subsequent "<toc...>" markup for that
page was studiously ignored. Correcting this improves integration
with the Crossbar module.
(RunMyRulesToc): Removed a Crossbar-specific hack.
(TocAfterApplyRule): Allowed more than one table of contents.
($TocIsApplyingAutomaticRules): New option, providing slightly
finer-grained control over Table of Contents handling.
2008-12-03 11:46:48 +00:00
Brian Curry
93d53d176c * wiki.pl: Slightly altered the CVS-enabled version notice. 2008-11-27 21:59:06 +00:00
Brian Curry
3a825ff647 * modules/wiki.pl: Added a CVS-enabled version notice to this file's
header comments This should make it easier for Oddmuse users to
ascertain which Oddmuse version they're using.
2008-11-27 21:47:52 +00:00
Alex Schroeder
773976992c (DoShowVersion): Print grep --version. 2008-11-24 19:27:23 +00:00
Brian Curry
8a4a3ff907 * wiki.pl (GetEditForm): Added the 'upload' class attribute to
upload links produced by this function, for CSS stylization.
(BrowsePage): Calls the new "PrintPageContent" function.
(PrintPageContent): New function, whose implementation has been
extracted from the "BrowsePage" function. This permits external
modules -- like the new Crossbar module -- to override this
function and thereby print page content in a module-specific
manner.
2008-11-23 22:08:34 +00:00
Brian Curry
4a1cbfb1b4 * wiki.pl (SetHtmlEnvironmentContainer): Corrected a slight, but
significant, typo.
* modules/sidebar.pl: Reverted. I underestimated the scope of
changes needed to bring this module in line with recent, other
changes to the Table of Contents module. The good news is that the
reverted Sidebar module now works as expected for all modules except
the Table of Contents module; of course, the bad news is that the
reverted Sidebar module no longer works for the Table of Contents
module. (Unfortunately, we can't have both, here.) I will be
recommitting my changes to this module as a new module, therefore,
named "modules/crossbar.pl" -- sometime, soon. That new module
will (probably) break backwards compatibility with this module, but
will otherwise behave as expected... with all modules.
* t/sidebar.t: Prevented testing against the Table of Contents
module, as the Sidebar module is now known not to work with that
module.
2008-11-20 11:45:45 +00:00
Brian Curry
609cb49f86 * wiki.pl (PrintWikiToHTML): Slightly reordered function calls,
so as to optimize a few edge cases.
2008-11-16 01:00:04 +00:00
Brian Curry
52a47946a6 * wiki.pl (RegisterBlockLevelElement): Renamed to
SetHtmlEnvironmentContainer (and changed in every other module,
where called).
2008-11-15 21:24:32 +00:00
Brian Curry
7cfe623133 * wiki.pl (AddHtmlEnvironment): Corrected a minor regression.
Probably not a genuine issue... but one can never tell.
* modules/creole.pl (CloseHtmlEnvironmentsCreole): Removed.
* modules/creoleaddition.pl (CloseHtmlEnvironmentsCreoleAddition):
Removed.
* modules/poetry.pl (CloseHtmlEnvironmentsPoetry): Removed.
2008-11-15 12:53:25 +00:00