Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: [FIX] TYPO in function cleanSEF (1.5.31)  (Read 6168 times)

Athanasios Oikonomou

  • Newbie
  • *
  • Karma: 1
  • Posts: 12
    • http://www.klaus.gr
[FIX] TYPO in function cleanSEF (1.5.31)
« on: February 25, 2007, 02:46:23 AM »

In function cleanSEF there is a typo, actualy in line
Code: [Select]

str = str.replace(/[^a-zA-Z 0-9]+/g,'');
sould be
str = str.replace(/[^a-z 0-9]+/g,'');
why so?
because
Code: [Select]
var str = from.value.toLowerCase();since we call function toLowerCase there is no reason to check for capital letters A-Z.
Right?

My Cpu Circles back :P
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
[FIX] TYPO in function cleanSEF (1.5.31)
« Reply #1 on: February 25, 2007, 03:57:02 AM »

just to avoid confusion for some, this is in function js(), in this section
Quote
// generate SEF urls
   function genSEF(from,to) {
Logged
Of all the things I have lost, it is my mind that I miss the most.

brauck

  • Hero Member
  • *****
  • Karma: 18
  • Posts: 556
    • http://www.hbw-webdesign.nl/
[FIX] TYPO in function cleanSEF (1.5.31)
« Reply #2 on: February 25, 2007, 01:34:04 PM »

But is doesn't hurt either does it.  :)
Logged
Confidence is reduced complexity.
brauck.nl for free css templates

piXelatedEmpire

  • MIA
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
[FIX] TYPO in function cleanSEF (1.5.31)
« Reply #3 on: March 01, 2007, 12:52:48 AM »

nope doesn't hurt, but it's not needed so redundant.  Nice find athiok :)
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
[FIX] TYPO in function cleanSEF (1.5.31)
« Reply #4 on: March 01, 2007, 08:28:33 AM »

Quote from: brauck
But is doesn't hurt either does it.  :)
Well, it made a hell of a difference to my IE CPU usage... So yea, I think it did "hurt", hehe... In the sense that I was about to delete the whole snews.php and start remodding it due to it CPU usage... I couldn't find anything, but this did its thang...

A GREAT find, mate thanks...
Logged
"It's only dead fish that goes with the flow... "
Updated

piXelatedEmpire

  • MIA
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
[FIX] TYPO in function cleanSEF (1.5.31)
« Reply #5 on: March 01, 2007, 10:47:08 AM »

upon further investigation, I noticed my cpu performance increase as well due to this 'typo'; reccomend moving this to the patches/bugfixes forum for inclusion in 1.5.32 :)
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
[FIX] TYPO in function cleanSEF (1.5.31)
« Reply #6 on: March 01, 2007, 10:55:06 AM »

Moved from Bugs
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

brauck

  • Hero Member
  • *****
  • Karma: 18
  • Posts: 556
    • http://www.hbw-webdesign.nl/
[FIX] TYPO in function cleanSEF (1.5.31)
« Reply #7 on: March 02, 2007, 11:22:13 AM »

Quote from: Athoik
In function cleanSEF there is a typo, actualy in line ...
Doesn't this relate to the JS function genSEF($string) ?
Logged
Confidence is reduced complexity.
brauck.nl for free css templates