Browse files

Update as of 5/31/2012

* Implemented backend authentication independent of `Mage_Adminhtml` module. Authentication can be disabled
  * Authentication logic is moved to `Mage_Backend` module and being performed in controller instead of observer
  * `Mage_Adminhtml_Controller_Action` is changed to `Mage_Backend_Controller_ActionAbstract`, `Mage_Admin_Model_Session` is changed to `Mage_Backend_Model_Auth_Session`, `Mage_User_Model_Role` and `Mage_User_Model_Roles` classes are unified into one `Mage_User_Model_Role` class
  * Introduced `Mage_User` module for users and roles management
* Introduced support of minimized CSS and JS files: in production mode minimized file is used, if exists
* Implemented resize, rotate, crop and watermark functionality for ImageMagick adapter
* Fixed some issues:
  * Fixed absence of product without image, if ImageMagick is used
  * Fixed broken Downloadable product creation page, when developer mode is enabled
  * Fixed random failures of `Integrity_LayoutTest::testHandlesHierarchy` test
  * Fixed backup creation: media directory was excluded from the backup file when it should be included and vice-versa
  * Fixed broken product configuration page in Shopping Cart
  * Fixed incorrect work of "After number of attempts to login" functionality for CAPTCHA: captcha was not displayed after specified number of incorrect attempts
  * Fixed creation of User Role: resource access was set to 'Custom', when 'All' is selected
  * Fixed exception "Unable to locate skin file" at the end of installation
  * Fixed broken "Use Store Credit" functionality on checkout
  * Fixed lost MySQL connection, if it's not used for long time
  * Fixed ability to separate CDN server setup for static and media content
  * Other small fixes
  • Loading branch information...
