Revert "Merge branch 'cleanmaster' into modules"

This reverts commit d0ff5260f7, reversing
changes made to 67d0101dbe.
This commit is contained in:
Etienne Roudeix
2013-12-20 11:16:42 +01:00
parent d0ff5260f7
commit b3ac365b45
332 changed files with 3575 additions and 4787 deletions

View File

@@ -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;

View File

@@ -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, '.', '');
}

View File

@@ -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);
}
}
}