git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Single file editing
[phorkie.git]
/
www
/
edit.php
diff --git
a/www/edit.php
b/www/edit.php
index 897aada2b36bf67a2478f4440a91451bf88a107a..e95ca3f5ed2dbf5441f79300dc5bfacdd8853308 100644
(file)
--- a/
www/edit.php
+++ b/
www/edit.php
@@
-3,6
+3,7
@@
namespace phorkie;
/**
* Edit paste contents
*/
/**
* Edit paste contents
*/
+$reqWritePermissions = true;
require_once 'www-header.php';
$repo = new Repository();
require_once 'www-header.php';
$repo = new Repository();
@@
-10,13
+11,20
@@
$repo->loadFromRequest();
$repopo = new Repository_Post($repo);
if ($repopo->process($_POST, $_SESSION)) {
$repopo = new Repository_Post($repo);
if ($repopo->process($_POST, $_SESSION)) {
- redirect($repo->getLink('display'));
+ redirect($repo->getLink('display', null, true));
+}
+
+$file = null;
+if (isset($_GET['file'])) {
+ $file = $repo->getFileByName($_GET['file']);
}
render(
'edit',
array(
'repo' => $repo,
}
render(
'edit',
array(
'repo' => $repo,
+ 'singlefile' => $file,
+ 'dh' => new \Date_HumanDiff(),
'htmlhelper' => new HtmlHelper(),
)
);
'htmlhelper' => new HtmlHelper(),
)
);