Skip to content
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

Treat all filename extensions case-insensitive #206

Open
4 of 8 tasks
danielmarschall opened this issue Nov 13, 2023 · 3 comments
Open
4 of 8 tasks

Treat all filename extensions case-insensitive #206

danielmarschall opened this issue Nov 13, 2023 · 3 comments

Comments

@danielmarschall
Copy link
Contributor

danielmarschall commented Nov 13, 2023

As mentioned in #201 extensions extensions should be treated case insensitive.

I looked through the source code to find which configurable filename extensions there are, and if they are treated correctly.

Case $zipped

D:\GitHub\websvn\filedetails.php(74): if ($history && isset($zipped) && in_array($extn, $zipped) && $rep->hasReadAccess($path, false)) 
D:\GitHub\websvn\include\distconfig.php(266): // $zipped[] = '.dll';
  • Filename extensions already treated case-insensitively: Yes (because $extn is lowercase)
  • Mentioned in docs that extension configuration must be lower-case: (TODO)

Case $contentType

D:\GitHub\websvn\filedetails.php(88): // file, or from the $contentType array in setup.php.
D:\GitHub\websvn\filedetails.php(97): $setupContentType = @$contentType[$extn];
D:\GitHub\websvn\include\distconfig.php(298): // $contentType['.c'] = 'text/plain'; // Create a new association
D:\GitHub\websvn\include\distconfig.php(299): // $contentType['.doc'] = 'text/plain'; // Modify an existing one
D:\GitHub\websvn\include\distconfig.php(300): // unset($contentType['.m']); // Remove a default association
D:\GitHub\websvn\include\distconfig.php(304): // the file extension matches an entry in $contentType), you can choose to ignore
D:\GitHub\websvn\include\setup.php(60): $contentType = array(
  • Filename extensions already treated case-insensitively: Yes (because $extn is lowercase)
  • Mentioned in docs that extension configuration must be lower-case: (TODO)

Case $extEnscript

D:\GitHub\websvn\include\distconfig.php(394): // $extEnscript['.pas'] = 'pascal';
D:\GitHub\websvn\include\setup.php(191): $extEnscript = array(
D:\GitHub\websvn\include\svnlook.php(634): global $config, $extEnscript;
D:\GitHub\websvn\include\svnlook.php(640): if (array_key_exists($filename, $extEnscript)) {
D:\GitHub\websvn\include\svnlook.php(641): $lang = $extEnscript[$filename];
D:\GitHub\websvn\include\svnlook.php(642): } else if ($ext && array_key_exists($ext, $extEnscript)) {
D:\GitHub\websvn\include\svnlook.php(643): $lang = $extEnscript[$ext];

Case $extGeshi

D:\GitHub\websvn\include\distconfig.php(409): // $extGeshi['pascal'] = array('p', 'pas');
D:\GitHub\websvn\include\setup.php(263): $extGeshi = array(
D:\GitHub\websvn\include\svnlook.php(749): global $extGeshi;
D:\GitHub\websvn\include\svnlook.php(755): foreach ($extGeshi as $language => $extensions) {
danielmarschall added a commit to danielmarschall/websvn that referenced this issue Nov 13, 2023
@michael-o
Copy link
Member

Thanks for the overview..now docs need to be fixed.

@danielmarschall
Copy link
Contributor Author

danielmarschall commented Dec 18, 2023

@michael-o Thank you very much for mentioning me in the changelog :-) Much appreciated.
I am sorry, I totally forgot about the docs. Will post a PR soon.

In your release description you accidentally wrote 2.8.2 instead of 2.8.3

@michael-o
Copy link
Member

@michael-o Thank you very much for mentioning me in the changelog :-) Much appreciated.

Credits are well deserved!

I am sorry, I totally forgot about the docs. Will post a PR soon.

No need to excuse, take your time!

In your release description you accidentally wrote 2.8.2 instead of 2.8.3

Thanks, fixed.

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

No branches or pull requests

2 participants