[BUGFIX] Fix missing option labels in EXT:saltedpasswords ext config
authorTilo Baller <baller@cosmocode.de>
Sat, 10 Nov 2012 00:05:56 +0000 (01:05 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 13 Nov 2012 11:58:25 +0000 (12:58 +0100)
The labels for the options of the settings "Hashing method for the
backend|frontend" are missing because the class names of the
salt methods, which changed in previous commits, are part of the
language key for the labels.

Change the language key generation to use the class name without
the prepended namespace and add the corresponding language key in the
actual language file.

Fixes: #42832
Releases: 6.0

Change-Id: I1ae96bd90bf153f0379159e1695701ecf5f9f004
Reviewed-on: http://review.typo3.org/16369
Tested-by: Philipp Gampe
Reviewed-by: Philipp Gampe
Reviewed-by: Tilo Baller
Tested-by: Tilo Baller
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/saltedpasswords/Classes/Utility/ExtensionManagerConfigurationUtility.php
typo3/sysext/saltedpasswords/locallang.xlf

index 353ec2e..25c677c 100644 (file)
@@ -335,7 +335,7 @@ Please disable either one of them.';
                        $classInstance = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($reference, 'tx_');
                        if ($classInstance instanceof \TYPO3\CMS\Saltedpasswords\Salt\SaltInterface && $classInstance->isAvailable()) {
                                $sel = $this->extConf[$disposal]['saltedPWHashingMethod'] == $class ? ' selected="selected" ' : '';
-                               $label = 'ext.saltedpasswords.title.' . $class;
+                               $label = 'ext.saltedpasswords.title.' . strtolower(end(explode('\\', $class)));
                                $p_field .= '<option value="' . htmlspecialchars($class) . '"' . $sel . '>' . $GLOBALS['LANG']->getLL($label) . '</option>';
                        }
                }
index 8b32536..4fd18bb 100644 (file)
                        <trans-unit id="ext.saltedpasswords.title.tx_saltedpasswords_salts_blowfish" xml:space="preserve">
                                <source>Blowfish salted hashing (advanced)</source>
                        </trans-unit>
+                       <trans-unit id="ext.saltedpasswords.title.phpasssalt" xml:space="preserve">
+                               <source>Portable PHP password hashing (phpass)</source>
+                       </trans-unit>
+                       <trans-unit id="ext.saltedpasswords.title.md5salt" xml:space="preserve">
+                               <source>MD5 salted hashing (secure)</source>
+                       </trans-unit>
+                       <trans-unit id="ext.saltedpasswords.title.blowfishsalt" xml:space="preserve">
+                               <source>Blowfish salted hashing (advanced)</source>
+                       </trans-unit>
                        <trans-unit id="ext.saltedpasswords.tasks.bulkupdate.name" xml:space="preserve">
                                <source>Convert user passwords to salted hashes</source>
                        </trans-unit>