Mage_Core_Modules - Version 1.8.0.0

Version Notes

1.8.0.0

Download this release

Release Info

Developer Magento Core Team
Extension Mage_Core_Modules
Version 1.8.0.0
Comparing to
See all releases


Code changes from version 1.7.0.2 to 1.8.0.0

Files changed (1016) hide show
  1. .htaccess.sample +1 -2
  2. RELEASE_NOTES.txt +9 -0
  3. app/Mage.php +3 -3
  4. app/code/core/Mage/Admin/Helper/Data.php +1 -1
  5. app/code/core/Mage/Admin/Model/Acl.php +1 -1
  6. app/code/core/Mage/Admin/Model/Acl/Assert/Ip.php +1 -1
  7. app/code/core/Mage/Admin/Model/Acl/Assert/Time.php +1 -1
  8. app/code/core/Mage/Admin/Model/Acl/Resource.php +1 -1
  9. app/code/core/Mage/Admin/Model/Acl/Role.php +1 -1
  10. app/code/core/Mage/Admin/Model/Acl/Role/Generic.php +1 -1
  11. app/code/core/Mage/Admin/Model/Acl/Role/Group.php +1 -1
  12. app/code/core/Mage/Admin/Model/Acl/Role/Registry.php +1 -1
  13. app/code/core/Mage/Admin/Model/Acl/Role/User.php +1 -1
  14. app/code/core/Mage/Admin/Model/Config.php +1 -1
  15. app/code/core/Mage/Admin/Model/Mysql4/Acl.php +1 -1
  16. app/code/core/Mage/Admin/Model/Mysql4/Acl/Role.php +1 -1
  17. app/code/core/Mage/Admin/Model/Mysql4/Acl/Role/Collection.php +1 -1
  18. app/code/core/Mage/Admin/Model/Mysql4/Permissions/Collection.php +1 -1
  19. app/code/core/Mage/Admin/Model/Mysql4/Role.php +1 -1
  20. app/code/core/Mage/Admin/Model/Mysql4/Role/Collection.php +1 -1
  21. app/code/core/Mage/Admin/Model/Mysql4/Roles.php +1 -1
  22. app/code/core/Mage/Admin/Model/Mysql4/Roles/Collection.php +1 -1
  23. app/code/core/Mage/Admin/Model/Mysql4/Roles/User/Collection.php +1 -1
  24. app/code/core/Mage/Admin/Model/Mysql4/Rules.php +1 -1
  25. app/code/core/Mage/Admin/Model/Mysql4/Rules/Collection.php +1 -1
  26. app/code/core/Mage/Admin/Model/Mysql4/User.php +1 -1
  27. app/code/core/Mage/Admin/Model/Mysql4/User/Collection.php +1 -1
  28. app/code/core/Mage/Admin/Model/Observer.php +1 -1
  29. app/code/core/Mage/Admin/Model/Resource/Acl.php +1 -1
  30. app/code/core/Mage/Admin/Model/Resource/Acl/Role.php +1 -1
  31. app/code/core/Mage/Admin/Model/Resource/Acl/Role/Collection.php +1 -1
  32. app/code/core/Mage/Admin/Model/Resource/Permissions/Collection.php +1 -1
  33. app/code/core/Mage/Admin/Model/Resource/Role.php +1 -1
  34. app/code/core/Mage/Admin/Model/Resource/Role/Collection.php +1 -1
  35. app/code/core/Mage/Admin/Model/Resource/Roles.php +1 -1
  36. app/code/core/Mage/Admin/Model/Resource/Roles/Collection.php +1 -1
  37. app/code/core/Mage/Admin/Model/Resource/Roles/User/Collection.php +1 -1
  38. app/code/core/Mage/Admin/Model/Resource/Rules.php +1 -1
  39. app/code/core/Mage/Admin/Model/Resource/Rules/Collection.php +1 -1
  40. app/code/core/Mage/Admin/Model/Resource/User.php +6 -7
  41. app/code/core/Mage/Admin/Model/Resource/User/Collection.php +1 -1
  42. app/code/core/Mage/Admin/Model/Role.php +1 -1
  43. app/code/core/Mage/Admin/Model/Roles.php +1 -1
  44. app/code/core/Mage/Admin/Model/Rules.php +1 -1
  45. app/code/core/Mage/Admin/Model/Session.php +1 -1
  46. app/code/core/Mage/Admin/Model/User.php +22 -6
  47. app/code/core/Mage/Admin/data/admin_setup/data-install-1.6.0.0.php +1 -1
  48. app/code/core/Mage/Admin/etc/config.xml +2 -2
  49. app/code/core/Mage/Admin/sql/admin_setup/install-1.6.0.0.php +1 -1
  50. app/code/core/Mage/Admin/sql/admin_setup/mysql4-install-0.7.0.php +1 -1
  51. app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-0.7.0-0.7.1.php +1 -1
  52. app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-0.7.1-0.7.2.php +1 -1
  53. app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +1 -1
  54. app/code/core/Mage/Admin/sql/admin_setup/upgrade-1.6.0.0-1.6.1.0.php +1 -1
  55. app/code/core/Mage/Admin/sql/admin_setup/upgrade-1.6.1.0-1.6.1.1.php +38 -0
  56. app/code/core/Mage/AdminNotification/Helper/Data.php +1 -1
  57. app/code/core/Mage/AdminNotification/Model/Feed.php +1 -1
  58. app/code/core/Mage/AdminNotification/Model/Inbox.php +1 -1
  59. app/code/core/Mage/AdminNotification/Model/Mysql4/Inbox.php +1 -1
  60. app/code/core/Mage/AdminNotification/Model/Mysql4/Inbox/Collection.php +1 -1
  61. app/code/core/Mage/AdminNotification/Model/Observer.php +1 -1
  62. app/code/core/Mage/AdminNotification/Model/Resource/Inbox.php +1 -1
  63. app/code/core/Mage/AdminNotification/Model/Resource/Inbox/Collection.php +1 -1
  64. app/code/core/Mage/AdminNotification/Model/Survey.php +1 -1
  65. app/code/core/Mage/AdminNotification/etc/adminhtml.xml +1 -1
  66. app/code/core/Mage/AdminNotification/etc/config.xml +1 -1
  67. app/code/core/Mage/AdminNotification/etc/system.xml +1 -1
  68. app/code/core/Mage/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php +1 -1
  69. app/code/core/Mage/AdminNotification/sql/adminnotification_setup/mysql4-install-1.0.0.php +1 -1
  70. app/code/core/Mage/AdminNotification/sql/adminnotification_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +1 -1
  71. app/code/core/Mage/Api/Controller/Action.php +1 -1
  72. app/code/core/Mage/Api/Exception.php +1 -1
  73. app/code/core/Mage/Api/Helper/Data.php +45 -34
  74. app/code/core/Mage/Api/Model/Acl.php +1 -1
  75. app/code/core/Mage/Api/Model/Acl/Assert/Ip.php +1 -1
  76. app/code/core/Mage/Api/Model/Acl/Assert/Time.php +1 -1
  77. app/code/core/Mage/Api/Model/Acl/Resource.php +1 -1
  78. app/code/core/Mage/Api/Model/Acl/Role.php +1 -1
  79. app/code/core/Mage/Api/Model/Acl/Role/Generic.php +1 -1
  80. app/code/core/Mage/Api/Model/Acl/Role/Group.php +1 -1
  81. app/code/core/Mage/Api/Model/Acl/Role/Registry.php +1 -1
  82. app/code/core/Mage/Api/Model/Acl/Role/User.php +1 -1
  83. app/code/core/Mage/Api/Model/Config.php +1 -1
  84. app/code/core/Mage/Api/Model/Mysql4/Acl.php +1 -1
  85. app/code/core/Mage/Api/Model/Mysql4/Acl/Role.php +1 -1
  86. app/code/core/Mage/Api/Model/Mysql4/Acl/Role/Collection.php +1 -1
  87. app/code/core/Mage/Api/Model/Mysql4/Permissions/Collection.php +1 -1
  88. app/code/core/Mage/Api/Model/Mysql4/Role.php +1 -1
  89. app/code/core/Mage/Api/Model/Mysql4/Role/Collection.php +1 -1
  90. app/code/core/Mage/Api/Model/Mysql4/Roles.php +1 -1
  91. app/code/core/Mage/Api/Model/Mysql4/Roles/Collection.php +1 -1
  92. app/code/core/Mage/Api/Model/Mysql4/Roles/User/Collection.php +1 -1
  93. app/code/core/Mage/Api/Model/Mysql4/Rules.php +1 -1
  94. app/code/core/Mage/Api/Model/Mysql4/Rules/Collection.php +1 -1
  95. app/code/core/Mage/Api/Model/Mysql4/User.php +1 -1
  96. app/code/core/Mage/Api/Model/Mysql4/User/Collection.php +1 -1
  97. app/code/core/Mage/Api/Model/Resource/Abstract.php +1 -1
  98. app/code/core/Mage/Api/Model/Resource/Acl.php +1 -1
  99. app/code/core/Mage/Api/Model/Resource/Acl/Role.php +1 -1
  100. app/code/core/Mage/Api/Model/Resource/Acl/Role/Collection.php +1 -1
  101. app/code/core/Mage/Api/Model/Resource/Permissions/Collection.php +1 -1
  102. app/code/core/Mage/Api/Model/Resource/Role.php +1 -1
  103. app/code/core/Mage/Api/Model/Resource/Role/Collection.php +1 -1
  104. app/code/core/Mage/Api/Model/Resource/Roles.php +1 -1
  105. app/code/core/Mage/Api/Model/Resource/Roles/Collection.php +1 -1
  106. app/code/core/Mage/Api/Model/Resource/Roles/User/Collection.php +1 -1
  107. app/code/core/Mage/Api/Model/Resource/Rules.php +1 -1
  108. app/code/core/Mage/Api/Model/Resource/Rules/Collection.php +1 -1
  109. app/code/core/Mage/Api/Model/Resource/User.php +1 -1
  110. app/code/core/Mage/Api/Model/Resource/User/Collection.php +1 -1
  111. app/code/core/Mage/Api/Model/Role.php +1 -1
  112. app/code/core/Mage/Api/Model/Roles.php +1 -1
  113. app/code/core/Mage/Api/Model/Rules.php +1 -1
  114. app/code/core/Mage/Api/Model/Server.php +1 -1
  115. app/code/core/Mage/Api/Model/Server/Adapter/Interface.php +1 -1
  116. app/code/core/Mage/Api/Model/Server/Adapter/Soap.php +1 -1
  117. app/code/core/Mage/Api/Model/Server/Adapter/Xmlrpc.php +1 -1
  118. app/code/core/Mage/Api/Model/Server/Handler.php +1 -1
  119. app/code/core/Mage/Api/Model/Server/Handler/Abstract.php +3 -3
  120. app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php +13 -9
  121. app/code/core/Mage/Api/Model/Server/V2/Handler.php +1 -1
  122. app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php +25 -20
  123. app/code/core/Mage/Api/Model/Server/Wsi/Handler.php +13 -1
  124. app/code/core/Mage/Api/Model/Session.php +1 -1
  125. app/code/core/Mage/Api/Model/User.php +111 -7
  126. app/code/core/Mage/Api/Model/Wsdl/Config.php +1 -1
  127. app/code/core/Mage/Api/Model/Wsdl/Config/Base.php +1 -1
  128. app/code/core/Mage/Api/Model/Wsdl/Config/Element.php +1 -1
  129. app/code/core/Mage/Api/controllers/IndexController.php +1 -1
  130. app/code/core/Mage/Api/controllers/SoapController.php +1 -1
  131. app/code/core/Mage/Api/controllers/V2/SoapController.php +1 -1
  132. app/code/core/Mage/Api/controllers/XmlrpcController.php +1 -1
  133. app/code/core/Mage/Api/etc/adminhtml.xml +1 -1
  134. app/code/core/Mage/Api/etc/api.xml +1 -1
  135. app/code/core/Mage/Api/etc/config.xml +2 -2
  136. app/code/core/Mage/Api/etc/system.xml +1 -1
  137. app/code/core/Mage/Api/sql/api_setup/install-1.6.0.0.php +1 -1
  138. app/code/core/Mage/Api/sql/api_setup/mysql4-install-0.7.0.php +1 -1
  139. app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.7.0-0.7.1.php +1 -1
  140. app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.8.0-0.8.1.php +1 -1
  141. app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +1 -1
  142. app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-1.6.0.0-1.6.0.1.php +41 -0
  143. app/code/core/Mage/Api2/Block/Adminhtml/Attribute.php +1 -1
  144. app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Buttons.php +1 -1
  145. app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Edit.php +1 -1
  146. app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Edit/Form.php +1 -1
  147. app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Grid.php +1 -1
  148. app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Tab/Resource.php +1 -1
  149. app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Tabs.php +1 -1
  150. app/code/core/Mage/Api2/Block/Adminhtml/Permissions/User/Edit/Tab/Roles.php +1 -1
  151. app/code/core/Mage/Api2/Block/Adminhtml/Roles.php +1 -1
  152. app/code/core/Mage/Api2/Block/Adminhtml/Roles/Buttons.php +1 -1
  153. app/code/core/Mage/Api2/Block/Adminhtml/Roles/Grid.php +1 -1
  154. app/code/core/Mage/Api2/Block/Adminhtml/Roles/Tab/Info.php +2 -5
  155. app/code/core/Mage/Api2/Block/Adminhtml/Roles/Tab/Resources.php +1 -1
  156. app/code/core/Mage/Api2/Block/Adminhtml/Roles/Tab/Users.php +1 -1
  157. app/code/core/Mage/Api2/Block/Adminhtml/Roles/Tabs.php +1 -1
  158. app/code/core/Mage/Api2/Exception.php +1 -1
  159. app/code/core/Mage/Api2/Helper/Data.php +1 -1
  160. app/code/core/Mage/Api2/Model/Acl.php +1 -1
  161. app/code/core/Mage/Api2/Model/Acl/Filter.php +1 -1
  162. app/code/core/Mage/Api2/Model/Acl/Filter/Attribute.php +1 -1
  163. app/code/core/Mage/Api2/Model/Acl/Filter/Attribute/Operation.php +1 -1
  164. app/code/core/Mage/Api2/Model/Acl/Filter/Attribute/ResourcePermission.php +1 -1
  165. app/code/core/Mage/Api2/Model/Acl/Global.php +1 -1
  166. app/code/core/Mage/Api2/Model/Acl/Global/Role.php +3 -5
  167. app/code/core/Mage/Api2/Model/Acl/Global/Rule.php +1 -1
  168. app/code/core/Mage/Api2/Model/Acl/Global/Rule/Permission.php +1 -1
  169. app/code/core/Mage/Api2/Model/Acl/Global/Rule/Privilege.php +1 -1
  170. app/code/core/Mage/Api2/Model/Acl/Global/Rule/ResourcePermission.php +1 -1
  171. app/code/core/Mage/Api2/Model/Acl/Global/Rule/Tree.php +1 -1
  172. app/code/core/Mage/Api2/Model/Acl/PermissionInterface.php +1 -1
  173. app/code/core/Mage/Api2/Model/Auth.php +1 -1
  174. app/code/core/Mage/Api2/Model/Auth/Adapter.php +1 -1
  175. app/code/core/Mage/Api2/Model/Auth/Adapter/Abstract.php +1 -1
  176. app/code/core/Mage/Api2/Model/Auth/Adapter/Oauth.php +1 -1
  177. app/code/core/Mage/Api2/Model/Auth/User.php +1 -1
  178. app/code/core/Mage/Api2/Model/Auth/User/Abstract.php +1 -1
  179. app/code/core/Mage/Api2/Model/Auth/User/Admin.php +1 -1
  180. app/code/core/Mage/Api2/Model/Auth/User/Customer.php +1 -1
  181. app/code/core/Mage/Api2/Model/Auth/User/Guest.php +1 -1
  182. app/code/core/Mage/Api2/Model/Config.php +1 -1
  183. app/code/core/Mage/Api2/Model/Dispatcher.php +1 -1
  184. app/code/core/Mage/Api2/Model/Multicall.php +1 -1
  185. app/code/core/Mage/Api2/Model/Observer.php +1 -1
  186. app/code/core/Mage/Api2/Model/Renderer.php +1 -1
  187. app/code/core/Mage/Api2/Model/Renderer/Interface.php +1 -1
  188. app/code/core/Mage/Api2/Model/Renderer/Json.php +1 -1
  189. app/code/core/Mage/Api2/Model/Renderer/Query.php +1 -1
  190. app/code/core/Mage/Api2/Model/Renderer/Xml.php +1 -1
  191. app/code/core/Mage/Api2/Model/Renderer/Xml/Writer.php +1 -1
  192. app/code/core/Mage/Api2/Model/Request.php +1 -1
  193. app/code/core/Mage/Api2/Model/Request/Internal.php +1 -1
  194. app/code/core/Mage/Api2/Model/Request/Interpreter.php +1 -1
  195. app/code/core/Mage/Api2/Model/Request/Interpreter/Interface.php +1 -1
  196. app/code/core/Mage/Api2/Model/Request/Interpreter/Json.php +1 -1
  197. app/code/core/Mage/Api2/Model/Request/Interpreter/Query.php +1 -1
  198. app/code/core/Mage/Api2/Model/Request/Interpreter/Xml.php +1 -1
  199. app/code/core/Mage/Api2/Model/Resource.php +1 -1
  200. app/code/core/Mage/Api2/Model/Resource/Acl/Filter/Attribute.php +1 -1
  201. app/code/core/Mage/Api2/Model/Resource/Acl/Filter/Attribute/Collection.php +1 -1
  202. app/code/core/Mage/Api2/Model/Resource/Acl/Global/Role.php +1 -1
  203. app/code/core/Mage/Api2/Model/Resource/Acl/Global/Role/Collection.php +1 -1
  204. app/code/core/Mage/Api2/Model/Resource/Acl/Global/Rule.php +1 -1
  205. app/code/core/Mage/Api2/Model/Resource/Acl/Global/Rule/Collection.php +1 -1
  206. app/code/core/Mage/Api2/Model/Resource/Setup.php +1 -1
  207. app/code/core/Mage/Api2/Model/Resource/Validator.php +1 -1
  208. app/code/core/Mage/Api2/Model/Resource/Validator/Eav.php +3 -4
  209. app/code/core/Mage/Api2/Model/Resource/Validator/Fields.php +1 -1
  210. app/code/core/Mage/Api2/Model/Response.php +1 -1
  211. app/code/core/Mage/Api2/Model/Route/Abstract.php +1 -1
  212. app/code/core/Mage/Api2/Model/Route/ApiType.php +1 -1
  213. app/code/core/Mage/Api2/Model/Route/Interface.php +1 -1
  214. app/code/core/Mage/Api2/Model/Route/Rest.php +1 -1
  215. app/code/core/Mage/Api2/Model/Router.php +1 -1
  216. app/code/core/Mage/Api2/Model/Server.php +1 -1
  217. app/code/core/Mage/Api2/controllers/Adminhtml/Api2/AttributeController.php +1 -1
  218. app/code/core/Mage/Api2/controllers/Adminhtml/Api2/RoleController.php +1 -1
  219. app/code/core/Mage/Api2/etc/adminhtml.xml +1 -1
  220. app/code/core/Mage/Api2/etc/config.xml +1 -1
  221. app/code/core/Mage/Api2/sql/api2_setup/install-1.0.0.0.php +1 -1
  222. app/code/core/Mage/Authorizenet/Block/Directpost/Form.php +1 -1
  223. app/code/core/Mage/Authorizenet/Block/Directpost/Iframe.php +1 -1
  224. app/code/core/Mage/Authorizenet/Helper/Data.php +3 -2
  225. app/code/core/Mage/Authorizenet/Model/Directpost.php +10 -7
  226. app/code/core/Mage/Authorizenet/Model/Directpost/Observer.php +1 -1
  227. app/code/core/Mage/Authorizenet/Model/Directpost/Request.php +1 -1
  228. app/code/core/Mage/Authorizenet/Model/Directpost/Response.php +1 -1
  229. app/code/core/Mage/Authorizenet/Model/Directpost/Session.php +1 -1
  230. app/code/core/Mage/Authorizenet/controllers/Adminhtml/Authorizenet/Directpost/PaymentController.php +1 -1
  231. app/code/core/Mage/Authorizenet/controllers/Directpost/PaymentController.php +1 -1
  232. app/code/core/Mage/Authorizenet/etc/config.xml +1 -1
  233. app/code/core/Mage/Authorizenet/etc/system.xml +1 -1
  234. app/code/core/Mage/Backup/Exception.php +1 -1
  235. app/code/core/Mage/Backup/Helper/Data.php +5 -5
  236. app/code/core/Mage/Backup/Model/Backup.php +1 -1
  237. app/code/core/Mage/Backup/Model/Config/Backend/Cron.php +1 -1
  238. app/code/core/Mage/Backup/Model/Config/Source/Type.php +1 -1
  239. app/code/core/Mage/Backup/Model/Db.php +1 -1
  240. app/code/core/Mage/Backup/Model/Fs/Collection.php +1 -1
  241. app/code/core/Mage/Backup/Model/Mysql4/Db.php +1 -1
  242. app/code/core/Mage/Backup/Model/Observer.php +1 -1
  243. app/code/core/Mage/Backup/Model/Resource/Db.php +1 -1
  244. app/code/core/Mage/Backup/Model/Resource/Helper/Mysql4.php +1 -1
  245. app/code/core/Mage/Backup/etc/adminhtml.xml +1 -1
  246. app/code/core/Mage/Backup/etc/config.xml +1 -1
  247. app/code/core/Mage/Backup/etc/system.xml +1 -1
  248. app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Bundle.php +1 -1
  249. app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php +1 -1
  250. app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php +1 -1
  251. app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php +1 -1
  252. app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php +1 -1
  253. app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php +1 -1
  254. app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php +1 -1
  255. app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Special.php +1 -1
  256. app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php +1 -1
  257. app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php +1 -1
  258. app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search.php +1 -1
  259. app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/Grid.php +1 -1
  260. app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php +1 -1
  261. app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tabs.php +1 -1
  262. app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php +19 -8
  263. app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php +21 -9
  264. app/code/core/Mage/Bundle/Block/Catalog/Product/List/Partof.php +1 -1
  265. app/code/core/Mage/Bundle/Block/Catalog/Product/Price.php +1 -1
  266. app/code/core/Mage/Bundle/Block/Catalog/Product/View.php +21 -9
  267. app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php +10 -4
  268. app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php +6 -1
  269. app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Checkbox.php +1 -1
  270. app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Multi.php +1 -1
  271. app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Radio.php +1 -1
  272. app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Select.php +1 -1
  273. app/code/core/Mage/Bundle/Block/Checkout/Cart/Item/Renderer.php +13 -12
  274. app/code/core/Mage/Bundle/Block/Sales/Order/Items/Renderer.php +20 -9
  275. app/code/core/Mage/Bundle/Helper/Catalog/Product/Configuration.php +29 -23
  276. app/code/core/Mage/Bundle/Helper/Data.php +1 -1
  277. app/code/core/Mage/Bundle/Model/CatalogIndex/Data/Bundle.php +1 -1
  278. app/code/core/Mage/Bundle/Model/Mysql4/Bundle.php +1 -1
  279. app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Price.php +1 -1
  280. app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Stock.php +1 -1
  281. app/code/core/Mage/Bundle/Model/Mysql4/Option.php +1 -1
  282. app/code/core/Mage/Bundle/Model/Mysql4/Option/Collection.php +1 -1
  283. app/code/core/Mage/Bundle/Model/Mysql4/Price/Index.php +1 -1
  284. app/code/core/Mage/Bundle/Model/Mysql4/Selection.php +1 -1
  285. app/code/core/Mage/Bundle/Model/Mysql4/Selection/Collection.php +1 -1
  286. app/code/core/Mage/Bundle/Model/Observer.php +1 -1
  287. app/code/core/Mage/Bundle/Model/Option.php +1 -1
  288. app/code/core/Mage/Bundle/Model/Price/Index.php +1 -1
  289. app/code/core/Mage/Bundle/Model/Product/Attribute/Source/Price/View.php +1 -1
  290. app/code/core/Mage/Bundle/Model/Product/Price.php +227 -117
  291. app/code/core/Mage/Bundle/Model/Product/Type.php +3 -8
  292. app/code/core/Mage/Bundle/Model/Resource/Bundle.php +1 -1
  293. app/code/core/Mage/Bundle/Model/Resource/Indexer/Price.php +13 -13
  294. app/code/core/Mage/Bundle/Model/Resource/Indexer/Stock.php +1 -1
  295. app/code/core/Mage/Bundle/Model/Resource/Option.php +1 -1
  296. app/code/core/Mage/Bundle/Model/Resource/Option/Collection.php +1 -1
  297. app/code/core/Mage/Bundle/Model/Resource/Price/Index.php +1 -1
  298. app/code/core/Mage/Bundle/Model/Resource/Selection.php +1 -1
  299. app/code/core/Mage/Bundle/Model/Resource/Selection/Collection.php +1 -1
  300. app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Abstract.php +1 -1
  301. app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php +1 -1
  302. app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php +1 -1
  303. app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php +1 -1
  304. app/code/core/Mage/Bundle/Model/Selection.php +1 -1
  305. app/code/core/Mage/Bundle/Model/Source/Option/Selection/Price/Type.php +1 -1
  306. app/code/core/Mage/Bundle/Model/Source/Option/Type.php +1 -1
  307. app/code/core/Mage/Bundle/controllers/Adminhtml/Bundle/Product/EditController.php +1 -1
  308. app/code/core/Mage/Bundle/controllers/Adminhtml/Bundle/SelectionController.php +1 -1
  309. app/code/core/Mage/Bundle/controllers/Product/EditController.php +1 -1
  310. app/code/core/Mage/Bundle/controllers/SelectionController.php +1 -1
  311. app/code/core/Mage/Bundle/data/bundle_setup/data-install-1.6.0.0.php +1 -1
  312. app/code/core/Mage/Bundle/etc/config.xml +1 -1
  313. app/code/core/Mage/Bundle/sql/bundle_setup/install-1.6.0.0.php +1 -1
  314. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-data-upgrade-0.1.13-0.1.14.php +1 -1
  315. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-install-0.1.0.php +1 -1
  316. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.0-0.1.1.php +1 -1
  317. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.1-0.1.2.php +1 -1
  318. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.10-0.1.11.php +1 -1
  319. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.11-0.1.12.php +1 -1
  320. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.12-0.1.13.php +1 -1
  321. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.2-0.1.3.php +1 -1
  322. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.3-0.1.4.php +1 -1
  323. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.4-0.1.5.php +1 -1
  324. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.5-0.1.6.php +1 -1
  325. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.6-0.1.7.php +1 -1
  326. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.7-0.1.8.php +1 -1
  327. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.8-0.1.9.php +1 -1
  328. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.9-0.1.10.php +1 -1
  329. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +1 -1
  330. app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-1.6.0.0-1.6.0.0.1.php +1 -1
  331. app/code/core/Mage/Bundle/sql/bundle_setup/upgrade-1.6.0.0-1.6.0.0.1.php +1 -1
  332. app/code/core/Mage/Captcha/Block/Captcha.php +1 -1
  333. app/code/core/Mage/Captcha/Block/Captcha/Zend.php +1 -1
  334. app/code/core/Mage/Captcha/Helper/Data.php +1 -1
  335. app/code/core/Mage/Captcha/Model/Config/Font.php +1 -1
  336. app/code/core/Mage/Captcha/Model/Config/Form/Abstract.php +1 -1
  337. app/code/core/Mage/Captcha/Model/Config/Form/Backend.php +1 -1
  338. app/code/core/Mage/Captcha/Model/Config/Form/Frontend.php +1 -1
  339. app/code/core/Mage/Captcha/Model/Config/Mode.php +1 -1
  340. app/code/core/Mage/Captcha/Model/Interface.php +1 -1
  341. app/code/core/Mage/Captcha/Model/Observer.php +2 -2
  342. app/code/core/Mage/Captcha/Model/Resource/Log.php +1 -1
  343. app/code/core/Mage/Captcha/Model/Zend.php +6 -2
  344. app/code/core/Mage/Captcha/controllers/Adminhtml/RefreshController.php +1 -1
  345. app/code/core/Mage/Captcha/controllers/RefreshController.php +1 -1
  346. app/code/core/Mage/Captcha/etc/config.xml +1 -1
  347. app/code/core/Mage/Captcha/etc/system.xml +1 -1
  348. app/code/core/Mage/Captcha/sql/captcha_setup/install-1.7.0.0.0.php +1 -1
  349. app/code/core/Mage/Catalog/Block/Breadcrumbs.php +1 -1
  350. app/code/core/Mage/Catalog/Block/Category/View.php +17 -2
  351. app/code/core/Mage/Catalog/Block/Category/Widget/Link.php +1 -1
  352. app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php +1 -1
  353. app/code/core/Mage/Catalog/Block/Layer/Filter/Attribute.php +1 -1
  354. app/code/core/Mage/Catalog/Block/Layer/Filter/Category.php +1 -1
  355. app/code/core/Mage/Catalog/Block/Layer/Filter/Decimal.php +1 -1
  356. app/code/core/Mage/Catalog/Block/Layer/Filter/Price.php +1 -1
  357. app/code/core/Mage/Catalog/Block/Layer/State.php +1 -1
  358. app/code/core/Mage/Catalog/Block/Layer/View.php +1 -1
  359. app/code/core/Mage/Catalog/Block/Navigation.php +55 -34
  360. app/code/core/Mage/Catalog/Block/Product.php +1 -1
  361. app/code/core/Mage/Catalog/Block/Product/Abstract.php +95 -24
  362. app/code/core/Mage/Catalog/Block/Product/Compare/Abstract.php +1 -1
  363. app/code/core/Mage/Catalog/Block/Product/Compare/List.php +8 -1
  364. app/code/core/Mage/Catalog/Block/Product/Compare/Sidebar.php +18 -1
  365. app/code/core/Mage/Catalog/Block/Product/Gallery.php +1 -1
  366. app/code/core/Mage/Catalog/Block/Product/List.php +15 -1
  367. app/code/core/Mage/Catalog/Block/Product/List/Crosssell.php +1 -1
  368. app/code/core/Mage/Catalog/Block/Product/List/Promotion.php +1 -1
  369. app/code/core/Mage/Catalog/Block/Product/List/Random.php +1 -1
  370. app/code/core/Mage/Catalog/Block/Product/List/Related.php +11 -1
  371. app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php +1 -1
  372. app/code/core/Mage/Catalog/Block/Product/List/Upsell.php +12 -2
  373. app/code/core/Mage/Catalog/Block/Product/New.php +28 -12
  374. app/code/core/Mage/Catalog/Block/Product/Price.php +25 -2
  375. app/code/core/Mage/Catalog/Block/Product/Price/Template.php +1 -1
  376. app/code/core/Mage/Catalog/Block/Product/Send.php +1 -1
  377. app/code/core/Mage/Catalog/Block/Product/View.php +16 -6
  378. app/code/core/Mage/Catalog/Block/Product/View/Abstract.php +1 -1
  379. app/code/core/Mage/Catalog/Block/Product/View/Additional.php +1 -1
  380. app/code/core/Mage/Catalog/Block/Product/View/Attributes.php +1 -1
  381. app/code/core/Mage/Catalog/Block/Product/View/Description.php +1 -1
  382. app/code/core/Mage/Catalog/Block/Product/View/Media.php +1 -1
  383. app/code/core/Mage/Catalog/Block/Product/View/Options.php +1 -1
  384. app/code/core/Mage/Catalog/Block/Product/View/Options/Abstract.php +1 -1
  385. app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php +1 -1
  386. app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Default.php +1 -1
  387. app/code/core/Mage/Catalog/Block/Product/View/Options/Type/File.php +1 -1
  388. app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php +1 -1
  389. app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Text.php +1 -1
  390. app/code/core/Mage/Catalog/Block/Product/View/Price.php +1 -1
  391. app/code/core/Mage/Catalog/Block/Product/View/Tabs.php +1 -1
  392. app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php +1 -1
  393. app/code/core/Mage/Catalog/Block/Product/View/Type/Grouped.php +1 -1
  394. app/code/core/Mage/Catalog/Block/Product/View/Type/Simple.php +1 -1
  395. app/code/core/Mage/Catalog/Block/Product/View/Type/Virtual.php +1 -1
  396. app/code/core/Mage/Catalog/Block/Product/Widget/Html/Pager.php +299 -0
  397. app/code/core/Mage/Catalog/Block/Product/Widget/Link.php +1 -1
  398. app/code/core/Mage/Catalog/Block/Product/Widget/New.php +151 -8
  399. app/code/core/Mage/Catalog/Block/Seo/Sitemap/Abstract.php +1 -1
  400. app/code/core/Mage/Catalog/Block/Seo/Sitemap/Category.php +1 -1
  401. app/code/core/Mage/Catalog/Block/Seo/Sitemap/Product.php +1 -1
  402. app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Category.php +1 -1
  403. app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php +1 -1
  404. app/code/core/Mage/Catalog/Block/Widget/Link.php +1 -1
  405. app/code/core/Mage/Catalog/Exception.php +1 -1
  406. app/code/core/Mage/Catalog/Helper/Category.php +1 -1
  407. app/code/core/Mage/Catalog/Helper/Category/Flat.php +39 -19
  408. app/code/core/Mage/Catalog/Helper/Category/Url/Rewrite.php +121 -0
  409. app/code/core/Mage/Catalog/Helper/Category/Url/Rewrite/Interface.php +63 -0
  410. app/code/core/Mage/Catalog/Helper/Data.php +1 -1
  411. app/code/core/Mage/Catalog/Helper/Flat/Abstract.php +101 -0
  412. app/code/core/Mage/Catalog/Helper/Image.php +1 -1
  413. app/code/core/Mage/Catalog/Helper/Map.php +1 -1
  414. app/code/core/Mage/Catalog/Helper/Output.php +1 -1
  415. app/code/core/Mage/Catalog/Helper/Product.php +1 -1
  416. app/code/core/Mage/Catalog/Helper/Product/Compare.php +15 -13
  417. app/code/core/Mage/Catalog/Helper/Product/Configuration.php +1 -1
  418. app/code/core/Mage/Catalog/Helper/Product/Configuration/Interface.php +1 -1
  419. app/code/core/Mage/Catalog/Helper/Product/Flat.php +55 -46
  420. app/code/core/Mage/Catalog/Helper/Product/Options.php +1 -1
  421. app/code/core/Mage/Catalog/Helper/Product/Url.php +1 -1
  422. app/code/core/Mage/Catalog/Helper/Product/Url/Rewrite.php +101 -0
  423. app/code/core/Mage/Catalog/Helper/Product/Url/Rewrite/Interface.php +55 -0
  424. app/code/core/Mage/Catalog/Helper/Product/View.php +1 -1
  425. app/code/core/Mage/Catalog/Model/Abstract.php +1 -1
  426. app/code/core/Mage/Catalog/Model/Api/Resource.php +1 -1
  427. app/code/core/Mage/Catalog/Model/Api2/Product.php +1 -1
  428. app/code/core/Mage/Catalog/Model/Api2/Product/Category.php +1 -1
  429. app/code/core/Mage/Catalog/Model/Api2/Product/Category/Rest.php +1 -1
  430. app/code/core/Mage/Catalog/Model/Api2/Product/Category/Rest/Admin/V1.php +1 -1
  431. app/code/core/Mage/Catalog/Model/Api2/Product/Category/Rest/Customer/V1.php +1 -1
  432. app/code/core/Mage/Catalog/Model/Api2/Product/Category/Rest/Guest/V1.php +1 -1
  433. app/code/core/Mage/Catalog/Model/Api2/Product/Image.php +1 -1
  434. app/code/core/Mage/Catalog/Model/Api2/Product/Image/Rest.php +1 -1
  435. app/code/core/Mage/Catalog/Model/Api2/Product/Image/Rest/Admin/V1.php +1 -1
  436. app/code/core/Mage/Catalog/Model/Api2/Product/Image/Rest/Customer/V1.php +1 -1
  437. app/code/core/Mage/Catalog/Model/Api2/Product/Image/Rest/Guest/V1.php +1 -1
  438. app/code/core/Mage/Catalog/Model/Api2/Product/Image/Validator/Image.php +1 -1
  439. app/code/core/Mage/Catalog/Model/Api2/Product/Rest.php +5 -6
  440. app/code/core/Mage/Catalog/Model/Api2/Product/Rest/Admin/V1.php +1 -1
  441. app/code/core/Mage/Catalog/Model/Api2/Product/Rest/Customer/V1.php +1 -1
  442. app/code/core/Mage/Catalog/Model/Api2/Product/Rest/Guest/V1.php +1 -1
  443. app/code/core/Mage/Catalog/Model/Api2/Product/Validator/Product.php +1 -1
  444. app/code/core/Mage/Catalog/Model/Api2/Product/Website.php +1 -1
  445. app/code/core/Mage/Catalog/Model/Api2/Product/Website/Rest.php +1 -1
  446. app/code/core/Mage/Catalog/Model/Api2/Product/Website/Rest/Admin/V1.php +1 -1
  447. app/code/core/Mage/Catalog/Model/Api2/Product/Website/Validator/Admin/Website.php +1 -1
  448. app/code/core/Mage/Catalog/Model/Attribute/Backend/Customlayoutupdate.php +1 -1
  449. app/code/core/Mage/Catalog/Model/Attribute/Backend/Urlkey/Abstract.php +74 -0
  450. app/code/core/Mage/Catalog/Model/Category.php +41 -33
  451. app/code/core/Mage/Catalog/Model/Category/Api.php +1 -1
  452. app/code/core/Mage/Catalog/Model/Category/Api/V2.php +1 -1
  453. app/code/core/Mage/Catalog/Model/Category/Attribute/Api.php +1 -1
  454. app/code/core/Mage/Catalog/Model/Category/Attribute/Api/V2.php +1 -1
  455. app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Image.php +1 -1
  456. app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Sortby.php +10 -9
  457. app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Urlkey.php +3 -44
  458. app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Layout.php +1 -1
  459. app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Mode.php +1 -1
  460. app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Page.php +1 -1
  461. app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Sortby.php +1 -1
  462. app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php +17 -3
  463. app/code/core/Mage/Catalog/Model/Category/Indexer/Product.php +1 -1
  464. app/code/core/Mage/Catalog/Model/Category/Url.php +158 -0
  465. app/code/core/Mage/Catalog/Model/Config.php +1 -1
  466. app/code/core/Mage/Catalog/Model/Convert.php +1 -1
  467. app/code/core/Mage/Catalog/Model/Convert/Adapter/Catalog.php +1 -1
  468. app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php +2 -2
  469. app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php +1 -1
  470. app/code/core/Mage/Catalog/Model/Design.php +3 -2
  471. app/code/core/Mage/Catalog/Model/Entity/Attribute.php +1 -1
  472. app/code/core/Mage/Catalog/Model/Entity/Product/Attribute/Design/Options/Container.php +1 -1
  473. app/code/core/Mage/Catalog/Model/Entity/Product/Attribute/Frontend/Image.php +1 -1
  474. app/code/core/Mage/Catalog/Model/Factory.php +104 -0
  475. app/code/core/Mage/Catalog/Model/Index.php +1 -1
  476. app/code/core/Mage/Catalog/Model/Indexer/Url.php +1 -1
  477. app/code/core/Mage/Catalog/Model/Layer.php +1 -1
  478. app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php +1 -1
  479. app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php +1 -1
  480. app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php +2 -2
  481. app/code/core/Mage/Catalog/Model/Layer/Filter/Decimal.php +1 -1
  482. app/code/core/Mage/Catalog/Model/Layer/Filter/Item.php +1 -1
  483. app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php +1 -1
  484. app/code/core/Mage/Catalog/Model/Layer/Filter/Price/Algorithm.php +1 -1
  485. app/code/core/Mage/Catalog/Model/Layer/State.php +1 -1
  486. app/code/core/Mage/Catalog/Model/Observer.php +64 -70
  487. app/code/core/Mage/Catalog/Model/Product.php +11 -7
  488. app/code/core/Mage/Catalog/Model/Product/Action.php +1 -1
  489. app/code/core/Mage/Catalog/Model/Product/Api.php +17 -4
  490. app/code/core/Mage/Catalog/Model/Product/Api/V2.php +44 -23
  491. app/code/core/Mage/Catalog/Model/Product/Attribute/Api.php +2 -2
  492. app/code/core/Mage/Catalog/Model/Product/Attribute/Api/V2.php +1 -1
  493. app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Boolean.php +1 -1
  494. app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Groupprice.php +1 -1
  495. app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Groupprice/Abstract.php +1 -1
  496. app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Media.php +7 -3
  497. app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Msrp.php +1 -1
  498. app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Price.php +1 -1
  499. app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Recurring.php +1 -1
  500. app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Sku.php +1 -1
  501. app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Startdate.php +57 -4
  502. app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Tierprice.php +1 -1
  503. app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Urlkey.php +3 -32
  504. app/code/core/Mage/Catalog/Model/Product/Attribute/Frontend/Image.php +1 -1
  505. app/code/core/Mage/Catalog/Model/Product/Attribute/Group.php +1 -1
  506. app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php +1 -1
  507. app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api/V2.php +1 -1
  508. app/code/core/Mage/Catalog/Model/Product/Attribute/Set/Api.php +1 -1
  509. app/code/core/Mage/Catalog/Model/Product/Attribute/Set/Api/V2.php +1 -1
  510. app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Boolean.php +1 -1
  511. app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Countryofmanufacture.php +1 -1
  512. app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Inputtype.php +1 -1
  513. app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Layout.php +1 -1
  514. app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Msrp/Type.php +1 -1
  515. app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Msrp/Type/Enabled.php +1 -1
  516. app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Msrp/Type/Price.php +1 -1
  517. app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api.php +1 -1
  518. app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api/V2.php +1 -1
  519. app/code/core/Mage/Catalog/Model/Product/Compare/Item.php +7 -1
  520. app/code/core/Mage/Catalog/Model/Product/Compare/List.php +1 -1
  521. app/code/core/Mage/Catalog/Model/Product/Condition.php +9 -2
  522. app/code/core/Mage/Catalog/Model/Product/Condition/Interface.php +1 -1
  523. app/code/core/Mage/Catalog/Model/Product/Configuration/Item/Interface.php +1 -1
  524. app/code/core/Mage/Catalog/Model/Product/Configuration/Item/Option.php +1 -1
  525. app/code/core/Mage/Catalog/Model/Product/Configuration/Item/Option/Interface.php +1 -1
  526. app/code/core/Mage/Catalog/Model/Product/Flat/Flag.php +58 -6
  527. app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php +1 -1
  528. app/code/core/Mage/Catalog/Model/Product/Flat/Observer.php +11 -11
  529. app/code/core/Mage/Catalog/Model/Product/Image.php +1 -1
  530. app/code/core/Mage/Catalog/Model/Product/Indexer/Eav.php +1 -1
  531. app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php +17 -3
  532. app/code/core/Mage/Catalog/Model/Product/Indexer/Price.php +1 -1
  533. app/code/core/Mage/Catalog/Model/Product/Link.php +1 -1
  534. app/code/core/Mage/Catalog/Model/Product/Link/Api.php +1 -1
  535. app/code/core/Mage/Catalog/Model/Product/Link/Api/V2.php +1 -1
  536. app/code/core/Mage/Catalog/Model/Product/Media/Config.php +1 -1
  537. app/code/core/Mage/Catalog/Model/Product/Option.php +107 -4
  538. app/code/core/Mage/Catalog/Model/Product/Option/Api.php +18 -14
  539. app/code/core/Mage/Catalog/Model/Product/Option/Api/V2.php +1 -1
  540. app/code/core/Mage/Catalog/Model/Product/Option/Observer.php +1 -1
  541. app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php +1 -1
  542. app/code/core/Mage/Catalog/Model/Product/Option/Type/Default.php +1 -1
  543. app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php +3 -3
  544. app/code/core/Mage/Catalog/Model/Product/Option/Type/Select.php +5 -4
  545. app/code/core/Mage/Catalog/Model/Product/Option/Type/Text.php +2 -2
  546. app/code/core/Mage/Catalog/Model/Product/Option/Value.php +2 -2
  547. app/code/core/Mage/Catalog/Model/Product/Option/Value/Api.php +1 -1
  548. app/code/core/Mage/Catalog/Model/Product/Option/Value/Api/V2.php +1 -1
  549. app/code/core/Mage/Catalog/Model/Product/Status.php +1 -1
  550. app/code/core/Mage/Catalog/Model/Product/Type.php +1 -1
  551. app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php +2 -7
  552. app/code/core/Mage/Catalog/Model/Product/Type/Api.php +1 -1
  553. app/code/core/Mage/Catalog/Model/Product/Type/Api/V2.php +1 -1
  554. app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php +6 -8
  555. app/code/core/Mage/Catalog/Model/Product/Type/Configurable/Attribute.php +1 -1
  556. app/code/core/Mage/Catalog/Model/Product/Type/Configurable/Price.php +1 -1
  557. app/code/core/Mage/Catalog/Model/Product/Type/Grouped.php +1 -1
  558. app/code/core/Mage/Catalog/Model/Product/Type/Grouped/Price.php +1 -1
  559. app/code/core/Mage/Catalog/Model/Product/Type/Price.php +1 -1
  560. app/code/core/Mage/Catalog/Model/Product/Type/Simple.php +1 -1
  561. app/code/core/Mage/Catalog/Model/Product/Type/Virtual.php +1 -1
  562. app/code/core/Mage/Catalog/Model/Product/Url.php +124 -56
  563. app/code/core/Mage/Catalog/Model/Product/Visibility.php +1 -1
  564. app/code/core/Mage/Catalog/Model/Product/Website.php +1 -1
  565. app/code/core/Mage/Catalog/Model/Resource/Abstract.php +1 -1
  566. app/code/core/Mage/Catalog/Model/Resource/Attribute.php +1 -1
  567. app/code/core/Mage/Catalog/Model/Resource/Category.php +72 -18
  568. app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Collection.php +1 -1
  569. app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Frontend/Image.php +1 -1
  570. app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Source/Layout.php +1 -1
  571. app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Source/Mode.php +1 -1
  572. app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Source/Page.php +1 -1
  573. app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php +72 -12
  574. app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php +104 -48
  575. app/code/core/Mage/Catalog/Model/Resource/Category/Flat/Collection.php +35 -11
  576. app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php +1 -1
  577. app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php +1 -1
  578. app/code/core/Mage/Catalog/Model/Resource/Collection/Abstract.php +1 -1
  579. app/code/core/Mage/Catalog/Model/Resource/Config.php +1 -1
  580. app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php +1 -1
  581. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Abstract.php +1 -1
  582. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Attribute.php +1 -1
  583. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category.php +1 -1
  584. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Attribute/Collection.php +1 -1
  585. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Attribute/Frontend/Image.php +1 -1
  586. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Attribute/Source/Layout.php +1 -1
  587. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Attribute/Source/Mode.php +1 -1
  588. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Attribute/Source/Page.php +1 -1
  589. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Collection.php +1 -1
  590. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php +1 -1
  591. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat/Collection.php +1 -1
  592. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Indexer/Product.php +1 -1
  593. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Tree.php +1 -1
  594. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Collection/Abstract.php +1 -1
  595. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Config.php +1 -1
  596. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Layer/Filter/Attribute.php +1 -1
  597. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Layer/Filter/Decimal.php +1 -1
  598. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Layer/Filter/Price.php +1 -1
  599. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product.php +1 -1
  600. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Action.php +1 -1
  601. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Attribute/Backend/Image.php +1 -1
  602. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Attribute/Backend/Media.php +1 -1
  603. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Attribute/Backend/Tierprice.php +1 -1
  604. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Attribute/Backend/Urlkey.php +1 -1
  605. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Attribute/Collection.php +1 -1
  606. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Attribute/Frontend/Image.php +1 -1
  607. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Attribute/Frontend/Tierprice.php +1 -1
  608. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Collection.php +1 -1
  609. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Compare/Item.php +1 -1
  610. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Compare/Item/Collection.php +1 -1
  611. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat.php +1 -1
  612. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php +1 -1
  613. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Abstract.php +1 -1
  614. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav.php +1 -1
  615. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav/Abstract.php +1 -1
  616. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav/Decimal.php +1 -1
  617. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav/Source.php +1 -1
  618. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php +1 -1
  619. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Configurable.php +1 -1
  620. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Default.php +1 -1
  621. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Grouped.php +1 -1
  622. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Interface.php +1 -1
  623. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Link.php +1 -1
  624. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Link/Collection.php +1 -1
  625. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Link/Product/Collection.php +1 -1
  626. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option.php +1 -1
  627. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option/Collection.php +1 -1
  628. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option/Value.php +1 -1
  629. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option/Value/Collection.php +1 -1
  630. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Relation.php +1 -1
  631. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Status.php +1 -1
  632. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Type/Configurable.php +1 -1
  633. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Type/Configurable/Attribute.php +1 -1
  634. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Type/Configurable/Attribute/Collection.php +1 -1
  635. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Type/Configurable/Product/Collection.php +1 -1
  636. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Website.php +1 -1
  637. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Sendfriend.php +1 -1
  638. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Sendfriend/Collection.php +1 -1
  639. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Setup.php +1 -1
  640. app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Url.php +1 -1
  641. app/code/core/Mage/Catalog/Model/Resource/Helper/Mysql4.php +1 -1
  642. app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Attribute.php +1 -1
  643. app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Decimal.php +1 -1
  644. app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php +7 -3
  645. app/code/core/Mage/Catalog/Model/Resource/Product.php +1 -1
  646. app/code/core/Mage/Catalog/Model/Resource/Product/Action.php +1 -1
  647. app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Groupprice.php +1 -1
  648. app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Groupprice/Abstract.php +1 -1
  649. app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Image.php +1 -1
  650. app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Media.php +1 -1
  651. app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Tierprice.php +1 -1
  652. app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Urlkey.php +2 -1
  653. app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Collection.php +1 -1
  654. app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Frontend/Image.php +1 -1
  655. app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Frontend/Tierprice.php +1 -1
  656. app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php +53 -24
  657. app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item.php +1 -1
  658. app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php +1 -1
  659. app/code/core/Mage/Catalog/Model/Resource/Product/Flat.php +37 -1
  660. app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php +3 -6
  661. app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Abstract.php +1 -1
  662. app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav.php +1 -1
  663. app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Abstract.php +1 -1
  664. app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Decimal.php +1 -1
  665. app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php +1 -1
  666. app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php +1 -1
  667. app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Configurable.php +1 -1
  668. app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Default.php +1 -1
  669. app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Grouped.php +1 -1
  670. app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Interface.php +1 -1
  671. app/code/core/Mage/Catalog/Model/Resource/Product/Link.php +1 -1
  672. app/code/core/Mage/Catalog/Model/Resource/Product/Link/Collection.php +1 -1
  673. app/code/core/Mage/Catalog/Model/Resource/Product/Link/Product/Collection.php +2 -1
  674. app/code/core/Mage/Catalog/Model/Resource/Product/Option.php +1 -1
  675. app/code/core/Mage/Catalog/Model/Resource/Product/Option/Collection.php +1 -1
  676. app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value.php +1 -1
  677. app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value/Collection.php +1 -1
  678. app/code/core/Mage/Catalog/Model/Resource/Product/Relation.php +1 -1
  679. app/code/core/Mage/Catalog/Model/Resource/Product/Status.php +1 -1
  680. app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable.php +1 -1
  681. app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute.php +1 -1
  682. app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php +1 -1
  683. app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Product/Collection.php +1 -1
  684. app/code/core/Mage/Catalog/Model/Resource/Product/Website.php +1 -1
  685. app/code/core/Mage/Catalog/Model/Resource/Setup.php +1 -1
  686. app/code/core/Mage/Catalog/Model/Resource/Url.php +1 -1
  687. app/code/core/Mage/Catalog/Model/Session.php +1 -1
  688. app/code/core/Mage/Catalog/Model/System/Config/Backend/Catalog/Category/Flat.php +3 -2
  689. app/code/core/Mage/Catalog/Model/System/Config/Backend/Catalog/Product/Flat.php +1 -1
  690. app/code/core/Mage/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php +1 -1
  691. app/code/core/Mage/Catalog/Model/Template/Filter.php +1 -1
  692. app/code/core/Mage/Catalog/Model/Url.php +1 -1
  693. app/code/core/Mage/Catalog/controllers/CategoryController.php +3 -1
  694. app/code/core/Mage/Catalog/controllers/IndexController.php +1 -1
  695. app/code/core/Mage/Catalog/controllers/Product/CompareController.php +1 -1
  696. app/code/core/Mage/Catalog/controllers/ProductController.php +1 -1
  697. app/code/core/Mage/Catalog/controllers/Seo/SitemapController.php +1 -1
  698. app/code/core/Mage/Catalog/data/catalog_setup/data-install-1.6.0.0.php +1 -1
  699. app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.12-1.6.0.0.13.php +1 -1
  700. app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.13-1.6.0.0.14.php +2 -2
  701. app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.4-1.6.0.0.5.php +1 -1
  702. app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.8-1.6.0.0.9.php +1 -1
  703. app/code/core/Mage/Catalog/etc/adminhtml.xml +1 -1
  704. app/code/core/Mage/Catalog/etc/api.xml +13 -1
  705. app/code/core/Mage/Catalog/etc/api2.xml +1 -1
  706. app/code/core/Mage/Catalog/etc/config.xml +35 -2
  707. app/code/core/Mage/Catalog/etc/convert.xml +1 -1
  708. app/code/core/Mage/Catalog/etc/system.xml +3 -2
  709. app/code/core/Mage/Catalog/etc/widget.xml +34 -2
  710. app/code/core/Mage/Catalog/etc/wsdl.xml +62 -22
  711. app/code/core/Mage/Catalog/etc/wsi.xml +247 -2
  712. app/code/core/Mage/Catalog/sql/catalog_setup/install-1.6.0.0.php +1 -1
  713. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-0.7.57-0.7.58.php +1 -1
  714. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-0.7.63-0.7.64.php +1 -1
  715. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-1.4.0.0.28-1.4.0.0.29.php +1 -1
  716. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-1.4.0.0.42-1.4.0.0.43.php +1 -1
  717. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-install-0.7.0.php +1 -1
  718. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-install-1.4.0.0.0.php +1 -1
  719. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.6.40-0.7.0.php +1 -1
  720. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.0-0.7.1.php +1 -1
  721. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.1-0.7.2.php +1 -1
  722. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.11-0.7.12.php +1 -1
  723. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.12-0.7.13.php +1 -1
  724. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.13-0.7.14.php +1 -1
  725. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.14-0.7.15.php +1 -1
  726. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.15-0.7.16.php +1 -1
  727. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.16-0.7.17.php +1 -1
  728. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.17-0.7.18.php +1 -1
  729. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.18-0.7.19.php +1 -1
  730. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.19-0.7.20.php +1 -1
  731. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.2-0.7.3.php +1 -1
  732. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.20-0.7.21.php +1 -1
  733. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.21-0.7.22.php +1 -1
  734. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.22-0.7.23.php +1 -1
  735. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.23-0.7.24.php +1 -1
  736. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.24-0.7.25.php +1 -1
  737. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.25-0.7.26.php +1 -1
  738. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.26-0.7.27.php +1 -1
  739. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.27-0.7.28.php +1 -1
  740. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.28-0.7.29.php +1 -1
  741. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.29-0.7.30.php +1 -1
  742. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.30-0.7.31.php +1 -1
  743. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.31-0.7.32.php +1 -1
  744. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.32-0.7.33.php +1 -1
  745. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.33-0.7.34.php +1 -1
  746. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.34-0.7.35.php +1 -1
  747. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.35-0.7.36.php +1 -1
  748. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.36-0.7.37.php +1 -1
  749. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.37-0.7.38.php +1 -1
  750. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.38-0.7.39.php +1 -1
  751. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.39-0.7.40.php +1 -1
  752. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.4-0.7.5.php +1 -1
  753. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.40-0.7.41.php +1 -1
  754. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.41-0.7.42.php +1 -1
  755. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.43-0.7.44.php +1 -1
  756. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.44-0.7.45.php +1 -1
  757. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.45-0.7.46.php +1 -1
  758. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.46-0.7.47.php +1 -1
  759. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.47-0.7.48.php +1 -1
  760. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.48-0.7.49.php +1 -1
  761. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.49-0.7.50.php +1 -1
  762. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.5-0.7.6.php +1 -1
  763. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.50-0.7.51.php +1 -1
  764. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.51-0.7.52.php +1 -1
  765. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.52-0.7.53.php +1 -1
  766. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.53-0.7.54.php +1 -1
  767. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.54-0.7.55.php +1 -1
  768. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.55-0.7.56.php +1 -1
  769. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.56-0.7.57.php +1 -1
  770. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.57-0.7.58.php +1 -1
  771. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.58-0.7.59.php +1 -1
  772. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.59-0.7.60.php +1 -1
  773. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.6-0.7.7.php +1 -1
  774. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.60-0.7.61.php +1 -1
  775. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.61-0.7.62.php +1 -1
  776. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.62-0.7.63.php +1 -1
  777. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.63-0.7.64.php +1 -1
  778. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.64-0.7.65.php +1 -1
  779. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.65-0.7.66.php +2 -2
  780. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.66-0.7.67.php +1 -1
  781. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.67-0.7.68.php +1 -1
  782. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.68-0.7.69.php +1 -1
  783. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.69-0.7.70.php +1 -1
  784. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.7-0.7.8.php +1 -1
  785. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.70-0.7.71.php +1 -1
  786. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.71-0.7.72.php +1 -1
  787. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.72-0.7.73.php +1 -1
  788. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.73-1.4.0.0.0.php +1 -1
  789. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.8-0.7.9.php +1 -1
  790. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.0-1.4.0.0.1.php +1 -1
  791. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.1-1.4.0.0.2.php +1 -1
  792. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.10-1.4.0.0.11.php +1 -1
  793. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.11-1.4.0.0.12.php +1 -1
  794. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.12-1.4.0.0.13.php +1 -1
  795. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.13-1.4.0.0.14.php +1 -1
  796. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.14-1.4.0.0.15.php +1 -1
  797. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.15-1.4.0.0.16.php +1 -1
  798. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.16-1.4.0.0.17.php +1 -1
  799. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.17-1.4.0.0.18.php +1 -1
  800. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.18-1.4.0.0.19.php +1 -1
  801. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.19-1.4.0.0.20.php +1 -1
  802. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.2-1.4.0.0.3.php +1 -1
  803. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.20-1.4.0.0.21.php +1 -1
  804. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.21-1.4.0.0.22.php +1 -1
  805. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.22-1.4.0.0.23.php +1 -1
  806. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.23-1.4.0.0.24.php +1 -1
  807. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.24-1.4.0.0.25.php +1 -1
  808. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.25-1.4.0.0.26.php +1 -1
  809. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.26-1.4.0.0.27.php +1 -1
  810. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.27-1.4.0.0.28.php +1 -1
  811. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.28-1.4.0.0.29.php +1 -1
  812. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.3-1.4.0.0.4.php +1 -1
  813. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.30-1.4.0.0.31.php +1 -1
  814. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.31-1.4.0.0.32.php +1 -1
  815. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.32-1.4.0.0.33.php +1 -1
  816. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.33-1.4.0.0.34.php +1 -1
  817. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.34-1.4.0.0.35.php +1 -1
  818. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.35-1.4.0.0.36.php +1 -1
  819. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.36-1.4.0.0.37.php +1 -1
  820. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.37-1.4.0.0.38.php +1 -1
  821. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.38-1.4.0.0.39.php +1 -1
  822. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.39-1.4.0.0.40.php +1 -1
  823. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.4-1.4.0.0.5.php +1 -1
  824. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.40-1.4.0.0.41.php +1 -1
  825. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.41-1.4.0.0.42.php +1 -1
  826. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.43-1.4.0.0.44.php +1 -1
  827. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.5-1.4.0.0.6.php +1 -1
  828. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.6-1.4.0.0.7.php +1 -1
  829. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.7-1.4.0.0.8.php +1 -1
  830. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.8-1.4.0.0.9.php +1 -1
  831. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.9-1.4.0.0.10.php +1 -1
  832. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +1 -1
  833. app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.6.0.0.8-1.6.0.0.9.php +1 -1
  834. app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0-1.6.0.0.1.php +1 -1
  835. app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php +1 -1
  836. app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.10-1.6.0.0.11.php +1 -1
  837. app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.11-1.6.0.0.12.php +1 -1
  838. app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.14-1.6.0.0.15.php +37 -0
  839. app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.15-1.6.0.0.18.php +29 -0
  840. app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.2-1.6.0.0.3.php +1 -1
  841. app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.3-1.6.0.0.4.php +1 -1
  842. app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.4-1.6.0.0.5.php +1 -1
  843. app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.5-1.6.0.0.6.php +1 -1
  844. app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.6-1.6.0.0.7.php +1 -1
  845. app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.7-1.6.0.0.8.php +1 -1
  846. app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.9-1.6.0.0.10.php +1 -1
  847. app/code/core/Mage/CatalogIndex/Model/Aggregation.php +1 -1
  848. app/code/core/Mage/CatalogIndex/Model/Attribute.php +1 -1
  849. app/code/core/Mage/CatalogIndex/Model/Catalog/Index/Flag.php +1 -1
  850. app/code/core/Mage/CatalogIndex/Model/Catalog/Index/Kill/Flag.php +1 -1
  851. app/code/core/Mage/CatalogIndex/Model/Data/Abstract.php +1 -1
  852. app/code/core/Mage/CatalogIndex/Model/Data/Configurable.php +1 -1
  853. app/code/core/Mage/CatalogIndex/Model/Data/Grouped.php +1 -1
  854. app/code/core/Mage/CatalogIndex/Model/Data/Simple.php +1 -1
  855. app/code/core/Mage/CatalogIndex/Model/Data/Virtual.php +1 -1
  856. app/code/core/Mage/CatalogIndex/Model/Indexer.php +21 -10
  857. app/code/core/Mage/CatalogIndex/Model/Indexer/Abstract.php +1 -1
  858. app/code/core/Mage/CatalogIndex/Model/Indexer/Eav.php +1 -1
  859. app/code/core/Mage/CatalogIndex/Model/Indexer/Interface.php +1 -1
  860. app/code/core/Mage/CatalogIndex/Model/Indexer/Minimalprice.php +1 -1
  861. app/code/core/Mage/CatalogIndex/Model/Indexer/Price.php +1 -1
  862. app/code/core/Mage/CatalogIndex/Model/Indexer/Tierprice.php +1 -1
  863. app/code/core/Mage/CatalogIndex/Model/Mysql4/Abstract.php +1 -1
  864. app/code/core/Mage/CatalogIndex/Model/Mysql4/Aggregation.php +1 -1
  865. app/code/core/Mage/CatalogIndex/Model/Mysql4/Attribute.php +1 -1
  866. app/code/core/Mage/CatalogIndex/Model/Mysql4/Data/Abstract.php +1 -1
  867. app/code/core/Mage/CatalogIndex/Model/Mysql4/Data/Configurable.php +1 -1
  868. app/code/core/Mage/CatalogIndex/Model/Mysql4/Data/Grouped.php +1 -1
  869. app/code/core/Mage/CatalogIndex/Model/Mysql4/Indexer.php +1 -1
  870. app/code/core/Mage/CatalogIndex/Model/Mysql4/Indexer/Abstract.php +1 -1
  871. app/code/core/Mage/CatalogIndex/Model/Mysql4/Indexer/Eav.php +1 -1
  872. app/code/core/Mage/CatalogIndex/Model/Mysql4/Indexer/Minimalprice.php +1 -1
  873. app/code/core/Mage/CatalogIndex/Model/Mysql4/Indexer/Price.php +1 -1
  874. app/code/core/Mage/CatalogIndex/Model/Mysql4/Price.php +1 -1
  875. app/code/core/Mage/CatalogIndex/Model/Mysql4/Retreiver.php +1 -1
  876. app/code/core/Mage/CatalogIndex/Model/Mysql4/Setup.php +1 -1
  877. app/code/core/Mage/CatalogIndex/Model/Observer.php +1 -1
  878. app/code/core/Mage/CatalogIndex/Model/Price.php +1 -1
  879. app/code/core/Mage/CatalogIndex/Model/Resource/Abstract.php +1 -1
  880. app/code/core/Mage/CatalogIndex/Model/Resource/Aggregation.php +1 -1
  881. app/code/core/Mage/CatalogIndex/Model/Resource/Attribute.php +1 -1
  882. app/code/core/Mage/CatalogIndex/Model/Resource/Data/Abstract.php +1 -1
  883. app/code/core/Mage/CatalogIndex/Model/Resource/Data/Configurable.php +1 -1
  884. app/code/core/Mage/CatalogIndex/Model/Resource/Data/Grouped.php +1 -1
  885. app/code/core/Mage/CatalogIndex/Model/Resource/Indexer.php +1 -1
  886. app/code/core/Mage/CatalogIndex/Model/Resource/Indexer/Abstract.php +1 -1
  887. app/code/core/Mage/CatalogIndex/Model/Resource/Indexer/Eav.php +1 -1
  888. app/code/core/Mage/CatalogIndex/Model/Resource/Indexer/Minimalprice.php +1 -1
  889. app/code/core/Mage/CatalogIndex/Model/Resource/Indexer/Price.php +1 -1
  890. app/code/core/Mage/CatalogIndex/Model/Resource/Price.php +1 -1
  891. app/code/core/Mage/CatalogIndex/Model/Resource/Retreiver.php +1 -1
  892. app/code/core/Mage/CatalogIndex/Model/Resource/Setup.php +1 -1
  893. app/code/core/Mage/CatalogIndex/Model/Retreiver.php +1 -1
  894. app/code/core/Mage/CatalogIndex/etc/config.xml +1 -1
  895. app/code/core/Mage/CatalogIndex/sql/catalogindex_setup/install-1.6.0.0.php +1 -1
  896. app/code/core/Mage/CatalogIndex/sql/catalogindex_setup/mysql4-install-0.7.0.php +1 -1
  897. app/code/core/Mage/CatalogIndex/sql/catalogindex_setup/mysql4-upgrade-0.7.0-0.7.1.php +1 -1
  898. app/code/core/Mage/CatalogIndex/sql/catalogindex_setup/mysql4-upgrade-0.7.1-0.7.2.php +1 -1
  899. app/code/core/Mage/CatalogIndex/sql/catalogindex_setup/mysql4-upgrade-0.7.2-0.7.3.php +1 -1
  900. app/code/core/Mage/CatalogIndex/sql/catalogindex_setup/mysql4-upgrade-0.7.3-0.7.4.php +1 -1
  901. app/code/core/Mage/CatalogIndex/sql/catalogindex_setup/mysql4-upgrade-0.7.4-0.7.5.php +1 -1
  902. app/code/core/Mage/CatalogIndex/sql/catalogindex_setup/mysql4-upgrade-0.7.5-0.7.6.php +1 -1
  903. app/code/core/Mage/CatalogIndex/sql/catalogindex_setup/mysql4-upgrade-0.7.6-0.7.7.php +1 -1
  904. app/code/core/Mage/CatalogIndex/sql/catalogindex_setup/mysql4-upgrade-0.7.7-0.7.8.php +1 -1
  905. app/code/core/Mage/CatalogIndex/sql/catalogindex_setup/mysql4-upgrade-0.7.8-0.7.9.php +1 -1
  906. app/code/core/Mage/CatalogIndex/sql/catalogindex_setup/mysql4-upgrade-0.7.9-0.7.10.php +1 -1
  907. app/code/core/Mage/CatalogIndex/sql/catalogindex_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +1 -1
  908. app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Customergroup.php +1 -1
  909. app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php +1 -1
  910. app/code/core/Mage/CatalogInventory/Block/Qtyincrements.php +11 -1
  911. app/code/core/Mage/CatalogInventory/Block/Stockqty/Abstract.php +1 -1
  912. app/code/core/Mage/CatalogInventory/Block/Stockqty/Composite.php +1 -1
  913. app/code/core/Mage/CatalogInventory/Block/Stockqty/Default.php +11 -1
  914. app/code/core/Mage/CatalogInventory/Block/Stockqty/Type/Configurable.php +1 -1
  915. app/code/core/Mage/CatalogInventory/Block/Stockqty/Type/Grouped.php +1 -1
  916. app/code/core/Mage/CatalogInventory/Helper/Data.php +16 -1
  917. app/code/core/Mage/CatalogInventory/Helper/Minsaleqty.php +1 -1
  918. app/code/core/Mage/CatalogInventory/Model/Api2/Stock/Item.php +1 -1
  919. app/code/core/Mage/CatalogInventory/Model/Api2/Stock/Item/Rest.php +1 -1
  920. app/code/core/Mage/CatalogInventory/Model/Api2/Stock/Item/Rest/Admin/V1.php +1 -1
  921. app/code/core/Mage/CatalogInventory/Model/Api2/Stock/Item/Validator/Item.php +1 -1
  922. app/code/core/Mage/CatalogInventory/Model/Indexer/Stock.php +1 -1
  923. app/code/core/Mage/CatalogInventory/Model/Mysql4/Indexer/Stock.php +1 -1
  924. app/code/core/Mage/CatalogInventory/Model/Mysql4/Indexer/Stock/Configurable.php +1 -1
  925. app/code/core/Mage/CatalogInventory/Model/Mysql4/Indexer/Stock/Default.php +1 -1
  926. app/code/core/Mage/CatalogInventory/Model/Mysql4/Indexer/Stock/Grouped.php +1 -1
  927. app/code/core/Mage/CatalogInventory/Model/Mysql4/Indexer/Stock/Interface.php +1 -1
  928. app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock.php +1 -1
  929. app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item.php +1 -1
  930. app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item/Collection.php +1 -1
  931. app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Status.php +1 -1
  932. app/code/core/Mage/CatalogInventory/Model/Observer.php +44 -7
  933. app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock.php +1 -1
  934. app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Configurable.php +1 -1
  935. app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Default.php +1 -1
  936. app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Grouped.php +1 -1
  937. app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Interface.php +1 -1
  938. app/code/core/Mage/CatalogInventory/Model/Resource/Stock.php +60 -7
  939. app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Item.php +1 -1
  940. app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Item/Collection.php +1 -1
  941. app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Status.php +1 -1
  942. app/code/core/Mage/CatalogInventory/Model/Source/Backorders.php +1 -1
  943. app/code/core/Mage/CatalogInventory/Model/Source/Stock.php +1 -1
  944. app/code/core/Mage/CatalogInventory/Model/Stock.php +1 -1
  945. app/code/core/Mage/CatalogInventory/Model/Stock/Item.php +3 -3
  946. app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api.php +1 -1
  947. app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api/V2.php +35 -34
  948. app/code/core/Mage/CatalogInventory/Model/Stock/Status.php +5 -3
  949. app/code/core/Mage/CatalogInventory/Model/System/Config/Backend/Minqty.php +1 -1
  950. app/code/core/Mage/CatalogInventory/Model/System/Config/Backend/Minsaleqty.php +1 -1
  951. app/code/core/Mage/CatalogInventory/Model/System/Config/Backend/Qtyincrements.php +1 -1
  952. app/code/core/Mage/CatalogInventory/etc/adminhtml.xml +1 -1
  953. app/code/core/Mage/CatalogInventory/etc/api.xml +9 -1
  954. app/code/core/Mage/CatalogInventory/etc/api2.xml +1 -1
  955. app/code/core/Mage/CatalogInventory/etc/config.xml +10 -1
  956. app/code/core/Mage/CatalogInventory/etc/system.xml +13 -3
  957. app/code/core/Mage/CatalogInventory/etc/wsdl.xml +31 -0
  958. app/code/core/Mage/CatalogInventory/etc/wsi.xml +41 -0
  959. app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/install-1.6.0.0.php +1 -1
  960. app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-install-0.7.0.php +1 -1
  961. app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.0-0.7.1.php +1 -1
  962. app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.1-0.7.2.php +1 -1
  963. app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.2-0.7.3.php +1 -1
  964. app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.3-0.7.4.php +1 -1
  965. app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.4-0.7.5.php +1 -1
  966. app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.5-0.7.6.php +1 -1
  967. app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.6-0.7.7.php +1 -1
  968. app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.7-0.7.8.php +1 -1
  969. app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +1 -1
  970. app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-1.6.0.0-1.6.0.0.1.php +1 -1
  971. app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php +1 -1
  972. app/code/core/Mage/CatalogRule/Helper/Data.php +1 -1
  973. app/code/core/Mage/CatalogRule/Model/Action/Index/Refresh.php +648 -0
  974. app/code/core/Mage/CatalogRule/Model/Action/Index/Refresh/Row.php +101 -0
  975. app/code/core/Mage/CatalogRule/Model/Flag.php +1 -1
  976. app/code/core/Mage/CatalogRule/Model/Mysql4/Rule.php +1 -1
  977. app/code/core/Mage/CatalogRule/Model/Mysql4/Rule/Collection.php +1 -1
  978. app/code/core/Mage/CatalogRule/Model/Mysql4/Rule/Product/Price.php +1 -1
  979. app/code/core/Mage/CatalogRule/Model/Mysql4/Rule/Product/Price/Collection.php +1 -1
  980. app/code/core/Mage/CatalogRule/Model/Observer.php +21 -13
  981. app/code/core/Mage/CatalogRule/Model/Resource/Rule.php +258 -246
  982. app/code/core/Mage/CatalogRule/Model/Resource/Rule/Collection.php +1 -1
  983. app/code/core/Mage/CatalogRule/Model/Resource/Rule/Product/Price.php +1 -1
  984. app/code/core/Mage/CatalogRule/Model/Resource/Rule/Product/Price/Collection.php +1 -1
  985. app/code/core/Mage/CatalogRule/Model/Rule.php +89 -23
  986. app/code/core/Mage/CatalogRule/Model/Rule/Action/Collection.php +1 -1
  987. app/code/core/Mage/CatalogRule/Model/Rule/Action/Product.php +1 -1
  988. app/code/core/Mage/CatalogRule/Model/Rule/Condition/Combine.php +1 -1
  989. app/code/core/Mage/CatalogRule/Model/Rule/Condition/Product.php +103 -1
  990. app/code/core/Mage/CatalogRule/Model/Rule/Product/Price.php +1 -1
  991. app/code/core/Mage/CatalogRule/etc/adminhtml.xml +1 -1
  992. app/code/core/Mage/CatalogRule/etc/config.xml +6 -3
  993. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/install-1.6.0.0.php +1 -1
  994. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-install-0.7.0.php +1 -1
  995. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.0-0.7.1.php +1 -1
  996. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.1-0.7.2.php +1 -1
  997. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.2-0.7.3.php +1 -1
  998. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.3-0.7.4.php +1 -1
  999. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.4-0.7.5.php +1 -1
  1000. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.5-0.7.6.php +1 -1
  1001. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.6-0.7.7.php +1 -1
  1002. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.7-0.7.8.php +1 -1
  1003. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.8-0.7.9.php +1 -1
  1004. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.9-0.7.10.php +1 -1
  1005. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +1 -1
  1006. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.0-1.6.0.1.php +1 -1
  1007. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.1-1.6.0.2.php +1 -1
  1008. app/code/core/Mage/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.2-1.6.0.3.php +1 -1
  1009. app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php +19 -14
  1010. app/code/core/Mage/CatalogSearch/Block/Advanced/Result.php +1 -1
  1011. app/code/core/Mage/CatalogSearch/Block/Autocomplete.php +3 -3
  1012. app/code/core/Mage/CatalogSearch/Block/Layer.php +2 -2
  1013. app/code/core/Mage/CatalogSearch/Block/Layer/Filter/Attribute.php +1 -1
  1014. app/code/core/Mage/CatalogSearch/Block/Result.php +1 -1
  1015. app/code/core/Mage/CatalogSearch/Block/Term.php +1 -1
  1016. app/code/core/Mage/CatalogSearch/Helper/Data.php +1 -1
