Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch '1.6.1.x'

  • Loading branch information...
commit e278ff428ac3eaf67eecabb55ff0b1f27d113b4d 2 parents 6f99550 + 083d2f4
@jeromenadaud jeromenadaud authored
Showing with 11,343 additions and 10,585 deletions.
  1. +15 −1 .gitignore
  2. +2 −1  .gitmodules
  3. +14 −14 Adapter/Adapter_AddressFactory.php
  4. +38 −0 Adapter/Adapter_CacheManager.php
  5. +7 −8 Adapter/Adapter_Configuration.php
  6. +13 −13 Adapter/Adapter_Database.php
  7. +70 −73 Adapter/Adapter_EntityMapper.php
  8. +1 −1  Adapter/Adapter_Exception.php
  9. +54 −0 Adapter/Adapter_HookManager.php
  10. +87 −0 Adapter/Adapter_PackItemsManager.php
  11. +4 −5 Adapter/Adapter_ProductPriceCalculator.php
  12. +22 −22 Adapter/Adapter_ServiceLocator.php
  13. +34 −0 Adapter/Adapter_StockManager.php
  14. +11 −0 CONTRIBUTORS.md
  15. +32 −32 Core/Business/CMS/Core_Business_CMS_CMSRepository.php
  16. +10 −12 Core/Business/CMS/Core_Business_CMS_CMSRoleRepository.php
  17. +6 −6 Core/Business/Core_Business_ContainerBuilder.php
  18. +51 −52 Core/Business/Email/Core_Business_Email_EmailLister.php
  19. +185 −185 Core/Business/Payment/Core_Business_Payment_PaymentOption.php
  20. +150 −0 Core/Business/Stock/Core_Business_Stock_StockManager.php
  21. +10 −10 Core/Foundation/Database/Core_Foundation_Database_EntityInterface.php
  22. +65 −66 Core/Foundation/Database/Core_Foundation_Database_EntityManager.php
  23. +181 −182 Core/Foundation/Database/Core_Foundation_Database_EntityRepository.php
  24. +1 −1  Core/Foundation/Database/Core_Foundation_Database_Exception.php
  25. +5 −5 Core/Foundation/Exception/Core_Foundation_Exception_Exception.php
  26. +1 −1  Core/Foundation/Filesystem/Core_Foundation_FileSystem_Exception.php
  27. +100 −93 Core/Foundation/Filesystem/Core_Foundation_FileSystem_FileSystem.php
  28. +2 −2 Core/Foundation/IoC/Core_Foundation_IoC_Container.php
  29. +5 −2 README.md
  30. +12 −8 admin-dev/ajax-tab.php
  31. +59 −58 admin-dev/ajax.php
  32. +68 −70 admin-dev/ajax_products_list.php
  33. +35 −35 admin-dev/autoupgrade/index.php
  34. +32 −22 admin-dev/backup.php
  35. +13 −15 admin-dev/cron_currency_rates.php
  36. +7 −7 admin-dev/displayImage.php
  37. +44 −45 admin-dev/drawer.php
  38. +150 −142 admin-dev/filemanager/ajax_calls.php
  39. +10 −9 admin-dev/filemanager/config/config.php
  40. +886 −664 admin-dev/filemanager/dialog.php
  41. +179 −177 admin-dev/filemanager/execute.php
  42. +12 −8 admin-dev/filemanager/force_download.php
  43. +899 −833 admin-dev/filemanager/include/php_image_magician.php
  44. +217 −172 admin-dev/filemanager/include/utils.php
  45. +56 −57 admin-dev/filemanager/lang/az.php
  46. +56 −57 admin-dev/filemanager/lang/bg.php
  47. +56 −57 admin-dev/filemanager/lang/br.php
  48. +52 −53 admin-dev/filemanager/lang/cs.php
  49. +56 −57 admin-dev/filemanager/lang/de.php
  50. +56 −58 admin-dev/filemanager/lang/en.php
  51. +56 −57 admin-dev/filemanager/lang/es.php
  52. +56 −57 admin-dev/filemanager/lang/fa.php
  53. +55 −56 admin-dev/filemanager/lang/fr.php
  54. +56 −58 admin-dev/filemanager/lang/hr.php
  55. +56 −57 admin-dev/filemanager/lang/hu.php
  56. +56 −58 admin-dev/filemanager/lang/id.php
  57. +56 −57 admin-dev/filemanager/lang/it.php
  58. +56 −58 admin-dev/filemanager/lang/mn.php
  59. +56 −58 admin-dev/filemanager/lang/nb.php
  60. +56 −57 admin-dev/filemanager/lang/nl.php
  61. +56 −57 admin-dev/filemanager/lang/pl.php
  62. +56 −57 admin-dev/filemanager/lang/pt.php
  63. +56 −57 admin-dev/filemanager/lang/ru.php
  64. +56 −58 admin-dev/filemanager/lang/se.php
  65. +56 −58 admin-dev/filemanager/lang/sk.php
  66. +56 −57 admin-dev/filemanager/lang/tr.php
  67. +56 −57 admin-dev/filemanager/lang/uk.php
  68. +115 −128 admin-dev/filemanager/upload.php
  69. +1 −1  admin-dev/footer.inc.php
  70. +359 −351 admin-dev/functions.php
  71. +3 −2 admin-dev/get-file-admin.php
  72. +48 −49 admin-dev/grider.php
  73. +9 −8 admin-dev/header.inc.php
  74. +19 −15 admin-dev/index.php
  75. +102 −107 admin-dev/init.php
  76. +1 −1  admin-dev/login.php
  77. +1 −1  admin-dev/password.php
  78. +21 −19 admin-dev/pdf.php
  79. +14 −10 admin-dev/searchcron.php
  80. +4 −4 admin-dev/tabs/index.php
  81. +1 −1  admin-dev/themes/default/css/admin-theme.css
  82. +2 −2 admin-dev/themes/default/css/admin-theme.css.map
  83. +1 −1  admin-dev/themes/default/css/admin-theme_rtl.css
  84. +2 −2 admin-dev/themes/default/css/admin-theme_rtl.css.map
  85. +4 −4 admin-dev/themes/default/css/index.php
  86. +1 −1  admin-dev/themes/default/css/schemes/admin-theme-blue.css
  87. +2 −2 admin-dev/themes/default/css/schemes/admin-theme-blue.css.map
  88. +1 −1  admin-dev/themes/default/css/schemes/admin-theme-contrast.css
  89. +2 −2 admin-dev/themes/default/css/schemes/admin-theme-contrast.css.map
  90. +1 −1  admin-dev/themes/default/css/schemes/admin-theme-flex.css
  91. +2 −2 admin-dev/themes/default/css/schemes/admin-theme-flex.css.map
  92. +1 −1  admin-dev/themes/default/css/schemes/admin-theme-fruit.css
  93. +2 −2 admin-dev/themes/default/css/schemes/admin-theme-fruit.css.map
  94. +1 −1  admin-dev/themes/default/css/schemes/admin-theme-prune.css
  95. +2 −2 admin-dev/themes/default/css/schemes/admin-theme-prune.css.map
  96. +1 −1  admin-dev/themes/default/css/schemes_rtl/admin-theme-blue_rtl.css
  97. +2 −2 admin-dev/themes/default/css/schemes_rtl/admin-theme-blue_rtl.css.map
  98. +1 −1  admin-dev/themes/default/css/schemes_rtl/admin-theme-contrast_rtl.css
  99. +2 −2 admin-dev/themes/default/css/schemes_rtl/admin-theme-contrast_rtl.css.map
  100. +1 −1  admin-dev/themes/default/css/schemes_rtl/admin-theme-flex_rtl.css
  101. +2 −2 admin-dev/themes/default/css/schemes_rtl/admin-theme-flex_rtl.css.map
  102. +1 −1  admin-dev/themes/default/css/schemes_rtl/admin-theme-fruit_rtl.css
  103. +2 −2 admin-dev/themes/default/css/schemes_rtl/admin-theme-fruit_rtl.css.map
  104. +1 −1  admin-dev/themes/default/css/schemes_rtl/admin-theme-prune_rtl.css
  105. +2 −2 admin-dev/themes/default/css/schemes_rtl/admin-theme-prune_rtl.css.map
  106. +4 −4 admin-dev/themes/default/img/index.php
  107. +4 −4 admin-dev/themes/default/index.php
  108. +0 −5 admin-dev/themes/default/js/admin-theme.js
  109. +9 −13 admin-dev/themes/default/js/tree.js
  110. +2 −0  admin-dev/themes/default/sass/controllers/_dashboard.sass
  111. +4 −4 admin-dev/themes/default/sass/index.php
  112. +1 −1  admin-dev/themes/default/sass/modules/index.php
  113. +9 −9 admin-dev/themes/default/sass/partials/_chosen.sass
  114. +18 −3 admin-dev/themes/default/sass/partials/_tables.sass
  115. +4 −4 admin-dev/themes/default/sass/partials/index.php
  116. +35 −35 admin-dev/themes/default/template/controllers/access/helpers/form/index.php
  117. +35 −35 admin-dev/themes/default/template/controllers/access/helpers/index.php
  118. +35 −35 admin-dev/themes/default/template/controllers/access/index.php
  119. +35 −35 admin-dev/themes/default/template/controllers/addons_catalog/index.php
  120. +35 −35 admin-dev/themes/default/template/controllers/addresses/helpers/form/index.php
  121. +35 −35 admin-dev/themes/default/template/controllers/addresses/helpers/index.php
  122. +35 −35 admin-dev/themes/default/template/controllers/addresses/helpers/list/index.php
  123. +35 −35 admin-dev/themes/default/template/controllers/addresses/index.php
  124. +35 −35 admin-dev/themes/default/template/controllers/attachments/index.php
  125. +35 −35 admin-dev/themes/default/template/controllers/attribute_generator/index.php
  126. +35 −35 admin-dev/themes/default/template/controllers/attributes/helpers/form/index.php
  127. +35 −35 admin-dev/themes/default/template/controllers/attributes/helpers/index.php
  128. +35 −35 admin-dev/themes/default/template/controllers/attributes/index.php
  129. +35 −35 admin-dev/themes/default/template/controllers/attributes_groups/helpers/form/index.php
  130. +35 −35 admin-dev/themes/default/template/controllers/attributes_groups/helpers/index.php
  131. +35 −35 admin-dev/themes/default/template/controllers/attributes_groups/helpers/list/index.php
  132. +1 −1  admin-dev/themes/default/template/controllers/attributes_groups/helpers/view/index.php
  133. +35 −35 admin-dev/themes/default/template/controllers/attributes_groups/index.php
  134. +35 −35 admin-dev/themes/default/template/controllers/backup/download/index.php
  135. +35 −35 admin-dev/themes/default/template/controllers/backup/helpers/index.php
  136. +35 −35 admin-dev/themes/default/template/controllers/backup/helpers/list/index.php
  137. +35 −35 admin-dev/themes/default/template/controllers/backup/helpers/view/index.php
  138. +35 −35 admin-dev/themes/default/template/controllers/backup/index.php
  139. +35 −35 admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/index.php
  140. +35 −35 admin-dev/themes/default/template/controllers/carrier_wizard/helpers/index.php
  141. +35 −35 admin-dev/themes/default/template/controllers/carrier_wizard/helpers/view/index.php
  142. +35 −35 admin-dev/themes/default/template/controllers/carriers/helpers/form/index.php
  143. +35 −35 admin-dev/themes/default/template/controllers/carriers/helpers/index.php
  144. +35 −35 admin-dev/themes/default/template/controllers/carriers/index.php
  145. +7 −0 admin-dev/themes/default/template/controllers/cart_rules/form.js
  146. +35 −35 admin-dev/themes/default/template/controllers/cart_rules/helpers/index.php
  147. +35 −35 admin-dev/themes/default/template/controllers/cart_rules/helpers/list/index.php
  148. +35 −35 admin-dev/themes/default/template/controllers/cart_rules/index.php
  149. +2 −2 admin-dev/themes/default/template/controllers/cart_rules/product_rule_group.tpl
  150. +35 −35 admin-dev/themes/default/template/controllers/carts/helpers/index.php
  151. +35 −35 admin-dev/themes/default/template/controllers/carts/helpers/view/index.php
  152. +35 −35 admin-dev/themes/default/template/controllers/carts/index.php
  153. +35 −35 admin-dev/themes/default/template/controllers/categories/helpers/form/index.php
  154. +35 −35 admin-dev/themes/default/template/controllers/categories/helpers/index.php
  155. +35 −35 admin-dev/themes/default/template/controllers/categories/helpers/list/index.php
  156. +35 −35 admin-dev/themes/default/template/controllers/categories/index.php
  157. +35 −35 admin-dev/themes/default/template/controllers/cms/helpers/form/index.php
  158. +35 −35 admin-dev/themes/default/template/controllers/cms/helpers/index.php
  159. +35 −35 admin-dev/themes/default/template/controllers/cms/index.php
  160. +35 −35 admin-dev/themes/default/template/controllers/cms_categories/helpers/form/index.php
  161. +35 −35 admin-dev/themes/default/template/controllers/cms_categories/helpers/index.php
  162. +35 −35 admin-dev/themes/default/template/controllers/cms_categories/index.php
  163. +35 −35 admin-dev/themes/default/template/controllers/cms_content/index.php
  164. +35 −35 admin-dev/themes/default/template/controllers/countries/helpers/form/index.php
  165. +35 −35 admin-dev/themes/default/template/controllers/countries/helpers/index.php
  166. +35 −35 admin-dev/themes/default/template/controllers/countries/helpers/list/index.php
  167. +35 −35 admin-dev/themes/default/template/controllers/countries/index.php
  168. +35 −35 admin-dev/themes/default/template/controllers/customer_threads/helpers/index.php
  169. +35 −35 admin-dev/themes/default/template/controllers/customer_threads/helpers/list/index.php
  170. +35 −35 admin-dev/themes/default/template/controllers/customer_threads/helpers/options/index.php
  171. +35 −35 admin-dev/themes/default/template/controllers/customer_threads/helpers/view/index.php
  172. +1 −1  admin-dev/themes/default/template/controllers/customer_threads/helpers/view/view.tpl
  173. +35 −35 admin-dev/themes/default/template/controllers/customer_threads/index.php
  174. +35 −35 admin-dev/themes/default/template/controllers/customers/helpers/index.php
  175. +35 −35 admin-dev/themes/default/template/controllers/customers/helpers/list/index.php
  176. +35 −35 admin-dev/themes/default/template/controllers/customers/helpers/view/index.php
  177. +12 −9 admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl
  178. +35 −35 admin-dev/themes/default/template/controllers/customers/index.php
  179. +1 −1  admin-dev/themes/default/template/controllers/dashboard/helpers/index.php
  180. +1 −1  admin-dev/themes/default/template/controllers/dashboard/helpers/view/index.php
  181. +1 −1  admin-dev/themes/default/template/controllers/dashboard/index.php
  182. +35 −35 admin-dev/themes/default/template/controllers/emails/index.php
  183. +35 −35 admin-dev/themes/default/template/controllers/employees/helpers/form/index.php
  184. +35 −35 admin-dev/themes/default/template/controllers/employees/helpers/index.php
  185. +35 −35 admin-dev/themes/default/template/controllers/employees/index.php
  186. +35 −35 admin-dev/themes/default/template/controllers/feature_value/helpers/form/index.php
  187. +35 −35 admin-dev/themes/default/template/controllers/feature_value/helpers/index.php
  188. +35 −35 admin-dev/themes/default/template/controllers/feature_value/index.php
  189. +35 −35 admin-dev/themes/default/template/controllers/features/helpers/form/index.php
  190. +35 −35 admin-dev/themes/default/template/controllers/features/helpers/index.php
  191. +35 −35 admin-dev/themes/default/template/controllers/features/index.php
  192. +35 −35 admin-dev/themes/default/template/controllers/geolocation/helpers/index.php
  193. +35 −35 admin-dev/themes/default/template/controllers/geolocation/helpers/options/index.php
  194. +35 −35 admin-dev/themes/default/template/controllers/geolocation/index.php
  195. +35 −35 admin-dev/themes/default/template/controllers/groups/helpers/form/index.php
  196. +35 −35 admin-dev/themes/default/template/controllers/groups/helpers/index.php
  197. +35 −35 admin-dev/themes/default/template/controllers/groups/helpers/tree/index.php
  198. +1 −2  admin-dev/themes/default/template/controllers/groups/helpers/tree/tree_categories.tpl
  199. +3 −3 admin-dev/themes/default/template/controllers/groups/helpers/tree/tree_node_item_radio.tpl
  200. +35 −35 admin-dev/themes/default/template/controllers/groups/helpers/view/index.php
  201. +35 −35 admin-dev/themes/default/template/controllers/groups/index.php
  202. +35 −35 admin-dev/themes/default/template/controllers/images/index.php
  203. +35 −35 admin-dev/themes/default/template/controllers/import/helpers/form/index.php
  204. +35 −35 admin-dev/themes/default/template/controllers/import/helpers/index.php
  205. +35 −35 admin-dev/themes/default/template/controllers/import/helpers/view/index.php
  206. +35 −35 admin-dev/themes/default/template/controllers/import/index.php
  207. +35 −35 admin-dev/themes/default/template/controllers/index.php
  208. +35 −35 admin-dev/themes/default/template/controllers/information/helpers/index.php
  209. +35 −35 admin-dev/themes/default/template/controllers/information/helpers/view/index.php
  210. +35 −35 admin-dev/themes/default/template/controllers/information/index.php
  211. +35 −35 admin-dev/themes/default/template/controllers/invoices/helpers/form/index.php
  212. +35 −35 admin-dev/themes/default/template/controllers/invoices/helpers/index.php
  213. +35 −35 admin-dev/themes/default/template/controllers/invoices/index.php
  214. +35 −35 admin-dev/themes/default/template/controllers/languages/helpers/form/index.php
  215. +35 −35 admin-dev/themes/default/template/controllers/languages/helpers/index.php
  216. +35 −35 admin-dev/themes/default/template/controllers/languages/index.php
  217. +35 −35 admin-dev/themes/default/template/controllers/localization/index.php
  218. +35 −35 admin-dev/themes/default/template/controllers/login/index.php
  219. +35 −35 admin-dev/themes/default/template/controllers/logs/helpers/index.php
  220. +35 −35 admin-dev/themes/default/template/controllers/logs/helpers/list/index.php
  221. +35 −35 admin-dev/themes/default/template/controllers/logs/index.php
  222. +35 −35 admin-dev/themes/default/template/controllers/maintenance/helpers/index.php
  223. +35 −35 admin-dev/themes/default/template/controllers/maintenance/helpers/options/index.php
  224. +35 −35 admin-dev/themes/default/template/controllers/maintenance/index.php
  225. +35 −35 admin-dev/themes/default/template/controllers/manufacturers/helpers/index.php
  226. +35 −35 admin-dev/themes/default/template/controllers/manufacturers/helpers/view/index.php
  227. +35 −35 admin-dev/themes/default/template/controllers/manufacturers/index.php
  228. +35 −35 admin-dev/themes/default/template/controllers/marketing/helpers/index.php
  229. +35 −35 admin-dev/themes/default/template/controllers/marketing/helpers/view/index.php
  230. +35 −35 admin-dev/themes/default/template/controllers/marketing/index.php
  231. +35 −35 admin-dev/themes/default/template/controllers/meta/helpers/index.php
  232. +35 −35 admin-dev/themes/default/template/controllers/meta/index.php
  233. +1 −1  admin-dev/themes/default/template/controllers/modules/index.php
  234. +2 −2 admin-dev/themes/default/template/controllers/modules/list.tpl
  235. +1 −1  admin-dev/themes/default/template/controllers/modules/page_header_toolbar.tpl
  236. +7 −1 admin-dev/themes/default/template/controllers/modules/quickview.tpl
  237. +1 −1  admin-dev/themes/default/template/controllers/modules/tab_module_line.tpl
  238. +1 −1  admin-dev/themes/default/template/controllers/modules_positions/form.tpl
  239. +35 −35 admin-dev/themes/default/template/controllers/modules_positions/index.php
  240. +35 −35 admin-dev/themes/default/template/controllers/not_found/index.php
  241. +35 −35 admin-dev/themes/default/template/controllers/order_preferences/helpers/index.php
  242. +35 −35 admin-dev/themes/default/template/controllers/order_preferences/helpers/options/index.php
  243. +35 −35 admin-dev/themes/default/template/controllers/order_preferences/index.php
  244. +3 −3 admin-dev/themes/default/template/controllers/orders/_customized_data.tpl
  245. +6 −9 admin-dev/themes/default/template/controllers/orders/_new_product.tpl
  246. +3 −3 admin-dev/themes/default/template/controllers/orders/_product_line.tpl
  247. +35 −35 admin-dev/themes/default/template/controllers/orders/helpers/index.php
  248. +1 −1  admin-dev/themes/default/template/controllers/orders/helpers/list/index.php
  249. +35 −35 admin-dev/themes/default/template/controllers/orders/helpers/view/index.php
  250. +14 −13 admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl
  251. +35 −35 admin-dev/themes/default/template/controllers/orders/index.php
  252. +35 −35 admin-dev/themes/default/template/controllers/outstanding/index.php
  253. +35 −35 admin-dev/themes/default/template/controllers/payment/helpers/index.php
  254. +35 −35 admin-dev/themes/default/template/controllers/payment/helpers/view/index.php
  255. +35 −35 admin-dev/themes/default/template/controllers/payment/index.php
  256. +2 −0  admin-dev/themes/default/template/controllers/performance/helpers/form/form.tpl
  257. +35 −35 admin-dev/themes/default/template/controllers/performance/helpers/form/index.php
  258. +35 −35 admin-dev/themes/default/template/controllers/performance/helpers/index.php
  259. +35 −35 admin-dev/themes/default/template/controllers/performance/index.php
  260. +35 −35 admin-dev/themes/default/template/controllers/preferences/helpers/index.php
  261. +35 −35 admin-dev/themes/default/template/controllers/preferences/helpers/options/index.php
  262. +35 −35 admin-dev/themes/default/template/controllers/preferences/index.php
  263. +35 −35 admin-dev/themes/default/template/controllers/products/combination/helpers/index.php
  264. +35 −35 admin-dev/themes/default/template/controllers/products/combination/helpers/list/index.php
  265. +35 −35 admin-dev/themes/default/template/controllers/products/combination/index.php
  266. +35 −35 admin-dev/themes/default/template/controllers/products/helpers/form/index.php
  267. +35 −35 admin-dev/themes/default/template/controllers/products/helpers/index.php
  268. +35 −35 admin-dev/themes/default/template/controllers/products/helpers/list/index.php
  269. +1 −1  admin-dev/themes/default/template/controllers/products/helpers/tree/index.php
  270. +2 −2 admin-dev/themes/default/template/controllers/products/helpers/tree/subtree_associated_categories.tpl
  271. +16 −6 admin-dev/themes/default/template/controllers/products/helpers/tree/tree_associated_categories.tpl
  272. +16 −11 admin-dev/themes/default/template/controllers/products/helpers/tree/tree_categories.tpl
  273. +1 −1  admin-dev/themes/default/template/controllers/products/helpers/uploader/index.php
  274. +35 −35 admin-dev/themes/default/template/controllers/products/index.php
  275. +35 −35 admin-dev/themes/default/template/controllers/products/multishop/index.php
  276. +1 −1  admin-dev/themes/default/template/controllers/products/prices.tpl
  277. +1 −1  admin-dev/themes/default/template/controllers/products/quantities.tpl
  278. +1 −1  admin-dev/themes/default/template/controllers/products/virtualproduct.tpl
  279. +32 −30 admin-dev/themes/default/template/controllers/referrers/calendar.tpl
  280. +35 −35 admin-dev/themes/default/template/controllers/referrers/helpers/form/index.php
  281. +35 −35 admin-dev/themes/default/template/controllers/referrers/helpers/index.php
  282. +35 −35 admin-dev/themes/default/template/controllers/referrers/helpers/list/index.php
  283. +35 −35 admin-dev/themes/default/template/controllers/referrers/helpers/view/index.php
  284. +35 −35 admin-dev/themes/default/template/controllers/referrers/index.php
  285. +35 −35 admin-dev/themes/default/template/controllers/request_sql/helpers/form/index.php
  286. +35 −35 admin-dev/themes/default/template/controllers/request_sql/helpers/index.php
  287. +35 −35 admin-dev/themes/default/template/controllers/request_sql/helpers/view/index.php
  288. +35 −35 admin-dev/themes/default/template/controllers/request_sql/index.php
  289. +35 −35 admin-dev/themes/default/template/controllers/return/helpers/form/index.php
  290. +35 −35 admin-dev/themes/default/template/controllers/return/helpers/index.php
  291. +35 −35 admin-dev/themes/default/template/controllers/return/index.php
  292. +35 −35 admin-dev/themes/default/template/controllers/scenes/helpers/form/index.php
  293. +35 −35 admin-dev/themes/default/template/controllers/scenes/helpers/index.php
  294. +1 −1  admin-dev/themes/default/template/controllers/scenes/helpers/tree/index.php
  295. +5 −5 admin-dev/themes/default/template/controllers/scenes/helpers/tree/tree_node_item_checkbox.tpl
  296. +35 −35 admin-dev/themes/default/template/controllers/scenes/index.php
  297. +35 −35 admin-dev/themes/default/template/controllers/search/helpers/index.php
  298. +35 −35 admin-dev/themes/default/template/controllers/search/helpers/view/index.php
  299. +35 −35 admin-dev/themes/default/template/controllers/search/index.php
  300. +35 −35 admin-dev/themes/default/template/controllers/shop/helpers/form/index.php