1 parent b8f3ea4 commit 99b4374bc1960168d82818ede3c4d712ba45653c @magento-team magento-team committed Jun 5, 2012
Showing with 8,669 additions and 8,937 deletions.
  1. +24 −2 CHANGELOG.markdown
  2. +2 −24 app/code/core/Mage/Admin/Helper/Data.php
  3. +181 −6 app/code/core/Mage/Admin/Model/Config.php
  4. +0 −55 app/code/core/Mage/Admin/Model/Role.php
  5. +0 −184 app/code/core/Mage/Admin/Model/Roles.php
  6. +0 −18 app/code/core/Mage/Admin/etc/config.xml
  7. +1 −1 app/code/core/Mage/AdminNotification/Model/Observer.php
  8. +4 −15 app/code/core/Mage/Adminhtml/Block/Abstract.php
  9. +1 −1 app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php
  10. +1 −1 app/code/core/Mage/Adminhtml/Block/Cache/Notifications.php
  11. +2 −2 app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php
  12. +1 −1 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php
  13. +2 −2 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php
  14. +1 −1 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php
  15. +1 −1 app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php
  16. +1 −1 app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php
  17. +1 −1 app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php
  18. +1 −1 app/code/core/Mage/Adminhtml/Block/Cms/Page.php
  19. +1 −1 app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php
  20. +1 −1 app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php
  21. +1 −1 app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php
  22. +2 −2 app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php
  23. +1 −1 app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php
  24. +1 −1 app/code/core/Mage/Adminhtml/Block/Customer/Edit.php
  25. +1 −1 app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php
  26. +1 −1 app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php
  27. +1 −1 app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php
  28. +1 −1 app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php
  29. +4 −4 app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php
  30. +1 −1 app/code/core/Mage/Adminhtml/Block/Customer/Grid.php
  31. +1 −1 app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php
  32. +3 −3 app/code/core/Mage/Adminhtml/Block/Denied.php
  33. +2 −2 app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php
  34. +3 −3 app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php
  35. +1 −1 app/code/core/Mage/Adminhtml/Block/Notification/Survey.php
  36. +2 −2 app/code/core/Mage/Adminhtml/Block/Notification/Window.php
  37. +3 −3 app/code/core/Mage/Adminhtml/Block/Page/Header.php
  38. +2 −345 app/code/core/Mage/Adminhtml/Block/Page/Menu.php
  39. +0 −88 app/code/core/Mage/Adminhtml/Block/Permissions/Grid/User.php
  40. +0 −164 app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Useredit.php
  41. +0 −153 app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Main.php
  42. +1 −1 app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Form.php
  43. +1 −1 app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php
  44. +1 −1 app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Grid.php
  45. +1 −1 app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php
  46. +1 −1 app/code/core/Mage/Adminhtml/Block/Promo/Quote/Grid.php
  47. +2 −2 app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Form.php
  48. +1 −1 app/code/core/Mage/Adminhtml/Block/Review/Add/Form.php
  49. +1 −1 app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php
  50. +1 −1 app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php
  51. +1 −1 app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php
  52. +1 −1 app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php
  53. +1 −1 app/code/core/Mage/Adminhtml/Block/Sales/Order.php
  54. +1 −1 app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php
  55. +5 −5 app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php
  56. +1 −1 app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Items.php
  57. +2 −2 app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php
  58. +1 −1 app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php
  59. +1 −1 app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php
  60. +1 −1 app/code/core/Mage/Adminhtml/Block/Sales/Order/View/History.php
  61. +1 −1 app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Transactions.php
  62. +1 −1 app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php
  63. +1 −1 app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail.php
  64. +1 −1 app/code/core/Mage/Adminhtml/Block/Sitemap/Edit/Form.php
  65. +2 −2 app/code/core/Mage/Adminhtml/Block/System/Account/Edit/Form.php
  66. +1 −1 app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset.php
  67. +2 −2 app/code/core/Mage/Adminhtml/Block/System/Config/Switcher.php
  68. +3 −3 app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php
  69. +2 −2 app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Wizard.php
  70. +1 −1 app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tab/General.php
  71. +2 −47 app/code/core/Mage/Adminhtml/Block/Template.php
  72. +1 −1 app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit/Form.php
  73. +4 −62 app/code/core/Mage/Adminhtml/Block/Widget.php
  74. +5 −30 app/code/core/Mage/Adminhtml/Block/Widget/Accordion.php
  75. +4 −63 app/code/core/Mage/Adminhtml/Block/Widget/Accordion/Item.php
  76. +4 −36 app/code/core/Mage/Adminhtml/Block/Widget/Breadcrumbs.php
  77. +4 −40 app/code/core/Mage/Adminhtml/Block/Widget/Button.php
  78. +6 −280 app/code/core/Mage/Adminhtml/Block/Widget/Container.php
  79. +6 −207 app/code/core/Mage/Adminhtml/Block/Widget/Form.php
  80. +5 −153 app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php
  81. +4 −40 app/code/core/Mage/Adminhtml/Block/Widget/Form/Element.php
  82. +6 −98 app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Dependence.php
  83. +4 −65 app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Gallery.php
  84. +4 −21 app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Element.php
  85. +4 −21 app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset.php
  86. +5 −22 app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset/Element.php
  87. +4 −1,621 app/code/core/Mage/Adminhtml/Block/Widget/Grid.php
  88. +4 −363 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php
  89. +5 −89 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Abstract.php
  90. +5 −40 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Checkbox.php
  91. +8 −13 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Country.php
  92. +4 −178 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php
  93. +5 −146 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Datetime.php
  94. +6 −8 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Interface.php
  95. +6 −14 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Massaction.php
  96. +4 −118 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Price.php
  97. +5 −35 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Radio.php
  98. +4 −30 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Range.php
  99. +4 −65 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Select.php
  100. +3 −85 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Store.php
  101. +5 −10 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Text.php
  102. +3 −87 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Theme.php
  103. +5 −119 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php
  104. +4 −130 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Action.php
  105. +4 −97 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Checkbox.php
  106. +4 −25 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Concat.php
  107. +6 −23 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php
  108. +4 −79 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Currency.php
  109. +3 −67 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php
  110. +4 −57 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Datetime.php
  111. +4 −20 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Input.php
  112. +4 −27 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Interface.php
  113. +4 −15 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Ip.php
  114. +5 −33 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Longtext.php
  115. +4 −58 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Massaction.php
  116. +4 −36 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Number.php
  117. +5 −35 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Options.php
  118. +4 −76 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Price.php
  119. +4 −49 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Radio.php
  120. +4 −26 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Select.php
  121. +4 −136 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Store.php
  122. +3 −40 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php
  123. +4 −29 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Wrapline.php
  124. +3 −82 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php
  125. +4 −6 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction.php
  126. +4 −260 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php
  127. +4 −84 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item.php
  128. +5 −18 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Default.php
  129. +6 −7 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Interface.php
  130. +3 −99 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Serializer.php
  131. +6 −34 app/code/core/Mage/Adminhtml/Block/Widget/Tab/Interface.php
  132. +4 −367 app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php
  133. +4 −46 app/code/core/Mage/Adminhtml/Block/Widget/View/Container.php
  134. +7 −265 app/code/core/Mage/Adminhtml/Controller/Action.php
  135. +3 −3 app/code/core/Mage/Adminhtml/Controller/Report/Abstract.php
  136. +1 −1 app/code/core/Mage/Adminhtml/Controller/Sales/Creditmemo.php
  137. +1 −1 app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php
  138. +1 −1 app/code/core/Mage/Adminhtml/Controller/Sales/Shipment.php
  139. +2 −89 app/code/core/Mage/Adminhtml/Helper/Data.php
  140. +3 −165 app/code/core/Mage/Adminhtml/Model/Observer.php
  141. +3 −5 app/code/core/Mage/Adminhtml/Model/Session.php
  142. +2 −2 app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Observer.php
  143. +1 −1 app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Adapter.php
  144. +4 −141 app/code/core/Mage/Adminhtml/Model/Url.php
  145. +1 −1 app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php
  146. +1 −1 app/code/core/Mage/Adminhtml/controllers/Api/UserController.php
  147. +1 −1 app/code/core/Mage/Adminhtml/controllers/CacheController.php
  148. +11 −11 app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php
  149. +1 −1 app/code/core/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeController.php
  150. +2 −2 app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php
  151. +1 −1 app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php
  152. +1 −1 app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GroupController.php
  153. +2 −2 app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php
  154. +1 −1 app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php
  155. +1 −1 app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php
  156. +1 −1 app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php
  157. +1 −1 app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php
  158. +1 −1 app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php
  159. +3 −3 app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php
  160. +1 −1 app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php
  161. +1 −1 app/code/core/Mage/Adminhtml/controllers/Customer/Cart/Product/Composite/CartController.php
  162. +1 −1 app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php
  163. +1 −1 app/code/core/Mage/Adminhtml/controllers/Customer/OnlineController.php
  164. +1 −1 app/code/core/Mage/Adminhtml/controllers/Customer/Wishlist/Product/Composite/WishlistController.php
  165. +2 −2 app/code/core/Mage/Adminhtml/controllers/CustomerController.php
  166. +1 −1 app/code/core/Mage/Adminhtml/controllers/DashboardController.php
  167. +3 −255 app/code/core/Mage/Adminhtml/controllers/IndexController.php
  168. +1 −1 app/code/core/Mage/Adminhtml/controllers/Media/EditorController.php
  169. +1 −1 app/code/core/Mage/Adminhtml/controllers/Media/UploaderController.php
  170. +1 −1 app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php
  171. +1 −1 app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php
  172. +1 −1 app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php
  173. +1 −1 app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php
  174. +1 −1 app/code/core/Mage/Adminhtml/controllers/NotificationController.php
  175. +0 −221 app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php
  176. +1 −1 app/code/core/Mage/Adminhtml/controllers/Poll/AnswerController.php
  177. +1 −1 app/code/core/Mage/Adminhtml/controllers/PollController.php
  178. +1 −1 app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php
  179. +1 −1 app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php
  180. +1 −1 app/code/core/Mage/Adminhtml/controllers/Promo/WidgetController.php
  181. +1 −1 app/code/core/Mage/Adminhtml/controllers/PromoController.php
  182. +1 −1 app/code/core/Mage/Adminhtml/controllers/RatingController.php
  183. +4 −4 app/code/core/Mage/Adminhtml/controllers/Report/CustomerController.php
  184. +4 −4 app/code/core/Mage/Adminhtml/controllers/Report/ProductController.php
  185. +3 −3 app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php
  186. +4 −4 app/code/core/Mage/Adminhtml/controllers/Report/ShopcartController.php
  187. +3 −3 app/code/core/Mage/Adminhtml/controllers/Report/StatisticsController.php
  188. +5 −5 app/code/core/Mage/Adminhtml/controllers/Report/TagController.php
  189. +3 −3 app/code/core/Mage/Adminhtml/controllers/ReportController.php
  190. +3 −3 app/code/core/Mage/Adminhtml/controllers/Sales/Billing/AgreementController.php
  191. +2 −2 app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php
  192. +1 −1 app/code/core/Mage/Adminhtml/controllers/Sales/Order/EditController.php
  193. +1 −1 app/code/core/Mage/Adminhtml/controllers/Sales/Order/StatusController.php
  194. +1 −1 app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php
  195. +2 −2 app/code/core/Mage/Adminhtml/controllers/Sales/TransactionsController.php
  196. +1 −1 app/code/core/Mage/Adminhtml/controllers/SitemapController.php
  197. +1 −1 app/code/core/Mage/Adminhtml/controllers/SurveyController.php
  198. +3 −3 app/code/core/Mage/Adminhtml/controllers/System/AccountController.php
  199. +1 −1 app/code/core/Mage/Adminhtml/controllers/System/BackupController.php
  200. +1 −1 app/code/core/Mage/Adminhtml/controllers/System/Config/System/StorageController.php
  201. +3 −3 app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php
  202. +1 −1 app/code/core/Mage/Adminhtml/controllers/System/Convert/GuiController.php
  203. +1 −1 app/code/core/Mage/Adminhtml/controllers/System/Convert/ProfileController.php
  204. +1 −1 app/code/core/Mage/Adminhtml/controllers/System/CurrencyController.php
  205. +1 −1 app/code/core/Mage/Adminhtml/controllers/System/DesignController.php
  206. +1 −1 app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php
  207. +1 −1 app/code/core/Mage/Adminhtml/controllers/System/StoreController.php
  208. +1 −1 app/code/core/Mage/Adminhtml/controllers/System/VariableController.php
  209. +1 −1 app/code/core/Mage/Adminhtml/controllers/SystemController.php
  210. +3 −3 app/code/core/Mage/Adminhtml/controllers/TagController.php
  211. +1 −1 app/code/core/Mage/Adminhtml/controllers/Tax/Class/CustomerController.php
  212. +1 −1 app/code/core/Mage/Adminhtml/controllers/Tax/Class/ProductController.php
  213. +2 −2 app/code/core/Mage/Adminhtml/controllers/Tax/ClassController.php
  214. +4 −4 app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php
  215. +1 −1 app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php
  216. +1 −1 app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php
  217. +0 −28 app/code/core/Mage/Adminhtml/etc/adminhtml.xml
  218. +0 −17 app/code/core/Mage/Adminhtml/etc/config.xml
  219. +0 −32 app/code/core/Mage/Adminhtml/view/adminhtml/admin.xml
  220. +1 −1 app/code/core/Mage/Adminhtml/view/adminhtml/admin/access_denied.phtml
  221. +31 −46 app/code/core/Mage/Adminhtml/view/adminhtml/main.xml
  222. +1 −1 app/code/core/Mage/Adminhtml/view/adminhtml/page/header.phtml
  223. +0 −52 app/code/core/Mage/Adminhtml/view/adminhtml/permissions/userinfo.phtml
  224. +1 −1 app/code/core/Mage/Adminhtml/view/adminhtml/sales.xml
  225. +1 −1 app/code/core/Mage/Adminhtml/view/adminhtml/system/config/switcher.phtml
  226. +2 −2 app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Grid.php
  227. +1 −1 app/code/core/Mage/Api2/Block/Adminhtml/Permissions/User/Edit/Tab/Roles.php
  228. +2 −2 app/code/core/Mage/Api2/Block/Adminhtml/Roles.php
  229. +2 −2 app/code/core/Mage/Api2/Block/Adminhtml/Roles/Grid.php
  230. +3 −3 app/code/core/Mage/Api2/Block/Adminhtml/Roles/Tab/Users.php
  231. +1 −1 app/code/core/Mage/Api2/Model/Observer.php
  232. +4 −4 app/code/core/Mage/Api2/controllers/Adminhtml/Api2/RoleController.php
  233. +8 −8 app/code/core/Mage/Api2/view/adminhtml/layout.xml
  234. +2 −2 app/code/core/Mage/Authorizenet/view/frontend/layout.xml
  235. +8 −16 app/code/core/Mage/{Adminhtml/Block/Permissions/Roles.php → Backend/Block/Abstract.php}
  236. +373 −0 app/code/core/Mage/Backend/Block/Menu.php
  237. +83 −0 app/code/core/Mage/Backend/Block/Template.php
  238. +94 −0 app/code/core/Mage/Backend/Block/Widget.php
  239. +61 −0 app/code/core/Mage/Backend/Block/Widget/Accordion.php
  240. +95 −0 app/code/core/Mage/Backend/Block/Widget/Accordion/Item.php
  241. +68 −0 app/code/core/Mage/Backend/Block/Widget/Breadcrumbs.php
  242. +72 −0 app/code/core/Mage/Backend/Block/Widget/Button.php
  243. +310 −0 app/code/core/Mage/Backend/Block/Widget/Container.php
  244. +237 −0 app/code/core/Mage/Backend/Block/Widget/Form.php
  245. +184 −0 app/code/core/Mage/Backend/Block/Widget/Form/Container.php
  246. +72 −0 app/code/core/Mage/Backend/Block/Widget/Form/Element.php
  247. +128 −0 app/code/core/Mage/Backend/Block/Widget/Form/Element/Dependence.php
  248. +98 −0 app/code/core/Mage/Backend/Block/Widget/Form/Element/Gallery.php
  249. +54 −0 app/code/core/Mage/Backend/Block/Widget/Form/Renderer/Element.php
  250. +54 −0 app/code/core/Mage/Backend/Block/Widget/Form/Renderer/Fieldset.php
  251. +54 −0 app/code/core/Mage/Backend/Block/Widget/Form/Renderer/Fieldset/Element.php
  252. +1,647 −0 app/code/core/Mage/Backend/Block/Widget/Grid.php
  253. +395 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column.php
  254. +121 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Abstract.php
  255. +72 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Checkbox.php
  256. +42 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Country.php
  257. +209 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Date.php
  258. +177 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Datetime.php
  259. +39 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Interface.php
  260. +11 −20 .../{Adminhtml/Block/Permissions/Users.php → Backend/Block/Widget/Grid/Column/Filter/Massaction.php}
  261. +150 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Price.php
  262. +66 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Radio.php
  263. +62 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Range.php
  264. +97 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Select.php
  265. +118 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Store.php
  266. +41 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Text.php
  267. +120 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Theme.php
  268. +151 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Abstract.php
  269. +163 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Action.php
  270. +130 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php
  271. +58 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Concat.php
  272. +54 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Country.php
  273. +112 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Currency.php
  274. +100 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Date.php
  275. +90 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Datetime.php
  276. +53 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Input.php
  277. +60 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Interface.php
  278. +47 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Ip.php
  279. +65 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Longtext.php
  280. +91 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Massaction.php
  281. +69 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Number.php
  282. +67 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Options.php
  283. +109 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Price.php
  284. +82 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Radio.php
  285. +59 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Select.php
  286. +169 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Store.php
  287. +73 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Text.php
  288. +62 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Wrapline.php
  289. +115 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Container.php
  290. +38 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Massaction.php
  291. +292 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Massaction/Abstract.php
  292. +116 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Massaction/Item.php
  293. +15 −23 ...Admin/Model/Resource/Role.php → Backend/Block/Widget/Grid/Massaction/Item/Additional/Default.php}
  294. +38 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Massaction/Item/Additional/Interface.php
