aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ogs/assetserver
diff options
context:
space:
mode:
authorgareth2007-03-14 03:37:26 +0000
committergareth2007-03-14 03:37:26 +0000
commit6857bed98146997240ec8505931813a6eef0a7d1 (patch)
tree246edf86e2954e43f1ee02fa722ce77e83110718 /ogs/assetserver
parentmerged new OpenSim from branches/ogs-cs (diff)
downloadopensim-SC-6857bed98146997240ec8505931813a6eef0a7d1.zip
opensim-SC-6857bed98146997240ec8505931813a6eef0a7d1.tar.gz
opensim-SC-6857bed98146997240ec8505931813a6eef0a7d1.tar.bz2
opensim-SC-6857bed98146997240ec8505931813a6eef0a7d1.tar.xz
Cleaned up PHP
Diffstat (limited to 'ogs/assetserver')
-rw-r--r--ogs/assetserver/assetserver_config.inc.php16
-rw-r--r--ogs/assetserver/index.php25
2 files changed, 0 insertions, 41 deletions
diff --git a/ogs/assetserver/assetserver_config.inc.php b/ogs/assetserver/assetserver_config.inc.php
deleted file mode 100644
index b2199f3..0000000
--- a/ogs/assetserver/assetserver_config.inc.php
+++ /dev/null
@@ -1,16 +0,0 @@
1<?
2// All the asset server specific stuff lives here
3
4// The asset server's relative URL to the root of the webserver
5// If you place this at http://servername/assets then this would be set to /assets/index.php
6// wikipedia style URLs need to be implemented - and will be (en.wikipedia.org/wiki/blabla rather than en.wikipedia.org/wiki/index.php?something=bla or en.wikipedia.org/wiki.php/bla)
7$asset_home = "/ogs/assetserver/";
8
9// The key we expect from sims
10$sim_recvkey = "1234";
11
12// The path where the asset repository is stored, this should be readable by the webserver but NOT in the document root
13// The default below is BAD for production use and intended to be simply generic - change it or risk copyright theft
14// greater than you could ever imagine, alternatively use .htaccess or other mechanisms.
15$asset_repos = "/usr/local/sites/osgrid.org/web/ogs/assetserver/assets";
16?>
diff --git a/ogs/assetserver/index.php b/ogs/assetserver/index.php
deleted file mode 100644
index ee20229..0000000
--- a/ogs/assetserver/index.php
+++ /dev/null
@@ -1,25 +0,0 @@
1<?
2error_reporting(0); // Remember kids, PHP errors kill XML-RPC responses and REST too! will the slaughter ever end?
3
4include("assetserver_config.inc.php");
5
6// Parse out the parameters from the URL
7$params = str_replace($asset_home,'', $_SERVER['REQUEST_URI']);
8$params = str_replace("index.php/","",$params);
9$params = split('/',$params);
10
11// Die if the key doesn't match
12if($params[1]!=$sim_recvkey) {
13 die();
14}
15
16// Send requested data
17switch($params[0]) {
18 case 'getasset':
19 if($params[3]=="data") {
20 Header("Content-Length: ". (string)filesize($asset_repos . "/" . $params[2] . "/data"));
21 readfile($asset_repos . "/" . $params[2] . "/data");
22 }
23 break;
24}
25?>