Sorry, we could not display the entire diff because too many files (1,501) changed.
View
16 .gitignore
@@ -13,6 +13,8 @@ config.codekit
*.sublime-project
*.sublime-workspace
nbproject
+bower_components
+composer.lock
# Cache, temp and personal files
@@ -21,9 +23,11 @@ download/*
img/*
log/*
upload/*
+vendor/*
admin-dev/autoupgrade/*
admin-dev/backups/*
+admin-dev/import/*
themes/*/cache/*
@@ -39,6 +43,13 @@ config/xml/*
modules/*
override/*
+admin-dev/themes/default/sass/ie.sass
+admin-dev/themes/default/sass/print.sass
+admin-dev/themes/default/sass/screen.sass
+admin-dev/themes/default/css/ie.css
+admin-dev/themes/default/css/print.css
+admin-dev/themes/default/css/screen.css
+
# Translations and emails templates
translations/*
@@ -46,7 +57,10 @@ mails/*
!mails/en/
themes/default-bootstrap/lang/*
themes/default-bootstrap/modules/*/translations/*.php
-
+themes/default-bootstrap/mails/*
+!themes/default-bootstrap/mails/en/
+themes/default-bootstrap/modules/*/mails/*
+!themes/default-bootstrap/modules/*/mails/en
# MISC
View
3  .gitmodules
@@ -380,5 +380,6 @@
ignore = dirty
[submodule "modules/sendtoafriend"]
path = modules/sendtoafriend
- url = https://github.com/PrestaShop/sendtoafriend
+ url = https://github.com/PrestaShop/sendtoafriend.git
+ branch = master
ignore = dirty
View
28 Adapter/Adapter_AddressFactory.php
@@ -26,25 +26,25 @@
class Adapter_AddressFactory
{
- /**
- * Initilize an address corresponding to the specified id address or if empty to the
- * default shop configuration
- * @param null $id_address
- * @param bool $with_geoloc
- * @return Address
- */
- public function findOrCreate($id_address = null, $with_geoloc = false)
+ /**
+ * Initilize an address corresponding to the specified id address or if empty to the
+ * default shop configuration
+ * @param null $id_address
+ * @param bool $with_geoloc
+ * @return Address
+ */
+ public function findOrCreate($id_address = null, $with_geoloc = false)
{
$func_args = func_get_args();
return call_user_func_array(array('Address', 'initialize'), $func_args);
}
- /**
- * Check if an address exists depending on given $id_address
- * @param $id_address
- * @return bool
- */
- public function addressExists($id_address)
+ /**
+ * Check if an address exists depending on given $id_address
+ * @param $id_address
+ * @return bool
+ */
+ public function addressExists($id_address)
{
return Address::addressExists($id_address);
}
View
38 Adapter/Adapter_CacheManager.php
@@ -0,0 +1,38 @@
+<?php
+/**
+ * 2007-2015 PrestaShop
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@prestashop.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
+ * versions in the future. If you wish to customize PrestaShop for your
+ * needs please refer to http://www.prestashop.com for more information.
+ *
+ * @author PrestaShop SA <contact@prestashop.com>
+ * @copyright 2007-2015 PrestaShop SA
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+
+class Adapter_CacheManager
+{
+ /**
+ * Cleans the cache for specific cache key.
+ *
+ * @param $key
+ */
+ public function clean($key)
+ {
+ Cache::clean($key);
+ }
+}
View
15 Adapter/Adapter_Configuration.php
@@ -26,14 +26,13 @@
class Adapter_Configuration implements Core_Business_ConfigurationInterface
{
-
- /**
- * Returns constant defined by given $key if exists or check directly into PrestaShop
- * Configuration
- * @param $key
- * @return mixed
- */
- public function get($key)
+ /**
+ * Returns constant defined by given $key if exists or check directly into PrestaShop
+ * Configuration
+ * @param $key
+ * @return mixed
+ */
+ public function get($key)
{
if (defined($key)) {
return constant($key);
View
26 Adapter/Adapter_Database.php
@@ -26,23 +26,23 @@
class Adapter_Database implements Core_Foundation_Database_DatabaseInterface
{
- /**
- * Perform a SELECT sql statement
- * @param $sqlString
- * @return array|false
- * @throws PrestaShopDatabaseException
- */
- public function select($sqlString)
+ /**
+ * Perform a SELECT sql statement
+ * @param $sqlString
+ * @return array|false
+ * @throws PrestaShopDatabaseException
+ */
+ public function select($sqlString)
{
return Db::getInstance()->executeS($sqlString);
}
- /**
- * Escape $unsafe to be used into a SQL statement
- * @param $unsafeData
- * @return string
- */
- public function escape($unsafeData)
+ /**
+ * Escape $unsafe to be used into a SQL statement
+ * @param $unsafeData
+ * @return string
+ */
+ public function escape($unsafeData)
{
// Prepare required params
$html_ok = true;
View
143 Adapter/Adapter_EntityMapper.php
@@ -24,84 +24,81 @@
* International Registered Trademark & Property of PrestaShop SA
*/
-class Adapter_EntityMapper {
+class Adapter_EntityMapper
+{
+ /**
+ * Load ObjectModel
+ * @param $id
+ * @param $id_lang
+ * @param $entity ObjectModel
+ * @param $entity_defs
+ * @param $id_shop
+ * @param $should_cache_objects
+ * @throws PrestaShopDatabaseException
+ */
+ public function load($id, $id_lang, $entity, $entity_defs, $id_shop, $should_cache_objects)
+ {
+ // Load object from database if object id is present
+ $cache_id = 'objectmodel_' . $entity_defs['classname'] . '_' . (int)$id . '_' . (int)$id_shop . '_' . (int)$id_lang;
+ if (!$should_cache_objects || !Cache::isStored($cache_id)) {
+ $sql = new DbQuery();
+ $sql->from($entity_defs['table'], 'a');
+ $sql->where('a.`' . bqSQL($entity_defs['primary']) . '` = ' . (int)$id);
- /**
- * Load ObjectModel
- * @param $id
- * @param $id_lang
- * @param $entity ObjectModel
- * @param $entity_defs
- * @param $id_shop
- * @param $should_cache_objects
- * @throws PrestaShopDatabaseException
- */
- public function load($id, $id_lang, $entity, $entity_defs, $id_shop, $should_cache_objects)
- {
- // Load object from database if object id is present
- $cache_id = 'objectmodel_' . $entity_defs['classname'] . '_' . (int)$id . '_' . (int)$id_shop . '_' . (int)$id_lang;
- if (!$should_cache_objects || !Cache::isStored($cache_id)) {
- $sql = new DbQuery();
- $sql->from($entity_defs['table'], 'a');
- $sql->where('a.`' . bqSQL($entity_defs['primary']) . '` = ' . (int)$id);
+ // Get lang informations
+ if ($id_lang && isset($entity_defs['multilang']) && $entity_defs['multilang']) {
+ $sql->leftJoin($entity_defs['table'] . '_lang', 'b', 'a.`' . bqSQL($entity_defs['primary']) . '` = b.`' . bqSQL($entity_defs['primary']) . '` AND b.`id_lang` = ' . (int)$id_lang);
+ if ($id_shop && !empty($entity_defs['multilang_shop'])) {
+ $sql->where('b.`id_shop` = ' . (int)$id_shop);
+ }
+ }
- // Get lang informations
- if ($id_lang && isset($entity_defs['multilang']) && $entity_defs['multilang']) {
+ // Get shop informations
+ if (Shop::isTableAssociated($entity_defs['table'])) {
+ $sql->leftJoin($entity_defs['table'] . '_shop', 'c', 'a.`' . bqSQL($entity_defs['primary']) . '` = c.`' . bqSQL($entity_defs['primary']) . '` AND c.`id_shop` = ' . (int)$id_shop);
+ }
- $sql->leftJoin($entity_defs['table'] . '_lang', 'b', 'a.`' . bqSQL($entity_defs['primary']) . '` = b.`' . bqSQL($entity_defs['primary']) . '` AND b.`id_lang` = ' . (int)$id_lang);
- if ($id_shop && !empty($entity_defs['multilang_shop'])) {
- $sql->where('b.`id_shop` = ' . (int)$id_shop);
- }
- }
-
- // Get shop informations
- if (Shop::isTableAssociated($entity_defs['table'])) {
- $sql->leftJoin($entity_defs['table'] . '_shop', 'c', 'a.`' . bqSQL($entity_defs['primary']) . '` = c.`' . bqSQL($entity_defs['primary']) . '` AND c.`id_shop` = ' . (int)$id_shop);
- }
-
- if ($object_datas = Db::getInstance()->getRow($sql)) {
- if (!$id_lang && isset($entity_defs['multilang']) && $entity_defs['multilang']) {
-
- $sql = 'SELECT *
+ if ($object_datas = Db::getInstance()->getRow($sql)) {
+ if (!$id_lang && isset($entity_defs['multilang']) && $entity_defs['multilang']) {
+ $sql = 'SELECT *
FROM `' . bqSQL(_DB_PREFIX_ . $entity_defs['table']) . '_lang`
WHERE `' . bqSQL($entity_defs['primary']) . '` = ' . (int)$id
- .(($id_shop && $entity->isLangMultishop()) ? ' AND `id_shop` = ' . (int)$id_shop : '');
-
- if ($object_datas_lang = Db::getInstance()->executeS($sql)) {
-
- foreach ($object_datas_lang as $row) {
- foreach ($row as $key => $value) {
- if ($key != $entity_defs['primary'] && array_key_exists($key, $entity)) {
- if (!isset($object_datas[$key]) || !is_array($object_datas[$key]))
- $object_datas[$key] = array();
+ .(($id_shop && $entity->isLangMultishop()) ? ' AND `id_shop` = ' . (int)$id_shop : '');
- $object_datas[$key][$row['id_lang']] = $value;
- }
- }
- }
- }
- }
- $entity->id = (int)$id;
- foreach ($object_datas as $key => $value) {
- if (array_key_exists($key, $entity)) {
- $entity->{$key} = $value;
- } else {
- unset($object_datas[$key]);
- }
- }
- if ($should_cache_objects) {
- Cache::store($cache_id, $object_datas);
- }
- }
- } else {
- $object_datas = Cache::retrieve($cache_id);
- if ($object_datas) {
- $entity->id = (int)$id;
- foreach ($object_datas as $key => $value) {
- $entity->{$key} = $value;
- }
- }
- }
- }
+ if ($object_datas_lang = Db::getInstance()->executeS($sql)) {
+ foreach ($object_datas_lang as $row) {
+ foreach ($row as $key => $value) {
+ if ($key != $entity_defs['primary'] && array_key_exists($key, $entity)) {
+ if (!isset($object_datas[$key]) || !is_array($object_datas[$key])) {
+ $object_datas[$key] = array();
+ }
+ $object_datas[$key][$row['id_lang']] = $value;
+ }
+ }
+ }
+ }
+ }
+ $entity->id = (int)$id;
+ foreach ($object_datas as $key => $value) {
+ if (array_key_exists($key, $entity)) {
+ $entity->{$key} = $value;
+ } else {
+ unset($object_datas[$key]);
+ }
+ }
+ if ($should_cache_objects) {
+ Cache::store($cache_id, $object_datas);
+ }
+ }
+ } else {
+ $object_datas = Cache::retrieve($cache_id);
+ if ($object_datas) {
+ $entity->id = (int)$id;
+ foreach ($object_datas as $key => $value) {
+ $entity->{$key} = $value;
+ }
+ }
+ }
+ }
}
View
2  Adapter/Adapter_Exception.php
@@ -26,4 +26,4 @@
class Adapter_Exception extends Core_Foundation_Exception_Exception
{
-}
+}
View
54 Adapter/Adapter_HookManager.php
@@ -0,0 +1,54 @@
+<?php
+/**
+ * 2007-2015 PrestaShop
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@prestashop.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
+ * versions in the future. If you wish to customize PrestaShop for your
+ * needs please refer to http://www.prestashop.com for more information.
+ *
+ * @author PrestaShop SA <contact@prestashop.com>
+ * @copyright 2007-2015 PrestaShop SA
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+
+class Adapter_HookManager
+{
+ /**
+ * Execute modules for specified hook
+ *
+ * @param string $hook_name Hook Name
+ * @param array $hook_args Parameters for the functions
+ * @param int $id_module Execute hook for this module only
+ * @param bool $array_return If specified, module output will be set by name in an array
+ * @param bool $check_exceptions Check permission exceptions
+ * @param bool $use_push Force change to be refreshed on Dashboard widgets
+ * @param int $id_shop If specified, hook will be execute the shop with this ID
+ *
+ * @throws PrestaShopException
+ *
+ * @return string/array modules output
+ */
+ public function exec($hook_name,
+ $hook_args = array(),
+ $id_module = null,
+ $array_return = false,
+ $check_exceptions = true,
+ $use_push = false,
+ $id_shop = null)
+ {
+ return Hook::exec($hook_name, $hook_args, $id_module, $array_return, $check_exceptions, $use_push, $id_shop);
+ }
+}
View
87 Adapter/Adapter_PackItemsManager.php
@@ -0,0 +1,87 @@
+<?php
+/**
+ * 2007-2015 PrestaShop
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@prestashop.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
+ * versions in the future. If you wish to customize PrestaShop for your
+ * needs please refer to http://www.prestashop.com for more information.
+ *
+ * @author PrestaShop SA <contact@prestashop.com>
+ * @copyright 2007-2015 PrestaShop SA
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+
+class Adapter_PackItemsManager
+{
+ /**
+ * Get the Products contained in the given Pack.
+ *
+ * @param Pack $pack
+ * @param integer $id_lang Optional
+ * @return Array[Product] The products contained in this Pack, with special dynamic attributes [pack_quantity, id_pack_product_attribute]
+ */
+ public function getPackItems($pack, $id_lang = false)
+ {
+ if ($id_lang === false) {
+ $configuration = Adapter_ServiceLocator::get('Core_Business_ConfigurationInterface');
+ $id_lang = (int)$configuration->get('PS_LANG_DEFAULT');
+ }
+ return Pack::getItems($pack->id, $id_lang);
+ }
+
+ /**
+ * Get all Packs that contains the given item in the corresponding declination.
+ *
+ * @param Product $item
+ * @param integer $item_attribute_id
+ * @param integer $id_lang Optional
+ * @return Array[Pack] The packs that contains the given item, with special dynamic attribute [pack_item_quantity]
+ */
+ public function getPacksContainingItem($item, $item_attribute_id, $id_lang = false)
+ {
+ if ($id_lang === false) {
+ $configuration = Adapter_ServiceLocator::get('Core_Business_ConfigurationInterface');
+ $id_lang = (int)$configuration->get('PS_LANG_DEFAULT');
+ }
+ return Pack::getPacksContainingItem($item->id, $item_attribute_id, $id_lang);
+ }
+
+ /**
+ * Is this product a pack?
+ *
+ * @param Product $product
+ * @return boolean
+ */
+ public function isPack($product)
+ {
+ return Pack::isPack($product->id);
+ }
+
+ /**
+ * Is this product in a pack?
+ * If $id_product_attribute specified, then will restrict search on the given combination,
+ * else this method will match a product if at least one of all its combination is in a pack.
+ *
+ * @param Product $product
+ * @param integer $id_product_attribute Optional combination of the product
+ * @return boolean
+ */
+ public function isPacked($product, $id_product_attribute = false)
+ {
+ return Pack::isPacked($product->id, $id_product_attribute);
+ }
+
+}
View
9 Adapter/Adapter_ProductPriceCalculator.php
@@ -32,20 +32,19 @@ public function getProductPrice(
$id_product_attribute = null,
$decimals = 6,
$divisor = null,
- $only_reduc = false,
+ $only_reduc = false,
$usereduc = true,
$quantity = 1,
$force_associated_tax = false,
$id_customer = null,
$id_cart = null,
- $id_address = null,
+ $id_address = null,
&$specific_price_output = null,
$with_ecotax = true,
$use_group_reduction = true,
Context $context = null,
- $use_customer_price = true
- )
- {
+ $use_customer_price = true
+ ) {
return Product::getPriceStatic(
$id_product,
$usetax,
View
44 Adapter/Adapter_ServiceLocator.php
@@ -26,29 +26,29 @@
class Adapter_ServiceLocator
{
- /**
- * Set a service container Instance
- * @var Core_Foundation_IoC_Container
- */
- private static $service_container;
+ /**
+ * Set a service container Instance
+ * @var Core_Foundation_IoC_Container
+ */
+ private static $service_container;
- public static function setServiceContainerInstance(Core_Foundation_IoC_Container $container)
- {
- self::$service_container = $container;
- }
+ public static function setServiceContainerInstance(Core_Foundation_IoC_Container $container)
+ {
+ self::$service_container = $container;
+ }
- /**
- * Get a service depending on its given $serviceName
- * @param $serviceName
- * @return mixed|object
- * @throws Adapter_Exception
- */
- public static function get($serviceName)
- {
- if (empty(self::$service_container) || is_null(self::$service_container)) {
- throw new Adapter_Exception('Service container is not set.');
- }
+ /**
+ * Get a service depending on its given $serviceName
+ * @param $serviceName
+ * @return mixed|object
+ * @throws Adapter_Exception
+ */
+ public static function get($serviceName)
+ {
+ if (empty(self::$service_container) || is_null(self::$service_container)) {
+ throw new Adapter_Exception('Service container is not set.');
+ }
- return self::$service_container->make($serviceName);
- }
+ return self::$service_container->make($serviceName);
+ }
}
View
34 Adapter/Adapter_StockManager.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * 2007-2015 PrestaShop
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@prestashop.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
+ * versions in the future. If you wish to customize PrestaShop for your
+ * needs please refer to http://www.prestashop.com for more information.
+ *
+ * @author PrestaShop SA <contact@prestashop.com>
+ * @copyright 2007-2015 PrestaShop SA
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+
+class Adapter_StockManager
+{
+
+ public function getStockAvailableByProduct($product, $id_product_attribute = null, $id_shop = null)
+ {
+ return new StockAvailable(StockAvailable::getStockAvailableIdByProductId($product->id, $id_product_attribute, $id_shop));
+ }
+}
View
11 CONTRIBUTORS.md
@@ -54,9 +54,11 @@ GitHub contributors:
- ChristopheBoucaut
- CINS
- cippest
+- Claire Meuriot
- cmouleyre
- codvir
- Comkwatt
+- Conner Burnett
- Corentin Delcourt
- Cosmin Hutanu
- Cedric Mouleyre
@@ -104,6 +106,7 @@ GitHub contributors:
- Emilien Puget
- emilien-puget
- emily-d
+- Eolia
- Eric Le Lay
- Eric Rouvier
- erickturcios
@@ -139,6 +142,7 @@ GitHub contributors:
- Gytis SkÄ—ma
- Ha!*!*y
- ha99y
+- hadjedjvincent
- harelguy
- hiousi
- htrex
@@ -176,11 +180,13 @@ GitHub contributors:
- Julien Deniau
- Julien Martin
- julienbourdeau
+- julvernois
- Jachym Tousek
- Kamil Szymański
- Kelly Karnetsky
- kermes
- Kevin Granger
+- Kijam Lopez
- kiropowered
- kpodemski
- Krystian Podemski
@@ -202,6 +208,7 @@ GitHub contributors:
- Madman
- Mainmich
- makk1ntosh
+- manuelbcd
- marcinsz101
- Marco Cervellin
- Marcos
@@ -243,7 +250,9 @@ GitHub contributors:
- nturato
- oleacorner
- Otto Nascarella
+- Pan P
- Pan P.
+- Pan Ploenes
- Panagiotis Tigas
- panesarsandeep
- Patanock
@@ -259,6 +268,7 @@ GitHub contributors:
- Pierre
- Piotr Kaczor
- Piotr Moćko
+- Presta Module
- PrestaEdit
- PrestaLab
- prestamodule
@@ -273,6 +283,7 @@ GitHub contributors:
- quadrateam
- Quentin Leonetti
- Quentin Montant
+- Quentin MONTANT - KIWIK
- Quetzacoalt91
- Racochejl
- Rafael Cunha
View
64 Core/Business/CMS/Core_Business_CMS_CMSRepository.php
@@ -26,24 +26,24 @@
class Core_Business_CMS_CMSRepository extends Core_Foundation_Database_EntityRepository
{
- /**
- * Return CMSRepository lang associative table name
- * @return string
- */
- private function getLanguageTableNameWithPrefix()
- {
- return $this->getTableNameWithPrefix() . '_lang';
- }
+ /**
+ * Return CMSRepository lang associative table name
+ * @return string
+ */
+ private function getLanguageTableNameWithPrefix()
+ {
+ return $this->getTableNameWithPrefix() . '_lang';
+ }
- /**
- * Return all CMSRepositories depending on $id_lang/$id_shop tuple
- * @param $id_lang
- * @param $id_shop
- * @return array|null
- */
- public function i10nFindAll($id_lang, $id_shop)
- {
- $sql = '
+ /**
+ * Return all CMSRepositories depending on $id_lang/$id_shop tuple
+ * @param $id_lang
+ * @param $id_shop
+ * @return array|null
+ */
+ public function i10nFindAll($id_lang, $id_shop)
+ {
+ $sql = '
SELECT *
FROM `'.$this->getTableNameWithPrefix().'` c
JOIN `'.$this->getPrefix().'cms_lang` cl ON c.`id_cms`= cl.`id_cms`
@@ -52,20 +52,20 @@ public function i10nFindAll($id_lang, $id_shop)
';
- return $this->hydrateMany($this->db->select($sql));
- }
+ return $this->hydrateMany($this->db->select($sql));
+ }
- /**
- * Return all CMSRepositories depending on $id_lang/$id_shop tuple
- * @param $id_cms
- * @param $id_lang
- * @param $id_shop
- * @return CMS|null
- * @throws Core_Foundation_Database_Exception
- */
- public function i10nFindOneById($id_cms, $id_lang, $id_shop)
- {
- $sql = '
+ /**
+ * Return all CMSRepositories depending on $id_lang/$id_shop tuple
+ * @param $id_cms
+ * @param $id_lang
+ * @param $id_shop
+ * @return CMS|null
+ * @throws Core_Foundation_Database_Exception
+ */
+ public function i10nFindOneById($id_cms, $id_lang, $id_shop)
+ {
+ $sql = '
SELECT *
FROM `'.$this->getTableNameWithPrefix().'` c
JOIN `'.$this->getPrefix().'cms_lang` cl ON c.`id_cms`= cl.`id_cms`
@@ -75,6 +75,6 @@ public function i10nFindOneById($id_cms, $id_lang, $id_shop)
LIMIT 0 , 1
';
- return $this->hydrateOne($this->db->select($sql));
- }
+ return $this->hydrateOne($this->db->select($sql));
+ }
}
View
22 Core/Business/CMS/Core_Business_CMS_CMSRoleRepository.php
@@ -26,19 +26,17 @@
class Core_Business_CMS_CMSRoleRepository extends Core_Foundation_Database_EntityRepository
{
- /**
- * Return all CMSRoles which are already associated
- * @return array|null
- */
- public function getCMSRolesAssociated()
- {
- $sql = '
+ /**
+ * Return all CMSRoles which are already associated
+ * @return array|null
+ */
+ public function getCMSRolesAssociated()
+ {
+ $sql = '
SELECT *
FROM `'.$this->getTableNameWithPrefix().'`
WHERE `id_cms` != 0';
- return $this->hydrateMany($this->db->select($sql));
- }
-
-
-}
+ return $this->hydrateMany($this->db->select($sql));
+ }
+}
View
12 Core/Business/Core_Business_ContainerBuilder.php
@@ -26,12 +26,12 @@
class Core_Business_ContainerBuilder
{
- /**
- * Construct PrestaShop Core Service container
- * @return Core_Foundation_IoC_Container
- * @throws Core_Foundation_IoC_Exception
- */
- public function build()
+ /**
+ * Construct PrestaShop Core Service container
+ * @return Core_Foundation_IoC_Container
+ * @throws Core_Foundation_IoC_Exception
+ */
+ public function build()
{
$container = new Core_Foundation_IoC_Container;
View
103 Core/Business/Email/Core_Business_Email_EmailLister.php
@@ -26,67 +26,66 @@
class Core_Business_Email_EmailLister
{
- private $filesystem;
+ private $filesystem;
- public function __construct(Core_Foundation_FileSystem_FileSystem $fs)
- {
- // Register dependencies
- $this->filesystem = $fs;
- }
+ public function __construct(Core_Foundation_FileSystem_FileSystem $fs)
+ {
+ // Register dependencies
+ $this->filesystem = $fs;
+ }
- /**
- * Return the list of available mails
- * @param null $lang
- * @param null $dir
- * @return array|null
- */
- public function getAvailableMails($dir)
- {
- if (!is_dir($dir)) {
- return null;
- }
+ /**
+ * Return the list of available mails
+ * @param null $lang
+ * @param null $dir
+ * @return array|null
+ */
+ public function getAvailableMails($dir)
+ {
+ if (!is_dir($dir)) {
+ return null;
+ }
- $mail_directory = $this->filesystem->listEntriesRecursively($dir);
- $mail_list = array();
+ $mail_directory = $this->filesystem->listEntriesRecursively($dir);
+ $mail_list = array();
- // Remove unwanted .html / .txt / .tpl / .php / . / ..
- foreach ($mail_directory as $mail) {
+ // Remove unwanted .html / .txt / .tpl / .php / . / ..
+ foreach ($mail_directory as $mail) {
+ if (strpos($mail->getFilename(), '.') !== false) {
+ $tmp = explode('.', $mail->getFilename());
- if (strpos($mail->getFilename(), '.') !== false) {
- $tmp = explode('.', $mail->getFilename());
+ // Check for filename existence (left part) and if extension is html (right part)
+ if (($tmp === false || !isset($tmp[0])) || (isset($tmp[1]) && $tmp[1] !== 'html')) {
+ continue;
+ }
- // Check for filename existence (left part) and if extension is html (right part)
- if ( ($tmp === false || !isset($tmp[0])) || (isset($tmp[1]) && $tmp[1] !== 'html')) {
- continue;
- }
+ $mail_name_no_ext = $tmp[0];
+ if (!in_array($mail_name_no_ext, $mail_list)) {
+ $mail_list[] = $mail_name_no_ext;
+ }
+ }
+ }
- $mail_name_no_ext = $tmp[0];
- if (!in_array($mail_name_no_ext, $mail_list)) {
- $mail_list[] = $mail_name_no_ext;
- }
- }
- }
+ return $mail_list;
+ }
- return $mail_list;
- }
+ /**
+ * Give in input getAvailableMails(), will output a human readable and proper string name
+ * @return string
+ */
+ public function getCleanedMailName($mail_name)
+ {
+ if (strpos($mail_name, '.') !== false) {
+ $tmp = explode('.', $mail_name);
- /**
- * Give in input getAvailableMails(), will output a human readable and proper string name
- * @return string
- */
- public function getCleanedMailName($mail_name)
- {
- if (strpos($mail_name, '.') !== false) {
- $tmp = explode('.', $mail_name);
+ if ($tmp === false || !isset($tmp[0])) {
+ return $mail_name;
+ }
- if ($tmp === false || !isset($tmp[0])) {
- return $mail_name;
- }
+ $mail_name = $tmp[0];
+ }
- $mail_name = $tmp[0];
- }
-
- return ucfirst(str_replace(array('_', '-'), ' ', $mail_name));
- }
-}
+ return ucfirst(str_replace(array('_', '-'), ' ', $mail_name));
+ }
+}
View
370 Core/Business/Payment/Core_Business_Payment_PaymentOption.php
@@ -26,189 +26,189 @@
class Core_Business_Payment_PaymentOption
{
- private $callToActionText;
- private $logo;
- private $action;
- private $method;
- private $inputs;
- private $form;
- private $moduleName;
-
- /**
- * Return Call to Action Text
- * @return string
- */
- public function getCallToActionText()
- {
- return $this->callToActionText;
- }
-
- /**
- * Set Call To Action Text
- * @param $callToActionText
- * @return $this
- */
- public function setCallToActionText($callToActionText)
- {
- $this->callToActionText = $callToActionText;
- return $this;
- }
-
- /**
- * Return logo path
- * @return string
- */
- public function getLogo()
- {
- return $this->logo;
- }
-
- /**
- * Set logo path
- * @param $logo
- * @return $this
- */
- public function setLogo($logo)
- {
- $this->logo = $logo;
- return $this;
- }
-
- /**
- * Return action to perform (POST/GET)
- * @return string
- */
- public function getAction()
- {
- return $this->action;
- }
-
-
- /**
- * Set action to be performed by this option
- * @param $action
- * @return $this
- */
- public function setAction($action)
- {
- $this->action = $action;
- return $this;
- }
-
- public function getMethod()
- {
- return $this->method;
- }
-
- public function setMethod($method)
- {
- $this->method = $method;
- return $this;
- }
-
- /**
- * Return inputs contained in this payment option
- * @return mixed
- */
- public function getInputs()
- {
- return $this->inputs;
- }
-
- /**
- * Set inputs for this payment option
- * @param $inputs
- * @return $this
- */
- public function setInputs($inputs)
- {
- $this->inputs = $inputs;
- return $this;
- }
-
- /**
- * Get payment option form
- * @return mixed
- */
- public function getForm()
- {
- return $this->form;
- }
-
- /**
- * Set payment option form
- * @param $form
- * @return $this
- */
- public function setForm($form)
- {
- $this->form = $form;
- return $this;
- }
-
- /**
- * Get related module name to this payment option
- * @return string
- */
- public function getModuleName()
- {
- return $this->moduleName;
- }
-
- /**
- * Set related module name to this payment option
- * @param $moduleName
- * @return $this
- */
- public function setModuleName($moduleName)
- {
- $this->moduleName = $moduleName;
- return $this;
- }
-
- /**
- * Legacy options were specified this way:
- * - either an array with a top level property 'cta_text'
- * and then the other properties
- * - or a numerically indexed array or arrays as described above
- * Since this was a mess, this method is provided to convert them.
- * It takes as input a legacy option (in either form) and always
- * returns an array of instances of Core_Business_Payment_PaymentOption
- */
- public static function convertLegacyOption(array $legacyOption)
- {
- if (!$legacyOption)
- return;
-
- if (array_key_exists('cta_text', $legacyOption)) {
- $legacyOption = array($legacyOption);
- }
-
- $newOptions = array();
-
- $defaults = array(
- 'action' => null,
- 'form' => null,
- 'method' => null,
- 'inputs' => array(),
- 'logo' => null
- );
-
- foreach ($legacyOption as $option) {
-
- $option = array_merge($defaults, $option);
-
- $newOption = new Core_Business_Payment_PaymentOption();
- $newOption->setCallToActionText($option['cta_text'])
- ->setAction($option['action'])
- ->setForm($option['form'])
- ->setInputs($option['inputs'])
- ->setLogo($option['logo'])
- ->setMethod($option['method']);
-
- $newOptions[] = $newOption;
- }
-
- return $newOptions;
- }
+ private $callToActionText;
+ private $logo;
+ private $action;
+ private $method;
+ private $inputs;
+ private $form;
+ private $moduleName;
+
+ /**
+ * Return Call to Action Text
+ * @return string
+ */
+ public function getCallToActionText()
+ {
+ return $this->callToActionText;
+ }
+
+ /**
+ * Set Call To Action Text
+ * @param $callToActionText
+ * @return $this
+ */
+ public function setCallToActionText($callToActionText)
+ {
+ $this->callToActionText = $callToActionText;
+ return $this;
+ }
+
+ /**
+ * Return logo path
+ * @return string
+ */
+ public function getLogo()
+ {
+ return $this->logo;
+ }
+
+ /**
+ * Set logo path
+ * @param $logo
+ * @return $this
+ */
+ public function setLogo($logo)
+ {
+ $this->logo = $logo;
+ return $this;
+ }
+
+ /**
+ * Return action to perform (POST/GET)
+ * @return string
+ */
+ public function getAction()
+ {
+ return $this->action;
+ }
+
+
+ /**
+ * Set action to be performed by this option
+ * @param $action
+ * @return $this
+ */
+ public function setAction($action)
+ {
+ $this->action = $action;
+ return $this;
+ }
+
+ public function getMethod()
+ {
+ return $this->method;
+ }
+
+ public function setMethod($method)
+ {
+ $this->method = $method;
+ return $this;
+ }
+
+ /**
+ * Return inputs contained in this payment option
+ * @return mixed
+ */
+ public function getInputs()
+ {
+ return $this->inputs;
+ }
+
+ /**
+ * Set inputs for this payment option
+ * @param $inputs
+ * @return $this
+ */
+ public function setInputs($inputs)
+ {
+ $this->inputs = $inputs;
+ return $this;
+ }
+
+ /**
+ * Get payment option form
+ * @return mixed
+ */
+ public function getForm()
+ {
+ return $this->form;
+ }
+
+ /**
+ * Set payment option form
+ * @param $form
+ * @return $this
+ */
+ public function setForm($form)
+ {
+ $this->form = $form;
+ return $this;
+ }
+
+ /**
+ * Get related module name to this payment option
+ * @return string
+ */
+ public function getModuleName()
+ {
+ return $this->moduleName;
+ }
+
+ /**
+ * Set related module name to this payment option
+ * @param $moduleName
+ * @return $this
+ */
+ public function setModuleName($moduleName)
+ {
+ $this->moduleName = $moduleName;
+ return $this;
+ }
+
+ /**
+ * Legacy options were specified this way:
+ * - either an array with a top level property 'cta_text'
+ * and then the other properties
+ * - or a numerically indexed array or arrays as described above
+ * Since this was a mess, this method is provided to convert them.
+ * It takes as input a legacy option (in either form) and always
+ * returns an array of instances of Core_Business_Payment_PaymentOption
+ */
+ public static function convertLegacyOption(array $legacyOption)
+ {
+ if (!$legacyOption) {
+ return;
+ }
+
+ if (array_key_exists('cta_text', $legacyOption)) {
+ $legacyOption = array($legacyOption);
+ }
+
+ $newOptions = array();
+
+ $defaults = array(
+ 'action' => null,
+ 'form' => null,
+ 'method' => null,
+ 'inputs' => array(),
+ 'logo' => null
+ );
+
+ foreach ($legacyOption as $option) {
+ $option = array_merge($defaults, $option);
+
+ $newOption = new Core_Business_Payment_PaymentOption();
+ $newOption->setCallToActionText($option['cta_text'])
+ ->setAction($option['action'])
+ ->setForm($option['form'])
+ ->setInputs($option['inputs'])
+ ->setLogo($option['logo'])
+ ->setMethod($option['method']);
+
+ $newOptions[] = $newOption;
+ }
+
+ return $newOptions;
+ }
}
View
150 Core/Business/Stock/Core_Business_Stock_StockManager.php
@@ -0,0 +1,150 @@
+<?php
+/**
+ * 2007-2015 PrestaShop
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@prestashop.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
+ * versions in the future. If you wish to customize PrestaShop for your
+ * needs please refer to http://www.prestashop.com for more information.
+ *
+ * @author PrestaShop SA <contact@prestashop.com>
+ * @copyright 2007-2015 PrestaShop SA
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+
+class Core_Business_Stock_StockManager
+{
+ /**
+ * This will update a Pack quantity and will decrease the quantity of containing Products if needed.
+ *
+ * @param Product $product A product pack object to update its quantity
+ * @param StockAvailable $stock_available the stock of the product to fix with correct quantity
+ * @param integer $delta_quantity The movement of the stock (negative for a decrease)
+ * @param integer|null $id_shop Opional shop ID
+ */
+ public function updatePackQuantity($product, $stock_available, $delta_quantity, $id_shop = null)
+ {
+ $configuration = Adapter_ServiceLocator::get('Core_Business_ConfigurationInterface');
+ if ($product->pack_stock_type == 1 || $product->pack_stock_type == 2 || ($product->pack_stock_type == 3 && $configuration->get('PS_PACK_STOCK_TYPE') > 0)) {
+ $packItemsManager = Adapter_ServiceLocator::get('Adapter_PackItemsManager');
+ $products_pack = $packItemsManager->getPackItems($product);
+ $stockAvailable = new Core_Business_Stock_StockManager();
+ $stockManager = Adapter_ServiceLocator::get('Adapter_StockManager');
+ $cacheManager = Adapter_ServiceLocator::get('Adapter_CacheManager');
+ foreach ($products_pack as $product_pack) {
+ $productStockAvailable = $stockManager->getStockAvailableByProduct($product_pack, $product_pack->id_pack_product_attribute, $id_shop);
+ $productStockAvailable->quantity = $productStockAvailable->quantity + ($delta_quantity * $product_pack->pack_quantity);
+ $productStockAvailable->update();
+
+ $cacheManager->clean('StockAvailable::getQuantityAvailableByProduct_'.(int)$product_pack->id.'*');
+ }
+ }
+
+ $stock_available->quantity = $stock_available->quantity + $delta_quantity;
+
+ if ($product->pack_stock_type == 0 || $product->pack_stock_type == 2 ||
+ ($product->pack_stock_type == 3 && ($configuration->get('PS_PACK_STOCK_TYPE') == 0 || $configuration->get('PS_PACK_STOCK_TYPE') == 2))) {
+ $stock_available->update();
+ }
+ }
+
+ /**
+ * This will decrease (if needed) Packs containing this product
+ * (with the right declinaison) if there is not enough product in stocks.
+ *
+ * @param Product $product A product object to update its quantity
+ * @param integer $id_product_attribute The product attribute to update
+ * @param StockAvailable $stock_available the stock of the product to fix with correct quantity
+ * @param integer|null $id_shop Opional shop ID
+ */
+ public function updatePacksQuantityContainingProduct($product, $id_product_attribute, $stock_available, $id_shop = null)
+ {
+ $configuration = Adapter_ServiceLocator::get('Core_Business_ConfigurationInterface');
+ $packItemsManager = Adapter_ServiceLocator::get('Adapter_PackItemsManager');
+ $stockManager = Adapter_ServiceLocator::get('Adapter_StockManager');
+ $cacheManager = Adapter_ServiceLocator::get('Adapter_CacheManager');
+ $packs = $packItemsManager->getPacksContainingItem($product, $id_product_attribute);
+ foreach($packs as $pack) {
+ // Decrease stocks of the pack only if pack is in linked stock mode (option called 'Decrement both')
+ if (!((int)$pack->pack_stock_type == 2) &&
+ !((int)$pack->pack_stock_type == 3 && $configuration->get('PS_PACK_STOCK_TYPE') == 2)
+ ) {
+ continue;
+ }
+
+ // Decrease stocks of the pack only if there is not enough items to constituate the actual pack stocks.
+
+ // How many packs can be constituated with the remaining product stocks
+ $quantity_by_pack = $pack->pack_item_quantity;
+ $max_pack_quantity = max(array(0, floor($stock_available->quantity / $quantity_by_pack)));
+
+ $stock_available_pack = $stockManager->getStockAvailableByProduct($pack, null, $id_shop);
+ if ($stock_available_pack->quantity > $max_pack_quantity) {
+ $stock_available_pack->quantity = $max_pack_quantity;
+ $stock_available_pack->update();
+
+ $cacheManager->clean('StockAvailable::getQuantityAvailableByProduct_'.(int)$pack->id.'*');
+ }
+ }
+ }
+
+ /**
+ * Will update Product available stock int he given declinaison. If product is a Pack, could decrease the sub products.
+ * If Product is contained in a Pack, Pack could be decreased or not (only if sub product stocks become not sufficient).
+ *
+ * @param Product $product The product to update its stockAvailable
+ * @param integer $id_product_attribute The declinaison to update (null if not)
+ * @param integer $delta_quantity The quantity change (positive or negative)
+ * @param integer|null $id_shop Optional
+ */
+ public function updateQuantity($product, $id_product_attribute, $delta_quantity, $id_shop = null)
+ {
+ $stockManager = Adapter_ServiceLocator::get('Adapter_StockManager');
+ $stockAvailable = $stockManager->getStockAvailableByProduct($product, $id_product_attribute, $id_shop);
+ $packItemsManager = Adapter_ServiceLocator::get('Adapter_PackItemsManager');
+ $cacheManager = Adapter_ServiceLocator::get('Adapter_CacheManager');
+ $hookManager = Adapter_ServiceLocator::get('Adapter_HookManager');
+
+ // Update quantity of the pack products
+ if ($packItemsManager->isPack($product)) {
+ // The product is a pack
+ $this->updatePackQuantity($product, $stockAvailable, $delta_quantity, $id_shop);
+ } else {
+ // The product is not a pack
+ $stockAvailable->quantity = $stockAvailable->quantity + $delta_quantity;
+ $stockAvailable->update();
+
+ // Decrease case only: the stock of linked packs should be decreased too.
+ if ($delta_quantity < 0) {
+ // The product is not a pack, but the product combination is part of a pack (use of isPacked, not isPack)
+ if ($packItemsManager->isPacked($product, $id_product_attribute)) {
+ $this->updatePacksQuantityContainingProduct($product, $id_product_attribute, $stockAvailable, $id_shop);
+ }
+ }
+ }
+
+ $cacheManager->clean('StockAvailable::getQuantityAvailableByProduct_'.(int)$product->id.'*');
+
+ $hookManager->exec('actionUpdateQuantity',
+ array(
+ 'id_product' => $product->id,
+ 'id_product_attribute' => $id_product_attribute,
+ 'quantity' => $stockAvailable->quantity
+ )
+ );
+ }
+
+
+}
View
20 Core/Foundation/Database/Core_Foundation_Database_EntityInterface.php
@@ -26,17 +26,17 @@
interface Core_Foundation_Database_EntityInterface
{
- /**
- * Returns the name of the repository class for this entity.
- * If unspecified, a generic repository will be used for the entity.
- *
- * @return string or falsey value
- */
- public static function getRepositoryClassName();
+ /**
+ * Returns the name of the repository class for this entity.
+ * If unspecified, a generic repository will be used for the entity.
+ *
+ * @return string or falsey value
+ */
+ public static function getRepositoryClassName();
- public function save();
+ public function save();
- public function delete();
+ public function delete();
- public function hydrate(array $keyValueData);
+ public function hydrate(array $keyValueData);
}
View
131 Core/Foundation/Database/Core_Foundation_Database_EntityManager.php
@@ -26,90 +26,89 @@
class Core_Foundation_Database_EntityManager
{
- private $db;
- private $configuration;
+ private $db;
+ private $configuration;
- private $entityMetaData = array();
+ private $entityMetaData = array();
- public function __construct(
+ public function __construct(
Core_Foundation_Database_DatabaseInterface $db,
Core_Business_ConfigurationInterface $configuration
- )
- {
- $this->db = $db;
- $this->configuration = $configuration;
+ ) {
+ $this->db = $db;
+ $this->configuration = $configuration;
}
- /**
- * Return current database object used
- * @return Core_Foundation_Database_DatabaseInterface
- */
- public function getDatabase()
- {
- return $this->db;
- }
+ /**
+ * Return current database object used
+ * @return Core_Foundation_Database_DatabaseInterface
+ */
+ public function getDatabase()
+ {
+ return $this->db;
+ }
- /**
- * Return current repository used
- * @param $className
- * @return mixed
- */
- public function getRepository($className)
- {
+ /**
+ * Return current repository used
+ * @param $className
+ * @return mixed
+ */
+ public function getRepository($className)
+ {
if (is_callable(array($className, 'getRepositoryClassName'))) {
$repositoryClass = call_user_func(array($className, 'getRepositoryClassName'));
} else {
$repositoryClass = null;
}
- if (!$repositoryClass) {
- $repositoryClass = 'Core_Foundation_Database_EntityRepository';
- }
+ if (!$repositoryClass) {