diff --git a/core/lib/Thelia/Model/Base/Lang.php b/core/lib/Thelia/Model/Base/Lang.php
index 293b0f3a7..1c11103af 100755
--- a/core/lib/Thelia/Model/Base/Lang.php
+++ b/core/lib/Thelia/Model/Base/Lang.php
@@ -85,10 +85,40 @@ abstract class Lang implements ActiveRecordInterface
protected $url;
/**
- * The value for the position field.
- * @var int
+ * The value for the date_format field.
+ * @var string
*/
- protected $position;
+ protected $date_format;
+
+ /**
+ * The value for the time_format field.
+ * @var string
+ */
+ protected $time_format;
+
+ /**
+ * The value for the datetime_format field.
+ * @var string
+ */
+ protected $datetime_format;
+
+ /**
+ * The value for the decimal_separator field.
+ * @var string
+ */
+ protected $decimal_separator;
+
+ /**
+ * The value for the thousands_separator field.
+ * @var string
+ */
+ protected $thousands_separator;
+
+ /**
+ * The value for the decimals field.
+ * @var string
+ */
+ protected $decimals;
/**
* The value for the by_default field.
@@ -96,6 +126,12 @@ abstract class Lang implements ActiveRecordInterface
*/
protected $by_default;
+ /**
+ * The value for the position field.
+ * @var int
+ */
+ protected $position;
+
/**
* The value for the created_at field.
* @var string
@@ -426,14 +462,69 @@ abstract class Lang implements ActiveRecordInterface
}
/**
- * Get the [position] column value.
+ * Get the [date_format] column value.
*
- * @return int
+ * @return string
*/
- public function getPosition()
+ public function getDateFormat()
{
- return $this->position;
+ return $this->date_format;
+ }
+
+ /**
+ * Get the [time_format] column value.
+ *
+ * @return string
+ */
+ public function getTimeFormat()
+ {
+
+ return $this->time_format;
+ }
+
+ /**
+ * Get the [datetime_format] column value.
+ *
+ * @return string
+ */
+ public function getDatetimeFormat()
+ {
+
+ return $this->datetime_format;
+ }
+
+ /**
+ * Get the [decimal_separator] column value.
+ *
+ * @return string
+ */
+ public function getDecimalSeparator()
+ {
+
+ return $this->decimal_separator;
+ }
+
+ /**
+ * Get the [thousands_separator] column value.
+ *
+ * @return string
+ */
+ public function getThousandsSeparator()
+ {
+
+ return $this->thousands_separator;
+ }
+
+ /**
+ * Get the [decimals] column value.
+ *
+ * @return string
+ */
+ public function getDecimals()
+ {
+
+ return $this->decimals;
}
/**
@@ -447,6 +538,17 @@ abstract class Lang implements ActiveRecordInterface
return $this->by_default;
}
+ /**
+ * Get the [position] column value.
+ *
+ * @return int
+ */
+ public function getPosition()
+ {
+
+ return $this->position;
+ }
+
/**
* Get the [optionally formatted] temporal [created_at] column value.
*
@@ -593,25 +695,130 @@ abstract class Lang implements ActiveRecordInterface
} // setUrl()
/**
- * Set the value of [position] column.
+ * Set the value of [date_format] column.
*
- * @param int $v new value
+ * @param string $v new value
* @return \Thelia\Model\Lang The current object (for fluent API support)
*/
- public function setPosition($v)
+ public function setDateFormat($v)
{
if ($v !== null) {
- $v = (int) $v;
+ $v = (string) $v;
}
- if ($this->position !== $v) {
- $this->position = $v;
- $this->modifiedColumns[] = LangTableMap::POSITION;
+ if ($this->date_format !== $v) {
+ $this->date_format = $v;
+ $this->modifiedColumns[] = LangTableMap::DATE_FORMAT;
}
return $this;
- } // setPosition()
+ } // setDateFormat()
+
+ /**
+ * Set the value of [time_format] column.
+ *
+ * @param string $v new value
+ * @return \Thelia\Model\Lang The current object (for fluent API support)
+ */
+ public function setTimeFormat($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->time_format !== $v) {
+ $this->time_format = $v;
+ $this->modifiedColumns[] = LangTableMap::TIME_FORMAT;
+ }
+
+
+ return $this;
+ } // setTimeFormat()
+
+ /**
+ * Set the value of [datetime_format] column.
+ *
+ * @param string $v new value
+ * @return \Thelia\Model\Lang The current object (for fluent API support)
+ */
+ public function setDatetimeFormat($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->datetime_format !== $v) {
+ $this->datetime_format = $v;
+ $this->modifiedColumns[] = LangTableMap::DATETIME_FORMAT;
+ }
+
+
+ return $this;
+ } // setDatetimeFormat()
+
+ /**
+ * Set the value of [decimal_separator] column.
+ *
+ * @param string $v new value
+ * @return \Thelia\Model\Lang The current object (for fluent API support)
+ */
+ public function setDecimalSeparator($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->decimal_separator !== $v) {
+ $this->decimal_separator = $v;
+ $this->modifiedColumns[] = LangTableMap::DECIMAL_SEPARATOR;
+ }
+
+
+ return $this;
+ } // setDecimalSeparator()
+
+ /**
+ * Set the value of [thousands_separator] column.
+ *
+ * @param string $v new value
+ * @return \Thelia\Model\Lang The current object (for fluent API support)
+ */
+ public function setThousandsSeparator($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->thousands_separator !== $v) {
+ $this->thousands_separator = $v;
+ $this->modifiedColumns[] = LangTableMap::THOUSANDS_SEPARATOR;
+ }
+
+
+ return $this;
+ } // setThousandsSeparator()
+
+ /**
+ * Set the value of [decimals] column.
+ *
+ * @param string $v new value
+ * @return \Thelia\Model\Lang The current object (for fluent API support)
+ */
+ public function setDecimals($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->decimals !== $v) {
+ $this->decimals = $v;
+ $this->modifiedColumns[] = LangTableMap::DECIMALS;
+ }
+
+
+ return $this;
+ } // setDecimals()
/**
* Set the value of [by_default] column.
@@ -634,6 +841,27 @@ abstract class Lang implements ActiveRecordInterface
return $this;
} // setByDefault()
+ /**
+ * Set the value of [position] column.
+ *
+ * @param int $v new value
+ * @return \Thelia\Model\Lang The current object (for fluent API support)
+ */
+ public function setPosition($v)
+ {
+ if ($v !== null) {
+ $v = (int) $v;
+ }
+
+ if ($this->position !== $v) {
+ $this->position = $v;
+ $this->modifiedColumns[] = LangTableMap::POSITION;
+ }
+
+
+ return $this;
+ } // setPosition()
+
/**
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
*
@@ -728,19 +956,37 @@ abstract class Lang implements ActiveRecordInterface
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : LangTableMap::translateFieldName('Url', TableMap::TYPE_PHPNAME, $indexType)];
$this->url = (null !== $col) ? (string) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : LangTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
- $this->position = (null !== $col) ? (int) $col : null;
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : LangTableMap::translateFieldName('DateFormat', TableMap::TYPE_PHPNAME, $indexType)];
+ $this->date_format = (null !== $col) ? (string) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : LangTableMap::translateFieldName('ByDefault', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : LangTableMap::translateFieldName('TimeFormat', TableMap::TYPE_PHPNAME, $indexType)];
+ $this->time_format = (null !== $col) ? (string) $col : null;
+
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : LangTableMap::translateFieldName('DatetimeFormat', TableMap::TYPE_PHPNAME, $indexType)];
+ $this->datetime_format = (null !== $col) ? (string) $col : null;
+
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : LangTableMap::translateFieldName('DecimalSeparator', TableMap::TYPE_PHPNAME, $indexType)];
+ $this->decimal_separator = (null !== $col) ? (string) $col : null;
+
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : LangTableMap::translateFieldName('ThousandsSeparator', TableMap::TYPE_PHPNAME, $indexType)];
+ $this->thousands_separator = (null !== $col) ? (string) $col : null;
+
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : LangTableMap::translateFieldName('Decimals', TableMap::TYPE_PHPNAME, $indexType)];
+ $this->decimals = (null !== $col) ? (string) $col : null;
+
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : LangTableMap::translateFieldName('ByDefault', TableMap::TYPE_PHPNAME, $indexType)];
$this->by_default = (null !== $col) ? (int) $col : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : LangTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : LangTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
+ $this->position = (null !== $col) ? (int) $col : null;
+
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : LangTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') {
$col = null;
}
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
- $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : LangTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
+ $col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : LangTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') {
$col = null;
}
@@ -753,7 +999,7 @@ abstract class Lang implements ActiveRecordInterface
$this->ensureConsistency();
}
- return $startcol + 9; // 9 = LangTableMap::NUM_HYDRATE_COLUMNS.
+ return $startcol + 15; // 15 = LangTableMap::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
throw new PropelException("Error populating \Thelia\Model\Lang object", 0, $e);
@@ -988,12 +1234,30 @@ abstract class Lang implements ActiveRecordInterface
if ($this->isColumnModified(LangTableMap::URL)) {
$modifiedColumns[':p' . $index++] = 'URL';
}
- if ($this->isColumnModified(LangTableMap::POSITION)) {
- $modifiedColumns[':p' . $index++] = 'POSITION';
+ if ($this->isColumnModified(LangTableMap::DATE_FORMAT)) {
+ $modifiedColumns[':p' . $index++] = 'DATE_FORMAT';
+ }
+ if ($this->isColumnModified(LangTableMap::TIME_FORMAT)) {
+ $modifiedColumns[':p' . $index++] = 'TIME_FORMAT';
+ }
+ if ($this->isColumnModified(LangTableMap::DATETIME_FORMAT)) {
+ $modifiedColumns[':p' . $index++] = 'DATETIME_FORMAT';
+ }
+ if ($this->isColumnModified(LangTableMap::DECIMAL_SEPARATOR)) {
+ $modifiedColumns[':p' . $index++] = 'DECIMAL_SEPARATOR';
+ }
+ if ($this->isColumnModified(LangTableMap::THOUSANDS_SEPARATOR)) {
+ $modifiedColumns[':p' . $index++] = 'THOUSANDS_SEPARATOR';
+ }
+ if ($this->isColumnModified(LangTableMap::DECIMALS)) {
+ $modifiedColumns[':p' . $index++] = 'DECIMALS';
}
if ($this->isColumnModified(LangTableMap::BY_DEFAULT)) {
$modifiedColumns[':p' . $index++] = 'BY_DEFAULT';
}
+ if ($this->isColumnModified(LangTableMap::POSITION)) {
+ $modifiedColumns[':p' . $index++] = 'POSITION';
+ }
if ($this->isColumnModified(LangTableMap::CREATED_AT)) {
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
}
@@ -1026,12 +1290,30 @@ abstract class Lang implements ActiveRecordInterface
case 'URL':
$stmt->bindValue($identifier, $this->url, PDO::PARAM_STR);
break;
- case 'POSITION':
- $stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
+ case 'DATE_FORMAT':
+ $stmt->bindValue($identifier, $this->date_format, PDO::PARAM_STR);
+ break;
+ case 'TIME_FORMAT':
+ $stmt->bindValue($identifier, $this->time_format, PDO::PARAM_STR);
+ break;
+ case 'DATETIME_FORMAT':
+ $stmt->bindValue($identifier, $this->datetime_format, PDO::PARAM_STR);
+ break;
+ case 'DECIMAL_SEPARATOR':
+ $stmt->bindValue($identifier, $this->decimal_separator, PDO::PARAM_STR);
+ break;
+ case 'THOUSANDS_SEPARATOR':
+ $stmt->bindValue($identifier, $this->thousands_separator, PDO::PARAM_STR);
+ break;
+ case 'DECIMALS':
+ $stmt->bindValue($identifier, $this->decimals, PDO::PARAM_STR);
break;
case 'BY_DEFAULT':
$stmt->bindValue($identifier, $this->by_default, PDO::PARAM_INT);
break;
+ case 'POSITION':
+ $stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
+ break;
case 'CREATED_AT':
$stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
break;
@@ -1116,15 +1398,33 @@ abstract class Lang implements ActiveRecordInterface
return $this->getUrl();
break;
case 5:
- return $this->getPosition();
+ return $this->getDateFormat();
break;
case 6:
- return $this->getByDefault();
+ return $this->getTimeFormat();
break;
case 7:
- return $this->getCreatedAt();
+ return $this->getDatetimeFormat();
break;
case 8:
+ return $this->getDecimalSeparator();
+ break;
+ case 9:
+ return $this->getThousandsSeparator();
+ break;
+ case 10:
+ return $this->getDecimals();
+ break;
+ case 11:
+ return $this->getByDefault();
+ break;
+ case 12:
+ return $this->getPosition();
+ break;
+ case 13:
+ return $this->getCreatedAt();
+ break;
+ case 14:
return $this->getUpdatedAt();
break;
default:
@@ -1160,10 +1460,16 @@ abstract class Lang implements ActiveRecordInterface
$keys[2] => $this->getCode(),
$keys[3] => $this->getLocale(),
$keys[4] => $this->getUrl(),
- $keys[5] => $this->getPosition(),
- $keys[6] => $this->getByDefault(),
- $keys[7] => $this->getCreatedAt(),
- $keys[8] => $this->getUpdatedAt(),
+ $keys[5] => $this->getDateFormat(),
+ $keys[6] => $this->getTimeFormat(),
+ $keys[7] => $this->getDatetimeFormat(),
+ $keys[8] => $this->getDecimalSeparator(),
+ $keys[9] => $this->getThousandsSeparator(),
+ $keys[10] => $this->getDecimals(),
+ $keys[11] => $this->getByDefault(),
+ $keys[12] => $this->getPosition(),
+ $keys[13] => $this->getCreatedAt(),
+ $keys[14] => $this->getUpdatedAt(),
);
$virtualColumns = $this->virtualColumns;
foreach($virtualColumns as $key => $virtualColumn)
@@ -1220,15 +1526,33 @@ abstract class Lang implements ActiveRecordInterface
$this->setUrl($value);
break;
case 5:
- $this->setPosition($value);
+ $this->setDateFormat($value);
break;
case 6:
- $this->setByDefault($value);
+ $this->setTimeFormat($value);
break;
case 7:
- $this->setCreatedAt($value);
+ $this->setDatetimeFormat($value);
break;
case 8:
+ $this->setDecimalSeparator($value);
+ break;
+ case 9:
+ $this->setThousandsSeparator($value);
+ break;
+ case 10:
+ $this->setDecimals($value);
+ break;
+ case 11:
+ $this->setByDefault($value);
+ break;
+ case 12:
+ $this->setPosition($value);
+ break;
+ case 13:
+ $this->setCreatedAt($value);
+ break;
+ case 14:
$this->setUpdatedAt($value);
break;
} // switch()
@@ -1260,10 +1584,16 @@ abstract class Lang implements ActiveRecordInterface
if (array_key_exists($keys[2], $arr)) $this->setCode($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setLocale($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setUrl($arr[$keys[4]]);
- if (array_key_exists($keys[5], $arr)) $this->setPosition($arr[$keys[5]]);
- if (array_key_exists($keys[6], $arr)) $this->setByDefault($arr[$keys[6]]);
- if (array_key_exists($keys[7], $arr)) $this->setCreatedAt($arr[$keys[7]]);
- if (array_key_exists($keys[8], $arr)) $this->setUpdatedAt($arr[$keys[8]]);
+ if (array_key_exists($keys[5], $arr)) $this->setDateFormat($arr[$keys[5]]);
+ if (array_key_exists($keys[6], $arr)) $this->setTimeFormat($arr[$keys[6]]);
+ if (array_key_exists($keys[7], $arr)) $this->setDatetimeFormat($arr[$keys[7]]);
+ if (array_key_exists($keys[8], $arr)) $this->setDecimalSeparator($arr[$keys[8]]);
+ if (array_key_exists($keys[9], $arr)) $this->setThousandsSeparator($arr[$keys[9]]);
+ if (array_key_exists($keys[10], $arr)) $this->setDecimals($arr[$keys[10]]);
+ if (array_key_exists($keys[11], $arr)) $this->setByDefault($arr[$keys[11]]);
+ if (array_key_exists($keys[12], $arr)) $this->setPosition($arr[$keys[12]]);
+ if (array_key_exists($keys[13], $arr)) $this->setCreatedAt($arr[$keys[13]]);
+ if (array_key_exists($keys[14], $arr)) $this->setUpdatedAt($arr[$keys[14]]);
}
/**
@@ -1280,8 +1610,14 @@ abstract class Lang implements ActiveRecordInterface
if ($this->isColumnModified(LangTableMap::CODE)) $criteria->add(LangTableMap::CODE, $this->code);
if ($this->isColumnModified(LangTableMap::LOCALE)) $criteria->add(LangTableMap::LOCALE, $this->locale);
if ($this->isColumnModified(LangTableMap::URL)) $criteria->add(LangTableMap::URL, $this->url);
- if ($this->isColumnModified(LangTableMap::POSITION)) $criteria->add(LangTableMap::POSITION, $this->position);
+ if ($this->isColumnModified(LangTableMap::DATE_FORMAT)) $criteria->add(LangTableMap::DATE_FORMAT, $this->date_format);
+ if ($this->isColumnModified(LangTableMap::TIME_FORMAT)) $criteria->add(LangTableMap::TIME_FORMAT, $this->time_format);
+ if ($this->isColumnModified(LangTableMap::DATETIME_FORMAT)) $criteria->add(LangTableMap::DATETIME_FORMAT, $this->datetime_format);
+ if ($this->isColumnModified(LangTableMap::DECIMAL_SEPARATOR)) $criteria->add(LangTableMap::DECIMAL_SEPARATOR, $this->decimal_separator);
+ if ($this->isColumnModified(LangTableMap::THOUSANDS_SEPARATOR)) $criteria->add(LangTableMap::THOUSANDS_SEPARATOR, $this->thousands_separator);
+ if ($this->isColumnModified(LangTableMap::DECIMALS)) $criteria->add(LangTableMap::DECIMALS, $this->decimals);
if ($this->isColumnModified(LangTableMap::BY_DEFAULT)) $criteria->add(LangTableMap::BY_DEFAULT, $this->by_default);
+ if ($this->isColumnModified(LangTableMap::POSITION)) $criteria->add(LangTableMap::POSITION, $this->position);
if ($this->isColumnModified(LangTableMap::CREATED_AT)) $criteria->add(LangTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(LangTableMap::UPDATED_AT)) $criteria->add(LangTableMap::UPDATED_AT, $this->updated_at);
@@ -1351,8 +1687,14 @@ abstract class Lang implements ActiveRecordInterface
$copyObj->setCode($this->getCode());
$copyObj->setLocale($this->getLocale());
$copyObj->setUrl($this->getUrl());
- $copyObj->setPosition($this->getPosition());
+ $copyObj->setDateFormat($this->getDateFormat());
+ $copyObj->setTimeFormat($this->getTimeFormat());
+ $copyObj->setDatetimeFormat($this->getDatetimeFormat());
+ $copyObj->setDecimalSeparator($this->getDecimalSeparator());
+ $copyObj->setThousandsSeparator($this->getThousandsSeparator());
+ $copyObj->setDecimals($this->getDecimals());
$copyObj->setByDefault($this->getByDefault());
+ $copyObj->setPosition($this->getPosition());
$copyObj->setCreatedAt($this->getCreatedAt());
$copyObj->setUpdatedAt($this->getUpdatedAt());
if ($makeNew) {
@@ -1393,8 +1735,14 @@ abstract class Lang implements ActiveRecordInterface
$this->code = null;
$this->locale = null;
$this->url = null;
- $this->position = null;
+ $this->date_format = null;
+ $this->time_format = null;
+ $this->datetime_format = null;
+ $this->decimal_separator = null;
+ $this->thousands_separator = null;
+ $this->decimals = null;
$this->by_default = null;
+ $this->position = null;
$this->created_at = null;
$this->updated_at = null;
$this->alreadyInSave = false;
diff --git a/core/lib/Thelia/Model/Base/LangQuery.php b/core/lib/Thelia/Model/Base/LangQuery.php
index a5100c5f8..2fabec9ee 100755
--- a/core/lib/Thelia/Model/Base/LangQuery.php
+++ b/core/lib/Thelia/Model/Base/LangQuery.php
@@ -23,8 +23,14 @@ use Thelia\Model\Map\LangTableMap;
* @method ChildLangQuery orderByCode($order = Criteria::ASC) Order by the code column
* @method ChildLangQuery orderByLocale($order = Criteria::ASC) Order by the locale column
* @method ChildLangQuery orderByUrl($order = Criteria::ASC) Order by the url column
- * @method ChildLangQuery orderByPosition($order = Criteria::ASC) Order by the position column
+ * @method ChildLangQuery orderByDateFormat($order = Criteria::ASC) Order by the date_format column
+ * @method ChildLangQuery orderByTimeFormat($order = Criteria::ASC) Order by the time_format column
+ * @method ChildLangQuery orderByDatetimeFormat($order = Criteria::ASC) Order by the datetime_format column
+ * @method ChildLangQuery orderByDecimalSeparator($order = Criteria::ASC) Order by the decimal_separator column
+ * @method ChildLangQuery orderByThousandsSeparator($order = Criteria::ASC) Order by the thousands_separator column
+ * @method ChildLangQuery orderByDecimals($order = Criteria::ASC) Order by the decimals column
* @method ChildLangQuery orderByByDefault($order = Criteria::ASC) Order by the by_default column
+ * @method ChildLangQuery orderByPosition($order = Criteria::ASC) Order by the position column
* @method ChildLangQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ChildLangQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
@@ -33,8 +39,14 @@ use Thelia\Model\Map\LangTableMap;
* @method ChildLangQuery groupByCode() Group by the code column
* @method ChildLangQuery groupByLocale() Group by the locale column
* @method ChildLangQuery groupByUrl() Group by the url column
- * @method ChildLangQuery groupByPosition() Group by the position column
+ * @method ChildLangQuery groupByDateFormat() Group by the date_format column
+ * @method ChildLangQuery groupByTimeFormat() Group by the time_format column
+ * @method ChildLangQuery groupByDatetimeFormat() Group by the datetime_format column
+ * @method ChildLangQuery groupByDecimalSeparator() Group by the decimal_separator column
+ * @method ChildLangQuery groupByThousandsSeparator() Group by the thousands_separator column
+ * @method ChildLangQuery groupByDecimals() Group by the decimals column
* @method ChildLangQuery groupByByDefault() Group by the by_default column
+ * @method ChildLangQuery groupByPosition() Group by the position column
* @method ChildLangQuery groupByCreatedAt() Group by the created_at column
* @method ChildLangQuery groupByUpdatedAt() Group by the updated_at column
*
@@ -50,8 +62,14 @@ use Thelia\Model\Map\LangTableMap;
* @method ChildLang findOneByCode(string $code) Return the first ChildLang filtered by the code column
* @method ChildLang findOneByLocale(string $locale) Return the first ChildLang filtered by the locale column
* @method ChildLang findOneByUrl(string $url) Return the first ChildLang filtered by the url column
- * @method ChildLang findOneByPosition(int $position) Return the first ChildLang filtered by the position column
+ * @method ChildLang findOneByDateFormat(string $date_format) Return the first ChildLang filtered by the date_format column
+ * @method ChildLang findOneByTimeFormat(string $time_format) Return the first ChildLang filtered by the time_format column
+ * @method ChildLang findOneByDatetimeFormat(string $datetime_format) Return the first ChildLang filtered by the datetime_format column
+ * @method ChildLang findOneByDecimalSeparator(string $decimal_separator) Return the first ChildLang filtered by the decimal_separator column
+ * @method ChildLang findOneByThousandsSeparator(string $thousands_separator) Return the first ChildLang filtered by the thousands_separator column
+ * @method ChildLang findOneByDecimals(string $decimals) Return the first ChildLang filtered by the decimals column
* @method ChildLang findOneByByDefault(int $by_default) Return the first ChildLang filtered by the by_default column
+ * @method ChildLang findOneByPosition(int $position) Return the first ChildLang filtered by the position column
* @method ChildLang findOneByCreatedAt(string $created_at) Return the first ChildLang filtered by the created_at column
* @method ChildLang findOneByUpdatedAt(string $updated_at) Return the first ChildLang filtered by the updated_at column
*
@@ -60,8 +78,14 @@ use Thelia\Model\Map\LangTableMap;
* @method array findByCode(string $code) Return ChildLang objects filtered by the code column
* @method array findByLocale(string $locale) Return ChildLang objects filtered by the locale column
* @method array findByUrl(string $url) Return ChildLang objects filtered by the url column
- * @method array findByPosition(int $position) Return ChildLang objects filtered by the position column
+ * @method array findByDateFormat(string $date_format) Return ChildLang objects filtered by the date_format column
+ * @method array findByTimeFormat(string $time_format) Return ChildLang objects filtered by the time_format column
+ * @method array findByDatetimeFormat(string $datetime_format) Return ChildLang objects filtered by the datetime_format column
+ * @method array findByDecimalSeparator(string $decimal_separator) Return ChildLang objects filtered by the decimal_separator column
+ * @method array findByThousandsSeparator(string $thousands_separator) Return ChildLang objects filtered by the thousands_separator column
+ * @method array findByDecimals(string $decimals) Return ChildLang objects filtered by the decimals column
* @method array findByByDefault(int $by_default) Return ChildLang objects filtered by the by_default column
+ * @method array findByPosition(int $position) Return ChildLang objects filtered by the position column
* @method array findByCreatedAt(string $created_at) Return ChildLang objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ChildLang objects filtered by the updated_at column
*
@@ -152,7 +176,7 @@ abstract class LangQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
- $sql = 'SELECT ID, TITLE, CODE, LOCALE, URL, POSITION, BY_DEFAULT, CREATED_AT, UPDATED_AT FROM lang WHERE ID = :p0';
+ $sql = 'SELECT ID, TITLE, CODE, LOCALE, URL, DATE_FORMAT, TIME_FORMAT, DATETIME_FORMAT, DECIMAL_SEPARATOR, THOUSANDS_SEPARATOR, DECIMALS, BY_DEFAULT, POSITION, CREATED_AT, UPDATED_AT FROM lang WHERE ID = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -399,44 +423,177 @@ abstract class LangQuery extends ModelCriteria
}
/**
- * Filter the query on the position column
+ * Filter the query on the date_format column
*
* Example usage:
*
- * $query->filterByPosition(1234); // WHERE position = 1234
- * $query->filterByPosition(array(12, 34)); // WHERE position IN (12, 34)
- * $query->filterByPosition(array('min' => 12)); // WHERE position > 12
+ * $query->filterByDateFormat('fooValue'); // WHERE date_format = 'fooValue'
+ * $query->filterByDateFormat('%fooValue%'); // WHERE date_format LIKE '%fooValue%'
*
*
- * @param mixed $position The value to use as filter.
- * Use scalar values for equality.
- * Use array values for in_array() equivalent.
- * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
+ * @param string $dateFormat The value to use as filter.
+ * Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildLangQuery The current query, for fluid interface
*/
- public function filterByPosition($position = null, $comparison = null)
+ public function filterByDateFormat($dateFormat = null, $comparison = null)
{
- if (is_array($position)) {
- $useMinMax = false;
- if (isset($position['min'])) {
- $this->addUsingAlias(LangTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
- $useMinMax = true;
- }
- if (isset($position['max'])) {
- $this->addUsingAlias(LangTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
- $useMinMax = true;
- }
- if ($useMinMax) {
- return $this;
- }
- if (null === $comparison) {
+ if (null === $comparison) {
+ if (is_array($dateFormat)) {
$comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dateFormat)) {
+ $dateFormat = str_replace('*', '%', $dateFormat);
+ $comparison = Criteria::LIKE;
}
}
- return $this->addUsingAlias(LangTableMap::POSITION, $position, $comparison);
+ return $this->addUsingAlias(LangTableMap::DATE_FORMAT, $dateFormat, $comparison);
+ }
+
+ /**
+ * Filter the query on the time_format column
+ *
+ * Example usage:
+ *
+ * $query->filterByTimeFormat('fooValue'); // WHERE time_format = 'fooValue'
+ * $query->filterByTimeFormat('%fooValue%'); // WHERE time_format LIKE '%fooValue%'
+ *
+ *
+ * @param string $timeFormat The value to use as filter.
+ * Accepts wildcards (* and % trigger a LIKE)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return ChildLangQuery The current query, for fluid interface
+ */
+ public function filterByTimeFormat($timeFormat = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($timeFormat)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $timeFormat)) {
+ $timeFormat = str_replace('*', '%', $timeFormat);
+ $comparison = Criteria::LIKE;
+ }
+ }
+
+ return $this->addUsingAlias(LangTableMap::TIME_FORMAT, $timeFormat, $comparison);
+ }
+
+ /**
+ * Filter the query on the datetime_format column
+ *
+ * Example usage:
+ *
+ * $query->filterByDatetimeFormat('fooValue'); // WHERE datetime_format = 'fooValue'
+ * $query->filterByDatetimeFormat('%fooValue%'); // WHERE datetime_format LIKE '%fooValue%'
+ *
+ *
+ * @param string $datetimeFormat The value to use as filter.
+ * Accepts wildcards (* and % trigger a LIKE)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return ChildLangQuery The current query, for fluid interface
+ */
+ public function filterByDatetimeFormat($datetimeFormat = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($datetimeFormat)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $datetimeFormat)) {
+ $datetimeFormat = str_replace('*', '%', $datetimeFormat);
+ $comparison = Criteria::LIKE;
+ }
+ }
+
+ return $this->addUsingAlias(LangTableMap::DATETIME_FORMAT, $datetimeFormat, $comparison);
+ }
+
+ /**
+ * Filter the query on the decimal_separator column
+ *
+ * Example usage:
+ *
+ * $query->filterByDecimalSeparator('fooValue'); // WHERE decimal_separator = 'fooValue'
+ * $query->filterByDecimalSeparator('%fooValue%'); // WHERE decimal_separator LIKE '%fooValue%'
+ *
+ *
+ * @param string $decimalSeparator The value to use as filter.
+ * Accepts wildcards (* and % trigger a LIKE)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return ChildLangQuery The current query, for fluid interface
+ */
+ public function filterByDecimalSeparator($decimalSeparator = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($decimalSeparator)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $decimalSeparator)) {
+ $decimalSeparator = str_replace('*', '%', $decimalSeparator);
+ $comparison = Criteria::LIKE;
+ }
+ }
+
+ return $this->addUsingAlias(LangTableMap::DECIMAL_SEPARATOR, $decimalSeparator, $comparison);
+ }
+
+ /**
+ * Filter the query on the thousands_separator column
+ *
+ * Example usage:
+ *
+ * $query->filterByThousandsSeparator('fooValue'); // WHERE thousands_separator = 'fooValue'
+ * $query->filterByThousandsSeparator('%fooValue%'); // WHERE thousands_separator LIKE '%fooValue%'
+ *
+ *
+ * @param string $thousandsSeparator The value to use as filter.
+ * Accepts wildcards (* and % trigger a LIKE)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return ChildLangQuery The current query, for fluid interface
+ */
+ public function filterByThousandsSeparator($thousandsSeparator = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($thousandsSeparator)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $thousandsSeparator)) {
+ $thousandsSeparator = str_replace('*', '%', $thousandsSeparator);
+ $comparison = Criteria::LIKE;
+ }
+ }
+
+ return $this->addUsingAlias(LangTableMap::THOUSANDS_SEPARATOR, $thousandsSeparator, $comparison);
+ }
+
+ /**
+ * Filter the query on the decimals column
+ *
+ * Example usage:
+ *
+ * $query->filterByDecimals('fooValue'); // WHERE decimals = 'fooValue'
+ * $query->filterByDecimals('%fooValue%'); // WHERE decimals LIKE '%fooValue%'
+ *
+ *
+ * @param string $decimals The value to use as filter.
+ * Accepts wildcards (* and % trigger a LIKE)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return ChildLangQuery The current query, for fluid interface
+ */
+ public function filterByDecimals($decimals = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($decimals)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $decimals)) {
+ $decimals = str_replace('*', '%', $decimals);
+ $comparison = Criteria::LIKE;
+ }
+ }
+
+ return $this->addUsingAlias(LangTableMap::DECIMALS, $decimals, $comparison);
}
/**
@@ -480,6 +637,47 @@ abstract class LangQuery extends ModelCriteria
return $this->addUsingAlias(LangTableMap::BY_DEFAULT, $byDefault, $comparison);
}
+ /**
+ * Filter the query on the position column
+ *
+ * Example usage:
+ *
+ * $query->filterByPosition(1234); // WHERE position = 1234
+ * $query->filterByPosition(array(12, 34)); // WHERE position IN (12, 34)
+ * $query->filterByPosition(array('min' => 12)); // WHERE position > 12
+ *
+ *
+ * @param mixed $position The value to use as filter.
+ * Use scalar values for equality.
+ * Use array values for in_array() equivalent.
+ * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return ChildLangQuery The current query, for fluid interface
+ */
+ public function filterByPosition($position = null, $comparison = null)
+ {
+ if (is_array($position)) {
+ $useMinMax = false;
+ if (isset($position['min'])) {
+ $this->addUsingAlias(LangTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($position['max'])) {
+ $this->addUsingAlias(LangTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+
+ return $this->addUsingAlias(LangTableMap::POSITION, $position, $comparison);
+ }
+
/**
* Filter the query on the created_at column
*
diff --git a/core/lib/Thelia/Model/Lang.php b/core/lib/Thelia/Model/Lang.php
index 654c89719..d6b1a204c 100755
--- a/core/lib/Thelia/Model/Lang.php
+++ b/core/lib/Thelia/Model/Lang.php
@@ -23,34 +23,4 @@ class Lang extends BaseLang {
return $default_lang;
}
-
- public function getDateFormat()
- {
- return "d/m/Y";
- }
-
- public function getTimeFormat()
- {
- return "H:i:s";
- }
-
- public function getDateTimeFormat()
- {
- return "d/m/Y H:i:s";
- }
-
- public function getDecimalSeparator()
- {
- return ".";
- }
-
- public function getThousandsSeparator()
- {
- return " ";
- }
-
- public function getDecimals()
- {
- return 2;
- }
}
diff --git a/core/lib/Thelia/Model/Map/LangTableMap.php b/core/lib/Thelia/Model/Map/LangTableMap.php
index 9eb864388..6d153b869 100755
--- a/core/lib/Thelia/Model/Map/LangTableMap.php
+++ b/core/lib/Thelia/Model/Map/LangTableMap.php
@@ -57,7 +57,7 @@ class LangTableMap extends TableMap
/**
* The total number of columns
*/
- const NUM_COLUMNS = 9;
+ const NUM_COLUMNS = 15;
/**
* The number of lazy-loaded columns
@@ -67,7 +67,7 @@ class LangTableMap extends TableMap
/**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/
- const NUM_HYDRATE_COLUMNS = 9;
+ const NUM_HYDRATE_COLUMNS = 15;
/**
* the column name for the ID field
@@ -95,15 +95,45 @@ class LangTableMap extends TableMap
const URL = 'lang.URL';
/**
- * the column name for the POSITION field
+ * the column name for the DATE_FORMAT field
*/
- const POSITION = 'lang.POSITION';
+ const DATE_FORMAT = 'lang.DATE_FORMAT';
+
+ /**
+ * the column name for the TIME_FORMAT field
+ */
+ const TIME_FORMAT = 'lang.TIME_FORMAT';
+
+ /**
+ * the column name for the DATETIME_FORMAT field
+ */
+ const DATETIME_FORMAT = 'lang.DATETIME_FORMAT';
+
+ /**
+ * the column name for the DECIMAL_SEPARATOR field
+ */
+ const DECIMAL_SEPARATOR = 'lang.DECIMAL_SEPARATOR';
+
+ /**
+ * the column name for the THOUSANDS_SEPARATOR field
+ */
+ const THOUSANDS_SEPARATOR = 'lang.THOUSANDS_SEPARATOR';
+
+ /**
+ * the column name for the DECIMALS field
+ */
+ const DECIMALS = 'lang.DECIMALS';
/**
* the column name for the BY_DEFAULT field
*/
const BY_DEFAULT = 'lang.BY_DEFAULT';
+ /**
+ * the column name for the POSITION field
+ */
+ const POSITION = 'lang.POSITION';
+
/**
* the column name for the CREATED_AT field
*/
@@ -126,12 +156,12 @@ class LangTableMap extends TableMap
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
- self::TYPE_PHPNAME => array('Id', 'Title', 'Code', 'Locale', 'Url', 'Position', 'ByDefault', 'CreatedAt', 'UpdatedAt', ),
- self::TYPE_STUDLYPHPNAME => array('id', 'title', 'code', 'locale', 'url', 'position', 'byDefault', 'createdAt', 'updatedAt', ),
- self::TYPE_COLNAME => array(LangTableMap::ID, LangTableMap::TITLE, LangTableMap::CODE, LangTableMap::LOCALE, LangTableMap::URL, LangTableMap::POSITION, LangTableMap::BY_DEFAULT, LangTableMap::CREATED_AT, LangTableMap::UPDATED_AT, ),
- self::TYPE_RAW_COLNAME => array('ID', 'TITLE', 'CODE', 'LOCALE', 'URL', 'POSITION', 'BY_DEFAULT', 'CREATED_AT', 'UPDATED_AT', ),
- self::TYPE_FIELDNAME => array('id', 'title', 'code', 'locale', 'url', 'position', 'by_default', 'created_at', 'updated_at', ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
+ self::TYPE_PHPNAME => array('Id', 'Title', 'Code', 'Locale', 'Url', 'DateFormat', 'TimeFormat', 'DatetimeFormat', 'DecimalSeparator', 'ThousandsSeparator', 'Decimals', 'ByDefault', 'Position', 'CreatedAt', 'UpdatedAt', ),
+ self::TYPE_STUDLYPHPNAME => array('id', 'title', 'code', 'locale', 'url', 'dateFormat', 'timeFormat', 'datetimeFormat', 'decimalSeparator', 'thousandsSeparator', 'decimals', 'byDefault', 'position', 'createdAt', 'updatedAt', ),
+ self::TYPE_COLNAME => array(LangTableMap::ID, LangTableMap::TITLE, LangTableMap::CODE, LangTableMap::LOCALE, LangTableMap::URL, LangTableMap::DATE_FORMAT, LangTableMap::TIME_FORMAT, LangTableMap::DATETIME_FORMAT, LangTableMap::DECIMAL_SEPARATOR, LangTableMap::THOUSANDS_SEPARATOR, LangTableMap::DECIMALS, LangTableMap::BY_DEFAULT, LangTableMap::POSITION, LangTableMap::CREATED_AT, LangTableMap::UPDATED_AT, ),
+ self::TYPE_RAW_COLNAME => array('ID', 'TITLE', 'CODE', 'LOCALE', 'URL', 'DATE_FORMAT', 'TIME_FORMAT', 'DATETIME_FORMAT', 'DECIMAL_SEPARATOR', 'THOUSANDS_SEPARATOR', 'DECIMALS', 'BY_DEFAULT', 'POSITION', 'CREATED_AT', 'UPDATED_AT', ),
+ self::TYPE_FIELDNAME => array('id', 'title', 'code', 'locale', 'url', 'date_format', 'time_format', 'datetime_format', 'decimal_separator', 'thousands_separator', 'decimals', 'by_default', 'position', 'created_at', 'updated_at', ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
);
/**
@@ -141,12 +171,12 @@ class LangTableMap extends TableMap
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
- self::TYPE_PHPNAME => array('Id' => 0, 'Title' => 1, 'Code' => 2, 'Locale' => 3, 'Url' => 4, 'Position' => 5, 'ByDefault' => 6, 'CreatedAt' => 7, 'UpdatedAt' => 8, ),
- self::TYPE_STUDLYPHPNAME => array('id' => 0, 'title' => 1, 'code' => 2, 'locale' => 3, 'url' => 4, 'position' => 5, 'byDefault' => 6, 'createdAt' => 7, 'updatedAt' => 8, ),
- self::TYPE_COLNAME => array(LangTableMap::ID => 0, LangTableMap::TITLE => 1, LangTableMap::CODE => 2, LangTableMap::LOCALE => 3, LangTableMap::URL => 4, LangTableMap::POSITION => 5, LangTableMap::BY_DEFAULT => 6, LangTableMap::CREATED_AT => 7, LangTableMap::UPDATED_AT => 8, ),
- self::TYPE_RAW_COLNAME => array('ID' => 0, 'TITLE' => 1, 'CODE' => 2, 'LOCALE' => 3, 'URL' => 4, 'POSITION' => 5, 'BY_DEFAULT' => 6, 'CREATED_AT' => 7, 'UPDATED_AT' => 8, ),
- self::TYPE_FIELDNAME => array('id' => 0, 'title' => 1, 'code' => 2, 'locale' => 3, 'url' => 4, 'position' => 5, 'by_default' => 6, 'created_at' => 7, 'updated_at' => 8, ),
- self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
+ self::TYPE_PHPNAME => array('Id' => 0, 'Title' => 1, 'Code' => 2, 'Locale' => 3, 'Url' => 4, 'DateFormat' => 5, 'TimeFormat' => 6, 'DatetimeFormat' => 7, 'DecimalSeparator' => 8, 'ThousandsSeparator' => 9, 'Decimals' => 10, 'ByDefault' => 11, 'Position' => 12, 'CreatedAt' => 13, 'UpdatedAt' => 14, ),
+ self::TYPE_STUDLYPHPNAME => array('id' => 0, 'title' => 1, 'code' => 2, 'locale' => 3, 'url' => 4, 'dateFormat' => 5, 'timeFormat' => 6, 'datetimeFormat' => 7, 'decimalSeparator' => 8, 'thousandsSeparator' => 9, 'decimals' => 10, 'byDefault' => 11, 'position' => 12, 'createdAt' => 13, 'updatedAt' => 14, ),
+ self::TYPE_COLNAME => array(LangTableMap::ID => 0, LangTableMap::TITLE => 1, LangTableMap::CODE => 2, LangTableMap::LOCALE => 3, LangTableMap::URL => 4, LangTableMap::DATE_FORMAT => 5, LangTableMap::TIME_FORMAT => 6, LangTableMap::DATETIME_FORMAT => 7, LangTableMap::DECIMAL_SEPARATOR => 8, LangTableMap::THOUSANDS_SEPARATOR => 9, LangTableMap::DECIMALS => 10, LangTableMap::BY_DEFAULT => 11, LangTableMap::POSITION => 12, LangTableMap::CREATED_AT => 13, LangTableMap::UPDATED_AT => 14, ),
+ self::TYPE_RAW_COLNAME => array('ID' => 0, 'TITLE' => 1, 'CODE' => 2, 'LOCALE' => 3, 'URL' => 4, 'DATE_FORMAT' => 5, 'TIME_FORMAT' => 6, 'DATETIME_FORMAT' => 7, 'DECIMAL_SEPARATOR' => 8, 'THOUSANDS_SEPARATOR' => 9, 'DECIMALS' => 10, 'BY_DEFAULT' => 11, 'POSITION' => 12, 'CREATED_AT' => 13, 'UPDATED_AT' => 14, ),
+ self::TYPE_FIELDNAME => array('id' => 0, 'title' => 1, 'code' => 2, 'locale' => 3, 'url' => 4, 'date_format' => 5, 'time_format' => 6, 'datetime_format' => 7, 'decimal_separator' => 8, 'thousands_separator' => 9, 'decimals' => 10, 'by_default' => 11, 'position' => 12, 'created_at' => 13, 'updated_at' => 14, ),
+ self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
);
/**
@@ -170,8 +200,14 @@ class LangTableMap extends TableMap
$this->addColumn('CODE', 'Code', 'VARCHAR', false, 10, null);
$this->addColumn('LOCALE', 'Locale', 'VARCHAR', false, 45, null);
$this->addColumn('URL', 'Url', 'VARCHAR', false, 255, null);
- $this->addColumn('POSITION', 'Position', 'INTEGER', false, null, null);
+ $this->addColumn('DATE_FORMAT', 'DateFormat', 'VARCHAR', false, 45, null);
+ $this->addColumn('TIME_FORMAT', 'TimeFormat', 'VARCHAR', false, 45, null);
+ $this->addColumn('DATETIME_FORMAT', 'DatetimeFormat', 'VARCHAR', false, 45, null);
+ $this->addColumn('DECIMAL_SEPARATOR', 'DecimalSeparator', 'VARCHAR', false, 45, null);
+ $this->addColumn('THOUSANDS_SEPARATOR', 'ThousandsSeparator', 'VARCHAR', false, 45, null);
+ $this->addColumn('DECIMALS', 'Decimals', 'VARCHAR', false, 45, null);
$this->addColumn('BY_DEFAULT', 'ByDefault', 'TINYINT', false, null, null);
+ $this->addColumn('POSITION', 'Position', 'INTEGER', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
} // initialize()
@@ -339,8 +375,14 @@ class LangTableMap extends TableMap
$criteria->addSelectColumn(LangTableMap::CODE);
$criteria->addSelectColumn(LangTableMap::LOCALE);
$criteria->addSelectColumn(LangTableMap::URL);
- $criteria->addSelectColumn(LangTableMap::POSITION);
+ $criteria->addSelectColumn(LangTableMap::DATE_FORMAT);
+ $criteria->addSelectColumn(LangTableMap::TIME_FORMAT);
+ $criteria->addSelectColumn(LangTableMap::DATETIME_FORMAT);
+ $criteria->addSelectColumn(LangTableMap::DECIMAL_SEPARATOR);
+ $criteria->addSelectColumn(LangTableMap::THOUSANDS_SEPARATOR);
+ $criteria->addSelectColumn(LangTableMap::DECIMALS);
$criteria->addSelectColumn(LangTableMap::BY_DEFAULT);
+ $criteria->addSelectColumn(LangTableMap::POSITION);
$criteria->addSelectColumn(LangTableMap::CREATED_AT);
$criteria->addSelectColumn(LangTableMap::UPDATED_AT);
} else {
@@ -349,8 +391,14 @@ class LangTableMap extends TableMap
$criteria->addSelectColumn($alias . '.CODE');
$criteria->addSelectColumn($alias . '.LOCALE');
$criteria->addSelectColumn($alias . '.URL');
- $criteria->addSelectColumn($alias . '.POSITION');
+ $criteria->addSelectColumn($alias . '.DATE_FORMAT');
+ $criteria->addSelectColumn($alias . '.TIME_FORMAT');
+ $criteria->addSelectColumn($alias . '.DATETIME_FORMAT');
+ $criteria->addSelectColumn($alias . '.DECIMAL_SEPARATOR');
+ $criteria->addSelectColumn($alias . '.THOUSANDS_SEPARATOR');
+ $criteria->addSelectColumn($alias . '.DECIMALS');
$criteria->addSelectColumn($alias . '.BY_DEFAULT');
+ $criteria->addSelectColumn($alias . '.POSITION');
$criteria->addSelectColumn($alias . '.CREATED_AT');
$criteria->addSelectColumn($alias . '.UPDATED_AT');
}
diff --git a/install/insert.sql b/install/insert.sql
index a4b7d3c1b..a2e5868e4 100755
--- a/install/insert.sql
+++ b/install/insert.sql
@@ -1,8 +1,8 @@
-INSERT INTO `lang`(`id`,`title`,`code`,`locale`,`url`,`by_default`,`created_at`,`updated_at`)VALUES
-(1, 'Français', 'fr', 'fr_FR', '','1', NOW(), NOW()),
-(2, 'English', 'en', 'en_EN', '', '0', NOW(), NOW()),
-(3, 'Espanol', 'es', 'es_ES', '', '0', NOW(), NOW()),
-(4, 'Italiano', 'it', 'it_IT', '','0', NOW(), NOW());
+INSERT INTO `lang`(`id`,`title`,`code`,`locale`,`url`,`date_format`,`time_format`,`datetime_format`,`decimal_separator`,`thousands_separator`,`decimals`,`by_default`,`created_at`,`updated_at`)VALUES
+(1, 'Français', 'fr', 'fr_FR', '', 'd/m/Y', 'H:i:s', 'd/m/y H:i:s', ',', ' ', '2', '1', NOW(), NOW()),
+(2, 'English', 'en', 'en_EN', '', 'm-d-Y', 'h:i:s', 'm-d-Y h:i:s', '.', ' ', '2', '0', NOW(), NOW()),
+(3, 'castellano', 'es', 'es_ES', '', 'm-d-Y', 'h:i:s', 'm-d-Y h:i:s', ',', '.', '2', '0', NOW(), NOW()),
+(4, 'Italiano', 'it', 'it_IT', '', 'd/m/Y', 'H:i:s', 'd/m/y H:i:s', ',', ' ', '2', '0', NOW(), NOW());
INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
('session_config.default', '1', 1, 1, NOW(), NOW()),
diff --git a/install/thelia.sql b/install/thelia.sql
index 85c00b369..879f323b9 100755
--- a/install/thelia.sql
+++ b/install/thelia.sql
@@ -522,8 +522,14 @@ CREATE TABLE `lang`
`code` VARCHAR(10),
`locale` VARCHAR(45),
`url` VARCHAR(255),
- `position` INTEGER,
+ `date_format` VARCHAR(45),
+ `time_format` VARCHAR(45),
+ `datetime_format` VARCHAR(45),
+ `decimal_separator` VARCHAR(45),
+ `thousands_separator` VARCHAR(45),
+ `decimals` VARCHAR(45),
`by_default` TINYINT,
+ `position` INTEGER,
`created_at` DATETIME,
`updated_at` DATETIME,
PRIMARY KEY (`id`)
diff --git a/local/config/schema.xml b/local/config/schema.xml
index 26023b117..a9d7badc4 100755
--- a/local/config/schema.xml
+++ b/local/config/schema.xml
@@ -389,8 +389,14 @@