git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
widget/reply: load file upload progress indicator
[minimedit.git]
/
widget
/
reply.php
diff --git
a/widget/reply.php
b/widget/reply.php
index d305fc7c946e4abac1a8fcc761a0cb185bea6931..1f6d0e2ff0352f709ff0223fdd455c1d3962eded 100644
(file)
--- a/
widget/reply.php
+++ b/
widget/reply.php
@@
-60,9
+60,16
@@
if ($_POST) {
$Issue = $updated;
}
}
$Issue = $updated;
}
}
+
+ if ($Page->api) {
+ abort("/{$Page->link}", '200 reply success');
+ }
$_POST['reply'] = NULL;
}
catch (Exception $e) {
$_POST['reply'] = NULL;
}
catch (Exception $e) {
+ if ($Page->api) {
+ abort(ucfirst($e->getMessage()), '500 reply error');
+ }
print "<p class=warn>Antwoord niet opgeslagen: {$e->getMessage()}.</p>\n\n";
}
}
print "<p class=warn>Antwoord niet opgeslagen: {$e->getMessage()}.</p>\n\n";
}
}
@@
-139,7
+146,9
@@
if ($User->login) {
''
);
print '<input type="submit" value="Plaatsen" />'."\n";
''
);
print '<input type="submit" value="Plaatsen" />'."\n";
- print "</form></li>\n";
+ print "</form>";
+ print '<script src="/upload/progress.js"></script>';
+ print "</li>\n";
}
print "</ul>\n\n";
}
print "</ul>\n\n";