Skip to content

Commit

Permalink
make it php8 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
heikoS2C committed Mar 7, 2023
1 parent 59f9f2b commit c5eefde
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugin.info.txt
@@ -1,7 +1,7 @@
base fileshare
author Soft2C.de
email info@soft2c.de
date 2017-09-20
date 2023-03-06
name fileshare plugin
desc upload, show and download files from directory on web server
url http://www.soft2c.de
7 changes: 4 additions & 3 deletions syntax/Fileshare.php
Expand Up @@ -77,7 +77,8 @@ public function handle($match, $state, $pos, Doku_Handler $handler){
* @return bool If rendering was successful.
*/
public function render($mode, Doku_Renderer $renderer, $data) {
if ($_FILES ['upload'] ['tmp_name']) {
//if ($_FILES ['upload'] ['tmp_name']) {
if(isset($_FILES['upload']) ){
$dir = $_POST ['ns'];
$tmp_name = $_FILES ['upload'] ['tmp_name'];
// basename() kann Directory-Traversal-Angriffe verhindern;
Expand Down Expand Up @@ -162,10 +163,10 @@ private function createDir($dir, $renderer) {
private function readFileList($dir, $delete) {
$refreshbutton = $this->getLang ( 'refreshbutton' );
$loeschenbutton = $this->getLang ( 'loeschenbutton' );

$html ='';
$html .= '<div style="padding:4px 8px 4px 8px;">';
$html .= '<form action="' . $_SERVER ['PHP_SELF'] . '" method="GET" name="filesharelist" id="filesharelist">';
$html .= '<input type="hidden" name="id" value="' . $_REQUEST[id]. '" />';
$html .= '<input type="hidden" name="id_" value="' . $_REQUEST['id']. '" />';
if($this->isAuthorized('role_delete')){
$html .= '<button style="float:left" name="action" value="DELETE" type="submit"> ' . $loeschenbutton . ' </button>';
$html .= '<button style="float:left" name="action" value="REFRESH" type="submit"> ' . $refreshbutton . ' </button>';
Expand Down

0 comments on commit c5eefde

Please sign in to comment.