chiark
/
gitweb
/
~mdw
/
odin-cgi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7396135
)
mason/pastebin/dhandler: Some small refactorings.
author
Mark Wooding
<mdw@distorted.org.uk>
Mon, 6 Jul 2015 11:34:33 +0000
(12:34 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Mon, 6 Jul 2015 11:34:33 +0000
(12:34 +0100)
mason/pastebin/dhandler
patch
|
blob
|
blame
|
history
diff --git
a/mason/pastebin/dhandler
b/mason/pastebin/dhandler
index 7014dcab4fd88e3b91cdcfc14f140187617e28cd..7f6ea24dcb7b0f3c207583467ca177e1216a34e6 100644
(file)
--- a/
mason/pastebin/dhandler
+++ b/
mason/pastebin/dhandler
@@
-21,8
+21,8
@@
$r->content_type("text/plain; charset=utf8");
$m->print($old{content});
} else {
$r->content_type("text/plain; charset=utf8");
$m->print($old{content});
} else {
- $
m->comp("%show", tag => $tag, %old,
-
edit => $Odin::COOKIE{"odin-handoff.$tag"}
);
+ $
edit = $Odin::COOKIE{"odin-handoff.$tag"};
+
$m->comp("%show", tag => $tag, edit => $edit, %old
);
}
} else {
if ($op eq "del") {
}
} else {
if ($op eq "del") {
@@
-30,8
+30,8
@@
set_handoff_cookie $tag, "nil", -max_age => 5;
$m->redirect("$Odin::PASTEBIN/");
} else {
set_handoff_cookie $tag, "nil", -max_age => 5;
$m->redirect("$Odin::PASTEBIN/");
} else {
- my $editp = Odin::update_pastebin $tag, $edit, %props;
set_handoff_cookie $tag, $edit;
set_handoff_cookie $tag, $edit;
+ my $editp = Odin::update_pastebin $tag, $edit, %props;
if ($editp) { $m->redirect("$Odin::PASTEBIN/$tag"); }
else { $m->comp("%edit", tag => $tag, edit => $edit, %props); }
}
if ($editp) { $m->redirect("$Odin::PASTEBIN/$tag"); }
else { $m->comp("%edit", tag => $tag, edit => $edit, %props); }
}