File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,14 @@ trait Friendship
99{
1010 public function __constructFriendship ()
1111 {
12- $ isSecure = (!empty ($ _SERVER ['HTTPS ' ]) && $ _SERVER ['HTTPS ' ] !== 'off ' )
13- || $ _SERVER ['SERVER_PORT ' ] == 443 ;
12+
13+ $ base_url = url ("" );
14+ $ base_url = str_replace (":// " , "-- " , $ base_url );
15+ if (strpos ($ base_url , "/ " ) !== false ) {
16+ $ base_url = substr ($ base_url , strpos ($ base_url , "/ " ));
17+ } else {
18+ $ base_url = "" ;
19+ }
1420
1521 //assets folder
1622 $ assets = Utility::get ($ this ->reportSettings , "assets " );
@@ -20,7 +26,7 @@ public function __constructFriendship()
2026 mkdir ($ public_path . "/koolreport_assets " , 0755 );
2127 }
2228 $ assets = array (
23- "url " => ( $ isSecure ? secure_url () : url ( "" )) . "/koolreport_assets " ,
29+ "url " => $ base_url . "/koolreport_assets " ,
2430 "path " => $ public_path . "/koolreport_assets " ,
2531 );
2632 $ this ->reportSettings ["assets " ] = $ assets ;
You can’t perform that action at this time.
0 commit comments