.htaccess.sample CHANGED
@@ -31,8 +31,7 @@
31
  ############################################
32
  ## adjust memory limit
33
 
34
- # php_value memory_limit 64M
35
- php_value memory_limit 128M
36
  php_value max_execution_time 18000
37
 
38
  ############################################
31
  ############################################
32
  ## adjust memory limit
33
 
34
+ php_value memory_limit 512M
 
35
  php_value max_execution_time 18000
36
 
37
  ############################################
RELEASE_NOTES.txt CHANGED
@@ -1,3 +1,12 @@
 
 
 
 
 
 
 
 
 
1
  ==== 1.7.0.2 ====
2
 
3
  === Fixes ===
1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
+ ] NOTE: Current Release Notes are maintained at: [
4
+ ] [
5
+ ] http://www.magentocommerce.com/knowledge-base/entry/ce-18-later-release-notes [
6
+ ] [
7
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9
+
10
  ==== 1.7.0.2 ====
11
 
12
  === Fixes ===
app/Mage.php CHANGED
@@ -168,9 +168,9 @@ final class Mage
168
  {
169
  return array(
170
  'major' => '1',
171
- 'minor' => '7',
172
  'revision' => '0',
173
- 'patch' => '2',
174
  'stability' => '',
175
  'number' => '',
176
  );
@@ -695,7 +695,7 @@ final class Mage
695
  }
696
  try {
697
  self::dispatchEvent('mage_run_exception', array('exception' => $e));
698
- if (!headers_sent()) {
699
  header('Location:' . self::getUrl('install'));
700
  } else {
701
  self::printException($e);
168
  {
169
  return array(
170
  'major' => '1',
171
+ 'minor' => '8',
172
  'revision' => '0',
173
+ 'patch' => '0',
174
  'stability' => '',
175
  'number' => '',
176
  );
695
  }
696
  try {
697
  self::dispatchEvent('mage_run_exception', array('exception' => $e));
698
+ if (!headers_sent() && self::isInstalled()) {
699
  header('Location:' . self::getUrl('install'));
700
  } else {
701
  self::printException($e);
app/code/core/Mage/Admin/Helper/Data.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Acl.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Acl/Assert/Ip.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Acl/Assert/Time.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Acl/Resource.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Acl/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Acl/Role/Generic.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Acl/Role/Group.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Acl/Role/Registry.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Acl/Role/User.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Config.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Mysql4/Acl.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Mysql4/Acl/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Mysql4/Acl/Role/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Mysql4/Permissions/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Mysql4/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Mysql4/Role/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Mysql4/Roles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Mysql4/Roles/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Mysql4/Roles/User/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Mysql4/Rules.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Mysql4/Rules/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Mysql4/User.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Mysql4/User/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Observer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Resource/Acl.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Resource/Acl/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Resource/Acl/Role/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Resource/Permissions/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Resource/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Resource/Role/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Resource/Roles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Resource/Roles/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Resource/Roles/User/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Resource/Rules.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Resource/Rules/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Resource/User.php CHANGED
@@ -20,11 +20,10 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
27
-
28
  /**
29
  * ACL user resource
30
  *
@@ -151,7 +150,7 @@ class Mage_Admin_Model_Resource_User extends Mage_Core_Model_Resource_Db_Abstrac
151
  */
152
  private function _encryptPassword($pwStr)
153
  {
154
- return Mage::helper('core')->getHash($pwStr, 2);
155
  }
156
 
157
  /**
@@ -219,7 +218,7 @@ class Mage_Admin_Model_Resource_User extends Mage_Core_Model_Resource_Db_Abstrac
219
  } catch (Mage_Core_Exception $e) {
220
  throw $e;
221
  return false;
222
- } catch (Exception $e){
223
  $adapter->rollBack();
224
  return false;
225
  }
@@ -238,7 +237,7 @@ class Mage_Admin_Model_Resource_User extends Mage_Core_Model_Resource_Db_Abstrac
238
  {
239
  $rolesIds = $user->getRoleIds();
240
 
241
- if( !is_array($rolesIds) || count($rolesIds) == 0 ) {
242
  return $user;
243
  }
244
 
@@ -275,7 +274,7 @@ class Mage_Admin_Model_Resource_User extends Mage_Core_Model_Resource_Db_Abstrac
275
  $adapter->commit();
276
  } catch (Mage_Core_Exception $e) {
277
  throw $e;
278
- } catch (Exception $e){
279
  $adapter->rollBack();
280
  throw $e;
281
  }
@@ -331,7 +330,7 @@ class Mage_Admin_Model_Resource_User extends Mage_Core_Model_Resource_Db_Abstrac
331
 
332
  $aRoles = $this->hasAssigned2Role($user);
333
  if ( sizeof($aRoles) > 0 ) {
334
- foreach($aRoles as $idx => $data){
335
  $conditions = array(
336
  'role_id = ?' => $data['role_id'],
337
  );
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
 
27
  /**
28
  * ACL user resource
29
  *
150
  */
151
  private function _encryptPassword($pwStr)
152
  {
153
+ return Mage::helper('core')->getHash($pwStr, Mage_Admin_Model_User::HASH_SALT_LENGTH);
154
  }
155
 
156
  /**
218
  } catch (Mage_Core_Exception $e) {
219
  throw $e;
220
  return false;
221
+ } catch (Exception $e) {
222
  $adapter->rollBack();
223
  return false;
224
  }
237
  {
238
  $rolesIds = $user->getRoleIds();
239
 
240
+ if (!is_array($rolesIds) || count($rolesIds) == 0) {
241
  return $user;
242
  }
243
 
274
  $adapter->commit();
275
  } catch (Mage_Core_Exception $e) {
276
  throw $e;
277
+ } catch (Exception $e) {
278
  $adapter->rollBack();
279
  throw $e;
280
  }
330
 
331
  $aRoles = $this->hasAssigned2Role($user);
332
  if ( sizeof($aRoles) > 0 ) {
333
+ foreach ($aRoles as $idx => $data) {
334
  $conditions = array(
335
  'role_id = ?' => $data['role_id'],
336
  );
app/code/core/Mage/Admin/Model/Resource/User/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Roles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Rules.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/Session.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/Model/User.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -60,18 +60,24 @@
60
  */
61
  class Mage_Admin_Model_User extends Mage_Core_Model_Abstract
62
  {
63
- /**
64
  * Configuration paths for email templates and identities
65
  */
66
  const XML_PATH_FORGOT_EMAIL_TEMPLATE = 'admin/emails/forgot_email_template';
67
  const XML_PATH_FORGOT_EMAIL_IDENTITY = 'admin/emails/forgot_email_identity';
68
  const XML_PATH_STARTUP_PAGE = 'admin/startup/page';
 
69
 
70
  /**
71
  * Minimum length of admin password
72
  */
73
  const MIN_PASSWORD_LENGTH = 7;
74
 
 
 
 
 
 
75
  /**
76
  * Model event prefix
77
  *
@@ -116,11 +122,11 @@ class Mage_Admin_Model_User extends Mage_Core_Model_Abstract
116
  'extra' => serialize($this->getExtra())
117
  );
118
 
119
- if($this->getId() > 0) {
120
  $data['user_id'] = $this->getId();
121
  }
122
 
123
- if( $this->getUsername() ) {
124
  $data['username'] = $this->getUsername();
125
  }
126
 
@@ -422,7 +428,18 @@ class Mage_Admin_Model_User extends Mage_Core_Model_Abstract
422
  */
423
  protected function _getEncodedPassword($password)
424
  {
425
- return Mage::helper('core')->getHash($password, 2);
 
 
 
 
 
 
 
 
 
 
 
426
  }
427
 
428
  /**
@@ -596,5 +613,4 @@ class Mage_Admin_Model_User extends Mage_Core_Model_Abstract
596
 
597
  return false;
598
  }
599
-
600
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
60
  */
61
  class Mage_Admin_Model_User extends Mage_Core_Model_Abstract
62
  {
63
+ /**#@+
64
  * Configuration paths for email templates and identities
65
  */
66
  const XML_PATH_FORGOT_EMAIL_TEMPLATE = 'admin/emails/forgot_email_template';
67
  const XML_PATH_FORGOT_EMAIL_IDENTITY = 'admin/emails/forgot_email_identity';
68
  const XML_PATH_STARTUP_PAGE = 'admin/startup/page';
69
+ /**#@-*/
70
 
71
  /**
72
  * Minimum length of admin password
73
  */
74
  const MIN_PASSWORD_LENGTH = 7;
75
 
76
+ /**
77
+ * Length of salt
78
+ */
79
+ const HASH_SALT_LENGTH = 32;
80
+
81
  /**
82
  * Model event prefix
83
  *
122
  'extra' => serialize($this->getExtra())
123
  );
124
 
125
+ if ($this->getId() > 0) {
126
  $data['user_id'] = $this->getId();
127
  }
128
 
129
+ if ($this->getUsername()) {
130
  $data['username'] = $this->getUsername();
131
  }
132
 
428
  */
429
  protected function _getEncodedPassword($password)
430
  {
431
+ return $this->_getHelper('core')->getHash($password, self::HASH_SALT_LENGTH);
432
+ }
433
+
434
+ /**
435
+ * Returns helper instance
436
+ *
437
+ * @param string $helperName
438
+ * @return Mage_Core_Helper_Abstract
439
+ */
440
+ protected function _getHelper($helperName)
441
+ {
442
+ return Mage::helper($helperName);
443
  }
444
 
445
  /**
613
 
614
  return false;
615
  }
 
616
  }
app/code/core/Mage/Admin/data/admin_setup/data-install-1.6.0.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/etc/config.xml CHANGED
@@ -21,14 +21,14 @@
21
  *
22
  * @category Mage
23
  * @package Mage_Admin
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
28
  <config>
29
  <modules>
30
  <Mage_Admin>
31
- <version>1.6.1.0</version>
32
  </Mage_Admin>
33
  </modules>
34
  <global>
21
  *
22
  * @category Mage
23
  * @package Mage_Admin
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
28
  <config>
29
  <modules>
30
  <Mage_Admin>
31
+ <version>1.6.1.1</version>
32
  </Mage_Admin>
33
  </modules>
34
  <global>
app/code/core/Mage/Admin/sql/admin_setup/install-1.6.0.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/sql/admin_setup/mysql4-install-0.7.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-0.7.0-0.7.1.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-0.7.1-0.7.2.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/sql/admin_setup/upgrade-1.6.0.0-1.6.1.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Admin/sql/admin_setup/upgrade-1.6.1.0-1.6.1.1.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Admin
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /** @var $installer Mage_Core_Model_Resource_Setup */
28
+ $installer = $this;
29
+ $installer->startSetup();
30
+
31
+ //Increase password field length
32
+ $installer->getConnection()->changeColumn($installer->getTable('admin/user'), 'password', 'password', array(
33
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
34
+ 'length' => 100,
35
+ 'comment' => 'User Password'
36
+ ));
37
+
38
+ $installer->endSetup();
app/code/core/Mage/AdminNotification/Helper/Data.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/AdminNotification/Model/Feed.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/AdminNotification/Model/Inbox.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/AdminNotification/Model/Mysql4/Inbox.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/AdminNotification/Model/Mysql4/Inbox/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/AdminNotification/Model/Observer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/AdminNotification/Model/Resource/Inbox.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/AdminNotification/Model/Resource/Inbox/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/AdminNotification/Model/Survey.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/AdminNotification/etc/adminhtml.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_AdminNotification
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_AdminNotification
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/AdminNotification/etc/config.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_AdminNotification
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_AdminNotification
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/AdminNotification/etc/system.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_AdminNotification
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_AdminNotification
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/AdminNotification/sql/adminnotification_setup/mysql4-install-1.0.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/AdminNotification/sql/adminnotification_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_AdminNotification
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Controller/Action.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Exception.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Helper/Data.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -54,7 +54,7 @@ class Mage_Api_Helper_Data extends Mage_Core_Helper_Abstract
54
  }
55
 
56
  /**
57
- * Go thru a WSI args array and turns it to correct state.
58
  *
59
  * @param Object $obj - Link to Object
60
  * @return Object
@@ -65,7 +65,7 @@ class Mage_Api_Helper_Data extends Mage_Core_Helper_Abstract
65
 
66
  $modifiedKeys = $this->clearWsiFootprints($obj);
67
 
68
- foreach ($obj as $key => $value) {
69
  if (is_object($value)) {
70
  $this->wsiArrayUnpacker($value);
71
  }
@@ -79,13 +79,15 @@ class Mage_Api_Helper_Data extends Mage_Core_Helper_Abstract
79
  }
80
 
81
  foreach ($modifiedKeys as $arrKey) {
82
- $this->associativeArrayUnpack($obj->$arrKey);
 
 
83
  }
84
  }
85
  }
86
 
87
  /**
88
- * Go thru an object parameters and unpak associative object to array.
89
  *
90
  * @param Object $obj - Link to Object
91
  * @return Object
@@ -103,7 +105,7 @@ class Mage_Api_Helper_Data extends Mage_Core_Helper_Abstract
103
  } elseif (is_array($obj)) {
104
  $arr = array();
105
  $needReplacement = true;
106
- foreach ($obj as $key => &$value) {
107
  $isAssoc = $this->v2AssociativeArrayUnpacker($value);
108
  if ($isAssoc) {
109
  foreach ($value as $aKey => $aVal) {
@@ -127,7 +129,7 @@ class Mage_Api_Helper_Data extends Mage_Core_Helper_Abstract
127
  }
128
 
129
  /**
130
- * Go thru mixed and turns it to a correct look.
131
  *
132
  * @param Mixed $mixed A link to variable that may contain associative array.
133
  */
@@ -197,7 +199,6 @@ class Mage_Api_Helper_Data extends Mage_Core_Helper_Abstract
197
  if (is_array($mixed)) {
198
  $arrKeys = array_keys($mixed);
199
  $isDigit = false;
200
- $isString = false;
201
  foreach ($arrKeys as $key) {
202
  if (is_int($key)) {
203
  $isDigit = true;
@@ -205,9 +206,9 @@ class Mage_Api_Helper_Data extends Mage_Core_Helper_Abstract
205
  }
206
  }
207
  if ($isDigit) {
208
- $mixed = $this->packArrayToObjec($mixed);
209
  } else {
210
- $mixed = (object) $mixed;
211
  }
212
  }
213
  if (is_object($mixed) && isset($mixed->complexObjectArray)) {
@@ -224,7 +225,7 @@ class Mage_Api_Helper_Data extends Mage_Core_Helper_Abstract
224
  * @param Array $arr - Link to Object
225
  * @return Object
226
  */
227
- public function packArrayToObjec(Array $arr)
228
  {
229
  $obj = new stdClass();
230
  $obj->complexObjectArray = $arr;
@@ -275,30 +276,9 @@ class Mage_Api_Helper_Data extends Mage_Core_Helper_Abstract
275
  }
276
  // parse complex filter
277
  if (isset($filters->complex_filter) && is_array($filters->complex_filter)) {
278
- if ($this->isComplianceWSI()) {
279
- // WS-I compliance mode
280
- foreach ($filters->complex_filter as $fieldName => $condition) {
281
- if (is_object($condition) && isset($condition->key) && isset($condition->value)) {
282
- $conditionName = $condition->key;
283
- $conditionValue = $condition->value;
284
- $this->formatFilterConditionValue($conditionName, $conditionValue);
285
- $parsedFilters[$fieldName] = array($conditionName => $conditionValue);
286
- }
287
- }
288
- } else {
289
- // non WS-I compliance mode
290
- foreach ($filters->complex_filter as $value) {
291
- if (is_object($value) && isset($value->key) && isset($value->value)) {
292
- $fieldName = $value->key;
293
- $condition = $value->value;
294
- if (is_object($condition) && isset($condition->key) && isset($condition->value)) {
295
- $this->formatFilterConditionValue($condition->key, $condition->value);
296
- $parsedFilters[$fieldName] = array($condition->key => $condition->value);
297
- }
298
- }
299
- }
300
- }
301
  }
 
302
  $filters = $parsedFilters;
303
  }
304
  // make sure that method result is always array
@@ -318,6 +298,37 @@ class Mage_Api_Helper_Data extends Mage_Core_Helper_Abstract
318
  return $filters;
319
  }
320
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
  /**
322
  * Convert condition value from the string into the array
323
  * for the condition operators that require value to be an array.
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
54
  }
55
 
56
  /**
57
+ * Go through a WSI args array and turns it to correct state.
58
  *
59
  * @param Object $obj - Link to Object
60
  * @return Object
65
 
66
  $modifiedKeys = $this->clearWsiFootprints($obj);
67
 
68
+ foreach ($obj as $value) {
69
  if (is_object($value)) {
70
  $this->wsiArrayUnpacker($value);
71
  }
79
  }
80
 
81
  foreach ($modifiedKeys as $arrKey) {
82
+ if ($arrKey !== 'complex_filter') {
83
+ $this->associativeArrayUnpack($obj->$arrKey);
84
+ }
85
  }
86
  }
87
  }
88
 
89
  /**
90
+ * Go through an object parameters and unpack associative object to array.
91
  *
92
  * @param Object $obj - Link to Object
93
  * @return Object
105
  } elseif (is_array($obj)) {
106
  $arr = array();
107
  $needReplacement = true;
108
+ foreach ($obj as &$value) {
109
  $isAssoc = $this->v2AssociativeArrayUnpacker($value);
110
  if ($isAssoc) {
111
  foreach ($value as $aKey => $aVal) {
129
  }
130
 
131
  /**
132
+ * Go through mixed and turns it to a correct look.
133
  *
134
  * @param Mixed $mixed A link to variable that may contain associative array.
135
  */
199
  if (is_array($mixed)) {
200
  $arrKeys = array_keys($mixed);
201
  $isDigit = false;
 
202
  foreach ($arrKeys as $key) {
203
  if (is_int($key)) {
204
  $isDigit = true;
206
  }
207
  }
208
  if ($isDigit) {
209
+ $mixed = $this->packArrayToObject($mixed);
210
  } else {
211
+ $mixed = (object)$mixed;
212
  }
213
  }
214
  if (is_object($mixed) && isset($mixed->complexObjectArray)) {
225
  * @param Array $arr - Link to Object
226
  * @return Object
227
  */
228
+ public function packArrayToObject(Array $arr)
229
  {
230
  $obj = new stdClass();
231
  $obj->complexObjectArray = $arr;
276
  }
277
  // parse complex filter
278
  if (isset($filters->complex_filter) && is_array($filters->complex_filter)) {
279
+ $parsedFilters += $this->_parseComplexFilter($filters->complex_filter);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
280
  }
281
+
282
  $filters = $parsedFilters;
283
  }
284
  // make sure that method result is always array
298
  return $filters;
299
  }
300
 
301
+ /**
302
+ * Parses complex filter, which may contain several nodes, e.g. when user want to fetch orders which were updated
303
+ * between two dates.
304
+ *
305
+ * @param array $complexFilter
306
+ * @return array
307
+ */
308
+ protected function _parseComplexFilter($complexFilter)
309
+ {
310
+ $parsedFilters = array();
311
+
312
+ foreach ($complexFilter as $filter) {
313
+ if (!isset($filter->key) || !isset($filter->value)) {
314
+ continue;
315
+ }
316
+
317
+ list($fieldName, $condition) = array($filter->key, $filter->value);
318
+ $conditionName = $condition->key;
319
+ $conditionValue = $condition->value;
320
+ $this->formatFilterConditionValue($conditionName, $conditionValue);
321
+
322
+ if (array_key_exists($fieldName, $parsedFilters)) {
323
+ $parsedFilters[$fieldName] += array($conditionName => $conditionValue);
324
+ } else {
325
+ $parsedFilters[$fieldName] = array($conditionName => $conditionValue);
326
+ }
327
+ }
328
+
329
+ return $parsedFilters;
330
+ }
331
+
332
  /**
333
  * Convert condition value from the string into the array
334
  * for the condition operators that require value to be an array.
app/code/core/Mage/Api/Model/Acl.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Acl/Assert/Ip.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Acl/Assert/Time.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Acl/Resource.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Acl/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Acl/Role/Generic.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Acl/Role/Group.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Acl/Role/Registry.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Acl/Role/User.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Config.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Mysql4/Acl.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Mysql4/Acl/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Mysql4/Acl/Role/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Mysql4/Permissions/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Mysql4/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Mysql4/Role/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Mysql4/Roles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Mysql4/Roles/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Mysql4/Roles/User/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Mysql4/Rules.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Mysql4/Rules/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Mysql4/User.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Mysql4/User/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Resource/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Resource/Acl.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Resource/Acl/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Resource/Acl/Role/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Resource/Permissions/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Resource/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Resource/Role/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Resource/Roles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Resource/Roles/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Resource/Roles/User/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Resource/Rules.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Resource/Rules/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Resource/User.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Resource/User/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Roles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Rules.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Server.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Server/Adapter/Interface.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Server/Adapter/Soap.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Server/Adapter/Xmlrpc.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Server/Handler.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Server/Handler/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -287,7 +287,7 @@ abstract class Mage_Api_Model_Server_Handler_Abstract
287
  throw new Mage_Api_Exception('resource_path_not_callable');
288
  }
289
 
290
- if (is_callable(array(&$model, $method))) {
291
  if (isset($methodInfo->arguments) && ((string)$methodInfo->arguments) == 'array') {
292
  return $model->$method((is_array($args) ? $args : array($args)));
293
  } elseif (!is_array($args)) {
@@ -400,7 +400,7 @@ abstract class Mage_Api_Model_Server_Handler_Abstract
400
  throw new Mage_Api_Exception('resource_path_not_callable');
401
  }
402
 
403
- if (is_callable(array(&$model, $method))) {
404
  if (isset($methodInfo->arguments) && ((string)$methodInfo->arguments) == 'array') {
405
  $result[] = $model->$method((is_array($args) ? $args : array($args)));
406
  } elseif (!is_array($args)) {
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
287
  throw new Mage_Api_Exception('resource_path_not_callable');
288
  }
289
 
290
+ if (method_exists($model, $method)) {
291
  if (isset($methodInfo->arguments) && ((string)$methodInfo->arguments) == 'array') {
292
  return $model->$method((is_array($args) ? $args : array($args)));
293
  } elseif (!is_array($args)) {
400
  throw new Mage_Api_Exception('resource_path_not_callable');
401
  }
402
 
403
+ if (method_exists($model, $method)) {
404
  if (isset($methodInfo->arguments) && ((string)$methodInfo->arguments) == 'array') {
405
  $result[] = $model->$method((is_array($args) ? $args : array($args)));
406
  } elseif (!is_array($args)) {
app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -61,16 +61,20 @@ class Mage_Api_Model_Server_V2_Adapter_Soap extends Mage_Api_Model_Server_Adapte
61
  try {
62
  $this->_instantiateServer();
63
 
 
 
 
 
 
 
 
 
 
64
  $this->getController()->getResponse()
65
  ->clearHeaders()
66
- ->setHeader('Content-Type','text/xml; charset='.$apiConfigCharset)
67
- ->setBody(
68
- preg_replace(
69
- '/<\?xml version="([^\"]+)"([^\>]+)>/i',
70
- '<?xml version="$1" encoding="'.$apiConfigCharset.'"?>',
71
- $this->_soap->handle()
72
- )
73
- );
74
  } catch( Zend_Soap_Server_Exception $e ) {
75
  $this->fault( $e->getCode(), $e->getMessage() );
76
  } catch( Exception $e ) {
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
61
  try {
62
  $this->_instantiateServer();
63
 
64
+ $content = str_replace(
65
+ '><',
66
+ ">\n<",
67
+ preg_replace(
68
+ '/<\?xml version="([^\"]+)"([^\>]+)>/i',
69
+ '<?xml version="$1" encoding="' . $apiConfigCharset . '"?>',
70
+ $this->_soap->handle()
71
+ )
72
+ );
73
  $this->getController()->getResponse()
74
  ->clearHeaders()
75
+ ->setHeader('Content-Type', 'text/xml; charset=' . $apiConfigCharset)
76
+ ->setHeader('Content-Length', strlen($content), true)
77
+ ->setBody($content);
 
 
 
 
 
78
  } catch( Zend_Soap_Server_Exception $e ) {
79
  $this->fault( $e->getCode(), $e->getMessage() );
80
  } catch( Exception $e ) {
app/code/core/Mage/Api/Model/Server/V2/Handler.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -73,28 +73,33 @@ class Mage_Api_Model_Server_WSI_Adapter_Soap extends Mage_Api_Model_Server_Adapt
73
  try {
74
  $this->_instantiateServer();
75
 
76
- $this->getController()->getResponse()
77
- ->clearHeaders()
78
- ->setHeader('Content-Type','text/xml; charset='.$apiConfigCharset)
79
- ->setBody(
 
 
80
  str_replace(
81
- '<soap:operation soapAction=""></soap:operation>',
82
- "<soap:operation soapAction=\"\" />\n",
83
- str_replace(
84
- '<soap:body use="literal"></soap:body>',
85
- "<soap:body use=\"literal\" />\n",
86
- preg_replace(
87
- '/<\?xml version="([^\"]+)"([^\>]+)>/i',
88
- '<?xml version="$1" encoding="'.$apiConfigCharset.'"?>',
89
- $this->_soap->handle()
90
- )
91
  )
92
  )
93
- );
94
- } catch( Zend_Soap_Server_Exception $e ) {
95
- $this->fault( $e->getCode(), $e->getMessage() );
96
- } catch( Exception $e ) {
97
- $this->fault( $e->getCode(), $e->getMessage() );
 
 
 
 
 
 
 
98
  }
99
  }
100
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
73
  try {
74
  $this->_instantiateServer();
75
 
76
+ $content = str_replace(
77
+ '><',
78
+ ">\n<",
79
+ str_replace(
80
+ '<soap:operation soapAction=""></soap:operation>',
81
+ "<soap:operation soapAction=\"\" />\n",
82
  str_replace(
83
+ '<soap:body use="literal"></soap:body>',
84
+ "<soap:body use=\"literal\" />\n",
85
+ preg_replace(
86
+ '/<\?xml version="([^\"]+)"([^\>]+)>/i',
87
+ '<?xml version="$1" encoding="' . $apiConfigCharset . '"?>',
88
+ $this->_soap->handle()
 
 
 
 
89
  )
90
  )
91
+ )
92
+ );
93
+
94
+ $this->getController()->getResponse()
95
+ ->clearHeaders()
96
+ ->setHeader('Content-Type', 'text/xml; charset=' . $apiConfigCharset)
97
+ ->setHeader('Content-Length', strlen($content), true)
98
+ ->setBody($content);
99
+ } catch (Zend_Soap_Server_Exception $e) {
100
+ $this->fault($e->getCode(), $e->getMessage());
101
+ } catch (Exception $e) {
102
+ $this->fault($e->getCode(), $e->getMessage());
103
  }
104
  }
105
 
app/code/core/Mage/Api/Model/Server/Wsi/Handler.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -176,4 +176,16 @@ class Mage_Api_Model_Server_WSI_Handler extends Mage_Api_Model_Server_Handler_Ab
176
  return $callArgs;
177
  }
178
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
176
  return $callArgs;
177
  }
178
 
179
+ /**
180
+ * End web service session
181
+ *
182
+ * @param object $request
183
+ * @return stdClass
184
+ */
185
+ public function endSession($request)
186
+ {
187
+ $stdObject = new stdClass();
188
+ $stdObject->result = parent::endSession($request->sessionId);
189
+ return $stdObject;
190
+ }
191
  }
app/code/core/Mage/Api/Model/Session.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/User.php CHANGED
@@ -20,12 +20,12 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
27
  /**
28
- * Enter description here ...
29
  *
30
  * @method Mage_Api_Model_Resource_User _getResource()
31
  * @method Mage_Api_Model_Resource_User getResource()
@@ -63,11 +63,19 @@ class Mage_Api_Model_User extends Mage_Core_Model_Abstract
63
  */
64
  protected $_eventPrefix = 'api_user';
65
 
 
 
 
66
  protected function _construct()
67
  {
68
  $this->_init('api/user');
69
  }
70
 
 
 
 
 
 
71
  public function save()
72
  {
73
  $this->_beforeSave();
@@ -78,11 +86,11 @@ class Mage_Api_Model_User extends Mage_Core_Model_Abstract
78
  'modified' => Mage::getSingleton('core/date')->gmtDate()
79
  );
80
 
81
- if($this->getId() > 0) {
82
  $data['user_id'] = $this->getId();
83
  }
84
 
85
- if( $this->getUsername() ) {
86
  $data['username'] = $this->getUsername();
87
  }
88
 
@@ -104,6 +112,11 @@ class Mage_Api_Model_User extends Mage_Core_Model_Abstract
104
  return $this;
105
  }
106
 
 
 
 
 
 
107
  public function delete()
108
  {
109
  $this->_beforeDelete();
@@ -112,50 +125,96 @@ class Mage_Api_Model_User extends Mage_Core_Model_Abstract
112
  return $this;
113
  }
114
 
 
 
 
 
 
115
  public function saveRelations()
116
  {
117
  $this->_getResource()->_saveRelations($this);
118
  return $this;
119
  }
120
 
 
 
 
 
 
121
  public function getRoles()
122
  {
123
  return $this->_getResource()->_getRoles($this);
124
  }
125
 
 
 
 
 
 
126
  public function deleteFromRole()
127
  {
128
  $this->_getResource()->deleteFromRole($this);
129
  return $this;
130
  }
131
 
 
 
 
 
 
132
  public function roleUserExists()
133
  {
134
  $result = $this->_getResource()->roleUserExists($this);
135
  return ( is_array($result) && count($result) > 0 ) ? true : false;
136
  }
137
 
 
 
 
 
 
138
  public function add()
139
  {
140
  $this->_getResource()->add($this);
141
  return $this;
142
  }
143
 
 
 
 
 
 
144
  public function userExists()
145
  {
146
  $result = $this->_getResource()->userExists($this);
147
  return ( is_array($result) && count($result) > 0 ) ? true : false;
148
  }
149
 
 
 
 
 
 
150
  public function getCollection() {
151
  return Mage::getResourceModel('api/user_collection');
152
  }
153
 
154
- public function getName($separator=' ')
 
 
 
 
 
 
155
  {
156
  return $this->getFirstname().$separator.$this->getLastname();
157
  }
158
 
 
 
 
 
 
159
  public function getId()
160
  {
161
  return $this->getUserId();
@@ -196,7 +255,7 @@ class Mage_Api_Model_User extends Mage_Core_Model_Abstract
196
  /**
197
  * Login user
198
  *
199
- * @param string $login
200
  * @param string $apiKey
201
  * @return Mage_Api_Model_User
202
  */
@@ -217,38 +276,83 @@ class Mage_Api_Model_User extends Mage_Core_Model_Abstract
217
  return $this;
218
  }
219
 
 
 
 
 
 
220
  public function reload()
221
  {
222
  $this->load($this->getId());
223
  return $this;
224
  }
225
 
 
 
 
 
 
 
226
  public function loadByUsername($username)
227
  {
228
  $this->setData($this->getResource()->loadByUsername($username));
229
  return $this;
230
  }
231
 
 
 
 
 
 
 
232
  public function loadBySessId ($sessId)
233
  {
234
  $this->setData($this->getResource()->loadBySessId($sessId));
235
  return $this;
236
  }
237
 
 
 
 
 
 
 
238
  public function logoutBySessId($sessid)
239
  {
240
  $this->getResource()->clearBySessId($sessid);
241
  return $this;
242
  }
243
 
 
 
 
 
 
 
244
  public function hasAssigned2Role($user)
245
  {
246
  return $this->getResource()->hasAssigned2Role($user);
247
  }
248
 
 
 
 
 
 
 
249
  protected function _getEncodedApiKey($apiKey)
250
  {
251
- return Mage::helper('core')->getHash($apiKey, 2);
252
  }
253
 
 
 
 
 
 
 
 
 
 
 
254
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
27
  /**
28
+ * Api model
29
  *
30
  * @method Mage_Api_Model_Resource_User _getResource()
31
  * @method Mage_Api_Model_Resource_User getResource()
63
  */
64
  protected $_eventPrefix = 'api_user';
65
 
66
+ /**
67
+ * Constructor
68
+ */
69
  protected function _construct()
70
  {
71
  $this->_init('api/user');
72
  }
73
 
74
+ /**
75
+ * Save user
76
+ *
77
+ * @return Mage_Api_Model_User|Mage_Core_Model_Abstract
78
+ */
79
  public function save()
80
  {
81
  $this->_beforeSave();
86
  'modified' => Mage::getSingleton('core/date')->gmtDate()
87
  );
88
 
89
+ if ($this->getId() > 0) {
90
  $data['user_id'] = $this->getId();
91
  }
92
 
93
+ if ( $this->getUsername() ) {
94
  $data['username'] = $this->getUsername();
95
  }
96
 
112
  return $this;
113
  }
114
 
115
+ /**
116
+ * Delete user
117
+ *
118
+ * @return Mage_Api_Model_User|Mage_Core_Model_Abstract
119
+ */
120
  public function delete()
121
  {
122
  $this->_beforeDelete();
125
  return $this;
126
  }
127
 
128
+ /**
129
+ * Save relations for users
130
+ *
131
+ * @return Mage_Api_Model_User
132
+ */
133
  public function saveRelations()
134
  {
135
  $this->_getResource()->_saveRelations($this);
136
  return $this;
137
  }
138
 
139
+ /**
140
+ * Get user roles
141
+ *
142
+ * @return array
143
+ */
144
  public function getRoles()
145
  {
146
  return $this->_getResource()->_getRoles($this);
147
  }
148
 
149
+ /**
150
+ * Delete user from role
151
+ *
152
+ * @return Mage_Api_Model_User
153
+ */
154
  public function deleteFromRole()
155
  {
156
  $this->_getResource()->deleteFromRole($this);
157
  return $this;
158
  }
159
 
160
+ /**
161
+ * Check is user role exists
162
+ *
163
+ * @return bool
164
+ */
165
  public function roleUserExists()
166
  {
167
  $result = $this->_getResource()->roleUserExists($this);
168
  return ( is_array($result) && count($result) > 0 ) ? true : false;
169
  }
170
 
171
+ /**
172
+ * Add user
173
+ *
174
+ * @return Mage_Api_Model_User
175
+ */
176
  public function add()
177
  {
178
  $this->_getResource()->add($this);
179
  return $this;
180
  }
181
 
182
+ /**
183
+ * Check if user exists
184
+ *
185
+ * @return bool
186
+ */
187
  public function userExists()
188
  {
189
  $result = $this->_getResource()->userExists($this);
190
  return ( is_array($result) && count($result) > 0 ) ? true : false;
191
  }
192
 
193
+ /**
194
+ * Get collection of users
195
+ *
196
+ * @return Object|Mage_Api_Model_Resource_User_Collection
197
+ */
198
  public function getCollection() {
199
  return Mage::getResourceModel('api/user_collection');
200
  }
201
 
202
+ /**
203
+ * Get user's name
204
+ *
205
+ * @param string $separator
206
+ * @return string
207
+ */
208
+ public function getName($separator = ' ')
209
  {
210
  return $this->getFirstname().$separator.$this->getLastname();
211
  }
212
 
213
+ /**
214
+ * Get user's id
215
+ *
216
+ * @return string
217
+ */
218
  public function getId()
219
  {
220
  return $this->getUserId();
255
  /**
256
  * Login user
257
  *
258
+ * @param string $username
259
  * @param string $apiKey
260
  * @return Mage_Api_Model_User
261
  */
276
  return $this;
277
  }
278
 
279
+ /**
280
+ * Reload user
281
+ *
282
+ * @return Mage_Api_Model_User
283
+ */
284
  public function reload()
285
  {
286
  $this->load($this->getId());
287
  return $this;
288
  }
289
 
290
+ /**
291
+ * Load user by username
292
+ *
293
+ * @param string $username
294
+ * @return Mage_Api_Model_User
295
+ */
296
  public function loadByUsername($username)
297
  {
298
  $this->setData($this->getResource()->loadByUsername($username));
299
  return $this;
300
  }
301
 
302
+ /**
303
+ * Load user by session id
304
+ *
305
+ * @param string $sessId
306
+ * @return Mage_Api_Model_User
307
+ */
308
  public function loadBySessId ($sessId)
309
  {
310
  $this->setData($this->getResource()->loadBySessId($sessId));
311
  return $this;
312
  }
313
 
314
+ /**
315
+ * Logout user by session id
316
+ *
317
+ * @param string $sessid
318
+ * @return Mage_Api_Model_User
319
+ */
320
  public function logoutBySessId($sessid)
321
  {
322
  $this->getResource()->clearBySessId($sessid);
323
  return $this;
324
  }
325
 
326
+ /**
327
+ * Check if user is assigned to role
328
+ *
329
+ * @param int|Mage_Core_Model_Abstract $user
330
+ * @return array|null
331
+ */
332
  public function hasAssigned2Role($user)
333
  {
334
  return $this->getResource()->hasAssigned2Role($user);
335
  }
336
 
337
+ /**
338
+ * Retrieve encoded api key
339
+ *
340
+ * @param string $apiKey
341
+ * @return string
342
+ */
343
  protected function _getEncodedApiKey($apiKey)
344
  {
345
+ return $this->_getHelper('core')->getHash($apiKey, Mage_Admin_Model_User::HASH_SALT_LENGTH);
346
  }
347
 
348
+ /**
349
+ * Get helper instance
350
+ *
351
+ * @param string $helperName
352
+ * @return Mage_Core_Helper_Abstract
353
+ */
354
+ protected function _getHelper($helperName)
355
+ {
356
+ return Mage::helper($helperName);
357
+ }
358
  }
