Skip to content

Remove leading slash from smwQueryUrl#30

Closed
Bovine-collab wants to merge 1 commit into
Open-CSP:mainfrom
Bovine-collab:main
Closed

Remove leading slash from smwQueryUrl#30
Bovine-collab wants to merge 1 commit into
Open-CSP:mainfrom
Bovine-collab:main

Conversation

@Bovine-collab

Copy link
Copy Markdown
Contributor

When 'wgScriptPath' is set, this already includes a leading slash. For instance, the default value is '/wiki'. With the old logic in place, this would result in calling '//index.php/Special:FlexForm' - which fails to load any result. Removing the leading slash fixes it.

When wgScriptPath is set, this already includes a leading slash. For instance, the default value is '/wiki'. With the old logic in place, this would result in calling '//index.php/Special:FlexForm'
@Designburo

Copy link
Copy Markdown
Collaborator

Hi! Thanks for this, however for us that is not the case ( we do not have a leading trailing slash). I'd rather have a ltrim for the "/". Something like $smwQueryUrl = "/" . ltrim( $wgScriptPath, '/' ) . '/index.php/Special:FlexForm';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants