diff --git a/composer.lock b/composer.lock index a74c1b5ed..6da4aed80 100755 --- a/composer.lock +++ b/composer.lock @@ -318,12 +318,12 @@ "source": { "type": "git", "url": "https://github.com/propelorm/Propel2.git", - "reference": "fb9a10939abdd6efea7a066f0ef28f82ad06e435" + "reference": "793aea6b762d9a72b083bfc49c74c574f67650c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/propelorm/Propel2/zipball/fb9a10939abdd6efea7a066f0ef28f82ad06e435", - "reference": "fb9a10939abdd6efea7a066f0ef28f82ad06e435", + "url": "https://api.github.com/repos/propelorm/Propel2/zipball/793aea6b762d9a72b083bfc49c74c574f67650c8", + "reference": "793aea6b762d9a72b083bfc49c74c574f67650c8", "shasum": "" }, "require": { @@ -347,6 +347,11 @@ "bin/propel" ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "psr-0": { "Propel": "src/" @@ -370,7 +375,7 @@ "orm", "persistence" ], - "time": "2013-09-30 08:26:26" + "time": "2014-01-08 10:53:39" }, { "name": "psr/log", diff --git a/core/lib/Thelia/Model/Base/Accessory.php b/core/lib/Thelia/Model/Base/Accessory.php index 5dfd4c91b..ae63078cd 100644 --- a/core/lib/Thelia/Model/Base/Accessory.php +++ b/core/lib/Thelia/Model/Base/Accessory.php @@ -124,7 +124,7 @@ abstract class Accessory implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -135,7 +135,7 @@ abstract class Accessory implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -144,7 +144,7 @@ abstract class Accessory implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -197,8 +197,8 @@ abstract class Accessory implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -466,7 +466,7 @@ abstract class Accessory implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = AccessoryTableMap::ID; + $this->modifiedColumns[AccessoryTableMap::ID] = true; } @@ -487,7 +487,7 @@ abstract class Accessory implements ActiveRecordInterface if ($this->product_id !== $v) { $this->product_id = $v; - $this->modifiedColumns[] = AccessoryTableMap::PRODUCT_ID; + $this->modifiedColumns[AccessoryTableMap::PRODUCT_ID] = true; } if ($this->aProductRelatedByProductId !== null && $this->aProductRelatedByProductId->getId() !== $v) { @@ -512,7 +512,7 @@ abstract class Accessory implements ActiveRecordInterface if ($this->accessory !== $v) { $this->accessory = $v; - $this->modifiedColumns[] = AccessoryTableMap::ACCESSORY; + $this->modifiedColumns[AccessoryTableMap::ACCESSORY] = true; } if ($this->aProductRelatedByAccessory !== null && $this->aProductRelatedByAccessory->getId() !== $v) { @@ -537,7 +537,7 @@ abstract class Accessory implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = AccessoryTableMap::POSITION; + $this->modifiedColumns[AccessoryTableMap::POSITION] = true; } @@ -557,7 +557,7 @@ abstract class Accessory implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = AccessoryTableMap::CREATED_AT; + $this->modifiedColumns[AccessoryTableMap::CREATED_AT] = true; } } // if either are not null @@ -578,7 +578,7 @@ abstract class Accessory implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = AccessoryTableMap::UPDATED_AT; + $this->modifiedColumns[AccessoryTableMap::UPDATED_AT] = true; } } // if either are not null @@ -895,7 +895,7 @@ abstract class Accessory implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = AccessoryTableMap::ID; + $this->modifiedColumns[AccessoryTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . AccessoryTableMap::ID . ')'); } @@ -1428,7 +1428,7 @@ abstract class Accessory implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = AccessoryTableMap::UPDATED_AT; + $this->modifiedColumns[AccessoryTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/Address.php b/core/lib/Thelia/Model/Base/Address.php index 98a346969..ed28b066a 100644 --- a/core/lib/Thelia/Model/Base/Address.php +++ b/core/lib/Thelia/Model/Base/Address.php @@ -246,7 +246,7 @@ abstract class Address implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -257,7 +257,7 @@ abstract class Address implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -266,7 +266,7 @@ abstract class Address implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -319,8 +319,8 @@ abstract class Address implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -720,7 +720,7 @@ abstract class Address implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = AddressTableMap::ID; + $this->modifiedColumns[AddressTableMap::ID] = true; } @@ -741,7 +741,7 @@ abstract class Address implements ActiveRecordInterface if ($this->label !== $v) { $this->label = $v; - $this->modifiedColumns[] = AddressTableMap::LABEL; + $this->modifiedColumns[AddressTableMap::LABEL] = true; } @@ -762,7 +762,7 @@ abstract class Address implements ActiveRecordInterface if ($this->customer_id !== $v) { $this->customer_id = $v; - $this->modifiedColumns[] = AddressTableMap::CUSTOMER_ID; + $this->modifiedColumns[AddressTableMap::CUSTOMER_ID] = true; } if ($this->aCustomer !== null && $this->aCustomer->getId() !== $v) { @@ -787,7 +787,7 @@ abstract class Address implements ActiveRecordInterface if ($this->title_id !== $v) { $this->title_id = $v; - $this->modifiedColumns[] = AddressTableMap::TITLE_ID; + $this->modifiedColumns[AddressTableMap::TITLE_ID] = true; } if ($this->aCustomerTitle !== null && $this->aCustomerTitle->getId() !== $v) { @@ -812,7 +812,7 @@ abstract class Address implements ActiveRecordInterface if ($this->company !== $v) { $this->company = $v; - $this->modifiedColumns[] = AddressTableMap::COMPANY; + $this->modifiedColumns[AddressTableMap::COMPANY] = true; } @@ -833,7 +833,7 @@ abstract class Address implements ActiveRecordInterface if ($this->firstname !== $v) { $this->firstname = $v; - $this->modifiedColumns[] = AddressTableMap::FIRSTNAME; + $this->modifiedColumns[AddressTableMap::FIRSTNAME] = true; } @@ -854,7 +854,7 @@ abstract class Address implements ActiveRecordInterface if ($this->lastname !== $v) { $this->lastname = $v; - $this->modifiedColumns[] = AddressTableMap::LASTNAME; + $this->modifiedColumns[AddressTableMap::LASTNAME] = true; } @@ -875,7 +875,7 @@ abstract class Address implements ActiveRecordInterface if ($this->address1 !== $v) { $this->address1 = $v; - $this->modifiedColumns[] = AddressTableMap::ADDRESS1; + $this->modifiedColumns[AddressTableMap::ADDRESS1] = true; } @@ -896,7 +896,7 @@ abstract class Address implements ActiveRecordInterface if ($this->address2 !== $v) { $this->address2 = $v; - $this->modifiedColumns[] = AddressTableMap::ADDRESS2; + $this->modifiedColumns[AddressTableMap::ADDRESS2] = true; } @@ -917,7 +917,7 @@ abstract class Address implements ActiveRecordInterface if ($this->address3 !== $v) { $this->address3 = $v; - $this->modifiedColumns[] = AddressTableMap::ADDRESS3; + $this->modifiedColumns[AddressTableMap::ADDRESS3] = true; } @@ -938,7 +938,7 @@ abstract class Address implements ActiveRecordInterface if ($this->zipcode !== $v) { $this->zipcode = $v; - $this->modifiedColumns[] = AddressTableMap::ZIPCODE; + $this->modifiedColumns[AddressTableMap::ZIPCODE] = true; } @@ -959,7 +959,7 @@ abstract class Address implements ActiveRecordInterface if ($this->city !== $v) { $this->city = $v; - $this->modifiedColumns[] = AddressTableMap::CITY; + $this->modifiedColumns[AddressTableMap::CITY] = true; } @@ -980,7 +980,7 @@ abstract class Address implements ActiveRecordInterface if ($this->country_id !== $v) { $this->country_id = $v; - $this->modifiedColumns[] = AddressTableMap::COUNTRY_ID; + $this->modifiedColumns[AddressTableMap::COUNTRY_ID] = true; } if ($this->aCountry !== null && $this->aCountry->getId() !== $v) { @@ -1005,7 +1005,7 @@ abstract class Address implements ActiveRecordInterface if ($this->phone !== $v) { $this->phone = $v; - $this->modifiedColumns[] = AddressTableMap::PHONE; + $this->modifiedColumns[AddressTableMap::PHONE] = true; } @@ -1026,7 +1026,7 @@ abstract class Address implements ActiveRecordInterface if ($this->cellphone !== $v) { $this->cellphone = $v; - $this->modifiedColumns[] = AddressTableMap::CELLPHONE; + $this->modifiedColumns[AddressTableMap::CELLPHONE] = true; } @@ -1047,7 +1047,7 @@ abstract class Address implements ActiveRecordInterface if ($this->is_default !== $v) { $this->is_default = $v; - $this->modifiedColumns[] = AddressTableMap::IS_DEFAULT; + $this->modifiedColumns[AddressTableMap::IS_DEFAULT] = true; } @@ -1067,7 +1067,7 @@ abstract class Address implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = AddressTableMap::CREATED_AT; + $this->modifiedColumns[AddressTableMap::CREATED_AT] = true; } } // if either are not null @@ -1088,7 +1088,7 @@ abstract class Address implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = AddressTableMap::UPDATED_AT; + $this->modifiedColumns[AddressTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1496,7 +1496,7 @@ abstract class Address implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = AddressTableMap::ID; + $this->modifiedColumns[AddressTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . AddressTableMap::ID . ')'); } @@ -2347,7 +2347,7 @@ abstract class Address implements ActiveRecordInterface $this->collCartsRelatedByAddressDeliveryIdPartial = true; } - $collCartsRelatedByAddressDeliveryId->getInternalIterator()->rewind(); + reset($collCartsRelatedByAddressDeliveryId); return $collCartsRelatedByAddressDeliveryId; } @@ -2615,7 +2615,7 @@ abstract class Address implements ActiveRecordInterface $this->collCartsRelatedByAddressInvoiceIdPartial = true; } - $collCartsRelatedByAddressInvoiceId->getInternalIterator()->rewind(); + reset($collCartsRelatedByAddressInvoiceId); return $collCartsRelatedByAddressInvoiceId; } @@ -2856,13 +2856,7 @@ abstract class Address implements ActiveRecordInterface } } // if ($deep) - if ($this->collCartsRelatedByAddressDeliveryId instanceof Collection) { - $this->collCartsRelatedByAddressDeliveryId->clearIterator(); - } $this->collCartsRelatedByAddressDeliveryId = null; - if ($this->collCartsRelatedByAddressInvoiceId instanceof Collection) { - $this->collCartsRelatedByAddressInvoiceId->clearIterator(); - } $this->collCartsRelatedByAddressInvoiceId = null; $this->aCustomer = null; $this->aCustomerTitle = null; @@ -2888,7 +2882,7 @@ abstract class Address implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = AddressTableMap::UPDATED_AT; + $this->modifiedColumns[AddressTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/Admin.php b/core/lib/Thelia/Model/Base/Admin.php index 4342ae90f..22b3492b4 100644 --- a/core/lib/Thelia/Model/Base/Admin.php +++ b/core/lib/Thelia/Model/Base/Admin.php @@ -155,7 +155,7 @@ abstract class Admin implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -166,7 +166,7 @@ abstract class Admin implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -175,7 +175,7 @@ abstract class Admin implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -228,8 +228,8 @@ abstract class Admin implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -563,7 +563,7 @@ abstract class Admin implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = AdminTableMap::ID; + $this->modifiedColumns[AdminTableMap::ID] = true; } @@ -584,7 +584,7 @@ abstract class Admin implements ActiveRecordInterface if ($this->profile_id !== $v) { $this->profile_id = $v; - $this->modifiedColumns[] = AdminTableMap::PROFILE_ID; + $this->modifiedColumns[AdminTableMap::PROFILE_ID] = true; } if ($this->aProfile !== null && $this->aProfile->getId() !== $v) { @@ -609,7 +609,7 @@ abstract class Admin implements ActiveRecordInterface if ($this->firstname !== $v) { $this->firstname = $v; - $this->modifiedColumns[] = AdminTableMap::FIRSTNAME; + $this->modifiedColumns[AdminTableMap::FIRSTNAME] = true; } @@ -630,7 +630,7 @@ abstract class Admin implements ActiveRecordInterface if ($this->lastname !== $v) { $this->lastname = $v; - $this->modifiedColumns[] = AdminTableMap::LASTNAME; + $this->modifiedColumns[AdminTableMap::LASTNAME] = true; } @@ -651,7 +651,7 @@ abstract class Admin implements ActiveRecordInterface if ($this->login !== $v) { $this->login = $v; - $this->modifiedColumns[] = AdminTableMap::LOGIN; + $this->modifiedColumns[AdminTableMap::LOGIN] = true; } @@ -672,7 +672,7 @@ abstract class Admin implements ActiveRecordInterface if ($this->password !== $v) { $this->password = $v; - $this->modifiedColumns[] = AdminTableMap::PASSWORD; + $this->modifiedColumns[AdminTableMap::PASSWORD] = true; } @@ -693,7 +693,7 @@ abstract class Admin implements ActiveRecordInterface if ($this->algo !== $v) { $this->algo = $v; - $this->modifiedColumns[] = AdminTableMap::ALGO; + $this->modifiedColumns[AdminTableMap::ALGO] = true; } @@ -714,7 +714,7 @@ abstract class Admin implements ActiveRecordInterface if ($this->salt !== $v) { $this->salt = $v; - $this->modifiedColumns[] = AdminTableMap::SALT; + $this->modifiedColumns[AdminTableMap::SALT] = true; } @@ -735,7 +735,7 @@ abstract class Admin implements ActiveRecordInterface if ($this->remember_me_token !== $v) { $this->remember_me_token = $v; - $this->modifiedColumns[] = AdminTableMap::REMEMBER_ME_TOKEN; + $this->modifiedColumns[AdminTableMap::REMEMBER_ME_TOKEN] = true; } @@ -756,7 +756,7 @@ abstract class Admin implements ActiveRecordInterface if ($this->remember_me_serial !== $v) { $this->remember_me_serial = $v; - $this->modifiedColumns[] = AdminTableMap::REMEMBER_ME_SERIAL; + $this->modifiedColumns[AdminTableMap::REMEMBER_ME_SERIAL] = true; } @@ -776,7 +776,7 @@ abstract class Admin implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = AdminTableMap::CREATED_AT; + $this->modifiedColumns[AdminTableMap::CREATED_AT] = true; } } // if either are not null @@ -797,7 +797,7 @@ abstract class Admin implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = AdminTableMap::UPDATED_AT; + $this->modifiedColumns[AdminTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1121,7 +1121,7 @@ abstract class Admin implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = AdminTableMap::ID; + $this->modifiedColumns[AdminTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . AdminTableMap::ID . ')'); } @@ -1701,7 +1701,7 @@ abstract class Admin implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = AdminTableMap::UPDATED_AT; + $this->modifiedColumns[AdminTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/AdminLog.php b/core/lib/Thelia/Model/Base/AdminLog.php index 346011916..e47126369 100644 --- a/core/lib/Thelia/Model/Base/AdminLog.php +++ b/core/lib/Thelia/Model/Base/AdminLog.php @@ -136,7 +136,7 @@ abstract class AdminLog implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -147,7 +147,7 @@ abstract class AdminLog implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -156,7 +156,7 @@ abstract class AdminLog implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -209,8 +209,8 @@ abstract class AdminLog implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -522,7 +522,7 @@ abstract class AdminLog implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = AdminLogTableMap::ID; + $this->modifiedColumns[AdminLogTableMap::ID] = true; } @@ -543,7 +543,7 @@ abstract class AdminLog implements ActiveRecordInterface if ($this->admin_login !== $v) { $this->admin_login = $v; - $this->modifiedColumns[] = AdminLogTableMap::ADMIN_LOGIN; + $this->modifiedColumns[AdminLogTableMap::ADMIN_LOGIN] = true; } @@ -564,7 +564,7 @@ abstract class AdminLog implements ActiveRecordInterface if ($this->admin_firstname !== $v) { $this->admin_firstname = $v; - $this->modifiedColumns[] = AdminLogTableMap::ADMIN_FIRSTNAME; + $this->modifiedColumns[AdminLogTableMap::ADMIN_FIRSTNAME] = true; } @@ -585,7 +585,7 @@ abstract class AdminLog implements ActiveRecordInterface if ($this->admin_lastname !== $v) { $this->admin_lastname = $v; - $this->modifiedColumns[] = AdminLogTableMap::ADMIN_LASTNAME; + $this->modifiedColumns[AdminLogTableMap::ADMIN_LASTNAME] = true; } @@ -606,7 +606,7 @@ abstract class AdminLog implements ActiveRecordInterface if ($this->resource !== $v) { $this->resource = $v; - $this->modifiedColumns[] = AdminLogTableMap::RESOURCE; + $this->modifiedColumns[AdminLogTableMap::RESOURCE] = true; } @@ -627,7 +627,7 @@ abstract class AdminLog implements ActiveRecordInterface if ($this->action !== $v) { $this->action = $v; - $this->modifiedColumns[] = AdminLogTableMap::ACTION; + $this->modifiedColumns[AdminLogTableMap::ACTION] = true; } @@ -648,7 +648,7 @@ abstract class AdminLog implements ActiveRecordInterface if ($this->message !== $v) { $this->message = $v; - $this->modifiedColumns[] = AdminLogTableMap::MESSAGE; + $this->modifiedColumns[AdminLogTableMap::MESSAGE] = true; } @@ -669,7 +669,7 @@ abstract class AdminLog implements ActiveRecordInterface if ($this->request !== $v) { $this->request = $v; - $this->modifiedColumns[] = AdminLogTableMap::REQUEST; + $this->modifiedColumns[AdminLogTableMap::REQUEST] = true; } @@ -689,7 +689,7 @@ abstract class AdminLog implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = AdminLogTableMap::CREATED_AT; + $this->modifiedColumns[AdminLogTableMap::CREATED_AT] = true; } } // if either are not null @@ -710,7 +710,7 @@ abstract class AdminLog implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = AdminLogTableMap::UPDATED_AT; + $this->modifiedColumns[AdminLogTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1012,7 +1012,7 @@ abstract class AdminLog implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = AdminLogTableMap::ID; + $this->modifiedColumns[AdminLogTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . AdminLogTableMap::ID . ')'); } @@ -1500,7 +1500,7 @@ abstract class AdminLog implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = AdminLogTableMap::UPDATED_AT; + $this->modifiedColumns[AdminLogTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/Area.php b/core/lib/Thelia/Model/Base/Area.php index b0efba572..12f79d0af 100644 --- a/core/lib/Thelia/Model/Base/Area.php +++ b/core/lib/Thelia/Model/Base/Area.php @@ -135,7 +135,7 @@ abstract class Area implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -146,7 +146,7 @@ abstract class Area implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -155,7 +155,7 @@ abstract class Area implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -208,8 +208,8 @@ abstract class Area implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -466,7 +466,7 @@ abstract class Area implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = AreaTableMap::ID; + $this->modifiedColumns[AreaTableMap::ID] = true; } @@ -487,7 +487,7 @@ abstract class Area implements ActiveRecordInterface if ($this->name !== $v) { $this->name = $v; - $this->modifiedColumns[] = AreaTableMap::NAME; + $this->modifiedColumns[AreaTableMap::NAME] = true; } @@ -508,7 +508,7 @@ abstract class Area implements ActiveRecordInterface if ($this->postage !== $v) { $this->postage = $v; - $this->modifiedColumns[] = AreaTableMap::POSTAGE; + $this->modifiedColumns[AreaTableMap::POSTAGE] = true; } @@ -528,7 +528,7 @@ abstract class Area implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = AreaTableMap::CREATED_AT; + $this->modifiedColumns[AreaTableMap::CREATED_AT] = true; } } // if either are not null @@ -549,7 +549,7 @@ abstract class Area implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = AreaTableMap::UPDATED_AT; + $this->modifiedColumns[AreaTableMap::UPDATED_AT] = true; } } // if either are not null @@ -875,7 +875,7 @@ abstract class Area implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = AreaTableMap::ID; + $this->modifiedColumns[AreaTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . AreaTableMap::ID . ')'); } @@ -1356,7 +1356,7 @@ abstract class Area implements ActiveRecordInterface $this->collCountriesPartial = true; } - $collCountries->getInternalIterator()->rewind(); + reset($collCountries); return $collCountries; } @@ -1574,7 +1574,7 @@ abstract class Area implements ActiveRecordInterface $this->collAreaDeliveryModulesPartial = true; } - $collAreaDeliveryModules->getInternalIterator()->rewind(); + reset($collAreaDeliveryModules); return $collAreaDeliveryModules; } @@ -1776,13 +1776,7 @@ abstract class Area implements ActiveRecordInterface } } // if ($deep) - if ($this->collCountries instanceof Collection) { - $this->collCountries->clearIterator(); - } $this->collCountries = null; - if ($this->collAreaDeliveryModules instanceof Collection) { - $this->collAreaDeliveryModules->clearIterator(); - } $this->collAreaDeliveryModules = null; } @@ -1805,7 +1799,7 @@ abstract class Area implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = AreaTableMap::UPDATED_AT; + $this->modifiedColumns[AreaTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/AreaDeliveryModule.php b/core/lib/Thelia/Model/Base/AreaDeliveryModule.php index 2873ca946..4102566c4 100644 --- a/core/lib/Thelia/Model/Base/AreaDeliveryModule.php +++ b/core/lib/Thelia/Model/Base/AreaDeliveryModule.php @@ -120,7 +120,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -131,7 +131,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -140,7 +140,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -193,8 +193,8 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -451,7 +451,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = AreaDeliveryModuleTableMap::ID; + $this->modifiedColumns[AreaDeliveryModuleTableMap::ID] = true; } @@ -472,7 +472,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface if ($this->area_id !== $v) { $this->area_id = $v; - $this->modifiedColumns[] = AreaDeliveryModuleTableMap::AREA_ID; + $this->modifiedColumns[AreaDeliveryModuleTableMap::AREA_ID] = true; } if ($this->aArea !== null && $this->aArea->getId() !== $v) { @@ -497,7 +497,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface if ($this->delivery_module_id !== $v) { $this->delivery_module_id = $v; - $this->modifiedColumns[] = AreaDeliveryModuleTableMap::DELIVERY_MODULE_ID; + $this->modifiedColumns[AreaDeliveryModuleTableMap::DELIVERY_MODULE_ID] = true; } if ($this->aModule !== null && $this->aModule->getId() !== $v) { @@ -521,7 +521,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = AreaDeliveryModuleTableMap::CREATED_AT; + $this->modifiedColumns[AreaDeliveryModuleTableMap::CREATED_AT] = true; } } // if either are not null @@ -542,7 +542,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = AreaDeliveryModuleTableMap::UPDATED_AT; + $this->modifiedColumns[AreaDeliveryModuleTableMap::UPDATED_AT] = true; } } // if either are not null @@ -856,7 +856,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = AreaDeliveryModuleTableMap::ID; + $this->modifiedColumns[AreaDeliveryModuleTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . AreaDeliveryModuleTableMap::ID . ')'); } @@ -1372,7 +1372,7 @@ abstract class AreaDeliveryModule implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = AreaDeliveryModuleTableMap::UPDATED_AT; + $this->modifiedColumns[AreaDeliveryModuleTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/Attribute.php b/core/lib/Thelia/Model/Base/Attribute.php index 9e1fc6c9c..05d30c1ca 100644 --- a/core/lib/Thelia/Model/Base/Attribute.php +++ b/core/lib/Thelia/Model/Base/Attribute.php @@ -184,7 +184,7 @@ abstract class Attribute implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -195,7 +195,7 @@ abstract class Attribute implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -204,7 +204,7 @@ abstract class Attribute implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -257,8 +257,8 @@ abstract class Attribute implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -504,7 +504,7 @@ abstract class Attribute implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = AttributeTableMap::ID; + $this->modifiedColumns[AttributeTableMap::ID] = true; } @@ -525,7 +525,7 @@ abstract class Attribute implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = AttributeTableMap::POSITION; + $this->modifiedColumns[AttributeTableMap::POSITION] = true; } @@ -545,7 +545,7 @@ abstract class Attribute implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = AttributeTableMap::CREATED_AT; + $this->modifiedColumns[AttributeTableMap::CREATED_AT] = true; } } // if either are not null @@ -566,7 +566,7 @@ abstract class Attribute implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = AttributeTableMap::UPDATED_AT; + $this->modifiedColumns[AttributeTableMap::UPDATED_AT] = true; } } // if either are not null @@ -954,7 +954,7 @@ abstract class Attribute implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = AttributeTableMap::ID; + $this->modifiedColumns[AttributeTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . AttributeTableMap::ID . ')'); } @@ -1443,7 +1443,7 @@ abstract class Attribute implements ActiveRecordInterface $this->collAttributeAvsPartial = true; } - $collAttributeAvs->getInternalIterator()->rewind(); + reset($collAttributeAvs); return $collAttributeAvs; } @@ -1661,7 +1661,7 @@ abstract class Attribute implements ActiveRecordInterface $this->collAttributeCombinationsPartial = true; } - $collAttributeCombinations->getInternalIterator()->rewind(); + reset($collAttributeCombinations); return $collAttributeCombinations; } @@ -1932,7 +1932,7 @@ abstract class Attribute implements ActiveRecordInterface $this->collAttributeTemplatesPartial = true; } - $collAttributeTemplates->getInternalIterator()->rewind(); + reset($collAttributeTemplates); return $collAttributeTemplates; } @@ -2175,7 +2175,7 @@ abstract class Attribute implements ActiveRecordInterface $this->collAttributeI18nsPartial = true; } - $collAttributeI18ns->getInternalIterator()->rewind(); + reset($collAttributeI18ns); return $collAttributeI18ns; } @@ -2560,25 +2560,10 @@ abstract class Attribute implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collAttributeAvs instanceof Collection) { - $this->collAttributeAvs->clearIterator(); - } $this->collAttributeAvs = null; - if ($this->collAttributeCombinations instanceof Collection) { - $this->collAttributeCombinations->clearIterator(); - } $this->collAttributeCombinations = null; - if ($this->collAttributeTemplates instanceof Collection) { - $this->collAttributeTemplates->clearIterator(); - } $this->collAttributeTemplates = null; - if ($this->collAttributeI18ns instanceof Collection) { - $this->collAttributeI18ns->clearIterator(); - } $this->collAttributeI18ns = null; - if ($this->collTemplates instanceof Collection) { - $this->collTemplates->clearIterator(); - } $this->collTemplates = null; } @@ -2601,7 +2586,7 @@ abstract class Attribute implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = AttributeTableMap::UPDATED_AT; + $this->modifiedColumns[AttributeTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/AttributeAv.php b/core/lib/Thelia/Model/Base/AttributeAv.php index e92a8cd12..57eddd579 100644 --- a/core/lib/Thelia/Model/Base/AttributeAv.php +++ b/core/lib/Thelia/Model/Base/AttributeAv.php @@ -156,7 +156,7 @@ abstract class AttributeAv implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -167,7 +167,7 @@ abstract class AttributeAv implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -176,7 +176,7 @@ abstract class AttributeAv implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -229,8 +229,8 @@ abstract class AttributeAv implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -487,7 +487,7 @@ abstract class AttributeAv implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = AttributeAvTableMap::ID; + $this->modifiedColumns[AttributeAvTableMap::ID] = true; } @@ -508,7 +508,7 @@ abstract class AttributeAv implements ActiveRecordInterface if ($this->attribute_id !== $v) { $this->attribute_id = $v; - $this->modifiedColumns[] = AttributeAvTableMap::ATTRIBUTE_ID; + $this->modifiedColumns[AttributeAvTableMap::ATTRIBUTE_ID] = true; } if ($this->aAttribute !== null && $this->aAttribute->getId() !== $v) { @@ -533,7 +533,7 @@ abstract class AttributeAv implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = AttributeAvTableMap::POSITION; + $this->modifiedColumns[AttributeAvTableMap::POSITION] = true; } @@ -553,7 +553,7 @@ abstract class AttributeAv implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = AttributeAvTableMap::CREATED_AT; + $this->modifiedColumns[AttributeAvTableMap::CREATED_AT] = true; } } // if either are not null @@ -574,7 +574,7 @@ abstract class AttributeAv implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = AttributeAvTableMap::UPDATED_AT; + $this->modifiedColumns[AttributeAvTableMap::UPDATED_AT] = true; } } // if either are not null @@ -915,7 +915,7 @@ abstract class AttributeAv implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = AttributeAvTableMap::ID; + $this->modifiedColumns[AttributeAvTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . AttributeAvTableMap::ID . ')'); } @@ -1450,7 +1450,7 @@ abstract class AttributeAv implements ActiveRecordInterface $this->collAttributeCombinationsPartial = true; } - $collAttributeCombinations->getInternalIterator()->rewind(); + reset($collAttributeCombinations); return $collAttributeCombinations; } @@ -1721,7 +1721,7 @@ abstract class AttributeAv implements ActiveRecordInterface $this->collAttributeAvI18nsPartial = true; } - $collAttributeAvI18ns->getInternalIterator()->rewind(); + reset($collAttributeAvI18ns); return $collAttributeAvI18ns; } @@ -1909,13 +1909,7 @@ abstract class AttributeAv implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collAttributeCombinations instanceof Collection) { - $this->collAttributeCombinations->clearIterator(); - } $this->collAttributeCombinations = null; - if ($this->collAttributeAvI18ns instanceof Collection) { - $this->collAttributeAvI18ns->clearIterator(); - } $this->collAttributeAvI18ns = null; $this->aAttribute = null; } @@ -1939,7 +1933,7 @@ abstract class AttributeAv implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = AttributeAvTableMap::UPDATED_AT; + $this->modifiedColumns[AttributeAvTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/AttributeAvI18n.php b/core/lib/Thelia/Model/Base/AttributeAvI18n.php index 106dee40c..e6ba4dd03 100644 --- a/core/lib/Thelia/Model/Base/AttributeAvI18n.php +++ b/core/lib/Thelia/Model/Base/AttributeAvI18n.php @@ -130,7 +130,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class AttributeAvI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = AttributeAvI18nTableMap::ID; + $this->modifiedColumns[AttributeAvI18nTableMap::ID] = true; } if ($this->aAttributeAv !== null && $this->aAttributeAv->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = AttributeAvI18nTableMap::LOCALE; + $this->modifiedColumns[AttributeAvI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = AttributeAvI18nTableMap::TITLE; + $this->modifiedColumns[AttributeAvI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = AttributeAvI18nTableMap::DESCRIPTION; + $this->modifiedColumns[AttributeAvI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = AttributeAvI18nTableMap::CHAPO; + $this->modifiedColumns[AttributeAvI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class AttributeAvI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = AttributeAvI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[AttributeAvI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/AttributeCombination.php b/core/lib/Thelia/Model/Base/AttributeCombination.php index 7db295561..44dc93257 100644 --- a/core/lib/Thelia/Model/Base/AttributeCombination.php +++ b/core/lib/Thelia/Model/Base/AttributeCombination.php @@ -127,7 +127,7 @@ abstract class AttributeCombination implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -138,7 +138,7 @@ abstract class AttributeCombination implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -147,7 +147,7 @@ abstract class AttributeCombination implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -200,8 +200,8 @@ abstract class AttributeCombination implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -458,7 +458,7 @@ abstract class AttributeCombination implements ActiveRecordInterface if ($this->attribute_id !== $v) { $this->attribute_id = $v; - $this->modifiedColumns[] = AttributeCombinationTableMap::ATTRIBUTE_ID; + $this->modifiedColumns[AttributeCombinationTableMap::ATTRIBUTE_ID] = true; } if ($this->aAttribute !== null && $this->aAttribute->getId() !== $v) { @@ -483,7 +483,7 @@ abstract class AttributeCombination implements ActiveRecordInterface if ($this->attribute_av_id !== $v) { $this->attribute_av_id = $v; - $this->modifiedColumns[] = AttributeCombinationTableMap::ATTRIBUTE_AV_ID; + $this->modifiedColumns[AttributeCombinationTableMap::ATTRIBUTE_AV_ID] = true; } if ($this->aAttributeAv !== null && $this->aAttributeAv->getId() !== $v) { @@ -508,7 +508,7 @@ abstract class AttributeCombination implements ActiveRecordInterface if ($this->product_sale_elements_id !== $v) { $this->product_sale_elements_id = $v; - $this->modifiedColumns[] = AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID; + $this->modifiedColumns[AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID] = true; } if ($this->aProductSaleElements !== null && $this->aProductSaleElements->getId() !== $v) { @@ -532,7 +532,7 @@ abstract class AttributeCombination implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = AttributeCombinationTableMap::CREATED_AT; + $this->modifiedColumns[AttributeCombinationTableMap::CREATED_AT] = true; } } // if either are not null @@ -553,7 +553,7 @@ abstract class AttributeCombination implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = AttributeCombinationTableMap::UPDATED_AT; + $this->modifiedColumns[AttributeCombinationTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1448,7 +1448,7 @@ abstract class AttributeCombination implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = AttributeCombinationTableMap::UPDATED_AT; + $this->modifiedColumns[AttributeCombinationTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/AttributeI18n.php b/core/lib/Thelia/Model/Base/AttributeI18n.php index f5cd9c6af..6c42fded2 100644 --- a/core/lib/Thelia/Model/Base/AttributeI18n.php +++ b/core/lib/Thelia/Model/Base/AttributeI18n.php @@ -130,7 +130,7 @@ abstract class AttributeI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class AttributeI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class AttributeI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class AttributeI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class AttributeI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = AttributeI18nTableMap::ID; + $this->modifiedColumns[AttributeI18nTableMap::ID] = true; } if ($this->aAttribute !== null && $this->aAttribute->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class AttributeI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = AttributeI18nTableMap::LOCALE; + $this->modifiedColumns[AttributeI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class AttributeI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = AttributeI18nTableMap::TITLE; + $this->modifiedColumns[AttributeI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class AttributeI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = AttributeI18nTableMap::DESCRIPTION; + $this->modifiedColumns[AttributeI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class AttributeI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = AttributeI18nTableMap::CHAPO; + $this->modifiedColumns[AttributeI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class AttributeI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = AttributeI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[AttributeI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/AttributeTemplate.php b/core/lib/Thelia/Model/Base/AttributeTemplate.php index ea3032359..144510c25 100644 --- a/core/lib/Thelia/Model/Base/AttributeTemplate.php +++ b/core/lib/Thelia/Model/Base/AttributeTemplate.php @@ -126,7 +126,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -137,7 +137,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -146,7 +146,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -199,8 +199,8 @@ abstract class AttributeTemplate implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -468,7 +468,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = AttributeTemplateTableMap::ID; + $this->modifiedColumns[AttributeTemplateTableMap::ID] = true; } @@ -489,7 +489,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface if ($this->attribute_id !== $v) { $this->attribute_id = $v; - $this->modifiedColumns[] = AttributeTemplateTableMap::ATTRIBUTE_ID; + $this->modifiedColumns[AttributeTemplateTableMap::ATTRIBUTE_ID] = true; } if ($this->aAttribute !== null && $this->aAttribute->getId() !== $v) { @@ -514,7 +514,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface if ($this->template_id !== $v) { $this->template_id = $v; - $this->modifiedColumns[] = AttributeTemplateTableMap::TEMPLATE_ID; + $this->modifiedColumns[AttributeTemplateTableMap::TEMPLATE_ID] = true; } if ($this->aTemplate !== null && $this->aTemplate->getId() !== $v) { @@ -539,7 +539,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = AttributeTemplateTableMap::POSITION; + $this->modifiedColumns[AttributeTemplateTableMap::POSITION] = true; } @@ -559,7 +559,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = AttributeTemplateTableMap::CREATED_AT; + $this->modifiedColumns[AttributeTemplateTableMap::CREATED_AT] = true; } } // if either are not null @@ -580,7 +580,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = AttributeTemplateTableMap::UPDATED_AT; + $this->modifiedColumns[AttributeTemplateTableMap::UPDATED_AT] = true; } } // if either are not null @@ -897,7 +897,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = AttributeTemplateTableMap::ID; + $this->modifiedColumns[AttributeTemplateTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . AttributeTemplateTableMap::ID . ')'); } @@ -1430,7 +1430,7 @@ abstract class AttributeTemplate implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = AttributeTemplateTableMap::UPDATED_AT; + $this->modifiedColumns[AttributeTemplateTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/Cart.php b/core/lib/Thelia/Model/Base/Cart.php index 446eae129..3d86fb87f 100644 --- a/core/lib/Thelia/Model/Base/Cart.php +++ b/core/lib/Thelia/Model/Base/Cart.php @@ -185,7 +185,7 @@ abstract class Cart implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -196,7 +196,7 @@ abstract class Cart implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -205,7 +205,7 @@ abstract class Cart implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -258,8 +258,8 @@ abstract class Cart implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -560,7 +560,7 @@ abstract class Cart implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CartTableMap::ID; + $this->modifiedColumns[CartTableMap::ID] = true; } @@ -581,7 +581,7 @@ abstract class Cart implements ActiveRecordInterface if ($this->token !== $v) { $this->token = $v; - $this->modifiedColumns[] = CartTableMap::TOKEN; + $this->modifiedColumns[CartTableMap::TOKEN] = true; } @@ -602,7 +602,7 @@ abstract class Cart implements ActiveRecordInterface if ($this->customer_id !== $v) { $this->customer_id = $v; - $this->modifiedColumns[] = CartTableMap::CUSTOMER_ID; + $this->modifiedColumns[CartTableMap::CUSTOMER_ID] = true; } if ($this->aCustomer !== null && $this->aCustomer->getId() !== $v) { @@ -627,7 +627,7 @@ abstract class Cart implements ActiveRecordInterface if ($this->address_delivery_id !== $v) { $this->address_delivery_id = $v; - $this->modifiedColumns[] = CartTableMap::ADDRESS_DELIVERY_ID; + $this->modifiedColumns[CartTableMap::ADDRESS_DELIVERY_ID] = true; } if ($this->aAddressRelatedByAddressDeliveryId !== null && $this->aAddressRelatedByAddressDeliveryId->getId() !== $v) { @@ -652,7 +652,7 @@ abstract class Cart implements ActiveRecordInterface if ($this->address_invoice_id !== $v) { $this->address_invoice_id = $v; - $this->modifiedColumns[] = CartTableMap::ADDRESS_INVOICE_ID; + $this->modifiedColumns[CartTableMap::ADDRESS_INVOICE_ID] = true; } if ($this->aAddressRelatedByAddressInvoiceId !== null && $this->aAddressRelatedByAddressInvoiceId->getId() !== $v) { @@ -677,7 +677,7 @@ abstract class Cart implements ActiveRecordInterface if ($this->currency_id !== $v) { $this->currency_id = $v; - $this->modifiedColumns[] = CartTableMap::CURRENCY_ID; + $this->modifiedColumns[CartTableMap::CURRENCY_ID] = true; } if ($this->aCurrency !== null && $this->aCurrency->getId() !== $v) { @@ -702,7 +702,7 @@ abstract class Cart implements ActiveRecordInterface if ($this->discount !== $v) { $this->discount = $v; - $this->modifiedColumns[] = CartTableMap::DISCOUNT; + $this->modifiedColumns[CartTableMap::DISCOUNT] = true; } @@ -722,7 +722,7 @@ abstract class Cart implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = CartTableMap::CREATED_AT; + $this->modifiedColumns[CartTableMap::CREATED_AT] = true; } } // if either are not null @@ -743,7 +743,7 @@ abstract class Cart implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = CartTableMap::UPDATED_AT; + $this->modifiedColumns[CartTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1114,7 +1114,7 @@ abstract class Cart implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = CartTableMap::ID; + $this->modifiedColumns[CartTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . CartTableMap::ID . ')'); } @@ -1863,7 +1863,7 @@ abstract class Cart implements ActiveRecordInterface $this->collCartItemsPartial = true; } - $collCartItems->getInternalIterator()->rewind(); + reset($collCartItems); return $collCartItems; } @@ -2090,9 +2090,6 @@ abstract class Cart implements ActiveRecordInterface } } // if ($deep) - if ($this->collCartItems instanceof Collection) { - $this->collCartItems->clearIterator(); - } $this->collCartItems = null; $this->aCustomer = null; $this->aAddressRelatedByAddressDeliveryId = null; @@ -2119,7 +2116,7 @@ abstract class Cart implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = CartTableMap::UPDATED_AT; + $this->modifiedColumns[CartTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/CartItem.php b/core/lib/Thelia/Model/Base/CartItem.php index 6b074e4e3..dcbba1ea6 100644 --- a/core/lib/Thelia/Model/Base/CartItem.php +++ b/core/lib/Thelia/Model/Base/CartItem.php @@ -177,7 +177,7 @@ abstract class CartItem implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -188,7 +188,7 @@ abstract class CartItem implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -197,7 +197,7 @@ abstract class CartItem implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -250,8 +250,8 @@ abstract class CartItem implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -583,7 +583,7 @@ abstract class CartItem implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CartItemTableMap::ID; + $this->modifiedColumns[CartItemTableMap::ID] = true; } @@ -604,7 +604,7 @@ abstract class CartItem implements ActiveRecordInterface if ($this->cart_id !== $v) { $this->cart_id = $v; - $this->modifiedColumns[] = CartItemTableMap::CART_ID; + $this->modifiedColumns[CartItemTableMap::CART_ID] = true; } if ($this->aCart !== null && $this->aCart->getId() !== $v) { @@ -629,7 +629,7 @@ abstract class CartItem implements ActiveRecordInterface if ($this->product_id !== $v) { $this->product_id = $v; - $this->modifiedColumns[] = CartItemTableMap::PRODUCT_ID; + $this->modifiedColumns[CartItemTableMap::PRODUCT_ID] = true; } if ($this->aProduct !== null && $this->aProduct->getId() !== $v) { @@ -654,7 +654,7 @@ abstract class CartItem implements ActiveRecordInterface if ($this->quantity !== $v) { $this->quantity = $v; - $this->modifiedColumns[] = CartItemTableMap::QUANTITY; + $this->modifiedColumns[CartItemTableMap::QUANTITY] = true; } @@ -675,7 +675,7 @@ abstract class CartItem implements ActiveRecordInterface if ($this->product_sale_elements_id !== $v) { $this->product_sale_elements_id = $v; - $this->modifiedColumns[] = CartItemTableMap::PRODUCT_SALE_ELEMENTS_ID; + $this->modifiedColumns[CartItemTableMap::PRODUCT_SALE_ELEMENTS_ID] = true; } if ($this->aProductSaleElements !== null && $this->aProductSaleElements->getId() !== $v) { @@ -700,7 +700,7 @@ abstract class CartItem implements ActiveRecordInterface if ($this->price !== $v) { $this->price = $v; - $this->modifiedColumns[] = CartItemTableMap::PRICE; + $this->modifiedColumns[CartItemTableMap::PRICE] = true; } @@ -721,7 +721,7 @@ abstract class CartItem implements ActiveRecordInterface if ($this->promo_price !== $v) { $this->promo_price = $v; - $this->modifiedColumns[] = CartItemTableMap::PROMO_PRICE; + $this->modifiedColumns[CartItemTableMap::PROMO_PRICE] = true; } @@ -741,7 +741,7 @@ abstract class CartItem implements ActiveRecordInterface if ($this->price_end_of_life !== null || $dt !== null) { if ($dt !== $this->price_end_of_life) { $this->price_end_of_life = $dt; - $this->modifiedColumns[] = CartItemTableMap::PRICE_END_OF_LIFE; + $this->modifiedColumns[CartItemTableMap::PRICE_END_OF_LIFE] = true; } } // if either are not null @@ -763,7 +763,7 @@ abstract class CartItem implements ActiveRecordInterface if ($this->promo !== $v) { $this->promo = $v; - $this->modifiedColumns[] = CartItemTableMap::PROMO; + $this->modifiedColumns[CartItemTableMap::PROMO] = true; } @@ -783,7 +783,7 @@ abstract class CartItem implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = CartItemTableMap::CREATED_AT; + $this->modifiedColumns[CartItemTableMap::CREATED_AT] = true; } } // if either are not null @@ -804,7 +804,7 @@ abstract class CartItem implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = CartItemTableMap::UPDATED_AT; + $this->modifiedColumns[CartItemTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1154,7 +1154,7 @@ abstract class CartItem implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = CartItemTableMap::ID; + $this->modifiedColumns[CartItemTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . CartItemTableMap::ID . ')'); } @@ -1828,7 +1828,7 @@ abstract class CartItem implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = CartItemTableMap::UPDATED_AT; + $this->modifiedColumns[CartItemTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/Category.php b/core/lib/Thelia/Model/Base/Category.php index 8b3cbceaf..dc15b8fad 100644 --- a/core/lib/Thelia/Model/Base/Category.php +++ b/core/lib/Thelia/Model/Base/Category.php @@ -265,7 +265,7 @@ abstract class Category implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -276,7 +276,7 @@ abstract class Category implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -285,7 +285,7 @@ abstract class Category implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -338,8 +338,8 @@ abstract class Category implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -649,7 +649,7 @@ abstract class Category implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CategoryTableMap::ID; + $this->modifiedColumns[CategoryTableMap::ID] = true; } @@ -670,7 +670,7 @@ abstract class Category implements ActiveRecordInterface if ($this->parent !== $v) { $this->parent = $v; - $this->modifiedColumns[] = CategoryTableMap::PARENT; + $this->modifiedColumns[CategoryTableMap::PARENT] = true; } @@ -691,7 +691,7 @@ abstract class Category implements ActiveRecordInterface if ($this->visible !== $v) { $this->visible = $v; - $this->modifiedColumns[] = CategoryTableMap::VISIBLE; + $this->modifiedColumns[CategoryTableMap::VISIBLE] = true; } @@ -712,7 +712,7 @@ abstract class Category implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = CategoryTableMap::POSITION; + $this->modifiedColumns[CategoryTableMap::POSITION] = true; } @@ -732,7 +732,7 @@ abstract class Category implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = CategoryTableMap::CREATED_AT; + $this->modifiedColumns[CategoryTableMap::CREATED_AT] = true; } } // if either are not null @@ -753,7 +753,7 @@ abstract class Category implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = CategoryTableMap::UPDATED_AT; + $this->modifiedColumns[CategoryTableMap::UPDATED_AT] = true; } } // if either are not null @@ -775,7 +775,7 @@ abstract class Category implements ActiveRecordInterface if ($this->version !== $v) { $this->version = $v; - $this->modifiedColumns[] = CategoryTableMap::VERSION; + $this->modifiedColumns[CategoryTableMap::VERSION] = true; } @@ -795,7 +795,7 @@ abstract class Category implements ActiveRecordInterface if ($this->version_created_at !== null || $dt !== null) { if ($dt !== $this->version_created_at) { $this->version_created_at = $dt; - $this->modifiedColumns[] = CategoryTableMap::VERSION_CREATED_AT; + $this->modifiedColumns[CategoryTableMap::VERSION_CREATED_AT] = true; } } // if either are not null @@ -817,7 +817,7 @@ abstract class Category implements ActiveRecordInterface if ($this->version_created_by !== $v) { $this->version_created_by = $v; - $this->modifiedColumns[] = CategoryTableMap::VERSION_CREATED_BY; + $this->modifiedColumns[CategoryTableMap::VERSION_CREATED_BY] = true; } @@ -1276,7 +1276,7 @@ abstract class Category implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = CategoryTableMap::ID; + $this->modifiedColumns[CategoryTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . CategoryTableMap::ID . ')'); } @@ -1869,7 +1869,7 @@ abstract class Category implements ActiveRecordInterface $this->collProductCategoriesPartial = true; } - $collProductCategories->getInternalIterator()->rewind(); + reset($collProductCategories); return $collProductCategories; } @@ -2115,7 +2115,7 @@ abstract class Category implements ActiveRecordInterface $this->collCategoryImagesPartial = true; } - $collCategoryImages->getInternalIterator()->rewind(); + reset($collCategoryImages); return $collCategoryImages; } @@ -2333,7 +2333,7 @@ abstract class Category implements ActiveRecordInterface $this->collCategoryDocumentsPartial = true; } - $collCategoryDocuments->getInternalIterator()->rewind(); + reset($collCategoryDocuments); return $collCategoryDocuments; } @@ -2551,7 +2551,7 @@ abstract class Category implements ActiveRecordInterface $this->collCategoryAssociatedContentsPartial = true; } - $collCategoryAssociatedContents->getInternalIterator()->rewind(); + reset($collCategoryAssociatedContents); return $collCategoryAssociatedContents; } @@ -2794,7 +2794,7 @@ abstract class Category implements ActiveRecordInterface $this->collCategoryI18nsPartial = true; } - $collCategoryI18ns->getInternalIterator()->rewind(); + reset($collCategoryI18ns); return $collCategoryI18ns; } @@ -3019,7 +3019,7 @@ abstract class Category implements ActiveRecordInterface $this->collCategoryVersionsPartial = true; } - $collCategoryVersions->getInternalIterator()->rewind(); + reset($collCategoryVersions); return $collCategoryVersions; } @@ -3416,33 +3416,12 @@ abstract class Category implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collProductCategories instanceof Collection) { - $this->collProductCategories->clearIterator(); - } $this->collProductCategories = null; - if ($this->collCategoryImages instanceof Collection) { - $this->collCategoryImages->clearIterator(); - } $this->collCategoryImages = null; - if ($this->collCategoryDocuments instanceof Collection) { - $this->collCategoryDocuments->clearIterator(); - } $this->collCategoryDocuments = null; - if ($this->collCategoryAssociatedContents instanceof Collection) { - $this->collCategoryAssociatedContents->clearIterator(); - } $this->collCategoryAssociatedContents = null; - if ($this->collCategoryI18ns instanceof Collection) { - $this->collCategoryI18ns->clearIterator(); - } $this->collCategoryI18ns = null; - if ($this->collCategoryVersions instanceof Collection) { - $this->collCategoryVersions->clearIterator(); - } $this->collCategoryVersions = null; - if ($this->collProducts instanceof Collection) { - $this->collProducts->clearIterator(); - } $this->collProducts = null; } @@ -4016,7 +3995,7 @@ abstract class Category implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = CategoryTableMap::UPDATED_AT; + $this->modifiedColumns[CategoryTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/CategoryAssociatedContent.php b/core/lib/Thelia/Model/Base/CategoryAssociatedContent.php index 31f7b0b6e..4d754da4e 100644 --- a/core/lib/Thelia/Model/Base/CategoryAssociatedContent.php +++ b/core/lib/Thelia/Model/Base/CategoryAssociatedContent.php @@ -126,7 +126,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -137,7 +137,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -146,7 +146,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -199,8 +199,8 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -468,7 +468,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CategoryAssociatedContentTableMap::ID; + $this->modifiedColumns[CategoryAssociatedContentTableMap::ID] = true; } @@ -489,7 +489,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface if ($this->category_id !== $v) { $this->category_id = $v; - $this->modifiedColumns[] = CategoryAssociatedContentTableMap::CATEGORY_ID; + $this->modifiedColumns[CategoryAssociatedContentTableMap::CATEGORY_ID] = true; } if ($this->aCategory !== null && $this->aCategory->getId() !== $v) { @@ -514,7 +514,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface if ($this->content_id !== $v) { $this->content_id = $v; - $this->modifiedColumns[] = CategoryAssociatedContentTableMap::CONTENT_ID; + $this->modifiedColumns[CategoryAssociatedContentTableMap::CONTENT_ID] = true; } if ($this->aContent !== null && $this->aContent->getId() !== $v) { @@ -539,7 +539,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = CategoryAssociatedContentTableMap::POSITION; + $this->modifiedColumns[CategoryAssociatedContentTableMap::POSITION] = true; } @@ -559,7 +559,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = CategoryAssociatedContentTableMap::CREATED_AT; + $this->modifiedColumns[CategoryAssociatedContentTableMap::CREATED_AT] = true; } } // if either are not null @@ -580,7 +580,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = CategoryAssociatedContentTableMap::UPDATED_AT; + $this->modifiedColumns[CategoryAssociatedContentTableMap::UPDATED_AT] = true; } } // if either are not null @@ -897,7 +897,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = CategoryAssociatedContentTableMap::ID; + $this->modifiedColumns[CategoryAssociatedContentTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . CategoryAssociatedContentTableMap::ID . ')'); } @@ -1430,7 +1430,7 @@ abstract class CategoryAssociatedContent implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = CategoryAssociatedContentTableMap::UPDATED_AT; + $this->modifiedColumns[CategoryAssociatedContentTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/CategoryDocument.php b/core/lib/Thelia/Model/Base/CategoryDocument.php index c39cf631a..035f4d0ff 100644 --- a/core/lib/Thelia/Model/Base/CategoryDocument.php +++ b/core/lib/Thelia/Model/Base/CategoryDocument.php @@ -148,7 +148,7 @@ abstract class CategoryDocument implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -159,7 +159,7 @@ abstract class CategoryDocument implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -168,7 +168,7 @@ abstract class CategoryDocument implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -221,8 +221,8 @@ abstract class CategoryDocument implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -490,7 +490,7 @@ abstract class CategoryDocument implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CategoryDocumentTableMap::ID; + $this->modifiedColumns[CategoryDocumentTableMap::ID] = true; } @@ -511,7 +511,7 @@ abstract class CategoryDocument implements ActiveRecordInterface if ($this->category_id !== $v) { $this->category_id = $v; - $this->modifiedColumns[] = CategoryDocumentTableMap::CATEGORY_ID; + $this->modifiedColumns[CategoryDocumentTableMap::CATEGORY_ID] = true; } if ($this->aCategory !== null && $this->aCategory->getId() !== $v) { @@ -536,7 +536,7 @@ abstract class CategoryDocument implements ActiveRecordInterface if ($this->file !== $v) { $this->file = $v; - $this->modifiedColumns[] = CategoryDocumentTableMap::FILE; + $this->modifiedColumns[CategoryDocumentTableMap::FILE] = true; } @@ -557,7 +557,7 @@ abstract class CategoryDocument implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = CategoryDocumentTableMap::POSITION; + $this->modifiedColumns[CategoryDocumentTableMap::POSITION] = true; } @@ -577,7 +577,7 @@ abstract class CategoryDocument implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = CategoryDocumentTableMap::CREATED_AT; + $this->modifiedColumns[CategoryDocumentTableMap::CREATED_AT] = true; } } // if either are not null @@ -598,7 +598,7 @@ abstract class CategoryDocument implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = CategoryDocumentTableMap::UPDATED_AT; + $this->modifiedColumns[CategoryDocumentTableMap::UPDATED_AT] = true; } } // if either are not null @@ -923,7 +923,7 @@ abstract class CategoryDocument implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = CategoryDocumentTableMap::ID; + $this->modifiedColumns[CategoryDocumentTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . CategoryDocumentTableMap::ID . ')'); } @@ -1462,7 +1462,7 @@ abstract class CategoryDocument implements ActiveRecordInterface $this->collCategoryDocumentI18nsPartial = true; } - $collCategoryDocumentI18ns->getInternalIterator()->rewind(); + reset($collCategoryDocumentI18ns); return $collCategoryDocumentI18ns; } @@ -1646,9 +1646,6 @@ abstract class CategoryDocument implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collCategoryDocumentI18ns instanceof Collection) { - $this->collCategoryDocumentI18ns->clearIterator(); - } $this->collCategoryDocumentI18ns = null; $this->aCategory = null; } @@ -1672,7 +1669,7 @@ abstract class CategoryDocument implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = CategoryDocumentTableMap::UPDATED_AT; + $this->modifiedColumns[CategoryDocumentTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/CategoryDocumentI18n.php b/core/lib/Thelia/Model/Base/CategoryDocumentI18n.php index 24f29f985..15f3fcab5 100644 --- a/core/lib/Thelia/Model/Base/CategoryDocumentI18n.php +++ b/core/lib/Thelia/Model/Base/CategoryDocumentI18n.php @@ -130,7 +130,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CategoryDocumentI18nTableMap::ID; + $this->modifiedColumns[CategoryDocumentI18nTableMap::ID] = true; } if ($this->aCategoryDocument !== null && $this->aCategoryDocument->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = CategoryDocumentI18nTableMap::LOCALE; + $this->modifiedColumns[CategoryDocumentI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = CategoryDocumentI18nTableMap::TITLE; + $this->modifiedColumns[CategoryDocumentI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = CategoryDocumentI18nTableMap::DESCRIPTION; + $this->modifiedColumns[CategoryDocumentI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = CategoryDocumentI18nTableMap::CHAPO; + $this->modifiedColumns[CategoryDocumentI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class CategoryDocumentI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = CategoryDocumentI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[CategoryDocumentI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/CategoryI18n.php b/core/lib/Thelia/Model/Base/CategoryI18n.php index 873d152a1..42db8b43f 100644 --- a/core/lib/Thelia/Model/Base/CategoryI18n.php +++ b/core/lib/Thelia/Model/Base/CategoryI18n.php @@ -148,7 +148,7 @@ abstract class CategoryI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -159,7 +159,7 @@ abstract class CategoryI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -168,7 +168,7 @@ abstract class CategoryI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -221,8 +221,8 @@ abstract class CategoryI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -505,7 +505,7 @@ abstract class CategoryI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CategoryI18nTableMap::ID; + $this->modifiedColumns[CategoryI18nTableMap::ID] = true; } if ($this->aCategory !== null && $this->aCategory->getId() !== $v) { @@ -530,7 +530,7 @@ abstract class CategoryI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = CategoryI18nTableMap::LOCALE; + $this->modifiedColumns[CategoryI18nTableMap::LOCALE] = true; } @@ -551,7 +551,7 @@ abstract class CategoryI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = CategoryI18nTableMap::TITLE; + $this->modifiedColumns[CategoryI18nTableMap::TITLE] = true; } @@ -572,7 +572,7 @@ abstract class CategoryI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = CategoryI18nTableMap::DESCRIPTION; + $this->modifiedColumns[CategoryI18nTableMap::DESCRIPTION] = true; } @@ -593,7 +593,7 @@ abstract class CategoryI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = CategoryI18nTableMap::CHAPO; + $this->modifiedColumns[CategoryI18nTableMap::CHAPO] = true; } @@ -614,7 +614,7 @@ abstract class CategoryI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = CategoryI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[CategoryI18nTableMap::POSTSCRIPTUM] = true; } @@ -635,7 +635,7 @@ abstract class CategoryI18n implements ActiveRecordInterface if ($this->meta_title !== $v) { $this->meta_title = $v; - $this->modifiedColumns[] = CategoryI18nTableMap::META_TITLE; + $this->modifiedColumns[CategoryI18nTableMap::META_TITLE] = true; } @@ -656,7 +656,7 @@ abstract class CategoryI18n implements ActiveRecordInterface if ($this->meta_description !== $v) { $this->meta_description = $v; - $this->modifiedColumns[] = CategoryI18nTableMap::META_DESCRIPTION; + $this->modifiedColumns[CategoryI18nTableMap::META_DESCRIPTION] = true; } @@ -677,7 +677,7 @@ abstract class CategoryI18n implements ActiveRecordInterface if ($this->meta_keywords !== $v) { $this->meta_keywords = $v; - $this->modifiedColumns[] = CategoryI18nTableMap::META_KEYWORDS; + $this->modifiedColumns[CategoryI18nTableMap::META_KEYWORDS] = true; } diff --git a/core/lib/Thelia/Model/Base/CategoryImage.php b/core/lib/Thelia/Model/Base/CategoryImage.php index 04963495f..f2bfdacf4 100644 --- a/core/lib/Thelia/Model/Base/CategoryImage.php +++ b/core/lib/Thelia/Model/Base/CategoryImage.php @@ -148,7 +148,7 @@ abstract class CategoryImage implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -159,7 +159,7 @@ abstract class CategoryImage implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -168,7 +168,7 @@ abstract class CategoryImage implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -221,8 +221,8 @@ abstract class CategoryImage implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -490,7 +490,7 @@ abstract class CategoryImage implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CategoryImageTableMap::ID; + $this->modifiedColumns[CategoryImageTableMap::ID] = true; } @@ -511,7 +511,7 @@ abstract class CategoryImage implements ActiveRecordInterface if ($this->category_id !== $v) { $this->category_id = $v; - $this->modifiedColumns[] = CategoryImageTableMap::CATEGORY_ID; + $this->modifiedColumns[CategoryImageTableMap::CATEGORY_ID] = true; } if ($this->aCategory !== null && $this->aCategory->getId() !== $v) { @@ -536,7 +536,7 @@ abstract class CategoryImage implements ActiveRecordInterface if ($this->file !== $v) { $this->file = $v; - $this->modifiedColumns[] = CategoryImageTableMap::FILE; + $this->modifiedColumns[CategoryImageTableMap::FILE] = true; } @@ -557,7 +557,7 @@ abstract class CategoryImage implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = CategoryImageTableMap::POSITION; + $this->modifiedColumns[CategoryImageTableMap::POSITION] = true; } @@ -577,7 +577,7 @@ abstract class CategoryImage implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = CategoryImageTableMap::CREATED_AT; + $this->modifiedColumns[CategoryImageTableMap::CREATED_AT] = true; } } // if either are not null @@ -598,7 +598,7 @@ abstract class CategoryImage implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = CategoryImageTableMap::UPDATED_AT; + $this->modifiedColumns[CategoryImageTableMap::UPDATED_AT] = true; } } // if either are not null @@ -923,7 +923,7 @@ abstract class CategoryImage implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = CategoryImageTableMap::ID; + $this->modifiedColumns[CategoryImageTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . CategoryImageTableMap::ID . ')'); } @@ -1462,7 +1462,7 @@ abstract class CategoryImage implements ActiveRecordInterface $this->collCategoryImageI18nsPartial = true; } - $collCategoryImageI18ns->getInternalIterator()->rewind(); + reset($collCategoryImageI18ns); return $collCategoryImageI18ns; } @@ -1646,9 +1646,6 @@ abstract class CategoryImage implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collCategoryImageI18ns instanceof Collection) { - $this->collCategoryImageI18ns->clearIterator(); - } $this->collCategoryImageI18ns = null; $this->aCategory = null; } @@ -1672,7 +1669,7 @@ abstract class CategoryImage implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = CategoryImageTableMap::UPDATED_AT; + $this->modifiedColumns[CategoryImageTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/CategoryImageI18n.php b/core/lib/Thelia/Model/Base/CategoryImageI18n.php index 73b9e6037..968d6c1b2 100644 --- a/core/lib/Thelia/Model/Base/CategoryImageI18n.php +++ b/core/lib/Thelia/Model/Base/CategoryImageI18n.php @@ -130,7 +130,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class CategoryImageI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CategoryImageI18nTableMap::ID; + $this->modifiedColumns[CategoryImageI18nTableMap::ID] = true; } if ($this->aCategoryImage !== null && $this->aCategoryImage->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = CategoryImageI18nTableMap::LOCALE; + $this->modifiedColumns[CategoryImageI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = CategoryImageI18nTableMap::TITLE; + $this->modifiedColumns[CategoryImageI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = CategoryImageI18nTableMap::DESCRIPTION; + $this->modifiedColumns[CategoryImageI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = CategoryImageI18nTableMap::CHAPO; + $this->modifiedColumns[CategoryImageI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class CategoryImageI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = CategoryImageI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[CategoryImageI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/CategoryVersion.php b/core/lib/Thelia/Model/Base/CategoryVersion.php index 110844ba0..69d67b252 100644 --- a/core/lib/Thelia/Model/Base/CategoryVersion.php +++ b/core/lib/Thelia/Model/Base/CategoryVersion.php @@ -150,7 +150,7 @@ abstract class CategoryVersion implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -161,7 +161,7 @@ abstract class CategoryVersion implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -170,7 +170,7 @@ abstract class CategoryVersion implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -223,8 +223,8 @@ abstract class CategoryVersion implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -534,7 +534,7 @@ abstract class CategoryVersion implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CategoryVersionTableMap::ID; + $this->modifiedColumns[CategoryVersionTableMap::ID] = true; } if ($this->aCategory !== null && $this->aCategory->getId() !== $v) { @@ -559,7 +559,7 @@ abstract class CategoryVersion implements ActiveRecordInterface if ($this->parent !== $v) { $this->parent = $v; - $this->modifiedColumns[] = CategoryVersionTableMap::PARENT; + $this->modifiedColumns[CategoryVersionTableMap::PARENT] = true; } @@ -580,7 +580,7 @@ abstract class CategoryVersion implements ActiveRecordInterface if ($this->visible !== $v) { $this->visible = $v; - $this->modifiedColumns[] = CategoryVersionTableMap::VISIBLE; + $this->modifiedColumns[CategoryVersionTableMap::VISIBLE] = true; } @@ -601,7 +601,7 @@ abstract class CategoryVersion implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = CategoryVersionTableMap::POSITION; + $this->modifiedColumns[CategoryVersionTableMap::POSITION] = true; } @@ -621,7 +621,7 @@ abstract class CategoryVersion implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = CategoryVersionTableMap::CREATED_AT; + $this->modifiedColumns[CategoryVersionTableMap::CREATED_AT] = true; } } // if either are not null @@ -642,7 +642,7 @@ abstract class CategoryVersion implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = CategoryVersionTableMap::UPDATED_AT; + $this->modifiedColumns[CategoryVersionTableMap::UPDATED_AT] = true; } } // if either are not null @@ -664,7 +664,7 @@ abstract class CategoryVersion implements ActiveRecordInterface if ($this->version !== $v) { $this->version = $v; - $this->modifiedColumns[] = CategoryVersionTableMap::VERSION; + $this->modifiedColumns[CategoryVersionTableMap::VERSION] = true; } @@ -684,7 +684,7 @@ abstract class CategoryVersion implements ActiveRecordInterface if ($this->version_created_at !== null || $dt !== null) { if ($dt !== $this->version_created_at) { $this->version_created_at = $dt; - $this->modifiedColumns[] = CategoryVersionTableMap::VERSION_CREATED_AT; + $this->modifiedColumns[CategoryVersionTableMap::VERSION_CREATED_AT] = true; } } // if either are not null @@ -706,7 +706,7 @@ abstract class CategoryVersion implements ActiveRecordInterface if ($this->version_created_by !== $v) { $this->version_created_by = $v; - $this->modifiedColumns[] = CategoryVersionTableMap::VERSION_CREATED_BY; + $this->modifiedColumns[CategoryVersionTableMap::VERSION_CREATED_BY] = true; } diff --git a/core/lib/Thelia/Model/Base/Config.php b/core/lib/Thelia/Model/Base/Config.php index b7ca01d01..2868accd3 100644 --- a/core/lib/Thelia/Model/Base/Config.php +++ b/core/lib/Thelia/Model/Base/Config.php @@ -163,7 +163,7 @@ abstract class Config implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -174,7 +174,7 @@ abstract class Config implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -183,7 +183,7 @@ abstract class Config implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -236,8 +236,8 @@ abstract class Config implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -516,7 +516,7 @@ abstract class Config implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ConfigTableMap::ID; + $this->modifiedColumns[ConfigTableMap::ID] = true; } @@ -537,7 +537,7 @@ abstract class Config implements ActiveRecordInterface if ($this->name !== $v) { $this->name = $v; - $this->modifiedColumns[] = ConfigTableMap::NAME; + $this->modifiedColumns[ConfigTableMap::NAME] = true; } @@ -558,7 +558,7 @@ abstract class Config implements ActiveRecordInterface if ($this->value !== $v) { $this->value = $v; - $this->modifiedColumns[] = ConfigTableMap::VALUE; + $this->modifiedColumns[ConfigTableMap::VALUE] = true; } @@ -579,7 +579,7 @@ abstract class Config implements ActiveRecordInterface if ($this->secured !== $v) { $this->secured = $v; - $this->modifiedColumns[] = ConfigTableMap::SECURED; + $this->modifiedColumns[ConfigTableMap::SECURED] = true; } @@ -600,7 +600,7 @@ abstract class Config implements ActiveRecordInterface if ($this->hidden !== $v) { $this->hidden = $v; - $this->modifiedColumns[] = ConfigTableMap::HIDDEN; + $this->modifiedColumns[ConfigTableMap::HIDDEN] = true; } @@ -620,7 +620,7 @@ abstract class Config implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ConfigTableMap::CREATED_AT; + $this->modifiedColumns[ConfigTableMap::CREATED_AT] = true; } } // if either are not null @@ -641,7 +641,7 @@ abstract class Config implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ConfigTableMap::UPDATED_AT; + $this->modifiedColumns[ConfigTableMap::UPDATED_AT] = true; } } // if either are not null @@ -961,7 +961,7 @@ abstract class Config implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = ConfigTableMap::ID; + $this->modifiedColumns[ConfigTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . ConfigTableMap::ID . ')'); } @@ -1462,7 +1462,7 @@ abstract class Config implements ActiveRecordInterface $this->collConfigI18nsPartial = true; } - $collConfigI18ns->getInternalIterator()->rewind(); + reset($collConfigI18ns); return $collConfigI18ns; } @@ -1648,9 +1648,6 @@ abstract class Config implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collConfigI18ns instanceof Collection) { - $this->collConfigI18ns->clearIterator(); - } $this->collConfigI18ns = null; } @@ -1673,7 +1670,7 @@ abstract class Config implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ConfigTableMap::UPDATED_AT; + $this->modifiedColumns[ConfigTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ConfigI18n.php b/core/lib/Thelia/Model/Base/ConfigI18n.php index d5a976276..b2bbc6160 100644 --- a/core/lib/Thelia/Model/Base/ConfigI18n.php +++ b/core/lib/Thelia/Model/Base/ConfigI18n.php @@ -130,7 +130,7 @@ abstract class ConfigI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class ConfigI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class ConfigI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class ConfigI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class ConfigI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ConfigI18nTableMap::ID; + $this->modifiedColumns[ConfigI18nTableMap::ID] = true; } if ($this->aConfig !== null && $this->aConfig->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class ConfigI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = ConfigI18nTableMap::LOCALE; + $this->modifiedColumns[ConfigI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class ConfigI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = ConfigI18nTableMap::TITLE; + $this->modifiedColumns[ConfigI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class ConfigI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = ConfigI18nTableMap::DESCRIPTION; + $this->modifiedColumns[ConfigI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class ConfigI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = ConfigI18nTableMap::CHAPO; + $this->modifiedColumns[ConfigI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class ConfigI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = ConfigI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[ConfigI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/Content.php b/core/lib/Thelia/Model/Base/Content.php index 1e6165d3e..67951239b 100644 --- a/core/lib/Thelia/Model/Base/Content.php +++ b/core/lib/Thelia/Model/Base/Content.php @@ -273,7 +273,7 @@ abstract class Content implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -284,7 +284,7 @@ abstract class Content implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -293,7 +293,7 @@ abstract class Content implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -346,8 +346,8 @@ abstract class Content implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -646,7 +646,7 @@ abstract class Content implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ContentTableMap::ID; + $this->modifiedColumns[ContentTableMap::ID] = true; } @@ -667,7 +667,7 @@ abstract class Content implements ActiveRecordInterface if ($this->visible !== $v) { $this->visible = $v; - $this->modifiedColumns[] = ContentTableMap::VISIBLE; + $this->modifiedColumns[ContentTableMap::VISIBLE] = true; } @@ -688,7 +688,7 @@ abstract class Content implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = ContentTableMap::POSITION; + $this->modifiedColumns[ContentTableMap::POSITION] = true; } @@ -708,7 +708,7 @@ abstract class Content implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ContentTableMap::CREATED_AT; + $this->modifiedColumns[ContentTableMap::CREATED_AT] = true; } } // if either are not null @@ -729,7 +729,7 @@ abstract class Content implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ContentTableMap::UPDATED_AT; + $this->modifiedColumns[ContentTableMap::UPDATED_AT] = true; } } // if either are not null @@ -751,7 +751,7 @@ abstract class Content implements ActiveRecordInterface if ($this->version !== $v) { $this->version = $v; - $this->modifiedColumns[] = ContentTableMap::VERSION; + $this->modifiedColumns[ContentTableMap::VERSION] = true; } @@ -771,7 +771,7 @@ abstract class Content implements ActiveRecordInterface if ($this->version_created_at !== null || $dt !== null) { if ($dt !== $this->version_created_at) { $this->version_created_at = $dt; - $this->modifiedColumns[] = ContentTableMap::VERSION_CREATED_AT; + $this->modifiedColumns[ContentTableMap::VERSION_CREATED_AT] = true; } } // if either are not null @@ -793,7 +793,7 @@ abstract class Content implements ActiveRecordInterface if ($this->version_created_by !== $v) { $this->version_created_by = $v; - $this->modifiedColumns[] = ContentTableMap::VERSION_CREATED_BY; + $this->modifiedColumns[ContentTableMap::VERSION_CREATED_BY] = true; } @@ -1268,7 +1268,7 @@ abstract class Content implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = ContentTableMap::ID; + $this->modifiedColumns[ContentTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . ContentTableMap::ID . ')'); } @@ -1857,7 +1857,7 @@ abstract class Content implements ActiveRecordInterface $this->collContentFoldersPartial = true; } - $collContentFolders->getInternalIterator()->rewind(); + reset($collContentFolders); return $collContentFolders; } @@ -2103,7 +2103,7 @@ abstract class Content implements ActiveRecordInterface $this->collContentImagesPartial = true; } - $collContentImages->getInternalIterator()->rewind(); + reset($collContentImages); return $collContentImages; } @@ -2321,7 +2321,7 @@ abstract class Content implements ActiveRecordInterface $this->collContentDocumentsPartial = true; } - $collContentDocuments->getInternalIterator()->rewind(); + reset($collContentDocuments); return $collContentDocuments; } @@ -2539,7 +2539,7 @@ abstract class Content implements ActiveRecordInterface $this->collProductAssociatedContentsPartial = true; } - $collProductAssociatedContents->getInternalIterator()->rewind(); + reset($collProductAssociatedContents); return $collProductAssociatedContents; } @@ -2782,7 +2782,7 @@ abstract class Content implements ActiveRecordInterface $this->collCategoryAssociatedContentsPartial = true; } - $collCategoryAssociatedContents->getInternalIterator()->rewind(); + reset($collCategoryAssociatedContents); return $collCategoryAssociatedContents; } @@ -3025,7 +3025,7 @@ abstract class Content implements ActiveRecordInterface $this->collContentI18nsPartial = true; } - $collContentI18ns->getInternalIterator()->rewind(); + reset($collContentI18ns); return $collContentI18ns; } @@ -3250,7 +3250,7 @@ abstract class Content implements ActiveRecordInterface $this->collContentVersionsPartial = true; } - $collContentVersions->getInternalIterator()->rewind(); + reset($collContentVersions); return $collContentVersions; } @@ -3651,37 +3651,13 @@ abstract class Content implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collContentFolders instanceof Collection) { - $this->collContentFolders->clearIterator(); - } $this->collContentFolders = null; - if ($this->collContentImages instanceof Collection) { - $this->collContentImages->clearIterator(); - } $this->collContentImages = null; - if ($this->collContentDocuments instanceof Collection) { - $this->collContentDocuments->clearIterator(); - } $this->collContentDocuments = null; - if ($this->collProductAssociatedContents instanceof Collection) { - $this->collProductAssociatedContents->clearIterator(); - } $this->collProductAssociatedContents = null; - if ($this->collCategoryAssociatedContents instanceof Collection) { - $this->collCategoryAssociatedContents->clearIterator(); - } $this->collCategoryAssociatedContents = null; - if ($this->collContentI18ns instanceof Collection) { - $this->collContentI18ns->clearIterator(); - } $this->collContentI18ns = null; - if ($this->collContentVersions instanceof Collection) { - $this->collContentVersions->clearIterator(); - } $this->collContentVersions = null; - if ($this->collFolders instanceof Collection) { - $this->collFolders->clearIterator(); - } $this->collFolders = null; } @@ -3704,7 +3680,7 @@ abstract class Content implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ContentTableMap::UPDATED_AT; + $this->modifiedColumns[ContentTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ContentDocument.php b/core/lib/Thelia/Model/Base/ContentDocument.php index 382154637..cf4e8464a 100644 --- a/core/lib/Thelia/Model/Base/ContentDocument.php +++ b/core/lib/Thelia/Model/Base/ContentDocument.php @@ -148,7 +148,7 @@ abstract class ContentDocument implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -159,7 +159,7 @@ abstract class ContentDocument implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -168,7 +168,7 @@ abstract class ContentDocument implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -221,8 +221,8 @@ abstract class ContentDocument implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -490,7 +490,7 @@ abstract class ContentDocument implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ContentDocumentTableMap::ID; + $this->modifiedColumns[ContentDocumentTableMap::ID] = true; } @@ -511,7 +511,7 @@ abstract class ContentDocument implements ActiveRecordInterface if ($this->content_id !== $v) { $this->content_id = $v; - $this->modifiedColumns[] = ContentDocumentTableMap::CONTENT_ID; + $this->modifiedColumns[ContentDocumentTableMap::CONTENT_ID] = true; } if ($this->aContent !== null && $this->aContent->getId() !== $v) { @@ -536,7 +536,7 @@ abstract class ContentDocument implements ActiveRecordInterface if ($this->file !== $v) { $this->file = $v; - $this->modifiedColumns[] = ContentDocumentTableMap::FILE; + $this->modifiedColumns[ContentDocumentTableMap::FILE] = true; } @@ -557,7 +557,7 @@ abstract class ContentDocument implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = ContentDocumentTableMap::POSITION; + $this->modifiedColumns[ContentDocumentTableMap::POSITION] = true; } @@ -577,7 +577,7 @@ abstract class ContentDocument implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ContentDocumentTableMap::CREATED_AT; + $this->modifiedColumns[ContentDocumentTableMap::CREATED_AT] = true; } } // if either are not null @@ -598,7 +598,7 @@ abstract class ContentDocument implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ContentDocumentTableMap::UPDATED_AT; + $this->modifiedColumns[ContentDocumentTableMap::UPDATED_AT] = true; } } // if either are not null @@ -923,7 +923,7 @@ abstract class ContentDocument implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = ContentDocumentTableMap::ID; + $this->modifiedColumns[ContentDocumentTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . ContentDocumentTableMap::ID . ')'); } @@ -1462,7 +1462,7 @@ abstract class ContentDocument implements ActiveRecordInterface $this->collContentDocumentI18nsPartial = true; } - $collContentDocumentI18ns->getInternalIterator()->rewind(); + reset($collContentDocumentI18ns); return $collContentDocumentI18ns; } @@ -1646,9 +1646,6 @@ abstract class ContentDocument implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collContentDocumentI18ns instanceof Collection) { - $this->collContentDocumentI18ns->clearIterator(); - } $this->collContentDocumentI18ns = null; $this->aContent = null; } @@ -1672,7 +1669,7 @@ abstract class ContentDocument implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ContentDocumentTableMap::UPDATED_AT; + $this->modifiedColumns[ContentDocumentTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ContentDocumentI18n.php b/core/lib/Thelia/Model/Base/ContentDocumentI18n.php index 22139cd78..e3f7a6a42 100644 --- a/core/lib/Thelia/Model/Base/ContentDocumentI18n.php +++ b/core/lib/Thelia/Model/Base/ContentDocumentI18n.php @@ -130,7 +130,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ContentDocumentI18nTableMap::ID; + $this->modifiedColumns[ContentDocumentI18nTableMap::ID] = true; } if ($this->aContentDocument !== null && $this->aContentDocument->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = ContentDocumentI18nTableMap::LOCALE; + $this->modifiedColumns[ContentDocumentI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = ContentDocumentI18nTableMap::TITLE; + $this->modifiedColumns[ContentDocumentI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = ContentDocumentI18nTableMap::DESCRIPTION; + $this->modifiedColumns[ContentDocumentI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = ContentDocumentI18nTableMap::CHAPO; + $this->modifiedColumns[ContentDocumentI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class ContentDocumentI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = ContentDocumentI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[ContentDocumentI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/ContentFolder.php b/core/lib/Thelia/Model/Base/ContentFolder.php index 2e4525e28..f58fcd62c 100644 --- a/core/lib/Thelia/Model/Base/ContentFolder.php +++ b/core/lib/Thelia/Model/Base/ContentFolder.php @@ -120,7 +120,7 @@ abstract class ContentFolder implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -131,7 +131,7 @@ abstract class ContentFolder implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -140,7 +140,7 @@ abstract class ContentFolder implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -193,8 +193,8 @@ abstract class ContentFolder implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -451,7 +451,7 @@ abstract class ContentFolder implements ActiveRecordInterface if ($this->content_id !== $v) { $this->content_id = $v; - $this->modifiedColumns[] = ContentFolderTableMap::CONTENT_ID; + $this->modifiedColumns[ContentFolderTableMap::CONTENT_ID] = true; } if ($this->aContent !== null && $this->aContent->getId() !== $v) { @@ -476,7 +476,7 @@ abstract class ContentFolder implements ActiveRecordInterface if ($this->folder_id !== $v) { $this->folder_id = $v; - $this->modifiedColumns[] = ContentFolderTableMap::FOLDER_ID; + $this->modifiedColumns[ContentFolderTableMap::FOLDER_ID] = true; } if ($this->aFolder !== null && $this->aFolder->getId() !== $v) { @@ -509,7 +509,7 @@ abstract class ContentFolder implements ActiveRecordInterface if ($this->default_folder !== $v) { $this->default_folder = $v; - $this->modifiedColumns[] = ContentFolderTableMap::DEFAULT_FOLDER; + $this->modifiedColumns[ContentFolderTableMap::DEFAULT_FOLDER] = true; } @@ -529,7 +529,7 @@ abstract class ContentFolder implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ContentFolderTableMap::CREATED_AT; + $this->modifiedColumns[ContentFolderTableMap::CREATED_AT] = true; } } // if either are not null @@ -550,7 +550,7 @@ abstract class ContentFolder implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ContentFolderTableMap::UPDATED_AT; + $this->modifiedColumns[ContentFolderTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1376,7 +1376,7 @@ abstract class ContentFolder implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ContentFolderTableMap::UPDATED_AT; + $this->modifiedColumns[ContentFolderTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ContentI18n.php b/core/lib/Thelia/Model/Base/ContentI18n.php index 706f8a714..904f88911 100644 --- a/core/lib/Thelia/Model/Base/ContentI18n.php +++ b/core/lib/Thelia/Model/Base/ContentI18n.php @@ -148,7 +148,7 @@ abstract class ContentI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -159,7 +159,7 @@ abstract class ContentI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -168,7 +168,7 @@ abstract class ContentI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -221,8 +221,8 @@ abstract class ContentI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -505,7 +505,7 @@ abstract class ContentI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ContentI18nTableMap::ID; + $this->modifiedColumns[ContentI18nTableMap::ID] = true; } if ($this->aContent !== null && $this->aContent->getId() !== $v) { @@ -530,7 +530,7 @@ abstract class ContentI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = ContentI18nTableMap::LOCALE; + $this->modifiedColumns[ContentI18nTableMap::LOCALE] = true; } @@ -551,7 +551,7 @@ abstract class ContentI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = ContentI18nTableMap::TITLE; + $this->modifiedColumns[ContentI18nTableMap::TITLE] = true; } @@ -572,7 +572,7 @@ abstract class ContentI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = ContentI18nTableMap::DESCRIPTION; + $this->modifiedColumns[ContentI18nTableMap::DESCRIPTION] = true; } @@ -593,7 +593,7 @@ abstract class ContentI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = ContentI18nTableMap::CHAPO; + $this->modifiedColumns[ContentI18nTableMap::CHAPO] = true; } @@ -614,7 +614,7 @@ abstract class ContentI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = ContentI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[ContentI18nTableMap::POSTSCRIPTUM] = true; } @@ -635,7 +635,7 @@ abstract class ContentI18n implements ActiveRecordInterface if ($this->meta_title !== $v) { $this->meta_title = $v; - $this->modifiedColumns[] = ContentI18nTableMap::META_TITLE; + $this->modifiedColumns[ContentI18nTableMap::META_TITLE] = true; } @@ -656,7 +656,7 @@ abstract class ContentI18n implements ActiveRecordInterface if ($this->meta_description !== $v) { $this->meta_description = $v; - $this->modifiedColumns[] = ContentI18nTableMap::META_DESCRIPTION; + $this->modifiedColumns[ContentI18nTableMap::META_DESCRIPTION] = true; } @@ -677,7 +677,7 @@ abstract class ContentI18n implements ActiveRecordInterface if ($this->meta_keywords !== $v) { $this->meta_keywords = $v; - $this->modifiedColumns[] = ContentI18nTableMap::META_KEYWORDS; + $this->modifiedColumns[ContentI18nTableMap::META_KEYWORDS] = true; } diff --git a/core/lib/Thelia/Model/Base/ContentImage.php b/core/lib/Thelia/Model/Base/ContentImage.php index 0dd622743..62fad409f 100644 --- a/core/lib/Thelia/Model/Base/ContentImage.php +++ b/core/lib/Thelia/Model/Base/ContentImage.php @@ -148,7 +148,7 @@ abstract class ContentImage implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -159,7 +159,7 @@ abstract class ContentImage implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -168,7 +168,7 @@ abstract class ContentImage implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -221,8 +221,8 @@ abstract class ContentImage implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -490,7 +490,7 @@ abstract class ContentImage implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ContentImageTableMap::ID; + $this->modifiedColumns[ContentImageTableMap::ID] = true; } @@ -511,7 +511,7 @@ abstract class ContentImage implements ActiveRecordInterface if ($this->content_id !== $v) { $this->content_id = $v; - $this->modifiedColumns[] = ContentImageTableMap::CONTENT_ID; + $this->modifiedColumns[ContentImageTableMap::CONTENT_ID] = true; } if ($this->aContent !== null && $this->aContent->getId() !== $v) { @@ -536,7 +536,7 @@ abstract class ContentImage implements ActiveRecordInterface if ($this->file !== $v) { $this->file = $v; - $this->modifiedColumns[] = ContentImageTableMap::FILE; + $this->modifiedColumns[ContentImageTableMap::FILE] = true; } @@ -557,7 +557,7 @@ abstract class ContentImage implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = ContentImageTableMap::POSITION; + $this->modifiedColumns[ContentImageTableMap::POSITION] = true; } @@ -577,7 +577,7 @@ abstract class ContentImage implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ContentImageTableMap::CREATED_AT; + $this->modifiedColumns[ContentImageTableMap::CREATED_AT] = true; } } // if either are not null @@ -598,7 +598,7 @@ abstract class ContentImage implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ContentImageTableMap::UPDATED_AT; + $this->modifiedColumns[ContentImageTableMap::UPDATED_AT] = true; } } // if either are not null @@ -923,7 +923,7 @@ abstract class ContentImage implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = ContentImageTableMap::ID; + $this->modifiedColumns[ContentImageTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . ContentImageTableMap::ID . ')'); } @@ -1462,7 +1462,7 @@ abstract class ContentImage implements ActiveRecordInterface $this->collContentImageI18nsPartial = true; } - $collContentImageI18ns->getInternalIterator()->rewind(); + reset($collContentImageI18ns); return $collContentImageI18ns; } @@ -1646,9 +1646,6 @@ abstract class ContentImage implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collContentImageI18ns instanceof Collection) { - $this->collContentImageI18ns->clearIterator(); - } $this->collContentImageI18ns = null; $this->aContent = null; } @@ -1672,7 +1669,7 @@ abstract class ContentImage implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ContentImageTableMap::UPDATED_AT; + $this->modifiedColumns[ContentImageTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ContentImageI18n.php b/core/lib/Thelia/Model/Base/ContentImageI18n.php index 996ce8b5c..b29fc6d9d 100644 --- a/core/lib/Thelia/Model/Base/ContentImageI18n.php +++ b/core/lib/Thelia/Model/Base/ContentImageI18n.php @@ -130,7 +130,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class ContentImageI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ContentImageI18nTableMap::ID; + $this->modifiedColumns[ContentImageI18nTableMap::ID] = true; } if ($this->aContentImage !== null && $this->aContentImage->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = ContentImageI18nTableMap::LOCALE; + $this->modifiedColumns[ContentImageI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = ContentImageI18nTableMap::TITLE; + $this->modifiedColumns[ContentImageI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = ContentImageI18nTableMap::DESCRIPTION; + $this->modifiedColumns[ContentImageI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = ContentImageI18nTableMap::CHAPO; + $this->modifiedColumns[ContentImageI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class ContentImageI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = ContentImageI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[ContentImageI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/ContentVersion.php b/core/lib/Thelia/Model/Base/ContentVersion.php index f4190b659..b42831072 100644 --- a/core/lib/Thelia/Model/Base/ContentVersion.php +++ b/core/lib/Thelia/Model/Base/ContentVersion.php @@ -144,7 +144,7 @@ abstract class ContentVersion implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -155,7 +155,7 @@ abstract class ContentVersion implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -164,7 +164,7 @@ abstract class ContentVersion implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -217,8 +217,8 @@ abstract class ContentVersion implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -517,7 +517,7 @@ abstract class ContentVersion implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ContentVersionTableMap::ID; + $this->modifiedColumns[ContentVersionTableMap::ID] = true; } if ($this->aContent !== null && $this->aContent->getId() !== $v) { @@ -542,7 +542,7 @@ abstract class ContentVersion implements ActiveRecordInterface if ($this->visible !== $v) { $this->visible = $v; - $this->modifiedColumns[] = ContentVersionTableMap::VISIBLE; + $this->modifiedColumns[ContentVersionTableMap::VISIBLE] = true; } @@ -563,7 +563,7 @@ abstract class ContentVersion implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = ContentVersionTableMap::POSITION; + $this->modifiedColumns[ContentVersionTableMap::POSITION] = true; } @@ -583,7 +583,7 @@ abstract class ContentVersion implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ContentVersionTableMap::CREATED_AT; + $this->modifiedColumns[ContentVersionTableMap::CREATED_AT] = true; } } // if either are not null @@ -604,7 +604,7 @@ abstract class ContentVersion implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ContentVersionTableMap::UPDATED_AT; + $this->modifiedColumns[ContentVersionTableMap::UPDATED_AT] = true; } } // if either are not null @@ -626,7 +626,7 @@ abstract class ContentVersion implements ActiveRecordInterface if ($this->version !== $v) { $this->version = $v; - $this->modifiedColumns[] = ContentVersionTableMap::VERSION; + $this->modifiedColumns[ContentVersionTableMap::VERSION] = true; } @@ -646,7 +646,7 @@ abstract class ContentVersion implements ActiveRecordInterface if ($this->version_created_at !== null || $dt !== null) { if ($dt !== $this->version_created_at) { $this->version_created_at = $dt; - $this->modifiedColumns[] = ContentVersionTableMap::VERSION_CREATED_AT; + $this->modifiedColumns[ContentVersionTableMap::VERSION_CREATED_AT] = true; } } // if either are not null @@ -668,7 +668,7 @@ abstract class ContentVersion implements ActiveRecordInterface if ($this->version_created_by !== $v) { $this->version_created_by = $v; - $this->modifiedColumns[] = ContentVersionTableMap::VERSION_CREATED_BY; + $this->modifiedColumns[ContentVersionTableMap::VERSION_CREATED_BY] = true; } diff --git a/core/lib/Thelia/Model/Base/Country.php b/core/lib/Thelia/Model/Base/Country.php index 288ad7128..aa2597ceb 100644 --- a/core/lib/Thelia/Model/Base/Country.php +++ b/core/lib/Thelia/Model/Base/Country.php @@ -210,7 +210,7 @@ abstract class Country implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -221,7 +221,7 @@ abstract class Country implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -230,7 +230,7 @@ abstract class Country implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -283,8 +283,8 @@ abstract class Country implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -585,7 +585,7 @@ abstract class Country implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CountryTableMap::ID; + $this->modifiedColumns[CountryTableMap::ID] = true; } @@ -606,7 +606,7 @@ abstract class Country implements ActiveRecordInterface if ($this->area_id !== $v) { $this->area_id = $v; - $this->modifiedColumns[] = CountryTableMap::AREA_ID; + $this->modifiedColumns[CountryTableMap::AREA_ID] = true; } if ($this->aArea !== null && $this->aArea->getId() !== $v) { @@ -631,7 +631,7 @@ abstract class Country implements ActiveRecordInterface if ($this->isocode !== $v) { $this->isocode = $v; - $this->modifiedColumns[] = CountryTableMap::ISOCODE; + $this->modifiedColumns[CountryTableMap::ISOCODE] = true; } @@ -652,7 +652,7 @@ abstract class Country implements ActiveRecordInterface if ($this->isoalpha2 !== $v) { $this->isoalpha2 = $v; - $this->modifiedColumns[] = CountryTableMap::ISOALPHA2; + $this->modifiedColumns[CountryTableMap::ISOALPHA2] = true; } @@ -673,7 +673,7 @@ abstract class Country implements ActiveRecordInterface if ($this->isoalpha3 !== $v) { $this->isoalpha3 = $v; - $this->modifiedColumns[] = CountryTableMap::ISOALPHA3; + $this->modifiedColumns[CountryTableMap::ISOALPHA3] = true; } @@ -694,7 +694,7 @@ abstract class Country implements ActiveRecordInterface if ($this->by_default !== $v) { $this->by_default = $v; - $this->modifiedColumns[] = CountryTableMap::BY_DEFAULT; + $this->modifiedColumns[CountryTableMap::BY_DEFAULT] = true; } @@ -723,7 +723,7 @@ abstract class Country implements ActiveRecordInterface if ($this->shop_country !== $v) { $this->shop_country = $v; - $this->modifiedColumns[] = CountryTableMap::SHOP_COUNTRY; + $this->modifiedColumns[CountryTableMap::SHOP_COUNTRY] = true; } @@ -743,7 +743,7 @@ abstract class Country implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = CountryTableMap::CREATED_AT; + $this->modifiedColumns[CountryTableMap::CREATED_AT] = true; } } // if either are not null @@ -764,7 +764,7 @@ abstract class Country implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = CountryTableMap::UPDATED_AT; + $this->modifiedColumns[CountryTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1144,7 +1144,7 @@ abstract class Country implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = CountryTableMap::ID; + $this->modifiedColumns[CountryTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . CountryTableMap::ID . ')'); } @@ -1755,7 +1755,7 @@ abstract class Country implements ActiveRecordInterface $this->collTaxRuleCountriesPartial = true; } - $collTaxRuleCountries->getInternalIterator()->rewind(); + reset($collTaxRuleCountries); return $collTaxRuleCountries; } @@ -2026,7 +2026,7 @@ abstract class Country implements ActiveRecordInterface $this->collAddressesPartial = true; } - $collAddresses->getInternalIterator()->rewind(); + reset($collAddresses); return $collAddresses; } @@ -2294,7 +2294,7 @@ abstract class Country implements ActiveRecordInterface $this->collCountryI18nsPartial = true; } - $collCountryI18ns->getInternalIterator()->rewind(); + reset($collCountryI18ns); return $collCountryI18ns; } @@ -2492,17 +2492,8 @@ abstract class Country implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collTaxRuleCountries instanceof Collection) { - $this->collTaxRuleCountries->clearIterator(); - } $this->collTaxRuleCountries = null; - if ($this->collAddresses instanceof Collection) { - $this->collAddresses->clearIterator(); - } $this->collAddresses = null; - if ($this->collCountryI18ns instanceof Collection) { - $this->collCountryI18ns->clearIterator(); - } $this->collCountryI18ns = null; $this->aArea = null; } @@ -2526,7 +2517,7 @@ abstract class Country implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = CountryTableMap::UPDATED_AT; + $this->modifiedColumns[CountryTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/CountryI18n.php b/core/lib/Thelia/Model/Base/CountryI18n.php index 16fcf0d0f..7088720ab 100644 --- a/core/lib/Thelia/Model/Base/CountryI18n.php +++ b/core/lib/Thelia/Model/Base/CountryI18n.php @@ -130,7 +130,7 @@ abstract class CountryI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class CountryI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class CountryI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class CountryI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class CountryI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CountryI18nTableMap::ID; + $this->modifiedColumns[CountryI18nTableMap::ID] = true; } if ($this->aCountry !== null && $this->aCountry->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class CountryI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = CountryI18nTableMap::LOCALE; + $this->modifiedColumns[CountryI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class CountryI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = CountryI18nTableMap::TITLE; + $this->modifiedColumns[CountryI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class CountryI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = CountryI18nTableMap::DESCRIPTION; + $this->modifiedColumns[CountryI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class CountryI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = CountryI18nTableMap::CHAPO; + $this->modifiedColumns[CountryI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class CountryI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = CountryI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[CountryI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/Coupon.php b/core/lib/Thelia/Model/Base/Coupon.php index e32d846c2..56d271683 100644 --- a/core/lib/Thelia/Model/Base/Coupon.php +++ b/core/lib/Thelia/Model/Base/Coupon.php @@ -232,7 +232,7 @@ abstract class Coupon implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -243,7 +243,7 @@ abstract class Coupon implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -252,7 +252,7 @@ abstract class Coupon implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -305,8 +305,8 @@ abstract class Coupon implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -682,7 +682,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CouponTableMap::ID; + $this->modifiedColumns[CouponTableMap::ID] = true; } @@ -703,7 +703,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->code !== $v) { $this->code = $v; - $this->modifiedColumns[] = CouponTableMap::CODE; + $this->modifiedColumns[CouponTableMap::CODE] = true; } @@ -724,7 +724,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->type !== $v) { $this->type = $v; - $this->modifiedColumns[] = CouponTableMap::TYPE; + $this->modifiedColumns[CouponTableMap::TYPE] = true; } @@ -745,7 +745,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->serialized_effects !== $v) { $this->serialized_effects = $v; - $this->modifiedColumns[] = CouponTableMap::SERIALIZED_EFFECTS; + $this->modifiedColumns[CouponTableMap::SERIALIZED_EFFECTS] = true; } @@ -774,7 +774,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->is_enabled !== $v) { $this->is_enabled = $v; - $this->modifiedColumns[] = CouponTableMap::IS_ENABLED; + $this->modifiedColumns[CouponTableMap::IS_ENABLED] = true; } @@ -794,7 +794,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->expiration_date !== null || $dt !== null) { if ($dt !== $this->expiration_date) { $this->expiration_date = $dt; - $this->modifiedColumns[] = CouponTableMap::EXPIRATION_DATE; + $this->modifiedColumns[CouponTableMap::EXPIRATION_DATE] = true; } } // if either are not null @@ -816,7 +816,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->max_usage !== $v) { $this->max_usage = $v; - $this->modifiedColumns[] = CouponTableMap::MAX_USAGE; + $this->modifiedColumns[CouponTableMap::MAX_USAGE] = true; } @@ -845,7 +845,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->is_cumulative !== $v) { $this->is_cumulative = $v; - $this->modifiedColumns[] = CouponTableMap::IS_CUMULATIVE; + $this->modifiedColumns[CouponTableMap::IS_CUMULATIVE] = true; } @@ -874,7 +874,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->is_removing_postage !== $v) { $this->is_removing_postage = $v; - $this->modifiedColumns[] = CouponTableMap::IS_REMOVING_POSTAGE; + $this->modifiedColumns[CouponTableMap::IS_REMOVING_POSTAGE] = true; } @@ -903,7 +903,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->is_available_on_special_offers !== $v) { $this->is_available_on_special_offers = $v; - $this->modifiedColumns[] = CouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS; + $this->modifiedColumns[CouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS] = true; } @@ -932,7 +932,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->is_used !== $v) { $this->is_used = $v; - $this->modifiedColumns[] = CouponTableMap::IS_USED; + $this->modifiedColumns[CouponTableMap::IS_USED] = true; } @@ -953,7 +953,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->serialized_conditions !== $v) { $this->serialized_conditions = $v; - $this->modifiedColumns[] = CouponTableMap::SERIALIZED_CONDITIONS; + $this->modifiedColumns[CouponTableMap::SERIALIZED_CONDITIONS] = true; } @@ -973,7 +973,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = CouponTableMap::CREATED_AT; + $this->modifiedColumns[CouponTableMap::CREATED_AT] = true; } } // if either are not null @@ -994,7 +994,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = CouponTableMap::UPDATED_AT; + $this->modifiedColumns[CouponTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1016,7 +1016,7 @@ abstract class Coupon implements ActiveRecordInterface if ($this->version !== $v) { $this->version = $v; - $this->modifiedColumns[] = CouponTableMap::VERSION; + $this->modifiedColumns[CouponTableMap::VERSION] = true; } @@ -1386,7 +1386,7 @@ abstract class Coupon implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = CouponTableMap::ID; + $this->modifiedColumns[CouponTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . CouponTableMap::ID . ')'); } @@ -2027,7 +2027,7 @@ abstract class Coupon implements ActiveRecordInterface $this->collCouponI18nsPartial = true; } - $collCouponI18ns->getInternalIterator()->rewind(); + reset($collCouponI18ns); return $collCouponI18ns; } @@ -2252,7 +2252,7 @@ abstract class Coupon implements ActiveRecordInterface $this->collCouponVersionsPartial = true; } - $collCouponVersions->getInternalIterator()->rewind(); + reset($collCouponVersions); return $collCouponVersions; } @@ -2447,13 +2447,7 @@ abstract class Coupon implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collCouponI18ns instanceof Collection) { - $this->collCouponI18ns->clearIterator(); - } $this->collCouponI18ns = null; - if ($this->collCouponVersions instanceof Collection) { - $this->collCouponVersions->clearIterator(); - } $this->collCouponVersions = null; } @@ -2476,7 +2470,7 @@ abstract class Coupon implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = CouponTableMap::UPDATED_AT; + $this->modifiedColumns[CouponTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/CouponI18n.php b/core/lib/Thelia/Model/Base/CouponI18n.php index eed23d5fe..957befd0a 100644 --- a/core/lib/Thelia/Model/Base/CouponI18n.php +++ b/core/lib/Thelia/Model/Base/CouponI18n.php @@ -124,7 +124,7 @@ abstract class CouponI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -135,7 +135,7 @@ abstract class CouponI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -144,7 +144,7 @@ abstract class CouponI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -197,8 +197,8 @@ abstract class CouponI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -437,7 +437,7 @@ abstract class CouponI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CouponI18nTableMap::ID; + $this->modifiedColumns[CouponI18nTableMap::ID] = true; } if ($this->aCoupon !== null && $this->aCoupon->getId() !== $v) { @@ -462,7 +462,7 @@ abstract class CouponI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = CouponI18nTableMap::LOCALE; + $this->modifiedColumns[CouponI18nTableMap::LOCALE] = true; } @@ -483,7 +483,7 @@ abstract class CouponI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = CouponI18nTableMap::TITLE; + $this->modifiedColumns[CouponI18nTableMap::TITLE] = true; } @@ -504,7 +504,7 @@ abstract class CouponI18n implements ActiveRecordInterface if ($this->short_description !== $v) { $this->short_description = $v; - $this->modifiedColumns[] = CouponI18nTableMap::SHORT_DESCRIPTION; + $this->modifiedColumns[CouponI18nTableMap::SHORT_DESCRIPTION] = true; } @@ -525,7 +525,7 @@ abstract class CouponI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = CouponI18nTableMap::DESCRIPTION; + $this->modifiedColumns[CouponI18nTableMap::DESCRIPTION] = true; } diff --git a/core/lib/Thelia/Model/Base/CouponVersion.php b/core/lib/Thelia/Model/Base/CouponVersion.php index f7e339693..b890f3a2e 100644 --- a/core/lib/Thelia/Model/Base/CouponVersion.php +++ b/core/lib/Thelia/Model/Base/CouponVersion.php @@ -186,7 +186,7 @@ abstract class CouponVersion implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -197,7 +197,7 @@ abstract class CouponVersion implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -206,7 +206,7 @@ abstract class CouponVersion implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -259,8 +259,8 @@ abstract class CouponVersion implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -636,7 +636,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CouponVersionTableMap::ID; + $this->modifiedColumns[CouponVersionTableMap::ID] = true; } if ($this->aCoupon !== null && $this->aCoupon->getId() !== $v) { @@ -661,7 +661,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->code !== $v) { $this->code = $v; - $this->modifiedColumns[] = CouponVersionTableMap::CODE; + $this->modifiedColumns[CouponVersionTableMap::CODE] = true; } @@ -682,7 +682,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->type !== $v) { $this->type = $v; - $this->modifiedColumns[] = CouponVersionTableMap::TYPE; + $this->modifiedColumns[CouponVersionTableMap::TYPE] = true; } @@ -703,7 +703,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->serialized_effects !== $v) { $this->serialized_effects = $v; - $this->modifiedColumns[] = CouponVersionTableMap::SERIALIZED_EFFECTS; + $this->modifiedColumns[CouponVersionTableMap::SERIALIZED_EFFECTS] = true; } @@ -732,7 +732,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->is_enabled !== $v) { $this->is_enabled = $v; - $this->modifiedColumns[] = CouponVersionTableMap::IS_ENABLED; + $this->modifiedColumns[CouponVersionTableMap::IS_ENABLED] = true; } @@ -752,7 +752,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->expiration_date !== null || $dt !== null) { if ($dt !== $this->expiration_date) { $this->expiration_date = $dt; - $this->modifiedColumns[] = CouponVersionTableMap::EXPIRATION_DATE; + $this->modifiedColumns[CouponVersionTableMap::EXPIRATION_DATE] = true; } } // if either are not null @@ -774,7 +774,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->max_usage !== $v) { $this->max_usage = $v; - $this->modifiedColumns[] = CouponVersionTableMap::MAX_USAGE; + $this->modifiedColumns[CouponVersionTableMap::MAX_USAGE] = true; } @@ -803,7 +803,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->is_cumulative !== $v) { $this->is_cumulative = $v; - $this->modifiedColumns[] = CouponVersionTableMap::IS_CUMULATIVE; + $this->modifiedColumns[CouponVersionTableMap::IS_CUMULATIVE] = true; } @@ -832,7 +832,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->is_removing_postage !== $v) { $this->is_removing_postage = $v; - $this->modifiedColumns[] = CouponVersionTableMap::IS_REMOVING_POSTAGE; + $this->modifiedColumns[CouponVersionTableMap::IS_REMOVING_POSTAGE] = true; } @@ -861,7 +861,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->is_available_on_special_offers !== $v) { $this->is_available_on_special_offers = $v; - $this->modifiedColumns[] = CouponVersionTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS; + $this->modifiedColumns[CouponVersionTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS] = true; } @@ -890,7 +890,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->is_used !== $v) { $this->is_used = $v; - $this->modifiedColumns[] = CouponVersionTableMap::IS_USED; + $this->modifiedColumns[CouponVersionTableMap::IS_USED] = true; } @@ -911,7 +911,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->serialized_conditions !== $v) { $this->serialized_conditions = $v; - $this->modifiedColumns[] = CouponVersionTableMap::SERIALIZED_CONDITIONS; + $this->modifiedColumns[CouponVersionTableMap::SERIALIZED_CONDITIONS] = true; } @@ -931,7 +931,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = CouponVersionTableMap::CREATED_AT; + $this->modifiedColumns[CouponVersionTableMap::CREATED_AT] = true; } } // if either are not null @@ -952,7 +952,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = CouponVersionTableMap::UPDATED_AT; + $this->modifiedColumns[CouponVersionTableMap::UPDATED_AT] = true; } } // if either are not null @@ -974,7 +974,7 @@ abstract class CouponVersion implements ActiveRecordInterface if ($this->version !== $v) { $this->version = $v; - $this->modifiedColumns[] = CouponVersionTableMap::VERSION; + $this->modifiedColumns[CouponVersionTableMap::VERSION] = true; } diff --git a/core/lib/Thelia/Model/Base/Currency.php b/core/lib/Thelia/Model/Base/Currency.php index d701d0e91..b88ed9800 100644 --- a/core/lib/Thelia/Model/Base/Currency.php +++ b/core/lib/Thelia/Model/Base/Currency.php @@ -195,7 +195,7 @@ abstract class Currency implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -206,7 +206,7 @@ abstract class Currency implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -215,7 +215,7 @@ abstract class Currency implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -268,8 +268,8 @@ abstract class Currency implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -559,7 +559,7 @@ abstract class Currency implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CurrencyTableMap::ID; + $this->modifiedColumns[CurrencyTableMap::ID] = true; } @@ -580,7 +580,7 @@ abstract class Currency implements ActiveRecordInterface if ($this->code !== $v) { $this->code = $v; - $this->modifiedColumns[] = CurrencyTableMap::CODE; + $this->modifiedColumns[CurrencyTableMap::CODE] = true; } @@ -601,7 +601,7 @@ abstract class Currency implements ActiveRecordInterface if ($this->symbol !== $v) { $this->symbol = $v; - $this->modifiedColumns[] = CurrencyTableMap::SYMBOL; + $this->modifiedColumns[CurrencyTableMap::SYMBOL] = true; } @@ -622,7 +622,7 @@ abstract class Currency implements ActiveRecordInterface if ($this->rate !== $v) { $this->rate = $v; - $this->modifiedColumns[] = CurrencyTableMap::RATE; + $this->modifiedColumns[CurrencyTableMap::RATE] = true; } @@ -643,7 +643,7 @@ abstract class Currency implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = CurrencyTableMap::POSITION; + $this->modifiedColumns[CurrencyTableMap::POSITION] = true; } @@ -664,7 +664,7 @@ abstract class Currency implements ActiveRecordInterface if ($this->by_default !== $v) { $this->by_default = $v; - $this->modifiedColumns[] = CurrencyTableMap::BY_DEFAULT; + $this->modifiedColumns[CurrencyTableMap::BY_DEFAULT] = true; } @@ -684,7 +684,7 @@ abstract class Currency implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = CurrencyTableMap::CREATED_AT; + $this->modifiedColumns[CurrencyTableMap::CREATED_AT] = true; } } // if either are not null @@ -705,7 +705,7 @@ abstract class Currency implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = CurrencyTableMap::UPDATED_AT; + $this->modifiedColumns[CurrencyTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1077,7 +1077,7 @@ abstract class Currency implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = CurrencyTableMap::ID; + $this->modifiedColumns[CurrencyTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . CurrencyTableMap::ID . ')'); } @@ -1630,7 +1630,7 @@ abstract class Currency implements ActiveRecordInterface $this->collOrdersPartial = true; } - $collOrders->getInternalIterator()->rewind(); + reset($collOrders); return $collOrders; } @@ -2023,7 +2023,7 @@ abstract class Currency implements ActiveRecordInterface $this->collCartsPartial = true; } - $collCarts->getInternalIterator()->rewind(); + reset($collCarts); return $collCarts; } @@ -2316,7 +2316,7 @@ abstract class Currency implements ActiveRecordInterface $this->collProductPricesPartial = true; } - $collProductPrices->getInternalIterator()->rewind(); + reset($collProductPrices); return $collProductPrices; } @@ -2562,7 +2562,7 @@ abstract class Currency implements ActiveRecordInterface $this->collCurrencyI18nsPartial = true; } - $collCurrencyI18ns->getInternalIterator()->rewind(); + reset($collCurrencyI18ns); return $collCurrencyI18ns; } @@ -2763,21 +2763,9 @@ abstract class Currency implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collOrders instanceof Collection) { - $this->collOrders->clearIterator(); - } $this->collOrders = null; - if ($this->collCarts instanceof Collection) { - $this->collCarts->clearIterator(); - } $this->collCarts = null; - if ($this->collProductPrices instanceof Collection) { - $this->collProductPrices->clearIterator(); - } $this->collProductPrices = null; - if ($this->collCurrencyI18ns instanceof Collection) { - $this->collCurrencyI18ns->clearIterator(); - } $this->collCurrencyI18ns = null; } @@ -2800,7 +2788,7 @@ abstract class Currency implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = CurrencyTableMap::UPDATED_AT; + $this->modifiedColumns[CurrencyTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/CurrencyI18n.php b/core/lib/Thelia/Model/Base/CurrencyI18n.php index 671696db9..9bde742ca 100644 --- a/core/lib/Thelia/Model/Base/CurrencyI18n.php +++ b/core/lib/Thelia/Model/Base/CurrencyI18n.php @@ -112,7 +112,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -123,7 +123,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -132,7 +132,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -185,8 +185,8 @@ abstract class CurrencyI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -403,7 +403,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CurrencyI18nTableMap::ID; + $this->modifiedColumns[CurrencyI18nTableMap::ID] = true; } if ($this->aCurrency !== null && $this->aCurrency->getId() !== $v) { @@ -428,7 +428,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = CurrencyI18nTableMap::LOCALE; + $this->modifiedColumns[CurrencyI18nTableMap::LOCALE] = true; } @@ -449,7 +449,7 @@ abstract class CurrencyI18n implements ActiveRecordInterface if ($this->name !== $v) { $this->name = $v; - $this->modifiedColumns[] = CurrencyI18nTableMap::NAME; + $this->modifiedColumns[CurrencyI18nTableMap::NAME] = true; } diff --git a/core/lib/Thelia/Model/Base/Customer.php b/core/lib/Thelia/Model/Base/Customer.php index 1273b9c02..e0450b746 100644 --- a/core/lib/Thelia/Model/Base/Customer.php +++ b/core/lib/Thelia/Model/Base/Customer.php @@ -222,7 +222,7 @@ abstract class Customer implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -233,7 +233,7 @@ abstract class Customer implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -242,7 +242,7 @@ abstract class Customer implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -295,8 +295,8 @@ abstract class Customer implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -674,7 +674,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CustomerTableMap::ID; + $this->modifiedColumns[CustomerTableMap::ID] = true; } @@ -695,7 +695,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->ref !== $v) { $this->ref = $v; - $this->modifiedColumns[] = CustomerTableMap::REF; + $this->modifiedColumns[CustomerTableMap::REF] = true; } @@ -716,7 +716,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->title_id !== $v) { $this->title_id = $v; - $this->modifiedColumns[] = CustomerTableMap::TITLE_ID; + $this->modifiedColumns[CustomerTableMap::TITLE_ID] = true; } if ($this->aCustomerTitle !== null && $this->aCustomerTitle->getId() !== $v) { @@ -741,7 +741,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->firstname !== $v) { $this->firstname = $v; - $this->modifiedColumns[] = CustomerTableMap::FIRSTNAME; + $this->modifiedColumns[CustomerTableMap::FIRSTNAME] = true; } @@ -762,7 +762,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->lastname !== $v) { $this->lastname = $v; - $this->modifiedColumns[] = CustomerTableMap::LASTNAME; + $this->modifiedColumns[CustomerTableMap::LASTNAME] = true; } @@ -783,7 +783,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->email !== $v) { $this->email = $v; - $this->modifiedColumns[] = CustomerTableMap::EMAIL; + $this->modifiedColumns[CustomerTableMap::EMAIL] = true; } @@ -804,7 +804,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->password !== $v) { $this->password = $v; - $this->modifiedColumns[] = CustomerTableMap::PASSWORD; + $this->modifiedColumns[CustomerTableMap::PASSWORD] = true; } @@ -825,7 +825,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->algo !== $v) { $this->algo = $v; - $this->modifiedColumns[] = CustomerTableMap::ALGO; + $this->modifiedColumns[CustomerTableMap::ALGO] = true; } @@ -846,7 +846,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->reseller !== $v) { $this->reseller = $v; - $this->modifiedColumns[] = CustomerTableMap::RESELLER; + $this->modifiedColumns[CustomerTableMap::RESELLER] = true; } @@ -867,7 +867,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->lang !== $v) { $this->lang = $v; - $this->modifiedColumns[] = CustomerTableMap::LANG; + $this->modifiedColumns[CustomerTableMap::LANG] = true; } @@ -888,7 +888,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->sponsor !== $v) { $this->sponsor = $v; - $this->modifiedColumns[] = CustomerTableMap::SPONSOR; + $this->modifiedColumns[CustomerTableMap::SPONSOR] = true; } @@ -909,7 +909,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->discount !== $v) { $this->discount = $v; - $this->modifiedColumns[] = CustomerTableMap::DISCOUNT; + $this->modifiedColumns[CustomerTableMap::DISCOUNT] = true; } @@ -930,7 +930,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->remember_me_token !== $v) { $this->remember_me_token = $v; - $this->modifiedColumns[] = CustomerTableMap::REMEMBER_ME_TOKEN; + $this->modifiedColumns[CustomerTableMap::REMEMBER_ME_TOKEN] = true; } @@ -951,7 +951,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->remember_me_serial !== $v) { $this->remember_me_serial = $v; - $this->modifiedColumns[] = CustomerTableMap::REMEMBER_ME_SERIAL; + $this->modifiedColumns[CustomerTableMap::REMEMBER_ME_SERIAL] = true; } @@ -971,7 +971,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = CustomerTableMap::CREATED_AT; + $this->modifiedColumns[CustomerTableMap::CREATED_AT] = true; } } // if either are not null @@ -992,7 +992,7 @@ abstract class Customer implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = CustomerTableMap::UPDATED_AT; + $this->modifiedColumns[CustomerTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1385,7 +1385,7 @@ abstract class Customer implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = CustomerTableMap::ID; + $this->modifiedColumns[CustomerTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . CustomerTableMap::ID . ')'); } @@ -2108,7 +2108,7 @@ abstract class Customer implements ActiveRecordInterface $this->collAddressesPartial = true; } - $collAddresses->getInternalIterator()->rewind(); + reset($collAddresses); return $collAddresses; } @@ -2376,7 +2376,7 @@ abstract class Customer implements ActiveRecordInterface $this->collOrdersPartial = true; } - $collOrders->getInternalIterator()->rewind(); + reset($collOrders); return $collOrders; } @@ -2769,7 +2769,7 @@ abstract class Customer implements ActiveRecordInterface $this->collCartsPartial = true; } - $collCarts->getInternalIterator()->rewind(); + reset($collCarts); return $collCarts; } @@ -3037,17 +3037,8 @@ abstract class Customer implements ActiveRecordInterface } } // if ($deep) - if ($this->collAddresses instanceof Collection) { - $this->collAddresses->clearIterator(); - } $this->collAddresses = null; - if ($this->collOrders instanceof Collection) { - $this->collOrders->clearIterator(); - } $this->collOrders = null; - if ($this->collCarts instanceof Collection) { - $this->collCarts->clearIterator(); - } $this->collCarts = null; $this->aCustomerTitle = null; } @@ -3071,7 +3062,7 @@ abstract class Customer implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = CustomerTableMap::UPDATED_AT; + $this->modifiedColumns[CustomerTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/CustomerTitle.php b/core/lib/Thelia/Model/Base/CustomerTitle.php index ccf25fa82..3d474c298 100644 --- a/core/lib/Thelia/Model/Base/CustomerTitle.php +++ b/core/lib/Thelia/Model/Base/CustomerTitle.php @@ -177,7 +177,7 @@ abstract class CustomerTitle implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -188,7 +188,7 @@ abstract class CustomerTitle implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -197,7 +197,7 @@ abstract class CustomerTitle implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -250,8 +250,8 @@ abstract class CustomerTitle implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -508,7 +508,7 @@ abstract class CustomerTitle implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CustomerTitleTableMap::ID; + $this->modifiedColumns[CustomerTitleTableMap::ID] = true; } @@ -529,7 +529,7 @@ abstract class CustomerTitle implements ActiveRecordInterface if ($this->by_default !== $v) { $this->by_default = $v; - $this->modifiedColumns[] = CustomerTitleTableMap::BY_DEFAULT; + $this->modifiedColumns[CustomerTitleTableMap::BY_DEFAULT] = true; } @@ -550,7 +550,7 @@ abstract class CustomerTitle implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = CustomerTitleTableMap::POSITION; + $this->modifiedColumns[CustomerTitleTableMap::POSITION] = true; } @@ -570,7 +570,7 @@ abstract class CustomerTitle implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = CustomerTitleTableMap::CREATED_AT; + $this->modifiedColumns[CustomerTitleTableMap::CREATED_AT] = true; } } // if either are not null @@ -591,7 +591,7 @@ abstract class CustomerTitle implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = CustomerTitleTableMap::UPDATED_AT; + $this->modifiedColumns[CustomerTitleTableMap::UPDATED_AT] = true; } } // if either are not null @@ -939,7 +939,7 @@ abstract class CustomerTitle implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = CustomerTitleTableMap::ID; + $this->modifiedColumns[CustomerTitleTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . CustomerTitleTableMap::ID . ')'); } @@ -1432,7 +1432,7 @@ abstract class CustomerTitle implements ActiveRecordInterface $this->collCustomersPartial = true; } - $collCustomers->getInternalIterator()->rewind(); + reset($collCustomers); return $collCustomers; } @@ -1650,7 +1650,7 @@ abstract class CustomerTitle implements ActiveRecordInterface $this->collAddressesPartial = true; } - $collAddresses->getInternalIterator()->rewind(); + reset($collAddresses); return $collAddresses; } @@ -1918,7 +1918,7 @@ abstract class CustomerTitle implements ActiveRecordInterface $this->collCustomerTitleI18nsPartial = true; } - $collCustomerTitleI18ns->getInternalIterator()->rewind(); + reset($collCustomerTitleI18ns); return $collCustomerTitleI18ns; } @@ -2112,17 +2112,8 @@ abstract class CustomerTitle implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collCustomers instanceof Collection) { - $this->collCustomers->clearIterator(); - } $this->collCustomers = null; - if ($this->collAddresses instanceof Collection) { - $this->collAddresses->clearIterator(); - } $this->collAddresses = null; - if ($this->collCustomerTitleI18ns instanceof Collection) { - $this->collCustomerTitleI18ns->clearIterator(); - } $this->collCustomerTitleI18ns = null; } @@ -2145,7 +2136,7 @@ abstract class CustomerTitle implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = CustomerTitleTableMap::UPDATED_AT; + $this->modifiedColumns[CustomerTitleTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/CustomerTitleI18n.php b/core/lib/Thelia/Model/Base/CustomerTitleI18n.php index b0e182acc..a0aafcba9 100644 --- a/core/lib/Thelia/Model/Base/CustomerTitleI18n.php +++ b/core/lib/Thelia/Model/Base/CustomerTitleI18n.php @@ -118,7 +118,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -129,7 +129,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -138,7 +138,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -191,8 +191,8 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -420,7 +420,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = CustomerTitleI18nTableMap::ID; + $this->modifiedColumns[CustomerTitleI18nTableMap::ID] = true; } if ($this->aCustomerTitle !== null && $this->aCustomerTitle->getId() !== $v) { @@ -445,7 +445,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = CustomerTitleI18nTableMap::LOCALE; + $this->modifiedColumns[CustomerTitleI18nTableMap::LOCALE] = true; } @@ -466,7 +466,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface if ($this->short !== $v) { $this->short = $v; - $this->modifiedColumns[] = CustomerTitleI18nTableMap::SHORT; + $this->modifiedColumns[CustomerTitleI18nTableMap::SHORT] = true; } @@ -487,7 +487,7 @@ abstract class CustomerTitleI18n implements ActiveRecordInterface if ($this->long !== $v) { $this->long = $v; - $this->modifiedColumns[] = CustomerTitleI18nTableMap::LONG; + $this->modifiedColumns[CustomerTitleI18nTableMap::LONG] = true; } diff --git a/core/lib/Thelia/Model/Base/Feature.php b/core/lib/Thelia/Model/Base/Feature.php index fbe4448f8..c44ab606e 100644 --- a/core/lib/Thelia/Model/Base/Feature.php +++ b/core/lib/Thelia/Model/Base/Feature.php @@ -204,7 +204,7 @@ abstract class Feature implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -215,7 +215,7 @@ abstract class Feature implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -224,7 +224,7 @@ abstract class Feature implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -277,8 +277,8 @@ abstract class Feature implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -535,7 +535,7 @@ abstract class Feature implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = FeatureTableMap::ID; + $this->modifiedColumns[FeatureTableMap::ID] = true; } @@ -556,7 +556,7 @@ abstract class Feature implements ActiveRecordInterface if ($this->visible !== $v) { $this->visible = $v; - $this->modifiedColumns[] = FeatureTableMap::VISIBLE; + $this->modifiedColumns[FeatureTableMap::VISIBLE] = true; } @@ -577,7 +577,7 @@ abstract class Feature implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = FeatureTableMap::POSITION; + $this->modifiedColumns[FeatureTableMap::POSITION] = true; } @@ -597,7 +597,7 @@ abstract class Feature implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = FeatureTableMap::CREATED_AT; + $this->modifiedColumns[FeatureTableMap::CREATED_AT] = true; } } // if either are not null @@ -618,7 +618,7 @@ abstract class Feature implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = FeatureTableMap::UPDATED_AT; + $this->modifiedColumns[FeatureTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1013,7 +1013,7 @@ abstract class Feature implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = FeatureTableMap::ID; + $this->modifiedColumns[FeatureTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . FeatureTableMap::ID . ')'); } @@ -1518,7 +1518,7 @@ abstract class Feature implements ActiveRecordInterface $this->collFeatureAvsPartial = true; } - $collFeatureAvs->getInternalIterator()->rewind(); + reset($collFeatureAvs); return $collFeatureAvs; } @@ -1736,7 +1736,7 @@ abstract class Feature implements ActiveRecordInterface $this->collFeatureProductsPartial = true; } - $collFeatureProducts->getInternalIterator()->rewind(); + reset($collFeatureProducts); return $collFeatureProducts; } @@ -2004,7 +2004,7 @@ abstract class Feature implements ActiveRecordInterface $this->collFeatureTemplatesPartial = true; } - $collFeatureTemplates->getInternalIterator()->rewind(); + reset($collFeatureTemplates); return $collFeatureTemplates; } @@ -2247,7 +2247,7 @@ abstract class Feature implements ActiveRecordInterface $this->collFeatureI18nsPartial = true; } - $collFeatureI18ns->getInternalIterator()->rewind(); + reset($collFeatureI18ns); return $collFeatureI18ns; } @@ -2634,25 +2634,10 @@ abstract class Feature implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collFeatureAvs instanceof Collection) { - $this->collFeatureAvs->clearIterator(); - } $this->collFeatureAvs = null; - if ($this->collFeatureProducts instanceof Collection) { - $this->collFeatureProducts->clearIterator(); - } $this->collFeatureProducts = null; - if ($this->collFeatureTemplates instanceof Collection) { - $this->collFeatureTemplates->clearIterator(); - } $this->collFeatureTemplates = null; - if ($this->collFeatureI18ns instanceof Collection) { - $this->collFeatureI18ns->clearIterator(); - } $this->collFeatureI18ns = null; - if ($this->collTemplates instanceof Collection) { - $this->collTemplates->clearIterator(); - } $this->collTemplates = null; } @@ -2675,7 +2660,7 @@ abstract class Feature implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = FeatureTableMap::UPDATED_AT; + $this->modifiedColumns[FeatureTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/FeatureAv.php b/core/lib/Thelia/Model/Base/FeatureAv.php index bc19f98a9..97fd6af1b 100644 --- a/core/lib/Thelia/Model/Base/FeatureAv.php +++ b/core/lib/Thelia/Model/Base/FeatureAv.php @@ -156,7 +156,7 @@ abstract class FeatureAv implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -167,7 +167,7 @@ abstract class FeatureAv implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -176,7 +176,7 @@ abstract class FeatureAv implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -229,8 +229,8 @@ abstract class FeatureAv implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -487,7 +487,7 @@ abstract class FeatureAv implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = FeatureAvTableMap::ID; + $this->modifiedColumns[FeatureAvTableMap::ID] = true; } @@ -508,7 +508,7 @@ abstract class FeatureAv implements ActiveRecordInterface if ($this->feature_id !== $v) { $this->feature_id = $v; - $this->modifiedColumns[] = FeatureAvTableMap::FEATURE_ID; + $this->modifiedColumns[FeatureAvTableMap::FEATURE_ID] = true; } if ($this->aFeature !== null && $this->aFeature->getId() !== $v) { @@ -533,7 +533,7 @@ abstract class FeatureAv implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = FeatureAvTableMap::POSITION; + $this->modifiedColumns[FeatureAvTableMap::POSITION] = true; } @@ -553,7 +553,7 @@ abstract class FeatureAv implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = FeatureAvTableMap::CREATED_AT; + $this->modifiedColumns[FeatureAvTableMap::CREATED_AT] = true; } } // if either are not null @@ -574,7 +574,7 @@ abstract class FeatureAv implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = FeatureAvTableMap::UPDATED_AT; + $this->modifiedColumns[FeatureAvTableMap::UPDATED_AT] = true; } } // if either are not null @@ -915,7 +915,7 @@ abstract class FeatureAv implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = FeatureAvTableMap::ID; + $this->modifiedColumns[FeatureAvTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . FeatureAvTableMap::ID . ')'); } @@ -1450,7 +1450,7 @@ abstract class FeatureAv implements ActiveRecordInterface $this->collFeatureProductsPartial = true; } - $collFeatureProducts->getInternalIterator()->rewind(); + reset($collFeatureProducts); return $collFeatureProducts; } @@ -1718,7 +1718,7 @@ abstract class FeatureAv implements ActiveRecordInterface $this->collFeatureAvI18nsPartial = true; } - $collFeatureAvI18ns->getInternalIterator()->rewind(); + reset($collFeatureAvI18ns); return $collFeatureAvI18ns; } @@ -1906,13 +1906,7 @@ abstract class FeatureAv implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collFeatureProducts instanceof Collection) { - $this->collFeatureProducts->clearIterator(); - } $this->collFeatureProducts = null; - if ($this->collFeatureAvI18ns instanceof Collection) { - $this->collFeatureAvI18ns->clearIterator(); - } $this->collFeatureAvI18ns = null; $this->aFeature = null; } @@ -1936,7 +1930,7 @@ abstract class FeatureAv implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = FeatureAvTableMap::UPDATED_AT; + $this->modifiedColumns[FeatureAvTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/FeatureAvI18n.php b/core/lib/Thelia/Model/Base/FeatureAvI18n.php index 658f4fcc4..8b3d2c93c 100644 --- a/core/lib/Thelia/Model/Base/FeatureAvI18n.php +++ b/core/lib/Thelia/Model/Base/FeatureAvI18n.php @@ -130,7 +130,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class FeatureAvI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = FeatureAvI18nTableMap::ID; + $this->modifiedColumns[FeatureAvI18nTableMap::ID] = true; } if ($this->aFeatureAv !== null && $this->aFeatureAv->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = FeatureAvI18nTableMap::LOCALE; + $this->modifiedColumns[FeatureAvI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = FeatureAvI18nTableMap::TITLE; + $this->modifiedColumns[FeatureAvI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = FeatureAvI18nTableMap::DESCRIPTION; + $this->modifiedColumns[FeatureAvI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = FeatureAvI18nTableMap::CHAPO; + $this->modifiedColumns[FeatureAvI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class FeatureAvI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = FeatureAvI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[FeatureAvI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/FeatureI18n.php b/core/lib/Thelia/Model/Base/FeatureI18n.php index f11699fb9..1a9bbc244 100644 --- a/core/lib/Thelia/Model/Base/FeatureI18n.php +++ b/core/lib/Thelia/Model/Base/FeatureI18n.php @@ -130,7 +130,7 @@ abstract class FeatureI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class FeatureI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class FeatureI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class FeatureI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class FeatureI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = FeatureI18nTableMap::ID; + $this->modifiedColumns[FeatureI18nTableMap::ID] = true; } if ($this->aFeature !== null && $this->aFeature->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class FeatureI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = FeatureI18nTableMap::LOCALE; + $this->modifiedColumns[FeatureI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class FeatureI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = FeatureI18nTableMap::TITLE; + $this->modifiedColumns[FeatureI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class FeatureI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = FeatureI18nTableMap::DESCRIPTION; + $this->modifiedColumns[FeatureI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class FeatureI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = FeatureI18nTableMap::CHAPO; + $this->modifiedColumns[FeatureI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class FeatureI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = FeatureI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[FeatureI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/FeatureProduct.php b/core/lib/Thelia/Model/Base/FeatureProduct.php index 151f1cc6a..c7b08e763 100644 --- a/core/lib/Thelia/Model/Base/FeatureProduct.php +++ b/core/lib/Thelia/Model/Base/FeatureProduct.php @@ -145,7 +145,7 @@ abstract class FeatureProduct implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -156,7 +156,7 @@ abstract class FeatureProduct implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -165,7 +165,7 @@ abstract class FeatureProduct implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -218,8 +218,8 @@ abstract class FeatureProduct implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -509,7 +509,7 @@ abstract class FeatureProduct implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = FeatureProductTableMap::ID; + $this->modifiedColumns[FeatureProductTableMap::ID] = true; } @@ -530,7 +530,7 @@ abstract class FeatureProduct implements ActiveRecordInterface if ($this->product_id !== $v) { $this->product_id = $v; - $this->modifiedColumns[] = FeatureProductTableMap::PRODUCT_ID; + $this->modifiedColumns[FeatureProductTableMap::PRODUCT_ID] = true; } if ($this->aProduct !== null && $this->aProduct->getId() !== $v) { @@ -555,7 +555,7 @@ abstract class FeatureProduct implements ActiveRecordInterface if ($this->feature_id !== $v) { $this->feature_id = $v; - $this->modifiedColumns[] = FeatureProductTableMap::FEATURE_ID; + $this->modifiedColumns[FeatureProductTableMap::FEATURE_ID] = true; } if ($this->aFeature !== null && $this->aFeature->getId() !== $v) { @@ -580,7 +580,7 @@ abstract class FeatureProduct implements ActiveRecordInterface if ($this->feature_av_id !== $v) { $this->feature_av_id = $v; - $this->modifiedColumns[] = FeatureProductTableMap::FEATURE_AV_ID; + $this->modifiedColumns[FeatureProductTableMap::FEATURE_AV_ID] = true; } if ($this->aFeatureAv !== null && $this->aFeatureAv->getId() !== $v) { @@ -605,7 +605,7 @@ abstract class FeatureProduct implements ActiveRecordInterface if ($this->free_text_value !== $v) { $this->free_text_value = $v; - $this->modifiedColumns[] = FeatureProductTableMap::FREE_TEXT_VALUE; + $this->modifiedColumns[FeatureProductTableMap::FREE_TEXT_VALUE] = true; } @@ -626,7 +626,7 @@ abstract class FeatureProduct implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = FeatureProductTableMap::POSITION; + $this->modifiedColumns[FeatureProductTableMap::POSITION] = true; } @@ -646,7 +646,7 @@ abstract class FeatureProduct implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = FeatureProductTableMap::CREATED_AT; + $this->modifiedColumns[FeatureProductTableMap::CREATED_AT] = true; } } // if either are not null @@ -667,7 +667,7 @@ abstract class FeatureProduct implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = FeatureProductTableMap::UPDATED_AT; + $this->modifiedColumns[FeatureProductTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1001,7 +1001,7 @@ abstract class FeatureProduct implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = FeatureProductTableMap::ID; + $this->modifiedColumns[FeatureProductTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . FeatureProductTableMap::ID . ')'); } @@ -1623,7 +1623,7 @@ abstract class FeatureProduct implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = FeatureProductTableMap::UPDATED_AT; + $this->modifiedColumns[FeatureProductTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/FeatureTemplate.php b/core/lib/Thelia/Model/Base/FeatureTemplate.php index 920c16cde..b837cb3b3 100644 --- a/core/lib/Thelia/Model/Base/FeatureTemplate.php +++ b/core/lib/Thelia/Model/Base/FeatureTemplate.php @@ -126,7 +126,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -137,7 +137,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -146,7 +146,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -199,8 +199,8 @@ abstract class FeatureTemplate implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -468,7 +468,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = FeatureTemplateTableMap::ID; + $this->modifiedColumns[FeatureTemplateTableMap::ID] = true; } @@ -489,7 +489,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface if ($this->feature_id !== $v) { $this->feature_id = $v; - $this->modifiedColumns[] = FeatureTemplateTableMap::FEATURE_ID; + $this->modifiedColumns[FeatureTemplateTableMap::FEATURE_ID] = true; } if ($this->aFeature !== null && $this->aFeature->getId() !== $v) { @@ -514,7 +514,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface if ($this->template_id !== $v) { $this->template_id = $v; - $this->modifiedColumns[] = FeatureTemplateTableMap::TEMPLATE_ID; + $this->modifiedColumns[FeatureTemplateTableMap::TEMPLATE_ID] = true; } if ($this->aTemplate !== null && $this->aTemplate->getId() !== $v) { @@ -539,7 +539,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = FeatureTemplateTableMap::POSITION; + $this->modifiedColumns[FeatureTemplateTableMap::POSITION] = true; } @@ -559,7 +559,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = FeatureTemplateTableMap::CREATED_AT; + $this->modifiedColumns[FeatureTemplateTableMap::CREATED_AT] = true; } } // if either are not null @@ -580,7 +580,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = FeatureTemplateTableMap::UPDATED_AT; + $this->modifiedColumns[FeatureTemplateTableMap::UPDATED_AT] = true; } } // if either are not null @@ -897,7 +897,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = FeatureTemplateTableMap::ID; + $this->modifiedColumns[FeatureTemplateTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . FeatureTemplateTableMap::ID . ')'); } @@ -1430,7 +1430,7 @@ abstract class FeatureTemplate implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = FeatureTemplateTableMap::UPDATED_AT; + $this->modifiedColumns[FeatureTemplateTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/Folder.php b/core/lib/Thelia/Model/Base/Folder.php index 6b08987e0..c0529ebb6 100644 --- a/core/lib/Thelia/Model/Base/Folder.php +++ b/core/lib/Thelia/Model/Base/Folder.php @@ -251,7 +251,7 @@ abstract class Folder implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -262,7 +262,7 @@ abstract class Folder implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -271,7 +271,7 @@ abstract class Folder implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -324,8 +324,8 @@ abstract class Folder implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -635,7 +635,7 @@ abstract class Folder implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = FolderTableMap::ID; + $this->modifiedColumns[FolderTableMap::ID] = true; } @@ -656,7 +656,7 @@ abstract class Folder implements ActiveRecordInterface if ($this->parent !== $v) { $this->parent = $v; - $this->modifiedColumns[] = FolderTableMap::PARENT; + $this->modifiedColumns[FolderTableMap::PARENT] = true; } @@ -677,7 +677,7 @@ abstract class Folder implements ActiveRecordInterface if ($this->visible !== $v) { $this->visible = $v; - $this->modifiedColumns[] = FolderTableMap::VISIBLE; + $this->modifiedColumns[FolderTableMap::VISIBLE] = true; } @@ -698,7 +698,7 @@ abstract class Folder implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = FolderTableMap::POSITION; + $this->modifiedColumns[FolderTableMap::POSITION] = true; } @@ -718,7 +718,7 @@ abstract class Folder implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = FolderTableMap::CREATED_AT; + $this->modifiedColumns[FolderTableMap::CREATED_AT] = true; } } // if either are not null @@ -739,7 +739,7 @@ abstract class Folder implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = FolderTableMap::UPDATED_AT; + $this->modifiedColumns[FolderTableMap::UPDATED_AT] = true; } } // if either are not null @@ -761,7 +761,7 @@ abstract class Folder implements ActiveRecordInterface if ($this->version !== $v) { $this->version = $v; - $this->modifiedColumns[] = FolderTableMap::VERSION; + $this->modifiedColumns[FolderTableMap::VERSION] = true; } @@ -781,7 +781,7 @@ abstract class Folder implements ActiveRecordInterface if ($this->version_created_at !== null || $dt !== null) { if ($dt !== $this->version_created_at) { $this->version_created_at = $dt; - $this->modifiedColumns[] = FolderTableMap::VERSION_CREATED_AT; + $this->modifiedColumns[FolderTableMap::VERSION_CREATED_AT] = true; } } // if either are not null @@ -803,7 +803,7 @@ abstract class Folder implements ActiveRecordInterface if ($this->version_created_by !== $v) { $this->version_created_by = $v; - $this->modifiedColumns[] = FolderTableMap::VERSION_CREATED_BY; + $this->modifiedColumns[FolderTableMap::VERSION_CREATED_BY] = true; } @@ -1243,7 +1243,7 @@ abstract class Folder implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = FolderTableMap::ID; + $this->modifiedColumns[FolderTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . FolderTableMap::ID . ')'); } @@ -1824,7 +1824,7 @@ abstract class Folder implements ActiveRecordInterface $this->collContentFoldersPartial = true; } - $collContentFolders->getInternalIterator()->rewind(); + reset($collContentFolders); return $collContentFolders; } @@ -2070,7 +2070,7 @@ abstract class Folder implements ActiveRecordInterface $this->collFolderImagesPartial = true; } - $collFolderImages->getInternalIterator()->rewind(); + reset($collFolderImages); return $collFolderImages; } @@ -2288,7 +2288,7 @@ abstract class Folder implements ActiveRecordInterface $this->collFolderDocumentsPartial = true; } - $collFolderDocuments->getInternalIterator()->rewind(); + reset($collFolderDocuments); return $collFolderDocuments; } @@ -2506,7 +2506,7 @@ abstract class Folder implements ActiveRecordInterface $this->collFolderI18nsPartial = true; } - $collFolderI18ns->getInternalIterator()->rewind(); + reset($collFolderI18ns); return $collFolderI18ns; } @@ -2731,7 +2731,7 @@ abstract class Folder implements ActiveRecordInterface $this->collFolderVersionsPartial = true; } - $collFolderVersions->getInternalIterator()->rewind(); + reset($collFolderVersions); return $collFolderVersions; } @@ -3123,29 +3123,11 @@ abstract class Folder implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collContentFolders instanceof Collection) { - $this->collContentFolders->clearIterator(); - } $this->collContentFolders = null; - if ($this->collFolderImages instanceof Collection) { - $this->collFolderImages->clearIterator(); - } $this->collFolderImages = null; - if ($this->collFolderDocuments instanceof Collection) { - $this->collFolderDocuments->clearIterator(); - } $this->collFolderDocuments = null; - if ($this->collFolderI18ns instanceof Collection) { - $this->collFolderI18ns->clearIterator(); - } $this->collFolderI18ns = null; - if ($this->collFolderVersions instanceof Collection) { - $this->collFolderVersions->clearIterator(); - } $this->collFolderVersions = null; - if ($this->collContents instanceof Collection) { - $this->collContents->clearIterator(); - } $this->collContents = null; } @@ -3168,7 +3150,7 @@ abstract class Folder implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = FolderTableMap::UPDATED_AT; + $this->modifiedColumns[FolderTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/FolderDocument.php b/core/lib/Thelia/Model/Base/FolderDocument.php index abd2b3429..3abd5e1c6 100644 --- a/core/lib/Thelia/Model/Base/FolderDocument.php +++ b/core/lib/Thelia/Model/Base/FolderDocument.php @@ -148,7 +148,7 @@ abstract class FolderDocument implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -159,7 +159,7 @@ abstract class FolderDocument implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -168,7 +168,7 @@ abstract class FolderDocument implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -221,8 +221,8 @@ abstract class FolderDocument implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -490,7 +490,7 @@ abstract class FolderDocument implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = FolderDocumentTableMap::ID; + $this->modifiedColumns[FolderDocumentTableMap::ID] = true; } @@ -511,7 +511,7 @@ abstract class FolderDocument implements ActiveRecordInterface if ($this->folder_id !== $v) { $this->folder_id = $v; - $this->modifiedColumns[] = FolderDocumentTableMap::FOLDER_ID; + $this->modifiedColumns[FolderDocumentTableMap::FOLDER_ID] = true; } if ($this->aFolder !== null && $this->aFolder->getId() !== $v) { @@ -536,7 +536,7 @@ abstract class FolderDocument implements ActiveRecordInterface if ($this->file !== $v) { $this->file = $v; - $this->modifiedColumns[] = FolderDocumentTableMap::FILE; + $this->modifiedColumns[FolderDocumentTableMap::FILE] = true; } @@ -557,7 +557,7 @@ abstract class FolderDocument implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = FolderDocumentTableMap::POSITION; + $this->modifiedColumns[FolderDocumentTableMap::POSITION] = true; } @@ -577,7 +577,7 @@ abstract class FolderDocument implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = FolderDocumentTableMap::CREATED_AT; + $this->modifiedColumns[FolderDocumentTableMap::CREATED_AT] = true; } } // if either are not null @@ -598,7 +598,7 @@ abstract class FolderDocument implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = FolderDocumentTableMap::UPDATED_AT; + $this->modifiedColumns[FolderDocumentTableMap::UPDATED_AT] = true; } } // if either are not null @@ -923,7 +923,7 @@ abstract class FolderDocument implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = FolderDocumentTableMap::ID; + $this->modifiedColumns[FolderDocumentTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . FolderDocumentTableMap::ID . ')'); } @@ -1462,7 +1462,7 @@ abstract class FolderDocument implements ActiveRecordInterface $this->collFolderDocumentI18nsPartial = true; } - $collFolderDocumentI18ns->getInternalIterator()->rewind(); + reset($collFolderDocumentI18ns); return $collFolderDocumentI18ns; } @@ -1646,9 +1646,6 @@ abstract class FolderDocument implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collFolderDocumentI18ns instanceof Collection) { - $this->collFolderDocumentI18ns->clearIterator(); - } $this->collFolderDocumentI18ns = null; $this->aFolder = null; } @@ -1672,7 +1669,7 @@ abstract class FolderDocument implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = FolderDocumentTableMap::UPDATED_AT; + $this->modifiedColumns[FolderDocumentTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/FolderDocumentI18n.php b/core/lib/Thelia/Model/Base/FolderDocumentI18n.php index a24ea7482..57373f362 100644 --- a/core/lib/Thelia/Model/Base/FolderDocumentI18n.php +++ b/core/lib/Thelia/Model/Base/FolderDocumentI18n.php @@ -130,7 +130,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = FolderDocumentI18nTableMap::ID; + $this->modifiedColumns[FolderDocumentI18nTableMap::ID] = true; } if ($this->aFolderDocument !== null && $this->aFolderDocument->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = FolderDocumentI18nTableMap::LOCALE; + $this->modifiedColumns[FolderDocumentI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = FolderDocumentI18nTableMap::TITLE; + $this->modifiedColumns[FolderDocumentI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = FolderDocumentI18nTableMap::DESCRIPTION; + $this->modifiedColumns[FolderDocumentI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = FolderDocumentI18nTableMap::CHAPO; + $this->modifiedColumns[FolderDocumentI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class FolderDocumentI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = FolderDocumentI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[FolderDocumentI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/FolderI18n.php b/core/lib/Thelia/Model/Base/FolderI18n.php index ef0da9d3e..116d2b17c 100644 --- a/core/lib/Thelia/Model/Base/FolderI18n.php +++ b/core/lib/Thelia/Model/Base/FolderI18n.php @@ -148,7 +148,7 @@ abstract class FolderI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -159,7 +159,7 @@ abstract class FolderI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -168,7 +168,7 @@ abstract class FolderI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -221,8 +221,8 @@ abstract class FolderI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -505,7 +505,7 @@ abstract class FolderI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = FolderI18nTableMap::ID; + $this->modifiedColumns[FolderI18nTableMap::ID] = true; } if ($this->aFolder !== null && $this->aFolder->getId() !== $v) { @@ -530,7 +530,7 @@ abstract class FolderI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = FolderI18nTableMap::LOCALE; + $this->modifiedColumns[FolderI18nTableMap::LOCALE] = true; } @@ -551,7 +551,7 @@ abstract class FolderI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = FolderI18nTableMap::TITLE; + $this->modifiedColumns[FolderI18nTableMap::TITLE] = true; } @@ -572,7 +572,7 @@ abstract class FolderI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = FolderI18nTableMap::DESCRIPTION; + $this->modifiedColumns[FolderI18nTableMap::DESCRIPTION] = true; } @@ -593,7 +593,7 @@ abstract class FolderI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = FolderI18nTableMap::CHAPO; + $this->modifiedColumns[FolderI18nTableMap::CHAPO] = true; } @@ -614,7 +614,7 @@ abstract class FolderI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = FolderI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[FolderI18nTableMap::POSTSCRIPTUM] = true; } @@ -635,7 +635,7 @@ abstract class FolderI18n implements ActiveRecordInterface if ($this->meta_title !== $v) { $this->meta_title = $v; - $this->modifiedColumns[] = FolderI18nTableMap::META_TITLE; + $this->modifiedColumns[FolderI18nTableMap::META_TITLE] = true; } @@ -656,7 +656,7 @@ abstract class FolderI18n implements ActiveRecordInterface if ($this->meta_description !== $v) { $this->meta_description = $v; - $this->modifiedColumns[] = FolderI18nTableMap::META_DESCRIPTION; + $this->modifiedColumns[FolderI18nTableMap::META_DESCRIPTION] = true; } @@ -677,7 +677,7 @@ abstract class FolderI18n implements ActiveRecordInterface if ($this->meta_keywords !== $v) { $this->meta_keywords = $v; - $this->modifiedColumns[] = FolderI18nTableMap::META_KEYWORDS; + $this->modifiedColumns[FolderI18nTableMap::META_KEYWORDS] = true; } diff --git a/core/lib/Thelia/Model/Base/FolderImage.php b/core/lib/Thelia/Model/Base/FolderImage.php index 6525246de..d32b11d39 100644 --- a/core/lib/Thelia/Model/Base/FolderImage.php +++ b/core/lib/Thelia/Model/Base/FolderImage.php @@ -148,7 +148,7 @@ abstract class FolderImage implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -159,7 +159,7 @@ abstract class FolderImage implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -168,7 +168,7 @@ abstract class FolderImage implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -221,8 +221,8 @@ abstract class FolderImage implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -490,7 +490,7 @@ abstract class FolderImage implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = FolderImageTableMap::ID; + $this->modifiedColumns[FolderImageTableMap::ID] = true; } @@ -511,7 +511,7 @@ abstract class FolderImage implements ActiveRecordInterface if ($this->folder_id !== $v) { $this->folder_id = $v; - $this->modifiedColumns[] = FolderImageTableMap::FOLDER_ID; + $this->modifiedColumns[FolderImageTableMap::FOLDER_ID] = true; } if ($this->aFolder !== null && $this->aFolder->getId() !== $v) { @@ -536,7 +536,7 @@ abstract class FolderImage implements ActiveRecordInterface if ($this->file !== $v) { $this->file = $v; - $this->modifiedColumns[] = FolderImageTableMap::FILE; + $this->modifiedColumns[FolderImageTableMap::FILE] = true; } @@ -557,7 +557,7 @@ abstract class FolderImage implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = FolderImageTableMap::POSITION; + $this->modifiedColumns[FolderImageTableMap::POSITION] = true; } @@ -577,7 +577,7 @@ abstract class FolderImage implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = FolderImageTableMap::CREATED_AT; + $this->modifiedColumns[FolderImageTableMap::CREATED_AT] = true; } } // if either are not null @@ -598,7 +598,7 @@ abstract class FolderImage implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = FolderImageTableMap::UPDATED_AT; + $this->modifiedColumns[FolderImageTableMap::UPDATED_AT] = true; } } // if either are not null @@ -923,7 +923,7 @@ abstract class FolderImage implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = FolderImageTableMap::ID; + $this->modifiedColumns[FolderImageTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . FolderImageTableMap::ID . ')'); } @@ -1462,7 +1462,7 @@ abstract class FolderImage implements ActiveRecordInterface $this->collFolderImageI18nsPartial = true; } - $collFolderImageI18ns->getInternalIterator()->rewind(); + reset($collFolderImageI18ns); return $collFolderImageI18ns; } @@ -1646,9 +1646,6 @@ abstract class FolderImage implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collFolderImageI18ns instanceof Collection) { - $this->collFolderImageI18ns->clearIterator(); - } $this->collFolderImageI18ns = null; $this->aFolder = null; } @@ -1672,7 +1669,7 @@ abstract class FolderImage implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = FolderImageTableMap::UPDATED_AT; + $this->modifiedColumns[FolderImageTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/FolderImageI18n.php b/core/lib/Thelia/Model/Base/FolderImageI18n.php index 95fb29b2a..6155871b6 100644 --- a/core/lib/Thelia/Model/Base/FolderImageI18n.php +++ b/core/lib/Thelia/Model/Base/FolderImageI18n.php @@ -130,7 +130,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class FolderImageI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = FolderImageI18nTableMap::ID; + $this->modifiedColumns[FolderImageI18nTableMap::ID] = true; } if ($this->aFolderImage !== null && $this->aFolderImage->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = FolderImageI18nTableMap::LOCALE; + $this->modifiedColumns[FolderImageI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = FolderImageI18nTableMap::TITLE; + $this->modifiedColumns[FolderImageI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = FolderImageI18nTableMap::DESCRIPTION; + $this->modifiedColumns[FolderImageI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = FolderImageI18nTableMap::CHAPO; + $this->modifiedColumns[FolderImageI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class FolderImageI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = FolderImageI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[FolderImageI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/FolderVersion.php b/core/lib/Thelia/Model/Base/FolderVersion.php index a0678e1b7..f7718dd5b 100644 --- a/core/lib/Thelia/Model/Base/FolderVersion.php +++ b/core/lib/Thelia/Model/Base/FolderVersion.php @@ -150,7 +150,7 @@ abstract class FolderVersion implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -161,7 +161,7 @@ abstract class FolderVersion implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -170,7 +170,7 @@ abstract class FolderVersion implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -223,8 +223,8 @@ abstract class FolderVersion implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -534,7 +534,7 @@ abstract class FolderVersion implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = FolderVersionTableMap::ID; + $this->modifiedColumns[FolderVersionTableMap::ID] = true; } if ($this->aFolder !== null && $this->aFolder->getId() !== $v) { @@ -559,7 +559,7 @@ abstract class FolderVersion implements ActiveRecordInterface if ($this->parent !== $v) { $this->parent = $v; - $this->modifiedColumns[] = FolderVersionTableMap::PARENT; + $this->modifiedColumns[FolderVersionTableMap::PARENT] = true; } @@ -580,7 +580,7 @@ abstract class FolderVersion implements ActiveRecordInterface if ($this->visible !== $v) { $this->visible = $v; - $this->modifiedColumns[] = FolderVersionTableMap::VISIBLE; + $this->modifiedColumns[FolderVersionTableMap::VISIBLE] = true; } @@ -601,7 +601,7 @@ abstract class FolderVersion implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = FolderVersionTableMap::POSITION; + $this->modifiedColumns[FolderVersionTableMap::POSITION] = true; } @@ -621,7 +621,7 @@ abstract class FolderVersion implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = FolderVersionTableMap::CREATED_AT; + $this->modifiedColumns[FolderVersionTableMap::CREATED_AT] = true; } } // if either are not null @@ -642,7 +642,7 @@ abstract class FolderVersion implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = FolderVersionTableMap::UPDATED_AT; + $this->modifiedColumns[FolderVersionTableMap::UPDATED_AT] = true; } } // if either are not null @@ -664,7 +664,7 @@ abstract class FolderVersion implements ActiveRecordInterface if ($this->version !== $v) { $this->version = $v; - $this->modifiedColumns[] = FolderVersionTableMap::VERSION; + $this->modifiedColumns[FolderVersionTableMap::VERSION] = true; } @@ -684,7 +684,7 @@ abstract class FolderVersion implements ActiveRecordInterface if ($this->version_created_at !== null || $dt !== null) { if ($dt !== $this->version_created_at) { $this->version_created_at = $dt; - $this->modifiedColumns[] = FolderVersionTableMap::VERSION_CREATED_AT; + $this->modifiedColumns[FolderVersionTableMap::VERSION_CREATED_AT] = true; } } // if either are not null @@ -706,7 +706,7 @@ abstract class FolderVersion implements ActiveRecordInterface if ($this->version_created_by !== $v) { $this->version_created_by = $v; - $this->modifiedColumns[] = FolderVersionTableMap::VERSION_CREATED_BY; + $this->modifiedColumns[FolderVersionTableMap::VERSION_CREATED_BY] = true; } diff --git a/core/lib/Thelia/Model/Base/Lang.php b/core/lib/Thelia/Model/Base/Lang.php index f01227211..c2e99c32a 100644 --- a/core/lib/Thelia/Model/Base/Lang.php +++ b/core/lib/Thelia/Model/Base/Lang.php @@ -181,7 +181,7 @@ abstract class Lang implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -192,7 +192,7 @@ abstract class Lang implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -201,7 +201,7 @@ abstract class Lang implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -254,8 +254,8 @@ abstract class Lang implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -622,7 +622,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = LangTableMap::ID; + $this->modifiedColumns[LangTableMap::ID] = true; } @@ -643,7 +643,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = LangTableMap::TITLE; + $this->modifiedColumns[LangTableMap::TITLE] = true; } @@ -664,7 +664,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->code !== $v) { $this->code = $v; - $this->modifiedColumns[] = LangTableMap::CODE; + $this->modifiedColumns[LangTableMap::CODE] = true; } @@ -685,7 +685,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = LangTableMap::LOCALE; + $this->modifiedColumns[LangTableMap::LOCALE] = true; } @@ -706,7 +706,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->url !== $v) { $this->url = $v; - $this->modifiedColumns[] = LangTableMap::URL; + $this->modifiedColumns[LangTableMap::URL] = true; } @@ -727,7 +727,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->date_format !== $v) { $this->date_format = $v; - $this->modifiedColumns[] = LangTableMap::DATE_FORMAT; + $this->modifiedColumns[LangTableMap::DATE_FORMAT] = true; } @@ -748,7 +748,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->time_format !== $v) { $this->time_format = $v; - $this->modifiedColumns[] = LangTableMap::TIME_FORMAT; + $this->modifiedColumns[LangTableMap::TIME_FORMAT] = true; } @@ -769,7 +769,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->datetime_format !== $v) { $this->datetime_format = $v; - $this->modifiedColumns[] = LangTableMap::DATETIME_FORMAT; + $this->modifiedColumns[LangTableMap::DATETIME_FORMAT] = true; } @@ -790,7 +790,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->decimal_separator !== $v) { $this->decimal_separator = $v; - $this->modifiedColumns[] = LangTableMap::DECIMAL_SEPARATOR; + $this->modifiedColumns[LangTableMap::DECIMAL_SEPARATOR] = true; } @@ -811,7 +811,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->thousands_separator !== $v) { $this->thousands_separator = $v; - $this->modifiedColumns[] = LangTableMap::THOUSANDS_SEPARATOR; + $this->modifiedColumns[LangTableMap::THOUSANDS_SEPARATOR] = true; } @@ -832,7 +832,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->decimals !== $v) { $this->decimals = $v; - $this->modifiedColumns[] = LangTableMap::DECIMALS; + $this->modifiedColumns[LangTableMap::DECIMALS] = true; } @@ -853,7 +853,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->by_default !== $v) { $this->by_default = $v; - $this->modifiedColumns[] = LangTableMap::BY_DEFAULT; + $this->modifiedColumns[LangTableMap::BY_DEFAULT] = true; } @@ -874,7 +874,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = LangTableMap::POSITION; + $this->modifiedColumns[LangTableMap::POSITION] = true; } @@ -894,7 +894,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = LangTableMap::CREATED_AT; + $this->modifiedColumns[LangTableMap::CREATED_AT] = true; } } // if either are not null @@ -915,7 +915,7 @@ abstract class Lang implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = LangTableMap::UPDATED_AT; + $this->modifiedColumns[LangTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1251,7 +1251,7 @@ abstract class Lang implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = LangTableMap::ID; + $this->modifiedColumns[LangTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . LangTableMap::ID . ')'); } @@ -1880,7 +1880,7 @@ abstract class Lang implements ActiveRecordInterface $this->collOrdersPartial = true; } - $collOrders->getInternalIterator()->rewind(); + reset($collOrders); return $collOrders; } @@ -2237,9 +2237,6 @@ abstract class Lang implements ActiveRecordInterface } } // if ($deep) - if ($this->collOrders instanceof Collection) { - $this->collOrders->clearIterator(); - } $this->collOrders = null; } @@ -2262,7 +2259,7 @@ abstract class Lang implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = LangTableMap::UPDATED_AT; + $this->modifiedColumns[LangTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/Message.php b/core/lib/Thelia/Model/Base/Message.php index ef8b825c3..a9e7dde84 100644 --- a/core/lib/Thelia/Model/Base/Message.php +++ b/core/lib/Thelia/Model/Base/Message.php @@ -214,7 +214,7 @@ abstract class Message implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -225,7 +225,7 @@ abstract class Message implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -234,7 +234,7 @@ abstract class Message implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -287,8 +287,8 @@ abstract class Message implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -631,7 +631,7 @@ abstract class Message implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = MessageTableMap::ID; + $this->modifiedColumns[MessageTableMap::ID] = true; } @@ -652,7 +652,7 @@ abstract class Message implements ActiveRecordInterface if ($this->name !== $v) { $this->name = $v; - $this->modifiedColumns[] = MessageTableMap::NAME; + $this->modifiedColumns[MessageTableMap::NAME] = true; } @@ -673,7 +673,7 @@ abstract class Message implements ActiveRecordInterface if ($this->secured !== $v) { $this->secured = $v; - $this->modifiedColumns[] = MessageTableMap::SECURED; + $this->modifiedColumns[MessageTableMap::SECURED] = true; } @@ -694,7 +694,7 @@ abstract class Message implements ActiveRecordInterface if ($this->text_layout_file_name !== $v) { $this->text_layout_file_name = $v; - $this->modifiedColumns[] = MessageTableMap::TEXT_LAYOUT_FILE_NAME; + $this->modifiedColumns[MessageTableMap::TEXT_LAYOUT_FILE_NAME] = true; } @@ -715,7 +715,7 @@ abstract class Message implements ActiveRecordInterface if ($this->text_template_file_name !== $v) { $this->text_template_file_name = $v; - $this->modifiedColumns[] = MessageTableMap::TEXT_TEMPLATE_FILE_NAME; + $this->modifiedColumns[MessageTableMap::TEXT_TEMPLATE_FILE_NAME] = true; } @@ -736,7 +736,7 @@ abstract class Message implements ActiveRecordInterface if ($this->html_layout_file_name !== $v) { $this->html_layout_file_name = $v; - $this->modifiedColumns[] = MessageTableMap::HTML_LAYOUT_FILE_NAME; + $this->modifiedColumns[MessageTableMap::HTML_LAYOUT_FILE_NAME] = true; } @@ -757,7 +757,7 @@ abstract class Message implements ActiveRecordInterface if ($this->html_template_file_name !== $v) { $this->html_template_file_name = $v; - $this->modifiedColumns[] = MessageTableMap::HTML_TEMPLATE_FILE_NAME; + $this->modifiedColumns[MessageTableMap::HTML_TEMPLATE_FILE_NAME] = true; } @@ -777,7 +777,7 @@ abstract class Message implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = MessageTableMap::CREATED_AT; + $this->modifiedColumns[MessageTableMap::CREATED_AT] = true; } } // if either are not null @@ -798,7 +798,7 @@ abstract class Message implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = MessageTableMap::UPDATED_AT; + $this->modifiedColumns[MessageTableMap::UPDATED_AT] = true; } } // if either are not null @@ -820,7 +820,7 @@ abstract class Message implements ActiveRecordInterface if ($this->version !== $v) { $this->version = $v; - $this->modifiedColumns[] = MessageTableMap::VERSION; + $this->modifiedColumns[MessageTableMap::VERSION] = true; } @@ -840,7 +840,7 @@ abstract class Message implements ActiveRecordInterface if ($this->version_created_at !== null || $dt !== null) { if ($dt !== $this->version_created_at) { $this->version_created_at = $dt; - $this->modifiedColumns[] = MessageTableMap::VERSION_CREATED_AT; + $this->modifiedColumns[MessageTableMap::VERSION_CREATED_AT] = true; } } // if either are not null @@ -862,7 +862,7 @@ abstract class Message implements ActiveRecordInterface if ($this->version_created_by !== $v) { $this->version_created_by = $v; - $this->modifiedColumns[] = MessageTableMap::VERSION_CREATED_BY; + $this->modifiedColumns[MessageTableMap::VERSION_CREATED_BY] = true; } @@ -1226,7 +1226,7 @@ abstract class Message implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = MessageTableMap::ID; + $this->modifiedColumns[MessageTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . MessageTableMap::ID . ')'); } @@ -1819,7 +1819,7 @@ abstract class Message implements ActiveRecordInterface $this->collMessageI18nsPartial = true; } - $collMessageI18ns->getInternalIterator()->rewind(); + reset($collMessageI18ns); return $collMessageI18ns; } @@ -2044,7 +2044,7 @@ abstract class Message implements ActiveRecordInterface $this->collMessageVersionsPartial = true; } - $collMessageVersions->getInternalIterator()->rewind(); + reset($collMessageVersions); return $collMessageVersions; } @@ -2236,13 +2236,7 @@ abstract class Message implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collMessageI18ns instanceof Collection) { - $this->collMessageI18ns->clearIterator(); - } $this->collMessageI18ns = null; - if ($this->collMessageVersions instanceof Collection) { - $this->collMessageVersions->clearIterator(); - } $this->collMessageVersions = null; } @@ -2265,7 +2259,7 @@ abstract class Message implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = MessageTableMap::UPDATED_AT; + $this->modifiedColumns[MessageTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/MessageI18n.php b/core/lib/Thelia/Model/Base/MessageI18n.php index 615169d63..d2e314617 100644 --- a/core/lib/Thelia/Model/Base/MessageI18n.php +++ b/core/lib/Thelia/Model/Base/MessageI18n.php @@ -130,7 +130,7 @@ abstract class MessageI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class MessageI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class MessageI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class MessageI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class MessageI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = MessageI18nTableMap::ID; + $this->modifiedColumns[MessageI18nTableMap::ID] = true; } if ($this->aMessage !== null && $this->aMessage->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class MessageI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = MessageI18nTableMap::LOCALE; + $this->modifiedColumns[MessageI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class MessageI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = MessageI18nTableMap::TITLE; + $this->modifiedColumns[MessageI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class MessageI18n implements ActiveRecordInterface if ($this->subject !== $v) { $this->subject = $v; - $this->modifiedColumns[] = MessageI18nTableMap::SUBJECT; + $this->modifiedColumns[MessageI18nTableMap::SUBJECT] = true; } @@ -542,7 +542,7 @@ abstract class MessageI18n implements ActiveRecordInterface if ($this->text_message !== $v) { $this->text_message = $v; - $this->modifiedColumns[] = MessageI18nTableMap::TEXT_MESSAGE; + $this->modifiedColumns[MessageI18nTableMap::TEXT_MESSAGE] = true; } @@ -563,7 +563,7 @@ abstract class MessageI18n implements ActiveRecordInterface if ($this->html_message !== $v) { $this->html_message = $v; - $this->modifiedColumns[] = MessageI18nTableMap::HTML_MESSAGE; + $this->modifiedColumns[MessageI18nTableMap::HTML_MESSAGE] = true; } diff --git a/core/lib/Thelia/Model/Base/MessageVersion.php b/core/lib/Thelia/Model/Base/MessageVersion.php index 0db39b3ec..5fc5986bc 100644 --- a/core/lib/Thelia/Model/Base/MessageVersion.php +++ b/core/lib/Thelia/Model/Base/MessageVersion.php @@ -168,7 +168,7 @@ abstract class MessageVersion implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -179,7 +179,7 @@ abstract class MessageVersion implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -188,7 +188,7 @@ abstract class MessageVersion implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -241,8 +241,8 @@ abstract class MessageVersion implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -585,7 +585,7 @@ abstract class MessageVersion implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = MessageVersionTableMap::ID; + $this->modifiedColumns[MessageVersionTableMap::ID] = true; } if ($this->aMessage !== null && $this->aMessage->getId() !== $v) { @@ -610,7 +610,7 @@ abstract class MessageVersion implements ActiveRecordInterface if ($this->name !== $v) { $this->name = $v; - $this->modifiedColumns[] = MessageVersionTableMap::NAME; + $this->modifiedColumns[MessageVersionTableMap::NAME] = true; } @@ -631,7 +631,7 @@ abstract class MessageVersion implements ActiveRecordInterface if ($this->secured !== $v) { $this->secured = $v; - $this->modifiedColumns[] = MessageVersionTableMap::SECURED; + $this->modifiedColumns[MessageVersionTableMap::SECURED] = true; } @@ -652,7 +652,7 @@ abstract class MessageVersion implements ActiveRecordInterface if ($this->text_layout_file_name !== $v) { $this->text_layout_file_name = $v; - $this->modifiedColumns[] = MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME; + $this->modifiedColumns[MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME] = true; } @@ -673,7 +673,7 @@ abstract class MessageVersion implements ActiveRecordInterface if ($this->text_template_file_name !== $v) { $this->text_template_file_name = $v; - $this->modifiedColumns[] = MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME; + $this->modifiedColumns[MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME] = true; } @@ -694,7 +694,7 @@ abstract class MessageVersion implements ActiveRecordInterface if ($this->html_layout_file_name !== $v) { $this->html_layout_file_name = $v; - $this->modifiedColumns[] = MessageVersionTableMap::HTML_LAYOUT_FILE_NAME; + $this->modifiedColumns[MessageVersionTableMap::HTML_LAYOUT_FILE_NAME] = true; } @@ -715,7 +715,7 @@ abstract class MessageVersion implements ActiveRecordInterface if ($this->html_template_file_name !== $v) { $this->html_template_file_name = $v; - $this->modifiedColumns[] = MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME; + $this->modifiedColumns[MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME] = true; } @@ -735,7 +735,7 @@ abstract class MessageVersion implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = MessageVersionTableMap::CREATED_AT; + $this->modifiedColumns[MessageVersionTableMap::CREATED_AT] = true; } } // if either are not null @@ -756,7 +756,7 @@ abstract class MessageVersion implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = MessageVersionTableMap::UPDATED_AT; + $this->modifiedColumns[MessageVersionTableMap::UPDATED_AT] = true; } } // if either are not null @@ -778,7 +778,7 @@ abstract class MessageVersion implements ActiveRecordInterface if ($this->version !== $v) { $this->version = $v; - $this->modifiedColumns[] = MessageVersionTableMap::VERSION; + $this->modifiedColumns[MessageVersionTableMap::VERSION] = true; } @@ -798,7 +798,7 @@ abstract class MessageVersion implements ActiveRecordInterface if ($this->version_created_at !== null || $dt !== null) { if ($dt !== $this->version_created_at) { $this->version_created_at = $dt; - $this->modifiedColumns[] = MessageVersionTableMap::VERSION_CREATED_AT; + $this->modifiedColumns[MessageVersionTableMap::VERSION_CREATED_AT] = true; } } // if either are not null @@ -820,7 +820,7 @@ abstract class MessageVersion implements ActiveRecordInterface if ($this->version_created_by !== $v) { $this->version_created_by = $v; - $this->modifiedColumns[] = MessageVersionTableMap::VERSION_CREATED_BY; + $this->modifiedColumns[MessageVersionTableMap::VERSION_CREATED_BY] = true; } diff --git a/core/lib/Thelia/Model/Base/Module.php b/core/lib/Thelia/Model/Base/Module.php index 418417a1a..5635c3028 100644 --- a/core/lib/Thelia/Model/Base/Module.php +++ b/core/lib/Thelia/Model/Base/Module.php @@ -221,7 +221,7 @@ abstract class Module implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -232,7 +232,7 @@ abstract class Module implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -241,7 +241,7 @@ abstract class Module implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -294,8 +294,8 @@ abstract class Module implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -585,7 +585,7 @@ abstract class Module implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ModuleTableMap::ID; + $this->modifiedColumns[ModuleTableMap::ID] = true; } @@ -606,7 +606,7 @@ abstract class Module implements ActiveRecordInterface if ($this->code !== $v) { $this->code = $v; - $this->modifiedColumns[] = ModuleTableMap::CODE; + $this->modifiedColumns[ModuleTableMap::CODE] = true; } @@ -627,7 +627,7 @@ abstract class Module implements ActiveRecordInterface if ($this->type !== $v) { $this->type = $v; - $this->modifiedColumns[] = ModuleTableMap::TYPE; + $this->modifiedColumns[ModuleTableMap::TYPE] = true; } @@ -648,7 +648,7 @@ abstract class Module implements ActiveRecordInterface if ($this->activate !== $v) { $this->activate = $v; - $this->modifiedColumns[] = ModuleTableMap::ACTIVATE; + $this->modifiedColumns[ModuleTableMap::ACTIVATE] = true; } @@ -669,7 +669,7 @@ abstract class Module implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = ModuleTableMap::POSITION; + $this->modifiedColumns[ModuleTableMap::POSITION] = true; } @@ -690,7 +690,7 @@ abstract class Module implements ActiveRecordInterface if ($this->full_namespace !== $v) { $this->full_namespace = $v; - $this->modifiedColumns[] = ModuleTableMap::FULL_NAMESPACE; + $this->modifiedColumns[ModuleTableMap::FULL_NAMESPACE] = true; } @@ -710,7 +710,7 @@ abstract class Module implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ModuleTableMap::CREATED_AT; + $this->modifiedColumns[ModuleTableMap::CREATED_AT] = true; } } // if either are not null @@ -731,7 +731,7 @@ abstract class Module implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ModuleTableMap::UPDATED_AT; + $this->modifiedColumns[ModuleTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1141,7 +1141,7 @@ abstract class Module implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = ModuleTableMap::ID; + $this->modifiedColumns[ModuleTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . ModuleTableMap::ID . ')'); } @@ -1718,7 +1718,7 @@ abstract class Module implements ActiveRecordInterface $this->collOrdersRelatedByPaymentModuleIdPartial = true; } - $collOrdersRelatedByPaymentModuleId->getInternalIterator()->rewind(); + reset($collOrdersRelatedByPaymentModuleId); return $collOrdersRelatedByPaymentModuleId; } @@ -2086,7 +2086,7 @@ abstract class Module implements ActiveRecordInterface $this->collOrdersRelatedByDeliveryModuleIdPartial = true; } - $collOrdersRelatedByDeliveryModuleId->getInternalIterator()->rewind(); + reset($collOrdersRelatedByDeliveryModuleId); return $collOrdersRelatedByDeliveryModuleId; } @@ -2454,7 +2454,7 @@ abstract class Module implements ActiveRecordInterface $this->collAreaDeliveryModulesPartial = true; } - $collAreaDeliveryModules->getInternalIterator()->rewind(); + reset($collAreaDeliveryModules); return $collAreaDeliveryModules; } @@ -2697,7 +2697,7 @@ abstract class Module implements ActiveRecordInterface $this->collProfileModulesPartial = true; } - $collProfileModules->getInternalIterator()->rewind(); + reset($collProfileModules); return $collProfileModules; } @@ -2943,7 +2943,7 @@ abstract class Module implements ActiveRecordInterface $this->collModuleImagesPartial = true; } - $collModuleImages->getInternalIterator()->rewind(); + reset($collModuleImages); return $collModuleImages; } @@ -3161,7 +3161,7 @@ abstract class Module implements ActiveRecordInterface $this->collModuleI18nsPartial = true; } - $collModuleI18ns->getInternalIterator()->rewind(); + reset($collModuleI18ns); return $collModuleI18ns; } @@ -3372,29 +3372,11 @@ abstract class Module implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collOrdersRelatedByPaymentModuleId instanceof Collection) { - $this->collOrdersRelatedByPaymentModuleId->clearIterator(); - } $this->collOrdersRelatedByPaymentModuleId = null; - if ($this->collOrdersRelatedByDeliveryModuleId instanceof Collection) { - $this->collOrdersRelatedByDeliveryModuleId->clearIterator(); - } $this->collOrdersRelatedByDeliveryModuleId = null; - if ($this->collAreaDeliveryModules instanceof Collection) { - $this->collAreaDeliveryModules->clearIterator(); - } $this->collAreaDeliveryModules = null; - if ($this->collProfileModules instanceof Collection) { - $this->collProfileModules->clearIterator(); - } $this->collProfileModules = null; - if ($this->collModuleImages instanceof Collection) { - $this->collModuleImages->clearIterator(); - } $this->collModuleImages = null; - if ($this->collModuleI18ns instanceof Collection) { - $this->collModuleI18ns->clearIterator(); - } $this->collModuleI18ns = null; } @@ -3417,7 +3399,7 @@ abstract class Module implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ModuleTableMap::UPDATED_AT; + $this->modifiedColumns[ModuleTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ModuleI18n.php b/core/lib/Thelia/Model/Base/ModuleI18n.php index 7c52f409f..949bdec16 100644 --- a/core/lib/Thelia/Model/Base/ModuleI18n.php +++ b/core/lib/Thelia/Model/Base/ModuleI18n.php @@ -130,7 +130,7 @@ abstract class ModuleI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class ModuleI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class ModuleI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class ModuleI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class ModuleI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ModuleI18nTableMap::ID; + $this->modifiedColumns[ModuleI18nTableMap::ID] = true; } if ($this->aModule !== null && $this->aModule->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class ModuleI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = ModuleI18nTableMap::LOCALE; + $this->modifiedColumns[ModuleI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class ModuleI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = ModuleI18nTableMap::TITLE; + $this->modifiedColumns[ModuleI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class ModuleI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = ModuleI18nTableMap::DESCRIPTION; + $this->modifiedColumns[ModuleI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class ModuleI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = ModuleI18nTableMap::CHAPO; + $this->modifiedColumns[ModuleI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class ModuleI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = ModuleI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[ModuleI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/ModuleImage.php b/core/lib/Thelia/Model/Base/ModuleImage.php index f03e149a2..f31c11d39 100644 --- a/core/lib/Thelia/Model/Base/ModuleImage.php +++ b/core/lib/Thelia/Model/Base/ModuleImage.php @@ -148,7 +148,7 @@ abstract class ModuleImage implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -159,7 +159,7 @@ abstract class ModuleImage implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -168,7 +168,7 @@ abstract class ModuleImage implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -221,8 +221,8 @@ abstract class ModuleImage implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -490,7 +490,7 @@ abstract class ModuleImage implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ModuleImageTableMap::ID; + $this->modifiedColumns[ModuleImageTableMap::ID] = true; } @@ -511,7 +511,7 @@ abstract class ModuleImage implements ActiveRecordInterface if ($this->module_id !== $v) { $this->module_id = $v; - $this->modifiedColumns[] = ModuleImageTableMap::MODULE_ID; + $this->modifiedColumns[ModuleImageTableMap::MODULE_ID] = true; } if ($this->aModule !== null && $this->aModule->getId() !== $v) { @@ -536,7 +536,7 @@ abstract class ModuleImage implements ActiveRecordInterface if ($this->file !== $v) { $this->file = $v; - $this->modifiedColumns[] = ModuleImageTableMap::FILE; + $this->modifiedColumns[ModuleImageTableMap::FILE] = true; } @@ -557,7 +557,7 @@ abstract class ModuleImage implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = ModuleImageTableMap::POSITION; + $this->modifiedColumns[ModuleImageTableMap::POSITION] = true; } @@ -577,7 +577,7 @@ abstract class ModuleImage implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ModuleImageTableMap::CREATED_AT; + $this->modifiedColumns[ModuleImageTableMap::CREATED_AT] = true; } } // if either are not null @@ -598,7 +598,7 @@ abstract class ModuleImage implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ModuleImageTableMap::UPDATED_AT; + $this->modifiedColumns[ModuleImageTableMap::UPDATED_AT] = true; } } // if either are not null @@ -923,7 +923,7 @@ abstract class ModuleImage implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = ModuleImageTableMap::ID; + $this->modifiedColumns[ModuleImageTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . ModuleImageTableMap::ID . ')'); } @@ -1462,7 +1462,7 @@ abstract class ModuleImage implements ActiveRecordInterface $this->collModuleImageI18nsPartial = true; } - $collModuleImageI18ns->getInternalIterator()->rewind(); + reset($collModuleImageI18ns); return $collModuleImageI18ns; } @@ -1646,9 +1646,6 @@ abstract class ModuleImage implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collModuleImageI18ns instanceof Collection) { - $this->collModuleImageI18ns->clearIterator(); - } $this->collModuleImageI18ns = null; $this->aModule = null; } @@ -1672,7 +1669,7 @@ abstract class ModuleImage implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ModuleImageTableMap::UPDATED_AT; + $this->modifiedColumns[ModuleImageTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ModuleImageI18n.php b/core/lib/Thelia/Model/Base/ModuleImageI18n.php index d83d11229..0e7645470 100644 --- a/core/lib/Thelia/Model/Base/ModuleImageI18n.php +++ b/core/lib/Thelia/Model/Base/ModuleImageI18n.php @@ -130,7 +130,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class ModuleImageI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ModuleImageI18nTableMap::ID; + $this->modifiedColumns[ModuleImageI18nTableMap::ID] = true; } if ($this->aModuleImage !== null && $this->aModuleImage->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = ModuleImageI18nTableMap::LOCALE; + $this->modifiedColumns[ModuleImageI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = ModuleImageI18nTableMap::TITLE; + $this->modifiedColumns[ModuleImageI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = ModuleImageI18nTableMap::DESCRIPTION; + $this->modifiedColumns[ModuleImageI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = ModuleImageI18nTableMap::CHAPO; + $this->modifiedColumns[ModuleImageI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class ModuleImageI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = ModuleImageI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[ModuleImageI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/Newsletter.php b/core/lib/Thelia/Model/Base/Newsletter.php index e9cd4077c..7c9ca03a6 100644 --- a/core/lib/Thelia/Model/Base/Newsletter.php +++ b/core/lib/Thelia/Model/Base/Newsletter.php @@ -118,7 +118,7 @@ abstract class Newsletter implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -129,7 +129,7 @@ abstract class Newsletter implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -138,7 +138,7 @@ abstract class Newsletter implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -191,8 +191,8 @@ abstract class Newsletter implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -471,7 +471,7 @@ abstract class Newsletter implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = NewsletterTableMap::ID; + $this->modifiedColumns[NewsletterTableMap::ID] = true; } @@ -492,7 +492,7 @@ abstract class Newsletter implements ActiveRecordInterface if ($this->email !== $v) { $this->email = $v; - $this->modifiedColumns[] = NewsletterTableMap::EMAIL; + $this->modifiedColumns[NewsletterTableMap::EMAIL] = true; } @@ -513,7 +513,7 @@ abstract class Newsletter implements ActiveRecordInterface if ($this->firstname !== $v) { $this->firstname = $v; - $this->modifiedColumns[] = NewsletterTableMap::FIRSTNAME; + $this->modifiedColumns[NewsletterTableMap::FIRSTNAME] = true; } @@ -534,7 +534,7 @@ abstract class Newsletter implements ActiveRecordInterface if ($this->lastname !== $v) { $this->lastname = $v; - $this->modifiedColumns[] = NewsletterTableMap::LASTNAME; + $this->modifiedColumns[NewsletterTableMap::LASTNAME] = true; } @@ -555,7 +555,7 @@ abstract class Newsletter implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = NewsletterTableMap::LOCALE; + $this->modifiedColumns[NewsletterTableMap::LOCALE] = true; } @@ -575,7 +575,7 @@ abstract class Newsletter implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = NewsletterTableMap::CREATED_AT; + $this->modifiedColumns[NewsletterTableMap::CREATED_AT] = true; } } // if either are not null @@ -596,7 +596,7 @@ abstract class Newsletter implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = NewsletterTableMap::UPDATED_AT; + $this->modifiedColumns[NewsletterTableMap::UPDATED_AT] = true; } } // if either are not null @@ -889,7 +889,7 @@ abstract class Newsletter implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = NewsletterTableMap::ID; + $this->modifiedColumns[NewsletterTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . NewsletterTableMap::ID . ')'); } @@ -1326,7 +1326,7 @@ abstract class Newsletter implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = NewsletterTableMap::UPDATED_AT; + $this->modifiedColumns[NewsletterTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/Order.php b/core/lib/Thelia/Model/Base/Order.php index c0f5111ca..596829b3e 100644 --- a/core/lib/Thelia/Model/Base/Order.php +++ b/core/lib/Thelia/Model/Base/Order.php @@ -271,7 +271,7 @@ abstract class Order implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -282,7 +282,7 @@ abstract class Order implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -291,7 +291,7 @@ abstract class Order implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -344,8 +344,8 @@ abstract class Order implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -765,7 +765,7 @@ abstract class Order implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = OrderTableMap::ID; + $this->modifiedColumns[OrderTableMap::ID] = true; } @@ -786,7 +786,7 @@ abstract class Order implements ActiveRecordInterface if ($this->ref !== $v) { $this->ref = $v; - $this->modifiedColumns[] = OrderTableMap::REF; + $this->modifiedColumns[OrderTableMap::REF] = true; } @@ -807,7 +807,7 @@ abstract class Order implements ActiveRecordInterface if ($this->customer_id !== $v) { $this->customer_id = $v; - $this->modifiedColumns[] = OrderTableMap::CUSTOMER_ID; + $this->modifiedColumns[OrderTableMap::CUSTOMER_ID] = true; } if ($this->aCustomer !== null && $this->aCustomer->getId() !== $v) { @@ -832,7 +832,7 @@ abstract class Order implements ActiveRecordInterface if ($this->invoice_order_address_id !== $v) { $this->invoice_order_address_id = $v; - $this->modifiedColumns[] = OrderTableMap::INVOICE_ORDER_ADDRESS_ID; + $this->modifiedColumns[OrderTableMap::INVOICE_ORDER_ADDRESS_ID] = true; } if ($this->aOrderAddressRelatedByInvoiceOrderAddressId !== null && $this->aOrderAddressRelatedByInvoiceOrderAddressId->getId() !== $v) { @@ -857,7 +857,7 @@ abstract class Order implements ActiveRecordInterface if ($this->delivery_order_address_id !== $v) { $this->delivery_order_address_id = $v; - $this->modifiedColumns[] = OrderTableMap::DELIVERY_ORDER_ADDRESS_ID; + $this->modifiedColumns[OrderTableMap::DELIVERY_ORDER_ADDRESS_ID] = true; } if ($this->aOrderAddressRelatedByDeliveryOrderAddressId !== null && $this->aOrderAddressRelatedByDeliveryOrderAddressId->getId() !== $v) { @@ -881,7 +881,7 @@ abstract class Order implements ActiveRecordInterface if ($this->invoice_date !== null || $dt !== null) { if ($dt !== $this->invoice_date) { $this->invoice_date = $dt; - $this->modifiedColumns[] = OrderTableMap::INVOICE_DATE; + $this->modifiedColumns[OrderTableMap::INVOICE_DATE] = true; } } // if either are not null @@ -903,7 +903,7 @@ abstract class Order implements ActiveRecordInterface if ($this->currency_id !== $v) { $this->currency_id = $v; - $this->modifiedColumns[] = OrderTableMap::CURRENCY_ID; + $this->modifiedColumns[OrderTableMap::CURRENCY_ID] = true; } if ($this->aCurrency !== null && $this->aCurrency->getId() !== $v) { @@ -928,7 +928,7 @@ abstract class Order implements ActiveRecordInterface if ($this->currency_rate !== $v) { $this->currency_rate = $v; - $this->modifiedColumns[] = OrderTableMap::CURRENCY_RATE; + $this->modifiedColumns[OrderTableMap::CURRENCY_RATE] = true; } @@ -949,7 +949,7 @@ abstract class Order implements ActiveRecordInterface if ($this->transaction_ref !== $v) { $this->transaction_ref = $v; - $this->modifiedColumns[] = OrderTableMap::TRANSACTION_REF; + $this->modifiedColumns[OrderTableMap::TRANSACTION_REF] = true; } @@ -970,7 +970,7 @@ abstract class Order implements ActiveRecordInterface if ($this->delivery_ref !== $v) { $this->delivery_ref = $v; - $this->modifiedColumns[] = OrderTableMap::DELIVERY_REF; + $this->modifiedColumns[OrderTableMap::DELIVERY_REF] = true; } @@ -991,7 +991,7 @@ abstract class Order implements ActiveRecordInterface if ($this->invoice_ref !== $v) { $this->invoice_ref = $v; - $this->modifiedColumns[] = OrderTableMap::INVOICE_REF; + $this->modifiedColumns[OrderTableMap::INVOICE_REF] = true; } @@ -1012,7 +1012,7 @@ abstract class Order implements ActiveRecordInterface if ($this->discount !== $v) { $this->discount = $v; - $this->modifiedColumns[] = OrderTableMap::DISCOUNT; + $this->modifiedColumns[OrderTableMap::DISCOUNT] = true; } @@ -1033,7 +1033,7 @@ abstract class Order implements ActiveRecordInterface if ($this->postage !== $v) { $this->postage = $v; - $this->modifiedColumns[] = OrderTableMap::POSTAGE; + $this->modifiedColumns[OrderTableMap::POSTAGE] = true; } @@ -1054,7 +1054,7 @@ abstract class Order implements ActiveRecordInterface if ($this->payment_module_id !== $v) { $this->payment_module_id = $v; - $this->modifiedColumns[] = OrderTableMap::PAYMENT_MODULE_ID; + $this->modifiedColumns[OrderTableMap::PAYMENT_MODULE_ID] = true; } if ($this->aModuleRelatedByPaymentModuleId !== null && $this->aModuleRelatedByPaymentModuleId->getId() !== $v) { @@ -1079,7 +1079,7 @@ abstract class Order implements ActiveRecordInterface if ($this->delivery_module_id !== $v) { $this->delivery_module_id = $v; - $this->modifiedColumns[] = OrderTableMap::DELIVERY_MODULE_ID; + $this->modifiedColumns[OrderTableMap::DELIVERY_MODULE_ID] = true; } if ($this->aModuleRelatedByDeliveryModuleId !== null && $this->aModuleRelatedByDeliveryModuleId->getId() !== $v) { @@ -1104,7 +1104,7 @@ abstract class Order implements ActiveRecordInterface if ($this->status_id !== $v) { $this->status_id = $v; - $this->modifiedColumns[] = OrderTableMap::STATUS_ID; + $this->modifiedColumns[OrderTableMap::STATUS_ID] = true; } if ($this->aOrderStatus !== null && $this->aOrderStatus->getId() !== $v) { @@ -1129,7 +1129,7 @@ abstract class Order implements ActiveRecordInterface if ($this->lang_id !== $v) { $this->lang_id = $v; - $this->modifiedColumns[] = OrderTableMap::LANG_ID; + $this->modifiedColumns[OrderTableMap::LANG_ID] = true; } if ($this->aLang !== null && $this->aLang->getId() !== $v) { @@ -1153,7 +1153,7 @@ abstract class Order implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = OrderTableMap::CREATED_AT; + $this->modifiedColumns[OrderTableMap::CREATED_AT] = true; } } // if either are not null @@ -1174,7 +1174,7 @@ abstract class Order implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = OrderTableMap::UPDATED_AT; + $this->modifiedColumns[OrderTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1637,7 +1637,7 @@ abstract class Order implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = OrderTableMap::ID; + $this->modifiedColumns[OrderTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . OrderTableMap::ID . ')'); } @@ -2774,7 +2774,7 @@ abstract class Order implements ActiveRecordInterface $this->collOrderProductsPartial = true; } - $collOrderProducts->getInternalIterator()->rewind(); + reset($collOrderProducts); return $collOrderProducts; } @@ -2992,7 +2992,7 @@ abstract class Order implements ActiveRecordInterface $this->collOrderCouponsPartial = true; } - $collOrderCoupons->getInternalIterator()->rewind(); + reset($collOrderCoupons); return $collOrderCoupons; } @@ -3183,13 +3183,7 @@ abstract class Order implements ActiveRecordInterface } } // if ($deep) - if ($this->collOrderProducts instanceof Collection) { - $this->collOrderProducts->clearIterator(); - } $this->collOrderProducts = null; - if ($this->collOrderCoupons instanceof Collection) { - $this->collOrderCoupons->clearIterator(); - } $this->collOrderCoupons = null; $this->aCurrency = null; $this->aCustomer = null; @@ -3220,7 +3214,7 @@ abstract class Order implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = OrderTableMap::UPDATED_AT; + $this->modifiedColumns[OrderTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/OrderAddress.php b/core/lib/Thelia/Model/Base/OrderAddress.php index b04e302f7..e4743618f 100644 --- a/core/lib/Thelia/Model/Base/OrderAddress.php +++ b/core/lib/Thelia/Model/Base/OrderAddress.php @@ -187,7 +187,7 @@ abstract class OrderAddress implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -198,7 +198,7 @@ abstract class OrderAddress implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -207,7 +207,7 @@ abstract class OrderAddress implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -260,8 +260,8 @@ abstract class OrderAddress implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -617,7 +617,7 @@ abstract class OrderAddress implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = OrderAddressTableMap::ID; + $this->modifiedColumns[OrderAddressTableMap::ID] = true; } @@ -638,7 +638,7 @@ abstract class OrderAddress implements ActiveRecordInterface if ($this->customer_title_id !== $v) { $this->customer_title_id = $v; - $this->modifiedColumns[] = OrderAddressTableMap::CUSTOMER_TITLE_ID; + $this->modifiedColumns[OrderAddressTableMap::CUSTOMER_TITLE_ID] = true; } @@ -659,7 +659,7 @@ abstract class OrderAddress implements ActiveRecordInterface if ($this->company !== $v) { $this->company = $v; - $this->modifiedColumns[] = OrderAddressTableMap::COMPANY; + $this->modifiedColumns[OrderAddressTableMap::COMPANY] = true; } @@ -680,7 +680,7 @@ abstract class OrderAddress implements ActiveRecordInterface if ($this->firstname !== $v) { $this->firstname = $v; - $this->modifiedColumns[] = OrderAddressTableMap::FIRSTNAME; + $this->modifiedColumns[OrderAddressTableMap::FIRSTNAME] = true; } @@ -701,7 +701,7 @@ abstract class OrderAddress implements ActiveRecordInterface if ($this->lastname !== $v) { $this->lastname = $v; - $this->modifiedColumns[] = OrderAddressTableMap::LASTNAME; + $this->modifiedColumns[OrderAddressTableMap::LASTNAME] = true; } @@ -722,7 +722,7 @@ abstract class OrderAddress implements ActiveRecordInterface if ($this->address1 !== $v) { $this->address1 = $v; - $this->modifiedColumns[] = OrderAddressTableMap::ADDRESS1; + $this->modifiedColumns[OrderAddressTableMap::ADDRESS1] = true; } @@ -743,7 +743,7 @@ abstract class OrderAddress implements ActiveRecordInterface if ($this->address2 !== $v) { $this->address2 = $v; - $this->modifiedColumns[] = OrderAddressTableMap::ADDRESS2; + $this->modifiedColumns[OrderAddressTableMap::ADDRESS2] = true; } @@ -764,7 +764,7 @@ abstract class OrderAddress implements ActiveRecordInterface if ($this->address3 !== $v) { $this->address3 = $v; - $this->modifiedColumns[] = OrderAddressTableMap::ADDRESS3; + $this->modifiedColumns[OrderAddressTableMap::ADDRESS3] = true; } @@ -785,7 +785,7 @@ abstract class OrderAddress implements ActiveRecordInterface if ($this->zipcode !== $v) { $this->zipcode = $v; - $this->modifiedColumns[] = OrderAddressTableMap::ZIPCODE; + $this->modifiedColumns[OrderAddressTableMap::ZIPCODE] = true; } @@ -806,7 +806,7 @@ abstract class OrderAddress implements ActiveRecordInterface if ($this->city !== $v) { $this->city = $v; - $this->modifiedColumns[] = OrderAddressTableMap::CITY; + $this->modifiedColumns[OrderAddressTableMap::CITY] = true; } @@ -827,7 +827,7 @@ abstract class OrderAddress implements ActiveRecordInterface if ($this->phone !== $v) { $this->phone = $v; - $this->modifiedColumns[] = OrderAddressTableMap::PHONE; + $this->modifiedColumns[OrderAddressTableMap::PHONE] = true; } @@ -848,7 +848,7 @@ abstract class OrderAddress implements ActiveRecordInterface if ($this->country_id !== $v) { $this->country_id = $v; - $this->modifiedColumns[] = OrderAddressTableMap::COUNTRY_ID; + $this->modifiedColumns[OrderAddressTableMap::COUNTRY_ID] = true; } @@ -868,7 +868,7 @@ abstract class OrderAddress implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = OrderAddressTableMap::CREATED_AT; + $this->modifiedColumns[OrderAddressTableMap::CREATED_AT] = true; } } // if either are not null @@ -889,7 +889,7 @@ abstract class OrderAddress implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = OrderAddressTableMap::UPDATED_AT; + $this->modifiedColumns[OrderAddressTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1241,7 +1241,7 @@ abstract class OrderAddress implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = OrderAddressTableMap::ID; + $this->modifiedColumns[OrderAddressTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . OrderAddressTableMap::ID . ')'); } @@ -1866,7 +1866,7 @@ abstract class OrderAddress implements ActiveRecordInterface $this->collOrdersRelatedByInvoiceOrderAddressIdPartial = true; } - $collOrdersRelatedByInvoiceOrderAddressId->getInternalIterator()->rewind(); + reset($collOrdersRelatedByInvoiceOrderAddressId); return $collOrdersRelatedByInvoiceOrderAddressId; } @@ -2234,7 +2234,7 @@ abstract class OrderAddress implements ActiveRecordInterface $this->collOrdersRelatedByDeliveryOrderAddressIdPartial = true; } - $collOrdersRelatedByDeliveryOrderAddressId->getInternalIterator()->rewind(); + reset($collOrdersRelatedByDeliveryOrderAddressId); return $collOrdersRelatedByDeliveryOrderAddressId; } @@ -2570,13 +2570,7 @@ abstract class OrderAddress implements ActiveRecordInterface } } // if ($deep) - if ($this->collOrdersRelatedByInvoiceOrderAddressId instanceof Collection) { - $this->collOrdersRelatedByInvoiceOrderAddressId->clearIterator(); - } $this->collOrdersRelatedByInvoiceOrderAddressId = null; - if ($this->collOrdersRelatedByDeliveryOrderAddressId instanceof Collection) { - $this->collOrdersRelatedByDeliveryOrderAddressId->clearIterator(); - } $this->collOrdersRelatedByDeliveryOrderAddressId = null; } @@ -2599,7 +2593,7 @@ abstract class OrderAddress implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = OrderAddressTableMap::UPDATED_AT; + $this->modifiedColumns[OrderAddressTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/OrderCoupon.php b/core/lib/Thelia/Model/Base/OrderCoupon.php index 296b1af0a..25179228e 100644 --- a/core/lib/Thelia/Model/Base/OrderCoupon.php +++ b/core/lib/Thelia/Model/Base/OrderCoupon.php @@ -173,7 +173,7 @@ abstract class OrderCoupon implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -184,7 +184,7 @@ abstract class OrderCoupon implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -193,7 +193,7 @@ abstract class OrderCoupon implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -246,8 +246,8 @@ abstract class OrderCoupon implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -623,7 +623,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = OrderCouponTableMap::ID; + $this->modifiedColumns[OrderCouponTableMap::ID] = true; } @@ -644,7 +644,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->order_id !== $v) { $this->order_id = $v; - $this->modifiedColumns[] = OrderCouponTableMap::ORDER_ID; + $this->modifiedColumns[OrderCouponTableMap::ORDER_ID] = true; } if ($this->aOrder !== null && $this->aOrder->getId() !== $v) { @@ -669,7 +669,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->code !== $v) { $this->code = $v; - $this->modifiedColumns[] = OrderCouponTableMap::CODE; + $this->modifiedColumns[OrderCouponTableMap::CODE] = true; } @@ -690,7 +690,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->type !== $v) { $this->type = $v; - $this->modifiedColumns[] = OrderCouponTableMap::TYPE; + $this->modifiedColumns[OrderCouponTableMap::TYPE] = true; } @@ -711,7 +711,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->amount !== $v) { $this->amount = $v; - $this->modifiedColumns[] = OrderCouponTableMap::AMOUNT; + $this->modifiedColumns[OrderCouponTableMap::AMOUNT] = true; } @@ -732,7 +732,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = OrderCouponTableMap::TITLE; + $this->modifiedColumns[OrderCouponTableMap::TITLE] = true; } @@ -753,7 +753,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->short_description !== $v) { $this->short_description = $v; - $this->modifiedColumns[] = OrderCouponTableMap::SHORT_DESCRIPTION; + $this->modifiedColumns[OrderCouponTableMap::SHORT_DESCRIPTION] = true; } @@ -774,7 +774,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = OrderCouponTableMap::DESCRIPTION; + $this->modifiedColumns[OrderCouponTableMap::DESCRIPTION] = true; } @@ -794,7 +794,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->expiration_date !== null || $dt !== null) { if ($dt !== $this->expiration_date) { $this->expiration_date = $dt; - $this->modifiedColumns[] = OrderCouponTableMap::EXPIRATION_DATE; + $this->modifiedColumns[OrderCouponTableMap::EXPIRATION_DATE] = true; } } // if either are not null @@ -824,7 +824,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->is_cumulative !== $v) { $this->is_cumulative = $v; - $this->modifiedColumns[] = OrderCouponTableMap::IS_CUMULATIVE; + $this->modifiedColumns[OrderCouponTableMap::IS_CUMULATIVE] = true; } @@ -853,7 +853,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->is_removing_postage !== $v) { $this->is_removing_postage = $v; - $this->modifiedColumns[] = OrderCouponTableMap::IS_REMOVING_POSTAGE; + $this->modifiedColumns[OrderCouponTableMap::IS_REMOVING_POSTAGE] = true; } @@ -882,7 +882,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->is_available_on_special_offers !== $v) { $this->is_available_on_special_offers = $v; - $this->modifiedColumns[] = OrderCouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS; + $this->modifiedColumns[OrderCouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS] = true; } @@ -903,7 +903,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->serialized_conditions !== $v) { $this->serialized_conditions = $v; - $this->modifiedColumns[] = OrderCouponTableMap::SERIALIZED_CONDITIONS; + $this->modifiedColumns[OrderCouponTableMap::SERIALIZED_CONDITIONS] = true; } @@ -923,7 +923,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = OrderCouponTableMap::CREATED_AT; + $this->modifiedColumns[OrderCouponTableMap::CREATED_AT] = true; } } // if either are not null @@ -944,7 +944,7 @@ abstract class OrderCoupon implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = OrderCouponTableMap::UPDATED_AT; + $this->modifiedColumns[OrderCouponTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1280,7 +1280,7 @@ abstract class OrderCoupon implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = OrderCouponTableMap::ID; + $this->modifiedColumns[OrderCouponTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . OrderCouponTableMap::ID . ')'); } @@ -1911,7 +1911,7 @@ abstract class OrderCoupon implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = OrderCouponTableMap::UPDATED_AT; + $this->modifiedColumns[OrderCouponTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/OrderProduct.php b/core/lib/Thelia/Model/Base/OrderProduct.php index 1c7309b77..0e65ba671 100644 --- a/core/lib/Thelia/Model/Base/OrderProduct.php +++ b/core/lib/Thelia/Model/Base/OrderProduct.php @@ -232,7 +232,7 @@ abstract class OrderProduct implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -243,7 +243,7 @@ abstract class OrderProduct implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -252,7 +252,7 @@ abstract class OrderProduct implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -305,8 +305,8 @@ abstract class OrderProduct implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -728,7 +728,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = OrderProductTableMap::ID; + $this->modifiedColumns[OrderProductTableMap::ID] = true; } @@ -749,7 +749,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->order_id !== $v) { $this->order_id = $v; - $this->modifiedColumns[] = OrderProductTableMap::ORDER_ID; + $this->modifiedColumns[OrderProductTableMap::ORDER_ID] = true; } if ($this->aOrder !== null && $this->aOrder->getId() !== $v) { @@ -774,7 +774,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->product_ref !== $v) { $this->product_ref = $v; - $this->modifiedColumns[] = OrderProductTableMap::PRODUCT_REF; + $this->modifiedColumns[OrderProductTableMap::PRODUCT_REF] = true; } @@ -795,7 +795,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->product_sale_elements_ref !== $v) { $this->product_sale_elements_ref = $v; - $this->modifiedColumns[] = OrderProductTableMap::PRODUCT_SALE_ELEMENTS_REF; + $this->modifiedColumns[OrderProductTableMap::PRODUCT_SALE_ELEMENTS_REF] = true; } @@ -816,7 +816,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = OrderProductTableMap::TITLE; + $this->modifiedColumns[OrderProductTableMap::TITLE] = true; } @@ -837,7 +837,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = OrderProductTableMap::CHAPO; + $this->modifiedColumns[OrderProductTableMap::CHAPO] = true; } @@ -858,7 +858,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = OrderProductTableMap::DESCRIPTION; + $this->modifiedColumns[OrderProductTableMap::DESCRIPTION] = true; } @@ -879,7 +879,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = OrderProductTableMap::POSTSCRIPTUM; + $this->modifiedColumns[OrderProductTableMap::POSTSCRIPTUM] = true; } @@ -900,7 +900,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->quantity !== $v) { $this->quantity = $v; - $this->modifiedColumns[] = OrderProductTableMap::QUANTITY; + $this->modifiedColumns[OrderProductTableMap::QUANTITY] = true; } @@ -921,7 +921,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->price !== $v) { $this->price = $v; - $this->modifiedColumns[] = OrderProductTableMap::PRICE; + $this->modifiedColumns[OrderProductTableMap::PRICE] = true; } @@ -942,7 +942,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->promo_price !== $v) { $this->promo_price = $v; - $this->modifiedColumns[] = OrderProductTableMap::PROMO_PRICE; + $this->modifiedColumns[OrderProductTableMap::PROMO_PRICE] = true; } @@ -963,7 +963,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->was_new !== $v) { $this->was_new = $v; - $this->modifiedColumns[] = OrderProductTableMap::WAS_NEW; + $this->modifiedColumns[OrderProductTableMap::WAS_NEW] = true; } @@ -984,7 +984,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->was_in_promo !== $v) { $this->was_in_promo = $v; - $this->modifiedColumns[] = OrderProductTableMap::WAS_IN_PROMO; + $this->modifiedColumns[OrderProductTableMap::WAS_IN_PROMO] = true; } @@ -1005,7 +1005,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->weight !== $v) { $this->weight = $v; - $this->modifiedColumns[] = OrderProductTableMap::WEIGHT; + $this->modifiedColumns[OrderProductTableMap::WEIGHT] = true; } @@ -1026,7 +1026,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->ean_code !== $v) { $this->ean_code = $v; - $this->modifiedColumns[] = OrderProductTableMap::EAN_CODE; + $this->modifiedColumns[OrderProductTableMap::EAN_CODE] = true; } @@ -1047,7 +1047,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->tax_rule_title !== $v) { $this->tax_rule_title = $v; - $this->modifiedColumns[] = OrderProductTableMap::TAX_RULE_TITLE; + $this->modifiedColumns[OrderProductTableMap::TAX_RULE_TITLE] = true; } @@ -1068,7 +1068,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->tax_rule_description !== $v) { $this->tax_rule_description = $v; - $this->modifiedColumns[] = OrderProductTableMap::TAX_RULE_DESCRIPTION; + $this->modifiedColumns[OrderProductTableMap::TAX_RULE_DESCRIPTION] = true; } @@ -1089,7 +1089,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->parent !== $v) { $this->parent = $v; - $this->modifiedColumns[] = OrderProductTableMap::PARENT; + $this->modifiedColumns[OrderProductTableMap::PARENT] = true; } @@ -1109,7 +1109,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = OrderProductTableMap::CREATED_AT; + $this->modifiedColumns[OrderProductTableMap::CREATED_AT] = true; } } // if either are not null @@ -1130,7 +1130,7 @@ abstract class OrderProduct implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = OrderProductTableMap::UPDATED_AT; + $this->modifiedColumns[OrderProductTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1516,7 +1516,7 @@ abstract class OrderProduct implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = OrderProductTableMap::ID; + $this->modifiedColumns[OrderProductTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . OrderProductTableMap::ID . ')'); } @@ -2291,7 +2291,7 @@ abstract class OrderProduct implements ActiveRecordInterface $this->collOrderProductAttributeCombinationsPartial = true; } - $collOrderProductAttributeCombinations->getInternalIterator()->rewind(); + reset($collOrderProductAttributeCombinations); return $collOrderProductAttributeCombinations; } @@ -2509,7 +2509,7 @@ abstract class OrderProduct implements ActiveRecordInterface $this->collOrderProductTaxesPartial = true; } - $collOrderProductTaxes->getInternalIterator()->rewind(); + reset($collOrderProductTaxes); return $collOrderProductTaxes; } @@ -2701,13 +2701,7 @@ abstract class OrderProduct implements ActiveRecordInterface } } // if ($deep) - if ($this->collOrderProductAttributeCombinations instanceof Collection) { - $this->collOrderProductAttributeCombinations->clearIterator(); - } $this->collOrderProductAttributeCombinations = null; - if ($this->collOrderProductTaxes instanceof Collection) { - $this->collOrderProductTaxes->clearIterator(); - } $this->collOrderProductTaxes = null; $this->aOrder = null; } @@ -2731,7 +2725,7 @@ abstract class OrderProduct implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = OrderProductTableMap::UPDATED_AT; + $this->modifiedColumns[OrderProductTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/OrderProductAttributeCombination.php b/core/lib/Thelia/Model/Base/OrderProductAttributeCombination.php index 79409f735..c1ea23848 100644 --- a/core/lib/Thelia/Model/Base/OrderProductAttributeCombination.php +++ b/core/lib/Thelia/Model/Base/OrderProductAttributeCombination.php @@ -155,7 +155,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -166,7 +166,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -175,7 +175,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -228,8 +228,8 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -563,7 +563,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = OrderProductAttributeCombinationTableMap::ID; + $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ID] = true; } @@ -584,7 +584,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface if ($this->order_product_id !== $v) { $this->order_product_id = $v; - $this->modifiedColumns[] = OrderProductAttributeCombinationTableMap::ORDER_PRODUCT_ID; + $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ORDER_PRODUCT_ID] = true; } if ($this->aOrderProduct !== null && $this->aOrderProduct->getId() !== $v) { @@ -609,7 +609,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface if ($this->attribute_title !== $v) { $this->attribute_title = $v; - $this->modifiedColumns[] = OrderProductAttributeCombinationTableMap::ATTRIBUTE_TITLE; + $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_TITLE] = true; } @@ -630,7 +630,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface if ($this->attribute_chapo !== $v) { $this->attribute_chapo = $v; - $this->modifiedColumns[] = OrderProductAttributeCombinationTableMap::ATTRIBUTE_CHAPO; + $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_CHAPO] = true; } @@ -651,7 +651,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface if ($this->attribute_description !== $v) { $this->attribute_description = $v; - $this->modifiedColumns[] = OrderProductAttributeCombinationTableMap::ATTRIBUTE_DESCRIPTION; + $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_DESCRIPTION] = true; } @@ -672,7 +672,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface if ($this->attribute_postscriptum !== $v) { $this->attribute_postscriptum = $v; - $this->modifiedColumns[] = OrderProductAttributeCombinationTableMap::ATTRIBUTE_POSTSCRIPTUM; + $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_POSTSCRIPTUM] = true; } @@ -693,7 +693,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface if ($this->attribute_av_title !== $v) { $this->attribute_av_title = $v; - $this->modifiedColumns[] = OrderProductAttributeCombinationTableMap::ATTRIBUTE_AV_TITLE; + $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_AV_TITLE] = true; } @@ -714,7 +714,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface if ($this->attribute_av_chapo !== $v) { $this->attribute_av_chapo = $v; - $this->modifiedColumns[] = OrderProductAttributeCombinationTableMap::ATTRIBUTE_AV_CHAPO; + $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_AV_CHAPO] = true; } @@ -735,7 +735,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface if ($this->attribute_av_description !== $v) { $this->attribute_av_description = $v; - $this->modifiedColumns[] = OrderProductAttributeCombinationTableMap::ATTRIBUTE_AV_DESCRIPTION; + $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_AV_DESCRIPTION] = true; } @@ -756,7 +756,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface if ($this->attribute_av_postscriptum !== $v) { $this->attribute_av_postscriptum = $v; - $this->modifiedColumns[] = OrderProductAttributeCombinationTableMap::ATTRIBUTE_AV_POSTSCRIPTUM; + $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ATTRIBUTE_AV_POSTSCRIPTUM] = true; } @@ -776,7 +776,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = OrderProductAttributeCombinationTableMap::CREATED_AT; + $this->modifiedColumns[OrderProductAttributeCombinationTableMap::CREATED_AT] = true; } } // if either are not null @@ -797,7 +797,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = OrderProductAttributeCombinationTableMap::UPDATED_AT; + $this->modifiedColumns[OrderProductAttributeCombinationTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1121,7 +1121,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = OrderProductAttributeCombinationTableMap::ID; + $this->modifiedColumns[OrderProductAttributeCombinationTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . OrderProductAttributeCombinationTableMap::ID . ')'); } @@ -1701,7 +1701,7 @@ abstract class OrderProductAttributeCombination implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = OrderProductAttributeCombinationTableMap::UPDATED_AT; + $this->modifiedColumns[OrderProductAttributeCombinationTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/OrderProductTax.php b/core/lib/Thelia/Model/Base/OrderProductTax.php index f60c85bc8..b394dde60 100644 --- a/core/lib/Thelia/Model/Base/OrderProductTax.php +++ b/core/lib/Thelia/Model/Base/OrderProductTax.php @@ -131,7 +131,7 @@ abstract class OrderProductTax implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -142,7 +142,7 @@ abstract class OrderProductTax implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -151,7 +151,7 @@ abstract class OrderProductTax implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -204,8 +204,8 @@ abstract class OrderProductTax implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -495,7 +495,7 @@ abstract class OrderProductTax implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = OrderProductTaxTableMap::ID; + $this->modifiedColumns[OrderProductTaxTableMap::ID] = true; } @@ -516,7 +516,7 @@ abstract class OrderProductTax implements ActiveRecordInterface if ($this->order_product_id !== $v) { $this->order_product_id = $v; - $this->modifiedColumns[] = OrderProductTaxTableMap::ORDER_PRODUCT_ID; + $this->modifiedColumns[OrderProductTaxTableMap::ORDER_PRODUCT_ID] = true; } if ($this->aOrderProduct !== null && $this->aOrderProduct->getId() !== $v) { @@ -541,7 +541,7 @@ abstract class OrderProductTax implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = OrderProductTaxTableMap::TITLE; + $this->modifiedColumns[OrderProductTaxTableMap::TITLE] = true; } @@ -562,7 +562,7 @@ abstract class OrderProductTax implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = OrderProductTaxTableMap::DESCRIPTION; + $this->modifiedColumns[OrderProductTaxTableMap::DESCRIPTION] = true; } @@ -583,7 +583,7 @@ abstract class OrderProductTax implements ActiveRecordInterface if ($this->amount !== $v) { $this->amount = $v; - $this->modifiedColumns[] = OrderProductTaxTableMap::AMOUNT; + $this->modifiedColumns[OrderProductTaxTableMap::AMOUNT] = true; } @@ -604,7 +604,7 @@ abstract class OrderProductTax implements ActiveRecordInterface if ($this->promo_amount !== $v) { $this->promo_amount = $v; - $this->modifiedColumns[] = OrderProductTaxTableMap::PROMO_AMOUNT; + $this->modifiedColumns[OrderProductTaxTableMap::PROMO_AMOUNT] = true; } @@ -624,7 +624,7 @@ abstract class OrderProductTax implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = OrderProductTaxTableMap::CREATED_AT; + $this->modifiedColumns[OrderProductTaxTableMap::CREATED_AT] = true; } } // if either are not null @@ -645,7 +645,7 @@ abstract class OrderProductTax implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = OrderProductTaxTableMap::UPDATED_AT; + $this->modifiedColumns[OrderProductTaxTableMap::UPDATED_AT] = true; } } // if either are not null @@ -957,7 +957,7 @@ abstract class OrderProductTax implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = OrderProductTaxTableMap::ID; + $this->modifiedColumns[OrderProductTaxTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . OrderProductTaxTableMap::ID . ')'); } @@ -1469,7 +1469,7 @@ abstract class OrderProductTax implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = OrderProductTaxTableMap::UPDATED_AT; + $this->modifiedColumns[OrderProductTaxTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/OrderStatus.php b/core/lib/Thelia/Model/Base/OrderStatus.php index 754876942..2e612d635 100644 --- a/core/lib/Thelia/Model/Base/OrderStatus.php +++ b/core/lib/Thelia/Model/Base/OrderStatus.php @@ -143,7 +143,7 @@ abstract class OrderStatus implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -154,7 +154,7 @@ abstract class OrderStatus implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -163,7 +163,7 @@ abstract class OrderStatus implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -216,8 +216,8 @@ abstract class OrderStatus implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -463,7 +463,7 @@ abstract class OrderStatus implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = OrderStatusTableMap::ID; + $this->modifiedColumns[OrderStatusTableMap::ID] = true; } @@ -484,7 +484,7 @@ abstract class OrderStatus implements ActiveRecordInterface if ($this->code !== $v) { $this->code = $v; - $this->modifiedColumns[] = OrderStatusTableMap::CODE; + $this->modifiedColumns[OrderStatusTableMap::CODE] = true; } @@ -504,7 +504,7 @@ abstract class OrderStatus implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = OrderStatusTableMap::CREATED_AT; + $this->modifiedColumns[OrderStatusTableMap::CREATED_AT] = true; } } // if either are not null @@ -525,7 +525,7 @@ abstract class OrderStatus implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = OrderStatusTableMap::UPDATED_AT; + $this->modifiedColumns[OrderStatusTableMap::UPDATED_AT] = true; } } // if either are not null @@ -847,7 +847,7 @@ abstract class OrderStatus implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = OrderStatusTableMap::ID; + $this->modifiedColumns[OrderStatusTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . OrderStatusTableMap::ID . ')'); } @@ -1312,7 +1312,7 @@ abstract class OrderStatus implements ActiveRecordInterface $this->collOrdersPartial = true; } - $collOrders->getInternalIterator()->rewind(); + reset($collOrders); return $collOrders; } @@ -1705,7 +1705,7 @@ abstract class OrderStatus implements ActiveRecordInterface $this->collOrderStatusI18nsPartial = true; } - $collOrderStatusI18ns->getInternalIterator()->rewind(); + reset($collOrderStatusI18ns); return $collOrderStatusI18ns; } @@ -1892,13 +1892,7 @@ abstract class OrderStatus implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collOrders instanceof Collection) { - $this->collOrders->clearIterator(); - } $this->collOrders = null; - if ($this->collOrderStatusI18ns instanceof Collection) { - $this->collOrderStatusI18ns->clearIterator(); - } $this->collOrderStatusI18ns = null; } @@ -1921,7 +1915,7 @@ abstract class OrderStatus implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = OrderStatusTableMap::UPDATED_AT; + $this->modifiedColumns[OrderStatusTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/OrderStatusI18n.php b/core/lib/Thelia/Model/Base/OrderStatusI18n.php index 82a84fcea..18c757c39 100644 --- a/core/lib/Thelia/Model/Base/OrderStatusI18n.php +++ b/core/lib/Thelia/Model/Base/OrderStatusI18n.php @@ -130,7 +130,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class OrderStatusI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = OrderStatusI18nTableMap::ID; + $this->modifiedColumns[OrderStatusI18nTableMap::ID] = true; } if ($this->aOrderStatus !== null && $this->aOrderStatus->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = OrderStatusI18nTableMap::LOCALE; + $this->modifiedColumns[OrderStatusI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = OrderStatusI18nTableMap::TITLE; + $this->modifiedColumns[OrderStatusI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = OrderStatusI18nTableMap::DESCRIPTION; + $this->modifiedColumns[OrderStatusI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = OrderStatusI18nTableMap::CHAPO; + $this->modifiedColumns[OrderStatusI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class OrderStatusI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = OrderStatusI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[OrderStatusI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/Product.php b/core/lib/Thelia/Model/Base/Product.php index 2f7cb3468..8b1d07a23 100644 --- a/core/lib/Thelia/Model/Base/Product.php +++ b/core/lib/Thelia/Model/Base/Product.php @@ -383,7 +383,7 @@ abstract class Product implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -394,7 +394,7 @@ abstract class Product implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -403,7 +403,7 @@ abstract class Product implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -456,8 +456,8 @@ abstract class Product implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -789,7 +789,7 @@ abstract class Product implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ProductTableMap::ID; + $this->modifiedColumns[ProductTableMap::ID] = true; } @@ -810,7 +810,7 @@ abstract class Product implements ActiveRecordInterface if ($this->tax_rule_id !== $v) { $this->tax_rule_id = $v; - $this->modifiedColumns[] = ProductTableMap::TAX_RULE_ID; + $this->modifiedColumns[ProductTableMap::TAX_RULE_ID] = true; } if ($this->aTaxRule !== null && $this->aTaxRule->getId() !== $v) { @@ -835,7 +835,7 @@ abstract class Product implements ActiveRecordInterface if ($this->ref !== $v) { $this->ref = $v; - $this->modifiedColumns[] = ProductTableMap::REF; + $this->modifiedColumns[ProductTableMap::REF] = true; } @@ -856,7 +856,7 @@ abstract class Product implements ActiveRecordInterface if ($this->visible !== $v) { $this->visible = $v; - $this->modifiedColumns[] = ProductTableMap::VISIBLE; + $this->modifiedColumns[ProductTableMap::VISIBLE] = true; } @@ -877,7 +877,7 @@ abstract class Product implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = ProductTableMap::POSITION; + $this->modifiedColumns[ProductTableMap::POSITION] = true; } @@ -898,7 +898,7 @@ abstract class Product implements ActiveRecordInterface if ($this->template_id !== $v) { $this->template_id = $v; - $this->modifiedColumns[] = ProductTableMap::TEMPLATE_ID; + $this->modifiedColumns[ProductTableMap::TEMPLATE_ID] = true; } if ($this->aTemplate !== null && $this->aTemplate->getId() !== $v) { @@ -922,7 +922,7 @@ abstract class Product implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ProductTableMap::CREATED_AT; + $this->modifiedColumns[ProductTableMap::CREATED_AT] = true; } } // if either are not null @@ -943,7 +943,7 @@ abstract class Product implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ProductTableMap::UPDATED_AT; + $this->modifiedColumns[ProductTableMap::UPDATED_AT] = true; } } // if either are not null @@ -965,7 +965,7 @@ abstract class Product implements ActiveRecordInterface if ($this->version !== $v) { $this->version = $v; - $this->modifiedColumns[] = ProductTableMap::VERSION; + $this->modifiedColumns[ProductTableMap::VERSION] = true; } @@ -985,7 +985,7 @@ abstract class Product implements ActiveRecordInterface if ($this->version_created_at !== null || $dt !== null) { if ($dt !== $this->version_created_at) { $this->version_created_at = $dt; - $this->modifiedColumns[] = ProductTableMap::VERSION_CREATED_AT; + $this->modifiedColumns[ProductTableMap::VERSION_CREATED_AT] = true; } } // if either are not null @@ -1007,7 +1007,7 @@ abstract class Product implements ActiveRecordInterface if ($this->version_created_by !== $v) { $this->version_created_by = $v; - $this->modifiedColumns[] = ProductTableMap::VERSION_CREATED_BY; + $this->modifiedColumns[ProductTableMap::VERSION_CREATED_BY] = true; } @@ -1654,7 +1654,7 @@ abstract class Product implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = ProductTableMap::ID; + $this->modifiedColumns[ProductTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . ProductTableMap::ID . ')'); } @@ -2447,7 +2447,7 @@ abstract class Product implements ActiveRecordInterface $this->collProductCategoriesPartial = true; } - $collProductCategories->getInternalIterator()->rewind(); + reset($collProductCategories); return $collProductCategories; } @@ -2693,7 +2693,7 @@ abstract class Product implements ActiveRecordInterface $this->collFeatureProductsPartial = true; } - $collFeatureProducts->getInternalIterator()->rewind(); + reset($collFeatureProducts); return $collFeatureProducts; } @@ -2961,7 +2961,7 @@ abstract class Product implements ActiveRecordInterface $this->collProductSaleElementssPartial = true; } - $collProductSaleElementss->getInternalIterator()->rewind(); + reset($collProductSaleElementss); return $collProductSaleElementss; } @@ -3179,7 +3179,7 @@ abstract class Product implements ActiveRecordInterface $this->collProductImagesPartial = true; } - $collProductImages->getInternalIterator()->rewind(); + reset($collProductImages); return $collProductImages; } @@ -3397,7 +3397,7 @@ abstract class Product implements ActiveRecordInterface $this->collProductDocumentsPartial = true; } - $collProductDocuments->getInternalIterator()->rewind(); + reset($collProductDocuments); return $collProductDocuments; } @@ -3615,7 +3615,7 @@ abstract class Product implements ActiveRecordInterface $this->collAccessoriesRelatedByProductIdPartial = true; } - $collAccessoriesRelatedByProductId->getInternalIterator()->rewind(); + reset($collAccessoriesRelatedByProductId); return $collAccessoriesRelatedByProductId; } @@ -3833,7 +3833,7 @@ abstract class Product implements ActiveRecordInterface $this->collAccessoriesRelatedByAccessoryPartial = true; } - $collAccessoriesRelatedByAccessory->getInternalIterator()->rewind(); + reset($collAccessoriesRelatedByAccessory); return $collAccessoriesRelatedByAccessory; } @@ -4051,7 +4051,7 @@ abstract class Product implements ActiveRecordInterface $this->collCartItemsPartial = true; } - $collCartItems->getInternalIterator()->rewind(); + reset($collCartItems); return $collCartItems; } @@ -4319,7 +4319,7 @@ abstract class Product implements ActiveRecordInterface $this->collProductAssociatedContentsPartial = true; } - $collProductAssociatedContents->getInternalIterator()->rewind(); + reset($collProductAssociatedContents); return $collProductAssociatedContents; } @@ -4562,7 +4562,7 @@ abstract class Product implements ActiveRecordInterface $this->collProductI18nsPartial = true; } - $collProductI18ns->getInternalIterator()->rewind(); + reset($collProductI18ns); return $collProductI18ns; } @@ -4787,7 +4787,7 @@ abstract class Product implements ActiveRecordInterface $this->collProductVersionsPartial = true; } - $collProductVersions->getInternalIterator()->rewind(); + reset($collProductVersions); return $collProductVersions; } @@ -5587,61 +5587,19 @@ abstract class Product implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collProductCategories instanceof Collection) { - $this->collProductCategories->clearIterator(); - } $this->collProductCategories = null; - if ($this->collFeatureProducts instanceof Collection) { - $this->collFeatureProducts->clearIterator(); - } $this->collFeatureProducts = null; - if ($this->collProductSaleElementss instanceof Collection) { - $this->collProductSaleElementss->clearIterator(); - } $this->collProductSaleElementss = null; - if ($this->collProductImages instanceof Collection) { - $this->collProductImages->clearIterator(); - } $this->collProductImages = null; - if ($this->collProductDocuments instanceof Collection) { - $this->collProductDocuments->clearIterator(); - } $this->collProductDocuments = null; - if ($this->collAccessoriesRelatedByProductId instanceof Collection) { - $this->collAccessoriesRelatedByProductId->clearIterator(); - } $this->collAccessoriesRelatedByProductId = null; - if ($this->collAccessoriesRelatedByAccessory instanceof Collection) { - $this->collAccessoriesRelatedByAccessory->clearIterator(); - } $this->collAccessoriesRelatedByAccessory = null; - if ($this->collCartItems instanceof Collection) { - $this->collCartItems->clearIterator(); - } $this->collCartItems = null; - if ($this->collProductAssociatedContents instanceof Collection) { - $this->collProductAssociatedContents->clearIterator(); - } $this->collProductAssociatedContents = null; - if ($this->collProductI18ns instanceof Collection) { - $this->collProductI18ns->clearIterator(); - } $this->collProductI18ns = null; - if ($this->collProductVersions instanceof Collection) { - $this->collProductVersions->clearIterator(); - } $this->collProductVersions = null; - if ($this->collCategories instanceof Collection) { - $this->collCategories->clearIterator(); - } $this->collCategories = null; - if ($this->collProductsRelatedByAccessory instanceof Collection) { - $this->collProductsRelatedByAccessory->clearIterator(); - } $this->collProductsRelatedByAccessory = null; - if ($this->collProductsRelatedByProductId instanceof Collection) { - $this->collProductsRelatedByProductId->clearIterator(); - } $this->collProductsRelatedByProductId = null; $this->aTaxRule = null; $this->aTemplate = null; @@ -5666,7 +5624,7 @@ abstract class Product implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ProductTableMap::UPDATED_AT; + $this->modifiedColumns[ProductTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ProductAssociatedContent.php b/core/lib/Thelia/Model/Base/ProductAssociatedContent.php index a0ce4312c..40446fe47 100644 --- a/core/lib/Thelia/Model/Base/ProductAssociatedContent.php +++ b/core/lib/Thelia/Model/Base/ProductAssociatedContent.php @@ -126,7 +126,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -137,7 +137,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -146,7 +146,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -199,8 +199,8 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -468,7 +468,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ProductAssociatedContentTableMap::ID; + $this->modifiedColumns[ProductAssociatedContentTableMap::ID] = true; } @@ -489,7 +489,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface if ($this->product_id !== $v) { $this->product_id = $v; - $this->modifiedColumns[] = ProductAssociatedContentTableMap::PRODUCT_ID; + $this->modifiedColumns[ProductAssociatedContentTableMap::PRODUCT_ID] = true; } if ($this->aProduct !== null && $this->aProduct->getId() !== $v) { @@ -514,7 +514,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface if ($this->content_id !== $v) { $this->content_id = $v; - $this->modifiedColumns[] = ProductAssociatedContentTableMap::CONTENT_ID; + $this->modifiedColumns[ProductAssociatedContentTableMap::CONTENT_ID] = true; } if ($this->aContent !== null && $this->aContent->getId() !== $v) { @@ -539,7 +539,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = ProductAssociatedContentTableMap::POSITION; + $this->modifiedColumns[ProductAssociatedContentTableMap::POSITION] = true; } @@ -559,7 +559,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ProductAssociatedContentTableMap::CREATED_AT; + $this->modifiedColumns[ProductAssociatedContentTableMap::CREATED_AT] = true; } } // if either are not null @@ -580,7 +580,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ProductAssociatedContentTableMap::UPDATED_AT; + $this->modifiedColumns[ProductAssociatedContentTableMap::UPDATED_AT] = true; } } // if either are not null @@ -897,7 +897,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = ProductAssociatedContentTableMap::ID; + $this->modifiedColumns[ProductAssociatedContentTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . ProductAssociatedContentTableMap::ID . ')'); } @@ -1430,7 +1430,7 @@ abstract class ProductAssociatedContent implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ProductAssociatedContentTableMap::UPDATED_AT; + $this->modifiedColumns[ProductAssociatedContentTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ProductCategory.php b/core/lib/Thelia/Model/Base/ProductCategory.php index 99448c960..6e3b6139c 100644 --- a/core/lib/Thelia/Model/Base/ProductCategory.php +++ b/core/lib/Thelia/Model/Base/ProductCategory.php @@ -120,7 +120,7 @@ abstract class ProductCategory implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -131,7 +131,7 @@ abstract class ProductCategory implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -140,7 +140,7 @@ abstract class ProductCategory implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -193,8 +193,8 @@ abstract class ProductCategory implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -451,7 +451,7 @@ abstract class ProductCategory implements ActiveRecordInterface if ($this->product_id !== $v) { $this->product_id = $v; - $this->modifiedColumns[] = ProductCategoryTableMap::PRODUCT_ID; + $this->modifiedColumns[ProductCategoryTableMap::PRODUCT_ID] = true; } if ($this->aProduct !== null && $this->aProduct->getId() !== $v) { @@ -476,7 +476,7 @@ abstract class ProductCategory implements ActiveRecordInterface if ($this->category_id !== $v) { $this->category_id = $v; - $this->modifiedColumns[] = ProductCategoryTableMap::CATEGORY_ID; + $this->modifiedColumns[ProductCategoryTableMap::CATEGORY_ID] = true; } if ($this->aCategory !== null && $this->aCategory->getId() !== $v) { @@ -509,7 +509,7 @@ abstract class ProductCategory implements ActiveRecordInterface if ($this->default_category !== $v) { $this->default_category = $v; - $this->modifiedColumns[] = ProductCategoryTableMap::DEFAULT_CATEGORY; + $this->modifiedColumns[ProductCategoryTableMap::DEFAULT_CATEGORY] = true; } @@ -529,7 +529,7 @@ abstract class ProductCategory implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ProductCategoryTableMap::CREATED_AT; + $this->modifiedColumns[ProductCategoryTableMap::CREATED_AT] = true; } } // if either are not null @@ -550,7 +550,7 @@ abstract class ProductCategory implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ProductCategoryTableMap::UPDATED_AT; + $this->modifiedColumns[ProductCategoryTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1376,7 +1376,7 @@ abstract class ProductCategory implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ProductCategoryTableMap::UPDATED_AT; + $this->modifiedColumns[ProductCategoryTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ProductDocument.php b/core/lib/Thelia/Model/Base/ProductDocument.php index e29fc582a..e8d35e2cb 100644 --- a/core/lib/Thelia/Model/Base/ProductDocument.php +++ b/core/lib/Thelia/Model/Base/ProductDocument.php @@ -148,7 +148,7 @@ abstract class ProductDocument implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -159,7 +159,7 @@ abstract class ProductDocument implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -168,7 +168,7 @@ abstract class ProductDocument implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -221,8 +221,8 @@ abstract class ProductDocument implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -490,7 +490,7 @@ abstract class ProductDocument implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ProductDocumentTableMap::ID; + $this->modifiedColumns[ProductDocumentTableMap::ID] = true; } @@ -511,7 +511,7 @@ abstract class ProductDocument implements ActiveRecordInterface if ($this->product_id !== $v) { $this->product_id = $v; - $this->modifiedColumns[] = ProductDocumentTableMap::PRODUCT_ID; + $this->modifiedColumns[ProductDocumentTableMap::PRODUCT_ID] = true; } if ($this->aProduct !== null && $this->aProduct->getId() !== $v) { @@ -536,7 +536,7 @@ abstract class ProductDocument implements ActiveRecordInterface if ($this->file !== $v) { $this->file = $v; - $this->modifiedColumns[] = ProductDocumentTableMap::FILE; + $this->modifiedColumns[ProductDocumentTableMap::FILE] = true; } @@ -557,7 +557,7 @@ abstract class ProductDocument implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = ProductDocumentTableMap::POSITION; + $this->modifiedColumns[ProductDocumentTableMap::POSITION] = true; } @@ -577,7 +577,7 @@ abstract class ProductDocument implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ProductDocumentTableMap::CREATED_AT; + $this->modifiedColumns[ProductDocumentTableMap::CREATED_AT] = true; } } // if either are not null @@ -598,7 +598,7 @@ abstract class ProductDocument implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ProductDocumentTableMap::UPDATED_AT; + $this->modifiedColumns[ProductDocumentTableMap::UPDATED_AT] = true; } } // if either are not null @@ -923,7 +923,7 @@ abstract class ProductDocument implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = ProductDocumentTableMap::ID; + $this->modifiedColumns[ProductDocumentTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . ProductDocumentTableMap::ID . ')'); } @@ -1462,7 +1462,7 @@ abstract class ProductDocument implements ActiveRecordInterface $this->collProductDocumentI18nsPartial = true; } - $collProductDocumentI18ns->getInternalIterator()->rewind(); + reset($collProductDocumentI18ns); return $collProductDocumentI18ns; } @@ -1646,9 +1646,6 @@ abstract class ProductDocument implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collProductDocumentI18ns instanceof Collection) { - $this->collProductDocumentI18ns->clearIterator(); - } $this->collProductDocumentI18ns = null; $this->aProduct = null; } @@ -1672,7 +1669,7 @@ abstract class ProductDocument implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ProductDocumentTableMap::UPDATED_AT; + $this->modifiedColumns[ProductDocumentTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ProductDocumentI18n.php b/core/lib/Thelia/Model/Base/ProductDocumentI18n.php index 18ec53fa2..cf9d7e57e 100644 --- a/core/lib/Thelia/Model/Base/ProductDocumentI18n.php +++ b/core/lib/Thelia/Model/Base/ProductDocumentI18n.php @@ -130,7 +130,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ProductDocumentI18nTableMap::ID; + $this->modifiedColumns[ProductDocumentI18nTableMap::ID] = true; } if ($this->aProductDocument !== null && $this->aProductDocument->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = ProductDocumentI18nTableMap::LOCALE; + $this->modifiedColumns[ProductDocumentI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = ProductDocumentI18nTableMap::TITLE; + $this->modifiedColumns[ProductDocumentI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = ProductDocumentI18nTableMap::DESCRIPTION; + $this->modifiedColumns[ProductDocumentI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = ProductDocumentI18nTableMap::CHAPO; + $this->modifiedColumns[ProductDocumentI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class ProductDocumentI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = ProductDocumentI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[ProductDocumentI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/ProductI18n.php b/core/lib/Thelia/Model/Base/ProductI18n.php index b76519fe0..ef90f2de5 100644 --- a/core/lib/Thelia/Model/Base/ProductI18n.php +++ b/core/lib/Thelia/Model/Base/ProductI18n.php @@ -148,7 +148,7 @@ abstract class ProductI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -159,7 +159,7 @@ abstract class ProductI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -168,7 +168,7 @@ abstract class ProductI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -221,8 +221,8 @@ abstract class ProductI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -505,7 +505,7 @@ abstract class ProductI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ProductI18nTableMap::ID; + $this->modifiedColumns[ProductI18nTableMap::ID] = true; } if ($this->aProduct !== null && $this->aProduct->getId() !== $v) { @@ -530,7 +530,7 @@ abstract class ProductI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = ProductI18nTableMap::LOCALE; + $this->modifiedColumns[ProductI18nTableMap::LOCALE] = true; } @@ -551,7 +551,7 @@ abstract class ProductI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = ProductI18nTableMap::TITLE; + $this->modifiedColumns[ProductI18nTableMap::TITLE] = true; } @@ -572,7 +572,7 @@ abstract class ProductI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = ProductI18nTableMap::DESCRIPTION; + $this->modifiedColumns[ProductI18nTableMap::DESCRIPTION] = true; } @@ -593,7 +593,7 @@ abstract class ProductI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = ProductI18nTableMap::CHAPO; + $this->modifiedColumns[ProductI18nTableMap::CHAPO] = true; } @@ -614,7 +614,7 @@ abstract class ProductI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = ProductI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[ProductI18nTableMap::POSTSCRIPTUM] = true; } @@ -635,7 +635,7 @@ abstract class ProductI18n implements ActiveRecordInterface if ($this->meta_title !== $v) { $this->meta_title = $v; - $this->modifiedColumns[] = ProductI18nTableMap::META_TITLE; + $this->modifiedColumns[ProductI18nTableMap::META_TITLE] = true; } @@ -656,7 +656,7 @@ abstract class ProductI18n implements ActiveRecordInterface if ($this->meta_description !== $v) { $this->meta_description = $v; - $this->modifiedColumns[] = ProductI18nTableMap::META_DESCRIPTION; + $this->modifiedColumns[ProductI18nTableMap::META_DESCRIPTION] = true; } @@ -677,7 +677,7 @@ abstract class ProductI18n implements ActiveRecordInterface if ($this->meta_keywords !== $v) { $this->meta_keywords = $v; - $this->modifiedColumns[] = ProductI18nTableMap::META_KEYWORDS; + $this->modifiedColumns[ProductI18nTableMap::META_KEYWORDS] = true; } diff --git a/core/lib/Thelia/Model/Base/ProductImage.php b/core/lib/Thelia/Model/Base/ProductImage.php index 450cf5b91..bb0973b2d 100644 --- a/core/lib/Thelia/Model/Base/ProductImage.php +++ b/core/lib/Thelia/Model/Base/ProductImage.php @@ -148,7 +148,7 @@ abstract class ProductImage implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -159,7 +159,7 @@ abstract class ProductImage implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -168,7 +168,7 @@ abstract class ProductImage implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -221,8 +221,8 @@ abstract class ProductImage implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -490,7 +490,7 @@ abstract class ProductImage implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ProductImageTableMap::ID; + $this->modifiedColumns[ProductImageTableMap::ID] = true; } @@ -511,7 +511,7 @@ abstract class ProductImage implements ActiveRecordInterface if ($this->product_id !== $v) { $this->product_id = $v; - $this->modifiedColumns[] = ProductImageTableMap::PRODUCT_ID; + $this->modifiedColumns[ProductImageTableMap::PRODUCT_ID] = true; } if ($this->aProduct !== null && $this->aProduct->getId() !== $v) { @@ -536,7 +536,7 @@ abstract class ProductImage implements ActiveRecordInterface if ($this->file !== $v) { $this->file = $v; - $this->modifiedColumns[] = ProductImageTableMap::FILE; + $this->modifiedColumns[ProductImageTableMap::FILE] = true; } @@ -557,7 +557,7 @@ abstract class ProductImage implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = ProductImageTableMap::POSITION; + $this->modifiedColumns[ProductImageTableMap::POSITION] = true; } @@ -577,7 +577,7 @@ abstract class ProductImage implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ProductImageTableMap::CREATED_AT; + $this->modifiedColumns[ProductImageTableMap::CREATED_AT] = true; } } // if either are not null @@ -598,7 +598,7 @@ abstract class ProductImage implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ProductImageTableMap::UPDATED_AT; + $this->modifiedColumns[ProductImageTableMap::UPDATED_AT] = true; } } // if either are not null @@ -923,7 +923,7 @@ abstract class ProductImage implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = ProductImageTableMap::ID; + $this->modifiedColumns[ProductImageTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . ProductImageTableMap::ID . ')'); } @@ -1462,7 +1462,7 @@ abstract class ProductImage implements ActiveRecordInterface $this->collProductImageI18nsPartial = true; } - $collProductImageI18ns->getInternalIterator()->rewind(); + reset($collProductImageI18ns); return $collProductImageI18ns; } @@ -1646,9 +1646,6 @@ abstract class ProductImage implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collProductImageI18ns instanceof Collection) { - $this->collProductImageI18ns->clearIterator(); - } $this->collProductImageI18ns = null; $this->aProduct = null; } @@ -1672,7 +1669,7 @@ abstract class ProductImage implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ProductImageTableMap::UPDATED_AT; + $this->modifiedColumns[ProductImageTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ProductImageI18n.php b/core/lib/Thelia/Model/Base/ProductImageI18n.php index 2b725e831..ede0e5516 100644 --- a/core/lib/Thelia/Model/Base/ProductImageI18n.php +++ b/core/lib/Thelia/Model/Base/ProductImageI18n.php @@ -130,7 +130,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class ProductImageI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ProductImageI18nTableMap::ID; + $this->modifiedColumns[ProductImageI18nTableMap::ID] = true; } if ($this->aProductImage !== null && $this->aProductImage->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = ProductImageI18nTableMap::LOCALE; + $this->modifiedColumns[ProductImageI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = ProductImageI18nTableMap::TITLE; + $this->modifiedColumns[ProductImageI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = ProductImageI18nTableMap::DESCRIPTION; + $this->modifiedColumns[ProductImageI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = ProductImageI18nTableMap::CHAPO; + $this->modifiedColumns[ProductImageI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class ProductImageI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = ProductImageI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[ProductImageI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/ProductPrice.php b/core/lib/Thelia/Model/Base/ProductPrice.php index aa92b460a..a883a524c 100644 --- a/core/lib/Thelia/Model/Base/ProductPrice.php +++ b/core/lib/Thelia/Model/Base/ProductPrice.php @@ -150,7 +150,7 @@ abstract class ProductPrice implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -161,7 +161,7 @@ abstract class ProductPrice implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -170,7 +170,7 @@ abstract class ProductPrice implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -223,8 +223,8 @@ abstract class ProductPrice implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -503,7 +503,7 @@ abstract class ProductPrice implements ActiveRecordInterface if ($this->product_sale_elements_id !== $v) { $this->product_sale_elements_id = $v; - $this->modifiedColumns[] = ProductPriceTableMap::PRODUCT_SALE_ELEMENTS_ID; + $this->modifiedColumns[ProductPriceTableMap::PRODUCT_SALE_ELEMENTS_ID] = true; } if ($this->aProductSaleElements !== null && $this->aProductSaleElements->getId() !== $v) { @@ -528,7 +528,7 @@ abstract class ProductPrice implements ActiveRecordInterface if ($this->currency_id !== $v) { $this->currency_id = $v; - $this->modifiedColumns[] = ProductPriceTableMap::CURRENCY_ID; + $this->modifiedColumns[ProductPriceTableMap::CURRENCY_ID] = true; } if ($this->aCurrency !== null && $this->aCurrency->getId() !== $v) { @@ -553,7 +553,7 @@ abstract class ProductPrice implements ActiveRecordInterface if ($this->price !== $v) { $this->price = $v; - $this->modifiedColumns[] = ProductPriceTableMap::PRICE; + $this->modifiedColumns[ProductPriceTableMap::PRICE] = true; } @@ -574,7 +574,7 @@ abstract class ProductPrice implements ActiveRecordInterface if ($this->promo_price !== $v) { $this->promo_price = $v; - $this->modifiedColumns[] = ProductPriceTableMap::PROMO_PRICE; + $this->modifiedColumns[ProductPriceTableMap::PROMO_PRICE] = true; } @@ -603,7 +603,7 @@ abstract class ProductPrice implements ActiveRecordInterface if ($this->from_default_currency !== $v) { $this->from_default_currency = $v; - $this->modifiedColumns[] = ProductPriceTableMap::FROM_DEFAULT_CURRENCY; + $this->modifiedColumns[ProductPriceTableMap::FROM_DEFAULT_CURRENCY] = true; } @@ -623,7 +623,7 @@ abstract class ProductPrice implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ProductPriceTableMap::CREATED_AT; + $this->modifiedColumns[ProductPriceTableMap::CREATED_AT] = true; } } // if either are not null @@ -644,7 +644,7 @@ abstract class ProductPrice implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ProductPriceTableMap::UPDATED_AT; + $this->modifiedColumns[ProductPriceTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1523,7 +1523,7 @@ abstract class ProductPrice implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ProductPriceTableMap::UPDATED_AT; + $this->modifiedColumns[ProductPriceTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ProductSaleElements.php b/core/lib/Thelia/Model/Base/ProductSaleElements.php index 3ace78d00..cb899c8c5 100644 --- a/core/lib/Thelia/Model/Base/ProductSaleElements.php +++ b/core/lib/Thelia/Model/Base/ProductSaleElements.php @@ -212,7 +212,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -223,7 +223,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -232,7 +232,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -285,8 +285,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -609,7 +609,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ProductSaleElementsTableMap::ID; + $this->modifiedColumns[ProductSaleElementsTableMap::ID] = true; } @@ -630,7 +630,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface if ($this->product_id !== $v) { $this->product_id = $v; - $this->modifiedColumns[] = ProductSaleElementsTableMap::PRODUCT_ID; + $this->modifiedColumns[ProductSaleElementsTableMap::PRODUCT_ID] = true; } if ($this->aProduct !== null && $this->aProduct->getId() !== $v) { @@ -655,7 +655,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface if ($this->ref !== $v) { $this->ref = $v; - $this->modifiedColumns[] = ProductSaleElementsTableMap::REF; + $this->modifiedColumns[ProductSaleElementsTableMap::REF] = true; } @@ -676,7 +676,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface if ($this->quantity !== $v) { $this->quantity = $v; - $this->modifiedColumns[] = ProductSaleElementsTableMap::QUANTITY; + $this->modifiedColumns[ProductSaleElementsTableMap::QUANTITY] = true; } @@ -697,7 +697,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface if ($this->promo !== $v) { $this->promo = $v; - $this->modifiedColumns[] = ProductSaleElementsTableMap::PROMO; + $this->modifiedColumns[ProductSaleElementsTableMap::PROMO] = true; } @@ -718,7 +718,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface if ($this->newness !== $v) { $this->newness = $v; - $this->modifiedColumns[] = ProductSaleElementsTableMap::NEWNESS; + $this->modifiedColumns[ProductSaleElementsTableMap::NEWNESS] = true; } @@ -739,7 +739,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface if ($this->weight !== $v) { $this->weight = $v; - $this->modifiedColumns[] = ProductSaleElementsTableMap::WEIGHT; + $this->modifiedColumns[ProductSaleElementsTableMap::WEIGHT] = true; } @@ -768,7 +768,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface if ($this->is_default !== $v) { $this->is_default = $v; - $this->modifiedColumns[] = ProductSaleElementsTableMap::IS_DEFAULT; + $this->modifiedColumns[ProductSaleElementsTableMap::IS_DEFAULT] = true; } @@ -789,7 +789,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface if ($this->ean_code !== $v) { $this->ean_code = $v; - $this->modifiedColumns[] = ProductSaleElementsTableMap::EAN_CODE; + $this->modifiedColumns[ProductSaleElementsTableMap::EAN_CODE] = true; } @@ -809,7 +809,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ProductSaleElementsTableMap::CREATED_AT; + $this->modifiedColumns[ProductSaleElementsTableMap::CREATED_AT] = true; } } // if either are not null @@ -830,7 +830,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ProductSaleElementsTableMap::UPDATED_AT; + $this->modifiedColumns[ProductSaleElementsTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1224,7 +1224,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = ProductSaleElementsTableMap::ID; + $this->modifiedColumns[ProductSaleElementsTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . ProductSaleElementsTableMap::ID . ')'); } @@ -1867,7 +1867,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface $this->collAttributeCombinationsPartial = true; } - $collAttributeCombinations->getInternalIterator()->rewind(); + reset($collAttributeCombinations); return $collAttributeCombinations; } @@ -2138,7 +2138,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface $this->collCartItemsPartial = true; } - $collCartItems->getInternalIterator()->rewind(); + reset($collCartItems); return $collCartItems; } @@ -2406,7 +2406,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface $this->collProductPricesPartial = true; } - $collProductPrices->getInternalIterator()->rewind(); + reset($collProductPrices); return $collProductPrices; } @@ -2623,17 +2623,8 @@ abstract class ProductSaleElements implements ActiveRecordInterface } } // if ($deep) - if ($this->collAttributeCombinations instanceof Collection) { - $this->collAttributeCombinations->clearIterator(); - } $this->collAttributeCombinations = null; - if ($this->collCartItems instanceof Collection) { - $this->collCartItems->clearIterator(); - } $this->collCartItems = null; - if ($this->collProductPrices instanceof Collection) { - $this->collProductPrices->clearIterator(); - } $this->collProductPrices = null; $this->aProduct = null; } @@ -2657,7 +2648,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ProductSaleElementsTableMap::UPDATED_AT; + $this->modifiedColumns[ProductSaleElementsTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ProductVersion.php b/core/lib/Thelia/Model/Base/ProductVersion.php index 54c628afa..fec0aefb5 100644 --- a/core/lib/Thelia/Model/Base/ProductVersion.php +++ b/core/lib/Thelia/Model/Base/ProductVersion.php @@ -164,7 +164,7 @@ abstract class ProductVersion implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -175,7 +175,7 @@ abstract class ProductVersion implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -184,7 +184,7 @@ abstract class ProductVersion implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -237,8 +237,8 @@ abstract class ProductVersion implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -570,7 +570,7 @@ abstract class ProductVersion implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ProductVersionTableMap::ID; + $this->modifiedColumns[ProductVersionTableMap::ID] = true; } if ($this->aProduct !== null && $this->aProduct->getId() !== $v) { @@ -595,7 +595,7 @@ abstract class ProductVersion implements ActiveRecordInterface if ($this->tax_rule_id !== $v) { $this->tax_rule_id = $v; - $this->modifiedColumns[] = ProductVersionTableMap::TAX_RULE_ID; + $this->modifiedColumns[ProductVersionTableMap::TAX_RULE_ID] = true; } @@ -616,7 +616,7 @@ abstract class ProductVersion implements ActiveRecordInterface if ($this->ref !== $v) { $this->ref = $v; - $this->modifiedColumns[] = ProductVersionTableMap::REF; + $this->modifiedColumns[ProductVersionTableMap::REF] = true; } @@ -637,7 +637,7 @@ abstract class ProductVersion implements ActiveRecordInterface if ($this->visible !== $v) { $this->visible = $v; - $this->modifiedColumns[] = ProductVersionTableMap::VISIBLE; + $this->modifiedColumns[ProductVersionTableMap::VISIBLE] = true; } @@ -658,7 +658,7 @@ abstract class ProductVersion implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = ProductVersionTableMap::POSITION; + $this->modifiedColumns[ProductVersionTableMap::POSITION] = true; } @@ -679,7 +679,7 @@ abstract class ProductVersion implements ActiveRecordInterface if ($this->template_id !== $v) { $this->template_id = $v; - $this->modifiedColumns[] = ProductVersionTableMap::TEMPLATE_ID; + $this->modifiedColumns[ProductVersionTableMap::TEMPLATE_ID] = true; } @@ -699,7 +699,7 @@ abstract class ProductVersion implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ProductVersionTableMap::CREATED_AT; + $this->modifiedColumns[ProductVersionTableMap::CREATED_AT] = true; } } // if either are not null @@ -720,7 +720,7 @@ abstract class ProductVersion implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ProductVersionTableMap::UPDATED_AT; + $this->modifiedColumns[ProductVersionTableMap::UPDATED_AT] = true; } } // if either are not null @@ -742,7 +742,7 @@ abstract class ProductVersion implements ActiveRecordInterface if ($this->version !== $v) { $this->version = $v; - $this->modifiedColumns[] = ProductVersionTableMap::VERSION; + $this->modifiedColumns[ProductVersionTableMap::VERSION] = true; } @@ -762,7 +762,7 @@ abstract class ProductVersion implements ActiveRecordInterface if ($this->version_created_at !== null || $dt !== null) { if ($dt !== $this->version_created_at) { $this->version_created_at = $dt; - $this->modifiedColumns[] = ProductVersionTableMap::VERSION_CREATED_AT; + $this->modifiedColumns[ProductVersionTableMap::VERSION_CREATED_AT] = true; } } // if either are not null @@ -784,7 +784,7 @@ abstract class ProductVersion implements ActiveRecordInterface if ($this->version_created_by !== $v) { $this->version_created_by = $v; - $this->modifiedColumns[] = ProductVersionTableMap::VERSION_CREATED_BY; + $this->modifiedColumns[ProductVersionTableMap::VERSION_CREATED_BY] = true; } diff --git a/core/lib/Thelia/Model/Base/Profile.php b/core/lib/Thelia/Model/Base/Profile.php index bbf597814..55b8ac6eb 100644 --- a/core/lib/Thelia/Model/Base/Profile.php +++ b/core/lib/Thelia/Model/Base/Profile.php @@ -184,7 +184,7 @@ abstract class Profile implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -195,7 +195,7 @@ abstract class Profile implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -204,7 +204,7 @@ abstract class Profile implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -257,8 +257,8 @@ abstract class Profile implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -504,7 +504,7 @@ abstract class Profile implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ProfileTableMap::ID; + $this->modifiedColumns[ProfileTableMap::ID] = true; } @@ -525,7 +525,7 @@ abstract class Profile implements ActiveRecordInterface if ($this->code !== $v) { $this->code = $v; - $this->modifiedColumns[] = ProfileTableMap::CODE; + $this->modifiedColumns[ProfileTableMap::CODE] = true; } @@ -545,7 +545,7 @@ abstract class Profile implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ProfileTableMap::CREATED_AT; + $this->modifiedColumns[ProfileTableMap::CREATED_AT] = true; } } // if either are not null @@ -566,7 +566,7 @@ abstract class Profile implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ProfileTableMap::UPDATED_AT; + $this->modifiedColumns[ProfileTableMap::UPDATED_AT] = true; } } // if either are not null @@ -955,7 +955,7 @@ abstract class Profile implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = ProfileTableMap::ID; + $this->modifiedColumns[ProfileTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . ProfileTableMap::ID . ')'); } @@ -1444,7 +1444,7 @@ abstract class Profile implements ActiveRecordInterface $this->collAdminsPartial = true; } - $collAdmins->getInternalIterator()->rewind(); + reset($collAdmins); return $collAdmins; } @@ -1662,7 +1662,7 @@ abstract class Profile implements ActiveRecordInterface $this->collProfileResourcesPartial = true; } - $collProfileResources->getInternalIterator()->rewind(); + reset($collProfileResources); return $collProfileResources; } @@ -1908,7 +1908,7 @@ abstract class Profile implements ActiveRecordInterface $this->collProfileModulesPartial = true; } - $collProfileModules->getInternalIterator()->rewind(); + reset($collProfileModules); return $collProfileModules; } @@ -2154,7 +2154,7 @@ abstract class Profile implements ActiveRecordInterface $this->collProfileI18nsPartial = true; } - $collProfileI18ns->getInternalIterator()->rewind(); + reset($collProfileI18ns); return $collProfileI18ns; } @@ -2539,25 +2539,10 @@ abstract class Profile implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collAdmins instanceof Collection) { - $this->collAdmins->clearIterator(); - } $this->collAdmins = null; - if ($this->collProfileResources instanceof Collection) { - $this->collProfileResources->clearIterator(); - } $this->collProfileResources = null; - if ($this->collProfileModules instanceof Collection) { - $this->collProfileModules->clearIterator(); - } $this->collProfileModules = null; - if ($this->collProfileI18ns instanceof Collection) { - $this->collProfileI18ns->clearIterator(); - } $this->collProfileI18ns = null; - if ($this->collResources instanceof Collection) { - $this->collResources->clearIterator(); - } $this->collResources = null; } @@ -2580,7 +2565,7 @@ abstract class Profile implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ProfileTableMap::UPDATED_AT; + $this->modifiedColumns[ProfileTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ProfileI18n.php b/core/lib/Thelia/Model/Base/ProfileI18n.php index 8fb69fa12..f68618a1d 100644 --- a/core/lib/Thelia/Model/Base/ProfileI18n.php +++ b/core/lib/Thelia/Model/Base/ProfileI18n.php @@ -130,7 +130,7 @@ abstract class ProfileI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class ProfileI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class ProfileI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class ProfileI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class ProfileI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ProfileI18nTableMap::ID; + $this->modifiedColumns[ProfileI18nTableMap::ID] = true; } if ($this->aProfile !== null && $this->aProfile->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class ProfileI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = ProfileI18nTableMap::LOCALE; + $this->modifiedColumns[ProfileI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class ProfileI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = ProfileI18nTableMap::TITLE; + $this->modifiedColumns[ProfileI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class ProfileI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = ProfileI18nTableMap::DESCRIPTION; + $this->modifiedColumns[ProfileI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class ProfileI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = ProfileI18nTableMap::CHAPO; + $this->modifiedColumns[ProfileI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class ProfileI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = ProfileI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[ProfileI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/ProfileModule.php b/core/lib/Thelia/Model/Base/ProfileModule.php index 52e2986a6..ef7394f11 100644 --- a/core/lib/Thelia/Model/Base/ProfileModule.php +++ b/core/lib/Thelia/Model/Base/ProfileModule.php @@ -134,7 +134,7 @@ abstract class ProfileModule implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -145,7 +145,7 @@ abstract class ProfileModule implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -154,7 +154,7 @@ abstract class ProfileModule implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -207,8 +207,8 @@ abstract class ProfileModule implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -465,7 +465,7 @@ abstract class ProfileModule implements ActiveRecordInterface if ($this->profile_id !== $v) { $this->profile_id = $v; - $this->modifiedColumns[] = ProfileModuleTableMap::PROFILE_ID; + $this->modifiedColumns[ProfileModuleTableMap::PROFILE_ID] = true; } if ($this->aProfile !== null && $this->aProfile->getId() !== $v) { @@ -490,7 +490,7 @@ abstract class ProfileModule implements ActiveRecordInterface if ($this->module_id !== $v) { $this->module_id = $v; - $this->modifiedColumns[] = ProfileModuleTableMap::MODULE_ID; + $this->modifiedColumns[ProfileModuleTableMap::MODULE_ID] = true; } if ($this->aModule !== null && $this->aModule->getId() !== $v) { @@ -515,7 +515,7 @@ abstract class ProfileModule implements ActiveRecordInterface if ($this->access !== $v) { $this->access = $v; - $this->modifiedColumns[] = ProfileModuleTableMap::ACCESS; + $this->modifiedColumns[ProfileModuleTableMap::ACCESS] = true; } @@ -535,7 +535,7 @@ abstract class ProfileModule implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ProfileModuleTableMap::CREATED_AT; + $this->modifiedColumns[ProfileModuleTableMap::CREATED_AT] = true; } } // if either are not null @@ -556,7 +556,7 @@ abstract class ProfileModule implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ProfileModuleTableMap::UPDATED_AT; + $this->modifiedColumns[ProfileModuleTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1387,7 +1387,7 @@ abstract class ProfileModule implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ProfileModuleTableMap::UPDATED_AT; + $this->modifiedColumns[ProfileModuleTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ProfileResource.php b/core/lib/Thelia/Model/Base/ProfileResource.php index 06f0b8773..eac774015 100644 --- a/core/lib/Thelia/Model/Base/ProfileResource.php +++ b/core/lib/Thelia/Model/Base/ProfileResource.php @@ -134,7 +134,7 @@ abstract class ProfileResource implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -145,7 +145,7 @@ abstract class ProfileResource implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -154,7 +154,7 @@ abstract class ProfileResource implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -207,8 +207,8 @@ abstract class ProfileResource implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -465,7 +465,7 @@ abstract class ProfileResource implements ActiveRecordInterface if ($this->profile_id !== $v) { $this->profile_id = $v; - $this->modifiedColumns[] = ProfileResourceTableMap::PROFILE_ID; + $this->modifiedColumns[ProfileResourceTableMap::PROFILE_ID] = true; } if ($this->aProfile !== null && $this->aProfile->getId() !== $v) { @@ -490,7 +490,7 @@ abstract class ProfileResource implements ActiveRecordInterface if ($this->resource_id !== $v) { $this->resource_id = $v; - $this->modifiedColumns[] = ProfileResourceTableMap::RESOURCE_ID; + $this->modifiedColumns[ProfileResourceTableMap::RESOURCE_ID] = true; } if ($this->aResource !== null && $this->aResource->getId() !== $v) { @@ -515,7 +515,7 @@ abstract class ProfileResource implements ActiveRecordInterface if ($this->access !== $v) { $this->access = $v; - $this->modifiedColumns[] = ProfileResourceTableMap::ACCESS; + $this->modifiedColumns[ProfileResourceTableMap::ACCESS] = true; } @@ -535,7 +535,7 @@ abstract class ProfileResource implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ProfileResourceTableMap::CREATED_AT; + $this->modifiedColumns[ProfileResourceTableMap::CREATED_AT] = true; } } // if either are not null @@ -556,7 +556,7 @@ abstract class ProfileResource implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ProfileResourceTableMap::UPDATED_AT; + $this->modifiedColumns[ProfileResourceTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1387,7 +1387,7 @@ abstract class ProfileResource implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ProfileResourceTableMap::UPDATED_AT; + $this->modifiedColumns[ProfileResourceTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/Resource.php b/core/lib/Thelia/Model/Base/Resource.php index 1f899ec81..2744edb78 100644 --- a/core/lib/Thelia/Model/Base/Resource.php +++ b/core/lib/Thelia/Model/Base/Resource.php @@ -156,7 +156,7 @@ abstract class Resource implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -167,7 +167,7 @@ abstract class Resource implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -176,7 +176,7 @@ abstract class Resource implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -229,8 +229,8 @@ abstract class Resource implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -476,7 +476,7 @@ abstract class Resource implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ResourceTableMap::ID; + $this->modifiedColumns[ResourceTableMap::ID] = true; } @@ -497,7 +497,7 @@ abstract class Resource implements ActiveRecordInterface if ($this->code !== $v) { $this->code = $v; - $this->modifiedColumns[] = ResourceTableMap::CODE; + $this->modifiedColumns[ResourceTableMap::CODE] = true; } @@ -517,7 +517,7 @@ abstract class Resource implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = ResourceTableMap::CREATED_AT; + $this->modifiedColumns[ResourceTableMap::CREATED_AT] = true; } } // if either are not null @@ -538,7 +538,7 @@ abstract class Resource implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = ResourceTableMap::UPDATED_AT; + $this->modifiedColumns[ResourceTableMap::UPDATED_AT] = true; } } // if either are not null @@ -888,7 +888,7 @@ abstract class Resource implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = ResourceTableMap::ID; + $this->modifiedColumns[ResourceTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . ResourceTableMap::ID . ')'); } @@ -1353,7 +1353,7 @@ abstract class Resource implements ActiveRecordInterface $this->collProfileResourcesPartial = true; } - $collProfileResources->getInternalIterator()->rewind(); + reset($collProfileResources); return $collProfileResources; } @@ -1599,7 +1599,7 @@ abstract class Resource implements ActiveRecordInterface $this->collResourceI18nsPartial = true; } - $collResourceI18ns->getInternalIterator()->rewind(); + reset($collResourceI18ns); return $collResourceI18ns; } @@ -1974,17 +1974,8 @@ abstract class Resource implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collProfileResources instanceof Collection) { - $this->collProfileResources->clearIterator(); - } $this->collProfileResources = null; - if ($this->collResourceI18ns instanceof Collection) { - $this->collResourceI18ns->clearIterator(); - } $this->collResourceI18ns = null; - if ($this->collProfiles instanceof Collection) { - $this->collProfiles->clearIterator(); - } $this->collProfiles = null; } @@ -2007,7 +1998,7 @@ abstract class Resource implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = ResourceTableMap::UPDATED_AT; + $this->modifiedColumns[ResourceTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/ResourceI18n.php b/core/lib/Thelia/Model/Base/ResourceI18n.php index 3a9ac35be..7a52829a8 100644 --- a/core/lib/Thelia/Model/Base/ResourceI18n.php +++ b/core/lib/Thelia/Model/Base/ResourceI18n.php @@ -130,7 +130,7 @@ abstract class ResourceI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -141,7 +141,7 @@ abstract class ResourceI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -150,7 +150,7 @@ abstract class ResourceI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -203,8 +203,8 @@ abstract class ResourceI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -454,7 +454,7 @@ abstract class ResourceI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = ResourceI18nTableMap::ID; + $this->modifiedColumns[ResourceI18nTableMap::ID] = true; } if ($this->aResource !== null && $this->aResource->getId() !== $v) { @@ -479,7 +479,7 @@ abstract class ResourceI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = ResourceI18nTableMap::LOCALE; + $this->modifiedColumns[ResourceI18nTableMap::LOCALE] = true; } @@ -500,7 +500,7 @@ abstract class ResourceI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = ResourceI18nTableMap::TITLE; + $this->modifiedColumns[ResourceI18nTableMap::TITLE] = true; } @@ -521,7 +521,7 @@ abstract class ResourceI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = ResourceI18nTableMap::DESCRIPTION; + $this->modifiedColumns[ResourceI18nTableMap::DESCRIPTION] = true; } @@ -542,7 +542,7 @@ abstract class ResourceI18n implements ActiveRecordInterface if ($this->chapo !== $v) { $this->chapo = $v; - $this->modifiedColumns[] = ResourceI18nTableMap::CHAPO; + $this->modifiedColumns[ResourceI18nTableMap::CHAPO] = true; } @@ -563,7 +563,7 @@ abstract class ResourceI18n implements ActiveRecordInterface if ($this->postscriptum !== $v) { $this->postscriptum = $v; - $this->modifiedColumns[] = ResourceI18nTableMap::POSTSCRIPTUM; + $this->modifiedColumns[ResourceI18nTableMap::POSTSCRIPTUM] = true; } diff --git a/core/lib/Thelia/Model/Base/RewritingArgument.php b/core/lib/Thelia/Model/Base/RewritingArgument.php index 66ad972de..82f326d40 100644 --- a/core/lib/Thelia/Model/Base/RewritingArgument.php +++ b/core/lib/Thelia/Model/Base/RewritingArgument.php @@ -113,7 +113,7 @@ abstract class RewritingArgument implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -124,7 +124,7 @@ abstract class RewritingArgument implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -133,7 +133,7 @@ abstract class RewritingArgument implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -186,8 +186,8 @@ abstract class RewritingArgument implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -444,7 +444,7 @@ abstract class RewritingArgument implements ActiveRecordInterface if ($this->rewriting_url_id !== $v) { $this->rewriting_url_id = $v; - $this->modifiedColumns[] = RewritingArgumentTableMap::REWRITING_URL_ID; + $this->modifiedColumns[RewritingArgumentTableMap::REWRITING_URL_ID] = true; } if ($this->aRewritingUrl !== null && $this->aRewritingUrl->getId() !== $v) { @@ -469,7 +469,7 @@ abstract class RewritingArgument implements ActiveRecordInterface if ($this->parameter !== $v) { $this->parameter = $v; - $this->modifiedColumns[] = RewritingArgumentTableMap::PARAMETER; + $this->modifiedColumns[RewritingArgumentTableMap::PARAMETER] = true; } @@ -490,7 +490,7 @@ abstract class RewritingArgument implements ActiveRecordInterface if ($this->value !== $v) { $this->value = $v; - $this->modifiedColumns[] = RewritingArgumentTableMap::VALUE; + $this->modifiedColumns[RewritingArgumentTableMap::VALUE] = true; } @@ -510,7 +510,7 @@ abstract class RewritingArgument implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = RewritingArgumentTableMap::CREATED_AT; + $this->modifiedColumns[RewritingArgumentTableMap::CREATED_AT] = true; } } // if either are not null @@ -531,7 +531,7 @@ abstract class RewritingArgument implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = RewritingArgumentTableMap::UPDATED_AT; + $this->modifiedColumns[RewritingArgumentTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1294,7 +1294,7 @@ abstract class RewritingArgument implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = RewritingArgumentTableMap::UPDATED_AT; + $this->modifiedColumns[RewritingArgumentTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/RewritingUrl.php b/core/lib/Thelia/Model/Base/RewritingUrl.php index 979ce378c..6791c25fe 100644 --- a/core/lib/Thelia/Model/Base/RewritingUrl.php +++ b/core/lib/Thelia/Model/Base/RewritingUrl.php @@ -156,7 +156,7 @@ abstract class RewritingUrl implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -167,7 +167,7 @@ abstract class RewritingUrl implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -176,7 +176,7 @@ abstract class RewritingUrl implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -229,8 +229,8 @@ abstract class RewritingUrl implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -520,7 +520,7 @@ abstract class RewritingUrl implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = RewritingUrlTableMap::ID; + $this->modifiedColumns[RewritingUrlTableMap::ID] = true; } @@ -541,7 +541,7 @@ abstract class RewritingUrl implements ActiveRecordInterface if ($this->url !== $v) { $this->url = $v; - $this->modifiedColumns[] = RewritingUrlTableMap::URL; + $this->modifiedColumns[RewritingUrlTableMap::URL] = true; } @@ -562,7 +562,7 @@ abstract class RewritingUrl implements ActiveRecordInterface if ($this->view !== $v) { $this->view = $v; - $this->modifiedColumns[] = RewritingUrlTableMap::VIEW; + $this->modifiedColumns[RewritingUrlTableMap::VIEW] = true; } @@ -583,7 +583,7 @@ abstract class RewritingUrl implements ActiveRecordInterface if ($this->view_id !== $v) { $this->view_id = $v; - $this->modifiedColumns[] = RewritingUrlTableMap::VIEW_ID; + $this->modifiedColumns[RewritingUrlTableMap::VIEW_ID] = true; } @@ -604,7 +604,7 @@ abstract class RewritingUrl implements ActiveRecordInterface if ($this->view_locale !== $v) { $this->view_locale = $v; - $this->modifiedColumns[] = RewritingUrlTableMap::VIEW_LOCALE; + $this->modifiedColumns[RewritingUrlTableMap::VIEW_LOCALE] = true; } @@ -625,7 +625,7 @@ abstract class RewritingUrl implements ActiveRecordInterface if ($this->redirected !== $v) { $this->redirected = $v; - $this->modifiedColumns[] = RewritingUrlTableMap::REDIRECTED; + $this->modifiedColumns[RewritingUrlTableMap::REDIRECTED] = true; } if ($this->aRewritingUrlRelatedByRedirected !== null && $this->aRewritingUrlRelatedByRedirected->getId() !== $v) { @@ -649,7 +649,7 @@ abstract class RewritingUrl implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = RewritingUrlTableMap::CREATED_AT; + $this->modifiedColumns[RewritingUrlTableMap::CREATED_AT] = true; } } // if either are not null @@ -670,7 +670,7 @@ abstract class RewritingUrl implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = RewritingUrlTableMap::UPDATED_AT; + $this->modifiedColumns[RewritingUrlTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1021,7 +1021,7 @@ abstract class RewritingUrl implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = RewritingUrlTableMap::ID; + $this->modifiedColumns[RewritingUrlTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . RewritingUrlTableMap::ID . ')'); } @@ -1604,7 +1604,7 @@ abstract class RewritingUrl implements ActiveRecordInterface $this->collRewritingUrlsRelatedByIdPartial = true; } - $collRewritingUrlsRelatedById->getInternalIterator()->rewind(); + reset($collRewritingUrlsRelatedById); return $collRewritingUrlsRelatedById; } @@ -1822,7 +1822,7 @@ abstract class RewritingUrl implements ActiveRecordInterface $this->collRewritingArgumentsPartial = true; } - $collRewritingArguments->getInternalIterator()->rewind(); + reset($collRewritingArguments); return $collRewritingArguments; } @@ -2005,13 +2005,7 @@ abstract class RewritingUrl implements ActiveRecordInterface } } // if ($deep) - if ($this->collRewritingUrlsRelatedById instanceof Collection) { - $this->collRewritingUrlsRelatedById->clearIterator(); - } $this->collRewritingUrlsRelatedById = null; - if ($this->collRewritingArguments instanceof Collection) { - $this->collRewritingArguments->clearIterator(); - } $this->collRewritingArguments = null; $this->aRewritingUrlRelatedByRedirected = null; } @@ -2035,7 +2029,7 @@ abstract class RewritingUrl implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = RewritingUrlTableMap::UPDATED_AT; + $this->modifiedColumns[RewritingUrlTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/Tax.php b/core/lib/Thelia/Model/Base/Tax.php index 51a5aed11..d2d3ea76d 100644 --- a/core/lib/Thelia/Model/Base/Tax.php +++ b/core/lib/Thelia/Model/Base/Tax.php @@ -149,7 +149,7 @@ abstract class Tax implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -160,7 +160,7 @@ abstract class Tax implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -169,7 +169,7 @@ abstract class Tax implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -222,8 +222,8 @@ abstract class Tax implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -480,7 +480,7 @@ abstract class Tax implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = TaxTableMap::ID; + $this->modifiedColumns[TaxTableMap::ID] = true; } @@ -501,7 +501,7 @@ abstract class Tax implements ActiveRecordInterface if ($this->type !== $v) { $this->type = $v; - $this->modifiedColumns[] = TaxTableMap::TYPE; + $this->modifiedColumns[TaxTableMap::TYPE] = true; } @@ -522,7 +522,7 @@ abstract class Tax implements ActiveRecordInterface if ($this->serialized_requirements !== $v) { $this->serialized_requirements = $v; - $this->modifiedColumns[] = TaxTableMap::SERIALIZED_REQUIREMENTS; + $this->modifiedColumns[TaxTableMap::SERIALIZED_REQUIREMENTS] = true; } @@ -542,7 +542,7 @@ abstract class Tax implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = TaxTableMap::CREATED_AT; + $this->modifiedColumns[TaxTableMap::CREATED_AT] = true; } } // if either are not null @@ -563,7 +563,7 @@ abstract class Tax implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = TaxTableMap::UPDATED_AT; + $this->modifiedColumns[TaxTableMap::UPDATED_AT] = true; } } // if either are not null @@ -888,7 +888,7 @@ abstract class Tax implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = TaxTableMap::ID; + $this->modifiedColumns[TaxTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . TaxTableMap::ID . ')'); } @@ -1369,7 +1369,7 @@ abstract class Tax implements ActiveRecordInterface $this->collTaxRuleCountriesPartial = true; } - $collTaxRuleCountries->getInternalIterator()->rewind(); + reset($collTaxRuleCountries); return $collTaxRuleCountries; } @@ -1640,7 +1640,7 @@ abstract class Tax implements ActiveRecordInterface $this->collTaxI18nsPartial = true; } - $collTaxI18ns->getInternalIterator()->rewind(); + reset($collTaxI18ns); return $collTaxI18ns; } @@ -1828,13 +1828,7 @@ abstract class Tax implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collTaxRuleCountries instanceof Collection) { - $this->collTaxRuleCountries->clearIterator(); - } $this->collTaxRuleCountries = null; - if ($this->collTaxI18ns instanceof Collection) { - $this->collTaxI18ns->clearIterator(); - } $this->collTaxI18ns = null; } @@ -1857,7 +1851,7 @@ abstract class Tax implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = TaxTableMap::UPDATED_AT; + $this->modifiedColumns[TaxTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/TaxI18n.php b/core/lib/Thelia/Model/Base/TaxI18n.php index 2a4a2d316..611394f06 100644 --- a/core/lib/Thelia/Model/Base/TaxI18n.php +++ b/core/lib/Thelia/Model/Base/TaxI18n.php @@ -118,7 +118,7 @@ abstract class TaxI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -129,7 +129,7 @@ abstract class TaxI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -138,7 +138,7 @@ abstract class TaxI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -191,8 +191,8 @@ abstract class TaxI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -420,7 +420,7 @@ abstract class TaxI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = TaxI18nTableMap::ID; + $this->modifiedColumns[TaxI18nTableMap::ID] = true; } if ($this->aTax !== null && $this->aTax->getId() !== $v) { @@ -445,7 +445,7 @@ abstract class TaxI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = TaxI18nTableMap::LOCALE; + $this->modifiedColumns[TaxI18nTableMap::LOCALE] = true; } @@ -466,7 +466,7 @@ abstract class TaxI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = TaxI18nTableMap::TITLE; + $this->modifiedColumns[TaxI18nTableMap::TITLE] = true; } @@ -487,7 +487,7 @@ abstract class TaxI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = TaxI18nTableMap::DESCRIPTION; + $this->modifiedColumns[TaxI18nTableMap::DESCRIPTION] = true; } diff --git a/core/lib/Thelia/Model/Base/TaxRule.php b/core/lib/Thelia/Model/Base/TaxRule.php index e56dfa622..971a8192f 100644 --- a/core/lib/Thelia/Model/Base/TaxRule.php +++ b/core/lib/Thelia/Model/Base/TaxRule.php @@ -171,7 +171,7 @@ abstract class TaxRule implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -182,7 +182,7 @@ abstract class TaxRule implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -191,7 +191,7 @@ abstract class TaxRule implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -244,8 +244,8 @@ abstract class TaxRule implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -491,7 +491,7 @@ abstract class TaxRule implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = TaxRuleTableMap::ID; + $this->modifiedColumns[TaxRuleTableMap::ID] = true; } @@ -520,7 +520,7 @@ abstract class TaxRule implements ActiveRecordInterface if ($this->is_default !== $v) { $this->is_default = $v; - $this->modifiedColumns[] = TaxRuleTableMap::IS_DEFAULT; + $this->modifiedColumns[TaxRuleTableMap::IS_DEFAULT] = true; } @@ -540,7 +540,7 @@ abstract class TaxRule implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = TaxRuleTableMap::CREATED_AT; + $this->modifiedColumns[TaxRuleTableMap::CREATED_AT] = true; } } // if either are not null @@ -561,7 +561,7 @@ abstract class TaxRule implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = TaxRuleTableMap::UPDATED_AT; + $this->modifiedColumns[TaxRuleTableMap::UPDATED_AT] = true; } } // if either are not null @@ -907,7 +907,7 @@ abstract class TaxRule implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = TaxRuleTableMap::ID; + $this->modifiedColumns[TaxRuleTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . TaxRuleTableMap::ID . ')'); } @@ -1384,7 +1384,7 @@ abstract class TaxRule implements ActiveRecordInterface $this->collProductsPartial = true; } - $collProducts->getInternalIterator()->rewind(); + reset($collProducts); return $collProducts; } @@ -1627,7 +1627,7 @@ abstract class TaxRule implements ActiveRecordInterface $this->collTaxRuleCountriesPartial = true; } - $collTaxRuleCountries->getInternalIterator()->rewind(); + reset($collTaxRuleCountries); return $collTaxRuleCountries; } @@ -1898,7 +1898,7 @@ abstract class TaxRule implements ActiveRecordInterface $this->collTaxRuleI18nsPartial = true; } - $collTaxRuleI18ns->getInternalIterator()->rewind(); + reset($collTaxRuleI18ns); return $collTaxRuleI18ns; } @@ -2091,17 +2091,8 @@ abstract class TaxRule implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collProducts instanceof Collection) { - $this->collProducts->clearIterator(); - } $this->collProducts = null; - if ($this->collTaxRuleCountries instanceof Collection) { - $this->collTaxRuleCountries->clearIterator(); - } $this->collTaxRuleCountries = null; - if ($this->collTaxRuleI18ns instanceof Collection) { - $this->collTaxRuleI18ns->clearIterator(); - } $this->collTaxRuleI18ns = null; } @@ -2124,7 +2115,7 @@ abstract class TaxRule implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = TaxRuleTableMap::UPDATED_AT; + $this->modifiedColumns[TaxRuleTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/TaxRuleCountry.php b/core/lib/Thelia/Model/Base/TaxRuleCountry.php index a6d24e68a..1cf976873 100644 --- a/core/lib/Thelia/Model/Base/TaxRuleCountry.php +++ b/core/lib/Thelia/Model/Base/TaxRuleCountry.php @@ -133,7 +133,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -144,7 +144,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -153,7 +153,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -206,8 +206,8 @@ abstract class TaxRuleCountry implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -475,7 +475,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface if ($this->tax_rule_id !== $v) { $this->tax_rule_id = $v; - $this->modifiedColumns[] = TaxRuleCountryTableMap::TAX_RULE_ID; + $this->modifiedColumns[TaxRuleCountryTableMap::TAX_RULE_ID] = true; } if ($this->aTaxRule !== null && $this->aTaxRule->getId() !== $v) { @@ -500,7 +500,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface if ($this->country_id !== $v) { $this->country_id = $v; - $this->modifiedColumns[] = TaxRuleCountryTableMap::COUNTRY_ID; + $this->modifiedColumns[TaxRuleCountryTableMap::COUNTRY_ID] = true; } if ($this->aCountry !== null && $this->aCountry->getId() !== $v) { @@ -525,7 +525,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface if ($this->tax_id !== $v) { $this->tax_id = $v; - $this->modifiedColumns[] = TaxRuleCountryTableMap::TAX_ID; + $this->modifiedColumns[TaxRuleCountryTableMap::TAX_ID] = true; } if ($this->aTax !== null && $this->aTax->getId() !== $v) { @@ -550,7 +550,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface if ($this->position !== $v) { $this->position = $v; - $this->modifiedColumns[] = TaxRuleCountryTableMap::POSITION; + $this->modifiedColumns[TaxRuleCountryTableMap::POSITION] = true; } @@ -570,7 +570,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = TaxRuleCountryTableMap::CREATED_AT; + $this->modifiedColumns[TaxRuleCountryTableMap::CREATED_AT] = true; } } // if either are not null @@ -591,7 +591,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = TaxRuleCountryTableMap::UPDATED_AT; + $this->modifiedColumns[TaxRuleCountryTableMap::UPDATED_AT] = true; } } // if either are not null @@ -1506,7 +1506,7 @@ abstract class TaxRuleCountry implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = TaxRuleCountryTableMap::UPDATED_AT; + $this->modifiedColumns[TaxRuleCountryTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/TaxRuleI18n.php b/core/lib/Thelia/Model/Base/TaxRuleI18n.php index b28787f05..cb9460331 100644 --- a/core/lib/Thelia/Model/Base/TaxRuleI18n.php +++ b/core/lib/Thelia/Model/Base/TaxRuleI18n.php @@ -118,7 +118,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -129,7 +129,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -138,7 +138,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -191,8 +191,8 @@ abstract class TaxRuleI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -420,7 +420,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = TaxRuleI18nTableMap::ID; + $this->modifiedColumns[TaxRuleI18nTableMap::ID] = true; } if ($this->aTaxRule !== null && $this->aTaxRule->getId() !== $v) { @@ -445,7 +445,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = TaxRuleI18nTableMap::LOCALE; + $this->modifiedColumns[TaxRuleI18nTableMap::LOCALE] = true; } @@ -466,7 +466,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface if ($this->title !== $v) { $this->title = $v; - $this->modifiedColumns[] = TaxRuleI18nTableMap::TITLE; + $this->modifiedColumns[TaxRuleI18nTableMap::TITLE] = true; } @@ -487,7 +487,7 @@ abstract class TaxRuleI18n implements ActiveRecordInterface if ($this->description !== $v) { $this->description = $v; - $this->modifiedColumns[] = TaxRuleI18nTableMap::DESCRIPTION; + $this->modifiedColumns[TaxRuleI18nTableMap::DESCRIPTION] = true; } diff --git a/core/lib/Thelia/Model/Base/Template.php b/core/lib/Thelia/Model/Base/Template.php index 922c9e5a4..88b44a7a2 100644 --- a/core/lib/Thelia/Model/Base/Template.php +++ b/core/lib/Thelia/Model/Base/Template.php @@ -191,7 +191,7 @@ abstract class Template implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -202,7 +202,7 @@ abstract class Template implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -211,7 +211,7 @@ abstract class Template implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -264,8 +264,8 @@ abstract class Template implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -500,7 +500,7 @@ abstract class Template implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = TemplateTableMap::ID; + $this->modifiedColumns[TemplateTableMap::ID] = true; } @@ -520,7 +520,7 @@ abstract class Template implements ActiveRecordInterface if ($this->created_at !== null || $dt !== null) { if ($dt !== $this->created_at) { $this->created_at = $dt; - $this->modifiedColumns[] = TemplateTableMap::CREATED_AT; + $this->modifiedColumns[TemplateTableMap::CREATED_AT] = true; } } // if either are not null @@ -541,7 +541,7 @@ abstract class Template implements ActiveRecordInterface if ($this->updated_at !== null || $dt !== null) { if ($dt !== $this->updated_at) { $this->updated_at = $dt; - $this->modifiedColumns[] = TemplateTableMap::UPDATED_AT; + $this->modifiedColumns[TemplateTableMap::UPDATED_AT] = true; } } // if either are not null @@ -955,7 +955,7 @@ abstract class Template implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = TemplateTableMap::ID; + $this->modifiedColumns[TemplateTableMap::ID] = true; if (null !== $this->id) { throw new PropelException('Cannot insert a value for auto-increment primary key (' . TemplateTableMap::ID . ')'); } @@ -1428,7 +1428,7 @@ abstract class Template implements ActiveRecordInterface $this->collProductsPartial = true; } - $collProducts->getInternalIterator()->rewind(); + reset($collProducts); return $collProducts; } @@ -1671,7 +1671,7 @@ abstract class Template implements ActiveRecordInterface $this->collFeatureTemplatesPartial = true; } - $collFeatureTemplates->getInternalIterator()->rewind(); + reset($collFeatureTemplates); return $collFeatureTemplates; } @@ -1914,7 +1914,7 @@ abstract class Template implements ActiveRecordInterface $this->collAttributeTemplatesPartial = true; } - $collAttributeTemplates->getInternalIterator()->rewind(); + reset($collAttributeTemplates); return $collAttributeTemplates; } @@ -2157,7 +2157,7 @@ abstract class Template implements ActiveRecordInterface $this->collTemplateI18nsPartial = true; } - $collTemplateI18ns->getInternalIterator()->rewind(); + reset($collTemplateI18ns); return $collTemplateI18ns; } @@ -2729,29 +2729,11 @@ abstract class Template implements ActiveRecordInterface $this->currentLocale = 'en_US'; $this->currentTranslations = null; - if ($this->collProducts instanceof Collection) { - $this->collProducts->clearIterator(); - } $this->collProducts = null; - if ($this->collFeatureTemplates instanceof Collection) { - $this->collFeatureTemplates->clearIterator(); - } $this->collFeatureTemplates = null; - if ($this->collAttributeTemplates instanceof Collection) { - $this->collAttributeTemplates->clearIterator(); - } $this->collAttributeTemplates = null; - if ($this->collTemplateI18ns instanceof Collection) { - $this->collTemplateI18ns->clearIterator(); - } $this->collTemplateI18ns = null; - if ($this->collFeatures instanceof Collection) { - $this->collFeatures->clearIterator(); - } $this->collFeatures = null; - if ($this->collAttributes instanceof Collection) { - $this->collAttributes->clearIterator(); - } $this->collAttributes = null; } @@ -2897,7 +2879,7 @@ abstract class Template implements ActiveRecordInterface */ public function keepUpdateDateUnchanged() { - $this->modifiedColumns[] = TemplateTableMap::UPDATED_AT; + $this->modifiedColumns[TemplateTableMap::UPDATED_AT] = true; return $this; } diff --git a/core/lib/Thelia/Model/Base/TemplateI18n.php b/core/lib/Thelia/Model/Base/TemplateI18n.php index 00f022d65..f6a0ba085 100644 --- a/core/lib/Thelia/Model/Base/TemplateI18n.php +++ b/core/lib/Thelia/Model/Base/TemplateI18n.php @@ -112,7 +112,7 @@ abstract class TemplateI18n implements ActiveRecordInterface */ public function isModified() { - return !empty($this->modifiedColumns); + return !!$this->modifiedColumns; } /** @@ -123,7 +123,7 @@ abstract class TemplateI18n implements ActiveRecordInterface */ public function isColumnModified($col) { - return in_array($col, $this->modifiedColumns); + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); } /** @@ -132,7 +132,7 @@ abstract class TemplateI18n implements ActiveRecordInterface */ public function getModifiedColumns() { - return array_unique($this->modifiedColumns); + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; } /** @@ -185,8 +185,8 @@ abstract class TemplateI18n implements ActiveRecordInterface public function resetModified($col = null) { if (null !== $col) { - while (false !== ($offset = array_search($col, $this->modifiedColumns))) { - array_splice($this->modifiedColumns, $offset, 1); + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); } } else { $this->modifiedColumns = array(); @@ -403,7 +403,7 @@ abstract class TemplateI18n implements ActiveRecordInterface if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = TemplateI18nTableMap::ID; + $this->modifiedColumns[TemplateI18nTableMap::ID] = true; } if ($this->aTemplate !== null && $this->aTemplate->getId() !== $v) { @@ -428,7 +428,7 @@ abstract class TemplateI18n implements ActiveRecordInterface if ($this->locale !== $v) { $this->locale = $v; - $this->modifiedColumns[] = TemplateI18nTableMap::LOCALE; + $this->modifiedColumns[TemplateI18nTableMap::LOCALE] = true; } @@ -449,7 +449,7 @@ abstract class TemplateI18n implements ActiveRecordInterface if ($this->name !== $v) { $this->name = $v; - $this->modifiedColumns[] = TemplateI18nTableMap::NAME; + $this->modifiedColumns[TemplateI18nTableMap::NAME] = true; } diff --git a/core/lib/Thelia/Model/Map/AccessoryTableMap.php b/core/lib/Thelia/Model/Map/AccessoryTableMap.php index bcd663892..8f32fa987 100644 --- a/core/lib/Thelia/Model/Map/AccessoryTableMap.php +++ b/core/lib/Thelia/Model/Map/AccessoryTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/AddressTableMap.php b/core/lib/Thelia/Model/Map/AddressTableMap.php index ff9925d38..a85353a10 100644 --- a/core/lib/Thelia/Model/Map/AddressTableMap.php +++ b/core/lib/Thelia/Model/Map/AddressTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/AdminLogTableMap.php b/core/lib/Thelia/Model/Map/AdminLogTableMap.php index fabd848dc..5da91b3ee 100644 --- a/core/lib/Thelia/Model/Map/AdminLogTableMap.php +++ b/core/lib/Thelia/Model/Map/AdminLogTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/AdminTableMap.php b/core/lib/Thelia/Model/Map/AdminTableMap.php index 4217f9de2..2ba6714d1 100644 --- a/core/lib/Thelia/Model/Map/AdminTableMap.php +++ b/core/lib/Thelia/Model/Map/AdminTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/AreaDeliveryModuleTableMap.php b/core/lib/Thelia/Model/Map/AreaDeliveryModuleTableMap.php index 66052e604..ac064bc17 100644 --- a/core/lib/Thelia/Model/Map/AreaDeliveryModuleTableMap.php +++ b/core/lib/Thelia/Model/Map/AreaDeliveryModuleTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/AreaTableMap.php b/core/lib/Thelia/Model/Map/AreaTableMap.php index 3c1bc5ee4..1c0bfee4f 100644 --- a/core/lib/Thelia/Model/Map/AreaTableMap.php +++ b/core/lib/Thelia/Model/Map/AreaTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/AttributeAvI18nTableMap.php b/core/lib/Thelia/Model/Map/AttributeAvI18nTableMap.php index 02a20540e..041fa5b07 100644 --- a/core/lib/Thelia/Model/Map/AttributeAvI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/AttributeAvI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/AttributeAvTableMap.php b/core/lib/Thelia/Model/Map/AttributeAvTableMap.php index 0c5c2e1c9..1064fb94b 100644 --- a/core/lib/Thelia/Model/Map/AttributeAvTableMap.php +++ b/core/lib/Thelia/Model/Map/AttributeAvTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/AttributeCombinationTableMap.php b/core/lib/Thelia/Model/Map/AttributeCombinationTableMap.php index c13b85bbf..0881dccc4 100644 --- a/core/lib/Thelia/Model/Map/AttributeCombinationTableMap.php +++ b/core/lib/Thelia/Model/Map/AttributeCombinationTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/AttributeI18nTableMap.php b/core/lib/Thelia/Model/Map/AttributeI18nTableMap.php index 8471d3e26..1b4059076 100644 --- a/core/lib/Thelia/Model/Map/AttributeI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/AttributeI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/AttributeTableMap.php b/core/lib/Thelia/Model/Map/AttributeTableMap.php index 245dc08d3..e7aae7f83 100644 --- a/core/lib/Thelia/Model/Map/AttributeTableMap.php +++ b/core/lib/Thelia/Model/Map/AttributeTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/AttributeTemplateTableMap.php b/core/lib/Thelia/Model/Map/AttributeTemplateTableMap.php index 1df6d56c1..f3a6823ea 100644 --- a/core/lib/Thelia/Model/Map/AttributeTemplateTableMap.php +++ b/core/lib/Thelia/Model/Map/AttributeTemplateTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CartItemTableMap.php b/core/lib/Thelia/Model/Map/CartItemTableMap.php index 5645e7d9c..ab5a188da 100644 --- a/core/lib/Thelia/Model/Map/CartItemTableMap.php +++ b/core/lib/Thelia/Model/Map/CartItemTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CartTableMap.php b/core/lib/Thelia/Model/Map/CartTableMap.php index 2f81472cd..7769c721e 100644 --- a/core/lib/Thelia/Model/Map/CartTableMap.php +++ b/core/lib/Thelia/Model/Map/CartTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CategoryAssociatedContentTableMap.php b/core/lib/Thelia/Model/Map/CategoryAssociatedContentTableMap.php index c78d59506..f761d3a54 100644 --- a/core/lib/Thelia/Model/Map/CategoryAssociatedContentTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryAssociatedContentTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CategoryDocumentI18nTableMap.php b/core/lib/Thelia/Model/Map/CategoryDocumentI18nTableMap.php index 956afae4a..3ba1d060f 100644 --- a/core/lib/Thelia/Model/Map/CategoryDocumentI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryDocumentI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CategoryDocumentTableMap.php b/core/lib/Thelia/Model/Map/CategoryDocumentTableMap.php index 8b307ea1e..c0e1970c3 100644 --- a/core/lib/Thelia/Model/Map/CategoryDocumentTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryDocumentTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CategoryI18nTableMap.php b/core/lib/Thelia/Model/Map/CategoryI18nTableMap.php index 4fe5adb5d..ebfdefbcd 100644 --- a/core/lib/Thelia/Model/Map/CategoryI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CategoryImageI18nTableMap.php b/core/lib/Thelia/Model/Map/CategoryImageI18nTableMap.php index 1d27e16ad..38c456f46 100644 --- a/core/lib/Thelia/Model/Map/CategoryImageI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryImageI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CategoryImageTableMap.php b/core/lib/Thelia/Model/Map/CategoryImageTableMap.php index 1c7694d05..c6199c978 100644 --- a/core/lib/Thelia/Model/Map/CategoryImageTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryImageTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CategoryTableMap.php b/core/lib/Thelia/Model/Map/CategoryTableMap.php index de74d53ae..19c7486cb 100644 --- a/core/lib/Thelia/Model/Map/CategoryTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CategoryVersionTableMap.php b/core/lib/Thelia/Model/Map/CategoryVersionTableMap.php index a20fa8460..0d9cd2180 100644 --- a/core/lib/Thelia/Model/Map/CategoryVersionTableMap.php +++ b/core/lib/Thelia/Model/Map/CategoryVersionTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ConfigI18nTableMap.php b/core/lib/Thelia/Model/Map/ConfigI18nTableMap.php index b953b0ac9..0c759e497 100644 --- a/core/lib/Thelia/Model/Map/ConfigI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ConfigI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ConfigTableMap.php b/core/lib/Thelia/Model/Map/ConfigTableMap.php index 8208b56fe..0d8271134 100644 --- a/core/lib/Thelia/Model/Map/ConfigTableMap.php +++ b/core/lib/Thelia/Model/Map/ConfigTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ContentDocumentI18nTableMap.php b/core/lib/Thelia/Model/Map/ContentDocumentI18nTableMap.php index 7ebde93e6..efaad427c 100644 --- a/core/lib/Thelia/Model/Map/ContentDocumentI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentDocumentI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ContentDocumentTableMap.php b/core/lib/Thelia/Model/Map/ContentDocumentTableMap.php index 3d876a570..4e2cf4000 100644 --- a/core/lib/Thelia/Model/Map/ContentDocumentTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentDocumentTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ContentFolderTableMap.php b/core/lib/Thelia/Model/Map/ContentFolderTableMap.php index 9808399ff..459f8f959 100644 --- a/core/lib/Thelia/Model/Map/ContentFolderTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentFolderTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ContentI18nTableMap.php b/core/lib/Thelia/Model/Map/ContentI18nTableMap.php index a69ac957e..703c7c902 100644 --- a/core/lib/Thelia/Model/Map/ContentI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ContentImageI18nTableMap.php b/core/lib/Thelia/Model/Map/ContentImageI18nTableMap.php index 759349d27..f95f9f048 100644 --- a/core/lib/Thelia/Model/Map/ContentImageI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentImageI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ContentImageTableMap.php b/core/lib/Thelia/Model/Map/ContentImageTableMap.php index f731c51a8..8494b354f 100644 --- a/core/lib/Thelia/Model/Map/ContentImageTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentImageTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ContentTableMap.php b/core/lib/Thelia/Model/Map/ContentTableMap.php index b9d859da3..0f3b056c6 100644 --- a/core/lib/Thelia/Model/Map/ContentTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ContentVersionTableMap.php b/core/lib/Thelia/Model/Map/ContentVersionTableMap.php index d651d24c9..4c0d7a1b8 100644 --- a/core/lib/Thelia/Model/Map/ContentVersionTableMap.php +++ b/core/lib/Thelia/Model/Map/ContentVersionTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CountryI18nTableMap.php b/core/lib/Thelia/Model/Map/CountryI18nTableMap.php index 272231464..d34589486 100644 --- a/core/lib/Thelia/Model/Map/CountryI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/CountryI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CountryTableMap.php b/core/lib/Thelia/Model/Map/CountryTableMap.php index d1f1a8a18..8ec8e5999 100644 --- a/core/lib/Thelia/Model/Map/CountryTableMap.php +++ b/core/lib/Thelia/Model/Map/CountryTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CouponI18nTableMap.php b/core/lib/Thelia/Model/Map/CouponI18nTableMap.php index 46ecdce3b..6f8d2e938 100644 --- a/core/lib/Thelia/Model/Map/CouponI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/CouponI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CouponTableMap.php b/core/lib/Thelia/Model/Map/CouponTableMap.php index 830102ad3..b85627d74 100644 --- a/core/lib/Thelia/Model/Map/CouponTableMap.php +++ b/core/lib/Thelia/Model/Map/CouponTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CouponVersionTableMap.php b/core/lib/Thelia/Model/Map/CouponVersionTableMap.php index 8fbd7e68d..1509d9c24 100644 --- a/core/lib/Thelia/Model/Map/CouponVersionTableMap.php +++ b/core/lib/Thelia/Model/Map/CouponVersionTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CurrencyI18nTableMap.php b/core/lib/Thelia/Model/Map/CurrencyI18nTableMap.php index c7e4725c1..3625eea9e 100644 --- a/core/lib/Thelia/Model/Map/CurrencyI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/CurrencyI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CurrencyTableMap.php b/core/lib/Thelia/Model/Map/CurrencyTableMap.php index 3d4e6ebac..61a6fb711 100644 --- a/core/lib/Thelia/Model/Map/CurrencyTableMap.php +++ b/core/lib/Thelia/Model/Map/CurrencyTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CustomerTableMap.php b/core/lib/Thelia/Model/Map/CustomerTableMap.php index b3cc9d077..14e14e330 100644 --- a/core/lib/Thelia/Model/Map/CustomerTableMap.php +++ b/core/lib/Thelia/Model/Map/CustomerTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CustomerTitleI18nTableMap.php b/core/lib/Thelia/Model/Map/CustomerTitleI18nTableMap.php index 5344099c5..c731a1227 100644 --- a/core/lib/Thelia/Model/Map/CustomerTitleI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/CustomerTitleI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/CustomerTitleTableMap.php b/core/lib/Thelia/Model/Map/CustomerTitleTableMap.php index c10ce2500..b2a62a92e 100644 --- a/core/lib/Thelia/Model/Map/CustomerTitleTableMap.php +++ b/core/lib/Thelia/Model/Map/CustomerTitleTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/FeatureAvI18nTableMap.php b/core/lib/Thelia/Model/Map/FeatureAvI18nTableMap.php index ba592b4b0..81bea461c 100644 --- a/core/lib/Thelia/Model/Map/FeatureAvI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/FeatureAvI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/FeatureAvTableMap.php b/core/lib/Thelia/Model/Map/FeatureAvTableMap.php index 4dd944bb7..284a3bc2e 100644 --- a/core/lib/Thelia/Model/Map/FeatureAvTableMap.php +++ b/core/lib/Thelia/Model/Map/FeatureAvTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/FeatureI18nTableMap.php b/core/lib/Thelia/Model/Map/FeatureI18nTableMap.php index dba05fb67..5cc7bdea1 100644 --- a/core/lib/Thelia/Model/Map/FeatureI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/FeatureI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/FeatureProductTableMap.php b/core/lib/Thelia/Model/Map/FeatureProductTableMap.php index 9db4ec441..c87d3176b 100644 --- a/core/lib/Thelia/Model/Map/FeatureProductTableMap.php +++ b/core/lib/Thelia/Model/Map/FeatureProductTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/FeatureTableMap.php b/core/lib/Thelia/Model/Map/FeatureTableMap.php index c6a29e2f4..222340de4 100644 --- a/core/lib/Thelia/Model/Map/FeatureTableMap.php +++ b/core/lib/Thelia/Model/Map/FeatureTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/FeatureTemplateTableMap.php b/core/lib/Thelia/Model/Map/FeatureTemplateTableMap.php index 68f3b9a24..1f57bc169 100644 --- a/core/lib/Thelia/Model/Map/FeatureTemplateTableMap.php +++ b/core/lib/Thelia/Model/Map/FeatureTemplateTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/FolderDocumentI18nTableMap.php b/core/lib/Thelia/Model/Map/FolderDocumentI18nTableMap.php index 28dab9d8f..f7c88d93b 100644 --- a/core/lib/Thelia/Model/Map/FolderDocumentI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/FolderDocumentI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/FolderDocumentTableMap.php b/core/lib/Thelia/Model/Map/FolderDocumentTableMap.php index 1d0e3b74a..61be45118 100644 --- a/core/lib/Thelia/Model/Map/FolderDocumentTableMap.php +++ b/core/lib/Thelia/Model/Map/FolderDocumentTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/FolderI18nTableMap.php b/core/lib/Thelia/Model/Map/FolderI18nTableMap.php index a09b9ef01..13ad89cf7 100644 --- a/core/lib/Thelia/Model/Map/FolderI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/FolderI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/FolderImageI18nTableMap.php b/core/lib/Thelia/Model/Map/FolderImageI18nTableMap.php index f0f87fd85..82a785b5d 100644 --- a/core/lib/Thelia/Model/Map/FolderImageI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/FolderImageI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/FolderImageTableMap.php b/core/lib/Thelia/Model/Map/FolderImageTableMap.php index 6dc186658..6387373eb 100644 --- a/core/lib/Thelia/Model/Map/FolderImageTableMap.php +++ b/core/lib/Thelia/Model/Map/FolderImageTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/FolderTableMap.php b/core/lib/Thelia/Model/Map/FolderTableMap.php index 0346ee0d3..8cb336db2 100644 --- a/core/lib/Thelia/Model/Map/FolderTableMap.php +++ b/core/lib/Thelia/Model/Map/FolderTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/FolderVersionTableMap.php b/core/lib/Thelia/Model/Map/FolderVersionTableMap.php index 440b6d1ae..1ed8ab441 100644 --- a/core/lib/Thelia/Model/Map/FolderVersionTableMap.php +++ b/core/lib/Thelia/Model/Map/FolderVersionTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/LangTableMap.php b/core/lib/Thelia/Model/Map/LangTableMap.php index 2e1f23204..12c9d9b5b 100644 --- a/core/lib/Thelia/Model/Map/LangTableMap.php +++ b/core/lib/Thelia/Model/Map/LangTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/MessageI18nTableMap.php b/core/lib/Thelia/Model/Map/MessageI18nTableMap.php index ea5d69766..b747c230c 100644 --- a/core/lib/Thelia/Model/Map/MessageI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/MessageI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/MessageTableMap.php b/core/lib/Thelia/Model/Map/MessageTableMap.php index a81f022a0..7a4d17ceb 100644 --- a/core/lib/Thelia/Model/Map/MessageTableMap.php +++ b/core/lib/Thelia/Model/Map/MessageTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/MessageVersionTableMap.php b/core/lib/Thelia/Model/Map/MessageVersionTableMap.php index c4b72d126..12cc8a1be 100644 --- a/core/lib/Thelia/Model/Map/MessageVersionTableMap.php +++ b/core/lib/Thelia/Model/Map/MessageVersionTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ModuleI18nTableMap.php b/core/lib/Thelia/Model/Map/ModuleI18nTableMap.php index a8e680f1c..9b7b1d089 100644 --- a/core/lib/Thelia/Model/Map/ModuleI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ModuleI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ModuleImageI18nTableMap.php b/core/lib/Thelia/Model/Map/ModuleImageI18nTableMap.php index 76c29e11c..a65c804d7 100644 --- a/core/lib/Thelia/Model/Map/ModuleImageI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ModuleImageI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ModuleImageTableMap.php b/core/lib/Thelia/Model/Map/ModuleImageTableMap.php index 718ac47c5..2ff62a6a4 100644 --- a/core/lib/Thelia/Model/Map/ModuleImageTableMap.php +++ b/core/lib/Thelia/Model/Map/ModuleImageTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ModuleTableMap.php b/core/lib/Thelia/Model/Map/ModuleTableMap.php index 9cb1a12d9..16a14b1bb 100644 --- a/core/lib/Thelia/Model/Map/ModuleTableMap.php +++ b/core/lib/Thelia/Model/Map/ModuleTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/NewsletterTableMap.php b/core/lib/Thelia/Model/Map/NewsletterTableMap.php index 26f02e61e..94ffd25d2 100644 --- a/core/lib/Thelia/Model/Map/NewsletterTableMap.php +++ b/core/lib/Thelia/Model/Map/NewsletterTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/OrderAddressTableMap.php b/core/lib/Thelia/Model/Map/OrderAddressTableMap.php index 73b8f798d..178f0af4a 100644 --- a/core/lib/Thelia/Model/Map/OrderAddressTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderAddressTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/OrderCouponTableMap.php b/core/lib/Thelia/Model/Map/OrderCouponTableMap.php index c77a046f0..7f795ea57 100644 --- a/core/lib/Thelia/Model/Map/OrderCouponTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderCouponTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/OrderProductAttributeCombinationTableMap.php b/core/lib/Thelia/Model/Map/OrderProductAttributeCombinationTableMap.php index 3c3aee2f9..9ff1b329b 100644 --- a/core/lib/Thelia/Model/Map/OrderProductAttributeCombinationTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderProductAttributeCombinationTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/OrderProductTableMap.php b/core/lib/Thelia/Model/Map/OrderProductTableMap.php index d37b79089..dd4a957ab 100644 --- a/core/lib/Thelia/Model/Map/OrderProductTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderProductTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/OrderProductTaxTableMap.php b/core/lib/Thelia/Model/Map/OrderProductTaxTableMap.php index 98994c6e4..60df13bdf 100644 --- a/core/lib/Thelia/Model/Map/OrderProductTaxTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderProductTaxTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/OrderStatusI18nTableMap.php b/core/lib/Thelia/Model/Map/OrderStatusI18nTableMap.php index 1b2052c2e..0f8d61143 100644 --- a/core/lib/Thelia/Model/Map/OrderStatusI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderStatusI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/OrderStatusTableMap.php b/core/lib/Thelia/Model/Map/OrderStatusTableMap.php index f29ed9464..dff641a6d 100644 --- a/core/lib/Thelia/Model/Map/OrderStatusTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderStatusTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/OrderTableMap.php b/core/lib/Thelia/Model/Map/OrderTableMap.php index fcf0ba70d..28613da80 100644 --- a/core/lib/Thelia/Model/Map/OrderTableMap.php +++ b/core/lib/Thelia/Model/Map/OrderTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ProductAssociatedContentTableMap.php b/core/lib/Thelia/Model/Map/ProductAssociatedContentTableMap.php index d4d1dadb8..d3764f5c0 100644 --- a/core/lib/Thelia/Model/Map/ProductAssociatedContentTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductAssociatedContentTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ProductCategoryTableMap.php b/core/lib/Thelia/Model/Map/ProductCategoryTableMap.php index 73c87ce9f..c022691ad 100644 --- a/core/lib/Thelia/Model/Map/ProductCategoryTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductCategoryTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ProductDocumentI18nTableMap.php b/core/lib/Thelia/Model/Map/ProductDocumentI18nTableMap.php index 09e1dc0e4..963d91013 100644 --- a/core/lib/Thelia/Model/Map/ProductDocumentI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductDocumentI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ProductDocumentTableMap.php b/core/lib/Thelia/Model/Map/ProductDocumentTableMap.php index ff50bad77..158f6044d 100644 --- a/core/lib/Thelia/Model/Map/ProductDocumentTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductDocumentTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ProductI18nTableMap.php b/core/lib/Thelia/Model/Map/ProductI18nTableMap.php index 1954654e8..d48e1dbed 100644 --- a/core/lib/Thelia/Model/Map/ProductI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ProductImageI18nTableMap.php b/core/lib/Thelia/Model/Map/ProductImageI18nTableMap.php index 39ad567f9..e7bb92340 100644 --- a/core/lib/Thelia/Model/Map/ProductImageI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductImageI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ProductImageTableMap.php b/core/lib/Thelia/Model/Map/ProductImageTableMap.php index 36aabed3e..18bb10b36 100644 --- a/core/lib/Thelia/Model/Map/ProductImageTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductImageTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ProductPriceTableMap.php b/core/lib/Thelia/Model/Map/ProductPriceTableMap.php index 81eed9609..180abda6d 100644 --- a/core/lib/Thelia/Model/Map/ProductPriceTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductPriceTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ProductSaleElementsTableMap.php b/core/lib/Thelia/Model/Map/ProductSaleElementsTableMap.php index f6de901ed..7f715fdab 100644 --- a/core/lib/Thelia/Model/Map/ProductSaleElementsTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductSaleElementsTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ProductTableMap.php b/core/lib/Thelia/Model/Map/ProductTableMap.php index 35ce5c3b3..7b96f06b3 100644 --- a/core/lib/Thelia/Model/Map/ProductTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ProductVersionTableMap.php b/core/lib/Thelia/Model/Map/ProductVersionTableMap.php index 14d38a764..ef72fbee2 100644 --- a/core/lib/Thelia/Model/Map/ProductVersionTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductVersionTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ProfileI18nTableMap.php b/core/lib/Thelia/Model/Map/ProfileI18nTableMap.php index 915f45ec6..90d0a8a4f 100644 --- a/core/lib/Thelia/Model/Map/ProfileI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ProfileI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ProfileModuleTableMap.php b/core/lib/Thelia/Model/Map/ProfileModuleTableMap.php index a0b17ba64..be69b51c8 100644 --- a/core/lib/Thelia/Model/Map/ProfileModuleTableMap.php +++ b/core/lib/Thelia/Model/Map/ProfileModuleTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ProfileResourceTableMap.php b/core/lib/Thelia/Model/Map/ProfileResourceTableMap.php index 4f6bcc412..de7648d54 100644 --- a/core/lib/Thelia/Model/Map/ProfileResourceTableMap.php +++ b/core/lib/Thelia/Model/Map/ProfileResourceTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ProfileTableMap.php b/core/lib/Thelia/Model/Map/ProfileTableMap.php index 293c662ba..61190a033 100644 --- a/core/lib/Thelia/Model/Map/ProfileTableMap.php +++ b/core/lib/Thelia/Model/Map/ProfileTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ResourceI18nTableMap.php b/core/lib/Thelia/Model/Map/ResourceI18nTableMap.php index ec22e2fd3..f38018e8d 100644 --- a/core/lib/Thelia/Model/Map/ResourceI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/ResourceI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/ResourceTableMap.php b/core/lib/Thelia/Model/Map/ResourceTableMap.php index d3ad2c60a..bc10fcbf7 100644 --- a/core/lib/Thelia/Model/Map/ResourceTableMap.php +++ b/core/lib/Thelia/Model/Map/ResourceTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/RewritingArgumentTableMap.php b/core/lib/Thelia/Model/Map/RewritingArgumentTableMap.php index 45c75c983..613c2ad14 100644 --- a/core/lib/Thelia/Model/Map/RewritingArgumentTableMap.php +++ b/core/lib/Thelia/Model/Map/RewritingArgumentTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/RewritingUrlTableMap.php b/core/lib/Thelia/Model/Map/RewritingUrlTableMap.php index c6d5e5473..aa7e1604b 100644 --- a/core/lib/Thelia/Model/Map/RewritingUrlTableMap.php +++ b/core/lib/Thelia/Model/Map/RewritingUrlTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/TaxI18nTableMap.php b/core/lib/Thelia/Model/Map/TaxI18nTableMap.php index c50a30c90..222bfa833 100644 --- a/core/lib/Thelia/Model/Map/TaxI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/TaxI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/TaxRuleCountryTableMap.php b/core/lib/Thelia/Model/Map/TaxRuleCountryTableMap.php index 5282d67fa..6fe5c8cd5 100644 --- a/core/lib/Thelia/Model/Map/TaxRuleCountryTableMap.php +++ b/core/lib/Thelia/Model/Map/TaxRuleCountryTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/TaxRuleI18nTableMap.php b/core/lib/Thelia/Model/Map/TaxRuleI18nTableMap.php index 24f8a41d7..74cea24f3 100644 --- a/core/lib/Thelia/Model/Map/TaxRuleI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/TaxRuleI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/TaxRuleTableMap.php b/core/lib/Thelia/Model/Map/TaxRuleTableMap.php index 4f1cea73b..afc242df3 100644 --- a/core/lib/Thelia/Model/Map/TaxRuleTableMap.php +++ b/core/lib/Thelia/Model/Map/TaxRuleTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/TaxTableMap.php b/core/lib/Thelia/Model/Map/TaxTableMap.php index 6ca89ae85..360291504 100644 --- a/core/lib/Thelia/Model/Map/TaxTableMap.php +++ b/core/lib/Thelia/Model/Map/TaxTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/TemplateI18nTableMap.php b/core/lib/Thelia/Model/Map/TemplateI18nTableMap.php index 8db2f4fcf..b47656ec0 100644 --- a/core/lib/Thelia/Model/Map/TemplateI18nTableMap.php +++ b/core/lib/Thelia/Model/Map/TemplateI18nTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap; diff --git a/core/lib/Thelia/Model/Map/TemplateTableMap.php b/core/lib/Thelia/Model/Map/TemplateTableMap.php index f1509cbc7..901007c03 100644 --- a/core/lib/Thelia/Model/Map/TemplateTableMap.php +++ b/core/lib/Thelia/Model/Map/TemplateTableMap.php @@ -6,6 +6,7 @@ use Propel\Runtime\Propel; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\InstancePoolTrait; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\DataFetcher\DataFetcherInterface; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\RelationMap; use Propel\Runtime\Map\TableMap;