diff --git a/ifm.php b/ifm.php index 9ad20c5..c71c347 100644 --- a/ifm.php +++ b/ifm.php @@ -30,7 +30,6 @@ class IFMConfig { const copymove = 1; // allow to copy and move files and directories // view controls - const multiselect = 1; // implement multiselect of files and directories const showlastmodified = 0; // show the last modified date? const showfilesize = 1; // show filesize? const showowner = 1; // show file owner? @@ -186,6 +185,14 @@ ini_set( 'display_errors', 'OFF' ); class IFM { const VERSION = '2.4.0'; + private $defaultconfig = array( + "upload" => 1,"remoteupload" => 1,"delete" => 1,"rename" => 1,"edit" => 1,"chmod" => 1, + "extract" => 1,"download" => 1,"selfdownload" => 1,"createdir" => 1,"createfile" => 1, + "zipnload" => 1,"copymove" => 1,"showlastmodified" => 0,"showfilesize" => 1,"showowner" => 1, + "showgroup" => 1,"showpermissions" => 2,"showhtdocs" => 1,"showhiddenfiles" => 1,"showpath" => 0, + "auth" => 0,"auth_source" => 'inlineadmin:$2y$10$0Bnm5L4wKFHRxJgNq.oZv.v7yXhkJZQvinJYR2p6X1zPvzyDRUVRC', + "root_dir" => "","defaulttimezone" => "Europe/Berlin","tmp_dir" => "","ajaxrequest" => 1 + ); private $config = array(); public function __construct( $config ) { @@ -194,7 +201,7 @@ class IFM { trigger_error( "IFM: could not load config" ); exit( 1 ); } else { - $this->config = $config; + $this->config = array_merge( $this->defaultconfig, $config ); } } @@ -410,29 +417,29 @@ div.footer div.panel-body { padding: 5px !important; }