Skip to content

Optimize php_self and use directly the already defined dir_ws_catalog #229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion catalog/admin/includes/application_top.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(($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');
Expand Down
2 changes: 1 addition & 1 deletion catalog/includes/application_top.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,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 = str_replace(DIR_WS_CATALOG, '', $req['path']);

// include the list of project filenames
require('includes/filenames.php');
Expand Down