Revert "Revert "Merge branch 'cleanmaster' into modules""
This reverts commit b3ac365b45.
Conflicts:
Readme.md
core/lib/Thelia/Controller/Admin/AbstractCrudController.php
core/lib/Thelia/Core/Template/Assets/AssetManagerInterface.php
core/lib/Thelia/Core/Template/Assets/AsseticAssetManager.php
core/lib/Thelia/Core/Template/Smarty/SmartyParser.php
core/lib/Thelia/Core/Template/TemplateDefinition.php
core/lib/Thelia/Model/Base/Coupon.php
core/lib/Thelia/Model/Base/CouponQuery.php
core/lib/Thelia/Model/Base/CouponVersion.php
core/lib/Thelia/Model/Base/CouponVersionQuery.php
core/lib/Thelia/Model/Base/OrderCouponQuery.php
This commit is contained in:
@@ -37,7 +37,6 @@ 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,15 +43,14 @@ 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,32 +23,31 @@
|
||||
|
||||
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