Commit Graph

742 Commits

Author SHA1 Message Date
Alex Schroeder
66c6381d5d (DoCss): Report missing LWP::UserAgent or wrong URL.
(GetCommentForm): Pass comment parameter to UserCanEdit();
(UserCanEdit): New comment parameter, enable $EditAllowed = 3.
2006-09-30 20:09:19 +00:00
Alex Schroeder
c26fee7911 (DoCss): Report missing LWP::UserAgent or wrong URL. 2006-09-30 18:03:25 +00:00
Alex Schroeder
7aca50f29b (DoEdit, GetEditForm): Moved code from DoEdit into the
new GetEditForm, which returns a string that can be modified by
wrapper code.
2006-09-27 20:15:34 +00:00
Alex Schroeder
c831590106 (GetSummary): Fix aftertext modifies summary. 2006-09-22 23:34:53 +00:00
Alex Schroeder
1df85746f9 (QuoteHtml): Replace control characters with space.
(PageHtml): Print diff if possible, even if the page itself is too
large.
(GetRcRss): Conditionalize some prints to avoid empty elements.
(TimeToRFC822): Rewrote to not use sprintf such as to avoid
localized names.
2006-09-20 22:43:43 +00:00
Alex Schroeder
a3ca4b1f98 (PageHtml): At least return the diff if small enough. 2006-09-20 18:27:13 +00:00
Alex Schroeder
ab9d5d8daf (GetCommentForm): Don't show comment form when the
comment page is locked.
2006-09-20 17:43:08 +00:00
Alex Schroeder
34d89d9556 (GetRcRss): Use cc for the creative commons namespace.
(ReportError): Don't return non-zero so that FCGI does not warn
about abnormal exit.
2006-09-19 21:02:01 +00:00
Alex Schroeder
28d73522df (GetRcRss): Undo change regarding page and diff parameters.
(InitVariables): Add $RsExclude to %AdminPages.
(PrintPageDiff): Print hr only if pages will follow.
2006-09-10 23:01:14 +00:00
Alex Schroeder
cd55afc79b (PrintPageHtml): Allow skipping using page=0.
(GetRcRss): Call PageHtml if one of full, page, or diff is set.
(GetRcRss): Cosmetics.
2006-09-10 22:50:31 +00:00
Alex Schroeder
55e141e870 (GetInterSiteUrl): Don't quote slashes. 2006-09-01 23:45:44 +00:00
Alex Schroeder
beac1850f0 (GetId): If no id parameter was given, use the title
parameter.
(DoBrowseRequest): If a title parameter was given, but the Cancel
button was used, don't call DoPost().
(DoEdit): Add a Cancel button.
2006-08-31 18:18:38 +00:00
Alex Schroeder
4af55bdedb (RcHeader, GetFilterForm, GetRc): Revert previous unplanned
change: Use match instead of rcmatch.
2006-08-30 13:39:56 +00:00
Alex Schroeder
f21a4e6b9c (PrintRc): Fix mispatch. 2006-08-30 01:22:57 +00:00
Alex Schroeder
d29c708df2 (BrowsePage): Moved some code into PrintRc.
(BrowseRc): Use PrintRc as well.
(PrintRc): New.
2006-08-30 00:51:08 +00:00
Alex Schroeder
f87fd9fb0b (PrintAllPages, GetPageOrEditLink, GetPageLink)
(GetEditLink, GetDownloadLink, GetRcText, GetRcRss, )
(DoAdminPage, GetOldPageLink, GetSearchLink, GetAuthorLink)
(GetHeader, DoEdit, PrintPage, SearchTitleAndBody)
(SearchNearPages, PrintSearchResultEntry, GetPermanentAnchor): Use
NormalToFree instead of s/_/ /g.
(NormalToFree): New.

(UserIsEditor, UserIsAdmin): Simplify.
(UserIsEditorOrError): Use ReportError.

