aboutsummaryrefslogtreecommitdiffstats
path: root/include/plugin.php
diff options
context:
space:
mode:
authorroyalterra <royalterra@users.noreply.github.com>2015-12-11 09:39:01 +0000
committerroyalterra <royalterra@users.noreply.github.com>2015-12-11 09:39:01 +0000
commit4ff31d0a4140d923cbb8ddbe18ccf578a367375f (patch)
tree1f63d4b042c3dbf7bfe2c3e74f0a24ef2e5f94ec /include/plugin.php
parentb92cc852d142940f0f8dd78ddf7be835dc8b9e07 (diff)
parentf73c82632f213ac7971b54220b4a0c87d354ca1e (diff)
downloadvolse-hubzilla-4ff31d0a4140d923cbb8ddbe18ccf578a367375f.tar.gz
volse-hubzilla-4ff31d0a4140d923cbb8ddbe18ccf578a367375f.tar.bz2
volse-hubzilla-4ff31d0a4140d923cbb8ddbe18ccf578a367375f.zip
Merge pull request #1 from redmatrix/master
merge branches
Diffstat (limited to 'include/plugin.php')
-rwxr-xr-xinclude/plugin.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 8749f3fbf..1f4d60736 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -495,6 +495,15 @@ function format_css_if_exists($source) {
return '<link rel="stylesheet" href="' . script_path() . '/' . $path . '" type="text/css" media="' . $source[1] . '">' . "\r\n";
}
+/*
+ * This basically calculates the baseurl. We have other functions to do that, but
+ * there was an issue with script paths and mixed-content whose details are arcane
+ * and perhaps lost in the message archives. The short answer is that we're ignoring
+ * the URL which we are "supposed" to use, and generating script paths relative to
+ * the URL which we are currently using; in order to ensure they are found and aren't
+ * blocked due to mixed content issues.
+ */
+
function script_path() {
if(x($_SERVER,'HTTPS') && $_SERVER['HTTPS'])
$scheme = 'https';
@@ -616,3 +625,14 @@ function get_markup_template($s, $root = '') {
$template = $t->get_markup_template($s, $root);
return $template;
}
+
+// return the standardised version. Since we can't easily compare
+// before the STD_VERSION definition was applied, we have to treat
+// all prior release versions the same. You can dig through them
+// with other means (such as RED_VERSION) if necessary.
+
+function get_std_version() {
+ if(defined('STD_VERSION'))
+ return STD_VERSION;
+ return '0.0.0';
+}