app/code/core/Mage/Api/Model/Wsdl/Config.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Wsdl/Config/Base.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/Model/Wsdl/Config/Element.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/controllers/IndexController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/controllers/SoapController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/controllers/V2/SoapController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/controllers/XmlrpcController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/etc/adminhtml.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_Api
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_Api
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/Api/etc/api.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_Api
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_Api
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/Api/etc/config.xml CHANGED
@@ -21,14 +21,14 @@
21
  *
22
  * @category Mage
23
  * @package Mage_Api
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
28
  <config>
29
  <modules>
30
  <Mage_Api>
31
- <version>1.6.0.0</version>
32
  </Mage_Api>
33
  </modules>
34
  <global>
21
  *
22
  * @category Mage
23
  * @package Mage_Api
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
28
  <config>
29
  <modules>
30
  <Mage_Api>
31
+ <version>1.6.0.1</version>
32
  </Mage_Api>
33
  </modules>
34
  <global>
app/code/core/Mage/Api/etc/system.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_Api
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_Api
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/Api/sql/api_setup/install-1.6.0.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/sql/api_setup/mysql4-install-0.7.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.7.0-0.7.1.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.8.0-0.8.1.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-1.6.0.0-1.6.0.1.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Api
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /* @var $this Mage_Core_Model_Resource_Setup */
28
+ $this->startSetup();
29
+
30
+ $this->getConnection()->changeColumn(
31
+ $this->getTable('api/user'),
32
+ 'api_key',
33
+ 'api_key',
34
+ array(
35
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
36
+ 'length' => 100,
37
+ 'comment' => 'Api key'
38
+ )
39
+ );
40
+
41
+ $this->endSetup();
app/code/core/Mage/Api2/Block/Adminhtml/Attribute.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Buttons.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Tab/Resource.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Block/Adminhtml/Permissions/User/Edit/Tab/Roles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Block/Adminhtml/Roles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Block/Adminhtml/Roles/Buttons.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Block/Adminhtml/Roles/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Block/Adminhtml/Roles/Tab/Info.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -60,10 +60,7 @@ class Mage_Api2_Block_Adminhtml_Roles_Tab_Info extends Mage_Adminhtml_Block_Widg
60
  /** @var $helper Mage_Core_Helper_Data */
