Skip to content

Commit

Permalink
Change variable server to HTTP_HOST, fixed bug for execution on PHP 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciusandrade committed Jul 12, 2013
1 parent e19d01b commit 82f2395
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion htdocs/isis-oai-provider/index.php
Expand Up @@ -12,7 +12,7 @@
require_once(APPLICATION_PATH . '/oai.php');
} else{

$base_url = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
$base_url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];
$base_url = str_replace("index.php", "", $base_url);
?>

Expand Down
2 changes: 1 addition & 1 deletion htdocs/isis-oai-provider/lib/ISISDb.php
Expand Up @@ -9,7 +9,7 @@ class ISISDb{
function ISISDb($dbname) {
global $CONFIG, $DATABASES;

$this->wxis_host = $_SERVER['SERVER_NAME'];
$this->wxis_host = $_SERVER['HTTP_HOST'];
$this->dbname = $dbname;
$this->dbpath = $DATABASES[$dbname]['path'];
$this->wxis_action = $CONFIG['ENVIRONMENT']['CGI-BIN_DIRECTORY'] .
Expand Down
4 changes: 2 additions & 2 deletions htdocs/isis-oai-provider/oai.php
Expand Up @@ -24,10 +24,10 @@
"DateGranularity" => "DATE", // ??
"IDPrefix" => $CONFIG['INFORMATION']['IDPREFIX'],
"IDDomain" => $CONFIG['INFORMATION']['IDDOMAIN'],
"BaseURL" => "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'],
"BaseURL" => "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'],
);

$server = new OAIServer($repository_description, &$item_factory, TRUE, 0);
$server = new OAIServer($repository_description, $item_factory, TRUE, 0);

foreach ($METADATAFORMATS as $name => $format ){
$server->AddFormat($name, $format['TagName'], $format['SchemaNamespace'], $format['SchemaDefinition'], $format['SchemaVersion'], $format['NamespaceList'], null, array() );
Expand Down

0 comments on commit 82f2395

Please sign in to comment.