%once> use utils; %once> <%perl> our(%session,$dbh); $lang = $m->comp('/bits/decidelanguage', lang => $lang); $pagename = $page; %perl> % if(!(defined($content) && defined($lang) && defined($version))) { % # print out the editing page % if(defined($session{'username'})) { <%perl> # request the latest, greatest and most appropriate version of the page: my $langarray = $dbh->selectall_arrayref("SELECT * FROM languages WHERE tag = ?", { }, $lang); my $langid = $langarray->[0]->[0]; my $pagequery = $dbh->prepare("SELECT p.version, p.content, p.compressed FROM pages p WHERE p.langId = ? AND p.pagename = ? AND p.latest = 'true'"); $pagequery->execute($langid,$page); my $result = $pagequery->fetchrow_hashref(); %perl>
Editing <% $page %> | <% $langarray->[0]->[4] %> |
The Wiki text you enter is rendered by a jbovlaste-modified version of John Cowan's Wiki.pm. In addition to supporting linking to jbovlaste definitions, it also handles tables, and can deal with inline LaTeX.
See the Wiki text help page for more information on the formatting commands available to you.
% } else { Cannot edit <% $page %>Sorry, but you'll have to log in before I can let you edit this page.
There ought to be a link to the login page down in the very bottom right hand corner of this page.
% } % } else { % # process an editing submission Saving <% $page %><% join(", ",@insertargs) %>
Uhoh. There has been an internal error with the database. I'm rolling back the transaction and trying to log an error. Please report this to the admins.
% } else { % $dbh->commit;I'm pretty sure I saved the page, woohoo!
Return to ">the page.
% } % } % $dbh->rollback; % } <%shared> our $pagename; %shared> <%method title> Wiki: Editing: <% $pagename %> %method> <%args> $page $lang $version => undef $content => undef %args>