From 02d49feb3db61244c697581ec159bd0ef42ff5e9 Mon Sep 17 00:00:00 2001 From: acidvertigo Date: Tue, 9 Sep 2014 09:49:30 +0200 Subject: [PATCH 01/12] Use directly the already defined dir_ws_catalog for php self --- catalog/includes/application_top.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/includes/application_top.php b/catalog/includes/application_top.php index 8a420e6e6..2117dc3dc 100644 --- a/catalog/includes/application_top.php +++ b/catalog/includes/application_top.php @@ -49,7 +49,7 @@ // set php_self in the local scope $req = parse_url($_SERVER['SCRIPT_NAME']); - $PHP_SELF = substr($req['path'], ($request_type == 'NONSSL') ? strlen(DIR_WS_HTTP_CATALOG) : strlen(DIR_WS_HTTPS_CATALOG)); + $PHP_SELF = substr($req['path'], strlen(DIR_WS_CATALOG)); // include the list of project filenames require('includes/filenames.php'); From ebf2012f2a8481243eb6e4aee43e7953dfa7c229 Mon Sep 17 00:00:00 2001 From: acidvertigo Date: Tue, 9 Sep 2014 15:25:58 +0200 Subject: [PATCH 02/12] Use str_replace instead of substr and strlen to remove the catalog path from $_SERVER['SCRIPT_NAME'] --- catalog/includes/application_top.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/includes/application_top.php b/catalog/includes/application_top.php index 2117dc3dc..cf5187276 100644 --- a/catalog/includes/application_top.php +++ b/catalog/includes/application_top.php @@ -49,7 +49,7 @@ // set php_self in the local scope $req = parse_url($_SERVER['SCRIPT_NAME']); - $PHP_SELF = substr($req['path'], strlen(DIR_WS_CATALOG)); + $PHP_SELF = str_replace(DIR_WS_CATALOG, '', $req['path']); // include the list of project filenames require('includes/filenames.php'); From 419462a62ffdbb8db5f518b4f6af45db45bef41c Mon Sep 17 00:00:00 2001 From: acidvertigo Date: Tue, 9 Sep 2014 15:40:29 +0200 Subject: [PATCH 03/12] Optimize php_self admin side --- catalog/admin/includes/application_top.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/admin/includes/application_top.php b/catalog/admin/includes/application_top.php index d8b0960cd..f0062f12e 100644 --- a/catalog/admin/includes/application_top.php +++ b/catalog/admin/includes/application_top.php @@ -40,7 +40,7 @@ // set php_self in the local scope $req = parse_url($HTTP_SERVER_VARS['SCRIPT_NAME']); - $PHP_SELF = substr($req['path'], ($request_type == 'SSL') ? strlen(DIR_WS_HTTPS_ADMIN) : strlen(DIR_WS_ADMIN)); + $PHP_SELF = $PHP_SELF = str_replace(($request_type == 'SSL') ? DIR_WS_HTTPS_ADMIN : DIR_WS_ADMIN, '', $req['path']); // Used in the "Backup Manager" to compress backups define('LOCAL_EXE_GZIP', 'gzip'); From c1a7fd163d69897f62c954611febc149af899b3a Mon Sep 17 00:00:00 2001 From: acidvertigo Date: Tue, 9 Sep 2014 20:39:27 +0200 Subject: [PATCH 04/12] Fix typo --- catalog/admin/includes/application_top.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/admin/includes/application_top.php b/catalog/admin/includes/application_top.php index f0062f12e..69d002d33 100644 --- a/catalog/admin/includes/application_top.php +++ b/catalog/admin/includes/application_top.php @@ -40,7 +40,7 @@ // set php_self in the local scope $req = parse_url($HTTP_SERVER_VARS['SCRIPT_NAME']); - $PHP_SELF = $PHP_SELF = str_replace(($request_type == 'SSL') ? DIR_WS_HTTPS_ADMIN : DIR_WS_ADMIN, '', $req['path']); + $PHP_SELF = str_replace(($request_type == 'SSL') ? DIR_WS_HTTPS_ADMIN : DIR_WS_ADMIN, '', $req['path']); // Used in the "Backup Manager" to compress backups define('LOCAL_EXE_GZIP', 'gzip'); From a4efff9781ac8cce3f72e2e0dc9987dc9d3a5b52 Mon Sep 17 00:00:00 2001 From: acidvertigo Date: Tue, 9 Sep 2014 20:40:21 +0200 Subject: [PATCH 05/12] Remove extra space --- catalog/admin/includes/application_top.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/admin/includes/application_top.php b/catalog/admin/includes/application_top.php index 69d002d33..4aee75bcd 100644 --- a/catalog/admin/includes/application_top.php +++ b/catalog/admin/includes/application_top.php @@ -40,7 +40,7 @@ // set php_self in the local scope $req = parse_url($HTTP_SERVER_VARS['SCRIPT_NAME']); - $PHP_SELF = str_replace(($request_type == 'SSL') ? DIR_WS_HTTPS_ADMIN : DIR_WS_ADMIN, '', $req['path']); + $PHP_SELF = str_replace(($request_type == 'SSL') ? DIR_WS_HTTPS_ADMIN : DIR_WS_ADMIN, '', $req['path']); // Used in the "Backup Manager" to compress backups define('LOCAL_EXE_GZIP', 'gzip'); From e4ec5cc8a339e9ec5f3b60148d31736f5ad0aa3a Mon Sep 17 00:00:00 2001 From: Luca Date: Mon, 3 Nov 2014 19:59:47 +0100 Subject: [PATCH 06/12] revert commit --- catalog/admin/includes/application_top.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/admin/includes/application_top.php b/catalog/admin/includes/application_top.php index 4aee75bcd..d8b0960cd 100644 --- a/catalog/admin/includes/application_top.php +++ b/catalog/admin/includes/application_top.php @@ -40,7 +40,7 @@ // set php_self in the local scope $req = parse_url($HTTP_SERVER_VARS['SCRIPT_NAME']); - $PHP_SELF = str_replace(($request_type == 'SSL') ? DIR_WS_HTTPS_ADMIN : DIR_WS_ADMIN, '', $req['path']); + $PHP_SELF = substr($req['path'], ($request_type == 'SSL') ? strlen(DIR_WS_HTTPS_ADMIN) : strlen(DIR_WS_ADMIN)); // Used in the "Backup Manager" to compress backups define('LOCAL_EXE_GZIP', 'gzip'); From 1ef4035223b57a7485f8d43b0ae3be779ef2226d Mon Sep 17 00:00:00 2001 From: Luca Date: Mon, 3 Nov 2014 20:08:24 +0100 Subject: [PATCH 07/12] reapply commit --- catalog/admin/includes/application_top.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/admin/includes/application_top.php b/catalog/admin/includes/application_top.php index c3e838d1b..c9dd85514 100644 --- a/catalog/admin/includes/application_top.php +++ b/catalog/admin/includes/application_top.php @@ -40,7 +40,7 @@ // set php_self in the local scope $req = parse_url($_SERVER['SCRIPT_NAME']); - $PHP_SELF = substr($req['path'], ($request_type == 'SSL') ? strlen(DIR_WS_HTTPS_ADMIN) : strlen(DIR_WS_ADMIN)); + $PHP_SELF = str_replace(DIR_WS_CATALOG, '', $req['path']); // Used in the "Backup Manager" to compress backups define('LOCAL_EXE_GZIP', 'gzip'); From 23ab23a6387c6f46734deca209c5c593fd62090c Mon Sep 17 00:00:00 2001 From: Luca Date: Mon, 3 Nov 2014 20:12:31 +0100 Subject: [PATCH 08/12] applyng right commit --- catalog/includes/application_top.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/includes/application_top.php b/catalog/includes/application_top.php index 8f3c8cb02..8684b2638 100644 --- a/catalog/includes/application_top.php +++ b/catalog/includes/application_top.php @@ -50,7 +50,7 @@ // set php_self in the local scope $req = parse_url($_SERVER['SCRIPT_NAME']); - $PHP_SELF = str_replace(DIR_WS_CATALOG, '', $req['path']); + $PHP_SELF = str_replace(($request_type == 'SSL') ? DIR_WS_HTTPS_ADMIN : DIR_WS_ADMIN, '', $req['path']); // include the list of project filenames require('includes/filenames.php'); From 3881e2cb7148194489d684fdaffc3330a5026029 Mon Sep 17 00:00:00 2001 From: Luca Date: Mon, 3 Nov 2014 20:14:08 +0100 Subject: [PATCH 09/12] fix wrong commit --- catalog/includes/application_top.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/includes/application_top.php b/catalog/includes/application_top.php index 8684b2638..8f3c8cb02 100644 --- a/catalog/includes/application_top.php +++ b/catalog/includes/application_top.php @@ -50,7 +50,7 @@ // set php_self in the local scope $req = parse_url($_SERVER['SCRIPT_NAME']); - $PHP_SELF = str_replace(($request_type == 'SSL') ? DIR_WS_HTTPS_ADMIN : DIR_WS_ADMIN, '', $req['path']); + $PHP_SELF = str_replace(DIR_WS_CATALOG, '', $req['path']); // include the list of project filenames require('includes/filenames.php'); From 7ec04ee70adadf760e001a842c620c99aa96b7b6 Mon Sep 17 00:00:00 2001 From: Luca Date: Mon, 3 Nov 2014 20:14:41 +0100 Subject: [PATCH 10/12] fix wrong commit --- catalog/admin/includes/application_top.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/admin/includes/application_top.php b/catalog/admin/includes/application_top.php index c9dd85514..443f2095b 100644 --- a/catalog/admin/includes/application_top.php +++ b/catalog/admin/includes/application_top.php @@ -40,7 +40,7 @@ // set php_self in the local scope $req = parse_url($_SERVER['SCRIPT_NAME']); - $PHP_SELF = str_replace(DIR_WS_CATALOG, '', $req['path']); + $PHP_SELF = str_replace(($request_type == 'SSL') ? DIR_WS_HTTPS_ADMIN : DIR_WS_ADMIN, '', $req['path']); // Used in the "Backup Manager" to compress backups define('LOCAL_EXE_GZIP', 'gzip'); From 20cb9302e6f85534666165304b95118db60aa7aa Mon Sep 17 00:00:00 2001 From: Luca Date: Thu, 6 Nov 2014 21:37:22 +0100 Subject: [PATCH 11/12] Fix php self catalog side --- catalog/includes/application_top.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/includes/application_top.php b/catalog/includes/application_top.php index 8f3c8cb02..c440cd22f 100644 --- a/catalog/includes/application_top.php +++ b/catalog/includes/application_top.php @@ -50,7 +50,7 @@ // set php_self in the local scope $req = parse_url($_SERVER['SCRIPT_NAME']); - $PHP_SELF = str_replace(DIR_WS_CATALOG, '', $req['path']); + $PHP_SELF = str_replace(($request_type == 'SSL') ? DIR_WS_HTTPS_CATALOG : DIR_WS_HTTP_CATALOG, '', $req['path']); // include the list of project filenames require('includes/filenames.php'); From d9c9fd5f65197f2d01d4230b1244079c04efd616 Mon Sep 17 00:00:00 2001 From: Luca Date: Thu, 6 Nov 2014 21:41:11 +0100 Subject: [PATCH 12/12] Revert latest commit --- catalog/includes/application_top.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/includes/application_top.php b/catalog/includes/application_top.php index c440cd22f..8f3c8cb02 100644 --- a/catalog/includes/application_top.php +++ b/catalog/includes/application_top.php @@ -50,7 +50,7 @@ // set php_self in the local scope $req = parse_url($_SERVER['SCRIPT_NAME']); - $PHP_SELF = str_replace(($request_type == 'SSL') ? DIR_WS_HTTPS_CATALOG : DIR_WS_HTTP_CATALOG, '', $req['path']); + $PHP_SELF = str_replace(DIR_WS_CATALOG, '', $req['path']); // include the list of project filenames require('includes/filenames.php');