Skip to main content
Topic: Strtolower in ManageFeatures.controller.php (Read 1431 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Strtolower in ManageFeatures.controller.php

Forum-Version: ElkArte 1.0.4 and 1.1

In the German language will be written "Posts" with small letters in the settings Karma and Likes (1.1). This is not an error in the German language files.  This is due to the property "strtolower".  This property would in my opinion be removed. Please look here => http://support.elkarte-hilfe.de/index.php/topic,141.0.html

sources/admin/ManageFeatures.controller.php
1.0.4
line 1232
Code: [Select]
                    $colname = $initial_colname = 'cust_' . strtolower($matches[1]);
line 1598
Code: [Select]
				array('int', 'likeMinPosts', 6, 'postinput' => strtolower($txt['posts'])),


1.1

line 1059
Code: [Select]
					$colname = $initial_colname = 'cust_' . strtolower($matches[1]);
line 1386
Code: [Select]
				array('int', 'karmaMinPosts', 6, 'postinput' => strtolower($txt['posts'])),
line 11422
Code: [Select]
				array('int', 'likeMinPosts', 6, 'postinput' => strtolower($txt['posts'])),
Regards Stephan

Give the terrorism no chance

Re: Strtolower in ManageFeatures.controller.php

Reply #1
I don't see how
Code: [Select]
$colname = $initial_colname = 'cust_' . strtolower($matches[1]);
can possibly be causing that.

You are right on lines 1386 and 11422 though. They are lowercase to save a string in the language file, but if it doesn't work in a language, it should be changed to something like "posts_lower" and the language file needs to have a comment explaining why.

Re: Strtolower in ManageFeatures.controller.php

Reply #2
Did everything listed where strtolower be found. The respective first in the line are not relevant.
Regards Stephan

Give the terrorism no chance

Re: Strtolower in ManageFeatures.controller.php

Reply #3
Yep, it's the 'postinput' bit.
But... honestly, does it make sense to have that 'postinput' thingy? Wouldn't be better to have the "unit of measure" in the description of the setting?
Bugs creator.
Features destroyer.
Template killer.

Re: Strtolower in ManageFeatures.controller.php

Reply #4
Will there give be a change to the upcoming next version?
Regards Stephan

Give the terrorism no chance

Re: Strtolower in ManageFeatures.controller.php

Reply #5
I can't see why not. ;) (Apart losing track of it of course. LOL)
Remove the strtolower shouldn't be a problem.
Bugs creator.
Features destroyer.
Template killer.

Re: Strtolower in ManageFeatures.controller.php

Reply #6
I guess that instead of strtolower($txt['posts']) we can use $txt['manageposts_posts'], that is a lowercase version and each language can deal with it separately. And is the same used in other places since years.
Bugs creator.
Features destroyer.
Template killer.

Re: Strtolower in ManageFeatures.controller.php

Reply #7
That's a very good solution :)
Regards Stephan

Give the terrorism no chance