(DoRollback): Require a username (because of bots disregarding
robot instructions).
(DoHistory, GetHistoryLine): Make sure that you need either a
password or a username to see rollback links.
2006-08-30 00:42:30 +00:00
Alex Schroeder
3bbb54dd37 (GetSummary): Don't truncate the real summary! 2006-08-18 16:14:28 +00:00
Alex Schroeder
d24499e8a0 (DoRc): Fix boolean operation. 2006-08-18 12:17:53 +00:00
Alex Schroeder
cca8b21b8d (DoRollback): Check UserCanEdit before saving.
(UserCanEdit): Added test for sample undefined page.
(DoPost): Removed unnecessary tests, as these are caught by
UserCanEdit.
2006-08-18 11:57:37 +00:00
Alex Schroeder
0d2252d38c (ValidIdOrDie): Typo. 2006-08-18 11:38:22 +00:00
Alex Schroeder
3f0185c92d ($Counter): New variable for Fast::CGI info.
(InitVariables): Add counter if the script is being called
multiple times.
(RcHeader): Add view-rollback link.
(PrintAllPages, ValidIdOrDie, DoRandom): Simplified.
(DoRc, GetRcLines): Moved stripping of rollbacks from DoRc to
GetRcLines. Add parameter to GetRcLines.
(DoRollback): Add parameter to GetRcLines call in order to not
strip rollbacks. Fix bug which caused message printing at all
times.
(RcHeader, GetRc): Use rcmatch instead of match parameter.
(GetHistoryLink, GetRCLink): Use FreeToNormal.
2006-08-18 11:37:23 +00:00
Alex Schroeder
128d8ff144 (PrintHtmlDiff): Translate diff fragments such as
added/changed/deleted.
(ImproveDiff): No longer translate diff fragments here.
2006-08-17 14:05:32 +00:00
Alex Schroeder
b645056297 (PrintHtmlDiff): Recompute the new text if requesting a
diff with disabled caching.
2006-08-17 12:59:13 +00:00
Alex Schroeder
756dbc18b4 (PrintHtmlDiff): Changed logic when requesting no cache. 2006-08-17 10:29:29 +00:00
Alex Schroeder
75ae4a7109 (PrintHtmlDiff): Fix variable names. 2006-08-17 10:15:35 +00:00
Alex Schroeder
3e18041622 (DoRc): Allow rollback=1 to see rollbacks.
(DoRollback): Rollback to empty pages is allowed. Print message
when only one page is to be rolled back and the two revisions are
the same.
(PrintHtmlDiff): Change messages used when displaying the diff.
Get rid of oldmajor. Show link to later minor edits when showing
last major edit diff.
(GetDiff): Changed s///g to s///ge.
(ExpireKeepFiles): Get rid of oldmajor.
(Save): Pass old diff on to UpdateDiffs. Get rid of oldmajor. Only
call UpdateDiffs if UseCache > 1.
(UpdateDiffs): Simplify. Get rid of oldmajor.
2006-08-17 10:08:53 +00:00
Alex Schroeder
88488825e4 (UpdateDiffs): Fix minor/major edit diffs. 2006-08-15 15:24:02 +00:00
Alex Schroeder
d5f11da1c3 (DoRollback): If an id is provided, don't check
the time window: Just roll back as far as possible.
(GetTextAtTime): Return a timestamp if no perfect match is found.
2006-08-15 09:05:36 +00:00
Alex Schroeder
d98e5768f1 (DoRc): Fix another off-by-one error when skipping rollbacks. 2006-08-15 01:52:19 +00:00
Alex Schroeder
4fc9025734 (DoRollback): Only leave marker when doing mass rollback. 2006-08-15 00:01:01 +00:00
Alex Schroeder
4ab17ba054 (DoRc): More rollback fixes. 2006-08-14 23:55:38 +00:00
Alex Schroeder
9ebd60dcd5 (DoRc): More rollback fixes. 2006-08-14 23:53:06 +00:00
Alex Schroeder
80f8c4f26a (DoRc): More rollback fixes. 2006-08-14 23:51:29 +00:00
Alex Schroeder
6be1585666 (DoRc): More rollback fixes. 2006-08-14 23:49:54 +00:00
Alex Schroeder
2d173eb08b (DoRc): Splice [[rollback]] marker, too. 2006-08-14 23:41:29 +00:00
Alex Schroeder
74d6821c46 (DoRollback): Only admins can do mass rollback, but every user can
do single rollbacks. Link to pages in the listing.
2006-08-14 23:29:27 +00:00
Alex Schroeder
2a7f57a9ec (DoRollback): Only admins can do mass rollback, but every user can
do single rollbacks.
2006-08-14 23:27:54 +00:00
Alex Schroeder
6c7d047fa3 (DoContributors): Fix bug, allow no page id at all. 2006-08-14 23:21:35 +00:00
Alex Schroeder
f65a3064b7 (DoContributors): List unique usernames only. 2006-08-14 20:53:35 +00:00
Alex Schroeder
fc33d63944 New contrib action.
(DoContributors): New.
(GetFooterLinks): Added appropriate link to contrib action.
2006-08-14 19:43:06 +00:00
Alex Schroeder
b0d1f32894 (DoCss): No need to URL encode the URLs in @CssList. 2006-08-13 23:45:12 +00:00
Alex Schroeder
0ac76c4fdc (GetDownloadLink): Allow to retrieve download URL only.
(GetHeader): Renamed variable for alt text. Use pagename as
$LogoUrl if possible.
(DeletePage): Use ValidIdOrDie to check $id.
2006-08-13 22:36:29 +00:00
Alex Schroeder
453a5931fc (DoHistory): Pass timestamp reference to GetHistoryLine.
(GetHistoryLine): Use timestamp reference to group entries by day.
2006-08-13 00:38:45 +00:00
Alex Schroeder
cf0d11a43b (DoHistory): Offer page delete link only if a revision exists to
be deleted.
2006-08-13 00:08:12 +00:00
Alex Schroeder
9f49406535 (DoRollback): Reorder error messages. Fix test for ids. 2006-08-12 23:43:58 +00:00
Alex Schroeder
277439a03c (DoRc): Fix off-by-one error, again.
(GetRcLines, DoRollback): Fix off-by-one error as well.
2006-08-12 23:23:23 +00:00
Alex Schroeder
14afce2ef0 (PageDeletable, DoMaintain, DoEdit, ExpireKeepFiles, DoRollback)
(RollbackPossible): Replaced 24*60*60 with 86400 and 60*60 with
3600.
2006-08-12 23:15:05 +00:00
Alex Schroeder
4b4cef8d65 (DoRc): Fix test for existing changes.
(GetHistoryLine): Report missing other revisions instead of
showing the fake "revision 0" entry. Add whitespace.
2006-08-12 23:07:47 +00:00
Alex Schroeder
72f9033556 (DoRc): Moved RC file reading into new function called GetRcLines.
(GetRcLines): New. No longer generate warnings when reading empty
rc files (as is usual when creating a new wiki).
(DoRollback): Optimize by calling GetRcLines and parsing the
result instead of checking all pages. Allow rollback of single
pages.
(DoHistory): Pass new parameter to GetHistoryLine. Add link to
delete current page at the bottom.
(GetHistoryLine): Accept new parameter, and add rollback links
when appropriate.

(GetRcHtml): Simplify translation handling.
(DoEdit): Changed text of the file/text replacement link at the
bottom. Did this for all translation files, too!

(DoPost, PageDeletable): Don't treat $DeletedPage like a regular
expression.
2006-08-12 19:51:50 +00:00
Alex Schroeder
00975ecde2 (GetSummary): Fixed summary post-processing.
(DoRc): Remove rc lines of rolled back changes.
(DoRollback): Leave marker for DoRc.
2006-08-12 02:35:05 +00:00