git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9bbd31c
)
login/edit: refresh thumbnails on avatar upload
author
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 16 Jun 2018 19:49:57 +0000
(21:49 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 16 Jun 2018 19:58:29 +0000
(21:58 +0200)
login/edit.php
patch
|
blob
|
history
diff --git
a/login/edit.php
b/login/edit.php
index cfbc2d7b82c2eebd725830bf0c9f4f4508132a8e..9611c7d8ba85a5cb25d820ff8f7c74a3f443e13e 100644
(file)
--- a/
login/edit.php
+++ b/
login/edit.php
@@
-85,6
+85,10
@@
if ($_POST) {
if (!@move_uploaded_file($val['tmp_name'], $cols[$col]['target'])) {
$colwarn[$col] = "Fout bij opslaan.";
}
if (!@move_uploaded_file($val['tmp_name'], $cols[$col]['target'])) {
$colwarn[$col] = "Fout bij opslaan.";
}
+ foreach (@glob('thumb/*/') as $thumbres) {
+ # attempt to remove old derivations
+ @unlink($thumbres.'/'.$cols[$col]['target']);
+ }
$cols[$col]['value'] = '';
}
$cols[$col]['value'] = '';
}
@@
-115,9
+119,9
@@
foreach ($cols as $col => &$colconf) {
print "\t";
printf('<li><label for="%s">%s:</label>', $col, ucfirst($colconf['label']));
if (@$colconf['type'] == 'file' and isset($colconf['value'])) {
print "\t";
printf('<li><label for="%s">%s:</label>', $col, ucfirst($colconf['label']));
if (@$colconf['type'] == 'file' and isset($colconf['value'])) {
- printf('<a href="/%s"><img src="/thumb/%s/%s" /></a><br />',
+ printf('<a href="/%s"><img src="/thumb/%s/%s
?%s
" /></a><br />',
$colconf['target'],
$colconf['target'],
- 200, $colconf['target']
+ 200, $colconf['target']
, filemtime($colconf['target'])
);
}
print "<input";
);
}
print "<input";