projects
/
banana.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix baseurl for images and javascript
[banana.git]
/
banana
/
page.inc.php
diff --git
a/banana/page.inc.php
b/banana/page.inc.php
index
78036a8
..
7d313ef
100644
(file)
--- a/
banana/page.inc.php
+++ b/
banana/page.inc.php
@@
-322,7
+322,7
@@
class BananaPage extends Smarty
}
$proto = empty($_SERVER['HTTPS']) ? 'http://' : 'https://';
}
$proto = empty($_SERVER['HTTPS']) ? 'http://' : 'https://';
- $host =
$_SERVER['HTTP_HOST
'];
+ $host =
Banana::$baseurl ? Banana::$baseurl : $_SERVER['SERVER_NAME
'];
$file = dirname($_SERVER['PHP_SELF']) . '/img/' . $img;
$url = $proto . $host . $file;
$file = dirname($_SERVER['PHP_SELF']) . '/img/' . $img;
$url = $proto . $host . $file;
@@
-344,7
+344,7
@@
class BananaPage extends Smarty
}
$proto = empty($_SERVER['HTTPS']) ? 'http://' : 'https://';
}
$proto = empty($_SERVER['HTTPS']) ? 'http://' : 'https://';
- $host =
$_SERVER['HTTP_HOST
'];
+ $host =
Banana::$baseurl ? Banana::$baseurl : $_SERVER['SERVER_NAME
'];
$file = dirname($_SERVER['PHP_SELF']) . '/javascript/' . $src . '.js';
$url = $proto . $host . $file;
$file = dirname($_SERVER['PHP_SELF']) . '/javascript/' . $src . '.js';
$url = $proto . $host . $file;