diff --git a/src/ifm.js b/src/ifm.js index 4486ba0..9f6e9e5 100644 --- a/src/ifm.js +++ b/src/ifm.js @@ -102,10 +102,10 @@ function IFM(params) { */ this.rebuildFileTable = function( data ) { if( data.status == "ERROR" ) { - this.showMessage( data.message, "e" ); + self.showMessage( data.message, "e" ); return; } else if ( ! Array.isArray( data ) ) { - this.showMessage( self.i18n.invalid_data, "e" ); + self.showMessage( self.i18n.invalid_data, "e" ); return; } data.forEach( function( item ) { @@ -2037,15 +2037,12 @@ function IFM(params) { // handle window.onbeforeunload window.onbeforeunload = self.onbeforeunloadHandler; - /* // load initial file table if( window.location.hash ) { self.changeDirectory( decodeURIComponent( window.location.hash.substring( 1 ) ) ); } else { this.refreshFileTable(); } - */ - console.log("Finished initialisation without file table"); }; this.init = function(id) { diff --git a/src/main.php b/src/main.php index 5af4a3a..26a6c8a 100644 --- a/src/main.php +++ b/src/main.php @@ -340,7 +340,7 @@ f00bar; usort($dirs, [$this, "sortByName"]); usort($files, [$this, "sortByName"]); - return ["data" => array_merge($dirs, $files)]; + return array_merge($dirs, $files); } private function getItemInformation($name) { @@ -533,11 +533,11 @@ f00bar; if (empty($err)) { return [ "status" => "OK", - "message" => ($d['action'] == "copy" ? $this->l('copy_success') : $this->l['move_success'] ), + "message" => ($d['action'] == "copy" ? $this->l('copy_success') : $this->l('move_success')), "errflag" => "1" ]; } else { - $errmsg = ($d['action'] == "copy" ? $this->l('copy_error') : $this->l['move_error'] ) . "