Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 7af6828

Browse files
authored
Updated for installation in subfolder and optional use of index.php in url.
1 parent 0a22585 commit 7af6828

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@
5858
$maincontent.="\n\t\t<author_name><![CDATA[".@$plugin['author']."]]></author_name>";
5959
$maincontent.="\n\t\t<download_url>http";
6060
if($_SERVER['SERVER_PORT'] == 443){$maincontent.="s";}
61-
$maincontent.="://$_SERVER[HTTP_HOST]/downloads/".@$plugin['filename']."</download_url>";
61+
$folder=strtok($_SERVER["REQUEST_URI"],'?');
62+
if(substr($folder, -9,9)=="index.php"){
63+
$folder=substr($folder, 0,-9);
64+
}
65+
$maincontent.="://".$_SERVER['HTTP_HOST'].$folder."downloads/".@$plugin['filename']."</download_url>";
6266
$maincontent.="\n\t\t<uploaded_by><![CDATA[".@$plugin['author']."]]></uploaded_by>";
6367
$maincontent.="\n\t\t<create_date><![CDATA[".@$plugin['create_date']."]]></create_date>";
6468
$maincontent.="\n\t\t<update_date><![CDATA[".@$plugin['update_date']."]]></update_date>";

0 commit comments

Comments
 (0)