Comments (7)
I think it can be done by adding rtrim( ) function when searching for something.
This will remove the space at the end.
At line 569 - file: index.php
if (isset($search)) {
$search = rtrim($search); // this should remove it. I haven't tested it out.
$app->getLog()->debug("titlesSlice: search=".$search);
$tl = $bbs->titlesSlice($index,$globalSettings[PAGE_SIZE],$search);
from bicbucstriim.
Yes, you both are right. Trimming would help there. I'll add a trim to searches, so that both leading and trailing whitespace will be removed.
from bicbucstriim.
blowk, thank you. I've edited index.php as you have written it above. It failed to truncate my search term white space. Probably me doing something wrong though.
rvolz, much appreciated. I wouldn't call it a bug though. Just a user using autocomplete. Thanks for acknowledging.
from bicbucstriim.
Ok, then we make it an enhancement. If you need the feature urgently change line 571 in index.php from
$tl = $bbs->titlesSlice($index,$globalSettings[PAGE_SIZE],$search);
to
$tl = $bbs->titlesSlice($index,$globalSettings[PAGE_SIZE],trim($search));
That removes leading and trailing whitespace for me. Please note, that this would only change the book search. If you want more you would have to repeat the process for functions authorsSlice, tagsSlice and seriesSlice.
from bicbucstriim.
blowk, it was me doing something wrong. I edited the right line but tested incorrectly. Oh well, as I get older, my brain gets smaller.And thank you.
rvolz, Wow. What a gentleman you are also. I've edited titles, authors, tags and series (surprisingly easy to copy and paste - even for me) I've tested it on tags. It works great.
Many, many thanks to you, rvolz and blowk.
from bicbucstriim.
@Baldbloke, @blowk thx for testing this. I'll add the change to the repo soon.
from bicbucstriim.
no problem
from bicbucstriim.
Related Issues (20)
- Login page "Error Loading Page'😢 HOT 6
- DSM 7 and bicbumstrimm HOT 6
- disabled readfile() causing cover image display problems
- books containing .rtf file not listed HOT 8
- 500 error Nginx from Pi4 to Synology with DSM7 HOT 2
- [INFO] New DSM7 Package with new/custom Icon HOT 3
- Missing space character in the index_last30.html
- "Invalid file format" when attempting to install HOT 2
- #366 and #369 still present in debug (Function get_magic_quotes_gpc() is deprecated when logging in) HOT 1
- Entering wrong password does not inform user
- Stats and slices other than Books don't consider filtering HOT 2
- List of books in series cut off at book no. 30 HOT 2
- Errors using PHP 8.1 HOT 2
- Send to kindle should stop using .mobi HOT 1
- Add guidance surrounding update metadata option to install steps
- Spk package on SynoCommunity is defective
- Login on qnap not longer possible HOT 6
- An update to Synology DSM 7.2 reports an Error 502 HOT 2
- index.php not loading (blank screen) no error messages HOT 8
- Notice: End of life for PHP version HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bicbucstriim.