61
  $helper = Mage::helper('core');
62
 
63
- $data['note'] = Mage::helper('api2')->__(
64
- '%s role is protected.',
65
- $helper->escapeHtml($this->getRole()->getRoleName())
66
- );
67
  $data['readonly'] = 'readonly';
68
  }
69
  $fieldset->addField('role_name', 'text', $data);
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
60
  /** @var $helper Mage_Core_Helper_Data */
61
  $helper = Mage::helper('core');
62
 
63
+ $data['note'] = Mage::helper('api2')->__('%s role is protected.', $helper->escapeHtml($this->getRole()->getRoleName()));
 
 
 
64
  $data['readonly'] = 'readonly';
65
  }
66
  $fieldset->addField('role_name', 'text', $data);
app/code/core/Mage/Api2/Block/Adminhtml/Roles/Tab/Resources.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Block/Adminhtml/Roles/Tab/Users.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Block/Adminhtml/Roles/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Exception.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Helper/Data.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Acl.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Acl/Filter.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Acl/Filter/Attribute.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Acl/Filter/Attribute/Operation.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Acl/Filter/Attribute/ResourcePermission.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Acl/Global.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Acl/Global/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -96,8 +96,7 @@ class Mage_Api2_Model_Acl_Global_Role extends Mage_Core_Model_Abstract
96
  $helper = Mage::helper('core');
97
 
98
  Mage::throwException(
99
- Mage::helper('api2')->__('%s role is a special one and can\'t be changed.',
100
- $helper->escapeHtml($this->getRoleName()))
101
  );
102
  }
103
 
@@ -117,8 +116,7 @@ class Mage_Api2_Model_Acl_Global_Role extends Mage_Core_Model_Abstract
117
  $helper = Mage::helper('core');
118
 
119
  Mage::throwException(
120
- Mage::helper('api2')->__('%s role is a special one and can\'t be deleted.',
121
- $helper->escapeHtml($this->getRoleName()))
122
  );
123
  }
124
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
96
  $helper = Mage::helper('core');
97
 
98
  Mage::throwException(
99
+ Mage::helper('api2')->__('%s role is a special one and can\'t be changed.', $helper->escapeHtml($this->getRoleName()))
 
100
  );
101
  }
102
 
116
  $helper = Mage::helper('core');
117
 
118
  Mage::throwException(
119
+ Mage::helper('api2')->__('%s role is a special one and can\'t be deleted.', $helper->escapeHtml($this->getRoleName()))
 
120
  );
121
  }
122
 
