/trunk/includes/classes/OIDplusGui.class.php |
---|
326,7 → 326,7 |
$out .= htmlentities($page_title_2).'</h1>'; |
$out .= '<div id="real_content">'.$static_content.'</div>'; |
if ((!isset($_SERVER['REQUEST_METHOD'])) || ($_SERVER['REQUEST_METHOD'] == 'GET')) { |
$out .= '<br><p><img src="img/share.png" width="15" height="15" alt="'._L('Share').'"> <a href="?goto='.htmlentities($static_node_id).'" id="static_link" class="gray_footer_font">'._L('Static link to this page').'</a>'; |
$out .= '<br><p><img src="img/share.png" width="15" height="15" alt="'._L('Share').'"> <a href="'.htmlentities(OIDplus::canonicalUrl($static_node_id)).'" id="static_link" class="gray_footer_font">'._L('Static link to this page').'</a>'; |
$out .= '</p>'; |
} |
$out .= '<br>'; |
/trunk/includes/oidplus_base.js |
---|
192,7 → 192,7 |
$('#real_title').html(" "); |
$('#real_content').html(_L("Loading...")); |
$('#static_link').attr("href", "index.php?goto="+encodeURIComponent(id)); |
$('#static_link').attr("href", oidplus_webpath_absolute_canonical+"?goto="+encodeURIComponent(id)); |
$("#gotoedit").val(id); |
// Normal opening of a description |
228,7 → 228,7 |
"node_id":id, |
"titleHTML":(data.icon ? '<img src="'+data.icon+'" width="48" height="48" alt="'+data.title.htmlentities()+'"> ' : '') + data.title.htmlentities(), |
"textHTML":data.text, |
"staticlinkHREF":"index.php?goto="+encodeURIComponent(id), |
"staticlinkHREF":oidplus_webpath_absolute_canonical+"?goto="+encodeURIComponent(id), |
}; |
if (current_node != id) { |
window.history.pushState(state, data.title, "?goto="+encodeURIComponent(id)); |
369,7 → 369,7 |
"node_id":goto, |
"titleHTML":$('#real_title').html(), |
"textHTML":$('#real_content').html(), |
"staticlinkHREF":"index.php?goto="+encodeURIComponent(goto), |
"staticlinkHREF":oidplus_webpath_absolute_canonical+"?goto="+encodeURIComponent(goto), |
}, $('#real_title').html(), "?goto="+encodeURIComponent(goto)); |
if (goto != null) data.instance.select_node([goto]); |
504,7 → 504,7 |
} |
function setLanguage(lngid) { |
setCookie('LANGUAGE', lngid, 0/*Until browser closes*/, oidplus_webpath); |
setCookie('LANGUAGE', lngid, 0/*Until browser closes*/, oidplus_webpath_relative); |
if (current_node == "") return false; // Happens for Setup. Open URL instead. |
/trunk/oidplus.min.js.php |
---|
69,7 → 69,8 |
//$files[] = 'var language_tblprefix = '.json_encode($tbl_prefix).';'; |
$files[] = 'var language_tblprefix = "<tableprefix>";'; // hide TABLENAME_PREFIX from the client |
$files[] = 'var oidplus_webpath = '.js_escape(OIDplus::webpath(null, OIDplus::PATH_RELATIVE_TO_ROOT)).';'; |
$files[] = 'var oidplus_webpath_relative = '.js_escape(OIDplus::webpath(null, OIDplus::PATH_RELATIVE_TO_ROOT)).';'; |
$files[] = 'var oidplus_webpath_absolute_canonical = '.js_escape(OIDplus::webpath(null, OIDplus::PATH_ABSOLUTE_CANONICAL)).';'; |
// The CSRF token is set by index.php |
// TODO: can there race-conditions if we set csrf_token here? Or should we set it as inline-script in index.php ? |
/trunk/setup/includes/setup_base.js |
---|
239,7 → 239,7 |
} else { |
console.log("JS SSL detection result: "+xhr.status); |
$("#enforce_ssl").val('OIDplus::ENFORCE_SSL_NO'); // disable SSL (because it failed, e.g. because of invalid cert or closed port) |
setCookie('SSL_CHECK', 0, 0/*Until browser closes*/, oidplus_webpath); // we must revert the SSL_CHECK=1 the PHP script did set (see explanation in OIDplus.class.php:isSslAvailable) |
setCookie('SSL_CHECK', 0, 0/*Until browser closes*/, oidplus_webpath_relative); // we must revert the SSL_CHECK=1 the PHP script did set (see explanation in OIDplus.class.php:isSslAvailable) |
} |
} |
}; |