2012-09-07 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_ui.php: fixed the ui_get_full_url function,
	because sometimes added two times the php script name.
	
	* operation/events/events_rss.php: avoid to lost the url with the
	actual fixes into the function ui_get_full_url.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6937 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2012-09-07 11:04:58 +00:00
parent 136772fc84
commit 92e1468724
3 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2012-09-07 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_ui.php: fixed the ui_get_full_url function,
because sometimes added two times the php script name.
* operation/events/events_rss.php: avoid to lost the url with the
actual fixes into the function ui_get_full_url.
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,

View File

@ -1936,7 +1936,7 @@ function ui_get_url_refresh ($params = false, $relative = true, $add_post = true
*
* @return string A full URL in Pandora.
*/
function ui_get_full_url ($url = '', $no_proxy = false) {
function ui_get_full_url ($url = '', $no_proxy = false, $add_name_php_file = false) {
global $config;
$port = null; // null means 'use the starndard port'
@ -2004,7 +2004,12 @@ function ui_get_full_url ($url = '', $no_proxy = false) {
$fullurl .= '/';
}
else {
$fullurl .= $_SERVER['SCRIPT_NAME'];
if ($add_name_php_file) {
$fullurl .= $_SERVER['SCRIPT_NAME'];
}
else {
$fullurl .= $config['homeurl'] . '/';
}
}
}

View File

@ -47,7 +47,7 @@ function rss_error_handler ($errno, $errstr, $errfile, $errline) {
global $config;
$url = ui_get_full_url(false);
$selfurl = ui_get_full_url('?' . $_SERVER['QUERY_STRING']);
$selfurl = ui_get_full_url('?' . $_SERVER['QUERY_STRING'], false, true);
$rss_feed = '<?xml version="1.0" encoding="utf-8" ?>'; //' Fixes certain highlighters freaking out on the PHP closing tag
$rss_feed .= '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">';
@ -202,7 +202,7 @@ switch ($config["dbtype"]) {
$result= db_get_all_rows_sql ($sql);
$url = ui_get_full_url(false);
$selfurl = ui_get_full_url('?' . $_SERVER['QUERY_STRING']);
$selfurl = ui_get_full_url('?' . $_SERVER['QUERY_STRING'], false, true);
if (empty ($result)) {
$lastbuild = 0; //Last build in 1970