app/code/core/Mage/Api2/Model/Acl/Global/Rule.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Acl/Global/Rule/Permission.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Acl/Global/Rule/Privilege.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Acl/Global/Rule/ResourcePermission.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Acl/Global/Rule/Tree.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Acl/PermissionInterface.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Auth.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Auth/Adapter.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Auth/Adapter/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Auth/Adapter/Oauth.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Auth/User.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Auth/User/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Auth/User/Admin.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Auth/User/Customer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Auth/User/Guest.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Config.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Dispatcher.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Multicall.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Observer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Renderer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Renderer/Interface.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Renderer/Json.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Renderer/Query.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Renderer/Xml.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Renderer/Xml/Writer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Request.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Request/Internal.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Request/Interpreter.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Request/Interpreter/Interface.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Request/Interpreter/Json.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Request/Interpreter/Query.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Request/Interpreter/Xml.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Resource.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Resource/Acl/Filter/Attribute.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Resource/Acl/Filter/Attribute/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Resource/Acl/Global/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Resource/Acl/Global/Role/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Resource/Acl/Global/Rule.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Resource/Acl/Global/Rule/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Resource/Setup.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Resource/Validator.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Resource/Validator/Eav.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -222,11 +222,10 @@ class Mage_Api2_Model_Resource_Validator_Eav extends Mage_Api2_Model_Resource_Va
222
  {
223
  // business asked to avoid additional validation message, so we filter it here
224
  $errors = array();
225
- $helper = Mage::helper('eav');
226
  $requiredAttrs = array();
227
- $isRequiredRE = '/^' . str_replace('%s', '(.+)', preg_quote($helper->__('"%s" is a required value.'))). '$/';
228
  $greaterThanRE = '/^' . str_replace(
229
- '%s', '(.+)', preg_quote($helper->__('"%s" length must be equal or greater than %s characters.'))
230
  ) . '$/';
231
 
232
  // find all required attributes labels
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
222
  {
223
  // business asked to avoid additional validation message, so we filter it here
224
  $errors = array();
 
225
  $requiredAttrs = array();
226
+ $isRequiredRE = '/^' . str_replace('%s', '(.+)', preg_quote(Mage::helper('eav')->__('"%s" is a required value.'))) . '$/';
227
  $greaterThanRE = '/^' . str_replace(
228
+ '%s', '(.+)', preg_quote(Mage::helper('eav')->__('"%s" length must be equal or greater than %s characters.'))
229
  ) . '$/';
230
 
231
  // find all required attributes labels
app/code/core/Mage/Api2/Model/Resource/Validator/Fields.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Response.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Route/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Route/ApiType.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Route/Interface.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Route/Rest.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Router.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/Model/Server.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/controllers/Adminhtml/Api2/AttributeController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/controllers/Adminhtml/Api2/RoleController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Api2/etc/adminhtml.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_Api2
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_Api2
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/Api2/etc/config.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_Api2
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_Api2
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/Api2/sql/api2_setup/install-1.0.0.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  /**
20
  *
21
  * @category Mage
22
  * @package Mage_Api2
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  /**
app/code/core/Mage/Authorizenet/Block/Directpost/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Authorizenet/Block/Directpost/Iframe.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Authorizenet/Helper/Data.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -126,7 +126,8 @@ class Mage_Authorizenet_Helper_Data extends Mage_Core_Helper_Abstract
126
  */
127
  public function getPlaceOrderFrontUrl()
128
  {
129
- return $this->_getUrl('authorizenet/directpost_payment/place');
 
130
  }
131
 
132
  /**
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
126
  */
127
  public function getPlaceOrderFrontUrl()
128
  {
129
+ $params = array(Mage_Core_Model_Url::FORM_KEY => Mage::getSingleton('core/session')->getFormKey());
130
+ return $this->_getUrl('authorizenet/directpost_payment/place', $params);
131
  }
132
 
133
  /**
app/code/core/Mage/Authorizenet/Model/Directpost.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -426,6 +426,13 @@ class Mage_Authorizenet_Model_Directpost extends Mage_Paygate_Model_Authorizenet
426
  if ($orderIncrementId) {
427
  /* @var $order Mage_Sales_Model_Order */
428
  $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
 
 
 
 
 
 
 
429
  if ($order->getId() && $order->getState() == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) {
430
  //operate with order
431
  $this->_authOrder($order);
@@ -536,12 +543,8 @@ class Mage_Authorizenet_Model_Directpost extends Mage_Paygate_Model_Authorizenet
536
 
537
  $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH);
538
 
539
- // Set transaction apporval message
540
- $message = Mage::helper('authorizenet')->__(
541
- 'Amount of %s approved by payment gateway. Transaction ID: "%s".',
542
- $order->getBaseCurrency()->formatTxt($payment->getBaseAmountAuthorized()),
543
- $response->getXTransId()
544
- );
545
 
546
  $orderState = Mage_Sales_Model_Order::STATE_PROCESSING;
547
  $orderStatus = $this->getConfigData('order_status');
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
426
  if ($orderIncrementId) {
427
  /* @var $order Mage_Sales_Model_Order */
428
  $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
429
+ //check payment method
430
+ $payment = $order->getPayment();
431
+ if (!$payment || $payment->getMethod() != $this->getCode()) {
432
+ Mage::throwException(
433
+ Mage::helper('authorizenet')->__('Payment error. Order was not found.')
434
+ );
435
+ }
436
  if ($order->getId() && $order->getState() == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) {
437
  //operate with order
438
  $this->_authOrder($order);
543
 
544
  $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH);
545
 
546
+ // Set transaction approval message
547
+ $message = Mage::helper('authorizenet')->__('Amount of %s approved by payment gateway. Transaction ID: "%s".', $order->getBaseCurrency()->formatTxt($payment->getBaseAmountAuthorized()), $response->getXTransId());
 
 
 
 
548
 
549
  $orderState = Mage_Sales_Model_Order::STATE_PROCESSING;
550
  $orderStatus = $this->getConfigData('order_status');
app/code/core/Mage/Authorizenet/Model/Directpost/Observer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Authorizenet/Model/Directpost/Request.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Authorizenet/Model/Directpost/Response.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Authorizenet/Model/Directpost/Session.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Authorizenet/controllers/Adminhtml/Authorizenet/Directpost/PaymentController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Authorizenet/controllers/Directpost/PaymentController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Authorizenet
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Authorizenet/etc/config.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_Authorizenet
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_Authorizenet
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/Authorizenet/etc/system.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_Authorizenet
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_Authorizenet
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/Backup/Exception.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Backup/Helper/Data.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -62,10 +62,10 @@ class Mage_Backup_Helper_Data extends Mage_Core_Helper_Abstract
62
  public function getBackupTypes()
63
  {
64
  return array(
65
- self::TYPE_DB => self::__('Database'),
66
- self::TYPE_MEDIA => self::__('Database and Media'),
67
- self::TYPE_SYSTEM_SNAPSHOT => self::__('System'),
68
- self::TYPE_SNAPSHOT_WITHOUT_MEDIA => self::__('System (excluding Media)')
69
  );
70
  }
71
 
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
62
  public function getBackupTypes()
63
  {
64
  return array(
65
+ self::TYPE_DB => $this->__('Database'),
66
+ self::TYPE_MEDIA => $this->__('Database and Media'),
67
+ self::TYPE_SYSTEM_SNAPSHOT => $this->__('System'),
68
+ self::TYPE_SNAPSHOT_WITHOUT_MEDIA => $this->__('System (excluding Media)')
69
  );
70
  }
71
 
app/code/core/Mage/Backup/Model/Backup.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Backup/Model/Config/Backend/Cron.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Backup/Model/Config/Source/Type.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Backup/Model/Db.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Backup/Model/Fs/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Backup/Model/Mysql4/Db.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Backup/Model/Observer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Backup/Model/Resource/Db.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Backup/Model/Resource/Helper/Mysql4.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Backup
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Backup/etc/adminhtml.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_Backup
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_Backup
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/Backup/etc/config.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_Backup
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_Backup
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/Backup/etc/system.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_Backup
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_Backup
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Bundle.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Special.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -77,7 +77,9 @@ class Mage_Bundle_Block_Adminhtml_Sales_Order_Items_Renderer extends Mage_Adminh
77
  }
78
  if ($parentItem = $item->getParentItem()) {
79
  if ($options = $parentItem->getProductOptions()) {
80
- if (isset($options['shipment_type']) && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY) {
 
 
81
  return true;
82
  } else {
83
  return false;
@@ -85,7 +87,9 @@ class Mage_Bundle_Block_Adminhtml_Sales_Order_Items_Renderer extends Mage_Adminh
85
  }
86
  } else {
87
  if ($options = $item->getProductOptions()) {
88
- if (isset($options['shipment_type']) && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY) {
 
 
89
  return false;
90
  } else {
91
  return true;
@@ -95,7 +99,9 @@ class Mage_Bundle_Block_Adminhtml_Sales_Order_Items_Renderer extends Mage_Adminh
95
  }
96
 
97
  if ($options = $this->getOrderItem()->getProductOptions()) {
98
- if (isset($options['shipment_type']) && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY) {
 
 
99
  return true;
100
  }
101
  }
@@ -110,7 +116,9 @@ class Mage_Bundle_Block_Adminhtml_Sales_Order_Items_Renderer extends Mage_Adminh
110
  }
111
  if ($parentItem = $item->getParentItem()) {
112
  if ($options = $parentItem->getProductOptions()) {
113
- if (isset($options['product_calculations']) && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD) {
 
 
114
  return true;
115
  } else {
116
  return false;
@@ -118,7 +126,9 @@ class Mage_Bundle_Block_Adminhtml_Sales_Order_Items_Renderer extends Mage_Adminh
118
  }
119
  } else {
120
  if ($options = $item->getProductOptions()) {
121
- if (isset($options['product_calculations']) && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD) {
 
 
122
  return false;
123
  } else {
124
  return true;
@@ -129,7 +139,8 @@ class Mage_Bundle_Block_Adminhtml_Sales_Order_Items_Renderer extends Mage_Adminh
129
 
130
  if ($options = $this->getOrderItem()->getProductOptions()) {
131
  if (isset($options['product_calculations'])
132
- && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD) {
 
133
  return true;
134
  }
135
  }
@@ -177,7 +188,7 @@ class Mage_Bundle_Block_Adminhtml_Sales_Order_Items_Renderer extends Mage_Adminh
177
 
178
  public function getValueHtml($item)
179
  {
180
- $result = $this->htmlEscape($item->getName());
181
  if (!$this->isShipmentSeparately($item)) {
182
  if ($attributes = $this->getSelectionAttributes($item)) {
183
  $result = sprintf('%d', $attributes['qty']) . ' x ' . $result;
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
77
  }
78
  if ($parentItem = $item->getParentItem()) {
79
  if ($options = $parentItem->getProductOptions()) {
80
+ if (isset($options['shipment_type'])
81
+ && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY
82
+ ) {
83
  return true;
84
  } else {
85
  return false;
87
  }
88
  } else {
89
  if ($options = $item->getProductOptions()) {
90
+ if (isset($options['shipment_type'])
91
+ && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY
92
+ ) {
93
  return false;
94
  } else {
95
  return true;
99
  }
100
 
101
  if ($options = $this->getOrderItem()->getProductOptions()) {
102
+ if (isset($options['shipment_type'])
103
+ && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY
104
+ ) {
105
  return true;
106
  }
107
  }
116
  }
117
  if ($parentItem = $item->getParentItem()) {
118
  if ($options = $parentItem->getProductOptions()) {
119
+ if (isset($options['product_calculations'])
120
+ && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD
121
+ ) {
122
  return true;
123
  } else {
124
  return false;
126
  }
127
  } else {
128
  if ($options = $item->getProductOptions()) {
129
+ if (isset($options['product_calculations'])
130
+ && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD
131
+ ) {
132
  return false;
133
  } else {
134
  return true;
139
 
140
  if ($options = $this->getOrderItem()->getProductOptions()) {
141
  if (isset($options['product_calculations'])
142
+ && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD
143
+ ) {
144
  return true;
145
  }
146
  }
188
 
189
  public function getValueHtml($item)
190
  {
191
+ $result = $this->escapeHtml($item->getName());
192
  if (!$this->isShipmentSeparately($item)) {
193
  if ($attributes = $this->getSelectionAttributes($item)) {
194
  $result = sprintf('%d', $attributes['qty']) . ' x ' . $result;
app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -32,14 +32,17 @@
32
  * @package Mage_Bundle
33
  * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
- class Mage_Bundle_Block_Adminhtml_Sales_Order_View_Items_Renderer extends Mage_Adminhtml_Block_Sales_Order_View_Items_Renderer_Default
 
36
  {
37
  public function isShipmentSeparately($item = null)
38
  {
39
  if ($item) {
40
  if ($parentItem = $item->getParentItem()) {
41
  if ($options = $parentItem->getProductOptions()) {
42
- if (isset($options['shipment_type']) && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY) {
 
 
43
  return true;
44
  } else {
45
  return false;
@@ -47,7 +50,9 @@ class Mage_Bundle_Block_Adminhtml_Sales_Order_View_Items_Renderer extends Mage_A
47
  }
48
  } else {
49
  if ($options = $item->getProductOptions()) {
50
- if (isset($options['shipment_type']) && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY) {
 
 
51
  return false;
52
  } else {
53
  return true;
@@ -57,7 +62,9 @@ class Mage_Bundle_Block_Adminhtml_Sales_Order_View_Items_Renderer extends Mage_A
57
  }
58
 
59
  if ($options = $this->getOrderItem()->getProductOptions()) {
60
- if (isset($options['shipment_type']) && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY) {
 
 
61
  return true;
62
  }
63
  }
@@ -69,7 +76,9 @@ class Mage_Bundle_Block_Adminhtml_Sales_Order_View_Items_Renderer extends Mage_A
69
  if ($item) {
70
  if ($parentItem = $item->getParentItem()) {
71
  if ($options = $parentItem->getProductOptions()) {
72
- if (isset($options['product_calculations']) && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD) {
 
 
73
  return true;
74
  } else {
75
  return false;
@@ -77,7 +86,9 @@ class Mage_Bundle_Block_Adminhtml_Sales_Order_View_Items_Renderer extends Mage_A
77
  }
78
  } else {
79
  if ($options = $item->getProductOptions()) {
80
- if (isset($options['product_calculations']) && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD) {
 
 
81
  return false;
82
  } else {
83
  return true;
@@ -88,7 +99,8 @@ class Mage_Bundle_Block_Adminhtml_Sales_Order_View_Items_Renderer extends Mage_A
88
 
89
  if ($options = $this->getItem()->getProductOptions()) {
90
  if (isset($options['product_calculations'])
91
- && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD) {
 
92
  return true;
93
  }
94
  }
@@ -126,7 +138,7 @@ class Mage_Bundle_Block_Adminhtml_Sales_Order_View_Items_Renderer extends Mage_A
126
 
127
  public function getValueHtml($item)
128
  {
129
- $result = $this->htmlEscape($item->getName());
130
  if (!$this->isShipmentSeparately($item)) {
131
  if ($attributes = $this->getSelectionAttributes($item)) {
132
  $result = sprintf('%d', $attributes['qty']) . ' x ' . $result;
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
32
  * @package Mage_Bundle
33
  * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
+ class Mage_Bundle_Block_Adminhtml_Sales_Order_View_Items_Renderer
36
+ extends Mage_Adminhtml_Block_Sales_Order_View_Items_Renderer_Default
37
  {
38
  public function isShipmentSeparately($item = null)
39
  {
40
  if ($item) {
41
  if ($parentItem = $item->getParentItem()) {
42
  if ($options = $parentItem->getProductOptions()) {
43
+ if (isset($options['shipment_type'])
44
+ && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY
45
+ ) {
46
  return true;
47
  } else {
48
  return false;
50
  }
51
  } else {
52
  if ($options = $item->getProductOptions()) {
53
+ if (isset($options['shipment_type'])
54
+ && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY
55
+ ) {
56
  return false;
57
  } else {
58
  return true;
62
  }
63
 
64
  if ($options = $this->getOrderItem()->getProductOptions()) {
65
+ if (isset($options['shipment_type'])
66
+ && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY
67
+ ) {
68
  return true;
69
  }
70
  }
76
  if ($item) {
77
  if ($parentItem = $item->getParentItem()) {
78
  if ($options = $parentItem->getProductOptions()) {
79
+ if (isset($options['product_calculations'])
80
+ && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD
81
+ ) {
82
  return true;
83
  } else {
84
  return false;
86
  }
87
  } else {
88
  if ($options = $item->getProductOptions()) {
89
+ if (isset($options['product_calculations'])
90
+ && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD
91
+ ) {
92
  return false;
93
  } else {
94
  return true;
99
 
100
  if ($options = $this->getItem()->getProductOptions()) {
101
  if (isset($options['product_calculations'])
102
+ && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD
103
+ ) {
104
  return true;
105
  }
106
  }
138
 
139
  public function getValueHtml($item)
140
  {
141
+ $result = $this->escapeHtml($item->getName());
142
  if (!$this->isShipmentSeparately($item)) {
143
  if ($attributes = $this->getSelectionAttributes($item)) {
144
  $result = sprintf('%d', $attributes['qty']) . ' x ' . $result;
app/code/core/Mage/Bundle/Block/Catalog/Product/List/Partof.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Catalog/Product/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Catalog/Product/View.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -37,24 +37,36 @@ class Mage_Bundle_Block_Catalog_Product_View extends Mage_Catalog_Block_Product_
37
  /**
38
  * Get tier prices (formatted)
39
  *
40
- * @param Mage_Catalog_Model_Product $product
41
  * @return array
42
  */
43
  public function getTierPrices($product = null)
44
  {
45
- if (is_null($product)) {
46
  $product = $this->getProduct();
47
  }
48
- $prices = $product->getFormatedTierPrice();
49
 
50
  $res = array();
 
 
51
  if (is_array($prices)) {
 
 
 
 
52
  foreach ($prices as $price) {
53
- $price['price_qty'] = $price['price_qty']*1;
54
- $price['savePercent'] = ceil(100 - $price['price']);
55
- $price['formated_price'] = Mage::app()->getStore()->formatPrice(Mage::app()->getStore()->convertPrice(Mage::helper('tax')->getPrice($product, $price['website_price'])));
56
- $price['formated_price_incl_tax'] = Mage::app()->getStore()->formatPrice(Mage::app()->getStore()->convertPrice(Mage::helper('tax')->getPrice($product, $price['website_price'], true)));
57
- $res[] = $price;
 
 
 
 
 
 
 
58
  }
59
  }
60
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
37
  /**
38
  * Get tier prices (formatted)
39
  *
40
+ * @param Mage_Catalog_Model_Product|null $product
41
  * @return array
42
  */
43
  public function getTierPrices($product = null)
44
  {
45
+ if ($product === null) {
46
  $product = $this->getProduct();
47
  }
 
48
 
49
  $res = array();
50
+
51
+ $prices = $product->getFormatedTierPrice();
52
  if (is_array($prices)) {
53
+ $store = Mage::app()->getStore();
54
+ $helper = Mage::helper('tax');
55
+ $specialPrice = $product->getSpecialPrice();
56
+ $defaultDiscount = max($product->getGroupPrice(), $specialPrice ? 100 - $specialPrice : 0);
57
  foreach ($prices as $price) {
58
+ if ($defaultDiscount < $price['price']) {
59
+ $price['price_qty'] += 0;
60
+ $price['savePercent'] = ceil(100 - $price['price']);
61
+
62
+ $priceExclTax = $helper->getPrice($product, $price['website_price']);
63
+ $price['formated_price'] = $store->formatPrice($store->convertPrice($priceExclTax));
64
+
65
+ $priceInclTax = $helper->getPrice($product, $price['website_price'], true);
66
+ $price['formated_price_incl_tax'] = $store->formatPrice($store->convertPrice($priceInclTax));
67
+
68
+ $res[] = $price;
69
+ }
70
  }
71
  }
72
 
app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -97,6 +97,7 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle extends Mage_Catalog_Bl
97
  $defaultValues = array();
98
  }
99
 
 
100
  foreach ($optionsArray as $_option) {
101
  /* @var $_option Mage_Bundle_Model_Option */
102
  if (!$_option->getSelections()) {
@@ -107,11 +108,13 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle extends Mage_Catalog_Bl
107
  $option = array (
108
  'selections' => array(),
109
  'title' => $_option->getTitle(),
110
- 'isMulti' => in_array($_option->getType(), array('multi', 'checkbox'))
 
111
  );
112
 
113
  $selectionCount = count($_option->getSelections());
114
-
 
115
  foreach ($_option->getSelections() as $_selection) {
116
  /* @var $_selection Mage_Catalog_Model_Product */
117
  $selectionId = $_selection->getSelectionId();
@@ -120,6 +123,8 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle extends Mage_Catalog_Bl
120
  $tierPrices = $_selection->getTierPrice();
121
  foreach ($tierPrices as &$tierPriceInfo) {
122
  $tierPriceInfo['price'] = $coreHelper->currency($tierPriceInfo['price'], false, false);
 
 
123
  }
124
  unset($tierPriceInfo); // break the reference with the last element
125
 
@@ -152,7 +157,8 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle extends Mage_Catalog_Bl
152
  'name' => $_selection->getName(),
153
  'plusDisposition' => 0,
154
  'minusDisposition' => 0,
155
- 'canApplyMAP' => $canApplyMAP
 
156
  );
157
 
158
  $responseObject = new Varien_Object();
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
97
  $defaultValues = array();
98
  }
99
 
100
+ $position = 0;
101
  foreach ($optionsArray as $_option) {
102
  /* @var $_option Mage_Bundle_Model_Option */
103
  if (!$_option->getSelections()) {
108
  $option = array (
109
  'selections' => array(),
110
  'title' => $_option->getTitle(),
111
+ 'isMulti' => in_array($_option->getType(), array('multi', 'checkbox')),
112
+ 'position' => $position++
113
  );
114
 
115
  $selectionCount = count($_option->getSelections());
116
+ /** @var $taxHelper Mage_Tax_Helper_Data */
117
+ $taxHelper = Mage::helper('tax');
118
  foreach ($_option->getSelections() as $_selection) {
119
  /* @var $_selection Mage_Catalog_Model_Product */
120
  $selectionId = $_selection->getSelectionId();
123
  $tierPrices = $_selection->getTierPrice();
124
  foreach ($tierPrices as &$tierPriceInfo) {
125
  $tierPriceInfo['price'] = $coreHelper->currency($tierPriceInfo['price'], false, false);
126
+ $tierPriceInfo['priceInclTax'] = $taxHelper->getPrice($_selection, $tierPriceInfo['price'], true);
127
+ $tierPriceInfo['priceExclTax'] = $taxHelper->getPrice($_selection, $tierPriceInfo['price']);
128
  }
129
  unset($tierPriceInfo); // break the reference with the last element
130
 
157
  'name' => $_selection->getName(),
158
  'plusDisposition' => 0,
159
  'minusDisposition' => 0,
160
+ 'canApplyMAP' => $canApplyMAP,
161
+ 'tierPriceHtml' => $this->getTierPriceHtml($_selection),
162
  );
163
 
164
  $responseObject = new Varien_Object();
app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -218,6 +218,11 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option extends Mage_Bun
218
  public function getSelectionTitlePrice($_selection, $includeContainer = true)
219
  {
220
  $price = $this->getProduct()->getPriceModel()->getSelectionPreFinalPrice($this->getProduct(), $_selection, 1);
 
 
 
 
 
221
  $this->setFormatProduct($_selection);
222
  $priceTitle = $this->escapeHtml($_selection->getName());
223
  $priceTitle .= ' &nbsp; ' . ($includeContainer ? '<span class="price-notice">' : '')
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
218
  public function getSelectionTitlePrice($_selection, $includeContainer = true)
219
  {
220
  $price = $this->getProduct()->getPriceModel()->getSelectionPreFinalPrice($this->getProduct(), $_selection, 1);
221
+ $tierPrice = $_selection->getTierPrice();
222
+ if (!empty($tierPrice)) {
223
+ $qty = $_selection->getSelectionQty();
224
+ $price = $qty * (float) $_selection->getPriceModel()->getTierPrice($qty, $_selection);
225
+ }
226
  $this->setFormatProduct($_selection);
227
  $priceTitle = $this->escapeHtml($_selection->getName());
228
  $priceTitle .= ' &nbsp; ' . ($includeContainer ? '<span class="price-notice">' : '')
app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Checkbox.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Multi.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Radio.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Select.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Block/Checkout/Cart/Item/Renderer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -54,7 +54,9 @@ class Mage_Bundle_Block_Checkout_Cart_Item_Renderer extends Mage_Checkout_Block_
54
  */
55
  protected function _getSelectionFinalPrice($selectionProduct)
56
  {
57
- return Mage::helper('bundle/catalog_product_configuration')->getSelectionFinalPrice($this->getItem(), $selectionProduct);
 
 
58
  }
59
 
60
  /**
@@ -80,23 +82,22 @@ class Mage_Bundle_Block_Checkout_Cart_Item_Renderer extends Mage_Checkout_Block_
80
  }
81
 
82
  /**
83
- * Return cart backorder messages
84
  *
85
  * @return array
86
  */
87
  public function getMessages()
88
  {
89
- $messages = $this->getData('messages');
90
- if (is_null($messages)) {
91
- $messages = array();
92
- }
93
- $options = $this->getItem()->getQtyOptions();
94
 
95
- foreach ($options as $option) {
96
- if ($option->getMessage()) {
 
 
97
  $messages[] = array(
98
- 'text' => $option->getMessage(),
99
- 'type' => ($this->getItem()->getHasError()) ? 'error' : 'notice'
100
  );
101
  }
102
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
54
  */
55
  protected function _getSelectionFinalPrice($selectionProduct)
56
  {
57
+ $helper = Mage::helper('bundle/catalog_product_configuration');
58
+ $result = $helper->getSelectionFinalPrice($this->getItem(), $selectionProduct);
59
+ return $result;
60
  }
61
 
62
  /**
82
  }
83
 
84
  /**
85
+ * Return cart item error messages
86
  *
87
  * @return array
88
  */
89
  public function getMessages()
90
  {
91
+ $messages = array();
92
+ $quoteItem = $this->getItem();
 
 
 
93
 
94
+ // Add basic messages occuring during this page load
95
+ $baseMessages = $quoteItem->getMessage(false);
96
+ if ($baseMessages) {
97
+ foreach ($baseMessages as $message) {
98
  $messages[] = array(
99
+ 'text' => $message,
100
+ 'type' => $quoteItem->getHasError() ? 'error' : 'notice'
101
  );
102
  }
103
  }
app/code/core/Mage/Bundle/Block/Sales/Order/Items/Renderer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -41,7 +41,9 @@ class Mage_Bundle_Block_Sales_Order_Items_Renderer extends Mage_Sales_Block_Orde
41
  }
42
  if ($parentItem = $item->getParentItem()) {
43
  if ($options = $parentItem->getProductOptions()) {
44
- if (isset($options['shipment_type']) && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY) {
 
 
45
  return true;
46
  } else {
47
  return false;
@@ -49,7 +51,9 @@ class Mage_Bundle_Block_Sales_Order_Items_Renderer extends Mage_Sales_Block_Orde
49
  }
50
  } else {
51
  if ($options = $item->getProductOptions()) {
52
- if (isset($options['shipment_type']) && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY) {
 
 
53
  return false;
54
  } else {
55
  return true;
@@ -59,7 +63,9 @@ class Mage_Bundle_Block_Sales_Order_Items_Renderer extends Mage_Sales_Block_Orde
59
  }
60
 
61
  if ($options = $this->getOrderItem()->getProductOptions()) {
62
- if (isset($options['shipment_type']) && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY) {
 
 
63
  return true;
64
  }
65
  }
@@ -74,7 +80,9 @@ class Mage_Bundle_Block_Sales_Order_Items_Renderer extends Mage_Sales_Block_Orde
74
  }
75
  if ($parentItem = $item->getParentItem()) {
76
  if ($options = $parentItem->getProductOptions()) {
77
- if (isset($options['product_calculations']) && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD) {
 
 
78
  return true;
79
  } else {
80
  return false;
@@ -82,7 +90,9 @@ class Mage_Bundle_Block_Sales_Order_Items_Renderer extends Mage_Sales_Block_Orde
82
  }
83
  } else {
84
  if ($options = $item->getProductOptions()) {
85
- if (isset($options['product_calculations']) && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD) {
 
 
86
  return false;
87
  } else {
88
  return true;
@@ -93,7 +103,8 @@ class Mage_Bundle_Block_Sales_Order_Items_Renderer extends Mage_Sales_Block_Orde
93
 
94
  if ($options = $this->getOrderItem()->getProductOptions()) {
95
  if (isset($options['product_calculations'])
96
- && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD) {
 
97
  return true;
98
  }
99
  }
@@ -116,10 +127,10 @@ class Mage_Bundle_Block_Sales_Order_Items_Renderer extends Mage_Sales_Block_Orde
116
  {
117
  if ($attributes = $this->getSelectionAttributes($item)) {
118
  return sprintf('%d', $attributes['qty']) . ' x ' .
119
- $this->htmlEscape($item->getName()) .
120
  " " . $this->getOrder()->formatPrice($attributes['price']);
121
  } else {
122
- return $this->htmlEscape($item->getName());
123
  }
124
  }
125
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
41
  }
42
  if ($parentItem = $item->getParentItem()) {
43
  if ($options = $parentItem->getProductOptions()) {
44
+ if (isset($options['shipment_type'])
45
+ && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY
46
+ ) {
47
  return true;
48
  } else {
49
  return false;
51
  }
52
  } else {
53
  if ($options = $item->getProductOptions()) {
54
+ if (isset($options['shipment_type'])
55
+ && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY
56
+ ) {
57
  return false;
58
  } else {
59
  return true;
63
  }
64
 
65
  if ($options = $this->getOrderItem()->getProductOptions()) {
66
+ if (isset($options['shipment_type'])
67
+ && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY
68
+ ) {
69
  return true;
70
  }
71
  }
80
  }
81
  if ($parentItem = $item->getParentItem()) {
82
  if ($options = $parentItem->getProductOptions()) {
83
+ if (isset($options['product_calculations'])
84
+ && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD
85
+ ) {
86
  return true;
87
  } else {
88
  return false;
90
  }
91
  } else {
92
  if ($options = $item->getProductOptions()) {
93
+ if (isset($options['product_calculations'])
94
+ && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD
95
+ ) {
96
  return false;
97
  } else {
98
  return true;
103
 
104
  if ($options = $this->getOrderItem()->getProductOptions()) {
105
  if (isset($options['product_calculations'])
106
+ && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD
107
+ ) {
108
  return true;
109
  }
110
  }
127
  {
128
  if ($attributes = $this->getSelectionAttributes($item)) {
129
  return sprintf('%d', $attributes['qty']) . ' x ' .
130
+ $this->escapeHtml($item->getName()) .
131
  " " . $this->getOrder()->formatPrice($attributes['price']);
132
  } else {
133
+ return $this->escapeHtml($item->getName());
134
  }
135
  }
136
 
app/code/core/Mage/Bundle/Helper/Catalog/Product/Configuration.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -39,6 +39,7 @@ class Mage_Bundle_Helper_Catalog_Product_Configuration extends Mage_Core_Helper_
39
  *
40
  * @param Mage_Catalog_Model_Product $product
41
  * @param int $selectionId
 
42
  * @return decimal
43
  */
44
  public function getSelectionQty($product, $selectionId)
@@ -55,6 +56,7 @@ class Mage_Bundle_Helper_Catalog_Product_Configuration extends Mage_Core_Helper_
55
  *
56
  * @param Mage_Catalog_Model_Product_Configuration_Item_Interface $item
57
  * @param Mage_Catalog_Model_Product $selectionProduct
 
58
  * @return decimal
59
  */
60
  public function getSelectionFinalPrice(Mage_Catalog_Model_Product_Configuration_Item_Interface $item,
@@ -101,33 +103,37 @@ class Mage_Bundle_Helper_Catalog_Product_Configuration extends Mage_Core_Helper_
101
  // get and add bundle selections collection
102
  $selectionsQuoteItemOption = $item->getOptionByCode('bundle_selection_ids');
103
 
104
- $selectionsCollection = $typeInstance->getSelectionsByIds(
105
- unserialize($selectionsQuoteItemOption->getValue()),
106
- $product
107
- );
 
 
 
108
 
109
- $bundleOptions = $optionsCollection->appendSelections($selectionsCollection, true);
110
- foreach ($bundleOptions as $bundleOption) {
111
- if ($bundleOption->getSelections()) {
112
- $option = array(
113
- 'label' => $bundleOption->getTitle(),
114
- 'value' => array()
115
- );
116
 
117
- $bundleSelections = $bundleOption->getSelections();
118
 
119
- foreach ($bundleSelections as $bundleSelection) {
120
- $qty = $this->getSelectionQty($product, $bundleSelection->getSelectionId()) * 1;
121
- if ($qty) {
122
- $option['value'][] = $qty . ' x ' . $this->escapeHtml($bundleSelection->getName())
123
- . ' ' . Mage::helper('core')->currency(
124
- $this->getSelectionFinalPrice($item, $bundleSelection)
125
- );
 
126
  }
127
- }
128
 
129
- if ($option['value']) {
130
- $options[] = $option;
 
131
  }
132
  }
133
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
39
  *
40
  * @param Mage_Catalog_Model_Product $product
41
  * @param int $selectionId
42
+ *
43
  * @return decimal
44
  */
45
  public function getSelectionQty($product, $selectionId)
56
  *
57
  * @param Mage_Catalog_Model_Product_Configuration_Item_Interface $item
58
  * @param Mage_Catalog_Model_Product $selectionProduct
59
+ *
60
  * @return decimal
61
  */
62
  public function getSelectionFinalPrice(Mage_Catalog_Model_Product_Configuration_Item_Interface $item,
103
  // get and add bundle selections collection
104
  $selectionsQuoteItemOption = $item->getOptionByCode('bundle_selection_ids');
105
 
106
+ $bundleSelectionIds = unserialize($selectionsQuoteItemOption->getValue());
107
+
108
+ if (!empty($bundleSelectionIds)) {
109
+ $selectionsCollection = $typeInstance->getSelectionsByIds(
110
+ unserialize($selectionsQuoteItemOption->getValue()),
111
+ $product
112
+ );
113
 
114
+ $bundleOptions = $optionsCollection->appendSelections($selectionsCollection, true);
115
+ foreach ($bundleOptions as $bundleOption) {
116
+ if ($bundleOption->getSelections()) {
117
+ $option = array(
118
+ 'label' => $bundleOption->getTitle(),
119
+ 'value' => array()
120
+ );
121
 
122
+ $bundleSelections = $bundleOption->getSelections();
123
 
124
+ foreach ($bundleSelections as $bundleSelection) {
125
+ $qty = $this->getSelectionQty($product, $bundleSelection->getSelectionId()) * 1;
126
+ if ($qty) {
127
+ $option['value'][] = $qty . ' x ' . $this->escapeHtml($bundleSelection->getName())
128
+ . ' ' . Mage::helper('core')->currency(
129
+ $this->getSelectionFinalPrice($item, $bundleSelection)
130
+ );
131
+ }
132
  }
 
133
 
134
+ if ($option['value']) {
135
+ $options[] = $option;
136
+ }
137
  }
138
  }
139
  }
app/code/core/Mage/Bundle/Helper/Data.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/CatalogIndex/Data/Bundle.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Mysql4/Bundle.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Stock.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Mysql4/Option.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Mysql4/Option/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Mysql4/Price/Index.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Mysql4/Selection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Mysql4/Selection/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Observer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Option.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Price/Index.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Product/Attribute/Source/Price/View.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Product/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -33,7 +33,14 @@
33
  */
34
  class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Price
35
  {
 
 
 
36
  const PRICE_TYPE_FIXED = 1;
 
 
 
 
37
  const PRICE_TYPE_DYNAMIC = 0;
38
 
39
  /**
@@ -183,137 +190,159 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
183
  */
184
  public function getTotalPrices($product, $which = null, $includeTax = null, $takeTierPrice = true)
185
  {
186
- // check calculated price index
187
- if ($product->getData('min_price') && $product->getData('max_price')) {
188
- $minimalPrice = Mage::helper('tax')->getPrice($product, $product->getData('min_price'), $includeTax);
189
- $maximalPrice = Mage::helper('tax')->getPrice($product, $product->getData('max_price'), $includeTax);
190
- $this->_isPricesCalculatedByIndex = true;
 
 
191
  } else {
192
  /**
193
  * Check if product price is fixed
194
  */
195
  $finalPrice = $product->getFinalPrice();
196
- if ($product->getPriceType() == self::PRICE_TYPE_FIXED) {
197
- $minimalPrice = $maximalPrice = Mage::helper('tax')->getPrice($product, $finalPrice, $includeTax);
198
  } else { // PRICE_TYPE_DYNAMIC
199
  $minimalPrice = $maximalPrice = 0;
200
  }
201
 
202
- $options = $this->getOptions($product);
203
- $minPriceFounded = false;
204
-
205
- if ($options) {
206
- foreach ($options as $option) {
207
- /* @var $option Mage_Bundle_Model_Option */
208
- $selections = $option->getSelections();
209
- if ($selections) {
210
- $selectionMinimalPrices = array();
211
- $selectionMaximalPrices = array();
212
-
213
- foreach ($option->getSelections() as $selection) {
214
- /* @var $selection Mage_Bundle_Model_Selection */
215
- if (!$selection->isSalable()) {
216
- /**
217
- * @todo CatalogInventory Show out of stock Products
218
- */
219
- continue;
220
- }
221
-
222
- $qty = $selection->getSelectionQty();
223
-
224
- $item = $product->getPriceType() == self::PRICE_TYPE_FIXED ? $product : $selection;
225
-
226
- $selectionMinimalPrices[] = Mage::helper('tax')->getPrice(
227
- $item,
228
- $this->getSelectionFinalTotalPrice($product, $selection, 1, $qty, true, $takeTierPrice),
229
- $includeTax
230
- );
231
- $selectionMaximalPrices[] = Mage::helper('tax')->getPrice(
232
- $item,
233
- $this->getSelectionFinalTotalPrice($product, $selection, 1, null, true, $takeTierPrice),
234
- $includeTax
235
- );
236
- }
237
-
238
- if (count($selectionMinimalPrices)) {
239
- $selMinPrice = min($selectionMinimalPrices);
240
- if ($option->getRequired()) {
241
- $minimalPrice += $selMinPrice;
242
- $minPriceFounded = true;
243
- } elseif (true !== $minPriceFounded) {
244
- $selMinPrice += $minimalPrice;
245
- $minPriceFounded = (false === $minPriceFounded)
246
- ? $selMinPrice
247
- : min($minPriceFounded, $selMinPrice);
248
- }
249
-
250
- if ($option->isMultiSelection()) {
251
- $maximalPrice += array_sum($selectionMaximalPrices);
252
- } else {
253
- $maximalPrice += max($selectionMaximalPrices);
254
- }
255
- }
256
- }
257
- }
258
- }
259
- // condition is TRUE when all product options are NOT required
260
- if (!is_bool($minPriceFounded)) {
261
- $minimalPrice = $minPriceFounded;
262
- }
263
 
264
  $customOptions = $product->getOptions();
265
- if ($product->getPriceType() == self::PRICE_TYPE_FIXED && $customOptions) {
266
  foreach ($customOptions as $customOption) {
267
  /* @var $customOption Mage_Catalog_Model_Product_Option */
268
- $values = $customOption->getValues();
269
- if ($values) {
270
- $prices = array();
271
- foreach ($values as $value) {
272
- /* @var $value Mage_Catalog_Model_Product_Option_Value */
273
- $valuePrice = $value->getPrice(true);
274
-
275
- $prices[] = $valuePrice;
276
- }
277
- if (count($prices)) {
278
- if ($customOption->getIsRequire()) {
279
- $minimalPrice += Mage::helper('tax')->getPrice($product, min($prices), $includeTax);
280
- }
281
-
282
- $multiTypes = array(
283
- //Mage_Catalog_Model_Product_Option::OPTION_TYPE_DROP_DOWN,
284
- Mage_Catalog_Model_Product_Option::OPTION_TYPE_CHECKBOX,
285
- Mage_Catalog_Model_Product_Option::OPTION_TYPE_MULTIPLE
286
- );
287
-
288
- if (in_array($customOption->getType(), $multiTypes)) {
289
- $maximalValue = array_sum($prices);
290
- } else {
291
- $maximalValue = max($prices);
292
- }
293
- $maximalPrice += Mage::helper('tax')->getPrice($product, $maximalValue, $includeTax);
294
- }
295
- } else {
296
- $valuePrice = $customOption->getPrice(true);
297
-
298
- if ($customOption->getIsRequire()) {
299
- $minimalPrice += Mage::helper('tax')->getPrice($product, $valuePrice, $includeTax);
300
- }
301
- $maximalPrice += Mage::helper('tax')->getPrice($product, $valuePrice, $includeTax);
302
- }
303
  }
304
  }
305
- $this->_isPricesCalculatedByIndex = false;
306
  }
307
 
308
- if ($which == 'max') {
309
  return $maximalPrice;
310
- } elseif ($which == 'min') {
311
  return $minimalPrice;
312
  }
313
 
314
  return array($minimalPrice, $maximalPrice);
315
  }
316
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
317
  /**
318
  * Calculate Minimal price of bundle (counting all required options)
319
  *
@@ -445,15 +474,17 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
445
  }
446
  }
447
 
448
- if ($multiplyQty) {
449
- $price *= $selectionQty;
450
- }
451
-
452
- return min($price,
453
  $this->_applyGroupPrice($bundleProduct, $price),
454
  $this->_applyTierPrice($bundleProduct, $bundleQty, $price),
455
  $this->_applySpecialPrice($bundleProduct, $price)
456
  );
 
 
 
 
 
 
457
  }
458
 
459
  /**
@@ -543,13 +574,14 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
543
  * @param Mage_Catalog_Model_Product $product
544
  * @return decimal
545
  */
546
- public function getTierPrice($qty=null, $product)
547
  {
548
  $allGroups = Mage_Customer_Model_Group::CUST_GROUP_ALL;
549
  $prices = $product->getData('tier_price');
550
 
551
  if (is_null($prices)) {
552
- if ($attribute = $product->getResource()->getAttribute('tier_price')) {
 
553
  $attribute->getBackend()->afterLoad($product);
554
  $prices = $product->getData('tier_price');
555
  }
@@ -574,7 +606,7 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
574
  $prevGroup = $allGroups;
575
 
576
  foreach ($prices as $price) {
577
- if ($price['cust_group']!=$custGroup && $price['cust_group']!=$allGroups) {
578
  // tier not for current customer group nor is for all groups
579
  continue;
580
  }
@@ -738,7 +770,8 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
738
  ->addValuesToResult();
739
 
740
  foreach ($customOptions as $customOption) {
741
- if ($values = $customOption->getValues()) {
 
742
  $prices = array();
743
  foreach ($values as $value) {
744
  $prices[] = $value->getPrice();
@@ -797,4 +830,81 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
797
  {
798
  return false;
799
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
800
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
33
  */
34
  class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Price
35
  {
36
+ /**
37
+ * Fixed price type
38
+ */
39
  const PRICE_TYPE_FIXED = 1;
40
+
41
+ /**
42
+ * Dynamic price type
43
+ */
44
  const PRICE_TYPE_DYNAMIC = 0;
45
 
46
  /**
190
  */
191
  public function getTotalPrices($product, $which = null, $includeTax = null, $takeTierPrice = true)
192
  {
193
+ $isPriceFixedType = ($product->getPriceType() == self::PRICE_TYPE_FIXED);
194
+ $this->_isPricesCalculatedByIndex = ($product->getData('min_price') && $product->getData('max_price'));
195
+ $taxHelper = $this->_getHelperData('tax');
196
+
197
+ if ($this->_isPricesCalculatedByIndex && !$includeTax) {
198
+ $minimalPrice = $taxHelper->getPrice($product, $product->getData('min_price'), $includeTax);
199
+ $maximalPrice = $taxHelper->getPrice($product, $product->getData('max_price'), $includeTax);
200
  } else {
201
  /**
202
  * Check if product price is fixed
203
  */
204
  $finalPrice = $product->getFinalPrice();
205
+ if ($isPriceFixedType) {
206
+ $minimalPrice = $maximalPrice = $taxHelper->getPrice($product, $finalPrice, $includeTax);
207
  } else { // PRICE_TYPE_DYNAMIC
208
  $minimalPrice = $maximalPrice = 0;
209
  }
210
 
211
+ $minimalPrice += $this->_getMinimalBundleOptionsPrice($product, $includeTax, $takeTierPrice);
212
+ $maximalPrice += $this->_getMaximalBundleOptionsPrice($product, $includeTax, $takeTierPrice);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
 
214
  $customOptions = $product->getOptions();
215
+ if ($isPriceFixedType && $customOptions) {
216
  foreach ($customOptions as $customOption) {
217
  /* @var $customOption Mage_Catalog_Model_Product_Option */
218
+ $minimalPrice += $taxHelper->getPrice(
219
+ $product,
220
+ $this->_getMinimalCustomOptionPrice($customOption),
221
+ $includeTax);
222
+ $maximalPrice += $taxHelper->getPrice(
223
+ $product,
224
+ $this->_getMaximalCustomOptionPrice($customOption),
225
+ $includeTax);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  }
227
  }
 
228
  }
229
 
230
+ if ('max' == $which) {
231
  return $maximalPrice;
232
+ } elseif ('min' == $which) {
233
  return $minimalPrice;
234
  }
235
 
236
  return array($minimalPrice, $maximalPrice);
237
  }
238
 
239
+ /**
240
+ * Get minimal possible price for bundle option
241
+ *
242
+ * @param Mage_Catalog_Model_Product $product
243
+ * @param bool|null $includeTax
244
+ * @param bool $takeTierPrice
245
+ * @return int|mixed
246
+ */
247
+ protected function _getMinimalBundleOptionsPrice($product, $includeTax, $takeTierPrice)
248
+ {
249
+ $options = $this->getOptions($product);
250
+ $minimalPrice = 0;
251
+ $hasRequiredOptions = $this->_hasRequiredOptions($product);
252
+ $selectionMinimalPrices = array();
253
+
254
+ if (!$options) {
255
+ return $minimalPrice;
256
+ }
257
+
258
+ foreach ($options as $option) {
259
+ /* @var $option Mage_Bundle_Model_Option */
260
+ $selectionPrices = $this->_getSelectionPrices($product, $option, $takeTierPrice, $includeTax);
261
+
262
+ if (count($selectionPrices)) {
263
+ $selectionMinPrice = min($selectionPrices);
264
+ if ($option->getRequired()) {
265
+ $minimalPrice += $selectionMinPrice;
266
+ } elseif (!$hasRequiredOptions) {
267
+ $selectionMinimalPrices[] = $selectionMinPrice;
268
+ }
269
+ }
270
+ }
271
+ // condition is TRUE when all product options are NOT required
272
+ if (!$hasRequiredOptions) {
273
+ $minimalPrice = min($selectionMinimalPrices);
274
+ }
275
+ return $minimalPrice;
276
+ }
277
+
278
+ /**
279
+ * Get maximal possible price for bundle option
280
+ *
281
+ * @param Mage_Catalog_Model_Product $product
282
+ * @param bool|null $includeTax
283
+ * @param bool $takeTierPrice
284
+ * @return float
285
+ */
286
+ protected function _getMaximalBundleOptionsPrice($product, $includeTax, $takeTierPrice)
287
+ {
288
+ $maximalPrice = 0;
289
+ $options = $this->getOptions($product);
290
+
291
+ if (!$options) {
292
+ return $maximalPrice;
293
+ }
294
+
295
+ foreach ($options as $option) {
296
+ $selectionPrices = $this->_getSelectionPrices($product, $option, $takeTierPrice, $includeTax);
297
+ if (count($selectionPrices)) {
298
+ $maximalPrice += ($option->isMultiSelection())
299
+ ? array_sum($selectionPrices)
300
+ : max($selectionPrices);
301
+ }
302
+ }
303
+ return $maximalPrice;
304
+ }
305
+
306
+ /**
307
+ * Get all prices for bundle option selection
308
+ *
309
+ * @param Mage_Catalog_Model_Product $product
310
+ * @param Mage_Bundle_Model_Option $option
311
+ * @param bool $takeTierPrice
312
+ * @param bool|null $includeTax
313
+ * @return array
314
+ */
315
+ protected function _getSelectionPrices($product, $option, $takeTierPrice, $includeTax)
316
+ {
317
+ $selectionPrices = array();
318
+ $taxHelper = $this->_getHelperData('tax');
319
+ $isPriceFixedType = ($product->getPriceType() == self::PRICE_TYPE_FIXED);
320
+
321
+ $selections = $option->getSelections();
322
+ if (!$selections) {
323
+ return $selectionPrices;
324
+ }
325
+
326
+ foreach ($selections as $selection) {
327
+ /* @var $selection Mage_Bundle_Model_Selection */
328
+ if (!$selection->isSalable()) {
329
+ /**
330
+ * @todo CatalogInventory Show out of stock Products
331
+ */
332
+ continue;
333
+ }
334
+
335
+ $item = $isPriceFixedType ? $product : $selection;
336
+
337
+ $selectionPrices[] = $taxHelper->getPrice(
338
+ $item,
339
+ $this->getSelectionFinalTotalPrice($product, $selection, 1, null, true, $takeTierPrice),
340
+ $includeTax
341
+ );
342
+ }
343
+ return $selectionPrices;
344
+ }
345
+
346
  /**
347
  * Calculate Minimal price of bundle (counting all required options)
348
  *
474
  }
475
  }
476
 
477
+ $price = min($price,
 
 
 
 
478
  $this->_applyGroupPrice($bundleProduct, $price),
479
  $this->_applyTierPrice($bundleProduct, $bundleQty, $price),
480
  $this->_applySpecialPrice($bundleProduct, $price)
481
  );
482
+
483
+ if ($multiplyQty) {
484
+ $price *= $selectionQty;
485
+ }
486
+
487
+ return $price;
488
  }
489
 
490
  /**
574
  * @param Mage_Catalog_Model_Product $product
575
  * @return decimal
576
  */
577
+ public function getTierPrice($qty = null, $product)
578
  {
579
  $allGroups = Mage_Customer_Model_Group::CUST_GROUP_ALL;
580
  $prices = $product->getData('tier_price');
581
 
582
  if (is_null($prices)) {
583
+ $attribute = $product->getResource()->getAttribute('tier_price');
584
+ if ($attribute) {
585
  $attribute->getBackend()->afterLoad($product);
586
  $prices = $product->getData('tier_price');
587
  }
606
  $prevGroup = $allGroups;
607
 
608
  foreach ($prices as $price) {
609
+ if ($price['cust_group'] != $custGroup && $price['cust_group'] != $allGroups) {
610
  // tier not for current customer group nor is for all groups
611
  continue;
612
  }
770
  ->addValuesToResult();
771
 
772
  foreach ($customOptions as $customOption) {
773
+ $values = $customOption->getValues();
774
+ if ($values) {
775
  $prices = array();
776
  foreach ($values as $value) {
777
  $prices[] = $value->getPrice();
830
  {
831
  return false;
832
  }
833
+
834
+ /**
835
+ * Get data helper
836
+ *
837
+ * @param string $name
838
+ * @return Mage_Core_Helper_Abstract
839
+ */
840
+ protected function _getHelperData($name)
841
+ {
842
+ return Mage::helper($name);
843
+ }
844
+
845
+ /**
846
+ * Check if product has required options
847
+ *
848
+ * @param Mage_Catalog_Model_Product $product
849
+ * @return bool
850
+ */
851
+ protected function _hasRequiredOptions($product)
852
+ {
853
+ $options = $this->getOptions($product);
854
+ if ($options) {
855
+ foreach ($options as $option) {
856
+ if ($option->getRequired()) {
857
+ return true;
858
+ }
859
+ }
860
+ }
861
+ return false;
862
+ }
863
+
864
+ /**
865
+ * Get minimum possible price of custom options
866
+ *
867
+ * @param Mage_Catalog_Model_Product_Option $option
868
+ * @return float
869
+ */
870
+ protected function _getMinimalCustomOptionPrice($option)
871
+ {
872
+ $prices = $this->_getCustomOptionValuesPrices($option);
873
+ $minimalOptionPrice = ($prices) ? min($prices) : (float)$option->getPrice(true);
874
+ $minimalPrice = ($option->getIsRequire()) ? $minimalOptionPrice : 0;
875
+ return $minimalPrice;
876
+ }
877
+
878
+ /**
879
+ * Get maximum possible price of custom options
880
+ *
881
+ * @param Mage_Catalog_Model_Product_Option $option
882
+ * @return float
883
+ */
884
+ protected function _getMaximalCustomOptionPrice($option)
885
+ {
886
+ $prices = $this->_getCustomOptionValuesPrices($option);
887
+ $maximalOptionPrice = ($option->isMultipleType()) ? array_sum($prices) : max($prices);
888
+ $maximalPrice = ($prices) ? $maximalOptionPrice : (float)($option->getPrice(true));
889
+ return $maximalPrice;
890
+ }
891
+
892
+ /**
893
+ * Get all custom option values prices
894
+ *
895
+ * @param Mage_Catalog_Model_Product_Option $option
896
+ * @return array
897
+ */
898
+ protected function _getCustomOptionValuesPrices($option)
899
+ {
900
+ $values = $option->getValues();
901
+ $prices = array();
902
+ if ($values) {
903
+ foreach ($values as $value) {
904
+ /* @var $value Mage_Catalog_Model_Product_Option_Value */
905
+ $prices[] = $value->getPrice(true);
906
+ }
907
+ }
908
+ return $prices;
909
+ }
910
  }
app/code/core/Mage/Bundle/Model/Product/Type.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -648,13 +648,7 @@ class Mage_Bundle_Model_Product_Type extends Mage_Catalog_Model_Product_Type_Abs
648
 
649
  $product->addCustomOption('selection_qty_' . $selection->getSelectionId(), $qty, $selection);
650
  $selection->addCustomOption('selection_id', $selection->getSelectionId());
651
-
652
- $beforeQty = 0;
653
- $customOption = $product->getCustomOption('product_qty_' . $selection->getId());
654
- if ($customOption) {
655
- $beforeQty = (float)$customOption->getValue();
656
- }
657
- $product->addCustomOption('product_qty_' . $selection->getId(), $qty + $beforeQty, $selection);
658
 
659
  /*
660
  * Create extra attributes that will be converted to product options in order item
@@ -733,6 +727,7 @@ class Mage_Bundle_Model_Product_Type extends Mage_Catalog_Model_Product_Type_Abs
733
  $usedSelections = Mage::getResourceModel('bundle/selection_collection')
734
  ->addAttributeToSelect('*')
735
  ->setFlag('require_stock_items', true)
 
736
  ->addStoreFilter($this->getStoreFilter($product))
737
  ->setStoreId($storeId)
738
  ->setPositionOrder()
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
648
 
649
  $product->addCustomOption('selection_qty_' . $selection->getSelectionId(), $qty, $selection);
650
  $selection->addCustomOption('selection_id', $selection->getSelectionId());
651
+ $product->addCustomOption('product_qty_' . $selection->getId(), $qty, $selection);
 
 
 
 
 
 
652
 
653
  /*
654
  * Create extra attributes that will be converted to product options in order item
727
  $usedSelections = Mage::getResourceModel('bundle/selection_collection')
728
  ->addAttributeToSelect('*')
729
  ->setFlag('require_stock_items', true)
730
+ ->setFlag('product_children', true)
731
  ->addStoreFilter($this->getStoreFilter($product))
732
  ->setStoreId($storeId)
733
  ->setPositionOrder()
app/code/core/Mage/Bundle/Model/Resource/Bundle.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Resource/Indexer/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -242,17 +242,17 @@ class Mage_Bundle_Model_Resource_Indexer_Price extends Mage_Catalog_Model_Resour
242
  if ($priceType == Mage_Bundle_Model_Product_Price::PRICE_TYPE_FIXED) {
243
  $finalPrice = $write->getCheckSql(
244
  $specialExpr . ' > 0',
245
- 'ROUND(' . $price . ' * (' . $specialExpr . ' / 100), 4)',
246
  $price
247
  );
248
  $tierPrice = $write->getCheckSql(
249
  $tierExpr . ' IS NOT NULL',
250
- 'ROUND(' . $price . ' - ' . '(' . $price . ' * (' . $tierExpr . ' / 100)), 4)',
251
  'NULL'
252
  );
253
  $groupPrice = $write->getCheckSql(
254
  $groupPriceExpr . ' > 0',
255
- 'ROUND(' . $price . ' - ' . '(' . $price . ' * (' . $groupPriceExpr . ' / 100)), 4)',
256
  'NULL'
257
  );
258
  $finalPrice = $write->getCheckSql(
@@ -417,10 +417,10 @@ class Mage_Bundle_Model_Resource_Indexer_Price extends Mage_Catalog_Model_Resour
417
  $priceExpr = new Zend_Db_Expr(
418
  $write->getCheckSql(
419
  $selectionPriceType . ' = 1',
420
- 'ROUND(i.price * (' . $selectionPriceValue . ' / 100),4)',
421
  $write->getCheckSql(
422
  'i.special_price > 0 AND i.special_price < 100',
423
- 'ROUND(' . $selectionPriceValue . ' * (i.special_price / 100),4)',
424
  $selectionPriceValue
425
  )
426
  ) . '* bs.selection_qty'
@@ -430,11 +430,11 @@ class Mage_Bundle_Model_Resource_Indexer_Price extends Mage_Catalog_Model_Resour
430
  'i.base_tier IS NOT NULL',
431
  $write->getCheckSql(
432
  $selectionPriceType .' = 1',
433
- 'ROUND(i.base_tier - (i.base_tier * (' . $selectionPriceValue . ' / 100)),4)',
434
  $write->getCheckSql(
435
  'i.tier_percent > 0',
436
  'ROUND(' . $selectionPriceValue
437
- . ' - (' . $selectionPriceValue . ' * (i.tier_percent / 100)),4)',
438
  $selectionPriceValue
439
  )
440
  ) . ' * bs.selection_qty',
@@ -449,7 +449,7 @@ class Mage_Bundle_Model_Resource_Indexer_Price extends Mage_Catalog_Model_Resour
449
  $write->getCheckSql(
450
  'i.group_price_percent > 0',
451
  'ROUND(' . $selectionPriceValue
452
- . ' - (' . $selectionPriceValue . ' * (i.group_price_percent / 100)),4)',
453
  $selectionPriceValue
454
  )
455
  ) . ' * bs.selection_qty',
@@ -462,24 +462,24 @@ class Mage_Bundle_Model_Resource_Indexer_Price extends Mage_Catalog_Model_Resour
462
  $priceExpr = new Zend_Db_Expr(
463
  $write->getCheckSql(
464
  'i.special_price > 0 AND i.special_price < 100',
465
- 'ROUND(idx.min_price * (i.special_price / 100), 4)',
466
  'idx.min_price'
467
  ) . ' * bs.selection_qty'
468
  );
469
  $tierExpr = $write->getCheckSql(
470
  'i.base_tier IS NOT NULL',
471
- 'ROUND(idx.min_price * (i.base_tier / 100), 4)* bs.selection_qty',
472
  'NULL'
473
  );
474
  $groupExpr = $write->getCheckSql(
475
  'i.base_group_price IS NOT NULL',
476
- 'ROUND(idx.min_price * (i.base_group_price / 100), 4)* bs.selection_qty',
477
  'NULL'
478
  );
479
  $groupPriceExpr = new Zend_Db_Expr(
480
  $write->getCheckSql(
481
  'i.base_group_price IS NOT NULL AND i.base_group_price > 0 AND i.base_group_price < 100',
482
- 'ROUND(idx.min_price - idx.min_price * (i.base_group_price / 100), 4)',
483
  'idx.min_price'
484
  ) . ' * bs.selection_qty'
485
  );
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
242
  if ($priceType == Mage_Bundle_Model_Product_Price::PRICE_TYPE_FIXED) {
243
  $finalPrice = $write->getCheckSql(
244
  $specialExpr . ' > 0',
245
+ 'ROUND(' . $price . ' * (' . $specialExpr . ' / 100), 2)',
246
  $price
247
  );
248
  $tierPrice = $write->getCheckSql(
249
  $tierExpr . ' IS NOT NULL',
250
+ 'ROUND(' . $price . ' - ' . '(' . $price . ' * (' . $tierExpr . ' / 100)), 2)',
251
  'NULL'
252
  );
253
  $groupPrice = $write->getCheckSql(
254
  $groupPriceExpr . ' > 0',
255
+ 'ROUND(' . $price . ' - ' . '(' . $price . ' * (' . $groupPriceExpr . ' / 100)), 2)',
256
  'NULL'
257
  );
258
  $finalPrice = $write->getCheckSql(
417
  $priceExpr = new Zend_Db_Expr(
418
  $write->getCheckSql(
419
  $selectionPriceType . ' = 1',
420
+ 'ROUND(i.price * (' . $selectionPriceValue . ' / 100),2)',
421
  $write->getCheckSql(
422
  'i.special_price > 0 AND i.special_price < 100',
423
+ 'ROUND(' . $selectionPriceValue . ' * (i.special_price / 100),2)',
424
  $selectionPriceValue
425
  )
426
  ) . '* bs.selection_qty'
430
  'i.base_tier IS NOT NULL',
431
  $write->getCheckSql(
432
  $selectionPriceType .' = 1',
433
+ 'ROUND(i.base_tier - (i.base_tier * (' . $selectionPriceValue . ' / 100)),2)',
434
  $write->getCheckSql(
435
  'i.tier_percent > 0',
436
  'ROUND(' . $selectionPriceValue
437
+ . ' - (' . $selectionPriceValue . ' * (i.tier_percent / 100)),2)',
438
  $selectionPriceValue
439
  )
440
  ) . ' * bs.selection_qty',
449
  $write->getCheckSql(
450
  'i.group_price_percent > 0',
451
  'ROUND(' . $selectionPriceValue
452
+ . ' - (' . $selectionPriceValue . ' * (i.group_price_percent / 100)),2)',
453
  $selectionPriceValue
454
  )
455
  ) . ' * bs.selection_qty',
462
  $priceExpr = new Zend_Db_Expr(
463
  $write->getCheckSql(
464
  'i.special_price > 0 AND i.special_price < 100',
465
+ 'ROUND(idx.min_price * (i.special_price / 100), 2)',
466
  'idx.min_price'
467
  ) . ' * bs.selection_qty'
468
  );
469
  $tierExpr = $write->getCheckSql(
470
  'i.base_tier IS NOT NULL',
471
+ 'ROUND(idx.min_price * (i.base_tier / 100), 2)* bs.selection_qty',
472
  'NULL'
473
  );
474
  $groupExpr = $write->getCheckSql(
475
  'i.base_group_price IS NOT NULL',
476
+ 'ROUND(idx.min_price * (i.base_group_price / 100), 2)* bs.selection_qty',
477
  'NULL'
478
  );
479
  $groupPriceExpr = new Zend_Db_Expr(
480
  $write->getCheckSql(
481
  'i.base_group_price IS NOT NULL AND i.base_group_price > 0 AND i.base_group_price < 100',
482
+ 'ROUND(idx.min_price - idx.min_price * (i.base_group_price / 100), 2)',
483
  'idx.min_price'
484
  ) . ' * bs.selection_qty'
485
  );
app/code/core/Mage/Bundle/Model/Resource/Indexer/Stock.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Resource/Option.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Resource/Option/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Resource/Price/Index.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Resource/Selection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Resource/Selection/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Selection.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Source/Option/Selection/Price/Type.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/Model/Source/Option/Type.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/controllers/Adminhtml/Bundle/Product/EditController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/controllers/Adminhtml/Bundle/SelectionController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/controllers/Product/EditController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/controllers/SelectionController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/data/bundle_setup/data-install-1.6.0.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/etc/config.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_Bundle
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_Bundle
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/Bundle/sql/bundle_setup/install-1.6.0.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-data-upgrade-0.1.13-0.1.14.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-install-0.1.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.0-0.1.1.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.1-0.1.2.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.10-0.1.11.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.11-0.1.12.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.12-0.1.13.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.2-0.1.3.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.3-0.1.4.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.4-0.1.5.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.5-0.1.6.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.6-0.1.7.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.7-0.1.8.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.8-0.1.9.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.9-0.1.10.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-1.6.0.0-1.6.0.0.1.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Bundle/sql/bundle_setup/upgrade-1.6.0.0-1.6.0.0.1.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Bundle
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Captcha/Block/Captcha.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Captcha/Block/Captcha/Zend.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Captcha/Helper/Data.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Captcha/Model/Config/Font.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Captcha/Model/Config/Form/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Captcha/Model/Config/Form/Backend.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Captcha/Model/Config/Form/Frontend.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Captcha/Model/Config/Mode.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Captcha/Model/Interface.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Captcha/Model/Observer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -162,7 +162,7 @@ class Mage_Captcha_Model_Observer
162
  {
163
  $formId = 'backend_login';
164
  $captchaModel = Mage::helper('captcha')->getCaptcha($formId);
165
- $loginParams = Mage::app()->getRequest()->getPost('login');
166
  $login = array_key_exists('username', $loginParams) ? $loginParams['username'] : null;
167
  if ($captchaModel->isRequired($login)) {
168
  if (!$captchaModel->isCorrect($this->_getCaptchaString(Mage::app()->getRequest(), $formId))) {
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
162
  {
163
  $formId = 'backend_login';
164
  $captchaModel = Mage::helper('captcha')->getCaptcha($formId);
165
+ $loginParams = Mage::app()->getRequest()->getPost('login', array());
166
  $login = array_key_exists('username', $loginParams) ? $loginParams['username'] : null;
167
  if ($captchaModel->isRequired($login)) {
168
  if (!$captchaModel->isCorrect($this->_getCaptchaString(Mage::app()->getRequest(), $formId))) {
app/code/core/Mage/Captcha/Model/Resource/Log.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Captcha/Model/Zend.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -108,7 +108,6 @@ class Mage_Captcha_Model_Zend extends Zend_Captcha_Image implements Mage_Captcha
108
  return 'captcha/captcha_zend';
109
  }
110
 
111
-
112
  /**
113
  * Whether captcha is required to be inserted to this form
114
  *
@@ -405,6 +404,11 @@ class Mage_Captcha_Model_Zend extends Zend_Captcha_Image implements Mage_Captcha
405
  */
406
  protected function _isShowAlways()
407
  {
 
 
 
 
 
408
  if ((string)$this->_getHelper()->getConfigNode('mode') == Mage_Captcha_Helper_Data::MODE_ALWAYS) {
409
  return true;
410
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
108
  return 'captcha/captcha_zend';
109
  }
110
 
 
111
  /**
112
  * Whether captcha is required to be inserted to this form
113
  *
404
  */
405
  protected function _isShowAlways()
406
  {
407
+ // setting the allowed attempts to 0 is like setting mode to always
408
+ if ($this->_getAllowedAttemptsForSameLogin() == 0 || $this->_getAllowedAttemptsFromSameIp() == 0) {
409
+ return true;
410
+ }
411
+
412
  if ((string)$this->_getHelper()->getConfigNode('mode') == Mage_Captcha_Helper_Data::MODE_ALWAYS) {
413
  return true;
414
  }
app/code/core/Mage/Captcha/controllers/Adminhtml/RefreshController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Captcha/controllers/RefreshController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Captcha/etc/config.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_Captcha
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_Captcha
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/Captcha/etc/system.xml CHANGED
@@ -21,7 +21,7 @@
21
  *
22
  * @category Mage
23
  * @package Mage_Captcha
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
21
  *
22
  * @category Mage
23
  * @package Mage_Captcha
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
  -->
app/code/core/Mage/Captcha/sql/captcha_setup/install-1.7.0.0.0.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  /* @var $installer Mage_Core_Model_Resource_Setup */
20
  *
21
  * @category Mage
22
  * @package Mage_Captcha
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  /* @var $installer Mage_Core_Model_Resource_Setup */
app/code/core/Mage/Catalog/Block/Breadcrumbs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Category/View.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -77,7 +77,12 @@ class Mage_Catalog_Block_Category_View extends Mage_Core_Block_Template
77
 
78
  public function getRssLink()
79
  {
80
- return Mage::getUrl('rss/catalog/category',array('cid' => $this->getCurrentCategory()->getId(), 'store_id' => Mage::app()->getStore()->getId()));
 
 
 
 
 
81
  }
82
 
83
  public function getProductListHtml()
@@ -148,4 +153,14 @@ class Mage_Catalog_Block_Category_View extends Mage_Core_Block_Template
148
  }
149
  return $res;
150
  }
 
 
 
 
 
 
 
 
 
 
151
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
77
 
78
  public function getRssLink()
79
  {
80
+ return Mage::getUrl('rss/catalog/category',
81
+ array(
82
+ 'cid' => $this->getCurrentCategory()->getId(),
83
+ 'store_id' => Mage::app()->getStore()->getId()
84
+ )
85
+ );
86
  }
87
 
88
  public function getProductListHtml()
153
  }
154
  return $res;
155
  }
156
+
157
+ /**
158
+ * Retrieve block cache tags based on category
159
+ *
160
+ * @return array
161
+ */
162
+ public function getCacheTags()
163
+ {
164
+ return array_merge(parent::getCacheTags(), $this->getCurrentCategory()->getCacheIdTags());
165
+ }
166
  }
app/code/core/Mage/Catalog/Block/Category/Widget/Link.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Layer/Filter/Attribute.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Layer/Filter/Category.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Layer/Filter/Decimal.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Layer/Filter/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Layer/State.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Layer/View.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Navigation.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -34,7 +34,12 @@
34
  */
35
  class Mage_Catalog_Block_Navigation extends Mage_Core_Block_Template
36
  {
37
- protected $_categoryInstance = null;
 
 
 
 
 
38
 
39
  /**
40
  * Current category key
@@ -50,11 +55,22 @@ class Mage_Catalog_Block_Navigation extends Mage_Core_Block_Template
50
  */
51
  protected $_itemLevelPositions = array();
52
 
 
 
 
 
 
 
 
 
 
 
53
  protected function _construct()
54
  {
55
- $this->addData(array(
56
- 'cache_lifetime' => false,
57
- 'cache_tags' => array(Mage_Catalog_Model_Category::CACHE_TAG, Mage_Core_Model_Store_Group::CACHE_TAG),
 
58
  ));
59
  }
60
 
@@ -107,7 +123,7 @@ class Mage_Catalog_Block_Navigation extends Mage_Core_Block_Template
107
  }
108
 
109
  /**
110
- * Get catagories of current store
111
  *
112
  * @return Varien_Data_Tree_Node_Collection
113
  */
@@ -120,34 +136,38 @@ class Mage_Catalog_Block_Navigation extends Mage_Core_Block_Template
120
  /**
121
  * Retrieve child categories of current category
122
  *
123
- * @return Varien_Data_Tree_Node_Collection
124
  */
125
  public function getCurrentChildCategories()
126
  {
127
- $layer = Mage::getSingleton('catalog/layer');
128
- $category = $layer->getCurrentCategory();
129
- /* @var $category Mage_Catalog_Model_Category */
130
- $categories = $category->getChildrenCategories();
131
- $productCollection = Mage::getResourceModel('catalog/product_collection');
132
- $layer->prepareProductCollection($productCollection);
133
- $productCollection->addCountToCategories($categories);
134
- return $categories;
 
135
  }
136
 
137
  /**
138
- * Checkin activity of category
139
  *
140
- * @param Varien_Object $category
141
- * @return bool
142
  */
143
  public function isCategoryActive($category)
144
  {
145
- if ($this->getCurrentCategory()) {
146
- return in_array($category->getId(), $this->getCurrentCategory()->getPathIds());
147
- }
148
- return false;
149
  }
150
 
 
 
 
 
 
151
  protected function _getCategoryInstance()
152
  {
153
  if (is_null($this->_categoryInstance)) {
@@ -224,7 +244,9 @@ class Mage_Catalog_Block_Navigation extends Mage_Core_Block_Template
224
  $html = array();
225
 
226
  // get all children
227
- if (Mage::helper('catalog/category_flat')->isEnabled()) {
 
 
228
  $children = (array)$category->getChildrenNodes();
229
  $childrenCount = count($children);
230
  } else {
@@ -373,33 +395,33 @@ class Mage_Catalog_Block_Navigation extends Mage_Core_Block_Template
373
  return $html;
374
  }
375
 
376
- $html.= '<li';
377
 
378
  if ($this->isCategoryActive($category)) {
379
- $html.= ' class="active"';
380
  }
381
 
382
- $html.= '>'."\n";
383
- $html.= '<a href="'.$this->getCategoryUrl($category).'"><span>'.$this->htmlEscape($category->getName()).'</span></a>'."\n";
 
384
 
385
- if (in_array($category->getId(), $this->getCurrentCategoryPath())){
386
  $children = $category->getChildren();
387
  $hasChildren = $children && $children->count();
388
 
389
  if ($hasChildren) {
390
  $htmlChildren = '';
391
  foreach ($children as $child) {
392
- $htmlChildren.= $this->drawOpenCategoryItem($child);
393
  }
394
 
395
  if (!empty($htmlChildren)) {
396
- $html.= '<ul>'."\n"
397
- .$htmlChildren
398
- .'</ul>';
399
  }
400
  }
401
  }
402
- $html.= '</li>'."\n";
 
403
  return $html;
404
  }
405
 
@@ -444,5 +466,4 @@ class Mage_Catalog_Block_Navigation extends Mage_Core_Block_Template
444
 
445
  return $html;
446
  }
447
-
448
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
34
  */
35
  class Mage_Catalog_Block_Navigation extends Mage_Core_Block_Template
36
  {
37
+ /**
38
+ * Category instance
39
+ *
40
+ * @var Mage_Catalog_Model_Category
41
+ */
42
+ protected $_categoryInstance;
43
 
44
  /**
45
  * Current category key
55
  */
56
  protected $_itemLevelPositions = array();
57
 
58
+ /**
59
+ * Current child categories collection
60
+ *
61
+ * @var Mage_Catalog_Model_Resource_Category_Collection
62
+ */
63
+ protected $_currentChildCategories;
64
+
65
+ /**
66
+ * Set cache data
67
+ */
68
  protected function _construct()
69
  {
70
+ $this->addData(array('cache_lifetime' => false));
71
+ $this->addCacheTag(array(
72
+ Mage_Catalog_Model_Category::CACHE_TAG,
73
+ Mage_Core_Model_Store_Group::CACHE_TAG
74
  ));
75
  }
76
 
123
  }
124
 
125
  /**
126
+ * Get categories of current store
127
  *
128
  * @return Varien_Data_Tree_Node_Collection
129
  */
136
  /**
137
  * Retrieve child categories of current category
138
  *
139
+ * @return Mage_Catalog_Model_Resource_Category_Collection
140
  */
141
  public function getCurrentChildCategories()
142
  {
143
+ if (null === $this->_currentChildCategories) {
144
+ $layer = Mage::getSingleton('catalog/layer');
145
+ $category = $layer->getCurrentCategory();
146
+ $this->_currentChildCategories = $category->getChildrenCategories();
147
+ $productCollection = Mage::getResourceModel('catalog/product_collection');
148
+ $layer->prepareProductCollection($productCollection);
149
+ $productCollection->addCountToCategories($this->_currentChildCategories);
150
+ }
151
+ return $this->_currentChildCategories;
152
  }
153
 
154
  /**
155
+ * Check whether specified category is active
156
  *
157
+ * @param Varien_Object $category
158
+ * @return bool
159
  */
160
  public function isCategoryActive($category)
161
  {
162
+ return $this->getCurrentCategory()
163
+ ? in_array($category->getId(), $this->getCurrentCategory()->getPathIds()) : false;
 
 
164
  }
165
 
166
+ /**
167
+ * Retrieve category instance
168
+ *
169
+ * @return Mage_Catalog_Model_Category
170
+ */
171
  protected function _getCategoryInstance()
172
  {
173
  if (is_null($this->_categoryInstance)) {
244
  $html = array();
245
 
246
  // get all children
247
+ // If Flat Data enabled then use it but only on frontend
248
+ $flatHelper = Mage::helper('catalog/category_flat');
249
+ if ($flatHelper->isAvailable() && $flatHelper->isBuilt(true) && !Mage::app()->getStore()->isAdmin()) {
250
  $children = (array)$category->getChildrenNodes();
251
  $childrenCount = count($children);
252
  } else {
395
  return $html;
396
  }
397
 
398
+ $html .= '<li';
399
 
400
  if ($this->isCategoryActive($category)) {
401
+ $html .= ' class="active"';
402
  }
403
 
404
+ $html .= '>' . "\n";
405
+ $html .= '<a href="'.$this->getCategoryUrl($category).'">'
406
+ . '<span>' . $this->escapeHtml($category->getName()) . '</span></a>' . "\n";
407
 
408
+ if (in_array($category->getId(), $this->getCurrentCategoryPath())) {
409
  $children = $category->getChildren();
410
  $hasChildren = $children && $children->count();
411
 
412
  if ($hasChildren) {
413
  $htmlChildren = '';
414
  foreach ($children as $child) {
415
+ $htmlChildren .= $this->drawOpenCategoryItem($child);
416
  }
417
 
418
  if (!empty($htmlChildren)) {
419
+ $html .= '<ul>' . "\n" . $htmlChildren . '</ul>';
 
 
420
  }
421
  }
422
  }
423
+ $html .= '</li>'."\n";
424
+
425
  return $html;
426
  }
427
 
466
 
467
  return $html;
468
  }
 
469
  }
app/code/core/Mage/Catalog/Block/Product.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -34,6 +34,11 @@
34
  */
35
  abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Template
36
  {
 
 
 
 
 
37
  protected $_priceBlock = array();
38
 
39
  /**
@@ -43,10 +48,25 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
43
  */
44
  protected $_block = 'catalog/product_price';
45
 
 
 
 
 
 
46
  protected $_priceBlockDefaultTemplate = 'catalog/product/price.phtml';
47
 
 
 
 
 
 
48
  protected $_tierPriceDefaultTemplate = 'catalog/product/view/tierprices.phtml';
49
 
 
 
 
 
 
50
  protected $_priceBlockTypes = array();
51
 
52
  /**
@@ -56,6 +76,11 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
56
  */
57
  protected $_useLinkForAsLowAs = true;
58
 
 
 
 
 
 
59
  protected $_reviewsHelperBlock;
60
 
61
  /**
@@ -89,18 +114,33 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
89
  */
90
  public function getAddToCartUrl($product, $additional = array())
91
  {
92
- if ($product->getTypeInstance(true)->hasRequiredOptions($product)) {
93
- if (!isset($additional['_escape'])) {
94
- $additional['_escape'] = true;
95
- }
96
- if (!isset($additional['_query'])) {
97
- $additional['_query'] = array();
98
- }
99
- $additional['_query']['options'] = 'cart';
100
-
101
- return $this->getProductUrl($product, $additional);
 
 
102
  }
103
- return $this->helper('checkout/cart')->getAddUrl($product, $additional);
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  }
105
 
106
  /**
@@ -126,7 +166,7 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
126
  }
127
 
128
  /**
129
- * Enter description here...
130
  *
131
  * @param Mage_Catalog_Model_Product $product
132
  * @return string
@@ -147,14 +187,28 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
147
  return $this->helper('catalog/product_compare')->getAddUrl($product);
148
  }
149
 
 
 
 
 
 
 
150
  public function getMinimalQty($product)
151
  {
152
- if ($stockItem = $product->getStockItem()) {
153
- return ($stockItem->getMinSaleQty() && $stockItem->getMinSaleQty() > 0 ? $stockItem->getMinSaleQty() * 1 : null);
 
 
154
  }
155
  return null;
156
  }
157
 
 
 
 
 
 
 
158
  protected function _getPriceBlock($productTypeId)
159
  {
160
  if (!isset($this->_priceBlock[$productTypeId])) {
@@ -169,6 +223,12 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
169
  return $this->_priceBlock[$productTypeId];
170
  }
171
 
 
 
 
 
 
 
172
  protected function _getPriceBlockTemplate($productTypeId)
173
  {
174
  if (isset($this->_priceBlockTypes[$productTypeId])) {
@@ -304,6 +364,11 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
304
  return $this->getData('product');
305
  }
306
 
 
 
 
 
 
307
  public function getTierPriceTemplate()
308
  {
309
  if (!$this->hasData('tier_price_template')) {
@@ -419,13 +484,13 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
419
  *
420
  * @return string
421
  */
422
- public function getImageLabel($product=null, $mediaAttributeCode='image')
423
  {
424
  if (is_null($product)) {
425
  $product = $this->getProduct();
426
  }
427
 
428
- $label = $product->getData($mediaAttributeCode.'_label');
429
  if (empty($label)) {
430
  $label = $product->getName();
431
  }
@@ -448,7 +513,6 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
448
  }
449
  return $product->getUrlModel()->getUrl($product, $additional);
450
  }
451
-
452
  return '#';
453
  }
454
 
@@ -457,18 +521,13 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
457
  *
458
  * @param Mage_Catalog_Model_Product $product
459
  * @return bool
 
460
  */
461
  public function hasProductUrl($product)
462
  {
463
  if ($product->getVisibleInSiteVisibilities()) {
464
  return true;
465
  }
466
- if ($product->hasUrlDataObject()) {
467
- if (in_array($product->hasUrlDataObject()->getVisibility(), $product->getVisibleInSiteVisibilities())) {
468
- return true;
469
- }
470
- }
471
-
472
  return false;
473
  }
474
 
@@ -558,6 +617,18 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
558
  return $product->getCanShowPrice() !== false;
559
  }
560
 
 
 
 
 
 
 
 
 
 
 
 
 
561
  /**
562
  * If exists price template block, retrieve price blocks from it
563
  *
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
34
  */
35
  abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Template
36
  {
37
+ /**
38
+ * Price block array
39
+ *
40
+ * @var array
41
+ */
42
  protected $_priceBlock = array();
43
 
44
  /**
48
  */
49
  protected $_block = 'catalog/product_price';
50
 
51
+ /**
52
+ * Price template
53
+ *
54
+ * @var string
55
+ */
56
  protected $_priceBlockDefaultTemplate = 'catalog/product/price.phtml';
57
 
58
+ /**
59
+ * Tier price template
60
+ *
61
+ * @var string
62
+ */
63
  protected $_tierPriceDefaultTemplate = 'catalog/product/view/tierprices.phtml';
64
 
65
+ /**
66
+ * Price types
67
+ *
68
+ * @var array
69
+ */
70
  protected $_priceBlockTypes = array();
71
 
72
  /**
76
  */
77
  protected $_useLinkForAsLowAs = true;
78
 
79
+ /**
80
+ * Review block instance
81
+ *
82
+ * @var null|Mage_Review_Block_Helper
83
+ */
84
  protected $_reviewsHelperBlock;
85
 
86
  /**
114
  */
115
  public function getAddToCartUrl($product, $additional = array())
116
  {
117
+ if (!$product->getTypeInstance(true)->hasRequiredOptions($product)) {
118
+ return $this->helper('checkout/cart')->getAddUrl($product, $additional);
119
+ }
120
+ $additional = array_merge(
121
+ $additional,
122
+ array(Mage_Core_Model_Url::FORM_KEY => $this->_getSingletonModel('core/session')->getFormKey())
123
+ );
124
+ if (!isset($additional['_escape'])) {
125
+ $additional['_escape'] = true;
126
+ }
127
+ if (!isset($additional['_query'])) {
128
+ $additional['_query'] = array();
129
  }
130
+ $additional['_query']['options'] = 'cart';
131
+ return $this->getProductUrl($product, $additional);
132
+ }
133
+
134
+ /**
135
+ * Return model instance
136
+ *
137
+ * @param string $className
138
+ * @param array $arguments
139
+ * @return Mage_Core_Model_Abstract
140
+ */
141
+ protected function _getSingletonModel($className, $arguments = array())
142
+ {
143
+ return Mage::getSingleton($className, $arguments);
144
  }
145
 
146
  /**
166
  }
167
 
168
  /**
169
+ * Return link to Add to Wishlist
170
  *
171
  * @param Mage_Catalog_Model_Product $product
172
  * @return string
187
  return $this->helper('catalog/product_compare')->getAddUrl($product);
188
  }
189
 
190
+ /**
191
+ * Gets minimal sales quantity
192
+ *
193
+ * @param Mage_Catalog_Model_Product $product
194
+ * @return int|null
195
+ */
196
  public function getMinimalQty($product)
197
  {
198
+ $stockItem = $product->getStockItem();
199
+ if ($stockItem) {
200
+ return ($stockItem->getMinSaleQty()
201
+ && $stockItem->getMinSaleQty() > 0 ? $stockItem->getMinSaleQty() * 1 : null);
202
  }
203
  return null;
204
  }
205
 
206
+ /**
207
+ * Return price block
208
+ *
209
+ * @param string $productTypeId
210
+ * @return mixed
211
+ */
212
  protected function _getPriceBlock($productTypeId)
213
  {
214
  if (!isset($this->_priceBlock[$productTypeId])) {
223
  return $this->_priceBlock[$productTypeId];
224
  }
225
 
226
+ /**
227
+ * Return Block template
228
+ *
229
+ * @param string $productTypeId
230
+ * @return string
231
+ */
232
  protected function _getPriceBlockTemplate($productTypeId)
233
  {
234
  if (isset($this->_priceBlockTypes[$productTypeId])) {
364
  return $this->getData('product');
365
  }
366
 
367
+ /**
368
+ * Return tier price template
369
+ *
370
+ * @return mixed|string
371
+ */
372
  public function getTierPriceTemplate()
373
  {
374
  if (!$this->hasData('tier_price_template')) {
484
  *
485
  * @return string
486
  */
487
+ public function getImageLabel($product = null, $mediaAttributeCode = 'image')
488
  {
489
  if (is_null($product)) {
490
  $product = $this->getProduct();
491
  }
492
 
493
+ $label = $product->getData($mediaAttributeCode . '_label');
494
  if (empty($label)) {
495
  $label = $product->getName();
496
  }
513
  }
514
  return $product->getUrlModel()->getUrl($product, $additional);
515
  }
 
516
  return '#';
517
  }
518
 
521
  *
522
  * @param Mage_Catalog_Model_Product $product
523
  * @return bool
524
+ *
525
  */
526
  public function hasProductUrl($product)
527
  {
528
  if ($product->getVisibleInSiteVisibilities()) {
529
  return true;
530
  }
 
 
 
 
 
 
531
  return false;
532
  }
533
 
617
  return $product->getCanShowPrice() !== false;
618
  }
619
 
620
+ /**
621
+ * Get if it is necessary to show product stock status
622
+ *
623
+ * @return bool
624
+ */
625
+ public function displayProductStockStatus()
626
+ {
627
+ $statusInfo = new Varien_Object(array('display_status' => true));
628
+ Mage::dispatchEvent('catalog_block_product_status_display', array('status' => $statusInfo));
629
+ return (boolean)$statusInfo->getDisplayStatus();
630
+ }
631
+
632
  /**
633
  * If exists price template block, retrieve price blocks from it
634
  *
app/code/core/Mage/Catalog/Block/Product/Compare/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/Compare/List.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -62,6 +62,13 @@ class Mage_Catalog_Block_Product_Compare_List extends Mage_Catalog_Block_Product
62
  */
63
  protected $_customerId = null;
64
 
 
 
 
 
 
 
 
65
  /**
66
  * Retrieve url for adding product to wishlist with params
67
  *
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
62
  */
63
  protected $_customerId = null;
64
 
65
+ /**
66
+ * Default MAP renderer type
67
+ *
68
+ * @var string
69
+ */
70
+ protected $_mapRenderer = 'msrp_noform';
71
+
72
  /**
73
  * Retrieve url for adding product to wishlist with params
74
  *
app/code/core/Mage/Catalog/Block/Product/Compare/Sidebar.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -104,4 +104,21 @@ class Mage_Catalog_Block_Product_Compare_Sidebar extends Mage_Catalog_Block_Prod
104
  {
105
  return $this->_getHelper()->getListUrl();
106
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
104
  {
105
  return $this->_getHelper()->getListUrl();
106
  }
107
+
108
+ /**
109
+ * Retrieve block cache tags
110
+ *
111
+ * @return array
112
+ */
113
+ public function getCacheTags()
114
+ {
115
+ $compareItem = Mage::getModel('catalog/product_compare_item');
116
+ foreach ($this->getItems() as $product) {
117
+ $this->addModelTags($product);
118
+ $this->addModelTags(
119
+ $compareItem->setId($product->getCatalogCompareItemId())
120
+ );
121
+ }
122
+ return parent::getCacheTags();
123
+ }
124
  }
app/code/core/Mage/Catalog/Block/Product/Gallery.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/List.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -81,6 +81,7 @@ class Mage_Catalog_Block_Product_List extends Mage_Catalog_Block_Product_Abstrac
81
  if ($category->getId()) {
82
  $origCategory = $layer->getCurrentCategory();
83
  $layer->setCurrentCategory($category);
 
84
  }
85
  }
86
  $this->_productCollection = $layer->getProductCollection();
@@ -254,4 +255,17 @@ class Mage_Catalog_Block_Product_List extends Mage_Catalog_Block_Product_Abstrac
254
 
255
  return $this;
256
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
81
  if ($category->getId()) {
82
  $origCategory = $layer->getCurrentCategory();
83
  $layer->setCurrentCategory($category);
84
+ $this->addModelTags($category);
85
  }
86
  }
87
  $this->_productCollection = $layer->getProductCollection();
255
 
256
  return $this;
257
  }
258
+
259
+ /**
260
+ * Retrieve block cache tags based on product collection
261
+ *
262
+ * @return array
263
+ */
264
+ public function getCacheTags()
265
+ {
266
+ return array_merge(
267
+ parent::getCacheTags(),
268
+ $this->getItemsTags($this->_getProductCollection())
269
+ );
270
+ }
271
  }
app/code/core/Mage/Catalog/Block/Product/List/Crosssell.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/List/Promotion.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Catalog_Block_Product_List_Promotion extends Mage_Catalog_Block_Product_List
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Catalog_Block_Product_List_Promotion extends Mage_Catalog_Block_Product_List
app/code/core/Mage/Catalog/Block/Product/List/Random.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/List/Related.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -82,4 +82,14 @@ class Mage_Catalog_Block_Product_List_Related extends Mage_Catalog_Block_Product
82
  {
83
  return $this->_itemCollection;
84
  }
 
 
 
 
 
 
 
 
 
 
85
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
82
  {
83
  return $this->_itemCollection;
84
  }
85
+
86
+ /**
87
+ * Get tags array for saving cache
88
+ *
89
+ * @return array
90
+ */
91
+ public function getCacheTags()
92
+ {
93
+ return array_merge(parent::getCacheTags(), $this->getItemsTags($this->getItems()));
94
+ }
95
  }
app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/List/Upsell.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -102,7 +102,7 @@ class Mage_Catalog_Block_Product_List_Upsell extends Mage_Catalog_Block_Product_
102
 
103
  public function getItems()
104
  {
105
- if (is_null($this->_items)) {
106
  $this->_items = $this->getItemCollection()->getItems();
107
  }
108
  return $this->_items;
@@ -167,4 +167,14 @@ class Mage_Catalog_Block_Product_List_Upsell extends Mage_Catalog_Block_Product_
167
  return 0;
168
  }
169
  }
 
 
 
 
 
 
 
 
 
 
170
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
102
 
103
  public function getItems()
104
  {
105
+ if (is_null($this->_items) && $this->getItemCollection()) {
106
  $this->_items = $this->getItemCollection()->getItems();
107
  }
108
  return $this->_items;
167
  return 0;
168
  }
169
  }
170
+
171
+ /**
172
+ * Get tags array for saving cache
173
+ *
174
+ * @return array
175
+ */
176
+ public function getCacheTags()
177
+ {
178
+ return array_merge(parent::getCacheTags(), $this->getItemsTags($this->getItems()));
179
+ }
180
  }
app/code/core/Mage/Catalog/Block/Product/New.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,13 +29,21 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Catalog
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Catalog_Block_Product_New extends Mage_Catalog_Block_Product_Abstract
35
  {
36
- protected $_productsCount = null;
 
 
 
37
 
38
- const DEFAULT_PRODUCTS_COUNT = 5;
 
 
 
 
 
39
 
40
  /**
41
  * Initialize block's cache
@@ -50,10 +58,8 @@ class Mage_Catalog_Block_Product_New extends Mage_Catalog_Block_Product_Abstract
50
  ->addColumnCountLayoutDepend('two_columns_right', 4)
51
  ->addColumnCountLayoutDepend('three_columns', 3);
52
 
53
- $this->addData(array(
54
- 'cache_lifetime' => 86400,
55
- 'cache_tags' => array(Mage_Catalog_Model_Product::CACHE_TAG),
56
- ));
57
  }
58
 
59
  /**
@@ -75,11 +81,11 @@ class Mage_Catalog_Block_Product_New extends Mage_Catalog_Block_Product_Abstract
75
  }
76
 
77
  /**
78
- * Prepare collection with new products and applied page limits.
79
  *
80
- * return Mage_Catalog_Block_Product_New
81
  */
82
- protected function _beforeToHtml()
83
  {
84
  $todayStartOfDayDate = Mage::app()->getLocale()->date()
85
  ->setTime('00:00:00')
@@ -89,6 +95,7 @@ class Mage_Catalog_Block_Product_New extends Mage_Catalog_Block_Product_Abstract
89
  ->setTime('23:59:59')
90
  ->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
91
 
 
92
  $collection = Mage::getResourceModel('catalog/product_collection');
93
  $collection->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds());
94
 
@@ -114,8 +121,17 @@ class Mage_Catalog_Block_Product_New extends Mage_Catalog_Block_Product_Abstract
114
  ->setCurPage(1)
115
  ;
116
 
117
- $this->setProductCollection($collection);
 
118
 
 
 
 
 
 
 
 
 
119
  return parent::_beforeToHtml();
120
  }
121
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Catalog
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Catalog_Block_Product_New extends Mage_Catalog_Block_Product_Abstract
35
  {
36
+ /**
37
+ * Default value for products count that will be shown
38
+ */
39
+ const DEFAULT_PRODUCTS_COUNT = 10;
40
 
41
+ /**
42
+ * Products count
43
+ *
44
+ * @var null
45
+ */
46
+ protected $_productsCount;
47
 
48
  /**
49
  * Initialize block's cache
58
  ->addColumnCountLayoutDepend('two_columns_right', 4)
59
  ->addColumnCountLayoutDepend('three_columns', 3);
60
 
61
+ $this->addData(array('cache_lifetime' => 86400));
62
+ $this->addCacheTag(Mage_Catalog_Model_Product::CACHE_TAG);
 
 
63
  }
64
 
65
  /**
81
  }
82
 
83
  /**
84
+ * Prepare and return product collection
85
  *
86
+ * @return Mage_Catalog_Model_Resource_Product_Collection|Object|Varien_Data_Collection
87
  */
88
+ protected function _getProductCollection()
89
  {
90
  $todayStartOfDayDate = Mage::app()->getLocale()->date()
91
  ->setTime('00:00:00')
95
  ->setTime('23:59:59')
96
  ->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
97
 
98
+ /** @var $collection Mage_Catalog_Model_Resource_Product_Collection */
99
  $collection = Mage::getResourceModel('catalog/product_collection');
100
  $collection->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds());
101
 
121
  ->setCurPage(1)
122
  ;
123
 
124
+ return $collection;
125
+ }
126
 
127
+ /**
128
+ * Prepare collection with new products
129
+ *
130
+ * @return Mage_Core_Block_Abstract
131
+ */
132
+ protected function _beforeToHtml()
133
+ {
134
+ $this->setProductCollection($this->_getProductCollection());
135
  return parent::_beforeToHtml();
136
  }
137
 
app/code/core/Mage/Catalog/Block/Product/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,7 +31,7 @@
31
  * @category Mage
32
  * @package Mage_Catalog
33
  */
34
- class Mage_Catalog_Block_Product_Price extends Mage_Core_Block_Template
35
  {
36
  protected $_priceDisplayType = null;
37
  protected $_idSuffix = '';
@@ -165,4 +165,27 @@ class Mage_Catalog_Block_Product_Price extends Mage_Core_Block_Template
165
  $html = $this->hasRealPriceHtml() ? $this->getRealPriceHtml() : $product->getRealPriceHtml();
166
  return Mage::helper('core')->jsonEncode($html);
167
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @category Mage
32
  * @package Mage_Catalog
33
  */
34
+ class Mage_Catalog_Block_Product_Price extends Mage_Catalog_Block_Product_Abstract
35
  {
36
  protected $_priceDisplayType = null;
37
  protected $_idSuffix = '';
165
  $html = $this->hasRealPriceHtml() ? $this->getRealPriceHtml() : $product->getRealPriceHtml();
166
  return Mage::helper('core')->jsonEncode($html);
167
  }
168
+
169
+ /**
170
+ * Retrieve block cache tags
171
+ *
172
+ * @return array
173
+ */
174
+ public function getCacheTags()
175
+ {
176
+ return array_merge(parent::getCacheTags(), $this->getProduct()->getCacheIdTags());
177
+ }
178
+
179
+ /**
180
+ * Retrieve attribute instance by name, id or config node
181
+ *
182
+ * If attribute is not found false is returned
183
+ *
184
+ * @param string|integer|Mage_Core_Model_Config_Element $attribute
185
+ * @return Mage_Eav_Model_Entity_Attribute_Abstract || false
186
+ */
187
+ public function getProductAttribute($attribute)
188
+ {
189
+ return $this->getProduct()->getResource()->getAttribute($attribute);
190
+ }
191
  }
app/code/core/Mage/Catalog/Block/Product/Price/Template.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/Send.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -61,7 +61,7 @@ class Mage_Catalog_Block_Product_View extends Mage_Catalog_Block_Product_Abstrac
61
  $currentCategory = Mage::registry('current_category');
62
  if ($keyword) {
63
  $headBlock->setKeywords($keyword);
64
- } elseif($currentCategory) {
65
  $headBlock->setKeywords($product->getName());
66
  }
67
  $description = $product->getMetaDescription();
@@ -71,7 +71,7 @@ class Mage_Catalog_Block_Product_View extends Mage_Catalog_Block_Product_Abstrac
71
  $headBlock->setDescription(Mage::helper('core/string')->substr($product->getDescription(), 0, 255));
72
  }
73
  if ($this->helper('catalog/product')->canUseCanonicalTag()) {
74
- $params = array('_ignore_category'=>true);
75
  $headBlock->addLinkRel('canonical', $product->getUrlModel()->getUrl($product, $params));
76
  }
77
  }
@@ -117,7 +117,7 @@ class Mage_Catalog_Block_Product_View extends Mage_Catalog_Block_Product_Abstrac
117
  return $this->getCustomAddToCartUrl();
118
  }
119
 
120
- if ($this->getRequest()->getParam('wishlist_next')){
121
  $additional['wishlist_next'] = 1;
122
  }
123
 
@@ -191,9 +191,9 @@ class Mage_Catalog_Block_Product_View extends Mage_Catalog_Block_Product_Abstrac
191
  );
192
 
193
  $responseObject = new Varien_Object();
194
- Mage::dispatchEvent('catalog_product_view_config', array('response_object'=>$responseObject));
195
  if (is_array($responseObject->getAdditionalOptions())) {
196
- foreach ($responseObject->getAdditionalOptions() as $option=>$value) {
197
  $config[$option] = $value;
198
  }
199
  }
@@ -259,4 +259,14 @@ class Mage_Catalog_Block_Product_View extends Mage_Catalog_Block_Product_Abstrac
259
 
260
  return $qty;
261
  }
 
 
 
 
 
 
 
 
 
 
262
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
61
  $currentCategory = Mage::registry('current_category');
62
  if ($keyword) {
63
  $headBlock->setKeywords($keyword);
64
+ } elseif ($currentCategory) {
65
  $headBlock->setKeywords($product->getName());
66
  }
67
  $description = $product->getMetaDescription();
71
  $headBlock->setDescription(Mage::helper('core/string')->substr($product->getDescription(), 0, 255));
72
  }
73
  if ($this->helper('catalog/product')->canUseCanonicalTag()) {
74
+ $params = array('_ignore_category' => true);
75
  $headBlock->addLinkRel('canonical', $product->getUrlModel()->getUrl($product, $params));
76
  }
77
  }
117
  return $this->getCustomAddToCartUrl();
118
  }
119
 
120
+ if ($this->getRequest()->getParam('wishlist_next')) {
121
  $additional['wishlist_next'] = 1;
122
  }
123
 
191
  );
192
 
193
  $responseObject = new Varien_Object();
194
+ Mage::dispatchEvent('catalog_product_view_config', array('response_object' => $responseObject));
195
  if (is_array($responseObject->getAdditionalOptions())) {
196
+ foreach ($responseObject->getAdditionalOptions() as $option => $value) {
197
  $config[$option] = $value;
198
  }
199
  }
259
 
260
  return $qty;
261
  }
262
+
263
+ /**
264
+ * Retrieve block cache tags
265
+ *
266
+ * @return array
267
+ */
268
+ public function getCacheTags()
269
+ {
270
+ return array_merge(parent::getCacheTags(), $this->getProduct()->getCacheIdTags());
271
+ }
272
  }
app/code/core/Mage/Catalog/Block/Product/View/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Additional.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Attributes.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Description.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Media.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Options.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Options/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Default.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Options/Type/File.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Text.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Type/Grouped.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Type/Simple.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/View/Type/Virtual.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/Widget/Html/Pager.php ADDED
@@ -0,0 +1,299 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * New products widget pager block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Catalog
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Catalog_Block_Product_Widget_Html_Pager extends Mage_Page_Block_Html_Pager
35
+ {
36
+ /**
37
+ * Collection size
38
+ *
39
+ * Size of collection which may has a manual limitation
40
+ *
41
+ * @var int
42
+ */
43
+ protected $_collectionSize;
44
+
45
+ /**
46
+ * Current page
47
+ *
48
+ * @var int
49
+ */
50
+ protected $_currentPage;
51
+
52
+ /**
53
+ * Last page
54
+ *
55
+ * @var int
56
+ */
57
+ protected $_lastPage;
58
+
59
+ /**
60
+ * Return collection size
61
+ *
62
+ * It may be limited by manual
63
+ *
64
+ * @return int
65
+ */
66
+ public function getCollectionSize()
67
+ {
68
+ if (null === $this->_collectionSize) {
69
+ $this->_collectionSize = $this->getCollection()->getSize();
70
+ if ($this->getTotalLimit() && $this->_collectionSize > $this->getTotalLimit()) {
71
+ $this->_collectionSize = $this->getTotalLimit();
72
+ }
73
+ }
74
+ return $this->_collectionSize;
75
+ }
76
+
77
+ /**
78
+ * Return number of current page
79
+ *
80
+ * If current page is grate then total count of page current page will be equals total count of page
81
+ *
82
+ * @return int
83
+ */
84
+ public function getCurrentPage()
85
+ {
86
+ if (null === $this->_currentPage) {
87
+ $page = abs((int)$this->getRequest()->getParam($this->getPageVarName()));
88
+ if ($page > $this->getLastPageNum()) {
89
+ $this->_currentPage = $this->getLastPageNum();
90
+ } elseif ($page > 0) {
91
+ $this->_currentPage = $page;
92
+ } else {
93
+ $this->_currentPage = 1;
94
+ }
95
+ }
96
+ return $this->_currentPage;
97
+ }
98
+
99
+ /**
100
+ * Return items count per page
101
+ *
102
+ * @return int
103
+ */
104
+ public function getLimit()
105
+ {
106
+ if ($this->_limit > 0) {
107
+ return $this->_limit;
108
+ }
109
+ $limit = $this->getRequest()->getParam($this->getLimitVarName());
110
+ $limits = $this->getAvailableLimit();
111
+ if ($limit && isset($limits[$limit])) {
112
+ return $limit;
113
+ }
114
+ $limits = array_keys($limits);
115
+ return current($limits);
116
+ }
117
+
118
+ /**
119
+ * Connect collection to paging
120
+ *
121
+ * @param Mage_Core_Model_Resource_Db_Collection_Abstract $collection
122
+ * @return Mage_Catalog_Block_Product_Widget_Html_Pager
123
+ */
124
+ public function setCollection($collection)
125
+ {
126
+ $this->_collection = $collection;
127
+ $this->_collection->setPageSize(null)->setCurPage(null);
128
+
129
+ $collectionOffset = $this->getFirstNum() - 1;
130
+ $collectionLimit = $collectionOffset + $this->getLimit() > $this->getTotalNum()
131
+ ? $this->getTotalNum() - $collectionOffset
132
+ : $this->getLimit();
133
+
134
+ $this->_collection->getSelect()->limit($collectionLimit, $collectionOffset);
135
+ $this->_setFrameInitialized(false);
136
+ return $this;
137
+ }
138
+
139
+ /**
140
+ * Return position number in collection for first item on current page
141
+ *
142
+ * @return int
143
+ */
144
+ public function getFirstNum()
145
+ {
146
+ return $this->getLimit() * ($this->getCurrentPage() - 1) + 1;
147
+ }
148
+
149
+ /**
150
+ * Return position number in collection for last item on current page
151
+ *
152
+ * @return int
153
+ */
154
+ public function getLastNum()
155
+ {
156
+ $collection = $this->getCollection();
157
+ return $this->getLimit() * ($this->getCurrentPage() - 1) + $collection->count();
158
+ }
159
+
160
+ /**
161
+ * Return total number of collection
162
+ *
163
+ * It may be limited by manual
164
+ *
165
+ * @return int
166
+ */
167
+ public function getTotalNum()
168
+ {
169
+ return $this->getCollectionSize();
170
+ }
171
+
172
+ /**
173
+ * Return number of last page
174
+ *
175
+ * @return bool
176
+ */
177
+ public function getLastPageNum()
178
+ {
179
+ if (null === $this->_lastPage) {
180
+ $this->_lastPage = ceil($this->getCollectionSize() / $this->getLimit());
181
+ if ($this->_lastPage <= 0) {
182
+ $this->_lastPage = 1;
183
+ }
184
+ }
185
+ return $this->_lastPage;
186
+ }
187
+
188
+ /**
189
+ * Checks if current page is the first page
190
+ *
191
+ * @return bool
192
+ */
193
+ public function isFirstPage()
194
+ {
195
+ return $this->getCurrentPage() == 1;
196
+ }
197
+
198
+ /**
199
+ * Checks if current page is the last page
200
+ *
201
+ * @return bool
202
+ */
203
+ public function isLastPage()
204
+ {
205
+ return $this->getCurrentPage() >= $this->getLastPageNum();
206
+ }
207
+
208
+ /**
209
+ * Return array of pages
210
+ *
211
+ * @return array
212
+ */
213
+ public function getPages()
214
+ {
215
+ $pages = array();
216
+ if ($this->getLastPageNum() <= $this->_displayPages) {
217
+ $pages = range(1, $this->getLastPageNum());
218
+ } else {
219
+ $half = ceil($this->_displayPages / 2);
220
+ if ($this->getCurrentPage() >= $half && $this->getCurrentPage() <= $this->getLastPageNum() - $half) {
221
+ $start = ($this->getCurrentPage() - $half) + 1;
222
+ $finish = ($start + $this->_displayPages) - 1;
223
+ } elseif ($this->getCurrentPage() < $half) {
224
+ $start = 1;
225
+ $finish = $this->_displayPages;
226
+ } elseif ($this->getCurrentPage() > ($this->getLastPageNum() - $half)) {
227
+ $finish = $this->getLastPageNum();
228
+ $start = $finish - $this->_displayPages + 1;
229
+ }
230
+ $pages = range($start, $finish);
231
+ }
232
+ return $pages;
233
+ }
234
+
235
+ /**
236
+ * Retrieve url for previous page
237
+ *
238
+ * @return string
239
+ */
240
+ public function getPreviousPageUrl()
241
+ {
242
+ return $this->getPageUrl($this->getCurrentPage() - 1);
243
+ }
244
+
245
+ /**
246
+ * Retrieve url for next page
247
+ *
248
+ * @return string
249
+ */
250
+ public function getNextPageUrl()
251
+ {
252
+ return $this->getPageUrl($this->getCurrentPage() + 1);
253
+ }
254
+
255
+ /**
256
+ * Retrieve url for last page
257
+ *
258
+ * @return string
259
+ */
260
+ public function getLastPageUrl()
261
+ {
262
+ return $this->getPageUrl($this->getLastPageNum());
263
+ }
264
+
265
+ /**
266
+ * Initialize frame data, such as frame start, frame start etc.
267
+ *
268
+ * @return Mage_Catalog_Block_Product_Widget_Html_Pager
269
+ */
270
+ protected function _initFrame()
271
+ {
272
+ if (!$this->isFrameInitialized()) {
273
+ $start = 0;
274
+ $end = 0;
275
+
276
+ if ($this->getLastPageNum() <= $this->getFrameLength()) {
277
+ $start = 1;
278
+ $end = $this->getLastPageNum();
279
+ } else {
280
+ $half = ceil($this->getFrameLength() / 2);
281
+ if ($this->getCurrentPage() >= $half && $this->getCurrentPage() <= $this->getLastPageNum() - $half) {
282
+ $start = ($this->getCurrentPage() - $half) + 1;
283
+ $end = ($start + $this->getFrameLength()) - 1;
284
+ } elseif ($this->getCurrentPage() < $half) {
285
+ $start = 1;
286
+ $end = $this->getFrameLength();
287
+ } elseif ($this->getCurrentPage() > ($this->getLastPageNum() - $half)) {
288
+ $end = $this->getLastPageNum();
289
+ $start = $end - $this->getFrameLength() + 1;
290
+ }
291
+ }
292
+ $this->_frameStart = $start;
293
+ $this->_frameEnd = $end;
294
+ $this->_setFrameInitialized(true);
295
+ }
296
+
297
+ return $this;
298
+ }
299
+ }
app/code/core/Mage/Catalog/Block/Product/Widget/Link.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Product/Widget/New.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,25 +29,115 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Catalog
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Catalog_Block_Product_Widget_New
35
- extends Mage_Catalog_Block_Product_New
36
  implements Mage_Widget_Block_Interface
37
  {
38
  /**
39
- * Internal contructor
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  *
 
 
 
 
 
 
41
  */
42
  protected function _construct()
43
  {
44
  parent::_construct();
45
-
46
  $this->addPriceBlockType('bundle', 'bundle/catalog_product_price', 'bundle/catalog/product/price.phtml');
47
  }
48
 
49
  /**
50
- * Retrieve how much products should be displayed.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  *
52
  * @return int
53
  */
@@ -56,6 +146,59 @@ class Mage_Catalog_Block_Product_Widget_New
56
  if (!$this->hasData('products_count')) {
57
  return parent::getProductsCount();
58
  }
59
- return $this->_getData('products_count');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  }
61
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Catalog
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Catalog_Block_Product_Widget_New extends Mage_Catalog_Block_Product_New
 
35
  implements Mage_Widget_Block_Interface
36
  {
37
  /**
38
+ * Display products type
39
+ */
40
+ const DISPLAY_TYPE_ALL_PRODUCTS = 'all_products';
41
+ const DISPLAY_TYPE_NEW_PRODUCTS = 'new_products';
42
+
43
+ /**
44
+ * Default value whether show pager or not
45
+ */
46
+ const DEFAULT_SHOW_PAGER = false;
47
+
48
+ /**
49
+ * Default value for products per page
50
+ */
51
+ const DEFAULT_PRODUCTS_PER_PAGE = 5;
52
+
53
+ /**
54
+ * Name of request parameter for page number value
55
+ */
56
+ const PAGE_VAR_NAME = 'np';
57
+
58
+ /**
59
+ * Instance of pager block
60
  *
61
+ * @var Mage_Catalog_Block_Product_Widget_Html_Pager
62
+ */
63
+ protected $_pager;
64
+
65
+ /**
66
+ * Initialize block's cache and template settings
67
  */
68
  protected function _construct()
69
  {
70
  parent::_construct();
 
71
  $this->addPriceBlockType('bundle', 'bundle/catalog_product_price', 'bundle/catalog/product/price.phtml');
72
  }
73
 
74
  /**
75
+ * Product collection initialize process
76
+ *
77
+ * @return Mage_Catalog_Model_Resource_Product_Collection|Object|Varien_Data_Collection
78
+ */
79
+ protected function _getProductCollection()
80
+ {
81
+ switch ($this->getDisplayType()) {
82
+ case self::DISPLAY_TYPE_NEW_PRODUCTS:
83
+ $collection = parent::_getProductCollection();
84
+ break;
85
+ default:
86
+ $collection = $this->_getRecentlyAddedProductsCollection();
87
+ break;
88
+ }
89
+ return $collection;
90
+ }
91
+
92
+ /**
93
+ * Prepare collection for recent product list
94
+ *
95
+ * @return Mage_Catalog_Model_Resource_Product_Collection|Object|Varien_Data_Collection
96
+ */
97
+ protected function _getRecentlyAddedProductsCollection()
98
+ {
99
+ /** @var $collection Mage_Catalog_Model_Resource_Product_Collection */
100
+ $collection = Mage::getResourceModel('catalog/product_collection');
101
+ $collection->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds());
102
+
103
+ $collection = $this->_addProductAttributesAndPrices($collection)
104
+ ->addStoreFilter()
105
+ ->addAttributeToSort('created_at', 'desc')
106
+ ->setPageSize($this->getProductsCount())
107
+ ->setCurPage(1)
108
+ ;
109
+ return $collection;
110
+ }
111
+
112
+ /**
113
+ * Get key pieces for caching block content
114
+ *
115
+ * @return array
116
+ */
117
+ public function getCacheKeyInfo()
118
+ {
119
+ return array_merge(parent::getCacheKeyInfo(), array(
120
+ $this->getDisplayType(),
121
+ $this->getProductsPerPage(),
122
+ intval($this->getRequest()->getParam(self::PAGE_VAR_NAME))
123
+ ));
124
+ }
125
+
126
+ /**
127
+ * Retrieve display type for products
128
+ *
129
+ * @return string
130
+ */
131
+ public function getDisplayType()
132
+ {
133
+ if (!$this->hasData('display_type')) {
134
+ $this->setData('display_type', self::DISPLAY_TYPE_ALL_PRODUCTS);
135
+ }
136
+ return $this->getData('display_type');
137
+ }
138
+
139
+ /**
140
+ * Retrieve how much products should be displayed
141
  *
142
  * @return int
143
  */
146
  if (!$this->hasData('products_count')) {
147
  return parent::getProductsCount();
148
  }
149
+ return $this->getData('products_count');
150
+ }
151
+
152
+ /**
153
+ * Retrieve how much products should be displayed
154
+ *
155
+ * @return int
156
+ */
157
+ public function getProductsPerPage()
158
+ {
159
+ if (!$this->hasData('products_per_page')) {
160
+ $this->setData('products_per_page', self::DEFAULT_PRODUCTS_PER_PAGE);
161
+ }
162
+ return $this->getData('products_per_page');
163
+ }
164
+
165
+ /**
166
+ * Return flag whether pager need to be shown or not
167
+ *
168
+ * @return bool
169
+ */
170
+ public function showPager()
171
+ {
172
+ if (!$this->hasData('show_pager')) {
173
+ $this->setData('show_pager', self::DEFAULT_SHOW_PAGER);
174
+ }
175
+ return (bool)$this->getData('show_pager');
176
+ }
177
+
178
+ /**
179
+ * Render pagination HTML
180
+ *
181
+ * @return string
182
+ */
183
+ public function getPagerHtml()
184
+ {
185
+ if ($this->showPager()) {
186
+ if (!$this->_pager) {
187
+ $this->_pager = $this->getLayout()
188
+ ->createBlock('catalog/product_widget_html_pager', 'widget.new.product.list.pager');
189
+
190
+ $this->_pager->setUseContainer(true)
191
+ ->setShowAmounts(true)
192
+ ->setShowPerPage(false)
193
+ ->setPageVarName(self::PAGE_VAR_NAME)
194
+ ->setLimit($this->getProductsPerPage())
195
+ ->setTotalLimit($this->getProductsCount())
196
+ ->setCollection($this->getProductCollection());
197
+ }
198
+ if ($this->_pager instanceof Mage_Core_Block_Abstract) {
199
+ return $this->_pager->toHtml();
200
+ }
201
+ }
202
+ return '';
203
  }
204
  }
app/code/core/Mage/Catalog/Block/Seo/Sitemap/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Seo/Sitemap/Category.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Seo/Sitemap/Product.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Category.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Block/Widget/Link.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Exception.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Helper/Category.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Catalog/Helper/Category/Flat.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,44 +31,64 @@
31
  * @package Mage_Catalog
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Catalog_Helper_Category_Flat extends Mage_Core_Helper_Abstract
35
  {
 
 
 
36
  const XML_PATH_IS_ENABLED_FLAT_CATALOG_CATEGORY = 'catalog/frontend/flat_catalog_category';
37
 
38
  /**
39
- * Return true if flat catalog is enabled, rebuileded and is not Admin
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  *
41
- * @param boolean $skipAdmin
42
- * @return boolean
 
43
  */
44
  public function isEnabled($skipAdminCheck = false)
45
  {
46
- $flatFlag = Mage::getStoreConfigFlag(self::XML_PATH_IS_ENABLED_FLAT_CATALOG_CATEGORY);
47
- $isFront = !Mage::app()->getStore()->isAdmin();
48
- if ($skipAdminCheck === true) {
49
- $isFront = true;
50
- }
51
-
52
- return (boolean) $flatFlag && $isFront;
53
  }
54
 
55
  /**
56
- * Return true if catalog category flat data rebuilt
57
  *
58
- * @return boolean
 
59
  */
60
- public function isRebuilt()
61
  {
62
- return Mage::getResourceSingleton('catalog/category_flat')->isRebuilt();
63
  }
64
 
65
  /**
66
- * Back Flat compatibility: check is built and enabled flat
 
 
67
  *
68
  * @return bool
69
  */
70
- public function isBuilt()
71
  {
72
- return $this->isEnabled(true);
73
  }
74
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Catalog
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @package Mage_Catalog
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Catalog_Helper_Category_Flat extends Mage_Catalog_Helper_Flat_Abstract
35
  {
36
+ /**
37
+ * Catalog Category Flat Is Enabled Config
38
+ */
39
  const XML_PATH_IS_ENABLED_FLAT_CATALOG_CATEGORY = 'catalog/frontend/flat_catalog_category';
40
 
41
  /**
42
+ * Catalog Flat Category index process code
43
+ */
44
+ const CATALOG_CATEGORY_FLAT_PROCESS_CODE = 'catalog_category_flat';
45
+
46
+ /**
47
+ * Catalog Category Flat index process code
48
+ *
49
+ * @var string
50
+ */
51
+ protected $_indexerCode = self::CATALOG_CATEGORY_FLAT_PROCESS_CODE;
52
+
53
+ /**
54
+ * Store catalog Category Flat index process instance
55
+ *
56
+ * @var Mage_Index_Model_Process|null
57
+ */
58
+ protected $_process = null;
59
+
60
+ /**
61
+ * Check if Catalog Category Flat Data is enabled
62
  *
63
+ * @param bool $skipAdminCheck this parameter is deprecated and no longer in use
64
+ *
65
+ * @return bool
66
  */
67
  public function isEnabled($skipAdminCheck = false)
68
  {
69
+ return Mage::getStoreConfigFlag(self::XML_PATH_IS_ENABLED_FLAT_CATALOG_CATEGORY);
 
 
 
 
 
 
70
  }
71
 
72
  /**
73
+ * Check if Catalog Category Flat Data has been initialized
74
  *
75
+ * @param null|bool|int|Mage_Core_Model_Store $store Store(id) for which the value is checked
76
+ * @return bool
77
  */
78
+ public function isBuilt($store = null)
79
  {
80
+ return Mage::getResourceSingleton('catalog/category_flat')->isBuilt($store);
81
  }
82
 
83
  /**
84
+ * Check if Catalog Category Flat Data has been initialized
85
+ *
86
+ * @deprecated after 1.7.0.0 use Mage_Catalog_Helper_Category_Flat::isBuilt() instead
87
  *
88
  * @return bool
89
  */
90
+ public function isRebuilt()
91
  {
92
+ return $this->isBuilt();