@@ -1935,18 +1935,18 @@ function update($event_name, $data) {
19351935
19361936 if ($ data ['new ' ]['stats_type ' ] != '' ) {
19371937 if (!is_dir ($ data ['new ' ]['document_root ' ].'/ ' . $ web_folder . '/stats ' )) $ app ->system ->mkdir ($ data ['new ' ]['document_root ' ].'/ ' . $ web_folder . '/stats ' );
1938- $ ht_file = "AuthType Basic \nAuthName \"Members Only \"\nAuthUserFile " .$ data ['new ' ]['document_root ' ]."/web /stats/.htpasswd_stats \nrequire valid-user \nDirectoryIndex index.html index.php \nHeader set Content-Security-Policy \"default-src * 'self' 'unsafe-inline' 'unsafe-eval' data:; \"\n<Files \"goaindex.html \"> \nAddDefaultCharset UTF-8 \n</Files> \n" ;
1938+ $ ht_file = "AuthType Basic \nAuthName \"Members Only \"\nAuthUserFile " .$ data ['new ' ]['document_root ' ]."/ " . $ web_folder . " /stats/.htpasswd_stats \nrequire valid-user \nDirectoryIndex index.html index.php \nHeader set Content-Security-Policy \"default-src * 'self' 'unsafe-inline' 'unsafe-eval' data:; \"\n<Files \"goaindex.html \"> \nAddDefaultCharset UTF-8 \n</Files> \n" ;
19391939 $ app ->system ->file_put_contents ($ data ['new ' ]['document_root ' ].'/ ' . $ web_folder . '/stats/.htaccess ' , $ ht_file );
19401940 $ app ->system ->chmod ($ data ['new ' ]['document_root ' ].'/ ' . $ web_folder . '/stats/.htaccess ' , 0755 );
19411941 unset($ ht_file );
19421942
1943- if (!is_file ($ data ['new ' ]['document_root ' ].'/web /stats/.htpasswd_stats ' ) || $ data ['new ' ]['stats_password ' ] != $ data ['old ' ]['stats_password ' ]) {
1943+ if (!is_file ($ data ['new ' ]['document_root ' ].'/ ' . $ web_folder . ' /stats/.htpasswd_stats ' ) || $ data ['new ' ]['stats_password ' ] != $ data ['old ' ]['stats_password ' ]) {
19441944 if (isset ($ data ['new ' ]['stats_password ' ]) && trim ($ data ['new ' ]['stats_password ' ]) != '' ) {
19451945 $ htp_file = 'admin: ' .trim ($ data ['new ' ]['stats_password ' ]);
19461946 $ app ->system ->web_folder_protection ($ data ['new ' ]['document_root ' ], false );
1947- $ app ->system ->file_put_contents ($ data ['new ' ]['document_root ' ].'/web /stats/.htpasswd_stats ' , $ htp_file );
1947+ $ app ->system ->file_put_contents ($ data ['new ' ]['document_root ' ].'/ ' . $ web_folder . ' /stats/.htpasswd_stats ' , $ htp_file );
19481948 $ app ->system ->web_folder_protection ($ data ['new ' ]['document_root ' ], true );
1949- $ app ->system ->chmod ($ data ['new ' ]['document_root ' ].'/web /stats/.htpasswd_stats ' , 0755 );
1949+ $ app ->system ->chmod ($ data ['new ' ]['document_root ' ].'/ ' . $ web_folder . ' /stats/.htpasswd_stats ' , 0755 );
19501950 unset($ htp_file );
19511951 }
19521952 }
0 commit comments