Revert "Merge branch 'cleanmaster' into modules"
This reverts commitd0ff5260f7, reversing changes made to67d0101dbe.
This commit is contained in:
@@ -37,6 +37,7 @@ use Thelia\Form\FolderDocumentModification;
|
||||
use Thelia\Form\FolderImageModification;
|
||||
use Thelia\Form\ProductDocumentModification;
|
||||
use Thelia\Form\ProductImageModification;
|
||||
use Thelia\Model\AdminLog;
|
||||
use Thelia\Model\CategoryDocument;
|
||||
use Thelia\Model\CategoryDocumentQuery;
|
||||
use Thelia\Model\CategoryImage;
|
||||
|
||||
@@ -43,14 +43,15 @@ class NumberFormat
|
||||
* Get a standard number, with '.' as decimal point and no thousands separator
|
||||
* so that this number can be used to perform calculations.
|
||||
*
|
||||
* @param float $number the number
|
||||
* @param float $number the number
|
||||
* @param string $decimals number of decimal figures
|
||||
*/
|
||||
public function formatStandardNumber($number, $decimals = null)
|
||||
{
|
||||
public function formatStandardNumber($number, $decimals = null) {
|
||||
|
||||
$lang = $this->request->getSession()->getLang();
|
||||
|
||||
if ($decimals == null) $decimals = $lang->getDecimals();
|
||||
|
||||
return number_format($number, $decimals, '.', '');
|
||||
}
|
||||
|
||||
|
||||
@@ -23,31 +23,32 @@
|
||||
|
||||
namespace Thelia\Tools;
|
||||
|
||||
|
||||
/**
|
||||
* Class Password
|
||||
* @package Thelia\Tools
|
||||
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||
*/
|
||||
class Password
|
||||
class Password
|
||||
{
|
||||
|
||||
private static function randgen($letter, $length)
|
||||
{
|
||||
private static function randgen($letter, $length) {
|
||||
|
||||
return substr(str_shuffle($letter), 0, $length);
|
||||
}
|
||||
|
||||
/**
|
||||
* generate a Random password with defined length
|
||||
*
|
||||
* @param int $length
|
||||
* @param int $length
|
||||
* @return mixed
|
||||
*/
|
||||
public static function generateRandom($length = 8)
|
||||
{
|
||||
public static function generateRandom($length = 8){
|
||||
|
||||
$letter = "abcdefghijklmnopqrstuvwxyz";
|
||||
$letter .= "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
$letter .= "0123456789";
|
||||
|
||||
return self::randgen($letter, $length);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user