Sorry, we could not display the entire diff because too many files (654) changed.
View
26 CHANGELOG.markdown
@@ -1,10 +1,32 @@
+Update as of 5/31/2012
+======================
+* Implemented backend authentication independent of `Mage_Adminhtml` module. Authentication can be disabled
+ * Authentication logic is moved to `Mage_Backend` module and being performed in controller instead of observer
+ * `Mage_Adminhtml_Controller_Action` is changed to `Mage_Backend_Controller_ActionAbstract`, `Mage_Admin_Model_Session` is changed to `Mage_Backend_Model_Auth_Session`, `Mage_User_Model_Role` and `Mage_User_Model_Roles` classes are unified into one `Mage_User_Model_Role` class
+ * Introduced `Mage_User` module for users and roles management
+* Introduced support of minimized CSS and JS files: in production mode minimized file is used, if exists
+* Implemented resize, rotate, crop and watermark functionality for ImageMagick adapter
+* Fixed some issues:
+ * Fixed absence of product without image, if ImageMagick is used
+ * Fixed broken Downloadable product creation page, when developer mode is enabled
+ * Fixed random failures of `Integrity_LayoutTest::testHandlesHierarchy` test
+ * Fixed backup creation: media directory was excluded from the backup file when it should be included and vice-versa
+ * Fixed broken product configuration page in Shopping Cart
+ * Fixed incorrect work of "After number of attempts to login" functionality for CAPTCHA: captcha was not displayed after specified number of incorrect attempts
+ * Fixed creation of User Role: resource access was set to 'Custom', when 'All' is selected
+ * Fixed exception "Unable to locate skin file" at the end of installation
+ * Fixed broken "Use Store Credit" functionality on checkout
+ * Fixed lost MySQL connection, if it's not used for long time
+ * Fixed ability to separate CDN server setup for static and media content
+ * Other small fixes
+
Update as of 5/23/2012
======================
* Published performance tests (`dev/tests/performance`)
* Implemented support of ImageMagick library for processing images
* Distinguished "Page Fragments" and "Pages" in layout handles declaration
* Reduced performance drop caused by introducing containers
-* Implemented Magento_Data_Structure library which is used to handle structure of layout elements
+* Implemented `Magento_Data_Structure` library which is used to handle structure of layout elements
* Fixed some issues:
* Fixed error on saving newsletter template
* Fixed some checkout issues:
@@ -65,7 +87,7 @@ Update as of 4/13/2012
======================
* Implemented a tool for migrating factory table names from 1.x to 2.x. The tool replaces table names by list of names associations
-* Changed Unit tests suite running from usage AllTests.php in each directory to configuration in phpunit.xml.dist. Now all tests in {{testsuite}} directory are launched, there is no necessity to add new tests to the config
+* Changed Unit tests suite running from usage AllTests.php in each directory to configuration in phpunit.xml.dist. Now all tests in `testsuite` directory are launched, there is no necessity to add new tests to the config
* Implemented in Visual Desig Editor:
* Containers highlighting
* Dropping of elements
View
26 app/code/core/Mage/Admin/Helper/Data.php
@@ -30,32 +30,10 @@
* @category Mage
* @package Mage_Admin
* @author Magento Core Team <core@magentocommerce.com>
+ * @deprecated Moved to Mage_Backend
+ * @see Mage_User_Helper_Data
*/
class Mage_Admin_Helper_Data extends Mage_Core_Helper_Abstract
{
- /**
- * Configuration path to expiration period of reset password link
- */
- const XML_PATH_ADMIN_RESET_PASSWORD_LINK_EXPIRATION_PERIOD
- = 'default/admin/emails/password_reset_link_expiration_period';
- /**
- * Generate unique token for reset password confirmation link
- *
- * @return string
- */
- public function generateResetPasswordLinkToken()
- {
- return Mage::helper('Mage_Core_Helper_Data')->uniqHash();
- }
-
- /**
- * Retrieve customer reset password link expiration period in days
- *
- * @return int
- */
- public function getResetPasswordLinkExpirationPeriod()
- {
- return (int) Mage::getConfig()->getNode(self::XML_PATH_ADMIN_RESET_PASSWORD_LINK_EXPIRATION_PERIOD);
- }
}
View
187 app/code/core/Mage/Admin/Model/Config.php
@@ -42,31 +42,74 @@ class Mage_Admin_Model_Config extends Varien_Simplexml_Config
protected $_adminhtmlConfig;
/**
+ * Main Application object
+ *
+ * @var Mage_Core_Model_App
+ */
+ protected $_app;
+
+ /**
+ * Main Application config
+ *
+ * @var Mage_Core_Model_Config
+ */
+ protected $_appConfig;
+
+ /**
+ * List of helpers by module
+ *
+ * @var array
+ */
+ protected $_helpers = array();
+
+ /**
* Load config from merged adminhtml.xml files
+ * @param array $arguments
*/
- public function __construct()
+ public function __construct(array $arguments = array())
{
+ $this->_app = isset($arguments['app']) ? $arguments['app'] : Mage::app();
+ $this->_appConfig = isset($arguments['appConfig']) ? $arguments['appConfig'] : Mage::getConfig();
+ if (isset($arguments['helpers'])) {
+ $this->_helpers = $arguments['helpers'];
+ }
+
+
parent::__construct();
$this->setCacheId('adminhtml_acl_menu_config');
/* @var $adminhtmlConfig Varien_Simplexml_Config */
- $adminhtmlConfig = Mage::app()->loadCache($this->getCacheId());
+ $adminhtmlConfig = $this->_app->loadCache($this->getCacheId());
if ($adminhtmlConfig) {
$this->_adminhtmlConfig = new Varien_Simplexml_Config($adminhtmlConfig);
} else {
$adminhtmlConfig = new Varien_Simplexml_Config;
$adminhtmlConfig->loadString('<?xml version="1.0"?><config></config>');
- Mage::getConfig()->loadModulesConfiguration('adminhtml.xml', $adminhtmlConfig);
+ $this->_appConfig->loadModulesConfiguration('adminhtml.xml', $adminhtmlConfig);
$this->_adminhtmlConfig = $adminhtmlConfig;
- if (Mage::app()->useCache('config')) {
- Mage::app()->saveCache($adminhtmlConfig->getXmlString(), $this->getCacheId(),
+ if ($this->_app->useCache('config')) {
+ $this->_app->saveCache($adminhtmlConfig->getXmlString(), $this->getCacheId(),
array(Mage_Core_Model_Config::CACHE_TAG));
}
}
}
/**
+ * Retrieve base helper by module
+ *
+ * @param string $module
+ * @return Mage_Core_Helper_Abstract
+ */
+ protected function _getHelper($module)
+ {
+ if (isset($this->_helpers[$module])) {
+ return $this->_helpers[$module];
+ }
+ return Mage::helper($module);
+ }
+
+ /**
* Load Acl resources from config
*
* @param Mage_Admin_Model_Acl $acl
@@ -110,6 +153,138 @@ public function loadAclResources(Mage_Admin_Model_Acl $acl, $resource = null, $p
}
/**
+ * Retrieve Acl Resource Tree with module and path information
+ *
+ * @return Varien_Simplexml_Element
+ */
+ public function getAclResourceTree()
+ {
+ return $this->_walkResourceTree();
+ }
+
+ /**
+ * Retrieve flat Acl Resource list with level information
+ * @param bool $shortFormat
+ * @return array
+ */
+ public function getAclResourceList($shortFormat = false)
+ {
+ return $this->_flattenResourceTree(null, null, 0, 'Mage_Backend', $shortFormat);
+ }
+
+ /**
+ * Decorate acl resource tree
+ *
+ * @param Varien_Simplexml_Element $resource
+ * @param null $parentName
+ * @param string $module
+ * @return Varien_Simplexml_Element
+ */
+ protected function _walkResourceTree(Varien_Simplexml_Element $resource = null,
+ $parentName = null, $module = 'Mage_Backend')
+ {
+ $resourceName = $parentName;
+ if (is_null($resource)) {
+ $resource = $this->getAdminhtmlConfig()->getNode('acl/resources');
+ $resourceName = null;
+ $level = -1;
+ } else {
+ if (!$this->_isServiceElement($resource)) {
+ $resourceName = $this->_buildFullResourceName($resource, $parentName);
+ //assigning module for its' children nodes
+ if ($resource->getAttribute('module')) {
+ $module = (string)$resource->getAttribute('module');
+
+ }
+ $resource->addAttribute('aclpath', $resourceName);
+ $resource->addAttribute('module_c', $module);
+ }
+ }
+
+ //check children and run recursion if they exists
+ $children = $resource->children();
+ foreach ($children as $key => $child) {
+ if (1 == $child->disabled) {
+ $resource->{$key} = null;
+ continue;
+ }
+ $this->_walkResourceTree($child, $resourceName, $module);
+ }
+ return $resource;
+ }
+
+ /**
+ * Flatten acl resources tree
+ *
+ * @param null|Varien_Simplexml_Element $resource
+ * @param null $parentName
+ * @param int $level
+ * @param string $module
+ * @param bool $shortFormat
+ * @return array
+ */
+ protected function _flattenResourceTree(Varien_Simplexml_Element $resource = null,
+ $parentName = null, $level = 0, $module = 'Mage_Backend', $shortFormat = false)
+ {
+ $result = array();
+ $resourceName = $parentName;
+ if (is_null($resource)) {
+ $resource = $this->getAdminhtmlConfig()->getNode('acl/resources');
+ $resourceName = null;
+ $level = -1;
+ } else {
+ if (!$this->_isServiceElement($resource)) {
+ $resourceName = $this->_buildFullResourceName($resource, $parentName);
+
+ if ($shortFormat) {
+ $result[] = $resourceName;
+ } else {
+ if ($resource->getAttribute('module')) {
+ $module = (string)$resource->getAttribute('module');
+ }
+ $result[$resourceName]['name'] = $this->_getHelper($module)->__((string)$resource->title);
+ $result[$resourceName]['level'] = $level;
+ }
+ }
+ }
+ //check children and run recursion if they exists
+ $children = $resource->children();
+ foreach ($children as $key => $child) {
+ if (1 == $child->disabled) {
+ continue;
+ }
+ $result = array_merge(
+ $this->_flattenResourceTree($child, $resourceName, $level + 1, $module, $shortFormat),
+ $result
+ );
+ }
+ return $result;
+ }
+
+ /**
+ * Check whether provided element is a service element of Admin Xml configuration
+ *
+ * @param Varien_Simplexml_Element $resource
+ * @return bool
+ */
+ protected function _isServiceElement(Varien_Simplexml_Element $resource)
+ {
+ return in_array($resource->getName(), array('title', 'sort_order', 'children', 'disabled'));
+ }
+
+ /**
+ * Build acl resource name with path to parent
+ *
+ * @param Varien_Simplexml_Element $resource
+ * @param string $path
+ * @return string
+ */
+ protected function _buildFullResourceName(Varien_Simplexml_Element $resource, $path = null)
+ {
+ return (is_null($path) ? '' : $path . '/') . $resource->getName();
+ }
+
+ /**
* Get acl assert config
*
* @param string $name
@@ -172,6 +347,6 @@ public function getMenuItemLabel($path)
if ($menuNode->getAttribute('module')) {
$moduleName = (string)$menuNode->getAttribute('module');
}
- return Mage::helper($moduleName)->__((string)$menuNode->title);
+ return $this->_getHelper($moduleName)->__((string)$menuNode->title);
}
}
View
0 app/code/core/Mage/Admin/Model/Resource/Permissions/Collection.php
Sorry, we could not display the changes to this file because there were too many other changes to display.
View
0 app/code/core/Mage/Admin/Model/Resource/Role/Collection.php
Sorry, we could not display the changes to this file because there were too many other changes to display.
View
0 app/code/core/Mage/Admin/Model/Resource/Roles.php
Sorry, we could not display the changes to this file because there were too many other changes to display.
View
0 app/code/core/Mage/Admin/Model/Resource/Roles/Collection.php
Sorry, we could not display the changes to this file because there were too many other changes to display.
View
0 app/code/core/Mage/Admin/Model/Resource/Roles/User/Collection.php
Sorry, we could not display the changes to this file because there were too many other changes to display.
View
0 app/code/core/Mage/Admin/Model/Resource/Rules.php
Sorry, we could not display the changes to this file because there were too many other files to display.
View
55 app/code/core/Mage/Admin/Model/Role.php
@@ -1,55 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category Mage
- * @package Mage_Admin
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * Admin Role Model
- *
- * @method Mage_Admin_Model_Resource_Role _getResource()
- * @method Mage_Admin_Model_Resource_Role getResource()
- * @method int getParentId()
- * @method Mage_Admin_Model_Role setParentId(int $value)
- * @method int getTreeLevel()
- * @method Mage_Admin_Model_Role setTreeLevel(int $value)
- * @method int getSortOrder()
- * @method Mage_Admin_Model_Role setSortOrder(int $value)
- * @method string getRoleType()
- * @method Mage_Admin_Model_Role setRoleType(string $value)
- * @method int getUserId()
- * @method Mage_Admin_Model_Role setUserId(int $value)
- * @method string getRoleName()
- * @method Mage_Admin_Model_Role setRoleName(string $value)
- *
- * @category Mage
- * @package Mage_Admin
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Admin_Model_Role extends Mage_Core_Model_Abstract
-{
- protected function _construct()
- {
- $this->_init('Mage_Admin_Model_Resource_Role');
- }
-}
View
184 app/code/core/Mage/Admin/Model/Roles.php
@@ -1,184 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category Mage
- * @package Mage_Admin
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * Admin Roles Model
- *
- * @method Mage_Admin_Model_Resource_Roles _getResource()
- * @method Mage_Admin_Model_Resource_Roles getResource()
- * @method int getParentId()
- * @method Mage_Admin_Model_Roles setParentId(int $value)
- * @method int getTreeLevel()
- * @method Mage_Admin_Model_Roles setTreeLevel(int $value)
- * @method int getSortOrder()
- * @method Mage_Admin_Model_Roles setSortOrder(int $value)
- * @method string getRoleType()
- * @method Mage_Admin_Model_Roles setRoleType(string $value)
- * @method int getUserId()
- * @method Mage_Admin_Model_Roles setUserId(int $value)
- * @method string getRoleName()
- * @method Mage_Admin_Model_Roles setRoleName(string $value)
- *
- * @category Mage
- * @package Mage_Admin
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Admin_Model_Roles extends Mage_Core_Model_Abstract
-{
- /**
- * @var string
- */
- protected $_eventPrefix = 'admin_roles';
-
- /**
- * Constructor
- */
- protected function _construct()
- {
- $this->_init('Mage_Admin_Model_Resource_Roles');
- }
-
- /**
- * Update object into database
- *
- * @return Mage_Admin_Model_Roles
- */
- public function update()
- {
- $this->getResource()->update($this);
- return $this;
- }
-
- /**
- * Retrieve users collection
- *
- * @return Mage_Admin_Model_Resource_Roles_User_Collection
- */
- public function getUsersCollection()
- {
- return Mage::getResourceModel('Mage_Admin_Model_Resource_Roles_User_Collection');
- }
-
- /**
- * Return tree of acl resources
- *
- * @return array|null|Varien_Simplexml_Element
- */
- public function getResourcesTree()
- {
- return $this->_buildResourcesArray(null, null, null, null, true);
- }
-
- /**
- * Return list of acl resources
- *
- * @return array|null|Varien_Simplexml_Element
- */
- public function getResourcesList()
- {
- return $this->_buildResourcesArray();
- }
-
- /**
- * Return list of acl resources in 2D format
- *
- * @return array|null|Varien_Simplexml_Element
- */
- public function getResourcesList2D()
- {
- return $this->_buildResourcesArray(null, null, null, true);
- }
-
- /**
- * Return users for role
- *
- * @return array|false
- */
- public function getRoleUsers()
- {
- return $this->getResource()->getRoleUsers($this);
- }
-
- /**
- * Build resources array process
- *
- * @param null|Varien_Simplexml_Element $resource
- * @param null $parentName
- * @param int $level
- * @param null $represent2Darray
- * @param bool $rawNodes
- * @param string $module
- * @return array|null|Varien_Simplexml_Element
- */
- protected function _buildResourcesArray(Varien_Simplexml_Element $resource = null,
- $parentName = null, $level = 0, $represent2Darray = null, $rawNodes = false, $module = 'Mage_Adminhtml')
- {
- static $result;
- if (is_null($resource)) {
- $resource = Mage::getSingleton('Mage_Admin_Model_Config')->getAdminhtmlConfig()->getNode('acl/resources');
- $resourceName = null;
- $level = -1;
- } else {
- $resourceName = $parentName;
- if (!in_array($resource->getName(), array('title', 'sort_order', 'children', 'disabled'))) {
- $resourceName = (is_null($parentName) ? '' : $parentName . '/') . $resource->getName();
-
- //assigning module for its' children nodes
- if ($resource->getAttribute('module')) {
- $module = (string)$resource->getAttribute('module');
- }
-
- if ($rawNodes) {
- $resource->addAttribute("aclpath", $resourceName);
- $resource->addAttribute("module_c", $module);
- }
-
- if ( is_null($represent2Darray) ) {
- $result[$resourceName]['name'] = Mage::helper($module)->__((string)$resource->title);
- $result[$resourceName]['level'] = $level;
- } else {
- $result[] = $resourceName;
- }
- }
- }
-
- //check children and run recursion if they exists
- $children = $resource->children();
- foreach ($children as $key => $child) {
- if (1 == $child->disabled) {
- $resource->{$key} = null;
- continue;
- }
- $this->_buildResourcesArray($child, $resourceName, $level + 1, $represent2Darray, $rawNodes, $module);
- }
-
- if ($rawNodes) {
- return $resource;
- } else {
- return $result;
- }
- }
-}
View
18 app/code/core/Mage/Admin/etc/config.xml
@@ -31,22 +31,4 @@
<version>1.6.1.0</version>
</Mage_Admin>
</modules>
- <global>
- <resources>
- <admin_setup>
- <setup>
- <module>Mage_Admin</module>
- </setup>
- </admin_setup>
- </resources>
- </global>
- <default>
- <admin>
- <emails>
- <forgot_email_template>admin_emails_forgot_email_template</forgot_email_template>
- <forgot_email_identity>general</forgot_email_identity>
- <password_reset_link_expiration_period>1</password_reset_link_expiration_period>
- </emails>
- </admin>
- </default>
</config>
View
2 app/code/core/Mage/AdminNotification/Model/Observer.php
@@ -42,7 +42,7 @@ class Mage_AdminNotification_Model_Observer
public function preDispatch(Varien_Event_Observer $observer)
{
- if (Mage::getSingleton('Mage_Admin_Model_Session')->isLoggedIn()) {
+ if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isLoggedIn()) {
$feedModel = Mage::getModel('Mage_AdminNotification_Model_Feed');
/* @var $feedModel Mage_AdminNotification_Model_Feed */
View
19 app/code/core/Mage/Adminhtml/Block/Abstract.php
@@ -25,23 +25,12 @@
*/
/**
- * Adminhtml abstract block
- *
* @category Mage
* @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Abstract extends Mage_Core_Block_Template
+ * @author Magento Core Team <core@magentocommerce.com>
+ * @deprecated Moved to module Mage_Backend
+ */
+class Mage_Adminhtml_Block_Abstract extends Mage_Backend_Block_Abstract
{
- /**
- * Enter description here...
- *
- * @return string
- */
- protected function _getUrlModelClass()
- {
- return 'Mage_Adminhtml_Model_Url';
- }
-
}
View
2 app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php
@@ -123,7 +123,7 @@ protected function _prepareForm()
));
}
- if (Mage::getSingleton('Mage_Admin_Model_Session')->getUser()->getId() != $model->getUserId()) {
+ if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->getUser()->getId() != $model->getUserId()) {
$fieldset->addField('is_active', 'select', array(
'name' => 'is_active',
'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('This account is'),
View
2 app/code/core/Mage/Adminhtml/Block/Cache/Notifications.php
@@ -58,7 +58,7 @@ public function getManageUrl()
*/
protected function _toHtml()
{
- if (Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('system/cache')) {
+ if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('system/cache')) {
return parent::_toHtml();
}
return '';
View
4 app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php
@@ -137,7 +137,7 @@ public function getLoadTreeUrl($expanded=null)
{
$params = array('_current'=>true, 'id'=>null,'store'=>null);
if (
- (is_null($expanded) && Mage::getSingleton('Mage_Admin_Model_Session')->getIsTreeWasExpanded())
+ (is_null($expanded) && Mage::getSingleton('Mage_Backend_Model_Auth_Session')->getIsTreeWasExpanded())
|| $expanded == true) {
$params['expand_all'] = true;
}
@@ -159,7 +159,7 @@ public function getSwitchTreeUrl()
public function getIsWasExpanded()
{
- return Mage::getSingleton('Mage_Admin_Model_Session')->getIsTreeWasExpanded();
+ return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->getIsTreeWasExpanded();
}
public function getMoveUrl()
View
2 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php
@@ -99,7 +99,7 @@ protected function _prepareForm()
// Add new attribute button if it is not an image tab
if (!$form->getElement('media_gallery')
- && Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('catalog/attributes/attributes')
+ && Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('catalog/attributes/attributes')
) {
$headerBar = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes_Create');
View
4 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php
@@ -146,7 +146,7 @@ protected function _prepareLayout()
if( $this->getRequest()->getParam('id', false) ) {
if (Mage::helper('Mage_Catalog_Helper_Data')->isModuleEnabled('Mage_Review')) {
- if (Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('admin/catalog/reviews_ratings')){
+ if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('admin/catalog/reviews_ratings')){
$this->addTab('reviews', array(
'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Product Reviews'),
'url' => $this->getUrl('*/*/reviews', array('_current' => true)),
@@ -155,7 +155,7 @@ protected function _prepareLayout()
}
}
if (Mage::helper('Mage_Catalog_Helper_Data')->isModuleEnabled('Mage_Tag')) {
- if (Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('admin/catalog/tag')){
+ if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('admin/catalog/tag')){
$this->addTab('tags', array(
'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Product Tags'),
'url' => $this->getUrl('*/*/tagGrid', array('_current' => true)),
View
2 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php
@@ -301,7 +301,7 @@ protected function _prepareMassaction()
)
));
- if (Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('catalog/update_attributes')){
+ if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('catalog/update_attributes')){
$this->getMassactionBlock()->addItem('attributes', array(
'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Update Attributes'),
'url' => $this->getUrl('*/catalog_product_action_attribute/edit', array('_current'=>true))
View
2 app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php
@@ -91,7 +91,7 @@ protected function _prepareForm()
'name' => 'store_id',
'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Store'),
'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Store'),
- 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm(true, false),
+ 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(true, false),
'required' => true,
));
$renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element');
View
2 app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php
@@ -104,7 +104,7 @@ protected function _prepareForm()
'label' => Mage::helper('Mage_Checkout_Helper_Data')->__('Store View'),
'title' => Mage::helper('Mage_Checkout_Helper_Data')->__('Store View'),
'required' => true,
- 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm(false, true),
+ 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(false, true),
));
$renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element');
$field->setRenderer($renderer);
View
2 app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php
@@ -98,7 +98,7 @@ protected function _prepareForm()
'label' => Mage::helper('Mage_Cms_Helper_Data')->__('Store View'),
'title' => Mage::helper('Mage_Cms_Helper_Data')->__('Store View'),
'required' => true,
- 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm(false, true),
+ 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(false, true),
));
$renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element');
$field->setRenderer($renderer);
View
2 app/code/core/Mage/Adminhtml/Block/Cms/Page.php
@@ -61,7 +61,7 @@ public function __construct()
*/
protected function _isAllowedAction($action)
{
- return Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('cms/page/' . $action);
+ return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('cms/page/' . $action);
}
}
View
2 app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php
@@ -86,7 +86,7 @@ public function getHeaderText()
*/
protected function _isAllowedAction($action)
{
- return Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('cms/page/' . $action);
+ return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('cms/page/' . $action);
}
/**
View
2 app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php
@@ -148,6 +148,6 @@ public function isHidden()
*/
protected function _isAllowedAction($action)
{
- return Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('cms/page/' . $action);
+ return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('cms/page/' . $action);
}
}
View
2 app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php
@@ -181,6 +181,6 @@ public function isHidden()
*/
protected function _isAllowedAction($action)
{
- return Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('cms/page/' . $action);
+ return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('cms/page/' . $action);
}
}
View
4 app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php
@@ -90,7 +90,7 @@ protected function _prepareForm()
'label' => Mage::helper('Mage_Cms_Helper_Data')->__('Store View'),
'title' => Mage::helper('Mage_Cms_Helper_Data')->__('Store View'),
'required' => true,
- 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm(false, true),
+ 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(false, true),
'disabled' => $isElementDisabled,
));
$renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element');
@@ -172,6 +172,6 @@ public function isHidden()
*/
protected function _isAllowedAction($action)
{
- return Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('cms/page/' . $action);
+ return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('cms/page/' . $action);
}
}
View
2 app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php
@@ -130,6 +130,6 @@ public function isHidden()
*/
protected function _isAllowedAction($action)
{
- return Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('cms/page/' . $action);
+ return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('cms/page/' . $action);
}
}
View
2 app/code/core/Mage/Adminhtml/Block/Customer/Edit.php
@@ -39,7 +39,7 @@ public function __construct()
$this->_controller = 'customer';
if ($this->getCustomerId() &&
- Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('sales/order/actions/create')) {
+ Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('sales/order/actions/create')) {
$this->_addButton('order', array(
'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Create Order'),
'onclick' => 'setLocation(\'' . $this->getCreateOrderUrl() . '\')',
View
2 app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php
@@ -230,7 +230,7 @@ function(v, elem){
$fieldset->addField('sendemail_store_id', 'select', array(
'label' => $this->helper('Mage_Customer_Helper_Data')->__('Send From'),
'name' => 'sendemail_store_id',
- 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm()
+ 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm()
));
}
}
View
2 app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php
@@ -236,7 +236,7 @@ protected function _getAdditionalElementTypes()
* @return string
*/
public function getDefaultCountriesJson() {
- $websites = Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getWebsiteValuesForForm(false, true);
+ $websites = Mage::getSingleton('Mage_Core_Model_System_Store')->getWebsiteValuesForForm(false, true);
$result = array();
foreach ($websites as $website) {
$result[$website['value']] = Mage::app()->getWebsite($website['value'])->getConfig(
View
2 app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php
@@ -157,7 +157,7 @@ public function getGridUrl()
public function getGridParentHtml()
{
- $templateName = Mage::getDesign()->getTemplateFilename($this->_parentTemplate, array('_relative'=>true));
+ $templateName = Mage::getDesign()->getFilename($this->_parentTemplate, array('_relative' => true));
return $this->fetchView($templateName);
}
View
2 app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php
@@ -246,7 +246,7 @@ protected function _setCollectionOrder($column)
*/
public function getGridParentHtml()
{
- $templateName = Mage::getDesign()->getTemplateFilename($this->_parentTemplate, array('_relative'=>true));
+ $templateName = Mage::getDesign()->getFilename($this->_parentTemplate, array('_relative' => true));
return $this->fetchView($templateName);
}
View
8 app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php
@@ -71,7 +71,7 @@ protected function _beforeToHtml()
if (Mage::registry('current_customer')->getId()) {
- if (Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('sales/order/actions/view')) {
+ if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('sales/order/actions/view')) {
$this->addTab('orders', array(
'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Orders'),
'class' => 'ajax',
@@ -91,23 +91,23 @@ protected function _beforeToHtml()
'url' => $this->getUrl('*/*/wishlist', array('_current' => true)),
));
- if (Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('newsletter/subscriber')) {
+ if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('newsletter/subscriber')) {
$this->addTab('newsletter', array(
'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Newsletter'),
'content' => $this->getLayout()
->createBlock('Mage_Adminhtml_Block_Customer_Edit_Tab_Newsletter')->initForm()->toHtml()
));
}
- if (Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('catalog/reviews_ratings')) {
+ if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('catalog/reviews_ratings')) {
$this->addTab('reviews', array(
'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Product Reviews'),
'class' => 'ajax',
'url' => $this->getUrl('*/*/productReviews', array('_current' => true)),
));
}
- if (Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('catalog/tag')) {
+ if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('catalog/tag')) {
$this->addTab('tags', array(
'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Product Tags'),
'class' => 'ajax',
View
2 app/code/core/Mage/Adminhtml/Block/Customer/Grid.php
@@ -139,7 +139,7 @@ protected function _prepareColumns()
'align' => 'center',
'width' => '80px',
'type' => 'options',
- 'options' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getWebsiteOptionHash(true),
+ 'options' => Mage::getSingleton('Mage_Core_Model_System_Store')->getWebsiteOptionHash(true),
'index' => 'website_id',
));
}
View
2 app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php
@@ -160,7 +160,7 @@ protected function _prepareColumns()
*/
public function getRowUrl($row)
{
- return (Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('customer/manage') && $row->getCustomerId())
+ return (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('customer/manage') && $row->getCustomerId())
? $this->getUrl('*/customer/edit', array('id' => $row->getCustomerId())) : '';
}
}
View
6 app/code/core/Mage/Adminhtml/Block/Denied.php
@@ -26,10 +26,10 @@
class Mage_Adminhtml_Block_Denied extends Mage_Adminhtml_Block_Template
{
- public function hasAvailaleResources()
+ public function hasAvailableResources()
{
- $user = Mage::getSingleton('Mage_Admin_Model_Session')->getUser();
- if ($user && $user->hasAvailableResources()) {
+ $user = Mage::getSingleton('Mage_Backend_Model_Auth_Session')->getUser();
+ if ($user && $user->getHasAvailableResources()) {
return true;
}
return false;
View
4 app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php
@@ -70,7 +70,7 @@ protected function _prepareForm()
'name' => 'stores[]',
'label' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Subscribers From'),
'image' => $this->getSkinUrl('images/grid-cal.gif'),
- 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm(),
+ 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(),
'value' => $queue->getStores()
));
}
@@ -97,7 +97,7 @@ protected function _prepareForm()
'label' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Subscribers From'),
'image' => $this->getSkinUrl('images/grid-cal.gif'),
'required' => true,
- 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm(),
+ 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(),
'value' => $queue->getStores()
));
}
View
6 app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php
@@ -165,7 +165,7 @@ protected function _getOptions($optionsArray)
*/
protected function _getWebsiteOptions()
{
- return Mage::getModel('Mage_Adminhtml_Model_System_Store')->getWebsiteOptionHash();
+ return Mage::getModel('Mage_Core_Model_System_Store')->getWebsiteOptionHash();
}
/**
@@ -175,7 +175,7 @@ protected function _getWebsiteOptions()
*/
protected function _getStoreGroupOptions()
{
- return Mage::getModel('Mage_Adminhtml_Model_System_Store')->getStoreGroupOptionHash();
+ return Mage::getModel('Mage_Core_Model_System_Store')->getStoreGroupOptionHash();
}
/**
@@ -185,7 +185,7 @@ protected function _getStoreGroupOptions()
*/
protected function _getStoreOptions()
{
- return Mage::getModel('Mage_Adminhtml_Model_System_Store')->getStoreOptionHash();
+ return Mage::getModel('Mage_Core_Model_System_Store')->getStoreOptionHash();
}
protected function _prepareMassaction()
View
2 app/code/core/Mage/Adminhtml/Block/Notification/Survey.php
@@ -40,7 +40,7 @@ class Mage_Adminhtml_Block_Notification_Survey extends Mage_Adminhtml_Block_Temp
*/
public function canShow()
{
- $adminSession = Mage::getSingleton('Mage_Admin_Model_Session');
+ $adminSession = Mage::getSingleton('Mage_Backend_Model_Auth_Session');
$seconds = intval(date('s', time()));
if ($adminSession->getHideSurveyQuestion() || !$adminSession->isAllowed('all')
|| Mage_AdminNotification_Model_Survey::isSurveyViewed()
View
4 app/code/core/Mage/Adminhtml/Block/Notification/Window.php
@@ -95,7 +95,7 @@ public function canShow()
return $this->_available;
}
- if (!Mage::getSingleton('Mage_Admin_Model_Session')->isFirstPageAfterLogin()) {
+ if (!Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isFirstPageAfterLogin()) {
$this->_available = false;
return false;
}
@@ -172,7 +172,7 @@ public function getSeverityText()
*/
protected function _isAllowed()
{
- return Mage::getSingleton('Mage_Admin_Model_Session')
+ return Mage::getSingleton('Mage_Backend_Model_Auth_Session')
->isAllowed('admin/system/adminnotification/show_toolbar');
}
}
View
6 app/code/core/Mage/Adminhtml/Block/Page/Header.php
@@ -41,17 +41,17 @@ public function __construct()
public function getHomeLink()
{
- return $this->getUrl('adminhtml');
+ return Mage::helper('Mage_Backend_Helper_Data')->getHomePageUrl();
}
public function getUser()
{
- return Mage::getSingleton('Mage_Admin_Model_Session')->getUser();
+ return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->getUser();
}
public function getLogoutLink()
{
- return $this->getUrl('adminhtml/index/logout');
+ return $this->getUrl('adminhtml/auth/logout');
}
/**
View
347 app/code/core/Mage/Adminhtml/Block/Page/Menu.php
@@ -27,355 +27,12 @@
/**
* Adminhtml menu block
*
- * @method Mage_Adminhtml_Block_Page_Menu setAdditionalCacheKeyInfo(array $cacheKeyInfo)
- * @method array getAdditionalCacheKeyInfo()
- *
* @category Mage
* @package Mage_Adminhtml
* @author Magento Core Team <core@magentocommerce.com>
+ * @deprecated Moved to module Mage_Backend
*/
-class Mage_Adminhtml_Block_Page_Menu extends Mage_Adminhtml_Block_Template
+class Mage_Adminhtml_Block_Page_Menu extends Mage_Backend_Block_Menu
{
- const CACHE_TAGS = 'BACKEND_MAINMENU';
-
- /**
- * Adminhtml URL instance
- *
- * @var Mage_Adminhtml_Model_Url
- */
- protected $_url;
-
- /**
- * Initialize template and cache settings
- *
- */
- protected function _construct()
- {
- parent::_construct();
- $this->setTemplate('page/menu.phtml');
- $this->_url = Mage::getModel('Mage_Adminhtml_Model_Url');
- $this->setCacheTags(array(self::CACHE_TAGS));
- }
-
- /**
- * Retrieve cache lifetime
- *
- * @return int
- */
- public function getCacheLifetime()
- {
- return 86400;
- }
-
- /**
- * Get Key pieces for caching block content
- *
- * @return array
- */
- public function getCacheKeyInfo()
- {
- $cacheKeyInfo = array(
- 'admin_top_nav',
- $this->getActive(),
- Mage::getSingleton('Mage_Admin_Model_Session')->getUser()->getId(),
- Mage::app()->getLocale()->getLocaleCode()
- );
- // Add additional key parameters if needed
- $additionalCacheKeyInfo = $this->getAdditionalCacheKeyInfo();
- if (is_array($additionalCacheKeyInfo) && !empty($additionalCacheKeyInfo)) {
- $cacheKeyInfo = array_merge($cacheKeyInfo, $additionalCacheKeyInfo);
- }
- return $cacheKeyInfo;
- }
-
- /**
- * Retrieve Adminhtml Menu array
- *
- * @return array
- */
- public function getMenuArray()
- {
- return $this->_buildMenuArray();
- }
-
- /**
- * Retrieve Title value for menu node
- *
- * @param Varien_Simplexml_Element $child
- * @return string
- */
- protected function _getHelperValue(Varien_Simplexml_Element $child)
- {
- $helperName = 'Mage_Adminhtml_Helper_Data';
- $titleNodeName = 'title';
- $childAttributes = $child->attributes();
- if (isset($childAttributes['module'])) {
- $helperName = (string)$childAttributes['module'];
- }
-// if (isset($childAttributes['translate'])) {
-// $titleNodeName = (string)$childAttributes['translate'];
-// }
-
- return Mage::helper($helperName)->__((string)$child->$titleNodeName);
- }
-
- /**
- * Recursive Build Menu array
- *
- * @param Varien_Simplexml_Element $parent
- * @param string $path
- * @param int $level
- * @return array
- */
- protected function _buildMenuArray(Varien_Simplexml_Element $parent=null, $path='', $level=0)
- {
- if (is_null($parent)) {
- $parent = Mage::getSingleton('Mage_Admin_Model_Config')->getAdminhtmlConfig()->getNode('menu');
- }
-
- $parentArr = array();
- $sortOrder = 0;
- foreach ($parent->children() as $childName => $child) {
- if (1 == $child->disabled) {
- continue;
- }
-
- $aclResource = 'admin/' . ($child->resource ? (string)$child->resource : $path . $childName);
- if (!$this->_checkAcl($aclResource) || !$this->_isEnabledModuleOutput($child)) {
- continue;
- }
-
- if ($child->depends && !$this->_checkDepends($child->depends)) {
- continue;
- }
-
- $menuArr = array();
-
- $menuArr['label'] = $this->_getHelperValue($child);
-
- $menuArr['sort_order'] = $child->sort_order ? (int)$child->sort_order : $sortOrder;
-
- if ($child->action) {
- $menuArr['url'] = $this->_url->getUrl((string)$child->action, array('_cache_secret_key' => true));
- } else {
- $menuArr['url'] = '#';
- $menuArr['click'] = 'return false';
- }
-
- $menuArr['active'] = ($this->getActive()==$path.$childName)
- || (strpos($this->getActive(), $path.$childName.'/')===0);
-
- $menuArr['level'] = $level;
-
- if ($child->children) {
- $menuArr['children'] = $this->_buildMenuArray($child->children, $path.$childName.'/', $level+1);
- }
- $parentArr[$childName] = $menuArr;
-
- $sortOrder++;
- }
-
- uasort($parentArr, array($this, '_sortMenu'));
-
- while (list($key, $value) = each($parentArr)) {
- $last = $key;
- }
- if (isset($last)) {
- $parentArr[$last]['last'] = true;
- }
-
- return $parentArr;
- }
-
- /**
- * Sort menu comparison function
- *
- * @param int $a
- * @param int $b
- * @return int
- */
- protected function _sortMenu($a, $b)
- {
- return $a['sort_order']<$b['sort_order'] ? -1 : ($a['sort_order']>$b['sort_order'] ? 1 : 0);
- }
-
- /**
- * Check Depends
- *
- * @param Varien_Simplexml_Element $depends
- * @return bool
- */
- protected function _checkDepends(Varien_Simplexml_Element $depends)
- {
- if ($depends->module) {
- $modulesConfig = Mage::getConfig()->getNode('modules');
- foreach ($depends->module as $module) {
- if (!$modulesConfig->$module || !$modulesConfig->$module->is('active')) {
- return false;
- }
- }
- }
-
- if ($depends->config) {
- foreach ($depends->config as $path) {
- if (!Mage::getStoreConfigFlag((string)$path)) {
- return false;
- }
- }
- }
-
- return true;
- }
-
- /*protected function _checkAcl(Varien_Simplexml_Element $acl)
- {
- return true;
- $resource = (string)$acl->resource;
- $privilege = (string)$acl->privilege;