Version Notes
1.6.1.0
Download this release
Release Info
Developer | Magento Core Team |
Extension | Mage_Core_Modules |
Version | 1.6.1.0 |
Comparing to | |
See all releases |
Version 1.6.1.0
- .htaccess.sample +179 -0
- LICENSE.html +42 -0
- LICENSE.txt +48 -0
- LICENSE_AFL.txt +48 -0
- RELEASE_NOTES.txt +6249 -0
- app/.htaccess +2 -0
- app/Mage.php +912 -0
- app/code/core/Mage/Admin/Helper/Data.php +61 -0
- app/code/core/Mage/Admin/Model/Acl.php +92 -0
- app/code/core/Mage/Admin/Model/Acl/Assert/Ip.php +56 -0
- app/code/core/Mage/Admin/Model/Acl/Assert/Time.php +56 -0
- app/code/core/Mage/Admin/Model/Acl/Resource.php +38 -0
- app/code/core/Mage/Admin/Model/Acl/Role.php +60 -0
- app/code/core/Mage/Admin/Model/Acl/Role/Generic.php +38 -0
- app/code/core/Mage/Admin/Model/Acl/Role/Group.php +38 -0
- app/code/core/Mage/Admin/Model/Acl/Role/Registry.php +76 -0
- app/code/core/Mage/Admin/Model/Acl/Role/User.php +38 -0
- app/code/core/Mage/Admin/Model/Config.php +187 -0
- app/code/core/Mage/Admin/Model/Mysql4/Acl.php +37 -0
- app/code/core/Mage/Admin/Model/Mysql4/Acl/Role.php +37 -0
- app/code/core/Mage/Admin/Model/Mysql4/Acl/Role/Collection.php +37 -0
- app/code/core/Mage/Admin/Model/Mysql4/Permissions/Collection.php +37 -0
- app/code/core/Mage/Admin/Model/Mysql4/Role.php +37 -0
- app/code/core/Mage/Admin/Model/Mysql4/Role/Collection.php +37 -0
- app/code/core/Mage/Admin/Model/Mysql4/Roles.php +37 -0
- app/code/core/Mage/Admin/Model/Mysql4/Roles/Collection.php +37 -0
- app/code/core/Mage/Admin/Model/Mysql4/Roles/User/Collection.php +37 -0
- app/code/core/Mage/Admin/Model/Mysql4/Rules.php +37 -0
- app/code/core/Mage/Admin/Model/Mysql4/Rules/Collection.php +37 -0
- app/code/core/Mage/Admin/Model/Mysql4/User.php +37 -0
- app/code/core/Mage/Admin/Model/Mysql4/User/Collection.php +37 -0
- app/code/core/Mage/Admin/Model/Observer.php +105 -0
- app/code/core/Mage/Admin/Model/Resource/Acl.php +171 -0
- app/code/core/Mage/Admin/Model/Resource/Acl/Role.php +45 -0
- app/code/core/Mage/Admin/Model/Resource/Acl/Role/Collection.php +45 -0
- app/code/core/Mage/Admin/Model/Resource/Permissions/Collection.php +45 -0
- app/code/core/Mage/Admin/Model/Resource/Role.php +60 -0
- app/code/core/Mage/Admin/Model/Resource/Role/Collection.php +69 -0
- app/code/core/Mage/Admin/Model/Resource/Roles.php +178 -0
- app/code/core/Mage/Admin/Model/Resource/Roles/Collection.php +69 -0
- app/code/core/Mage/Admin/Model/Resource/Roles/User/Collection.php +59 -0
- app/code/core/Mage/Admin/Model/Resource/Rules.php +100 -0
- app/code/core/Mage/Admin/Model/Resource/Rules/Collection.php +71 -0
- app/code/core/Mage/Admin/Model/Resource/User.php +463 -0
- app/code/core/Mage/Admin/Model/Resource/User/Collection.php +45 -0
- app/code/core/Mage/Admin/Model/Role.php +55 -0
- app/code/core/Mage/Admin/Model/Roles.php +142 -0
- app/code/core/Mage/Admin/Model/Rules.php +69 -0
- app/code/core/Mage/Admin/Model/Session.php +231 -0
- app/code/core/Mage/Admin/Model/User.php +596 -0
- app/code/core/Mage/Admin/data/admin_setup/data-install-1.6.0.0.php +48 -0
- app/code/core/Mage/Admin/etc/config.xml +95 -0
- app/code/core/Mage/Admin/sql/admin_setup/install-1.6.0.0.php +193 -0
- app/code/core/Mage/Admin/sql/admin_setup/mysql4-install-0.7.0.php +93 -0
- app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-0.7.0-0.7.1.php +34 -0
- app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-0.7.1-0.7.2.php +46 -0
- app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +329 -0
- app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-1.6.0.0-1.6.1.0.php +48 -0
- app/code/core/Mage/AdminNotification/Helper/Data.php +135 -0
- app/code/core/Mage/AdminNotification/Model/Feed.php +194 -0
- app/code/core/Mage/AdminNotification/Model/Inbox.php +120 -0
- app/code/core/Mage/AdminNotification/Model/Mysql4/Inbox.php +37 -0
- app/code/core/Mage/AdminNotification/Model/Mysql4/Inbox/Collection.php +38 -0
- app/code/core/Mage/AdminNotification/Model/Observer.php +55 -0
- app/code/core/Mage/AdminNotification/Model/Resource/Inbox.php +118 -0
- app/code/core/Mage/AdminNotification/Model/Resource/Inbox/Collection.php +57 -0
- app/code/core/Mage/AdminNotification/Model/Survey.php +112 -0
- app/code/core/Mage/AdminNotification/etc/adminhtml.xml +74 -0
- app/code/core/Mage/AdminNotification/etc/config.xml +103 -0
- app/code/core/Mage/AdminNotification/etc/system.xml +72 -0
- app/code/core/Mage/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php +83 -0
- app/code/core/Mage/AdminNotification/sql/adminnotification_setup/mysql4-install-1.0.0.php +48 -0
- app/code/core/Mage/AdminNotification/sql/adminnotification_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +135 -0
- app/code/core/Mage/Api/Controller/Action.php +53 -0
- app/code/core/Mage/Api/Exception.php +53 -0
- app/code/core/Mage/Api/Helper/Data.php +239 -0
- app/code/core/Mage/Api/Model/Acl.php +103 -0
- app/code/core/Mage/Api/Model/Acl/Assert/Ip.php +56 -0
- app/code/core/Mage/Api/Model/Acl/Assert/Time.php +56 -0
- app/code/core/Mage/Api/Model/Acl/Resource.php +38 -0
- app/code/core/Mage/Api/Model/Acl/Role.php +56 -0
- app/code/core/Mage/Api/Model/Acl/Role/Generic.php +38 -0
- app/code/core/Mage/Api/Model/Acl/Role/Group.php +38 -0
- app/code/core/Mage/Api/Model/Acl/Role/Registry.php +76 -0
- app/code/core/Mage/Api/Model/Acl/Role/User.php +38 -0
- app/code/core/Mage/Api/Model/Config.php +273 -0
- app/code/core/Mage/Api/Model/Mysql4/Acl.php +37 -0
- app/code/core/Mage/Api/Model/Mysql4/Acl/Role.php +37 -0
- app/code/core/Mage/Api/Model/Mysql4/Acl/Role/Collection.php +37 -0
- app/code/core/Mage/Api/Model/Mysql4/Permissions/Collection.php +37 -0
- app/code/core/Mage/Api/Model/Mysql4/Role.php +37 -0
- app/code/core/Mage/Api/Model/Mysql4/Role/Collection.php +37 -0
- app/code/core/Mage/Api/Model/Mysql4/Roles.php +37 -0
- app/code/core/Mage/Api/Model/Mysql4/Roles/Collection.php +37 -0
- app/code/core/Mage/Api/Model/Mysql4/Roles/User/Collection.php +37 -0
- app/code/core/Mage/Api/Model/Mysql4/Rules.php +37 -0
- app/code/core/Mage/Api/Model/Mysql4/Rules/Collection.php +37 -0
- app/code/core/Mage/Api/Model/Mysql4/User.php +37 -0
- app/code/core/Mage/Api/Model/Mysql4/User/Collection.php +37 -0
- app/code/core/Mage/Api/Model/Resource/Abstract.php +105 -0
- app/code/core/Mage/Api/Model/Resource/Acl.php +157 -0
- app/code/core/Mage/Api/Model/Resource/Acl/Role.php +59 -0
- app/code/core/Mage/Api/Model/Resource/Acl/Role/Collection.php +45 -0
- app/code/core/Mage/Api/Model/Resource/Permissions/Collection.php +45 -0
- app/code/core/Mage/Api/Model/Resource/Role.php +76 -0
- app/code/core/Mage/Api/Model/Resource/Role/Collection.php +69 -0
- app/code/core/Mage/Api/Model/Resource/Roles.php +151 -0
- app/code/core/Mage/Api/Model/Resource/Roles/Collection.php +67 -0
- app/code/core/Mage/Api/Model/Resource/Roles/User/Collection.php +59 -0
- app/code/core/Mage/Api/Model/Resource/Rules.php +87 -0
- app/code/core/Mage/Api/Model/Resource/Rules/Collection.php +69 -0
- app/code/core/Mage/Api/Model/Resource/User.php +435 -0
- app/code/core/Mage/Api/Model/Resource/User/Collection.php +45 -0
- app/code/core/Mage/Api/Model/Role.php +55 -0
- app/code/core/Mage/Api/Model/Roles.php +138 -0
- app/code/core/Mage/Api/Model/Rules.php +69 -0
- app/code/core/Mage/Api/Model/Server.php +107 -0
- app/code/core/Mage/Api/Model/Server/Adapter/Interface.php +81 -0
- app/code/core/Mage/Api/Model/Server/Adapter/Soap.php +246 -0
- app/code/core/Mage/Api/Model/Server/Adapter/Xmlrpc.php +119 -0
- app/code/core/Mage/Api/Model/Server/Handler.php +37 -0
- app/code/core/Mage/Api/Model/Server/Handler/Abstract.php +542 -0
- app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php +83 -0
- app/code/core/Mage/Api/Model/Server/V2/Handler.php +59 -0
- app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php +107 -0
- app/code/core/Mage/Api/Model/Server/Wsi/Handler.php +182 -0
- app/code/core/Mage/Api/Model/Session.php +211 -0
- app/code/core/Mage/Api/Model/User.php +247 -0
- app/code/core/Mage/Api/Model/Wsdl/Config.php +144 -0
- app/code/core/Mage/Api/Model/Wsdl/Config/Base.php +116 -0
- app/code/core/Mage/Api/Model/Wsdl/Config/Element.php +265 -0
- app/code/core/Mage/Api/controllers/IndexController.php +42 -0
- app/code/core/Mage/Api/controllers/SoapController.php +42 -0
- app/code/core/Mage/Api/controllers/V2/SoapController.php +48 -0
- app/code/core/Mage/Api/controllers/XmlrpcController.php +41 -0
- app/code/core/Mage/Api/etc/adminhtml.xml +82 -0
- app/code/core/Mage/Api/etc/api.xml +143 -0
- app/code/core/Mage/Api/etc/config.xml +129 -0
- app/code/core/Mage/Api/etc/system.xml +78 -0
- app/code/core/Mage/Api/etc/wsdl.xml +191 -0
- app/code/core/Mage/Api/etc/wsdl2.xml +229 -0
- app/code/core/Mage/Api/etc/wsi.xml +381 -0
- app/code/core/Mage/Api/sql/api_setup/install-1.6.0.0.php +208 -0
- app/code/core/Mage/Api/sql/api_setup/mysql4-install-0.7.0.php +90 -0
- app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.7.0-0.7.1.php +40 -0
- app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.8.0-0.8.1.php +56 -0
- app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +375 -0
- app/code/core/Mage/Authorizenet/Block/Directpost/Form.php +88 -0
- app/code/core/Mage/Authorizenet/Block/Directpost/Iframe.php +74 -0
- app/code/core/Mage/Authorizenet/Helper/Data.php +202 -0
- app/code/core/Mage/Authorizenet/Model/Directpost.php +651 -0
- app/code/core/Mage/Authorizenet/Model/Directpost/Observer.php +32 -0
.htaccess.sample
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
############################################
|
2 |
+
## uncomment these lines for CGI mode
|
3 |
+
## make sure to specify the correct cgi php binary file name
|
4 |
+
## it might be /cgi-bin/php-cgi
|
5 |
+
|
6 |
+
# Action php5-cgi /cgi-bin/php5-cgi
|
7 |
+
# AddHandler php5-cgi .php
|
8 |
+
|
9 |
+
############################################
|
10 |
+
## GoDaddy specific options
|
11 |
+
|
12 |
+
# Options -MultiViews
|
13 |
+
|
14 |
+
## you might also need to add this line to php.ini
|
15 |
+
## cgi.fix_pathinfo = 1
|
16 |
+
## if it still doesn't work, rename php.ini to php5.ini
|
17 |
+
|
18 |
+
############################################
|
19 |
+
## this line is specific for 1and1 hosting
|
20 |
+
|
21 |
+
#AddType x-mapp-php5 .php
|
22 |
+
#AddHandler x-mapp-php5 .php
|
23 |
+
|
24 |
+
############################################
|
25 |
+
## default index file
|
26 |
+
|
27 |
+
DirectoryIndex index.php
|
28 |
+
|
29 |
+
<IfModule mod_php5.c>
|
30 |
+
|
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 |
+
############################################
|
39 |
+
## disable magic quotes for php request vars
|
40 |
+
|
41 |
+
php_flag magic_quotes_gpc off
|
42 |
+
|
43 |
+
############################################
|
44 |
+
## disable automatic session start
|
45 |
+
## before autoload was initialized
|
46 |
+
|
47 |
+
php_flag session.auto_start off
|
48 |
+
|
49 |
+
############################################
|
50 |
+
## enable resulting html compression
|
51 |
+
|
52 |
+
#php_flag zlib.output_compression on
|
53 |
+
|
54 |
+
###########################################
|
55 |
+
# disable user agent verification to not break multiple image upload
|
56 |
+
|
57 |
+
php_flag suhosin.session.cryptua off
|
58 |
+
|
59 |
+
###########################################
|
60 |
+
# turn off compatibility with PHP4 when dealing with objects
|
61 |
+
|
62 |
+
php_flag zend.ze1_compatibility_mode Off
|
63 |
+
|
64 |
+
</IfModule>
|
65 |
+
|
66 |
+
<IfModule mod_security.c>
|
67 |
+
###########################################
|
68 |
+
# disable POST processing to not break multiple image upload
|
69 |
+
|
70 |
+
SecFilterEngine Off
|
71 |
+
SecFilterScanPOST Off
|
72 |
+
</IfModule>
|
73 |
+
|
74 |
+
<IfModule mod_deflate.c>
|
75 |
+
|
76 |
+
############################################
|
77 |
+
## enable apache served files compression
|
78 |
+
## http://developer.yahoo.com/performance/rules.html#gzip
|
79 |
+
|
80 |
+
# Insert filter on all content
|
81 |
+
###SetOutputFilter DEFLATE
|
82 |
+
# Insert filter on selected content types only
|
83 |
+
#AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
|
84 |
+
|
85 |
+
# Netscape 4.x has some problems...
|
86 |
+
#BrowserMatch ^Mozilla/4 gzip-only-text/html
|
87 |
+
|
88 |
+
# Netscape 4.06-4.08 have some more problems
|
89 |
+
#BrowserMatch ^Mozilla/4\.0[678] no-gzip
|
90 |
+
|
91 |
+
# MSIE masquerades as Netscape, but it is fine
|
92 |
+
#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
|
93 |
+
|
94 |
+
# Don't compress images
|
95 |
+
#SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
|
96 |
+
|
97 |
+
# Make sure proxies don't deliver the wrong content
|
98 |
+
#Header append Vary User-Agent env=!dont-vary
|
99 |
+
|
100 |
+
</IfModule>
|
101 |
+
|
102 |
+
<IfModule mod_ssl.c>
|
103 |
+
|
104 |
+
############################################
|
105 |
+
## make HTTPS env vars available for CGI mode
|
106 |
+
|
107 |
+
SSLOptions StdEnvVars
|
108 |
+
|
109 |
+
</IfModule>
|
110 |
+
|
111 |
+
<IfModule mod_rewrite.c>
|
112 |
+
|
113 |
+
############################################
|
114 |
+
## enable rewrites
|
115 |
+
|
116 |
+
Options +FollowSymLinks
|
117 |
+
RewriteEngine on
|
118 |
+
|
119 |
+
############################################
|
120 |
+
## you can put here your magento root folder
|
121 |
+
## path relative to web root
|
122 |
+
|
123 |
+
#RewriteBase /magento/
|
124 |
+
|
125 |
+
############################################
|
126 |
+
## workaround for HTTP authorization
|
127 |
+
## in CGI environment
|
128 |
+
|
129 |
+
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
130 |
+
|
131 |
+
############################################
|
132 |
+
## always send 404 on missing files in these folders
|
133 |
+
|
134 |
+
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
|
135 |
+
|
136 |
+
############################################
|
137 |
+
## never rewrite for existing files, directories and links
|
138 |
+
|
139 |
+
RewriteCond %{REQUEST_FILENAME} !-f
|
140 |
+
RewriteCond %{REQUEST_FILENAME} !-d
|
141 |
+
RewriteCond %{REQUEST_FILENAME} !-l
|
142 |
+
|
143 |
+
############################################
|
144 |
+
## rewrite everything else to index.php
|
145 |
+
|
146 |
+
RewriteRule .* index.php [L]
|
147 |
+
|
148 |
+
</IfModule>
|
149 |
+
|
150 |
+
|
151 |
+
############################################
|
152 |
+
## Prevent character encoding issues from server overrides
|
153 |
+
## If you still have problems, use the second line instead
|
154 |
+
|
155 |
+
AddDefaultCharset Off
|
156 |
+
#AddDefaultCharset UTF-8
|
157 |
+
|
158 |
+
<IfModule mod_expires.c>
|
159 |
+
|
160 |
+
############################################
|
161 |
+
## Add default Expires header
|
162 |
+
## http://developer.yahoo.com/performance/rules.html#expires
|
163 |
+
|
164 |
+
ExpiresDefault "access plus 1 year"
|
165 |
+
|
166 |
+
</IfModule>
|
167 |
+
|
168 |
+
############################################
|
169 |
+
## By default allow all access
|
170 |
+
|
171 |
+
Order allow,deny
|
172 |
+
Allow from all
|
173 |
+
|
174 |
+
############################################
|
175 |
+
## If running in cluster environment, uncomment this
|
176 |
+
## http://developer.yahoo.com/performance/rules.html#etags
|
177 |
+
|
178 |
+
#FileETag none
|
179 |
+
|
LICENSE.html
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<h4>Open Software License ("OSL") v. 3.0</h4>
|
2 |
+
|
3 |
+
<p>This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:</p>
|
4 |
+
<h5>Licensed under the Open Software License version 3.0</h5>
|
5 |
+
<p>Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:</p>
|
6 |
+
<ul class="disc">
|
7 |
+
<li>to reproduce the Original Work in copies, either alone or as part of a collective work</li>
|
8 |
+
<li>to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work</li>
|
9 |
+
<li>to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License</li>
|
10 |
+
<li>to perform the Original Work publicly</li>
|
11 |
+
<li>to display the Original Work publicly</li>
|
12 |
+
</ul>
|
13 |
+
|
14 |
+
<p><strong>Grant of Patent License.</strong> Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.</p>
|
15 |
+
|
16 |
+
<p><strong>Grant of Source Code License.</strong> The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.</p>
|
17 |
+
|
18 |
+
<p><strong>Exclusions From License Grant.</strong> Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.</p>
|
19 |
+
|
20 |
+
<p><strong>External Deployment.</strong> The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).</p>
|
21 |
+
|
22 |
+
<p><strong>Attribution Rights.</strong> You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.</p>
|
23 |
+
|
24 |
+
<p><strong>Warranty of Provenance and Disclaimer of Warranty.</strong> Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.</p>
|
25 |
+
|
26 |
+
<p><strong>Limitation of Liability.</strong> Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.</p>
|
27 |
+
|
28 |
+
<p><strong>Acceptance and Termination.</strong> If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).</p>
|
29 |
+
|
30 |
+
<p><strong>Termination for Patent Action.</strong> This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.</p>
|
31 |
+
|
32 |
+
<p><strong>Jurisdiction, Venue and Governing Law.</strong> Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.</p>
|
33 |
+
|
34 |
+
<p><strong>Attorneys Fees.</strong> In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.</p>
|
35 |
+
|
36 |
+
<p><strong>Miscellaneous.</strong> If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.</p>
|
37 |
+
|
38 |
+
<p><strong>Definition of "You" in This License.</strong> "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.</p>
|
39 |
+
|
40 |
+
<p><strong>Right to Use.</strong> You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.</p>
|
41 |
+
|
42 |
+
<p><strong>Modification of This License.</strong> This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under Open Software License ("OSL") v. 3.0" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.</p>
|
LICENSE.txt
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
Open Software License ("OSL") v. 3.0
|
3 |
+
|
4 |
+
This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
|
5 |
+
|
6 |
+
Licensed under the Open Software License version 3.0
|
7 |
+
|
8 |
+
1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
|
9 |
+
|
10 |
+
1. to reproduce the Original Work in copies, either alone or as part of a collective work;
|
11 |
+
|
12 |
+
2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
|
13 |
+
|
14 |
+
3. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License;
|
15 |
+
|
16 |
+
4. to perform the Original Work publicly; and
|
17 |
+
|
18 |
+
5. to display the Original Work publicly.
|
19 |
+
|
20 |
+
2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
|
21 |
+
|
22 |
+
3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
|
23 |
+
|
24 |
+
4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
|
25 |
+
|
26 |
+
5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
|
27 |
+
|
28 |
+
6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
|
29 |
+
|
30 |
+
7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
|
31 |
+
|
32 |
+
8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
|
33 |
+
|
34 |
+
9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
|
35 |
+
|
36 |
+
10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
|
37 |
+
|
38 |
+
11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
|
39 |
+
|
40 |
+
12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
|
41 |
+
|
42 |
+
13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
|
43 |
+
|
44 |
+
14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
45 |
+
|
46 |
+
15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
|
47 |
+
|
48 |
+
16. Modification of This License. This License is Copyright � 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
|
LICENSE_AFL.txt
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
Academic Free License ("AFL") v. 3.0
|
3 |
+
|
4 |
+
This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
|
5 |
+
|
6 |
+
Licensed under the Academic Free License version 3.0
|
7 |
+
|
8 |
+
1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
|
9 |
+
|
10 |
+
1. to reproduce the Original Work in copies, either alone or as part of a collective work;
|
11 |
+
|
12 |
+
2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
|
13 |
+
|
14 |
+
3. to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License;
|
15 |
+
|
16 |
+
4. to perform the Original Work publicly; and
|
17 |
+
|
18 |
+
5. to display the Original Work publicly.
|
19 |
+
|
20 |
+
2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
|
21 |
+
|
22 |
+
3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
|
23 |
+
|
24 |
+
4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
|
25 |
+
|
26 |
+
5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
|
27 |
+
|
28 |
+
6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
|
29 |
+
|
30 |
+
7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
|
31 |
+
|
32 |
+
8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
|
33 |
+
|
34 |
+
9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
|
35 |
+
|
36 |
+
10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
|
37 |
+
|
38 |
+
11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
|
39 |
+
|
40 |
+
12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
|
41 |
+
|
42 |
+
13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
|
43 |
+
|
44 |
+
14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
45 |
+
|
46 |
+
15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
|
47 |
+
|
48 |
+
16. Modification of This License. This License is Copyright � 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
|
RELEASE_NOTES.txt
ADDED
@@ -0,0 +1,6249 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
==== 1.6.1.0 ====
|
2 |
+
|
3 |
+
=== Major Highlights ===
|
4 |
+
Added two-step password reset flow
|
5 |
+
|
6 |
+
=== Improvements ===
|
7 |
+
XmlConnect package release v22.0
|
8 |
+
Added support for using Shift-Click to select a range of grid rows when clicking check boxes
|
9 |
+
Added ability to register during checkout when using PayPal Express
|
10 |
+
Updated PayflowLink HSS user interface in checkout
|
11 |
+
"Add to Wishlist", "Add to Compare" were added on the Product Details Page for configurable, bundled and downloadable products
|
12 |
+
Updated webservices API
|
13 |
+
|
14 |
+
=== Changes ===
|
15 |
+
TheFind integration was removed
|
16 |
+
Google Optimizer was removed (it will be supported as a core extension)
|
17 |
+
Improved how discounts are applied to sub products
|
18 |
+
|
19 |
+
=== Fixes ===
|
20 |
+
Fixed Incorrect tax summary if taxes applied has different priorities
|
21 |
+
Fixed Shipping method extension after disable module returns error
|
22 |
+
Fixed Approved Review of a product is not displayed in the catalog
|
23 |
+
Fixed Special price is not considered for bundle dynamic products in "Your Customization" block
|
24 |
+
Fixed Incorrect behavior of changing quantity for composite products in Wishlist tab of customer's page in backend
|
25 |
+
Fixed MAP: Exc. Tax. amount is not shown on product's page when set apply map = 'On Gesture'
|
26 |
+
Fixed There has been an error processing your request is displayed by searching in Manage Checkout Terms and Conditions
|
27 |
+
Fixed Button Reorder is absent when Order contains Configurable product
|
28 |
+
Fixed Unable to place order if several tax rates with different priorities applied to bundle product
|
29 |
+
Fixed Incorrect Tracking Request to shipping carrier (in case with FedEx)
|
30 |
+
Fixed 'Click for price' not clickable after pressing 'Review' link in category
|
31 |
+
Fixed XML Connect: Impossible to submit application
|
32 |
+
Fixed MAP: with IE8 JS error appears in catalog
|
33 |
+
Fixed Error message appears after successful checkout with PayPal Express Checkout on IE9
|
34 |
+
Fixed Incorrect invoice document creation behaviour for bundle dynamic product
|
35 |
+
Fixed XML Connect: Impossible to save template
|
36 |
+
Fixed Wrong focusing in WYSIWYG on IE9, impossible to save data after inserting content
|
37 |
+
Fixed Unable to set zero price for item in bundle product
|
38 |
+
Fixed Incorrect tax summary if several tax rates with different priorities applied to bundle product
|
39 |
+
Fixed Unable to create order from backend if Tax Calculation Method Based On = Unit Price/Row Total
|
40 |
+
Fixed Incorrect Tracking Request to shipping carrier (in case with FedEx)
|
41 |
+
Fixed Incorrect tax summary for partial documents if Tax Calculation Method Based On = Row Total/Unit Price
|
42 |
+
Fixed Problems with partial authorization process (Authorize.net) during Admin Order creation
|
43 |
+
Fixed Incorrect HTML markup of Installer page in IE7 and IE9
|
44 |
+
Fixed "Apply Rules" button works incorrect in some cases
|
45 |
+
Fixed Incorrect behavior of changing quantity for composite products in Wishlist tab of customer's page in backend
|
46 |
+
Fixed Incorrect tax summary if product prices exclude tax
|
47 |
+
Fixed Redirect to blank page, when click Add Wishlist on the Bundle product page
|
48 |
+
Fixed Reviews not showing in category list page
|
49 |
+
Fixed QTY is wrong calculated for Bundle, Virtual, Simple, Configurable, Downloadable products after editing them in wishlist
|
50 |
+
Fixed Customer is redirected to shopping cart page instead to the "Ship to Multiple Addresses" page after login or register as a new customer
|
51 |
+
Fixed Configurable product with selected option is deleted from wishlist after updating another configurable product
|
52 |
+
Fixed After redirecting to product using tag 'click for price' doesn't work
|
53 |
+
Fixed "Notify for Quantity Below" doesn't work
|
54 |
+
Fixed Pending Reviews RSS doesn't show reviews, created for products, that are assigned not to Main Website
|
55 |
+
Fixed Authorize Direct Post: no successful notification about place order if do 'Edit' or 'Reorder'
|
56 |
+
Fixed Impossible to place Order with Payfowlink when Payment Action = Sale
|
57 |
+
Fixed Poll shows incorrect percentage
|
58 |
+
Fixed Message 'Cannot specify wishlist item.' is displayed by configuring products in wishlist in back-end
|
59 |
+
Fixed Billing Agreements: Order status is not updated if do actions from sandbox PayPal account
|
60 |
+
Fixed Additional authorization transaction is not displayed in Order's Transactions tab
|
61 |
+
Fixed Unable to update already created role by Admin
|
62 |
+
Fixed CDN Secure URL is used instead of non-secure
|
63 |
+
Fixed Attributes name disappeared during sorting
|
64 |
+
Fixed Typo in app/design/adminhtml/default/default/template/paypal/system/config/payflowlink/info.phtml
|
65 |
+
Fixed Report of Reviews shows all customer reviews when select certain user
|
66 |
+
Fixed Address Line Formats Incorrectly on PDF Invoices
|
67 |
+
Fixed Can't search transactions by order_id in manager.paypal.com
|
68 |
+
Fixed Wishlist Index Controller does unneeded logging of exception
|
69 |
+
Fixed Incorrect SQL generated in review product collection resource
|
70 |
+
Fixed Added shipping address rates collecting schedule for shipping method when shipping information step bypassed
|
71 |
+
Fixed Customer marked as guest in "Newsletter Subscribers" grid, after subscribing to newsletters in Google Checkout
|
72 |
+
Fixed Error is displayed by unchecking "Same As Billing Address" by creating order in admin
|
73 |
+
Fixed Tooltip doesn't appear if you put mouse pointer in to disabled package type field (in case with USPS Domestic)
|
74 |
+
Fixed Unable to select custom theme with underscores in name when creating a widget instance
|
75 |
+
Fixed When Redirect to Shopping Cart = No, choosing Remove item from shopping cart sidebar while editing an item leads to endless redirect loop
|
76 |
+
Fixed Saved CC form is not displayed, when there are no other available payment methods except Saved CC
|
77 |
+
Fixed It's impossible to create Catalog Price Rule
|
78 |
+
Fixed Fatal error on Multiple Addresses Checkout
|
79 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
80 |
+
Fixed Stock item product getter not correspond to product setter
|
81 |
+
- added method getProduct()
|
82 |
+
Fixed Admin user interface: mistakes in labels names
|
83 |
+
Fixed Typo in Mage_Eav_Model_Resource_Entity_Attribute_Option model
|
84 |
+
Fixed Billing Agreement error
|
85 |
+
Fixed Payflow Link UI Changes
|
86 |
+
Fixed 'Website Payments Pro' impossible to place order during onepage checkout
|
87 |
+
Fixed Table rates works incorrect with asterisk
|
88 |
+
Fixed Typo in Category Resource Model
|
89 |
+
Fixed 3D secure with Saved CC works incorrectly
|
90 |
+
- removed unrelated message which told validation failed (even if it has actually succeeded) when trying to re-validate a card
|
91 |
+
Fixed Bug in Role Permission
|
92 |
+
Fixed Orders placed via Google Checkout were not created on the Magento side
|
93 |
+
Fixed When using direct Export, the _super_product_sku and _super_product_option on the configurable product does not match
|
94 |
+
Fixed Composite product price in grid is displayed incorrectly with some currencies due to JS regexp problem
|
95 |
+
Fixed No error message on Payflow link iframe
|
96 |
+
Fixed Flex uploader elements overlaps hovering menu items in backend
|
97 |
+
Fixed Unable to upload images in Magento installed on local server
|
98 |
+
Fixed Configurable Products - Use Default (attribute name) does not work correctly on IE9
|
99 |
+
Fixed Capture failed when Verification Authorization Amount is set to Zero
|
100 |
+
Fixed Attribute is sorted like a string even when Input Validation for Store Owner is an Integer Number
|
101 |
+
Fixed Void and Cancel Order doesn't work (PayflowLink HSS)
|
102 |
+
Fixed Grand Total (Excl Tax) with negative value displays in the printed Credit Memo
|
103 |
+
Fixed Resource model of Media module is wrongly declared
|
104 |
+
Fixed Constraint violation with core_cache_tag table
|
105 |
+
Fixed Misprint in \downloader\lib\Mage\Connect\Validator.php
|
106 |
+
Fixed XMLRPC API attribute status changing
|
107 |
+
Fixed Typo in Mage_Rss_Block_Catalog_Category::_toHtml() method
|
108 |
+
Fixed Incorrect tax summary for partial credit memos/invoices
|
109 |
+
Fixed SSL is not used for links in email templates when admin area is configured to use HTTPS
|
110 |
+
Fixed Incorrect style on product page
|
111 |
+
Fixed Error is displayed by editing product or by creating product on back-end in IE8
|
112 |
+
Fixed Catalog price rules for composite products changes
|
113 |
+
Fixed Moving modules to the correct place
|
114 |
+
Fixed Wishlist shows items per store scope, not website
|
115 |
+
Fixed Products in Wishlist disappears, when Store View is changed
|
116 |
+
Fixed Wrong Comments History in notification of order creation/cancellation
|
117 |
+
Fixed In AJAX popup fields "From" and "To" have behavior as mandatory fields
|
118 |
+
Fixed Filter by Allow Countries not working for Customer Address Form in the Backend
|
119 |
+
Fixed Product price lower than 0 (after catalog price rule applying)
|
120 |
+
Fixed Google Checkout throws error if Zip Range is used for Tax Rate
|
121 |
+
- changed part of XML request to Google responsible for postal codes
|
122 |
+
- made changes to correctly fetch tax rules for postal code ranges
|
123 |
+
Fixed Website config object is not being cached
|
124 |
+
Fixed Select groups in grid view doesn't work under IE7
|
125 |
+
Fixed No products name in Popular tags report file .csv
|
126 |
+
Fixed Qty Increments should work when it was defined in the default scope configuration
|
127 |
+
Fixed Products in catalog displays as "out of stock"
|
128 |
+
Fixed "Get help for this page" in each tab under System->Configuration links to the same help page
|
129 |
+
Fixed Unable to translate submenu
|
130 |
+
Fixed Redirect to main page of front-end during deleting Product Tax Class which is used in Tax Rule
|
131 |
+
Fixed Redirect to base URL should consider full request URI string
|
132 |
+
Fixed Incorrect transparency of PNG image in indexed non-alpha mode
|
133 |
+
Fixed Problem of generation URL between different domains
|
134 |
+
Fixed There are no server side validation of first character of Attribute Code (it should be letter)
|
135 |
+
Fixed Edit Order without creating new one functionality saves invalid changes in non-default customer address attributes
|
136 |
+
Fixed Frontend: If second customer logs in and does not select the "Remember Me" then the previous long-term cookie does not removes
|
137 |
+
Fixed Admin can Reorder order with status On Hold
|
138 |
+
Fixed Frontend: After new customer registration with "Remember Me" and pressing "Logout" the long-term cookie session doesn't apply if in configuration on backend ""Remember Me" Default Value" - No
|
139 |
+
Fixed Tax not displaying on PayPal side for Express orders
|
140 |
+
Fixed Wishlist: Not configured grouped product has unneeded link "Show Details"
|
141 |
+
Fixed Removed the ability to work with customise admin url through the parameter base_url
|
142 |
+
Fixed Roles not displaying selected resources
|
143 |
+
Fixed Unable to use Import when compiler is enabled
|
144 |
+
Fixed Missing Translation Capability in Transactional Email Variable
|
145 |
+
Fixed productConfigure is undefined error is occurred during creation Order in Backend in IE8 browser
|
146 |
+
Fixed Zend Full Page Cache. Lifetime of the cookie is not equal to specified on "Cookie Lifetime" field
|
147 |
+
Fixed Incorrect price values for Bundle Product
|
148 |
+
Fixed Link does not pass validation if ends with .html
|
149 |
+
Fixed Incorrect Customs Value in Create Packages in case when price value contains decimals
|
150 |
+
Fixed Incorrect reports with updated_at filter
|
151 |
+
Fixed paypal_payment_transaction_clean job takes credentials form default config instead of website for Payflow Link
|
152 |
+
Fixed Wrong schedule time setup for paypal_payment_transaction_clean job for Payflow Link
|
153 |
+
Fixed Backend Error message "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'qwe' for key 2" appears after saving new Email Template with existing name
|
154 |
+
Fixed Rule Conditions logic
|
155 |
+
Fixed Error appears after Customer Group saving with name length more than 32
|
156 |
+
Fixed Category product index run time
|
157 |
+
Fixed Sidebar cart is missing composite product options on category page
|
158 |
+
Fixed Missed validation for space character at the begin of unique fields
|
159 |
+
- improved validation of Attribute Set Name and validation of unique fields in Mage_Core_Model_Resource_Db_Abstract class
|
160 |
+
Fixed Ability to input uppercase, space, specials symbols in Order Status Code
|
161 |
+
Fixed Filter by Allow Countries not working for Customer Address Form in the Backend
|
162 |
+
Fixed No ability to create Shipping Label with "plus-four codes" Zip Code (in case with USPS Domestic)
|
163 |
+
Fixed Changing language twice -> Error 404
|
164 |
+
Fixed The sort order in products page doesn't work
|
165 |
+
Fixed When a grouped product with configured price=0 is added to the wishlist and shared, adding the product to the cart leads to 404 error
|
166 |
+
Fixed Media Saves Incorrect Cached Config
|
167 |
+
- added options that disallow saving cache
|
168 |
+
Fixed Bundle Product items shows randomly instead of according to option
|
169 |
+
Fixed Ajax loader does not appears after click on Verify Card on Payflow Link
|
170 |
+
Fixed "Google Checkout - Carrier" in Magento backend as shipping method rather than the actual shipping method chosen
|
171 |
+
Fixed JavaScript error appears in checkout because of PSC after press 'Proceed to Checkout'
|
172 |
+
Fixed Admin user interface: mistakes in labels names
|
173 |
+
Fixed Problems with grid sorting on edit customer backend page
|
174 |
+
Fixed It is possible to change the price of the Bundle product from fixed to the dynamic at my store
|
175 |
+
Fixed Set special price via Catalog Product API is not working
|
176 |
+
Fixed Price is wrong calculated for bundle product with a zero price for its items on product details page
|
177 |
+
- subitem price calculation were fixed
|
178 |
+
Fixed Layout issue appears in IE9 on the grids (example Customers)
|
179 |
+
Fixed Impossible to press 'Continue' button to place in onepage
|
180 |
+
Fixed "Add to Wishlist", "Add to Compare" aren't presented for Configurable, bundle, downloadable, simple products on Product Details Page
|
181 |
+
Fixed Register during checkout with PayPal Express Checkout
|
182 |
+
Fixed Extension Packager does not read recursive directory if include expression use file mask
|
183 |
+
Fixed Newsletter Subscription Confirmation Message
|
184 |
+
Fixed Discount is wrong calculated for Shopping Cart Price Rules when some of them created with Coupon and another without Coupon
|
185 |
+
Fixed Subtotal (Incl.Tax) on invoices must not include tax applied to shipping amount
|
186 |
+
- shippingTax amount were excluded from subTotal value
|
187 |
+
Fixed "Maximum shipping amount allowed to refund" message shows amount excl. tax if Display Shipping Amount set to Including Tax
|
188 |
+
- adjusted function to include tax into allowed amount for shipping refund
|
189 |
+
Fixed Display Out of Stock Products must not be considered during admin order creation
|
190 |
+
Fixed Check box is not working correctly under "prices" of the Bundle products
|
191 |
+
Fixed CSS class missing
|
192 |
+
Fixed Frontend: JavaScript error appears if user registered on Checkout Page
|
193 |
+
Fixed Website config object is not being cached
|
194 |
+
- added functionality for memcache backend to split down data that is larger than slab size into chunks
|
195 |
+
Fixed Removed the ability to work with base_url
|
196 |
+
Fixed Custom design should be updated via import functionality
|
197 |
+
Fixed JS error during onepage checkout
|
198 |
+
Fixed Unable to translate "First name" and "Last name" fields on "Create an Account" page
|
199 |
+
Fixed After upgrading dashboard "Top 5 Search Terms" grid doesn't show search terms
|
200 |
+
|
201 |
+
|
202 |
+
|
203 |
+
==== 1.6.1.0-rc1 ====
|
204 |
+
|
205 |
+
=== Major Highlights ===
|
206 |
+
Added two-step password reset flow
|
207 |
+
|
208 |
+
=== Improvements ===
|
209 |
+
XmlConnect package release v22.0
|
210 |
+
Added support for using Shift-Click to select a range of grid rows when clicking check boxes
|
211 |
+
Added ability to register during checkout when using PayPal Express
|
212 |
+
Updated PayflowLink HSS user interface in checkout
|
213 |
+
"Add to Wishlist", "Add to Compare" were added on the Product Details Page for configurable, bundled and downloadable products
|
214 |
+
|
215 |
+
=== Changes ===
|
216 |
+
TheFind integration was removed
|
217 |
+
Google Optimizer was removed (it will be supported as a core extension)
|
218 |
+
Improved how discounts are applied to sub products
|
219 |
+
|
220 |
+
=== Fixes ===
|
221 |
+
Fixed Incorrect behavior of changing quantity for composite products in Wishlist tab of customer's page in backend
|
222 |
+
Fixed Incorrect tax summary if product prices exclude tax
|
223 |
+
Fixed Redirect to blank page, when click Add Wishlist on the Bundle product page
|
224 |
+
Fixed Reviews not showing in category list page
|
225 |
+
Fixed QTY is wrong calculated for Bundle, Virtual, Simple, Configurable, Downloadable products after editing them in wishlist
|
226 |
+
Fixed Customer is redirected to shopping cart page instead to the "Ship to Multiple Addresses" page after login or register as a new customer
|
227 |
+
Fixed Configurable product with selected option is deleted from wishlist after updating another configurable product
|
228 |
+
Fixed After redirecting to product using tag 'click for price' doesn't work
|
229 |
+
Fixed "Notify for Quantity Below" doesn't work
|
230 |
+
Fixed Pending Reviews RSS doesn't show reviews, created for products, that are assigned not to Main Website
|
231 |
+
Fixed Authorize Direct Post: no successful notification about place order if do 'Edit' or 'Reorder'
|
232 |
+
Fixed Impossible to place Order with Payfowlink when Payment Action = Sale
|
233 |
+
Fixed Poll shows incorrect percentage
|
234 |
+
Fixed Message 'Cannot specify wishlist item.' is displayed by configuring products in wishlist in back-end
|
235 |
+
Fixed Billing Agreements: Order status is not updated if do actions from sandbox PayPal account
|
236 |
+
Fixed Additional authorization transaction is not displayed in Order's Transactions tab
|
237 |
+
Fixed Unable to update already created role by Admin
|
238 |
+
Fixed CDN Secure URL is used instead of non-secure
|
239 |
+
Fixed Attributes name disappeared during sorting
|
240 |
+
Fixed Typo in app/design/adminhtml/default/default/template/paypal/system/config/payflowlink/info.phtml
|
241 |
+
Fixed Report of Reviews shows all customer reviews when select certain user
|
242 |
+
Fixed Address Line Formats Incorrectly on PDF Invoices
|
243 |
+
Fixed Can't search transactions by order_id in manager.paypal.com
|
244 |
+
Fixed Wishlist Index Controller does unneeded logging of exception
|
245 |
+
Fixed Incorrect SQL generated in review product collection resource
|
246 |
+
Fixed Added shipping address rates collecting schedule for shipping method when shipping information step bypassed
|
247 |
+
Fixed Customer marked as guest in "Newsletter Subscribers" grid, after subscribing to newsletters in Google Checkout
|
248 |
+
Fixed Error is displayed by unchecking "Same As Billing Address" by creating order in admin
|
249 |
+
Fixed Tooltip doesn't appear if you put mouse pointer in to disabled package type field (in case with USPS Domestic)
|
250 |
+
Fixed Unable to select custom theme with underscores in name when creating a widget instance
|
251 |
+
Fixed When Redirect to Shopping Cart = No, choosing Remove item from shopping cart sidebar while editing an item leads to endless redirect loop
|
252 |
+
Fixed Saved CC form is not displayed, when there are no other available payment methods except Saved CC
|
253 |
+
Fixed It's impossible to create Catalog Price Rule
|
254 |
+
Fixed Fatal error on Multiple Addresses Checkout
|
255 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
256 |
+
Fixed Stock item product getter not correspond to product setter
|
257 |
+
- added method getProduct()
|
258 |
+
Fixed Admin user interface: mistakes in labels names
|
259 |
+
Fixed Typo in Mage_Eav_Model_Resource_Entity_Attribute_Option model
|
260 |
+
Fixed Billing Agreement error
|
261 |
+
Fixed Payflow Link UI Changes
|
262 |
+
Fixed 'Website Payments Pro' impossible to place order during onepage checkout
|
263 |
+
Fixed Table rates works incorrect with asterisk
|
264 |
+
Fixed Typo in Category Resource Model
|
265 |
+
Fixed 3D secure with Saved CC works incorrectly
|
266 |
+
- removed unrelated message which told validation failed (even if it has actually succeeded) when trying to re-validate a card
|
267 |
+
Fixed Bug in Role Permission
|
268 |
+
Fixed Orders placed via Google Checkout were not created on the Magento side
|
269 |
+
Fixed When using direct Export, the _super_product_sku and _super_product_option on the configurable product does not match
|
270 |
+
Fixed Composite product price in grid is displayed incorrectly with some currencies due to JS regexp problem
|
271 |
+
Fixed No error message on Payflow link iframe
|
272 |
+
Fixed Flex uploader elements overlaps hovering menu items in backend
|
273 |
+
Fixed Unable to upload images in Magento installed on local server
|
274 |
+
Fixed Configurable Products - Use Default (attribute name) does not work correctly on IE9
|
275 |
+
Fixed Capture failed when Verification Authorization Amount is set to Zero
|
276 |
+
Fixed Attribute is sorted like a string even when Input Validation for Store Owner is an Integer Number
|
277 |
+
Fixed Void and Cancel Order doesn't work (PayflowLink HSS)
|
278 |
+
Fixed Grand Total (Excl Tax) with negative value displays in the printed Credit Memo
|
279 |
+
Fixed Resource model of Media module is wrongly declared
|
280 |
+
Fixed Constraint violation with core_cache_tag table
|
281 |
+
Fixed Misprint in \downloader\lib\Mage\Connect\Validator.php
|
282 |
+
Fixed XMLRPC API attribute status changing
|
283 |
+
Fixed Typo in Mage_Rss_Block_Catalog_Category::_toHtml() method
|
284 |
+
Fixed Incorrect tax summary for partial credit memos/invoices
|
285 |
+
Fixed SSL is not used for links in email templates when admin area is configured to use HTTPS
|
286 |
+
Fixed Incorrect style on product page
|
287 |
+
Fixed Error is displayed by editing product or by creating product on back-end in IE8
|
288 |
+
Fixed Catalog price rules for composite products changes
|
289 |
+
Fixed Moving modules to the correct place
|
290 |
+
Fixed Wishlist shows items per store scope, not website
|
291 |
+
Fixed Products in Wishlist disappears, when Store View is changed
|
292 |
+
Fixed Wrong Comments History in notification of order creation/cancellation
|
293 |
+
Fixed In AJAX popup fields "From" and "To" have behavior as mandatory fields
|
294 |
+
Fixed Filter by Allow Countries not working for Customer Address Form in the Backend
|
295 |
+
Fixed Product price lower than 0 (after catalog price rule applying)
|
296 |
+
Fixed Google Checkout throws error if Zip Range is used for Tax Rate
|
297 |
+
- changed part of XML request to Google responsible for postal codes
|
298 |
+
- made changes to correctly fetch tax rules for postal code ranges
|
299 |
+
Fixed Website config object is not being cached
|
300 |
+
Fixed Select groups in grid view doesn't work under IE7
|
301 |
+
Fixed No products name in Popular tags report file .csv
|
302 |
+
Fixed Qty Increments should work when it was defined in the default scope configuration
|
303 |
+
Fixed Products in catalog displays as "out of stock"
|
304 |
+
Fixed "Get help for this page" in each tab under System->Configuration links to the same help page
|
305 |
+
Fixed Unable to translate submenu
|
306 |
+
Fixed Redirect to main page of front-end during deleting Product Tax Class which is used in Tax Rule
|
307 |
+
Fixed Redirect to base URL should consider full request URI string
|
308 |
+
Fixed Incorrect transparency of PNG image in indexed non-alpha mode
|
309 |
+
Fixed Problem of generation URL between different domains
|
310 |
+
Fixed There are no server side validation of first character of Attribute Code (it should be letter)
|
311 |
+
Fixed Edit Order without creating new one functionality saves invalid changes in non-default customer address attributes
|
312 |
+
Fixed Frontend: If second customer logs in and does not select the "Remember Me" then the previous long-term cookie does not removes
|
313 |
+
Fixed Admin can Reorder order with status On Hold
|
314 |
+
Fixed Frontend: After new customer registration with "Remember Me" and pressing "Logout" the long-term cookie session doesn't apply if in configuration on backend ""Remember Me" Default Value" - No
|
315 |
+
Fixed Tax not displaying on PayPal side for Express orders
|
316 |
+
Fixed Wishlist: Not configured grouped product has unneeded link "Show Details"
|
317 |
+
Fixed Removed the ability to work with customise admin url through the parameter base_url
|
318 |
+
Fixed Roles not displaying selected resources
|
319 |
+
Fixed Unable to use Import when compiler is enabled
|
320 |
+
Fixed Missing Translation Capability in Transactional Email Variable
|
321 |
+
Fixed productConfigure is undefined error is occurred during creation Order in Backend in IE8 browser
|
322 |
+
Fixed Zend Full Page Cache. Lifetime of the cookie is not equal to specified on "Cookie Lifetime" field
|
323 |
+
Fixed Incorrect price values for Bundle Product
|
324 |
+
Fixed Link does not pass validation if ends with .html
|
325 |
+
Fixed Incorrect Customs Value in Create Packages in case when price value contains decimals
|
326 |
+
Fixed Incorrect reports with updated_at filter
|
327 |
+
Fixed paypal_payment_transaction_clean job takes credentials form default config instead of website for Payflow Link
|
328 |
+
Fixed Wrong schedule time setup for paypal_payment_transaction_clean job for Payflow Link
|
329 |
+
Fixed Backend Error message "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'qwe' for key 2" appears after saving new Email Template with existing name
|
330 |
+
Fixed Rule Conditions logic
|
331 |
+
Fixed Error appears after Customer Group saving with name length more than 32
|
332 |
+
Fixed Category product index run time
|
333 |
+
Fixed Sidebar cart is missing composite product options on category page
|
334 |
+
Fixed Missed validation for space character at the begin of unique fields
|
335 |
+
- improved validation of Attribute Set Name and validation of unique fields in Mage_Core_Model_Resource_Db_Abstract class
|
336 |
+
Fixed Ability to input uppercase, space, specials symbols in Order Status Code
|
337 |
+
Fixed Filter by Allow Countries not working for Customer Address Form in the Backend
|
338 |
+
Fixed No ability to create Shipping Label with "plus-four codes" Zip Code (in case with USPS Domestic)
|
339 |
+
Fixed Changing language twice -> Error 404
|
340 |
+
Fixed The sort order in products page doesn't work
|
341 |
+
Fixed When a grouped product with configured price=0 is added to the wishlist and shared, adding the product to the cart leads to 404 error
|
342 |
+
Fixed Media Saves Incorrect Cached Config
|
343 |
+
- added options that disallow saving cache
|
344 |
+
Fixed Bundle Product items shows randomly instead of according to option
|
345 |
+
Fixed Ajax loader does not appears after click on Verify Card on Payflow Link
|
346 |
+
Fixed "Google Checkout - Carrier" in Magento backend as shipping method rather than the actual shipping method chosen
|
347 |
+
Fixed JavaScript error appears in checkout because of PSC after press 'Proceed to Checkout'
|
348 |
+
Fixed Admin user interface: mistakes in labels names
|
349 |
+
Fixed Problems with grid sorting on edit customer backend page
|
350 |
+
Fixed It is possible to change the price of the Bundle product from fixed to the dynamic at my store
|
351 |
+
Fixed Set special price via Catalog Product API is not working
|
352 |
+
Fixed Price is wrong calculated for bundle product with a zero price for its items on product details page
|
353 |
+
- subitem price calculation were fixed
|
354 |
+
Fixed Layout issue appears in IE9 on the grids (example Customers)
|
355 |
+
Fixed Impossible to press 'Continue' button to place in onepage
|
356 |
+
Fixed "Add to Wishlist", "Add to Compare" aren't presented for Configurable, bundle, downloadable, simple products on Product Details Page
|
357 |
+
Fixed Register during checkout with PayPal Express Checkout
|
358 |
+
Fixed Extension Packager does not read recursive directory if include expression use file mask
|
359 |
+
Fixed Newsletter Subscription Confirmation Message
|
360 |
+
Fixed Discount is wrong calculated for Shopping Cart Price Rules when some of them created with Coupon and another without Coupon
|
361 |
+
Fixed Subtotal (Incl.Tax) on invoices must not include tax applied to shipping amount
|
362 |
+
- shippingTax amount were excluded from subTotal value
|
363 |
+
Fixed "Maximum shipping amount allowed to refund" message shows amount excl. tax if Display Shipping Amount set to Including Tax
|
364 |
+
- adjusted function to include tax into allowed amount for shipping refund
|
365 |
+
Fixed Display Out of Stock Products must not be considered during admin order creation
|
366 |
+
Fixed Check box is not working correctly under "prices" of the Bundle products
|
367 |
+
Fixed CSS class missing
|
368 |
+
Fixed Frontend: JavaScript error appears if user registered on Checkout Page
|
369 |
+
Fixed Website config object is not being cached
|
370 |
+
- added functionality for memcache backend to split down data that is larger than slab size into chunks
|
371 |
+
Fixed Removed the ability to work with base_url
|
372 |
+
Fixed Custom design should be updated via import functionality
|
373 |
+
Fixed JS error during onepage checkout
|
374 |
+
Fixed Unable to translate "First name" and "Last name" fields on "Create an Account" page
|
375 |
+
Fixed After upgrading dashboard "Top 5 Search Terms" grid doesn't show search terms
|
376 |
+
|
377 |
+
|
378 |
+
|
379 |
+
==== 1.6.1.0-beta1 ====
|
380 |
+
|
381 |
+
=== Major Highlights ===
|
382 |
+
Added two-step password reset flow
|
383 |
+
|
384 |
+
=== Improvements ===
|
385 |
+
Added support for using Shift-Click to select a range of grid rows when clicking check boxes
|
386 |
+
Added ability to register during checkout when using PayPal Express
|
387 |
+
Updated PayflowLink HSS user interface in checkout
|
388 |
+
"Add to Wishlist", "Add to Compare" were added on the Product Details Page for configurable, bundled and downloadable products
|
389 |
+
|
390 |
+
=== Changes ===
|
391 |
+
TheFind integration was removed
|
392 |
+
Google Optimizer was removed (it will be supported as a core extension)
|
393 |
+
Improved how discounts are applied to sub products
|
394 |
+
|
395 |
+
=== Fixes ===
|
396 |
+
Fixed Saved CC form is not displayed, when there are no other available payment methods except Saved CC
|
397 |
+
Fixed It's impossible to create Catalog Price Rule
|
398 |
+
Fixed Fatal error on Multiple Addresses Checkout
|
399 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
400 |
+
Fixed Stock item product getter not correspond to product setter
|
401 |
+
- added method getProduct()
|
402 |
+
Fixed Admin user interface: mistakes in labels names
|
403 |
+
Fixed Typo in Mage_Eav_Model_Resource_Entity_Attribute_Option model
|
404 |
+
Fixed Billing Agreement error
|
405 |
+
Fixed Payflow Link UI Changes
|
406 |
+
Fixed 'Website Payments Pro' impossible to place order during onepage checkout
|
407 |
+
Fixed Table rates works incorrect with asterisk
|
408 |
+
Fixed Typo in Category Resource Model
|
409 |
+
Fixed 3D secure with Saved CC works incorrectly
|
410 |
+
- removed unrelated message which told validation failed (even if it has actually succeeded) when trying to re-validate a card
|
411 |
+
Fixed Bug in Role Permission
|
412 |
+
Fixed Orders placed via Google Checkout were not created on the Magento side
|
413 |
+
Fixed When using direct Export, the _super_product_sku and _super_product_option on the configurable product does not match
|
414 |
+
Fixed Composite product price in grid is displayed incorrectly with some currencies due to JS regexp problem
|
415 |
+
Fixed No error message on Payflow link iframe
|
416 |
+
Fixed Flex uploader elements overlaps hovering menu items in backend
|
417 |
+
Fixed Unable to upload images in Magento installed on local server
|
418 |
+
Fixed Configurable Products - Use Default (attribute name) does not work correctly on IE9
|
419 |
+
Fixed Capture failed when Verification Authorization Amount is set to Zero
|
420 |
+
Fixed Attribute is sorted like a string even when Input Validation for Store Owner is an Integer Number
|
421 |
+
Fixed Void and Cancel Order doesn't work (PayflowLink HSS)
|
422 |
+
Fixed Grand Total (Excl Tax) with negative value displays in the printed Credit Memo
|
423 |
+
Fixed Resource model of Media module is wrongly declared
|
424 |
+
Fixed Constraint violation with core_cache_tag table
|
425 |
+
Fixed Misprint in \downloader\lib\Mage\Connect\Validator.php
|
426 |
+
Fixed XMLRPC API attribute status changing
|
427 |
+
Fixed Typo in Mage_Rss_Block_Catalog_Category::_toHtml() method
|
428 |
+
Fixed Incorrect tax summary for partial credit memos/invoices
|
429 |
+
Fixed SSL is not used for links in email templates when admin area is configured to use HTTPS
|
430 |
+
Fixed Incorrect style on product page
|
431 |
+
Fixed Error is displayed by editing product or by creating product on back-end in IE8
|
432 |
+
Fixed Catalog price rules for composite products changes
|
433 |
+
Fixed Moving modules to the correct place
|
434 |
+
Fixed Wishlist shows items per store scope, not website
|
435 |
+
Fixed Products in Wishlist disappears, when Store View is changed
|
436 |
+
Fixed Wrong Comments History in notification of order creation/cancellation
|
437 |
+
Fixed In AJAX popup fields "From" and "To" have behavior as mandatory fields
|
438 |
+
Fixed Filter by Allow Countries not working for Customer Address Form in the Backend
|
439 |
+
Fixed Product price lower than 0 (after catalog price rule applying)
|
440 |
+
Fixed Google Checkout throws error if Zip Range is used for Tax Rate
|
441 |
+
- changed part of XML request to Google responsible for postal codes
|
442 |
+
- made changes to correctly fetch tax rules for postal code ranges
|
443 |
+
Fixed Website config object is not being cached
|
444 |
+
Fixed Select groups in grid view doesn't work under IE7
|
445 |
+
Fixed No products name in Popular tags report file .csv
|
446 |
+
Fixed Qty Increments should work when it was defined in the default scope configuration
|
447 |
+
Fixed Products in catalog displays as "out of stock"
|
448 |
+
Fixed "Get help for this page" in each tab under System->Configuration links to the same help page
|
449 |
+
Fixed Unable to translate submenu
|
450 |
+
Fixed Redirect to main page of front-end during deleting Product Tax Class which is used in Tax Rule
|
451 |
+
Fixed Redirect to base URL should consider full request URI string
|
452 |
+
Fixed Incorrect transparency of PNG image in indexed non-alpha mode
|
453 |
+
Fixed Problem of generation URL between different domains
|
454 |
+
Fixed There are no server side validation of first character of Attribute Code (it should be letter)
|
455 |
+
Fixed Edit Order without creating new one functionality saves invalid changes in non-default customer address attributes
|
456 |
+
Fixed Frontend: If second customer logs in and does not select the "Remember Me" then the previous long-term cookie does not removes
|
457 |
+
Fixed Admin can Reorder order with status On Hold
|
458 |
+
Fixed Frontend: After new customer registration with "Remember Me" and pressing "Logout" the long-term cookie session doesn't apply if in configuration on backend ""Remember Me" Default Value" - No
|
459 |
+
Fixed Tax not displaying on PayPal side for Express orders
|
460 |
+
Fixed Wishlist: Not configured grouped product has unneeded link "Show Details"
|
461 |
+
Fixed Removed the ability to work with customise admin url through the parameter base_url
|
462 |
+
Fixed Roles not displaying selected resources
|
463 |
+
Fixed Unable to use Import when compiler is enabled
|
464 |
+
Fixed Missing Translation Capability in Transactional Email Variable
|
465 |
+
Fixed productConfigure is undefined error is occurred during creation Order in Backend in IE8 browser
|
466 |
+
Fixed Zend Full Page Cache. Lifetime of the cookie is not equal to specified on "Cookie Lifetime" field
|
467 |
+
Fixed Incorrect price values for Bundle Product
|
468 |
+
Fixed Link does not pass validation if ends with .html
|
469 |
+
Fixed Incorrect Customs Value in Create Packages in case when price value contains decimals
|
470 |
+
Fixed Incorrect reports with updated_at filter
|
471 |
+
Fixed paypal_payment_transaction_clean job takes credentials form default config instead of website for Payflow Link
|
472 |
+
Fixed Wrong schedule time setup for paypal_payment_transaction_clean job for Payflow Link
|
473 |
+
Fixed Backend Error message "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'qwe' for key 2" appears after saving new Email Template with existing name
|
474 |
+
Fixed Rule Conditions logic
|
475 |
+
Fixed Error appears after Customer Group saving with name length more than 32
|
476 |
+
Fixed Category product index run time
|
477 |
+
Fixed Sidebar cart is missing composite product options on category page
|
478 |
+
Fixed Missed validation for space character at the begin of unique fields
|
479 |
+
- improved validation of Attribute Set Name and validation of unique fields in Mage_Core_Model_Resource_Db_Abstract class
|
480 |
+
Fixed Ability to input uppercase, space, specials symbols in Order Status Code
|
481 |
+
Fixed Filter by Allow Countries not working for Customer Address Form in the Backend
|
482 |
+
Fixed No ability to create Shipping Label with "plus-four codes" Zip Code (in case with USPS Domestic)
|
483 |
+
Fixed Changing language twice -> Error 404
|
484 |
+
Fixed The sort order in products page doesn't work
|
485 |
+
Fixed When a grouped product with configured price=0 is added to the wishlist and shared, adding the product to the cart leads to 404 error
|
486 |
+
Fixed Media Saves Incorrect Cached Config
|
487 |
+
- added options that disallow saving cache
|
488 |
+
Fixed Bundle Product items shows randomly instead of according to option
|
489 |
+
Fixed Unable to place order with Payflow Link if store credit or reward point applied
|
490 |
+
Fixed Ajax loader does not appears after click on Verify Card on Payflow Link
|
491 |
+
Fixed "Google Checkout - Carrier" in Magento backend as shipping method rather than the actual shipping method chosen
|
492 |
+
Fixed JavaScript error appears in checkout because of PSC after press 'Proceed to Checkout'
|
493 |
+
Fixed Admin user interface: mistakes in labels names
|
494 |
+
Fixed Problems with grid sorting on edit customer backend page
|
495 |
+
Fixed It is possible to change the price of the Bundle product from fixed to the dynamic at my store
|
496 |
+
Fixed Set special price via Catalog Product API is not working
|
497 |
+
Fixed Price is wrong calculated for bundle product with a zero price for its items on product details page
|
498 |
+
- subitem price calculation were fixed
|
499 |
+
Fixed Layout issue appears in IE9 on the grids (example Customers)
|
500 |
+
Fixed Impossible to press 'Continue' button to place in onepage
|
501 |
+
Fixed "Add to Wishlist", "Add to Compare" aren't presented for Configurable, bundle, downloadable, simple products on Product Details Page
|
502 |
+
Fixed Register during checkout with PayPal Express Checkout
|
503 |
+
Fixed Extension Packager does not read recursive directory if include expression use file mask
|
504 |
+
Fixed Newsletter Subscription Confirmation Message
|
505 |
+
Fixed Discount is wrong calculated for Shopping Cart Price Rules when some of them created with Coupon and another without Coupon
|
506 |
+
Fixed Subtotal (Incl.Tax) on invoices must not include tax applied to shipping amount
|
507 |
+
- shippingTax amount were excluded from subTotal value
|
508 |
+
Fixed "Maximum shipping amount allowed to refund" message shows amount excl. tax if Display Shipping Amount set to Including Tax
|
509 |
+
- adjusted function to include tax into allowed amount for shipping refund
|
510 |
+
Fixed Display Out of Stock Products must not be considered during admin order creation
|
511 |
+
Fixed Check box is not working correctly under "prices" of the Bundle products.
|
512 |
+
Fixed CSS class missing
|
513 |
+
Fixed Frontend: JavaScript error appears if user registered on Checkout Page
|
514 |
+
Fixed Website config object is not being cached
|
515 |
+
- added functionality for memcache backend to split down data that is larger than slab size into chunks
|
516 |
+
Fixed Removed the ability to work with base_url
|
517 |
+
Fixed Custom design should be updated via import functionality
|
518 |
+
Fixed JS error during onepage checkout
|
519 |
+
Fixed Unable to translate "First name" and "Last name" fields on "Create an Account" page
|
520 |
+
Fixed After upgrading dashboard "Top 5 Search Terms" grid doesn't show search terms
|
521 |
+
|
522 |
+
|
523 |
+
|
524 |
+
==== 1.6.1.0-alpha1 ====
|
525 |
+
|
526 |
+
=== Major Highlights ===
|
527 |
+
Added two-step password reset flow
|
528 |
+
|
529 |
+
=== Improvements ===
|
530 |
+
Added support for using Shift-Click to select a range of grid rows when clicking check boxes
|
531 |
+
Added ability to register during checkout when using PayPal Express
|
532 |
+
Updated PayflowLink HSS user interface in checkout
|
533 |
+
"Add to Wishlist", "Add to Compare" were added on the Product Details Page for configurable, bundled and downloadable products
|
534 |
+
|
535 |
+
=== Changes ===
|
536 |
+
TheFind integration was removed
|
537 |
+
Google Optimizer was removed (it will be supported as a core extension)
|
538 |
+
Improved how discounts are applied to sub products
|
539 |
+
|
540 |
+
=== Fixes ===
|
541 |
+
Fixed When using direct Export, the _super_product_sku and _super_product_option on the configurable product does not match
|
542 |
+
Fixed Composite product price in grid is displayed incorrectly with some currencies due to JS regexp problem
|
543 |
+
Fixed No error message on Payflow link iframe
|
544 |
+
Fixed Flex uploader elements overlaps hovering menu items in backend
|
545 |
+
Fixed Unable to upload images in Magento installed on local server
|
546 |
+
Fixed Configurable Products - Use Default (attribute name) does not work correctly on IE9
|
547 |
+
Fixed Capture failed when Verification Authorization Amount is set to Zero
|
548 |
+
Fixed Attribute is sorted like a string even when Input Validation for Store Owner is an Integer Number
|
549 |
+
Fixed Void and Cancel Order doesn't work (PayflowLink HSS)
|
550 |
+
Fixed Grand Total (Excl Tax) with negative value displays in the printed Credit Memo
|
551 |
+
Fixed Resource model of Media module is wrongly declared
|
552 |
+
Fixed Constraint violation with core_cache_tag table
|
553 |
+
Fixed Misprint in \downloader\lib\Mage\Connect\Validator.php
|
554 |
+
Fixed XMLRPC API attribute status changing
|
555 |
+
Fixed Typo in Mage_Rss_Block_Catalog_Category::_toHtml() method
|
556 |
+
Fixed Incorrect tax summary for partial credit memos/invoices
|
557 |
+
Fixed SSL is not used for links in email templates when admin area is configured to use HTTPS
|
558 |
+
Fixed Incorrect style on product page
|
559 |
+
Fixed Error is displayed by editing product or by creating product on back-end in IE8
|
560 |
+
Fixed Catalog price rules for composite products changes
|
561 |
+
Fixed Moving modules to the correct place
|
562 |
+
Fixed Wishlist shows items per store scope, not website
|
563 |
+
Fixed Products in Wishlist disappears, when Store View is changed
|
564 |
+
Fixed Wrong Comments History in notification of order creation/cancellation
|
565 |
+
Fixed In AJAX popup fields "From" and "To" have behavior as mandatory fields
|
566 |
+
Fixed Filter by Allow Countries not working for Customer Address Form in the Backend
|
567 |
+
Fixed Product price lower than 0 (after catalog price rule applying)
|
568 |
+
Fixed Google Checkout throws error if Zip Range is used for Tax Rate
|
569 |
+
- changed part of XML request to Google responsible for postal codes
|
570 |
+
- made changes to correctly fetch tax rules for postal code ranges
|
571 |
+
Fixed Website config object is not being cached
|
572 |
+
Fixed Select groups in grid view doesn't work under IE7
|
573 |
+
Fixed No products name in Popular tags report file .csv
|
574 |
+
Fixed Qty Increments should work when it was defined in the default scope configuration
|
575 |
+
Fixed Products in catalog displays as "out of stock"
|
576 |
+
Fixed "Get help for this page" in each tab under System->Configuration links to the same help page
|
577 |
+
Fixed Unable to translate submenu
|
578 |
+
Fixed Redirect to main page of front-end during deleting Product Tax Class which is used in Tax Rule
|
579 |
+
Fixed Redirect to base URL should consider full request URI string
|
580 |
+
Fixed Incorrect transparency of PNG image in indexed non-alpha mode
|
581 |
+
Fixed Problem of generation URL between different domains
|
582 |
+
Fixed There are no server side validation of first character of Attribute Code (it should be letter)
|
583 |
+
Fixed Edit Order without creating new one functionality saves invalid changes in non-default customer address attributes
|
584 |
+
Fixed Frontend: If second customer logs in and does not select the "Remember Me" then the previous long-term cookie does not removes
|
585 |
+
Fixed Admin can Reorder order with status On Hold
|
586 |
+
Fixed Frontend: After new customer registration with "Remember Me" and pressing "Logout" the long-term cookie session doesn't apply if in configuration on backend ""Remember Me" Default Value" - No
|
587 |
+
Fixed Tax not displaying on PayPal side for Express orders
|
588 |
+
Fixed Wishlist: Not configured grouped product has unneeded link "Show Details"
|
589 |
+
Fixed Removed the ability to work with customise admin url through the parameter base_url
|
590 |
+
Fixed Roles not displaying selected resources
|
591 |
+
Fixed Unable to use Import when compiler is enabled
|
592 |
+
Fixed Missing Translation Capability in Transactional Email Variable
|
593 |
+
Fixed productConfigure is undefined error is occurred during creation Order in Backend in IE8 browser
|
594 |
+
Fixed Zend Full Page Cache. Lifetime of the cookie is not equal to specified on "Cookie Lifetime" field
|
595 |
+
Fixed Incorrect price values for Bundle Product
|
596 |
+
Fixed Link does not pass validation if ends with .html
|
597 |
+
Fixed Incorrect Customs Value in Create Packages in case when price value contains decimals
|
598 |
+
Fixed Incorrect reports with updated_at filter
|
599 |
+
Fixed paypal_payment_transaction_clean job takes credentials form default config instead of website for Payflow Link
|
600 |
+
Fixed Wrong schedule time setup for paypal_payment_transaction_clean job for Payflow Link
|
601 |
+
Fixed Backend Error message "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'qwe' for key 2" appears after saving new Email Template with existing name
|
602 |
+
Fixed Rule Conditions logic
|
603 |
+
Fixed Error appears after Customer Group saving with name length more than 32
|
604 |
+
Fixed Category product index run time
|
605 |
+
Fixed Sidebar cart is missing composite product options on category page
|
606 |
+
Fixed Missed validation for space character at the begin of unique fields
|
607 |
+
- improved validation of Attribute Set Name and validation of unique fields in Mage_Core_Model_Resource_Db_Abstract class
|
608 |
+
Fixed Ability to input uppercase, space, specials symbols in Order Status Code
|
609 |
+
Fixed Filter by Allow Countries not working for Customer Address Form in the Backend
|
610 |
+
Fixed No ability to create Shipping Label with "plus-four codes" Zip Code (in case with USPS Domestic)
|
611 |
+
Fixed Changing language twice -> Error 404
|
612 |
+
Fixed The sort order in products page doesn't work
|
613 |
+
Fixed When a grouped product with configured price=0 is added to the wishlist and shared, adding the product to the cart leads to 404 error
|
614 |
+
Fixed Media Saves Incorrect Cached Config
|
615 |
+
- added options that disallow saving cache
|
616 |
+
Fixed Bundle Product items shows randomly instead of according to option
|
617 |
+
Fixed Unable to place order with Payflow Link if store credit or reward point applied
|
618 |
+
Fixed Ajax loader does not appears after click on Verify Card on Payflow Link
|
619 |
+
Fixed "Google Checkout - Carrier" in Magento backend as shipping method rather than the actual shipping method chosen
|
620 |
+
Fixed JavaScript error appears in checkout because of PSC after press 'Proceed to Checkout'
|
621 |
+
Fixed Admin user interface: mistakes in labels names
|
622 |
+
Fixed Problems with grid sorting on edit customer backend page
|
623 |
+
Fixed It is possible to change the price of the Bundle product from fixed to the dynamic at my store
|
624 |
+
Fixed Set special price via Catalog Product API is not working
|
625 |
+
Fixed Price is wrong calculated for bundle product with a zero price for its items on product details page
|
626 |
+
- subitem price calculation were fixed
|
627 |
+
Fixed Layout issue appears in IE9 on the grids (example Customers)
|
628 |
+
Fixed Impossible to press 'Continue' button to place in onepage
|
629 |
+
Fixed "Add to Wishlist", "Add to Compare" aren't presented for Configurable, bundle, downloadable, simple products on Product Details Page
|
630 |
+
Fixed Register during checkout with PayPal Express Checkout
|
631 |
+
Fixed Extension Packager does not read recursive directory if include expression use file mask
|
632 |
+
Fixed Newsletter Subscription Confirmation Message
|
633 |
+
Fixed Discount is wrong calculated for Shopping Cart Price Rules when some of them created with Coupon and another without Coupon
|
634 |
+
Fixed Subtotal (Incl.Tax) on invoices must not include tax applied to shipping amount
|
635 |
+
- shippingTax amount were excluded from subTotal value
|
636 |
+
Fixed "Maximum shipping amount allowed to refund" message shows amount excl. tax if Display Shipping Amount set to Including Tax
|
637 |
+
- adjusted function to include tax into allowed amount for shipping refund
|
638 |
+
Fixed Display Out of Stock Products must not be considered during admin order creation
|
639 |
+
Fixed Check box is not working correctly under "prices" of the Bundle products.
|
640 |
+
Fixed CSS class missing
|
641 |
+
Fixed Frontend: JavaScript error appears if user registered on Checkout Page
|
642 |
+
Fixed Website config object is not being cached
|
643 |
+
- added functionality for memcache backend to split down data that is larger than slab size into chunks
|
644 |
+
Fixed Removed the ability to work with base_url
|
645 |
+
Fixed Custom design should be updated via import functionality
|
646 |
+
Fixed JS error during onepage checkout
|
647 |
+
Fixed Unable to translate "First name" and "Last name" fields on "Create an Account" page
|
648 |
+
Fixed After upgrading dashboard "Top 5 Search Terms" grid doesn't show search terms
|
649 |
+
|
650 |
+
|
651 |
+
|
652 |
+
==== 1.6.x-devel-119961 ====
|
653 |
+
|
654 |
+
=== Fixes ===
|
655 |
+
Fixed Wrong Comments History in notification of order creation/cancellation
|
656 |
+
Fixed In AJAX popup fields "From" and "To" have behavior as mandatory fields
|
657 |
+
Fixed Filter by Allow Countries not working for Customer Address Form in the Backend
|
658 |
+
Fixed Product price lower than 0 (after catalog price rule applying)
|
659 |
+
Fixed Google Checkout throws error if Zip Range is used for Tax Rate
|
660 |
+
- changed part of XML request to Google responsible for postal codes
|
661 |
+
- made changes to correctly fetch tax rules for postal code ranges
|
662 |
+
Fixed Website config object is not being cached
|
663 |
+
Fixed Select groups in grid view doesn't work under IE7
|
664 |
+
Fixed No products name in Popular tags report file .csv
|
665 |
+
Fixed Qty Increments should work when it was defined in the default scope configuration
|
666 |
+
Fixed Products in catalog displays as "out of stock"
|
667 |
+
Fixed "Get help for this page" in each tab under System->Configuration links to the same help page
|
668 |
+
Fixed Unable to translate submenu
|
669 |
+
Fixed Redirect to main page of front-end during deleting Product Tax Class which is used in Tax Rule
|
670 |
+
Fixed Redirect to base URL should consider full request URI string
|
671 |
+
|
672 |
+
|
673 |
+
|
674 |
+
==== 1.6.x-devel-119217 ====
|
675 |
+
|
676 |
+
=== Fixes ===
|
677 |
+
Fixed Incorrect transparency of PNG image in indexed non-alpha mode
|
678 |
+
Fixed Problem of generation URL between different domains
|
679 |
+
Fixed There are no server side validation of first character of Attribute Code (it should be letter)
|
680 |
+
Fixed Edit Order without creating new one functionality saves invalid changes in non-default customer address attributes
|
681 |
+
Fixed Frontend: If second customer logs in and does not select the "Remember Me" then the previous long-term cookie does not removes
|
682 |
+
Fixed Admin can Reorder order with status On Hold
|
683 |
+
Fixed Frontend: After new customer registration with "Remember Me" and pressing "Logout" the long-term cookie session doesn't apply if in configuration on backend ""Remember Me" Default Value" - No
|
684 |
+
Fixed Tax not displaying on PayPal side for Express orders
|
685 |
+
Fixed Wishlist: Not configured grouped product has unneeded link "Show Details"
|
686 |
+
Fixed Removed the ability to work with customise admin url through the parameter base_url
|
687 |
+
Fixed Roles not displaying selected resources
|
688 |
+
Fixed Unable to use Import when compiler is enabled
|
689 |
+
Fixed Missing Translation Capability in Transactional Email Variable
|
690 |
+
Fixed productConfigure is undefined error is occurred during creation Order in Backend in IE8 browser
|
691 |
+
Fixed Zend Full Page Cache. Lifetime of the cookie is not equal to specified on "Cookie Lifetime" field
|
692 |
+
Fixed Incorrect price values for Bundle Product
|
693 |
+
Fixed Link does not pass validation if ends with .html
|
694 |
+
Fixed Incorrect Customs Value in Create Packages in case when price value contains decimals
|
695 |
+
Fixed Incorrect reports with updated_at filter
|
696 |
+
Fixed paypal_payment_transaction_clean job takes credentials form default config instead of website for Payflow Link
|
697 |
+
Fixed Wrong schedule time setup for paypal_payment_transaction_clean job for Payflow Link
|
698 |
+
Fixed Backend Error message "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'qwe' for key 2" appears after saving new Email Template with existing name
|
699 |
+
Fixed Rule Conditions logic
|
700 |
+
Fixed Error appears after Customer Group saving with name length more than 32
|
701 |
+
Fixed Category product index run time
|
702 |
+
Fixed Sidebar cart is missing composite product options on category page
|
703 |
+
Fixed Missed validation for space character at the begin of unique fields
|
704 |
+
- improved validation of Attribute Set Name and validation of unique fields in Mage_Core_Model_Resource_Db_Abstract class
|
705 |
+
Fixed Ability to input uppercase, space, specials symbols in Order Status Code
|
706 |
+
Fixed Filter by Allow Countries not working for Customer Address Form in the Backend
|
707 |
+
Fixed No ability to create Shipping Label with "plus-four codes" Zip Code (in case with USPS Domestic)
|
708 |
+
Fixed Changing language twice -> Error 404
|
709 |
+
Fixed The sort order in products page doesn't work
|
710 |
+
Fixed When a grouped product with configured price=0 is added to the wishlist and shared, adding the product to the cart leads to 404 error
|
711 |
+
Fixed Media Saves Incorrect Cached Config
|
712 |
+
- added options that disallow saving cache
|
713 |
+
Fixed Bundle Product items shows randomly instead of according to option
|
714 |
+
Fixed Unable to place order with Payflow Link if store credit or reward point applied
|
715 |
+
Fixed Ajax loader does not appears after click on Verify Card on Payflow Link
|
716 |
+
Fixed "Google Checkout - Carrier" in Magento backend as shipping method rather than the actual shipping method chosen
|
717 |
+
Fixed JavaScript error appears in checkout because of PSC after press 'Proceed to Checkout'
|
718 |
+
Fixed Admin user interface: mistakes in labels names
|
719 |
+
Fixed Problems with grid sorting on edit customer backend page
|
720 |
+
Fixed It is possible to change the price of the Bundle product from fixed to the dynamic at my store
|
721 |
+
Fixed Set special price via Catalog Product API is not working
|
722 |
+
Fixed Price is wrong calculated for bundle product with a zero price for its items on product details page
|
723 |
+
- subitem price calculation were fixed
|
724 |
+
Fixed Layout issue appears in IE9 on the grids (example Customers)
|
725 |
+
Fixed Impossible to press 'Continue' button to place in onepage
|
726 |
+
Fixed "Add to Wishlist", "Add to Compare" aren't presented for Configurable, bundle, downloadable, simple products on Product Details Page
|
727 |
+
Fixed Register during checkout with PayPal Express Checkout
|
728 |
+
Fixed Extension Packager does not read recursive directory if include expression use file mask
|
729 |
+
Fixed Newsletter Subscription Confirmation Message
|
730 |
+
Fixed Discount is wrong calculated for Shopping Cart Price Rules when some of them created with Coupon and another without Coupon
|
731 |
+
Fixed Subtotal (Incl.Tax) on invoices must not include tax applied to shipping amount
|
732 |
+
- shippingTax amount were excluded from subTotal value
|
733 |
+
Fixed "Maximum shipping amount allowed to refund" message shows amount excl. tax if Display Shipping Amount set to Including Tax
|
734 |
+
- adjusted function to include tax into allowed amount for shipping refund
|
735 |
+
Fixed Display Out of Stock Products must not be considered during admin order creation
|
736 |
+
Fixed Check box is not working correctly under "prices" of the Bundle products.
|
737 |
+
Fixed CSS class missing
|
738 |
+
Fixed Frontend: JavaScript error appears if user registered on Checkout Page
|
739 |
+
Fixed Website config object is not being cached
|
740 |
+
- added functionality for memcache backend to split down data that is larger than slab size into chunks
|
741 |
+
Fixed Removed the ability to work with base_url
|
742 |
+
Fixed Custom design should be updated via import functionality
|
743 |
+
Fixed JS error during onepage checkout
|
744 |
+
Fixed Unable to translate "First name" and "Last name" fields on "Create an Account" page
|
745 |
+
Fixed After upgrading dashboard "Top 5 Search Terms" grid doesn't show search terms
|
746 |
+
|
747 |
+
|
748 |
+
|
749 |
+
==== 1.6.0.0 ====
|
750 |
+
|
751 |
+
=== Major Highlights ===
|
752 |
+
Minimum Advertised Price
|
753 |
+
Persistent Shopping Cart
|
754 |
+
Shipping Integration with Label printing support
|
755 |
+
|
756 |
+
=== Improvements ===
|
757 |
+
XmlConnect package release v21
|
758 |
+
Order Payment Action for Express Checkout (PayPal)
|
759 |
+
- Added settings Authorization Honor Period and Order Valid Period into EC tab in the backend
|
760 |
+
- Automatically new authorize transaction created after order transaction
|
761 |
+
- Automatically cancel order after the expiration of Order Valid Period
|
762 |
+
- Automatically authorize transaction void\create after the expiration of Authorization Honor Period
|
763 |
+
Implemented Authorize.Net 'hold for review' status shows up as 'declined' in Magento
|
764 |
+
Add Dynamic sku option for configurable products
|
765 |
+
Moneybookers Multistore System Configuration
|
766 |
+
Moneybookers OBT Defaults
|
767 |
+
PrototypeJS upgraded to 1.7
|
768 |
+
|
769 |
+
=== Changes ===
|
770 |
+
Removed deprecation.js because its not compatible with prototype 1.7
|
771 |
+
Relations between models and resource models were revised for better support of multiple databases
|
772 |
+
- Varien_Db_Adapter_Pdo_Mysql revised
|
773 |
+
- Introduced Varien_Db_Adapter_Interface, Varien_Db_Ddl_Table
|
774 |
+
- Introduced new classes named resource helpers
|
775 |
+
- Backwards comatibility and known issues
|
776 |
+
-- Error appears after Customer Group saving with name length more than 32
|
777 |
+
Deprecated GoogleBase module (http://googlemerchantblog.blogspot.com/2010/12/new-shopping-apis-and-deprecation-of.html)
|
778 |
+
- Google Shopping Extension is available for the replacement
|
779 |
+
|
780 |
+
=== Fixes ===
|
781 |
+
Fixed Google checkout shipping (merchant and carrier calculated) returns only default prices
|
782 |
+
Fixed Custom option prices for simple products are GLOBAL
|
783 |
+
- fixed website price scope for simple products when product is linked to few websites with separate store views
|
784 |
+
Fixed Custom Price for Bundled Product should be disabled in Admin Panel
|
785 |
+
Fixed Configurable products. Incorrect pricing with super attributes price in percents
|
786 |
+
- percentage of price is taken from final product price
|
787 |
+
Fixed Label of system Customer Attribute, that was changed, is not displayed
|
788 |
+
Fixed Taxes are not correctly calculated if bundle with dynamic price is about to partially return
|
789 |
+
Fixed No ability to create Shipping Labels with several packages (in case with decimals Qty of products)
|
790 |
+
Fixed Special symbols as search keywords return error page
|
791 |
+
Fixed Changes in URL rewrite suffix cannot be reverted
|
792 |
+
Fixed Taxes are not correctly calculated if bundle with dynamic price is about to partially return
|
793 |
+
Fixed Product is deleted from shopping cart by editing grouped product
|
794 |
+
Fixed Product view page doesn't reflect last visited category
|
795 |
+
Fixed Customer is linked in order even if it is deleted from Magento
|
796 |
+
Fixed Exception is shown when Email to a Friend page is opened using URL in case when this feature is disabled
|
797 |
+
Fixed Missing "?" placeholders in class Varien_Cache_Backend_Database
|
798 |
+
Fixed There are no server side validation of first character of Attribute Code (it should be letter)
|
799 |
+
Fixed Edit cart item return unnecessary error message
|
800 |
+
Fixed Product Custom Option values titles are not saved
|
801 |
+
Fixed Newsletters are not sent
|
802 |
+
Fixed Preview URL for CMS Pages template contain two question mark
|
803 |
+
Fixed Partial refund orders with downloadable products affect status of all downloadable links
|
804 |
+
Fixed AddToCart takes forever if a configurable has massive count of child products
|
805 |
+
Fixed Mage_Tag_IndexController::saveAction() contains business logic of creating tag relation
|
806 |
+
Fixed Frontend: If second customer logs in and does not select the "Remember Me" then the previous long-term cookie does not removes
|
807 |
+
Fixed Frontend: After new customer registration with "Remember Me" and pressing "Logout" the long-term cookie session doesn't apply if in configuration on backend ""Remember Me" Default Value" - No
|
808 |
+
Fixed Currency problems. Back office TAX calculation on the product edit page
|
809 |
+
Fixed UPS shipping quotes are incorrect
|
810 |
+
Fixed Quote CollectTotals performance issue
|
811 |
+
Fixed PayPal Checkout Error Duplicate Order ID
|
812 |
+
- added additional exception handling which sets transaction to pending
|
813 |
+
Fixed In report Products Ordered configurable and its associated simple product appear and are counted
|
814 |
+
Fixed Multi select attributes not importing/exporting correctly
|
815 |
+
Fixed Google Bot User Agent and compare product issue
|
816 |
+
Fixed Bundle price display issue with tier pricing
|
817 |
+
Fixed No validation of Customs Value field
|
818 |
+
Fixed Form for adding new customer is shown instead customer's information page
|
819 |
+
- correct customer ID passed to URL generator
|
820 |
+
Fixed With IE9 impossible to do drag and drop actions in Admin
|
821 |
+
- added support of Range.createContextualFragment for IE9
|
822 |
+
Fixed Countries with no Zip code still have it as required field in address
|
823 |
+
Fixed Anchor category does not display products from subcategories
|
824 |
+
Fixed Place of "Options Details" is wrong in wishlist for composite products
|
825 |
+
Fixed 3D Secure + PayPal Website Payments Pro in UK prevents non-3D secure cards from working
|
826 |
+
Fixed When creating new order for customer registered on multiple websites, account/website mismatch causes issues
|
827 |
+
Fixed Shipping method is calculating based on default shipping address instead of 'Same as billing' setting in backend
|
828 |
+
Fixed Global variables in js.js
|
829 |
+
Fixed Observers from adminhtml are do not work when use Soap
|
830 |
+
Fixed Item quantity changed to 1 if added space
|
831 |
+
Fixed Row total is incorrectly calculated as negative number
|
832 |
+
Fixed HTML validation fails for pages with multiple grids
|
833 |
+
Fixed Can not log in to MCM if connect.cfg is incorrect
|
834 |
+
Fixed Incorrect use of chmod in Varien_Io_File::streamClose()
|
835 |
+
Fixed Unable to return full amount on PayPal if partial credit memo is done and customer applied Store Credit
|
836 |
+
Fixed Import Issue when attribute values not unique
|
837 |
+
Fixed Wrong customer group in order creation process in Admin panel
|
838 |
+
Fixed "Unable to save invoice" message appears when admin captures money when authorization transaction is no longer valid
|
839 |
+
Fixed Wishlist doesn't save configured composite products if MAP is enabled
|
840 |
+
Fixed Empty items grid is present, after deleting last item
|
841 |
+
Fixed Incorrect Tax Calculation when "Apply Tax On:Original price only" but custom price is not entered
|
842 |
+
Fixed Unable to place order with Authorize.net Direct Post payment method in IE 9
|
843 |
+
Fixed Ability to bypass configuration setting for the Admin area URL route
|
844 |
+
Fixed Ability to create package with decimals Qty of products, for which "Qty Uses Decimals" set to "No"
|
845 |
+
Fixed Excess semicolon in warning message, during creating Shipping Labels (in case with invalid Packaging Type)
|
846 |
+
Fixed msrp_display_actual_price_type (MAP:Display Actual Price) field is not exported
|
847 |
+
Fixed Incorrect Customs Value in Create Packages in case when price value contains decimals
|
848 |
+
Fixed Incorrect warning message, after Additions products with Qty that exceeds maximum available quantity
|
849 |
+
Fixed Catalog price rule doesn't work with contains condition and value which contains only cents
|
850 |
+
Fixed No store base currency beside Customs Value
|
851 |
+
Fixed Catalog Price Rule not applying to imported products
|
852 |
+
Fixed Incorrect "Shipper" and "Ship to" information in Shipping Label (in case with UPS)
|
853 |
+
Fixed Images are not imported via new Import functionality
|
854 |
+
Fixed Packages Print looks incorrectly
|
855 |
+
Fixed MAP. In the JS pop-up link "Checkout with PayPal" displayed only under FF
|
856 |
+
Fixed Extra double-quote in transactional email template app/locale/en_US/template/email/password_new.html
|
857 |
+
Fixed No ability to create Shipping Label for product with non-integer weight in Ounces (USPS - First-Class Mail International Package)
|
858 |
+
Fixed Layout issue if RSS is On
|
859 |
+
Fixed Previous customer information stays on the page header while one page checkout in process
|
860 |
+
Fixed Out of Stock Configurable product is displayed as In Stock
|
861 |
+
Fixed In the up-sell products "click to see price" link displayed, when settings "In cart", "Before Order Confirmation" is used
|
862 |
+
Fixed MAP. On the onepage, in the Wishlist block, link "Click for Price" is not active
|
863 |
+
Fixed Frontend: the products in Shopping Cart is transferred to other customer, if this customer is logged in in "My Account" page
|
864 |
+
Fixed Wrong prices are displayed for placed order with downloadable product
|
865 |
+
Fixed Shipping amount display issue when placing an order on the backend
|
866 |
+
Fixed Length, Width, Height are not passed to shipping carrier, during package creation (in case with DHL)
|
867 |
+
Fixed Disabled fields in Create Packages Pop-up with Girth field looks incorrectly
|
868 |
+
Fixed Customer address that affect tax calculation does not affect persistent customer
|
869 |
+
Fixed Ability to create more products in Shipping Labels than products in the order/shipment (in case with decimals Qty of products)
|
870 |
+
Fixed No ability to create Shipping Labels with several packages (in case with decimals Qty of products)
|
871 |
+
Fixed Formed items grid looks incorrectly, during package creation
|
872 |
+
Fixed Incorrect total weight of bundle product
|
873 |
+
Fixed Shopping Cart Rule Not Working Properly
|
874 |
+
Fixed Javascript error on "forgot your password" validation
|
875 |
+
Fixed When custom price is applied on an order in the admin, Price Incl tax on the order is the same as Excl tax
|
876 |
+
Fixed Edit cart item return unnecessary error message
|
877 |
+
Fixed Unable to save HTML code in attribute options
|
878 |
+
Fixed In the Wishlist text message appears in 2 rows, when MAP is applied for product that is in the wishlist
|
879 |
+
Fixed Unable to apply coupon code to order with zero subtotal
|
880 |
+
Fixed Nonexistent blank option in multiple select form attribute
|
881 |
+
Fixed Cannot add widget to packages or themes containing underscore in name
|
882 |
+
Fixed Product's sort order by position works incorrect with negative numbers
|
883 |
+
- allowed negative numbers
|
884 |
+
- corrected sorting by position
|
885 |
+
Fixed Incorrect Grand Total calculation when "Buy X get Y free" discount applied
|
886 |
+
Fixed Wrong product's quantity in the Wishlist after updating 'Shopping Cart'
|
887 |
+
Fixed Unneeded URL translation in admin template
|
888 |
+
Fixed Incorrect subtotal on invoice creation page (Order with Tax and Discount)
|
889 |
+
- hidden tax amount was added to collect process
|
890 |
+
Fixed When we add new address to address book during onepage checkout, not shown customer address attributes are taken from saved address attribute value
|
891 |
+
Fixed Street Address input box missing on create order form in admin
|
892 |
+
Fixed MAP enabled. In the wishlist block product price displayed when it should not
|
893 |
+
Fixed Qty field is not disabled if even check-box unselected
|
894 |
+
Fixed No ability to create Shipping Label with decimals Qty of products (in case with FedEx International)
|
895 |
+
Fixed FedEx Shipping Method unavailable (in case with Request Courier drop off type)
|
896 |
+
Fixed Unable to upgrade Magento when installed extension without max version
|
897 |
+
Fixed Wrong calculation price of Bundle product
|
898 |
+
- fixed sub item prices calculation
|
899 |
+
Fixed Incorrect products weight in Shipping Label (in case with USPS Int.,FedEx Int. and decimal Qty)
|
900 |
+
Fixed Gateway URL Absent in FedEx Shipping Module
|
901 |
+
Fixed Google checkout shipping (merchant and carrier calculated) returns only default prices
|
902 |
+
Fixed Frontend: the products in the Shopping Cart is not transferred to other customer, if this customer is logged in or register after clicks on "Checkout with Multiple Addresses", "Google Checkout" or "PayPal"
|
903 |
+
Fixed Unable to login to site after adding SID to URL
|
904 |
+
Fixed Image in description doesn't shown in compare grid
|
905 |
+
Fixed Missed validation for space charter in begin of unique fields
|
906 |
+
Fixed Impossible to sort blocks
|
907 |
+
Fixed Incorrect behavior of Offline Refunds for an Order when Adjustment fee is specified
|
908 |
+
Fixed Order saving error on backend
|
909 |
+
Fixed Customer logged out by wrong SID cached in blocks
|
910 |
+
Fixed System->Configuration->Advanced->Admin->Startup page->"Startup Page" drop-down - Optgroups are displayed after child elements
|
911 |
+
Fixed Removed unused code from Varien_File_Uploader
|
912 |
+
Fixed DHL Shipping Methods unavailable (in case with package type letter)
|
913 |
+
Fixed Error via using Global Search [Search in Admin]
|
914 |
+
Fixed Error is presented by saving address, creating order with created attributes type Image File or file(attachment)
|
915 |
+
Fixed Package contents should be specified dynamically while creating shipping labels for the USPS International shipping methods
|
916 |
+
Fixed Product option with file type input is not being transferred from wishlist to the cart
|
917 |
+
- add mergeBuyRequest method to Mage_Wishlist_Model_Item
|
918 |
+
- add checking of custom add to cart URL in Mage_Catalog_Block_Product_View
|
919 |
+
Fixed Import: Imported file is not saved to var/importexport
|
920 |
+
Fixed Reports for Sales do not work except PayPal Settlement if several order statutes were selected
|
921 |
+
Fixed No disabling of package type and dimensions fields (in case with USPS Domestic)
|
922 |
+
Fixed Wrong behavior of composite configurable product during adding to the Shopping Cart via backend
|
923 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
924 |
+
- added/removed several methods/packages for UPS shipping according to SRS
|
925 |
+
Fixed "Notify for Quantity Below" does not work
|
926 |
+
Fixed Frontend: Tier price not always applied to Mini Shopping Cart
|
927 |
+
Fixed Void button is present on Order page, Authorization transaction is not closed when payment action is set to "authorize and charge" - Google Checkout
|
928 |
+
Fixed MAP is applied to a Bundle product with dynamic price
|
929 |
+
Fixed No ability to create Shipping Label with package size "Oversize"
|
930 |
+
Fixed Button "Add to Cart" located in JS-popup (with Display Actual Price = On Gesture) doesn't work
|
931 |
+
Fixed Incorrect Shipping Label for USPS Library Mail Shipping Methods
|
932 |
+
Fixed Duplicating customer's addresses through placing order (backend)
|
933 |
+
Fixed Updating the qty of products from backend does not allow checkout on Frontend
|
934 |
+
- added ability to Quote and Quote items to track errors and remove them, when fixed, so whole 'error' status from Quote/Quote Item can be removed
|
935 |
+
- removed duplicating messages on Cart View page
|
936 |
+
Fixed No ability to create Shipping Label even if "Residential Delivery" set to "Yes" (in case with FedEx Home Delivery)
|
937 |
+
Fixed Button "Add new address" for customer works incorrect (backend)
|
938 |
+
Fixed It should be possible to set Minimum Qty Allowed in Shopping Cart setting via backend
|
939 |
+
Fixed Cart Subtotal is shown incorrect in sidebar shopping cart
|
940 |
+
Fixed Grid/list view settings do not save
|
941 |
+
Fixed Cannot assign custom filter to the grid column
|
942 |
+
Fixed Wishlist - product custom options are lost after customer login
|
943 |
+
Fixed Saved products will be matched each target rule
|
944 |
+
Fixed Taxes are not displayed in the catalog from frontend for Bundle products
|
945 |
+
- re-factored work with taxes for bundle product
|
946 |
+
Fixed Unable to save year less than 1970 in DOB customer attribute
|
947 |
+
- added DATETIME type to DDL
|
948 |
+
- fixed customer attributes to have same as pre-MMDB default values
|
949 |
+
Fixed "Grand Total" is not displayed for a configurable product that contains product where DAP = display before order confirmation
|
950 |
+
Fixed 'Click for price' not clickable after pressing 'Review' link in category
|
951 |
+
Fixed Bundle price display issue with tier pricing
|
952 |
+
- not considering tier price at bundle product's view page in price range
|
953 |
+
Fixed Frontend: In the block "Recently Viewed Products" the products of two customers are mixed
|
954 |
+
Fixed Error with Advanced Search (in case with Date Attribute)
|
955 |
+
Fixed Tax Rate ignores set values of Post/Zip codes Range From-To and applies it to Address with any Zip codes
|
956 |
+
Fixed Wishlist - Comment lost on config update
|
957 |
+
Fixed Import cannot handle UTF-8 characters
|
958 |
+
Fixed Welcome email template for store view scope is being ignored
|
959 |
+
Fixed Incorrect behavior of bundle product during creating Shipping Label with Customs value (in case when Price: Fixed, Ship Bundle Items" set to Separately)
|
960 |
+
Fixed Order status isn't changed when payed via PayPal if registered email differs characters cases (upper and lower)
|
961 |
+
Fixed Unwanted orders are shown in Sales->Orders list when the date filter affects to the day when DST changes apply
|
962 |
+
Fixed Payment method "Credit Card (saved)" does not display fields for fill in card information when product price is 0.00
|
963 |
+
Fixed Available to create online invoice after performing void for order
|
964 |
+
Fixed MAP configuration must contain default text for "Default Popup Text Message" and "Default "What's This" Text Message"
|
965 |
+
Fixed Backwards compatibility loss results in fatal error in Google Shopping module
|
966 |
+
- added all previous DDL constants to DDL Table, they are deprecated and being converted to new supported types
|
967 |
+
- added support for 'char' attributes
|
968 |
+
- fixed several incompatibilities in DDL Table
|
969 |
+
Fixed No ability to create Shipping Label with package type "Flat-Rate Box" (in case with USPS International)
|
970 |
+
Fixed Frontend: The block "Compare Products" with product is present on catalog page after adding the product to this block and clicking on "Not..?"
|
971 |
+
Fixed Fatal error when trying to open configurable product with super attribute not in the appropriate attribute set
|
972 |
+
Fixed Unable to return full amount on PayPal if partial credit memo is done and customer applied Store Credit
|
973 |
+
Fixed When creating new order for customer registered on multiple websites, account/website mismatch causes issues
|
974 |
+
Fixed Import Issue when attribute values not unique
|
975 |
+
Fixed After upgrading Magento website left in the maintenance mode
|
976 |
+
Fixed Ability to create more Shipping Labels than products in the order(shipment)
|
977 |
+
Fixed Street Address and Street Address 2 are mixed up in request to shipping carrier (in case with USPS International)
|
978 |
+
Fixed PayflowLink doesn't work (error "Payment has been declined. Please try again." is shown, Order is canceled)
|
979 |
+
Fixed Shopping cart price rule with attribute does not work when "Use Flat Catalog Product" enabled
|
980 |
+
Fixed Upgrade checking after cache flushed
|
981 |
+
Fixed Frontend: Tier price not always applied to Mini Shopping Cart
|
982 |
+
Fixed A message for the case when shipping label is created from the order should be modified
|
983 |
+
Fixed Spelling mistake in abbreviations unit of mass measurement (lbs, kgs)
|
984 |
+
Fixed FedEx Ground Shipping Method unavailable (if others FedEx Shipping Methods unavailable)
|
985 |
+
Fixed Incorrect Signature Confirmation options in the drop-down (in case with UPS)
|
986 |
+
Fixed Frontend: Catalog Price Rule does not apply to Mini Shopping Cart after login current customer
|
987 |
+
- add recollect total prices for quote on customer register
|
988 |
+
Fixed Fatal error when requesting non-existent file from Media directory
|
989 |
+
Fixed Button "Add to Cart" located in JS-popup (with Display Actual Price = On Gesture) doesn't work
|
990 |
+
Fixed Headers sent twice or three times when file downloading
|
991 |
+
Fixed Shipping method is calculating based on default shipping address instead of 'Same as billing' setting in backend
|
992 |
+
Fixed No ability to create more that one online Partial Invoice with Google Checkout
|
993 |
+
- parent transaction will be closed on payment model level;
|
994 |
+
- fixed exception error in Mage_Tax_Model_Resource_Calculation
|
995 |
+
Fixed Cross Sell Sorting Not Working
|
996 |
+
Fixed No ability to create Shipping Label for USPS - First-Class Mail International Package
|
997 |
+
Fixed Notification remove link in admin redirects to homepage on frontend in IE8
|
998 |
+
Fixed Incorrect behavior of image gallery
|
999 |
+
Fixed 'On Gesture' option is not applied on products' level
|
1000 |
+
Fixed The message that appears instead or totals in the shopping cart and mini shopping cart should be modified
|
1001 |
+
Fixed Void button present when order is fully invoiced
|
1002 |
+
Fixed No ability to create Shipping Label with package type "Flat-Rate Box" (in case with USPS International)
|
1003 |
+
Fixed MAP behavior for RSS feed pages should be changed (only "Click for price" link should be present)
|
1004 |
+
Fixed PayflowLink doesn't work (error "Payment has been declined. Please try again." is shown, Order is canceled)
|
1005 |
+
Fixed Incorrect Online Refund amount in Magento, when Adjustment Fee is specified (Google Checkout)
|
1006 |
+
Fixed Brazil PayPal requirements upgrade
|
1007 |
+
Fixed No ability to create Shipping Label with package type "Flat-Rate Box" (in case with USPS International)
|
1008 |
+
Fixed Issue with add to cart action, possible to add to cart a quantity of N+1 for a product
|
1009 |
+
Fixed No ability to create Shipping Label if "ship to" in Canada (in case with UPS)
|
1010 |
+
Fixed Wrong content in export file (all export types)
|
1011 |
+
Fixed "Mysql" must be renamed to "MySQL" in installer
|
1012 |
+
Fixed File overwriting during Import/Export
|
1013 |
+
Fixed Reuse of adapter utilities in helper
|
1014 |
+
Fixed MAP behavior for RSS feed pages should be changed (only "Click for price" link should be present)
|
1015 |
+
Fixed When changing locale that has Unicode characters, the countries are not sorting correctly
|
1016 |
+
Fixed Importing customers via CSV
|
1017 |
+
Fixed Two void transactions created when using Payment Action = Order in PayPal Express
|
1018 |
+
Fixed Issue with newsletter subscriptions and logged in customers
|
1019 |
+
Fixed Frontend: Long-term cookie session is not over after click on "(Not..?)" link
|
1020 |
+
Fixed Mismatch counts of products for different scope
|
1021 |
+
Fixed Wrong config setting are implemented for MAP functionality in admin on product's level
|
1022 |
+
Fixed Street Address and Street Address 2 are mixed up in request to shipping carrier (in case with USPS International)
|
1023 |
+
Fixed No ability to create Shipping Label if "ship to" in Canada (in case with UPS)
|
1024 |
+
- fixed MonetaryValue to be whole number
|
1025 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1026 |
+
Fixed Add verification into predispatch observers used in persistent shopping cart
|
1027 |
+
Fixed Canceled orders should be excluded from Tax Reports
|
1028 |
+
Fixed No ability to create Shipping Label with package type "Flat-Rate Box" (in case with USPS International)
|
1029 |
+
Fixed Import/Export: Append Complex Data works incorrect with grouped products
|
1030 |
+
- check behavior was added
|
1031 |
+
Fixed Fatal error appears on get shipping rates for UPS if system base currency <> merchant country currency
|
1032 |
+
Fixed Map in the frontend link has "Click to see price" name, but must be "Click for price"
|
1033 |
+
Fixed Taxes are not displayed in the catalog from frontend for Bundle products
|
1034 |
+
Fixed Available to delete drop down attribute which used in configurable product
|
1035 |
+
Fixed MySQL error with "max_allowed_packet" during check data step for a huge .csv file
|
1036 |
+
- Changed value for constant DB_MAX_PACKET_COEFFICIENT in Mage_ImportExport_Model_Resource_Helper_Mysql4
|
1037 |
+
Fixed Invalid requests to USPS API
|
1038 |
+
Fixed No ability to input some value in dimensions field in case for package type with non-standard dimensions
|
1039 |
+
Fixed Packages Pop-up looks incorrectly
|
1040 |
+
Fixed Caching config in Database results in endless recursion
|
1041 |
+
Fixed No Signature Confirmation in Packages pop-up
|
1042 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1043 |
+
Fixed "NaN" instead of two dashes in Package pop-up (in case with disabled Length, Width and Height fields)
|
1044 |
+
Fixed Prefix and suffix aren't visible in Register Form
|
1045 |
+
- Modified persistent customer templates
|
1046 |
+
Fixed Unable to Checkout with Multiple Addresses with Registration
|
1047 |
+
Fixed Not work shipping methods Fedex & DHL
|
1048 |
+
- Re-factored DHL, FedEx, Ups, USPS
|
1049 |
+
- Fixed minor bugs for frontend(package.phtml, view.phtml) and backend (popup.phtml, shippingmethod.phtml)
|
1050 |
+
Fixed When we do reindex from console, folder var/log changes permissions from 0777 to 0775
|
1051 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1052 |
+
Fixed Orders placed through PayPal marked as "Suspected Fraud"
|
1053 |
+
- Added formatting amount into comparing
|
1054 |
+
Fixed Enable Log Cleaning option is not working properly
|
1055 |
+
Fixed Incorrect transparency of PNG image in indexed non-alpha mode
|
1056 |
+
Fixed Value from Total Weight field is not passed to shipping carrier (in case with DHL and UPS)
|
1057 |
+
Fixed After enabling dashboard chart admin user is unable to login to admin panel
|
1058 |
+
Fixed Sorting on Please Select products to Add doesn't work
|
1059 |
+
Fixed Catalog Price Rules - the rule is saved but not applied
|
1060 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1061 |
+
Fixed Cross Sell Sorting Not Working
|
1062 |
+
Fixed Error when obtaining missed file over get.php
|
1063 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1064 |
+
Fixed Unable to save Poll for more than one Store
|
1065 |
+
Fixed Mage_Directory_Helper_Data::getRegionJson doesn't translate region names
|
1066 |
+
Fixed Static block in the Main Content Area overlaps border of the catalog of products
|
1067 |
+
Fixed 3D secure with Saved CC works incorrectly
|
1068 |
+
Fixed Unable add Gift Options for Individual Items
|
1069 |
+
Fixed Customer Reports
|
1070 |
+
- avoid selections group by null customer id
|
1071 |
+
Fixed Mysql4 install error
|
1072 |
+
Fixed "What's this?" link is absent, "Click for price" link doesn't work for shared Wishlist page
|
1073 |
+
Fixed Incorrect Row Total Calculation in Refund
|
1074 |
+
- changed tax counting algorithm(now it counts tax for single item)
|
1075 |
+
Fixed Incorrect recipient name of Shipping Label
|
1076 |
+
Fixed Missing "Street Address Line 2" in Shipping Label (in case with DHL)
|
1077 |
+
Fixed After upgrading Magento website left in the maintenance mode
|
1078 |
+
Fixed Frontend: JavaScript error appears if user registered on Checkout Page
|
1079 |
+
Fixed Added items to the Wishlist in the "Manage Shopping Cart" are not shown
|
1080 |
+
Fixed Information is not saved in DB after placing order during checkout
|
1081 |
+
Fixed Reports data wrong even after refreshing lifetime statistics
|
1082 |
+
Fixed Frontend can be broken by recursion
|
1083 |
+
Fixed Sub items are not displayed for the order for bundles, if user use Return and Orders link
|
1084 |
+
- added renderers for non-simple product types
|
1085 |
+
Fixed Error message for the case when store information is incomplete should be changed
|
1086 |
+
Fixed MAP behavior for RSS feed pages should be changed accordingly to SRS (only "Click for price" link should be present)
|
1087 |
+
Fixed Exception after upgrade Magento via diff files
|
1088 |
+
Fixed Frontend: The block "Compare Products" is empty after relogin
|
1089 |
+
Fixed Frontend: Catalog Price Rule does not apply to Mini Shopping Cart after login current customer
|
1090 |
+
- remove checking if customerGroupId exists because quote is loaded with existed customerGroupId as guest
|
1091 |
+
Fixed Unable to delete product with tag in pending status
|
1092 |
+
Fixed Images not imported using new Import/Export
|
1093 |
+
|
1094 |
+
=== Known issues ===
|
1095 |
+
If you see the Service Temporarily Unavailable page after refreshing the frontend, open the Magento installation directory on the server and remove the maintenance.flag file. Then go to Magento var directory and remove the cache directory
|
1096 |
+
- this issue only exists immediately after upgrading correct
|
1097 |
+
Incorrect address in request to shipping carrier (DHL International) in case when address contains letter with diacritic
|
1098 |
+
No ability to save created package when origin address in Germany (in case with UPS Express)
|
1099 |
+
Two products are in the same row in Shipping Label (in case with FedEx International Priority)
|
1100 |
+
Incorrect tracking number in the Shipping Label (in case with "Federal Express - Ground" shipping method)
|
1101 |
+
No ability to save created package when origin and destination in Europe (in case with UPS Standard)
|
1102 |
+
|
1103 |
+
|
1104 |
+
|
1105 |
+
==== 1.6.x-devel-115929 ====
|
1106 |
+
|
1107 |
+
=== Fixes ===
|
1108 |
+
Fixed Currency problems. Back office TAX calculation on the product edit page
|
1109 |
+
Fixed UPS shipping quotes are incorrect
|
1110 |
+
Fixed Quote CollectTotals performance issue
|
1111 |
+
Fixed PayPal Checkout Error Duplicate Order ID
|
1112 |
+
- added additional exception handling which sets transaction to pending
|
1113 |
+
Fixed In report Products Ordered configurable and its associated simple product appear and are counted
|
1114 |
+
Fixed Multi select attributes not importing/exporting correctly
|
1115 |
+
Fixed Google Bot User Agent and compare product issue
|
1116 |
+
Fixed Bundle price display issue with tier pricing
|
1117 |
+
Fixed No validation of Customs Value field
|
1118 |
+
Fixed Form for adding new customer is shown instead customer's information page
|
1119 |
+
- correct customer ID passed to URL generator
|
1120 |
+
Fixed With IE9 impossible to do drag and drop actions in Admin
|
1121 |
+
- added support of Range.createContextualFragment for IE9
|
1122 |
+
Fixed Countries with no Zip code still have it as required field in address
|
1123 |
+
Fixed Anchor category does not display products from subcategories
|
1124 |
+
Fixed Place of "Options Details" is wrong in wishlist for composite products
|
1125 |
+
Fixed 3D Secure + PayPal Website Payments Pro in UK prevents non-3D secure cards from working
|
1126 |
+
Fixed When creating new order for customer registered on multiple websites, account/website mismatch causes issues
|
1127 |
+
Fixed Shipping method is calculating based on default shipping address instead of 'Same as billing' setting in backend
|
1128 |
+
Fixed Global variables in js.js
|
1129 |
+
Fixed Observers from adminhtml are do not work when use Soap
|
1130 |
+
Fixed Item quantity changed to 1 if added space
|
1131 |
+
Fixed Row total is incorrectly calculated as negative number
|
1132 |
+
Fixed HTML validation fails for pages with multiple grids
|
1133 |
+
Fixed Can not log in to MCM if connect.cfg is incorrect
|
1134 |
+
Fixed Incorrect use of chmod in Varien_Io_File::streamClose()
|
1135 |
+
Fixed Unable to return full amount on PayPal if partial credit memo is done and customer applied Store Credit
|
1136 |
+
Fixed Import Issue when attribute values not unique
|
1137 |
+
Fixed Wrong customer group in order creation process in Admin panel
|
1138 |
+
Fixed "Unable to save invoice" message appears when admin captures money when authorization transaction is no longer valid
|
1139 |
+
Fixed Whishlist doesn't save configured composite products if MAP is enabled
|
1140 |
+
Fixed Empty items grid is present, after deleting last item
|
1141 |
+
Fixed Incorrect Tax Calculation when "Apply Tax On:Original price only" but custom price is not entered
|
1142 |
+
Fixed Unable to place order with Authorize.net Direct Post payment method in IE 9
|
1143 |
+
Fixed Ability to bypass configuration setting for the Admin area URL route
|
1144 |
+
Fixed Ability to create package with decimals Qty of products, for which "Qty Uses Decimals" set to "No"
|
1145 |
+
Fixed Excess semicolon in warning message, during creating Shipping Labels (in case with invalid Packaging Type)
|
1146 |
+
Fixed msrp_display_actual_price_type (MAP:Display Actual Price) field is not exported
|
1147 |
+
Fixed Incorrect Customs Value in Create Packages in case when price value contains decimals
|
1148 |
+
Fixed Incorrect warning message, after Additions products with Qty that exceeds maximum available quantity
|
1149 |
+
Fixed Catalog price rule doesn't work with contains condition and value which contains only cents
|
1150 |
+
Fixed No store base currency beside Customs Value
|
1151 |
+
Fixed Catalog Price Rule not applying to imported products
|
1152 |
+
Fixed Incorrect "Shipper" and "Ship to" information in Shipping Label (in case with UPS)
|
1153 |
+
Fixed Images are not imported via new Import functionality
|
1154 |
+
Fixed Packages Print looks incorrectly
|
1155 |
+
Fixed MAP. In the JS pop-up link "Checkout with PayPal" displayed only under FF
|
1156 |
+
Fixed Extra double-quote in transactional email template app/locale/en_US/template/email/password_new.html
|
1157 |
+
Fixed No ability to create Shipping Label for product with non-integer weight in Ounces (USPS - First-Class Mail International Package)
|
1158 |
+
Fixed Layout issue if RSS is On
|
1159 |
+
Fixed Previous customer information stays on the page header while one page checkout in process
|
1160 |
+
Fixed Out of Stock Configurable product is displayed as In Stock
|
1161 |
+
Fixed In the up-sell products "click to see price" link displayed, when settings "In cart", "Before Order Confirmation" is used
|
1162 |
+
Fixed MAP. On the onepage, in the Wishlist block, link "Click for Price" is not active
|
1163 |
+
Fixed Frontend: the products in Shopping Cart is transferred to other customer, if this customer is logged in in "My Account" page
|
1164 |
+
Fixed Wrong prices are displayed for placed order with downloadable product
|
1165 |
+
Fixed Shipping amount display issue when placing an order on the backend
|
1166 |
+
Fixed Length, Width, Height are not passed to shipping carrier, during package creation (in case with DHL)
|
1167 |
+
Fixed Disabled fields in Create Packages Pop-up with Girth field looks incorrectly
|
1168 |
+
Fixed Customer address that affect tax calculation does not affect persistent customer
|
1169 |
+
Fixed Ability to create more products in Shipping Labels than products in the order/shipment (in case with decimals Qty of products)
|
1170 |
+
Fixed No ability to create Shipping Labels with several packages (in case with decimals Qty of products)
|
1171 |
+
Fixed Formed items grid looks incorrectly, during package creation
|
1172 |
+
Fixed Incorrect total weight of bundle product
|
1173 |
+
Fixed Shopping Cart Rule Not Working Properly
|
1174 |
+
Fixed Javascript error on "forgot your password" validation
|
1175 |
+
Fixed When custom price is applied on an order in the admin, Price Incl tax on the order is the same as Excl tax
|
1176 |
+
Fixed Edit cart item return unnecessary error message
|
1177 |
+
Fixed Unable to save HTML code in attribute options
|
1178 |
+
Fixed In the Wishlist text message appears in 2 rows, when MAP is applied for product that is in the wishlist
|
1179 |
+
Fixed Unable to apply coupon code to order with zero subtotal
|
1180 |
+
Fixed Nonexistent blank option in multiple select form attribute
|
1181 |
+
Fixed Cannot add widget to packages or themes containing underscore in name
|
1182 |
+
Fixed Product's sort order by position works incorrect with negative numbers
|
1183 |
+
- allowed negative numbers
|
1184 |
+
- corrected sorting by position
|
1185 |
+
Fixed Incorrect Grand Total calculation when "Buy X get Y free" discount applied
|
1186 |
+
Fixed Wrong product's quantity in the Wishlist after updating 'Shopping Cart'
|
1187 |
+
Fixed Unneeded URL translation in admin template
|
1188 |
+
Fixed Incorrect subtotal on invoice creation page (Order with Tax and Discount)
|
1189 |
+
- hidden tax amount was added to collect process
|
1190 |
+
Fixed When we add new address to address book during onepage checkout, not shown customer address attributes are taken from saved address attribute value.
|
1191 |
+
Fixed Street Address input box missing on create order form in admin
|
1192 |
+
Fixed MAP enabled. In the wishlist block product price displayed when it should not
|
1193 |
+
Fixed Qty field is not disabled if even check-box unselected
|
1194 |
+
Fixed No ability to create Shipping Label with decimals Qty of products (in case with FedEx International)
|
1195 |
+
Fixed FedEx Shipping Method unavailable (in case with Request Courier drop off type)
|
1196 |
+
Fixed Unable to upgrade Magento when installed extension without max version
|
1197 |
+
Fixed Wrong calculation price of Bundle product
|
1198 |
+
- fixed sub item prices calculation
|
1199 |
+
Fixed Incorrect products weight in Shipping Label (in case with USPS Int.,FedEx Int. and decimal Qty)
|
1200 |
+
Fixed Gateway URL Absent in Fedex Shipping Module
|
1201 |
+
Fixed Google checkout shipping (merchant and carrier calculated) returns only default prices
|
1202 |
+
Fixed Frontend: the products in the Shopping Cart is not transferred to other customer, if this customer is logged in or register after clicks on "Checkout with Multiple Addresses", "Google Checkout" or "PayPal"
|
1203 |
+
Fixed Unable to login to site after adding SID to URL
|
1204 |
+
Fixed Image in description doesn't shown in compare grid
|
1205 |
+
Fixed Missed validation for space charter in begin of unique fields
|
1206 |
+
Fixed Impossible to sort blocks
|
1207 |
+
Fixed Incorrect behavior of Offline Refunds for an Order when Adjustment fee is specified
|
1208 |
+
Fixed Order saving error on backend
|
1209 |
+
Fixed Customer logged out by wrong SID cached in blocks
|
1210 |
+
Fixed System->Configuration->Advanced->Admin->Startup page->"Startup Page" drop-down - Optgroups are displayed after child elements
|
1211 |
+
Fixed Removed unused code from Varien_File_Uploader
|
1212 |
+
Fixed DHL Shipping Methods unavailable (in case with package type letter)
|
1213 |
+
Fixed Error via using Global Search [Search in Admin]
|
1214 |
+
Fixed Error is presented by saving address, creating order with created attributes type Image File or file(attachment)
|
1215 |
+
|
1216 |
+
|
1217 |
+
|
1218 |
+
==== 1.6.0.0-rc2 ====
|
1219 |
+
|
1220 |
+
=== Major Highlights ===
|
1221 |
+
Minimum Advertised Price
|
1222 |
+
Persistent Shopping Cart
|
1223 |
+
Known issues: if you see the Service Temporarily Unavailable page after refreshing the frontend, open the Magento installation
|
1224 |
+
directory on the server and remove the maintenance.flag file. Then go to Magento var directory and remove the cache directory.
|
1225 |
+
|
1226 |
+
=== Improvements ===
|
1227 |
+
XmlConnect package release v21
|
1228 |
+
Order Payment Action for Express Checkout (PayPal)
|
1229 |
+
- Added settings Authorization Honor Period and Order Valid Period into EC tab in the backend
|
1230 |
+
- Automatically new authorize transaction created after order transaction
|
1231 |
+
- Automatically cancel order after the expiration of Order Valid Period
|
1232 |
+
- Automatically authorize transaction void\create after the expiration of Authorization Honor Period
|
1233 |
+
Implemented Authorize.Net 'hold for review' status shows up as 'declined' in Magento.
|
1234 |
+
Add Dynamic sku option for configurable products
|
1235 |
+
Moneybookers Multistore System Configuration
|
1236 |
+
Moneybookers OBT Defaults
|
1237 |
+
PrototypeJS upgraded to 1.7
|
1238 |
+
|
1239 |
+
=== Changes ===
|
1240 |
+
Removed deprecation.js because its not compatible with prototype 1.7
|
1241 |
+
Relations between models and resource models were revised for better support of multiple databases
|
1242 |
+
* Varien_Db_Adapter_Pdo_Mysql revised
|
1243 |
+
* Introduced Varien_Db_Adapter_Interface, Varien_Db_Ddl_Table
|
1244 |
+
* Introduced new classes named resource helpers
|
1245 |
+
* Backwards comatibility and known issues
|
1246 |
+
** Flat attribute definition is not backward compatible
|
1247 |
+
** Old columns names are not fully mapped to new ones
|
1248 |
+
** Error appears after Customer Group saving with name length more than 32
|
1249 |
+
** Caching config in Database results in endless recursion
|
1250 |
+
** There's no sql upgrade for media storage tables
|
1251 |
+
Deprecated GoogleBase module (http://googlemerchantblog.blogspot.com/2010/12/new-shopping-apis-and-deprecation-of.html)
|
1252 |
+
|
1253 |
+
=== Fixes ===
|
1254 |
+
Fixed Package contents should be specified dynamically while creating shipping labels for the USPS International shipping methods
|
1255 |
+
Fixed Product option with file type input is not being transferred from wishlist to the cart
|
1256 |
+
- add mergeBuyRequest method to Mage_Wishlist_Model_Item
|
1257 |
+
- add checking of custom add to cart url in Mage_Catalog_Block_Product_View
|
1258 |
+
Fixed Import: Imported file is not saved to var/importexport
|
1259 |
+
Fixed Reports for Sales do not work except Paypal Settlement if several order statutes were selected
|
1260 |
+
Fixed No disabling of package type and dimensions fields (in case with USPS Domestic)
|
1261 |
+
Fixed Wrong behavior of composite configurable product during adding to the Shopping Cart via backend
|
1262 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1263 |
+
- added/removed several methods/packages for UPS shipping according to SRS
|
1264 |
+
Fixed "Notify for Quantity Below" does not work
|
1265 |
+
Fixed Frontend: Tier price not always applied to Mini Shopping Cart
|
1266 |
+
Fixed Void button is present on Order page, Authorization transaction is not closed when payment action is set to "authorize and charge" - Google Checkout
|
1267 |
+
Fixed MAP is applied to a Bundle product with dynamic price
|
1268 |
+
Fixed No ability to create Shipping Label with package size "Oversize"
|
1269 |
+
Fixed Button "Add to Cart" located in JS-popup (with Display Actual Price = On Gesture) doesn't work
|
1270 |
+
Fixed Incorrect Shipping Label for USPS Library Mail Shipping Methods
|
1271 |
+
Fixed Duplicating customer's addresses through placing order (backend)
|
1272 |
+
Fixed Updating the qty of products from backend does not allow checkout on Frontend
|
1273 |
+
- added ability to Quote and Quote items to track errors and remove them, when fixed, so whole 'error' status from Quote/Quote Item can be removed
|
1274 |
+
- removed duplicating messages on Cart View page
|
1275 |
+
Fixed No ability to create Shipping Label even if "Residential Delivery" set to "Yes" (in case with FedEx Home Delivery)
|
1276 |
+
Fixed Button "Add new address" for customer works incorrect (backend)
|
1277 |
+
Fixed It should be possible to set Minimum Qty Allowed in Shopping Cart setting via backend
|
1278 |
+
Fixed Cart Subtotal is shown incorrect in sidebar shopping cart
|
1279 |
+
Fixed Grid/list view settings do not save
|
1280 |
+
Fixed Cannot assign custom filter to the grid column
|
1281 |
+
Fixed Wishlist - product custom options are lost after customer login
|
1282 |
+
Fixed Saved products will be matched each target rule
|
1283 |
+
Fixed Taxes are not displayed in the catalog from frontend for Bundle products
|
1284 |
+
- re-factored work with taxes for bundle product
|
1285 |
+
Fixed Unable to save year less than 1970 in DOB customer attribute
|
1286 |
+
- added DATETIME type to DDL
|
1287 |
+
- fixed customer attributes to have same as pre-MMDB default values
|
1288 |
+
Fixed "Grand Total" is not displayed for a configurable product that contains product where DAP = display before order confirmation
|
1289 |
+
Fixed 'Click for price' not clickable after pressing 'Review' link in category
|
1290 |
+
Fixed Bundle price display issue with tier pricing
|
1291 |
+
- not considering tier price at bundle product's view page in price range
|
1292 |
+
Fixed Frontend: In the block "Recently Viewed Products" the products of two customers are mixed
|
1293 |
+
Fixed Error with Advanced Search (in case with Date Attribute)
|
1294 |
+
Fixed Tax Rate ignores set values of Post/Zip codes Range From-To and applies it to Address with any Zip codes
|
1295 |
+
Fixed Wishlist - Comment lost on config update
|
1296 |
+
Fixed Import cannot handle UTF-8 characters
|
1297 |
+
Fixed Welcome email template for store view scope is being ignored
|
1298 |
+
Fixed Incorrect behavior of bundle product during creating Shipping Label with Customs value (in case when Price: Fixed, Ship Bundle Items" set to Separately)
|
1299 |
+
Fixed Order status isn't changed when payed via Paypal if registered email differs characters cases (upper and lower)
|
1300 |
+
Fixed Unwanted orders are shown in Sales->Orders list when the date filter affects to the day when DST changes apply
|
1301 |
+
Fixed Payment method "Credit Card (saved)" does not display fields for fill in card information when product price is 0.00
|
1302 |
+
Fixed Available to create online invoice after performing void for order
|
1303 |
+
Fixed MAP configuration must contain default text for "Default Popup Text Message" and "Default "What's This" Text Message"
|
1304 |
+
Fixed Backwards compatibility loss results in fatal error in Google Shopping module
|
1305 |
+
- added all previous DDL constants to DDL Table, they are deprecated and being converted to new supported types
|
1306 |
+
- added support for 'char' attributes
|
1307 |
+
- fixed several incompatibilities in DDL Table
|
1308 |
+
Fixed No ability to create Shipping Label with package type "Flat-Rate Box" (in case with USPS International)
|
1309 |
+
Fixed Frontend: The block "Compare Products" with product is present on catalog page after adding the product to this block and clicking on "Not..?"
|
1310 |
+
Fixed Fatal error when trying to open configurable product with super attribute not in the appropriate attribute set
|
1311 |
+
Fixed Unable to return full amount on PayPal if partial credit memo is done and customer applied Store Credit
|
1312 |
+
Fixed When creating new order for customer registered on multiple websites, account/website mismatch causes issues
|
1313 |
+
Fixed Import Issue when attribute values not unique
|
1314 |
+
Fixed After upgrading Magento website left in the maintenance mode
|
1315 |
+
Fixed Ability to create more Shipping Labels than products in the order(shipment)
|
1316 |
+
Fixed Street Address and Street Address 2 are mixed up in request to shipping carrier (in case with USPS International)
|
1317 |
+
Fixed PayflowLink doesn't work (error "Payment has been declined. Please try again." is shown, Order is canceled)
|
1318 |
+
Fixed Shopping cart price rule with attribute does not work when "Use Flat Catalog Product" enabled
|
1319 |
+
Fixed Upgrade checking after cache flushed
|
1320 |
+
Fixed Frontend: Tier price not always applied to Mini Shopping Cart
|
1321 |
+
Fixed A message for the case when shipping label is created from the order should be modified
|
1322 |
+
Fixed Spelling mistake in abbreviations unit of mass measurement (lbs, kgs)
|
1323 |
+
Fixed FedEx Ground Shipping Method unavailable (if others FedEx Shipping Methods unavailable)
|
1324 |
+
Fixed Incorrect Signature Confirmation options in the drop-down (in case with UPS)
|
1325 |
+
Fixed Frontend: Catalog Price Rule does not apply to Mini Shopping Cart after login current customer
|
1326 |
+
- add recollect total prices for quote on customer register
|
1327 |
+
Fixed Fatal error when requesting non-existent file from Media directory
|
1328 |
+
Fixed Button "Add to Cart" located in JS-popup (with Display Actual Price = On Gesture) doesn't work.
|
1329 |
+
Fixed Headers sent twice or three times when file downloading
|
1330 |
+
Fixed Shipping method is calculating based on default shipping address instead of 'Same as billing' setting in backend
|
1331 |
+
Fixed No ability to create more that one online Partial Invoice with Google Checkout
|
1332 |
+
- parent transaction will be closed on payment model level;
|
1333 |
+
- fixed exception error in Mage_Tax_Model_Resource_Calculation
|
1334 |
+
Fixed Cross Sell Sorting Not Working
|
1335 |
+
Fixed No ability to create Shipping Label for USPS - First-Class Mail International Package
|
1336 |
+
Fixed Notification remove link in admin redirects to homepage on frontend in IE8
|
1337 |
+
Fixed Incorrect behavior of image gallery
|
1338 |
+
Fixed 'On Gesture' option is not applied on products' level
|
1339 |
+
Fixed The message that appears instead or totals in the shopping cart and mini shopping cart should be modified
|
1340 |
+
Fixed Void button present when order is fully invoiced
|
1341 |
+
Fixed No ability to create Shipping Label with package type "Flat-Rate Box" (in case with USPS International)
|
1342 |
+
Fixed MAP behavior for RSS feed pages should be changed (only "Click for price" link should be present)
|
1343 |
+
Fixed PayflowLink doesn't work (error "Payment has been declined. Please try again." is shown, Order is canceled)
|
1344 |
+
Fixed Incorrect Online Refund amount in Magento, when Adjustment Fee is specified (Google Checkout)
|
1345 |
+
Fixed Brazil PayPal requirements upgrade
|
1346 |
+
Fixed No ability to create Shipping Label with package type "Flat-Rate Box" (in case with USPS International)
|
1347 |
+
Fixed Issue with add to cart action, possible to add to cart a quantity of N+1 for a product.
|
1348 |
+
Fixed No ability to create Shipping Label if "ship to" in Canada (in case with UPS)
|
1349 |
+
Fixed Wrong content in export file (all export types)
|
1350 |
+
Fixed "Mysql" must be renamed to "MySQL" in installer
|
1351 |
+
Fixed File overwriting during Import/Export.
|
1352 |
+
Fixed Reuse of adapter utilities in helper
|
1353 |
+
Fixed MAP behavior for RSS feed pages should be changed (only "Click for price" link should be present)
|
1354 |
+
Fixed When changing locale that has Unicode characters, the countries are not sorting correctly
|
1355 |
+
Fixed Importing customers via csv
|
1356 |
+
Fixed Two void transactions created when using Payment Action = Order in PayPal Express
|
1357 |
+
Fixed Issue with newsletter subscriptions and logged in customers
|
1358 |
+
Fixed Frontend: Long-term cookie session is not over after click on "(Not..?)" link
|
1359 |
+
Fixed Mismatch counts of products for different scope
|
1360 |
+
Fixed Wrong config setting are implemented for MAP functionality in admin on product's level
|
1361 |
+
Fixed Street Address and Street Address 2 are mixed up in request to shipping carrier (in case with USPS International)
|
1362 |
+
Fixed No ability to create Shipping Label if "ship to" in Canada (in case with UPS)
|
1363 |
+
- fixed MonetaryValue to be whole number
|
1364 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1365 |
+
Fixed Add verification into predispatch observers used in persistent shopping cart
|
1366 |
+
Fixed Canceled orders should be excluded from Tax Reports
|
1367 |
+
Fixed No ability to create Shipping Label with package type "Flat-Rate Box" (in case with USPS International)
|
1368 |
+
Fixed Import/Export: Append Complex Data works incorrect with grouped products
|
1369 |
+
- check behavior was added
|
1370 |
+
Fixed Fatal error appears on get shipping rates for UPS if system base currency <> merchant country currency
|
1371 |
+
Fixed Map in the frontend link has "Click to see price" name, but must be "Click for price"
|
1372 |
+
Fixed Taxes are not displayed in the catalog from frontend for Bundle products
|
1373 |
+
Fixed Available to delete dropdown attribute which used in configurable product
|
1374 |
+
Fixed MySQL error with "max_allowed_packet" during check data step for a huge .csv file
|
1375 |
+
- Changed value for constant DB_MAX_PACKET_COEFFICIENT in Mage_ImportExport_Model_Resource_Helper_Mysql4
|
1376 |
+
Fixed Invalid requests to USPS API
|
1377 |
+
Fixed No ability to input some value in dimensions field in case for package type with non-standard dimensions
|
1378 |
+
Fixed Packages Pop-up looks incorrectly
|
1379 |
+
Fixed Caching config in Database results in endless recursion
|
1380 |
+
Fixed Shipping origin address used instead of the one specified in the RMA setting for Use Store Address = No
|
1381 |
+
Fixed No Signature Confirmation in Packages pop-up
|
1382 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1383 |
+
Fixed "NaN" instead of two dashes in Package pop-up (in case with disabled Length, Width and Height fields)
|
1384 |
+
Fixed Prefix and suffix aren't visible in Register Form
|
1385 |
+
- Modified persistent customer templates
|
1386 |
+
Fixed Unable to Checkout with Multiple Addresses with Registration
|
1387 |
+
Fixed Not work shipping methods Fedex & DHL
|
1388 |
+
- Re-factored DHL, Fedex, Ups, Usps
|
1389 |
+
- Fixed minor bugs for frontend(package.phtml, view.phtml) and backend(popup.phtml, shippingmethod.phtml)
|
1390 |
+
Fixed When we do reindex from console, folder var/log changes permissions from 0777 to 0775
|
1391 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1392 |
+
Fixed Orders placed through PayPal marked as "Suspected Fraud"
|
1393 |
+
- Added formatting amount into comparing
|
1394 |
+
Fixed Enable Log Cleaning option is not working properly
|
1395 |
+
Fixed Incorrect transparency of PNG image in indexed non-alpha mode
|
1396 |
+
Fixed Value from Total Weight field is not passed to shipping carrier (in case with DHL and UPS)
|
1397 |
+
Fixed After enabling dashboard chart admin user is unable to login to admin panel
|
1398 |
+
Fixed Sorting on Please Select products to Add doesn't work
|
1399 |
+
Fixed Catalog Price Rules - the rule is saved but not applied
|
1400 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1401 |
+
Fixed Cross Sell Sorting Not Working
|
1402 |
+
Fixed Error when obtaining missed file over get.php
|
1403 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1404 |
+
Fixed Unable to save Poll for more than one Store.
|
1405 |
+
Fixed Mage_Directory_Helper_Data::getRegionJson doesn't translate region names
|
1406 |
+
Fixed Static block in the Main Content Area overlaps border of the catalog of products
|
1407 |
+
Fixed 3D secure with Saved CC works incorrectly
|
1408 |
+
Fixed Shipping origin address used instead of the one specified in the RMA setting for Use Store Address = No
|
1409 |
+
Fixed Unable add Gift Options for Individual Items
|
1410 |
+
Fixed Customer Reports
|
1411 |
+
- avoid selections group by null customer id.
|
1412 |
+
Fixed Mysql4 install error
|
1413 |
+
Fixed "What's this?" link is absent, "Click for price" link doesn't work for shared Wishlist page.
|
1414 |
+
Fixed Incorrect Row Total Calculation in Refund
|
1415 |
+
- changed tax counting algorithm(now it counts tax for single item)
|
1416 |
+
Fixed Incorrect recipient name of Shipping Label
|
1417 |
+
Fixed Missing "Street Address Line 2" in Shipping Label (in case with DHL)
|
1418 |
+
Fixed After upgrading Magento website left in the maintenance mode
|
1419 |
+
Fixed Frontend: JavaScript error appears if user registered on Checkout Page.
|
1420 |
+
Fixed Added items to the Wishlist in the "Manage Shopping Cart" are not shown
|
1421 |
+
Fixed Information is not saved in DB after placing order during checkout
|
1422 |
+
Fixed Reports data wrong even after refreshing lifetime statistics
|
1423 |
+
Fixed Frontend can be broken by recursion
|
1424 |
+
Fixed Sub items are not displayed for the order for bundles, if user use Return and Orders link
|
1425 |
+
- added renderers for non-simple product types
|
1426 |
+
Fixed Error message for the case when store information is incomplete should be changed
|
1427 |
+
Fixed MAP behavior for RSS feed pages should be changed accordingly to SRS (only "Click for price" link should be present)
|
1428 |
+
Fixed Exception after upgrade Magento via diff files
|
1429 |
+
Fixed Frontend: The block "Compare Products" is empty after relogin
|
1430 |
+
Fixed Frontend: Catalog Price Rule does not apply to Mini Shopping Cart after login current customer
|
1431 |
+
- remove checking if customerGroupId exists because quote is loaded with existed customerGroupId as guest
|
1432 |
+
Fixed Unable to delete product with tag in pending status
|
1433 |
+
Fixed Images not imported using new Import/Export
|
1434 |
+
|
1435 |
+
|
1436 |
+
|
1437 |
+
==== 1.6.0.0-rc1 ====
|
1438 |
+
|
1439 |
+
=== Major Highlights ===
|
1440 |
+
Minimum Advertised Price
|
1441 |
+
Persistent Shopping Cart
|
1442 |
+
|
1443 |
+
=== Improvements ===
|
1444 |
+
XmlConnect package release v21
|
1445 |
+
Order Payment Action for Express Checkout (PayPal)
|
1446 |
+
- Added settings Authorization Honor Period and Order Valid Period into EC tab in the backend
|
1447 |
+
- Automatically new authorize transaction created after order transaction
|
1448 |
+
- Automatically cancel order after the expiration of Order Valid Period
|
1449 |
+
- Automatically authorize transaction void\create after the expiration of Authorization Honor Period
|
1450 |
+
Implemented Authorize.Net 'hold for review' status shows up as 'declined' in Magento.
|
1451 |
+
Add Dynamic sku option for configurable products
|
1452 |
+
Moneybookers Multistore System Configuration
|
1453 |
+
Moneybookers OBT Defaults
|
1454 |
+
PrototypeJS upgraded to 1.7
|
1455 |
+
|
1456 |
+
=== Changes ===
|
1457 |
+
Removed deprecation.js because its not compatible with prototype 1.7
|
1458 |
+
Relations between models and resource models were revised for better support of multiple databases
|
1459 |
+
* Varien_Db_Adapter_Pdo_Mysql revised
|
1460 |
+
* Introduced Varien_Db_Adapter_Interface, Varien_Db_Ddl_Table
|
1461 |
+
* Introduced new classes named resource helpers
|
1462 |
+
* Backwards comatibility and known issues
|
1463 |
+
** Flat attribute definition is not backward compatible
|
1464 |
+
** Old columns names are not fully mapped to new ones
|
1465 |
+
** Error appears after Customer Group saving with name length more than 32
|
1466 |
+
** Caching config in Database results in endless recursion
|
1467 |
+
** There's no sql upgrade for media storage tables
|
1468 |
+
Deprecated GoogleBase module (http://googlemerchantblog.blogspot.com/2010/12/new-shopping-apis-and-deprecation-of.html)
|
1469 |
+
|
1470 |
+
=== Fixes ===
|
1471 |
+
Fixed Upgrade checking after cache flushed
|
1472 |
+
Fixed Frontend: Tier price not always applied to Mini Shopping Cart
|
1473 |
+
Fixed A message for the case when shipping label is created from the order should be modified
|
1474 |
+
Fixed Spelling mistake in abbreviations unit of mass measurement (lbs, kgs)
|
1475 |
+
Fixed FedEx Ground Shipping Method unavailable (if others FedEx Shipping Methods unavailable)
|
1476 |
+
Fixed Incorrect Signature Confirmation options in the drop-down (in case with UPS)
|
1477 |
+
Fixed Frontend: Catalog Price Rule does not apply to Mini Shopping Cart after login current customer
|
1478 |
+
- add recollect total prices for quote on customer register
|
1479 |
+
Fixed Fatal error when requesting non-existent file from Media directory
|
1480 |
+
Fixed Button "Add to Cart" located in JS-popup (with Display Actual Price = On Gesture) doesn't work.
|
1481 |
+
Fixed Headers sent twice or three times when file downloading
|
1482 |
+
Fixed Shipping method is calculating based on default shipping address instead of 'Same as billing' setting in backend
|
1483 |
+
Fixed No ability to create more that one online Partial Invoice with Google Checkout
|
1484 |
+
- parent transaction will be closed on payment model level;
|
1485 |
+
- fixed exception error in Mage_Tax_Model_Resource_Calculation
|
1486 |
+
Fixed Cross Sell Sorting Not Working
|
1487 |
+
Fixed No ability to create Shipping Label for USPS - First-Class Mail International Package
|
1488 |
+
Fixed Notification remove link in admin redirects to homepage on frontend in IE8
|
1489 |
+
Fixed Incorrect behavior of image gallery
|
1490 |
+
Fixed 'On Gesture' option is not applied on products' level
|
1491 |
+
Fixed The message that appears instead or totals in the shopping cart and mini shopping cart should be modified
|
1492 |
+
Fixed Void button present when order is fully invoiced
|
1493 |
+
Fixed No ability to create Shipping Label with package type "Flat-Rate Box" (in case with USPS International)
|
1494 |
+
Fixed MAP behavior for RSS feed pages should be changed (only "Click for price" link should be present)
|
1495 |
+
Fixed PayflowLink doesn't work (error "Payment has been declined. Please try again." is shown, Order is canceled)
|
1496 |
+
Fixed Incorrect Online Refund amount in Magento, when Adjustment Fee is specified (Google Checkout)
|
1497 |
+
Fixed Brazil PayPal requirements upgrade
|
1498 |
+
Fixed No ability to create Shipping Label with package type "Flat-Rate Box" (in case with USPS International)
|
1499 |
+
Fixed Issue with add to cart action, possible to add to cart a quantity of N+1 for a product.
|
1500 |
+
Fixed No ability to create Shipping Label if "ship to" in Canada (in case with UPS)
|
1501 |
+
Fixed Wrong content in export file (all export types)
|
1502 |
+
Fixed "Mysql" must be renamed to "MySQL" in installer
|
1503 |
+
Fixed File overwriting during Import/Export.
|
1504 |
+
Fixed Reuse of adapter utilities in helper
|
1505 |
+
Fixed MAP behavior for RSS feed pages should be changed (only "Click for price" link should be present)
|
1506 |
+
Fixed When changing locale that has Unicode characters, the countries are not sorting correctly
|
1507 |
+
Fixed Importing customers via csv
|
1508 |
+
Fixed Two void transactions created when using Payment Action = Order in PayPal Express
|
1509 |
+
Fixed Issue with newsletter subscriptions and logged in customers
|
1510 |
+
Fixed Frontend: Long-term cookie session is not over after click on "(Not..?)" link
|
1511 |
+
Fixed Mismatch counts of products for different scope
|
1512 |
+
Fixed Wrong config setting are implemented for MAP functionality in admin on product's level
|
1513 |
+
Fixed Street Address and Street Address 2 are mixed up in request to shipping carrier (in case with USPS International)
|
1514 |
+
Fixed No ability to create Shipping Label if "ship to" in Canada (in case with UPS)
|
1515 |
+
- fixed MonetaryValue to be whole number
|
1516 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1517 |
+
Fixed Add verification into predispatch observers used in persistent shopping cart
|
1518 |
+
Fixed Canceled orders should be excluded from Tax Reports
|
1519 |
+
Fixed No ability to create Shipping Label with package type "Flat-Rate Box" (in case with USPS International)
|
1520 |
+
Fixed Import/Export: Append Complex Data works incorrect with grouped products
|
1521 |
+
- check behavior was added
|
1522 |
+
Fixed Fatal error appears on get shipping rates for UPS if system base currency <> merchant country currency
|
1523 |
+
Fixed Map in the frontend link has "Click to see price" name, but must be "Click for price"
|
1524 |
+
Fixed Taxes are not displayed in the catalog from frontend for Bundle products
|
1525 |
+
Fixed Available to delete dropdown attribute which used in configurable product
|
1526 |
+
Fixed MySQL error with "max_allowed_packet" during check data step for a huge .csv file
|
1527 |
+
- Changed value for constant DB_MAX_PACKET_COEFFICIENT in Mage_ImportExport_Model_Resource_Helper_Mysql4
|
1528 |
+
Fixed Invalid requests to USPS API
|
1529 |
+
Fixed No ability to input some value in dimensions field in case for package type with non-standard dimensions
|
1530 |
+
Fixed Packages Pop-up looks incorrectly
|
1531 |
+
Fixed Caching config in Database results in endless recursion
|
1532 |
+
Fixed Shipping origin address used instead of the one specified in the RMA setting for Use Store Address = No
|
1533 |
+
Fixed No Signature Confirmation in Packages pop-up
|
1534 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1535 |
+
Fixed "NaN" instead of two dashes in Package pop-up (in case with disabled Length, Width and Height fields)
|
1536 |
+
Fixed Prefix and suffix aren't visible in Register Form
|
1537 |
+
- Modified persistent customer templates
|
1538 |
+
Fixed Unable to Checkout with Multiple Addresses with Registration
|
1539 |
+
Fixed Not work shipping methods Fedex & DHL
|
1540 |
+
- Re-factored DHL, Fedex, Ups, Usps
|
1541 |
+
- Fixed minor bugs for frontend(package.phtml, view.phtml) and backend(popup.phtml, shippingmethod.phtml)
|
1542 |
+
Fixed When we do reindex from console, folder var/log changes permissions from 0777 to 0775
|
1543 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1544 |
+
Fixed Orders placed through PayPal marked as "Suspected Fraud"
|
1545 |
+
- Added formatting amount into comparing
|
1546 |
+
Fixed Enable Log Cleaning option is not working properly
|
1547 |
+
Fixed Impossible to do online refund for "CyberSource" payment method
|
1548 |
+
Fixed Incorrect transparency of PNG image in indexed non-alpha mode
|
1549 |
+
Fixed Value from Total Weight field is not passed to shipping carrier (in case with DHL and UPS)
|
1550 |
+
Fixed After enabling dashboard chart admin user is unable to login to admin panel
|
1551 |
+
Fixed Sorting on Please Select products to Add doesn't work
|
1552 |
+
Fixed Catalog Price Rules - the rule is saved but not applied
|
1553 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1554 |
+
Fixed Cross Sell Sorting Not Working
|
1555 |
+
Fixed Error when obtaining missed file over get.php
|
1556 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1557 |
+
Fixed Unable to save Poll for more than one Store.
|
1558 |
+
Fixed Mage_Directory_Helper_Data::getRegionJson doesn't translate region names
|
1559 |
+
Fixed Static block in the Main Content Area overlaps border of the catalog of products
|
1560 |
+
Fixed 3D secure with Saved CC works incorrectly
|
1561 |
+
Fixed Shipping origin address used instead of the one specified in the RMA setting for Use Store Address = No
|
1562 |
+
Fixed Unable add Gift Options for Individual Items
|
1563 |
+
Fixed Customer Reports
|
1564 |
+
- avoid selections group by null customer id.
|
1565 |
+
Fixed Mysql4 install error
|
1566 |
+
Fixed "What's this?" link is absent, "Click for price" link doesn't work for shared Wishlist page.
|
1567 |
+
Fixed Incorrect Row Total Calculation in Refund
|
1568 |
+
- changed tax counting algorithm(now it counts tax for single item)
|
1569 |
+
Fixed Incorrect recipient name of Shipping Label
|
1570 |
+
Fixed Missing "Street Address Line 2" in Shipping Label (in case with DHL)
|
1571 |
+
Fixed After upgrading Magento website left in the maintenance mode
|
1572 |
+
Fixed Frontend: JavaScript error appears if user registered on Checkout Page.
|
1573 |
+
Fixed Added items to the Wishlist in the "Manage Shopping Cart" are not shown
|
1574 |
+
Fixed Information is not saved in DB after placing order during checkout
|
1575 |
+
Fixed Reports data wrong even after refreshing lifetime statistics
|
1576 |
+
Fixed Frontend can be broken by recursion
|
1577 |
+
Fixed Sub items are not displayed for the order for bundles, if user use Return and Orders link
|
1578 |
+
- added renderers for non-simple product types
|
1579 |
+
Fixed Error message for the case when store information is incomplete should be changed
|
1580 |
+
Fixed MAP behavior for RSS feed pages should be changed accordingly to SRS (only "Click for price" link should be present)
|
1581 |
+
Fixed Exception after upgrade Magento via diff files
|
1582 |
+
Fixed Frontend: The block "Compare Products" is empty after relogin
|
1583 |
+
Fixed Frontend: Catalog Price Rule does not apply to Mini Shopping Cart after login current customer
|
1584 |
+
- remove checking if customerGroupId exists because quote is loaded with existed customerGroupId as guest
|
1585 |
+
Fixed Unable to delete product with tag in pending status
|
1586 |
+
Fixed Images not imported using new Import/Export
|
1587 |
+
|
1588 |
+
|
1589 |
+
|
1590 |
+
==== 1.6.x-devel-112177 ====
|
1591 |
+
|
1592 |
+
=== Improvements ===
|
1593 |
+
XmlConnect package release v21
|
1594 |
+
|
1595 |
+
=== Changes ===
|
1596 |
+
Removed deprecation.js because its not compatible with prototype 1.7
|
1597 |
+
|
1598 |
+
=== Fixes ===
|
1599 |
+
Fixed MySQL error with "max_allowed_packet" during check data step for a huge .csv file
|
1600 |
+
- Changed value for constant DB_MAX_PACKET_COEFFICIENT in Mage_ImportExport_Model_Resource_Helper_Mysql4
|
1601 |
+
Fixed Invalid requests to USPS API
|
1602 |
+
Fixed No ability to input some value in dimensions field in case for package type with non-standard dimensions
|
1603 |
+
Fixed Packages Pop-up looks incorrectly
|
1604 |
+
Fixed Caching config in Database results in endless recursion
|
1605 |
+
Fixed Shipping origin address used instead of the one specified in the RMA setting for Use Store Address = No
|
1606 |
+
Fixed No Signature Confirmation in Packages pop-up
|
1607 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1608 |
+
Fixed "NaN" instead of two dashes in Package pop-up (in case with disabled Length, Width and Height fields)
|
1609 |
+
Fixed Prefix and suffix aren't visible in Register Form
|
1610 |
+
- Modified persistent customer templates
|
1611 |
+
Fixed Unable to Checkout with Multiple Addresses with Registration
|
1612 |
+
Fixed Not work shipping methods Fedex & DHL
|
1613 |
+
- Re-factored DHL, Fedex, Ups, Usps
|
1614 |
+
- Fixed minor bugs for frontend(package.phtml, view.phtml) and backend(popup.phtml, shippingmethod.phtml)
|
1615 |
+
Fixed When we do reindex from console, folder var/log changes permissions from 0777 to 0775
|
1616 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1617 |
+
Fixed Orders placed through PayPal marked as "Suspected Fraud"
|
1618 |
+
- Added formatting amount into comparing
|
1619 |
+
Fixed Enable Log Cleaning option is not working properly
|
1620 |
+
Fixed Impossible to do online refund for "CyberSource" payment method
|
1621 |
+
Fixed Incorrect transparency of PNG image in indexed non-alpha mode
|
1622 |
+
Fixed Value from Total Weight field is not passed to shipping carrier (in case with DHL and UPS)
|
1623 |
+
Fixed After enabling dashboard chart admin user is unable to login to admin panel
|
1624 |
+
Fixed Sorting on Please Select products to Add doesn't work
|
1625 |
+
Fixed Catalog Price Rules - the rule is saved but not applied
|
1626 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1627 |
+
Fixed Cross Sell Sorting Not Working
|
1628 |
+
Fixed Error when obtaining missed file over get.php
|
1629 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1630 |
+
Fixed Unable to save Poll for more than one Store.
|
1631 |
+
Fixed Mage_Directory_Helper_Data::getRegionJson doesn't translate region names
|
1632 |
+
Fixed Static block in the Main Content Area overlaps border of the catalog of products
|
1633 |
+
Fixed 3D secure with Saved CC works incorrectly
|
1634 |
+
Fixed Shipping origin address used instead of the one specified in the RMA setting for Use Store Address = No
|
1635 |
+
Fixed Unable add Gift Options for Individual Items
|
1636 |
+
Fixed Customer Reports
|
1637 |
+
- avoid selections group by null customer id.
|
1638 |
+
Fixed Mysql4 install error
|
1639 |
+
Fixed "What's this?" link is absent, "Click for price" link doesn't work for shared Wishlist page.
|
1640 |
+
Fixed Incorrect Row Total Calculation in Refund
|
1641 |
+
- changed tax counting algorithm(now it counts tax for single item)
|
1642 |
+
Fixed Incorrect recipient name of Shipping Label
|
1643 |
+
Fixed Missing "Street Address Line 2" in Shipping Label (in case with DHL)
|
1644 |
+
Fixed After upgrading Magento website left in the maintenance mode
|
1645 |
+
Fixed Frontend: JavaScript error appears if user registered on Checkout Page.
|
1646 |
+
Fixed Added items to the Wishlist in the "Manage Shopping Cart" are not shown
|
1647 |
+
Fixed Information is not saved in DB after placing order during checkout
|
1648 |
+
Fixed Reports data wrong even after refreshing lifetime statistics
|
1649 |
+
Fixed Frontend can be broken by recursion
|
1650 |
+
Fixed Sub items are not displayed for the order for bundles, if user use Return and Orders link
|
1651 |
+
- added renderers for non-simple product types
|
1652 |
+
Fixed Error message for the case when store information is incomplete should be changed
|
1653 |
+
Fixed MAP behavior for RSS feed pages should be changed accordingly to SRS (only "Click for price" link should be present)
|
1654 |
+
Fixed Exception after upgrade Magento via diff files
|
1655 |
+
Fixed Frontend: The block "Compare Products" is empty after relogin
|
1656 |
+
Fixed Frontend: Catalog Price Rule does not apply to Mini Shopping Cart after login current customer
|
1657 |
+
- remove checking if customerGroupId exists because quote is loaded with existed customerGroupId as guest
|
1658 |
+
Fixed Unable to delete product with tag in pending status
|
1659 |
+
Fixed Images not imported using new Import/Export
|
1660 |
+
|
1661 |
+
|
1662 |
+
|
1663 |
+
==== 1.6.0.0-beta1 ====
|
1664 |
+
|
1665 |
+
=== Major Highlights ===
|
1666 |
+
Minimum Advertised Price
|
1667 |
+
Persistent Shopping Cart
|
1668 |
+
|
1669 |
+
=== Improvements ===
|
1670 |
+
Order Payment Action for Express Checkout (PayPal)
|
1671 |
+
- Added settings Authorization Honor Period and Order Valid Period into EC tab in the backend
|
1672 |
+
- Automatically new authorize transaction created after order transaction
|
1673 |
+
- Automatically cancel order after the expiration of Order Valid Period
|
1674 |
+
- Automatically authorize transaction void\create after the expiration of Authorization Honor Period
|
1675 |
+
Implemented Authorize.Net 'hold for review' status shows up as 'declined' in Magento.
|
1676 |
+
|
1677 |
+
=== Fixes ===
|
1678 |
+
Fixed Reindex Data works with errors
|
1679 |
+
Fixed Group product is exported incorrectly : associated product values are not included
|
1680 |
+
- reorganized counting of an array elements. Passing array items by link, broke scripts logic below.
|
1681 |
+
Fixed Sql install and upgrade issues
|
1682 |
+
- updated customer address attributes
|
1683 |
+
Fixed Apply dashboard reports fix
|
1684 |
+
Fixed The Find Feed is not reporting the correct values
|
1685 |
+
Fixed show free payment method is enabled
|
1686 |
+
Fixed Tax is not applied for products that are currently in the Wishlist
|
1687 |
+
Fixed Unable to import products
|
1688 |
+
- an collection was replaced with method which use less memory
|
1689 |
+
Fixed It is impossible apply for product any tax class for 'Storeview' scope
|
1690 |
+
- Added field is_global into the setup field map
|
1691 |
+
Fixed Increased import data field size for huge imports.
|
1692 |
+
Fixed Store view value for attribute fixed not to override global scope
|
1693 |
+
Fixed Sort-titles Visibility and Status in admin redirects to Dashboard on frontend and create exception.
|
1694 |
+
Fixed Configurable product uses setting from associated products
|
1695 |
+
Fixed Simple Product does not have a "PayPal Checkout" button when a Product is an item of Grouped Product
|
1696 |
+
Fixed Unable to import large Qty (several hundreds and more) of products using new import (tested with over 10,000 SKUs)
|
1697 |
+
Fixed Apply dashboard reports fix
|
1698 |
+
- fixed Reports-Sales-Orders revenue formula
|
1699 |
+
Fixed authorization number detection and order transaction voiding
|
1700 |
+
Fixed Session Lifetime (seconds) with value 9999999999999999 brakes all backend with warning
|
1701 |
+
Fixed Images not imported
|
1702 |
+
- added import/export for product media gallery
|
1703 |
+
Fixed Provide backwards compatibility for setting Foreign Keys on changed core columns
|
1704 |
+
- implemented auto-modifying foreign keys for column definitions
|
1705 |
+
Fixed "Number of Child Authorizations" does not working
|
1706 |
+
Fixed Database session storage doesn't work
|
1707 |
+
- receive session_data instead of session_id
|
1708 |
+
Fixed No ability to create Shipping Label after unsuccessful attempt (in a create shipment page)
|
1709 |
+
Fixed USPSs Domestic Shipping Methods unavailable
|
1710 |
+
Fixed Order Row Subtotal is incorrect (Order with Tax and Discount)
|
1711 |
+
- fixed row subtotal tax counting.
|
1712 |
+
Fixed Unable to use capture online/offline when creating invoice of edited/reordered Authorize.net orders
|
1713 |
+
Fixed There are no special titles for 'Site Map', 'Search Terms', 'Contact Us', 'Forgot Your Password' pages.
|
1714 |
+
Fixed Table Rate Shipping Method value column needs to be sorted in ascending order
|
1715 |
+
Fixed Incorrect titles in "Product Tax Classes" tab.
|
1716 |
+
Fixed Sending invoice email don`t change the status.
|
1717 |
+
Fixed Admin should be able to perform online invoice after void transaction
|
1718 |
+
- Added possibility to reauthorize orders with "order" payment action after void
|
1719 |
+
Fixed Admin should be able to perform online invoice after void transaction
|
1720 |
+
- Don't call for authorization if previous is alive
|
1721 |
+
Fixed Wrong customer group in order creation process in Admin panel
|
1722 |
+
- Set new customer group to all his quotes for all stores on customer save
|
1723 |
+
Fixed dot and tilde in base url during installation.
|
1724 |
+
Fixed: Magento allows admin to create category/product url rewrite for a store that doesn't have this category/product
|
1725 |
+
- on prepare for render js categories tree using extjs library, collecting allowed categories for product, if product selected and product id present at request params. Then disabling all categories that can't be selected.
|
1726 |
+
Fixed Incorrect dependencies between modules and code usage.
|
1727 |
+
Fixed Admin doesn't sees bundle products that was added to Wishlist in backend.
|
1728 |
+
Fixed Admin user interface: mistake in the label name, Id instead ID.
|
1729 |
+
Fixed Warning message in backend when trying to set condition for new Shopping cart price rule
|
1730 |
+
Fixed Wrong customer group in order creation process in Admin panel
|
1731 |
+
- Set new customer group to all his quotes for all stores on customer save
|
1732 |
+
Fixed dot and tilde in base url during installation.
|
1733 |
+
Implemented Order Payment Action for Express Checkout (PayPal) Upgrade
|
1734 |
+
- Added system menu changes
|
1735 |
+
Fixed Incorrect dependencies between modules and code usage.
|
1736 |
+
Fixed Flat attribute definition is not backward compatible
|
1737 |
+
- partly reverted previous changes;
|
1738 |
+
- added compatible mode for Db adapters;
|
1739 |
+
- small code style fixes
|
1740 |
+
Fixed Table Rate Shipping Method value column needs to be sorted in ascending order
|
1741 |
+
Fixed Column "Sales Total Amount" of Coupons Sales Reports calculates in wrong way
|
1742 |
+
- Changed the mathematical formula of counting Sales Total Amount
|
1743 |
+
- Changed the lines, that contains more than 120 characters
|
1744 |
+
Fixed Admin doesn't sees bundle products that was added to Wishlist in backend.
|
1745 |
+
Fixed Admin user interface: mistake in the label name, Id instead ID.
|
1746 |
+
Fixed Sending invoice email don`t change the status.
|
1747 |
+
Fixed Possibility of online invoice still exist when Order Valid Period = 0
|
1748 |
+
- Fixed store detection on capture
|
1749 |
+
Fixed Admin should be able to perform online invoice after void transaction
|
1750 |
+
- Added possibility to reauthorize orders with "order" payment action after void
|
1751 |
+
Fixed Grouped product imported without associated products
|
1752 |
+
- added $linksRows definition
|
1753 |
+
Fixed Admin should be able to perform online invoice after void transaction
|
1754 |
+
- Don't call for authorization if previous is alive
|
1755 |
+
Fixed There are no special titles for 'Site Map', 'Search Terms', 'Contact Us', 'Forgot Your Password' pages.
|
1756 |
+
Fixed Incorrect titles in "Product Tax Classes" tab.
|
1757 |
+
Fixed Categories moving provides Fatal error
|
1758 |
+
Fixed System - > Configuration - > inventory tab disappears when switching to Website/Store view scope
|
1759 |
+
Fixed Default store group with empty default store view causes fatal error on System>Configuration>Catalog>Catalog
|
1760 |
+
Fixed Limit of collection for Random Product Block
|
1761 |
+
Fixed Notification remove link in admin redirects to homepage on frontend in IE8
|
1762 |
+
Fixed translate function fixed to use translator (for editor labels and buttons)
|
1763 |
+
Fixed Admin should be able to perform online invoice after void transaction
|
1764 |
+
- Don't call for authorization if previous is alive
|
1765 |
+
Fixed There are no server-side validation for required options (attributes) of Configurable product.
|
1766 |
+
Fixed Full checkout "blocking" when delete product that was already added to the shopping cart.
|
1767 |
+
Fixed No ability to submit order in back-end(in case with selected "Same As Billing Address" check box).
|
1768 |
+
Fixed On the product view page action panel disappears after user manipulation on IE7/8.
|
1769 |
+
Fixed Product Flat Data is not reindexed in Mysql
|
1770 |
+
- default value must be unset for new column format
|
1771 |
+
Fixed Varien Image crop implementation fixed
|
1772 |
+
Fixed translation of quoted strings, added ability to move parameters on next line
|
1773 |
+
Fixed comment node in system.xml to be translated
|
1774 |
+
Fixed Default email "emaildomain.com" is a real domain.
|
1775 |
+
Fixed Non-active button "continue to review your order" in multiple address checkout.
|
1776 |
+
Fixed Ability to view another customer's Wishlist contents via RSS URL.
|
1777 |
+
Fixed Incorrect design of the Payment Method sub-menu with billing agreement information in default CE theme
|
1778 |
+
Fixed 'Term and Conditions' are not visible with PayPal Express Checkout in 'Review Order' page.
|
1779 |
+
Fixed Reports->Products does not work
|
1780 |
+
- Removed "order by" from count
|
1781 |
+
Fixed Fatal error during filtering products on frontend by Price (decimal) type attribute
|
1782 |
+
Fixed Tax rounding and calculation
|
1783 |
+
- $address->_store replaced with $address->getQuote()->getStore()
|
1784 |
+
Fixed Old column names are not fully mapped to new ones
|
1785 |
+
- Fixed wrong data, returned by helpers to init old fields map
|
1786 |
+
- Fixed @return phpDoc comments
|
1787 |
+
- Used array_merge() instead of "+" - for better readability
|
1788 |
+
Fixed Magento is not able to install on several versions of MySQL (5.041, Windows)
|
1789 |
+
Fixed There are no special titles for 'Site Map', 'Search Terms', 'Contact Us', 'Forgot Your Password' pages.
|
1790 |
+
Fixed Export: Error during export products
|
1791 |
+
- added checks for an empty array of $productIds
|
1792 |
+
Fixed Invalid language on import error
|
1793 |
+
Fixed No ability to print Shipping Label
|
1794 |
+
Fixed Enabled "Custom Admin URL" makes impossible access to backend
|
1795 |
+
Fixed Backordered Item Status on Orders
|
1796 |
+
- fixed problem when same product is an option of different composite (bundle, etc.) products
|
1797 |
+
Fixed Scheduled newsletter queues should be sent
|
1798 |
+
Fixed Export doesn't work when we have a lot of products in
|
1799 |
+
Fixed 'Term and Conditions' are not visible with PayPal Express Checkout in 'Review Order' page
|
1800 |
+
- Added block checkout/agreements into PayPal EC UK checkout order review page
|
1801 |
+
Fixed Wrong price calculation for bundle products during Customer's shopping cart managing (Just for new prototype version)
|
1802 |
+
- addProductAdvanced was replaced by addProduct
|
1803 |
+
Fixed Order Row Subtotal is incorrect (Order with Tax and Discount)
|
1804 |
+
- Product qty was not included during counting Subtotal amount.
|
1805 |
+
Fixed Enabled "Custom Admin URL" makes impossible access to backend
|
1806 |
+
- labels in System Configuration were changed
|
1807 |
+
Fixed Backordered Item Status on Orders
|
1808 |
+
- fixed problem when same product is an option of different composite (bundle, etc.) products
|
1809 |
+
Fixed Export doesn't work when we have a lot of products in
|
1810 |
+
Fixed 'Term and Conditions' are not visible with PayPal Express Checkout in 'Review Order' page
|
1811 |
+
- Added block checkout/agreements into PayPal EC UK checkout order review page
|
1812 |
+
Fixed Wrong price calculation for bundle products during Customer's shopping cart managing (Just for new prototype version)
|
1813 |
+
- addProductAdvanced was replaced by addProduct
|
1814 |
+
Fixed Order Row Subtotal is incorrect (Order with Tax and Discount)
|
1815 |
+
- Product qty was not included during counting Subtotal amount.
|
1816 |
+
Fixed WYSIWYG Editor - Unable to Create a Folder when Inserting a File.
|
1817 |
+
Fixed Mage_Adminhtml_Block_Widget_Grid_Container to translate default label strings
|
1818 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1819 |
+
Fixed Flat attribute definition is not backward compatible
|
1820 |
+
- removed ability to setup compatibility mode in admin, because it is not supported in module init
|
1821 |
+
Fixed Flat attribute definition is not backward compatible
|
1822 |
+
Fixed Incorrect path format when Media Storage is set to Database, unable to upload file for import
|
1823 |
+
Fixed Unneeded popup window is opened through adding new product
|
1824 |
+
Fixed Sorting on Please Select products to Add does not work
|
1825 |
+
Added Admin can view and change products price with No Read Permission
|
1826 |
+
- Added dispatching event catalog_product_attribute_update_before
|
1827 |
+
- Added deleting attribute data in attribute updating model if the admin has not permissions
|
1828 |
+
- Added disabling attribute fields in the block if the admin has not permissions
|
1829 |
+
Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up
|
1830 |
+
Fixed Sorting on Please Select products to Add does not work
|
1831 |
+
Fixed There's no sql upgrade for media storage tables
|
1832 |
+
- also fixed issue with creating media storage tables on mysql 4.1.x
|
1833 |
+
Fixed Admin can change status of products with No Read Permission
|
1834 |
+
- Added massaction item deleting in massaction block combobox if the admin has not permissions
|
1835 |
+
Fixed Unable to place order with Authorize.net Direct Post payment method in IE 9
|
1836 |
+
Fixed No ability to create Shipping Label(in case with UPS International)
|
1837 |
+
- fixed Delivery confirmation for UPS using its API documentation
|
1838 |
+
Fixed No ability to create Shipping Label if pop-up contain Girth field (in case with USPS Domestic)
|
1839 |
+
- Fixed using girth field according to USPS API documentation
|
1840 |
+
Fixed Requested Qty, Authorized Qty, Returned Qty and Approved Qty must validate data to allow only digits
|
1841 |
+
Fixed Apply dashboard reports fix
|
1842 |
+
Fixed Email notifications do no show items with other than Authorize/Pending status
|
1843 |
+
- Fix itself plus some refactoring
|
1844 |
+
Fixed Special price is not displayed on the category page if "Special Price From Date" & "Special Price To Date" fields are filled.
|
1845 |
+
Fixed "Localhost" isn't a valid domain name for installation
|
1846 |
+
Fixed No ability to cancel Partial Authorization checkout with Authorize.net on frontend
|
1847 |
+
Fixed Persistent Shopping Cart should be disabled by default
|
1848 |
+
Fixed Lightbox 2.5 with IE7 returns JS error on the page
|
1849 |
+
Fixed Fatal error during filtering products on frontend by Price (decimal) type attribute
|
1850 |
+
- There was a problem with catalog_product_index_eav_decimal(_tmp) tables, a field 'value' should not be present in PRIMARY_KEY constraints
|
1851 |
+
Fixed Fatal error during filtering products on frontend by Price (decimal) type attribute
|
1852 |
+
- Update was fixed.
|
1853 |
+
Fixed Missing Capture transaction in backend when capture money from PayPal (PayPal UK Express)
|
1854 |
+
Fixed PayPal Website Payments Pro Payflow Edition Direct Payment does not work
|
1855 |
+
- Fixed COUNTRYCODE back to COUNTRY in outgoing request to PayPal Website Payments Pro Payflow
|
1856 |
+
Edition Direct Payment, but preserved COUNTRYCODE in parsing incoming request.*
|
1857 |
+
Fixed "NaN" instead of two dashes in Package pop-up (in case with disabled Length, Width and Height fields)
|
1858 |
+
Fixed Reports: Products Ordered report does not work
|
1859 |
+
- added function _construct for setting property useAnalyticFunction = true
|
1860 |
+
Fixed During creating order no warning message appears for non-configured Composite product and
|
1861 |
+
Authorize.net Direct Post payment method
|
1862 |
+
- The redirect patch for processing exception is changed from */*/ to */sales_order_create/
|
1863 |
+
Fixed Broken backwards compatibility in adapters addIndex/dropIndex, addKey/dropKey methods
|
1864 |
+
- fixed returned values to be backwards compatible
|
1865 |
+
Fixed Ability to input some value in dimensions field in case for package type with standard dimensions
|
1866 |
+
Fixed USPS is available Shipping Method from EU to EU
|
1867 |
+
Fixed Interface is blocked after user manipulation with Details link and Other reason link
|
1868 |
+
Fixed Reorder and "Create Order" in admin without Read, Edit permissions does not work and create exception.
|
1869 |
+
- Added a checking. removeColumn method will be called if a block is a grid only.
|
1870 |
+
Fixed In case Allow Reorder=No, Reorder still available
|
1871 |
+
- store dependency was added(patch was applied)
|
1872 |
+
Fixed No ability to login or register new customer in frontend (IE8)
|
1873 |
+
Fixed Enabled "Custom Admin URL" makes impossible access to backend
|
1874 |
+
- fixed config cache issue
|
1875 |
+
|
1876 |
+
|
1877 |
+
==== 1.6.x-devel-109807 ====
|
1878 |
+
|
1879 |
+
=== Major Highlights ===
|
1880 |
+
Minimum Advertised Price
|
1881 |
+
Persistent Shopping Cart
|
1882 |
+
|
1883 |
+
=== Improvements ===
|
1884 |
+
Order Payment Action for Express Checkout (PayPal)
|
1885 |
+
- Added settings Authorization Honor Period and Order Valid Period into EC tab in the backend
|
1886 |
+
- Automatically new authorize transaction created after order transaction
|
1887 |
+
- Automatically order cancel after the expiration of Order Valid Period
|
1888 |
+
- Automatically authorize transaction void\creat after the expiration of Authorization Honor Period
|
1889 |
+
Implemented Authorize.Net 'hold for review' status shows up as 'declined' in Magento.
|
1890 |
+
|
1891 |
+
=== Fixes ===
|
1892 |
+
Fixed Reindex Data works with errors
|
1893 |
+
Fixed Group product is exported incorrectly : associated product values are not included
|
1894 |
+
- reorganized counting of an array elements. Passing array items by link, broke scripts logic below.
|
1895 |
+
Fixed Sql install and upgrade issues
|
1896 |
+
- updated customer address attributes
|
1897 |
+
Fixed Apply dashboard reports fix
|
1898 |
+
Fixed The Find Feed is not reporting the correct values
|
1899 |
+
Fixed Fixed show free payment method is enabled
|
1900 |
+
Fixed Tax is not applied for products that are currently in the Wishlist
|
1901 |
+
Fixed Unable to import products
|
1902 |
+
- an collection was replaced with method which use less memory
|
1903 |
+
Fixed It is impossible apply for product any tax class for 'Storeview' scope
|
1904 |
+
- Added field is_global into the setup field map
|
1905 |
+
Fixed Increased import data field size for huge imports.
|
1906 |
+
Fixed Store view value for attribute fixed not to override global scope
|
1907 |
+
Fixed Sort-titles Visibility and Status in admin redirects to Dashboard on frontend and create exception.
|
1908 |
+
Fixed Configurable product uses setting from associated products
|
1909 |
+
Fixed Simple Product does not have a "PayPal Checkout" button when a Product is an item of Grouped Product
|
1910 |
+
Fixed Unable to import large Qty (several hundreds and more) of products using new import
|
1911 |
+
Fixed Apply dashboard reports fix
|
1912 |
+
- fixed Reports-Sales-Orders revenue formula
|
1913 |
+
Fixed Fixed authorization number detection and order transaction voiding
|
1914 |
+
Fixed Session Lifetime (seconds) with value 9999999999999999 brakes all backend with warning
|
1915 |
+
Fixed Images not imported
|
1916 |
+
- added import/export for product media gallery
|
1917 |
+
Fixed Provide backwards compatibility for setting Foreign Keys on changed core columns
|
1918 |
+
- implemented auto-modifying foreign keys for column definitions
|
1919 |
+
Fixed "Number of Child Authorizations" does not working
|
1920 |
+
Fixed Database session storage doesn't work
|
1921 |
+
- receive session_data instead of session_id
|
1922 |
+
Fixed No ability to create Shipping Label after unsuccessful attempt (in a create shipment page)
|
1923 |
+
Fixed USPSs Domestic Shipping Methods unavailable
|
1924 |
+
Fixed Order Row Subtotal is incorrect (Order with Tax and Discount)
|
1925 |
+
- fixed row subtotal tax counting.
|
1926 |
+
Fixed Unable to use capture online/offline when creating invoice of edited/reordered Authorize.net orders
|
1927 |
+
|
1928 |
+
|
1929 |
+
|
1930 |
+
==== 1.6.x-devel-109807 ====
|
1931 |
+
|
1932 |
+
=== Fixes ===
|
1933 |
+
Fixed There are no special titles for 'Site Map', 'Search Terms', 'Contact Us', 'Forgot Your Password' pages.
|
1934 |
+
Fixed Table Rate Shipping Method value column needs to be sorted in ascending order
|
1935 |
+
Fixed Incorrect titles in "Product Tax Classes" tab.
|
1936 |
+
Fixed Sending invoice email don`t change the status.
|
1937 |
+
Fixed Admin should be able to perform online invoice after void transaction
|
1938 |
+
- Added possibility to reauthorize orders with "order" payment action after void
|
1939 |
+
Fixed Admin should be able to perform online invoice after void transaction
|
1940 |
+
- Don't call for authorization if previous is alive
|
1941 |
+
Fixed Wrong customer group in order creation process in Admin panel
|
1942 |
+
- Set new customer group to all his quotes for all stores on customer save
|
1943 |
+
Fixed Fixed dot and tilde in base url during installation.
|
1944 |
+
Fixed: Magento allows admin to create category/product url rewrite for a store that doesn't have this category/product
|
1945 |
+
- on prepare for render js categories tree using extjs library, collecting allowed categories for product, if product selected and product id present at request params. Then disabling all categories that can't be selected.
|
1946 |
+
Fixed Incorrect dependencies between modules and code usage.
|
1947 |
+
Fixed Admin doesn't sees bundle products that was added to Wishlist in backend.
|
1948 |
+
Fixed Admin user interface: mistake in the label name, Id instead ID.
|
1949 |
+
Fixed Warning message in backend when trying to set condition for new Shopping cart price rule
|
1950 |
+
Fixed Wrong customer group in order creation process in Admin panel
|
1951 |
+
- Set new customer group to all his quotes for all stores on customer save
|
1952 |
+
Fixed Fixed dot and tilde in base url during installation.
|
1953 |
+
Implemented Order Payment Action for Express Checkout (PayPal) Upgrade
|
1954 |
+
- Added system menu changes
|
1955 |
+
Fixed Incorrect dependencies between modules and code usage.
|
1956 |
+
Fixed Flat attribute definition is not backward compatible
|
1957 |
+
- partly reverted previous changes;
|
1958 |
+
- added compatible mode for Db adapters;
|
1959 |
+
- small code style fixes
|
1960 |
+
Fixed Table Rate Shipping Method value column needs to be sorted in ascending order
|
1961 |
+
Fixed Column "Sales Total Amount" of Coupons Sales Reports calculates in wrong way
|
1962 |
+
- Changed the mathematical formula of counting Sales Total Amount
|
1963 |
+
- Changed the lines, that contains more then 120 characters
|
1964 |
+
Fixed Admin doesn't sees bundle products that was added to Wishlist in backend.
|
1965 |
+
Fixed Admin user interface: mistake in the label name, Id instead ID.
|
1966 |
+
Fixed Sending invoice email don`t change the status.
|
1967 |
+
Fixed Possibility of online invoice still exist when Order Valid Period = 0
|
1968 |
+
- Fixed store detection on capture
|
1969 |
+
Fixed Admin should be able to perform online invoice after void transaction
|
1970 |
+
- Added possibility to reauthorize orders with "order" payment action after void
|
1971 |
+
Fixed Grouped product imported without associated products
|
1972 |
+
- added $linksRows definition
|
1973 |
+
Fixed Admin should be able to perform online invoice after void transaction
|
1974 |
+
- Don't call for authorization if previous is alive
|
1975 |
+
Fixed There are no special titles for 'Site Map', 'Search Terms', 'Contact Us', 'Forgot Your Password' pages.
|
1976 |
+
Fixed Incorrect titles in "Product Tax Classes" tab.
|
1977 |
+
Fixed Categories moving provides Fatal error
|
1978 |
+
Fixed System - > Configuration - > inventory tab disappears when switching to Website/Store view scope
|
1979 |
+
Fixed Default store group with empty default store view causes fatal error on System>Configuration>Catalog>Catalog
|
1980 |
+
Fixed Limit of collection for Random Product Block
|
1981 |
+
Fixed Notification remove link in admin redirects to homepage on frontend in IE8
|
1982 |
+
Fixed translate function fixed to use translator (for editor labels and buttons)
|
1983 |
+
Fixed Admin should be able to perform online invoice after void transaction
|
1984 |
+
- Don't call for authorization if previous is alive
|
1985 |
+
Fixed There are no server-side validation for required options (attributes) of Configurable product.
|
1986 |
+
Fixed Full checkout "blocking" when delete product that was already added to the shopping cart.
|
1987 |
+
Fixed No ability to submit order in back-end(in case with selected "Same As Billing Address" check box).
|
1988 |
+
Fixed On the product view page action panel disappears after user manipulation on IE7/8.
|
1989 |
+
Fixed Product Flat Data is not reindexed in Mysql
|
1990 |
+
- default value must be unset for new column format
|
1991 |
+
Fixed Varien Image crop implementation fixed
|
1992 |
+
Fixed Fixed translation of quoted strings, added ability to move parameters on next line
|
1993 |
+
Fixed Fixed comment node in system.xml to be translated
|
1994 |
+
Fixed Default email "emaildomain.com" is a real domain.
|
1995 |
+
Fixed Non-active button "continue to review your order" in multiple address checkout.
|
1996 |
+
Fixed Ability to view another customer's Wishlist contents via RSS URL.
|
1997 |
+
Fixed Incorrect design of the Payment Method sub-menu with billing agreement information in default CE theme
|
1998 |
+
Fixed 'Term and Conditions' are not visible with PayPal Express Checkout in 'Review Order' page.
|
1999 |
+
Fixed Reports->Products does not work
|
2000 |
+
- Removed "order by" from count
|
2001 |
+
Fixed Fatal error during filtering products on frontend by Price (decimal) type attribute
|
2002 |
+
Fixed Tax rounding and calculation
|
2003 |
+
- $address->_store replaced with $address->getQuote()->getStore()
|
2004 |
+
Fixed Old column names are not fully mapped to new ones
|
2005 |
+
- Fixed wrong data, returned by helpers to init old fields map
|
2006 |
+
- Fixed @return phpDoc comments
|
2007 |
+
- Used array_merge() instead of "+" - for better readability
|
2008 |
+
Fixed Magento is not able to install on several versions of MySQL (5.041, Windows)
|
2009 |
+
Fixed There are no special titles for 'Site Map', 'Search Terms', 'Contact Us', 'Forgot Your Password' pages.
|
2010 |
+
Fixed Export: Error during export products
|
2011 |
+
- added checks for an empty array of $productIds
|
2012 |
+
Fixed Invalid language on import error
|
2013 |
+
|
2014 |
+
|
2015 |
+
|
2016 |
+
==== 1.6.0.0-alpha1 ====
|
2017 |
+
|
2018 |
+
=== Improvements ===
|
2019 |
+
Add Dynamic sku option for configurable products
|
2020 |
+
Moneybookers Multistore System Configuration
|
2021 |
+
Moneybookers OBT Defaults
|
2022 |
+
PrototypeJS upgraded to 1.7
|
2023 |
+
|
2024 |
+
=== Changes ===
|
2025 |
+
Relations between models and resource models were revised for better support of multiple databases
|
2026 |
+
* Varien_Db_Adapter_Pdo_Mysql revised
|
2027 |
+
* Introduced Varien_Db_Adapter_Interface, Varien_Db_Ddl_Table
|
2028 |
+
* Introduced new classes named resource helpers
|
2029 |
+
* Backwards comatibility and known issues
|
2030 |
+
** Flat attribute definition is not backward compatible
|
2031 |
+
** Old columns names are not fully mapped to new ones
|
2032 |
+
** Error appears after Customer Group saving with name length more than 32
|
2033 |
+
** Caching config in Database results in endless recursion
|
2034 |
+
** There's no sql upgrade for media storage tables
|
2035 |
+
Deprecated GoogleBase module (http://googlemerchantblog.blogspot.com/2010/12/new-shopping-apis-and-deprecation-of.html)
|
2036 |
+
|
2037 |
+
=== Fixes ===
|
2038 |
+
Fixed Unable to change customer password when email confirmation is enabled
|
2039 |
+
Fixed Can't choose Group at the creation new Order by admin
|
2040 |
+
Fixed Subtotal for Bundle product with quantity 2 calculates as for one
|
2041 |
+
Fixed Breadcrumbs and the ?Use categories path for product URLs setting
|
2042 |
+
Fixed RSS feed redirected to 404 error page (from admin panel)
|
2043 |
+
Fixed Cache Management incorrect ACL check
|
2044 |
+
Fixed Media Sub-Folder Creation and View in Admin
|
2045 |
+
Fixed Quantity of bundle item is not stored correctly, in case when it is decimal
|
2046 |
+
Fixed Shipping creation for bundle product shows wrong q-ty
|
2047 |
+
Fixed Issue creating content staging site
|
2048 |
+
Fixed Unable to create attribute with numbers
|
2049 |
+
Fixed Moving Grouped product from Order and Shopping cart to the Wishlist does not work
|
2050 |
+
Fixed Product Attribute can't be saved if Attribute Code contain numbers
|
2051 |
+
Fixed Incorrect titles in "Sales Emails" tab
|
2052 |
+
Fixed Any backend user can access the MCM (Downloader)
|
2053 |
+
Fixed Saving attribute value in store view scope only causes data loss
|
2054 |
+
Fixed Resources names are not translated on Role Resources page at backend
|
2055 |
+
Fixed Quote Lifetime don't work
|
2056 |
+
Fixed WYSIWYG Editor - Unable to Create a Folder when Inserting a File
|
2057 |
+
Fixed Out of stock products getting "This product has not been configured." error msg
|
2058 |
+
Fixed Impossible save empty values for store view scope
|
2059 |
+
Fixed Include in Navigation Menu
|
2060 |
+
Fixed Date Field error in product
|
2061 |
+
Fixed product.js not working well images that are taller than wider.
|
2062 |
+
Fixed Modern theme search results page bug
|
2063 |
+
Fixed Bundled product special pricing does not reflect in cart
|
2064 |
+
Fixed In Configurable Products only Admin attribute label is retrieved
|
2065 |
+
Fixed Anchored categories w/ subcategories and products in both
|
2066 |
+
Fixed Minimum quantity in Grouped product
|
2067 |
+
Fixed Minimum Quantities Warning not working properly
|
2068 |
+
Fixed Unable to change configurable product name for store view
|
2069 |
+
Fixed Dropdown attributes with no value should be hidden
|
2070 |
+
Fixed CLONE -"Compare Products" block does not appear on the category page and product page
|
2071 |
+
Fixed Category and product design settings inheritance
|
2072 |
+
Fixed Not shown button for browsing file in "downloadable product" tab "Downloadable Information"(Just for new prototype version).
|
2073 |
+
Fixed Some small and thumbnail images are corrupted for products
|
2074 |
+
Fixed Zooming doesn't work for an image larger or taller than the container
|
2075 |
+
Fixed Frontend->Necessary to add pagination to the bottom of category
|
2076 |
+
Fixed Category Tree -> Changing category color
|
2077 |
+
Fixed Changing Attribute Scopes
|
2078 |
+
Fixed Typo: wrong helper used in ProductController to call initProductLayout()
|
2079 |
+
Fixed Unable to continue checkout when "Street Address" use non English characters
|
2080 |
+
Fixed Time payment processing extremely long
|
2081 |
+
Fixed Cannot create or save after editing customer's Address, "Please enter the street" error appears on frontend
|
2082 |
+
Fixed product not salable marking/language issue
|
2083 |
+
Fixed Free shipping doesn't work in table rates shipping method
|
2084 |
+
Fixed Wrong order status after "Credit Memo" for product's with FPT
|
2085 |
+
Fixed Missing Capture transaction in backend when capture money from PayPal (PayPal UK Express)
|
2086 |
+
Fixed Unable to made online refund from Magento using PayPal UK Express checkout
|
2087 |
+
Fixed It's possible to click twice on order place button and receive "Cart is empty" page
|
2088 |
+
Fixed Unable to place order for customer with Cyrillic street name.
|
2089 |
+
Fixed Backend - Add new customer - ALL TRANSLATIONS MISSING
|
2090 |
+
Fixed Customer Segment "Up to Date" Condition Logical Inversion
|
2091 |
+
Fixed Errorhandling in saveAction / editAction broken
|
2092 |
+
Fixed Reward points expiration date is shown incorrect
|
2093 |
+
Fixed Incorrect "Date of Birth" validation
|
2094 |
+
Fixed Error when searching Customer Wishlist by Qty at admin backend
|
2095 |
+
Fixed Default values for customer attributes settings are not used in some cases
|
2096 |
+
Fixed Category Treeview Broken (Manage Products/Manage Categories)
|
2097 |
+
Fixed Categories' does not show full categories tree (Just for new prototype version).
|
2098 |
+
Fixed It should be possible to create Simple associated product during Configurable product creation process (Just for new prototype version)
|
2099 |
+
Fixed It should be possible to delete row with Samples for Downloadable product during creation (Just for new prototype version)
|
2100 |
+
Fixed No display of Remaining Balance, if only one credit card used with Authorize.net Payment Method
|
2101 |
+
Fixed Partial Authorization is not working at all, when Authorize and Capture setting is enabled for Authorize.net
|
2102 |
+
Fixed Subtotal displays incorrect subtotal if gift wrapping was applied
|
2103 |
+
Fixed Orders with not supported statuses moved to orders archive.
|
2104 |
+
Fixed No compiled CSS and JavaScripts are present in native database
|
2105 |
+
Fixed View Details" link is not present for simple product with custom options or Gift Cards added to the Wishlist
|
2106 |
+
Fixed Full Page Cache and design themes exceptions
|
2107 |
+
Fixed Setting "Backorders" > "No Backorders" do not apply in backend and order creation.
|
2108 |
+
Fixed Not received the warning message "This product is available for purchase in increments of 2 only." in backend order creation.
|
2109 |
+
Fixed Order is in google sandbox doesn't contain gift card
|
2110 |
+
Fixed Broken JS validation on "Configuration" step
|
2111 |
+
Fixed Broken mysql4-data-upgrade-1.4.0.0.13-1.4.0.0.14.php file
|
2112 |
+
Fixed "Turkish Lira" missing on the "Localization" step during installation
|
2113 |
+
Fixed Magento Connect -> MCM -> "Log in" page - Message or some information about required fields doesn't appeared
|
2114 |
+
Fixed Magento Connect -> MCM -> "Settings" tab -> Changes don't saved
|
2115 |
+
Fixed Magento Connect -> MCM -> "Settings" tab -> data doesn't saved
|
2116 |
+
Fixed Magento Connect -> MCM -> If extension packages contains files with the same names, it installation shoul be conflicted.
|
2117 |
+
Fixed Payment Applicable From = "Specific Countries" option does not work for Express Checkout (Payflow Edition)
|
2118 |
+
Fixed Credit Card information is required for $0.00 total.
|
2119 |
+
Fixed Image-Upload does not work in Safari 5
|
2120 |
+
Fixed Paypal Direct send wrong billing address to API
|
2121 |
+
Fixed Incorrect billing/shipping address transfer from Magento to PayPal ( WPP Payflow Edition, WPP Payflow Edition EC )
|
2122 |
+
Fixed Gateway error: A valid amount is required' appears during create Credit Memo for order, which uses Authorize.net
|
2123 |
+
Fixed Magento creates order even if response from PaypalUk is empty
|
2124 |
+
Fixed Enabled payment actions are available for order with "Zero subtotal"
|
2125 |
+
Fixed Incorrect format of the transferring shipping/billing addresses from Magento to PayPal (WPP EC, WPS, WPP )
|
2126 |
+
Fixed When in backend ?new order? and using a custom price the subtotal is wrong
|
2127 |
+
Fixed Buy One Get One Free not working
|
2128 |
+
Fixed Table Rates & Free Shipping Cart Rules not working together
|
2129 |
+
Fixed Catalog Prices include tax is not working.
|
2130 |
+
Fixed buy 1 get 1 free doesn't work
|
2131 |
+
Fixed Bundle Product using Fixed Price does not Display Tier Pricing Correctly
|
2132 |
+
Fixed Cart Price Rule not working with Product Attributes
|
2133 |
+
Fixed Tax from orders in status pending presents in Tax Report
|
2134 |
+
Fixed Coupons Report Math Bug
|
2135 |
+
Fixed Credit Memo refunding not working due to four decimal places for Shipping costs
|
2136 |
+
Fixed Can not ad Product to order if it has custom options
|
2137 |
+
Fixed Tier price does not applies correctly on the back-end if customer group is changed on the backoffice order
|
2138 |
+
Fixed Wrong product with custom options price is displayed in the wishlist sidebar during order creation via back-end
|
2139 |
+
Fixed Missing isset() in Mage_Sales_Model_Recurring_Profile::createOrder()
|
2140 |
+
Fixed Shipping address is not saving during process order in backend with 'Save in Address book' option for existing customer.
|
2141 |
+
Fixed Advanced search on boolean type attributes
|
2142 |
+
Fixed UPS (UPSS,DHL,FedEx) options "Maximum Package Weight " works not correct.
|
2143 |
+
Fixed Shipping method UPS_XML missing titles
|
2144 |
+
Fixed Table rate shipping is not recalculate after applying a discount
|
2145 |
+
Fixed PDF subtotal including tax is zero
|
2146 |
+
Fixed Tax/VAT number not displayed
|
2147 |
+
Fixed HTML typo in Transactional mail "account_new_confirmation.html"
|
2148 |
+
Fixed Varien_Db_Adapter_Mysqli::raw_query() should throw an Exception after 10 tries
|
2149 |
+
|
2150 |
+
==== 1.5.1.0 ====
|
2151 |
+
|
2152 |
+
=== Improvements ===
|
2153 |
+
Alternative image storage feature enabled with fixed get.php file.
|
2154 |
+
Magento Mobile updated to release v20
|
2155 |
+
Implemented SOAP Faults for GiftMessage API
|
2156 |
+
- added faults in functions
|
2157 |
+
- added description in api.xml
|
2158 |
+
Implemented The names of WPPHS depend on a merchant`s country in the backend. Create a functionality for dynamic changing.
|
2159 |
+
- Added functionality for dynamic changing the names of WPPHS
|
2160 |
+
- Added backend config into system.xml
|
2161 |
+
Implemented WS-I for API
|
2162 |
+
- added wsi.xml for all WebAPI modules
|
2163 |
+
- added new wsi-soap handler
|
2164 |
+
- added new wsi-soap adapter
|
2165 |
+
- changed admin configuration, added parameter into "Magento Core API"->WSI Compliance
|
2166 |
+
- changed api.xml
|
2167 |
+
Implemented GiftMessage for Cart
|
2168 |
+
|
2169 |
+
=== Changes ===
|
2170 |
+
Replaced usage of Varien_File_Uploader with Mage_Core_Model_File_Uploader
|
2171 |
+
|
2172 |
+
=== Fixes ===
|
2173 |
+
Fixed PayPal Standard: order has two invoice and two refund
|
2174 |
+
Fixed Adjustment Fee, Adjustment Refund and Refund Shipping fields must be disabled on credit memo for Payflow Pro and PayFlowLink payment methods
|
2175 |
+
- Actualized API params mapping
|
2176 |
+
- Added parameter Amount into refund request
|
2177 |
+
Fixed Broken mysql4-data-upgrade-1.4.0.0.13-1.4.0.0.14.php file
|
2178 |
+
Fixed XMLConnect - edited parameter cannot be saved
|
2179 |
+
Fixed Media storage - problem with image in the CMS pages
|
2180 |
+
- Added functional to get files with disabled db media storage feature through the get.php script
|
2181 |
+
Fixed Unable to place order using PayPal Billing agreement through Checkout with multiple addresses
|
2182 |
+
- Added additional multi shipping checkout exceptions logging.
|
2183 |
+
Fixed No AmericanExpress support in Website Payments Pro Payflow Edition
|
2184 |
+
- Added to Direct payment
|
2185 |
+
Fixed Incorrect Subtotal(Incl. Tax) in Shopping Cart, when catalog prices entered by admin include tax
|
2186 |
+
Fixed Function "Apply Tax On - Original price only" does not correct calculate product tax
|
2187 |
+
Fixed No ability to save Product Attribute with type Media Image
|
2188 |
+
Fixed Mage_CatalogSearch_Model_Query::getMaxQueryLenght() is not properly deprecated.
|
2189 |
+
Fixed Two links in forgotpassword.phtml template lead to not existent files
|
2190 |
+
Fixed Added compiled js and css to whitelist. Added removing of relative URL parts to get.php.
|
2191 |
+
Fixed several probable vulnerabilities on front and backend
|
2192 |
+
Fixed Incorrect error message when extension state is lower than preferred state
|
2193 |
+
Fixed No rule applied when coupon code is no longer valid
|
2194 |
+
- verify if rule uses coupon at all before coupon check
|
2195 |
+
Fixed Argument passed to Mage_Catalog_Helper_Image::init() must be an instance of Mage_Catalog_Model_Product, instance of Mage_Wishlist_Model_Item given
|
2196 |
+
Fixed Varien_Db_Adapter_Mysqli::raw_query() should throw an Exception after 10 tries
|
2197 |
+
Fixed Import file downloaded from FTP in BINARY mode
|
2198 |
+
- added option(ASCII || BINARY) for mode of file transferring;
|
2199 |
+
- default mode of file transferring is BINARY;
|
2200 |
+
- was changed property "type" of input field for password.
|
2201 |
+
Fixed User interface: real mistake in the label name, Api instead API
|
2202 |
+
Fixed issue with URL Rewrite Rule for new products with no category information
|
2203 |
+
Fixed Invoice do not created when using "Automatically Invoice All Items" option of Zero Subtotal Checkout
|
2204 |
+
Fixed Additional dot when checking out as Guest
|
2205 |
+
Fixed Prefix and suffix aren't visible in Add New Address Form
|
2206 |
+
Fixed Calculation order for Catalog Price Rule and Configurable Product option price
|
2207 |
+
Fixed When put values in Customer Name and Address Options they do not reflect on the backend customer and customer address forms
|
2208 |
+
Fixed Custom URL Rewrite creation broken
|
2209 |
+
- skip filtering for store select if no product or category specified in case of custom rewrite
|
2210 |
+
Fixed Shopping Cart Price Rule->Conditions->Shipping Country is not correctly controlled on multiple checkout.
|
2211 |
+
- Added checking: if address object is a new object rules validation cache will not working because we can not save validation results for address without id
|
2212 |
+
Fixed Resources names are not translated on Role Resources page at backend
|
2213 |
+
Fixed Multiselect and Dropdown Attribute values set to "0" are not exported correctly
|
2214 |
+
Fixed WYSIWYG Editor - Unable to Create a Folder when Inserting a File
|
2215 |
+
Fixed Wrong cache key for websites
|
2216 |
+
- {{base_url}} not replaced with url on the saving in the cache. {{base_url}} replaced with base url on the getting.
|
2217 |
+
Fixed After second refund made from paypal user get wrong refund amounts
|
2218 |
+
Fixed Multiselect and Dropdown Attribute values set to "0" are not exported correctly
|
2219 |
+
- modified condition for option emptiness check to pass string and int zero values
|
2220 |
+
Fixed Infinite loop is started, when backend user selects non-existing time period for a chart on Dashboard
|
2221 |
+
Fixed Missing isset() in Mage_Sales_Model_Recurring_Profile::createOrder()
|
2222 |
+
- Added the filtering "value" key on the setting in the conditions: Order Number, Purchased Quantity, Sales Amount
|
2223 |
+
Fixed Discount is not applied to product in case when in conditions of Catalog Price Rule "contains" is chosen
|
2224 |
+
Fixed Unable to open "View all wishlist items" link from email
|
2225 |
+
Fixed Specifying incorrect timezone in configuration causes halt of backend work flow and inability to add products to a Cart on frontend
|
2226 |
+
- Added timezone validation
|
2227 |
+
Fixed Checkout with Configurable Product includes disabled simple
|
2228 |
+
- removing parent from shopping cart if child becomes disabled or out of stock
|
2229 |
+
Fixed Validate Each Address Separately in Multi-address Checkout do not working
|
2230 |
+
Fixed Google Checkout - catalog price discount for Configurable product is calculated incorrectly
|
2231 |
+
Fixed FPT with prices included tax problem
|
2232 |
+
Fixed Incorrect Excl. Tax in product page, when catalog prices entered by admin include tax
|
2233 |
+
- Fixed JS excluding tax price recalculation
|
2234 |
+
Fixed Unable to configure Grouped product from the backend
|
2235 |
+
Fixed Order, that related with Recurring Profile does not displayed
|
2236 |
+
Fixed Discount is not applied to product in case when in conditions of Catalog Price Rule "contains" is chosen
|
2237 |
+
Fixed After second refund made from paypal user get wrong refund amounts
|
2238 |
+
Fixed WPPHS payment method has tags in the name
|
2239 |
+
Fixed Symlinks do not work for back-end blocks
|
2240 |
+
Fixed The names of WPPHS depend on a merchant`s country in the backend. Create a functionality for dynamic changing.
|
2241 |
+
Fixed Disabled success redirect functionality in paypal express checkout
|
2242 |
+
Fixed Added whitelist support to get.php script
|
2243 |
+
Fixed Mage_Customer_Model_Address class name is hardcoded in certain models
|
2244 |
+
Fixed Typo in Mage_ImportExport_Model_Import_Adapter_Abstract::_construct()
|
2245 |
+
Fixed 'FOUND' and 'NOT FOUND' labels are not translated in Mage_SalesRule_Model_Rule_Condition_Product_Found::loadValueOptions()
|
2246 |
+
Fixed 'Select' label is not translated in Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid::_prepareColumns()
|
2247 |
+
Fixed Invalid HTML from form multiline element renderer
|
2248 |
+
Fixed Collection calling private _setOrder() method in CatalogEvent module
|
2249 |
+
Fixed Tags on search results for Global Record Search (Adminhtml) are not translatable
|
2250 |
+
Fixed JavaScript bug in IE8 with date advice set during js validation.
|
2251 |
+
Fixed Missing translation for ZF error messages
|
2252 |
+
- provided translation of ZF native validation error messages
|
2253 |
+
Fixed Shopping Cart Price Rule->Conditions->Shipping Country is not correctly controlled on multiple checkout.
|
2254 |
+
Fixed Moneybookers Multistore System Configuration
|
2255 |
+
Fixed Moneybookers OBT Defaults
|
2256 |
+
Fixed Product info API request
|
2257 |
+
- a behavior of the function, was optimized;
|
2258 |
+
- refactoring classes with calling function from helper without changing the inside logic;
|
2259 |
+
- duplicated code were moved to catalog/product helper with creating the new one function for that.
|
2260 |
+
Fixed typos in adminhtml widget form block
|
2261 |
+
- Changed reserved word 'const' to lower case in tax config model
|
2262 |
+
Fixed Google Base Synchronize
|
2263 |
+
- Fixed fatal error on very first Publish and then Synchronizing if in GB products already were
|
2264 |
+
- Fixed potential fatal when on mass Publish action we will not retrieve any item id: expected array, but null or empty string given
|
2265 |
+
Fixed Rounding issues in shipping methods and in sales payment
|
2266 |
+
Fixed Usage of non-mb-supported strlen() in custom option validation
|
2267 |
+
- fixed length calculation routine to work with multi-byte characters
|
2268 |
+
- changed order of evaluation, so that length is calculated only if length constraint is set for custom option
|
2269 |
+
Fixed Unused class Mage_Reports_Model_Mysql4_Shopcart_Product_Collection did not marked like deprecated
|
2270 |
+
- mark class as deprecated after 1.5.0.1
|
2271 |
+
Fixed Products prepare function
|
2272 |
+
- Change prepare products function
|
2273 |
+
- Update resource with phpDoc
|
2274 |
+
- Update wsdl
|
2275 |
+
Improved SOAP Faults in Shopping Cart
|
2276 |
+
- all faults for ShoppingCart are unique for each issue and have wide description
|
2277 |
+
Fixed Shopping Cart create order should return order increment id
|
2278 |
+
- updated wsdl, wsi
|
2279 |
+
- changed return type for Mage_Checkout_Model_Cart_Api::createOrder
|
2280 |
+
Fixed Grouped product has no configured price in Wishlist
|
2281 |
+
Fixed Unable to continue checkout when "Street Address" use non english characters
|
2282 |
+
Fixed Misprint in comment in Mage_Checkout_Model_Cart::init()
|
2283 |
+
Fixed Controllers used protected properties
|
2284 |
+
- removed protected property _hasDataChanges equals true in controllers
|
2285 |
+
- added property _hasDataChanges equals true in method "addComment" for all objects
|
2286 |
+
Fixed Page "404 Not Found" is showed by clicked Edit link in the Invoice page of placed order
|
2287 |
+
Fixed Google Base Synchronize
|
2288 |
+
Fixed Error on Authorize.net Direct Post payment method in Backend
|
2289 |
+
Fixed API default/SOAP functionality switched
|
2290 |
+
- removed unused variable loading
|
2291 |
+
- changed loading default api handler in IndexController
|
2292 |
+
- added loading default "soap" api handler in SoapController
|
2293 |
+
Fixed Missed unique index on eav table
|
2294 |
+
Fixed Order status visible_on_front flag in configuration file can't be overridden
|
2295 |
+
Fixed Unexpected error message appears when quantity to refund more than quantity invoiced
|
2296 |
+
Fixed PayPal payment methods are not shown on the checkout Payment Information step if Brazilian Real is set as base currency
|
2297 |
+
- Added new supported currency codes into config
|
2298 |
+
Fixed Trim value after explode
|
2299 |
+
Fixed Unable to save customer date attribute with date more then 2010
|
2300 |
+
Fixed No customer's information
|
2301 |
+
Fixed PayPal Business Email address update
|
2302 |
+
Fixed Hovering mouse cursor on "Configure" button for a composite product shows incorrect hint
|
2303 |
+
Fixed Error in fulltext search indexation for values that contain 'à' character
|
2304 |
+
- modified regular expression to correct process of unicode characters
|
2305 |
+
Fixed Zooming don't work for an image larger or taller than the container
|
2306 |
+
Fixed Variable is used before its definition in Mage_CatalogRule_Helper_Data::calcPriceRule()
|
2307 |
+
Fixed Typo in app\design\frontend\base\default\template\checkout\success.phtml
|
2308 |
+
Fixed Fatal error during newsletters sending via cron
|
2309 |
+
- Also added missed PHP-docs to Mage_Newsletter_Model_Problem class.
|
2310 |
+
Fixed Quantity of bundle item is not stored correctly, in case when it is decimal
|
2311 |
+
Fixed Unable to change configurable product name for store view
|
2312 |
+
- the bug was in two HTML input tags with same names located on "General" and "Associated Products" tabs. One of them was been renamed to solve the problem.
|
2313 |
+
Fixed Microsoft Excel 2007 fails to open Magento generated XML file
|
2314 |
+
Fixed Admin page - incorrect displaying of pop-up message for gift options in Items Ordered block
|
2315 |
+
Fixed One extra unnecessary product appears in Items Ordered list of placed Order, when payment is provided using Authorize.net Direct Post
|
2316 |
+
Fixed If 3D Secure Card Validation is enabled then Gift Options section has wrong position during backend order creation
|
2317 |
+
Fixed Reindex of Category Products for large catalogs is extremely slow
|
2318 |
+
Fixed Product minimum quantity, add to cart
|
2319 |
+
Fixed Created in Backend customer doubled after creation order for him and not save any addres information
|
2320 |
+
Fixed Changes to helper text for the images for the application submission page
|
2321 |
+
Fixed Redirect patch
|
2322 |
+
Fixed product list images for iPad device to use base image
|
2323 |
+
Fixed Sending invoice email don`t change the status
|
2324 |
+
Fixed remove paypal country id hard coded
|
2325 |
+
Fixed Mobile Controller issue
|
2326 |
+
Fixed App locations (countries) do not match iTunes App Stores countries available
|
2327 |
+
Fixed Disabled cookie message issue
|
2328 |
+
Fixed Information about Gift Options is not stored, when admin user performs Edit Order action in backend
|
2329 |
+
Fixed Web form with empty fields can be saved - also is_object() calls are replaced with instanceof checking inside of Adminhtml/MobileController
|
2330 |
+
Fixed Bundle product with required option must have "Configure" button inactive if one of the option is out of stock.
|
2331 |
+
Fixed Unable to retrieve product attributes, "Unsupported operand types"
|
2332 |
+
Fixed Add to Wishlist is not work
|
2333 |
+
Fixed A bug inside catalog/model/product/Api.php::create prevents this function from working
|
2334 |
+
- Added $store parameter.
|
2335 |
+
Fixed CSS Merger Cache Ignores Hostname and HTTPS
|
2336 |
+
- on frontend when "Use Secure URLs in Frontend" is set to "yes", https is used only for some selected pages. This fix takes into account what's the protocol in use
|
2337 |
+
Fixed Improvement to block caching
|
2338 |
+
Fixed Typo in Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Type_Configurable_Attribute::savePrices()
|
2339 |
+
Fixed Shipping creation for bundle product shows wrong q-ty
|
2340 |
+
Fixed Check for controller instance in rating option resource model
|
2341 |
+
Fixed Export Filters are not working correctly during export of customers
|
2342 |
+
Fixed Function "Apply Tax On - Original price only" does not correct calculate product tax
|
2343 |
+
Fixed Mage_Index.csv is not used at all
|
2344 |
+
Fixed Incorrect tax count, when making new order through back-end and using discount coupon (price cart rule)
|
2345 |
+
Fixed Error "Source file moving failed" on Import process, when PHP version is 5.2
|
2346 |
+
Fixed "Store credit amount can not exceed order amount" error in Credit Memo applying to Store Credit for decimal quantities and decimal subtotals
|
2347 |
+
Fixed Disabled cookie message issue
|
2348 |
+
Fixed Edit Order without creating new one functionality doesn't save changes in non-default customer address attributes
|
2349 |
+
Fixed Unable to buy Downloadable product with specified option "Links can be purchased separately" set to "No"
|
2350 |
+
Fixed Incorrect message of soap fault
|
2351 |
+
Fixed Information about Gift Options is not stored, when admin user performs Edit Order action in backend
|
2352 |
+
Fixed Unable to open "View all wishlist items" link from email
|
2353 |
+
- Added action to add shared wishlist item to shopping cart
|
2354 |
+
Fixed iFrame must be centered for Website Payments Pro Hosted Solution payment method.
|
2355 |
+
Fixed Free shipping does not transfer to Google Checkout when it is enabled in a shipping method
|
2356 |
+
- Added support of UPS carrier methods with UPS XML type of rates calculation
|
2357 |
+
Fixed Incorrect tax summary for partial credit memos/invoices
|
2358 |
+
Fixed PayPal Standart: order has two invoice and two refund
|
2359 |
+
Fixed A product hasn't been added to whishlist from category with closed, upcoming events
|
2360 |
+
Fixed Customer password is not imported from CSV file
|
2361 |
+
Fixed CDN - necessary to replace information message
|
2362 |
+
Fixed When put values in Customer Name and Address Options they do not reflect on the backend customer and customer address forms
|
2363 |
+
Fixed Reports-> Products-> Products ordered - Trace appeared
|
2364 |
+
Fixed Mage_Core_Helper_Url::getCurrentUrl() method ignores server PORT
|
2365 |
+
Fixed No ability to change payment from Store Credits, when customer backs to a Cart from Order Review step, and then goes to checkout again (OnePageCheckout)
|
2366 |
+
Fixed Customer attribute labels not translated in validation error messages
|
2367 |
+
- added translation for attribute labels at classes Mage_Customer_Model_Attribute_Data_*
|
2368 |
+
Fixed Typos in: Varien_Db_Adapter_Pdo_Mysql, Varien_File_Uploader
|
2369 |
+
Fixed Mage_Core_Model_Design_Package::_prepareUrl() uses incorrect regular expression to check whether the url is relative
|
2370 |
+
- modified preg_match for detecting absolute urls
|
2371 |
+
Fixed Mage_Catalog_Block_Product_Gallery::getImageWidth() returns false for images with width smaller than 600px
|
2372 |
+
- modified method Mage_Catalog_Block_Product_Gallery::getImageWidth(), if width <= 600 return width value, not false
|
2373 |
+
Fixed Incorrect view of the shipping tax at the back end, unnecessary $0.01
|
2374 |
+
Fixed Wrong visualisation of "Original Price" in placed order
|
2375 |
+
- collecting totals for quote at multishipping checkout
|
2376 |
+
Fixed Incorrect view of popup windows for composite product on backend (only IE)
|
2377 |
+
Added Adding Composite Products in Admin Order Creation
|
2378 |
+
- Fixed styles in ie7
|
2379 |
+
Fixed "Items Ordered" tab is not refreshing while Admin order creation
|
2380 |
+
Fixed Free shipping does not transfer to Google Checkout when it is enabled in a shipping method
|
2381 |
+
- Re factored and optimized code
|
2382 |
+
- Improved performance
|
2383 |
+
- Added dependency for GoogleCheckout module from Usa module
|
2384 |
+
- Added fedex and usps free methods supporting
|
2385 |
+
|
2386 |
+
|
2387 |
+
|
2388 |
+
==== 1.5.x-devel-104676 ====
|
2389 |
+
|
2390 |
+
=== Improvements ===
|
2391 |
+
Magento Mobile updated to release v20
|
2392 |
+
|
2393 |
+
=== Fixes ===
|
2394 |
+
Fixed PayPal Standard: order has two invoice and two refund
|
2395 |
+
Fixed Adjustmen Fee, Adjustment Refund and Refund Shipping fields must be disabled on credit memo for Payflow Pro and PayFlowLink payment methods
|
2396 |
+
- Actualized API params mapping
|
2397 |
+
- Added parameter Amount into refund request
|
2398 |
+
Fixed Broken mysql4-data-upgrade-1.4.0.0.13-1.4.0.0.14.php file
|
2399 |
+
Fixed XMLConnect - edited parameter cannot be saved
|
2400 |
+
Fixed Media storage - problem with image in the CMS pages
|
2401 |
+
- Added functional to get files with disabled db media storage feature through the get.php script
|
2402 |
+
Fixed Unable to place order using PayPal Billing agreement through Checkout with multiple addresses
|
2403 |
+
- Added additional multi shipping checkout exceptions logging.
|
2404 |
+
Fixed No AmericanExpress support in Website Payments Pro Payflow Edition
|
2405 |
+
- Added to Direct payment
|
2406 |
+
Fixed Incorrect Subtotal(Incl. Tax) in Shopping Cart, when catalog prices entered by admin include tax
|
2407 |
+
Fixed Function "Apply Tax On - Original price only" does not correct calculate product tax
|
2408 |
+
Fixed No ability to save Product Attribute with type Media Image
|
2409 |
+
|
2410 |
+
|
2411 |
+
==== 1.5.1.0-rc1 ====
|
2412 |
+
|
2413 |
+
=== Improvements ===
|
2414 |
+
Magento Mobile updated to release v19
|
2415 |
+
|
2416 |
+
=== Changes ===
|
2417 |
+
Replaced usage of Varien_File_Uploader with Mage_Core_Model_File_Uploader
|
2418 |
+
|
2419 |
+
=== Fixes ===
|
2420 |
+
Fixed Mage_CatalogSearch_Model_Query::getMaxQueryLenght() is not properly deprecated.
|
2421 |
+
Fixed Two links in forgotpassword.phtml template lead to not existent files
|
2422 |
+
Fixed Added compiled js and css to whitelist. Added removing of relative URL parts to get.php.
|
2423 |
+
Fixed several probable vulnerabilities on front and backend
|
2424 |
+
Fixed Incorrect error message when extension state is lower than preferred state
|
2425 |
+
Fixed No rule applied when coupon code is no longer valid
|
2426 |
+
- verify if rule uses coupon at all before coupon check
|
2427 |
+
Fixed Argument passed to Mage_Catalog_Helper_Image::init() must be an instance of Mage_Catalog_Model_Product, instance of Mage_Wishlist_Model_Item given
|
2428 |
+
Fixed Varien_Db_Adapter_Mysqli::raw_query() should throw an Exception after 10 tries
|
2429 |
+
Fixed Import file downloaded from FTP in BINARY mode
|
2430 |
+
- added option(ASCII || BINARY) for mode of file transferring;
|
2431 |
+
- default mode of file transferring is BINARY;
|
2432 |
+
- was changed property "type" of input field for password.
|
2433 |
+
Fixed User interface: real mistake in the label name, Api instead API
|
2434 |
+
Fixed issue with URL Rewrite Rule for new products with no category information
|
2435 |
+
Fixed Invoice do not created when using "Automatically Invoice All Items" option of Zero Subtotal Checkout
|
2436 |
+
Fixed Additional dot when checking out as Guest
|
2437 |
+
Fixed Prefix and suffix aren't visible in Add New Address Form
|
2438 |
+
Fixed Calculation order for Catalog Price Rule and Configurable Product option price
|
2439 |
+
Fixed When put values in Customer Name and Address Options they do not reflect on the backend customer and customer address forms
|
2440 |
+
Fixed Custom URL Rewrite creation broken
|
2441 |
+
- skip filtering for store select if no product or category specified in case of custom rewrite
|
2442 |
+
Fixed Shopping Cart Price Rule->Conditions->Shipping Country is not correctly controlled on multiple checkout.
|
2443 |
+
- Added checking: if address object is a new object rules validation cache will not working because we can not save validation results for address without id
|
2444 |
+
Fixed Resources names are not translated on Role Resources page at backend
|
2445 |
+
Fixed Multiselect and Dropdown Attribute values set to "0" are not exported correctly
|
2446 |
+
Fixed WYSIWYG Editor - Unable to Create a Folder when Inserting a File
|
2447 |
+
Fixed Wrong cache key for websites
|
2448 |
+
- {{base_url}} not replaced with url on the saving in the cache. {{base_url}} replaced with base url on the getting.
|
2449 |
+
Fixed After second refund made from paypal user get wrong refund amounts
|
2450 |
+
Fixed Multiselect and Dropdown Attribute values set to "0" are not exported correctly
|
2451 |
+
- modified condition for option emptiness check to pass string and int zero values
|
2452 |
+
Fixed Infinite loop is started, when backend user selects non-existing time period for a chart on Dashboard
|
2453 |
+
Fixed Missing isset() in Mage_Sales_Model_Recurring_Profile::createOrder()
|
2454 |
+
- Added the filtering "value" key on the setting in the conditions: Order Number, Purchased Quantity, Sales Amount
|
2455 |
+
Fixed Discount is not applied to product in case when in conditions of Catalog Price Rule "contains" is chosen
|
2456 |
+
Fixed Unable to open "View all wishlist items" link from email
|
2457 |
+
Fixed Specifying incorrect timezone in configuration causes halt of backend work flow and inability to add products to a Cart on frontend
|
2458 |
+
- Added timezone validation
|
2459 |
+
Fixed Checkout with Configurable Product includes disabled simple
|
2460 |
+
- removing parent from shopping cart if child becomes disabled or out of stock
|
2461 |
+
Fixed Validate Each Address Separately in Multi-address Checkout do not working
|
2462 |
+
Fixed Google Checkout - catalog price discount for Configurable product is calculated incorrectly
|
2463 |
+
Fixed FPT with prices included tax problem
|
2464 |
+
Fixed Incorrect Excl. Tax in product page, when catalog prices entered by admin include tax
|
2465 |
+
- Fixed JS excluding tax price recalculation
|
2466 |
+
Fixed Unable to configure Grouped product from the backend
|
2467 |
+
Fixed Order, that related with Recurring Profile does not displayed
|
2468 |
+
Fixed Discount is not applied to product in case when in conditions of Catalog Price Rule "contains" is chosen
|
2469 |
+
Fixed After second refund made from paypal user get wrong refund amounts
|
2470 |
+
Fixed WPPHS payment method has tags in the name
|
2471 |
+
|
2472 |
+
==== 1.5.x-devel-102426 ====
|
2473 |
+
|
2474 |
+
=== Improvements ===
|
2475 |
+
Magento Mobile updated to release v19
|
2476 |
+
|
2477 |
+
=== Changes ===
|
2478 |
+
Replaced usage of Varien_File_Uploader with Mage_Core_Model_File_Uploader
|
2479 |
+
|
2480 |
+
=== Fixes ===
|
2481 |
+
Fixed Mage_CatalogSearch_Model_Query::getMaxQueryLenght() is not properly deprecated.
|
2482 |
+
Fixed Two links in forgotpassword.phtml template lead to not existent files
|
2483 |
+
Fixed Added compiled js and css to whitelist. Added removing of relative URL parts to get.php.
|
2484 |
+
Fixed several probable vulnerabilities on front and backend
|
2485 |
+
Fixed Incorrect error message when extension state is lower than preferred state
|
2486 |
+
Fixed No rule applied when coupon code is no longer valid
|
2487 |
+
- verify if rule uses coupon at all before coupon check
|
2488 |
+
Fixed Argument passed to Mage_Catalog_Helper_Image::init() must be an instance of Mage_Catalog_Model_Product, instance of Mage_Wishlist_Model_Item given
|
2489 |
+
Fixed Varien_Db_Adapter_Mysqli::raw_query() should throw an Exception after 10 tries
|
2490 |
+
Fixed Import file downloaded from FTP in BINARY mode
|
2491 |
+
- added option(ASCII || BINARY) for mode of file transferring;
|
2492 |
+
- default mode of file transferring is BINARY;
|
2493 |
+
- was changed property "type" of input field for password.
|
2494 |
+
Fixed User interface: real mistake in the label name, Api instead API
|
2495 |
+
Fixed issue with URL Rewrite Rule for new products with no category information
|
2496 |
+
Fixed Invoice do not created when using "Automatically Invoice All Items" option of Zero Subtotal Checkout
|
2497 |
+
Fixed Additional dot when checking out as Guest
|
2498 |
+
Fixed Prefix and suffix aren't visible in Add New Address Form
|
2499 |
+
|
2500 |
+
|
2501 |
+
|
2502 |
+
==== 1.5.1.0-beta1 ====
|
2503 |
+
|
2504 |
+
=== Improvements ===
|
2505 |
+
Implemented SOAP Faults for GiftMessage API
|
2506 |
+
- added faults in functions
|
2507 |
+
- added description in api.xml
|
2508 |
+
Implemented The names of WPPHS depend on a merchant`s country in the backend. Create a functionality for dynamic changing.
|
2509 |
+
- Added functionality for dynamic changing the names of WPPHS
|
2510 |
+
- Added backend config into system.xml
|
2511 |
+
Implemented WS-I for API
|
2512 |
+
- added wsi.xml for all WebAPI modules
|
2513 |
+
- added new wsi-soap handler
|
2514 |
+
- added new wsi-soap adapter
|
2515 |
+
- changed admin configuration, added parameter into "Magento Core API"->WSI Compliance
|
2516 |
+
- changed api.xml
|
2517 |
+
Implemented GiftMessage for Cart
|
2518 |
+
|
2519 |
+
=== Changes ===
|
2520 |
+
Updated Magento Mobile package to ver. 18
|
2521 |
+
|
2522 |
+
=== Fixes ===
|
2523 |
+
Fixed Symlinks do not work for back-end blocks
|
2524 |
+
Fixed The names of WPPHS depend on a merchant`s country in the backend. Create a functionality for dynamic changing.
|
2525 |
+
Fixed Disabled success redirect functionality in paypal express checkout
|
2526 |
+
Fixed Added whitelist support to get.php script
|
2527 |
+
Fixed Mage_Customer_Model_Address class name is hardcoded in certain models
|
2528 |
+
Fixed Typo in Mage_ImportExport_Model_Import_Adapter_Abstract::_construct()
|
2529 |
+
Fixed 'FOUND' and 'NOT FOUND' labels are not translated in Mage_SalesRule_Model_Rule_Condition_Product_Found::loadValueOptions()
|
2530 |
+
Fixed 'Select' label is not translated in Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid::_prepareColumns()
|
2531 |
+
Fixed Invalid HTML from form multiline element renderer
|
2532 |
+
Fixed Collection calling private _setOrder() method in CatalogEvent module
|
2533 |
+
Fixed Tags on search results for Global Record Search (Adminhtml) are not translatable
|
2534 |
+
Fixed JavaScript bug in IE8 with date advice set during js validation.
|
2535 |
+
Fixed Missing translation for ZF error messages
|
2536 |
+
- provided translation of ZF native validation error messages
|
2537 |
+
Fixed Shopping Cart Price Rule->Conditions->Shipping Country is not correctly controlled on multiple checkout.
|
2538 |
+
Fixed Moneybookers Multistore System Configuration
|
2539 |
+
Fixed Moneybookers OBT Defaults
|
2540 |
+
Fixed Product info API request
|
2541 |
+
- a behavior of the function, was optimized;
|
2542 |
+
- refactoring classes with calling function from helper without changing the inside logic;
|
2543 |
+
- duplicated code were moved to catalog/product helper with creating the new one function for that.
|
2544 |
+
Fixed Poor randomness of auto-generated passwords in Customer Model
|
2545 |
+
- was used function from core helper;
|
2546 |
+
- code style has been formatted.
|
2547 |
+
Fixed several probable vulnerabilities on front and backend
|
2548 |
+
Fixed typos in adminhtml widget form block
|
2549 |
+
- Changed reserved word 'const' to lower case in tax config model
|
2550 |
+
Fixed Google Base Synchronize
|
2551 |
+
- Fixed fatal error on very first Publish and then Synchronizing if in GB products already were
|
2552 |
+
- Fixed potential fatal when on mass Publish action we will not retrieve any item id: expected array, but null or empty string given
|
2553 |
+
Fixed Rounding issues in shipping methods and in sales payment
|
2554 |
+
Fixed Usage of non-mb-supported strlen() in custom option validation
|
2555 |
+
- fixed length calculation routine to work with multi-byte characters
|
2556 |
+
- changed order of evaluation, so that length is calculated only if length constraint is set for custom option
|
2557 |
+
Fixed Unused class Mage_Reports_Model_Mysql4_Shopcart_Product_Collection did not marked like deprecated
|
2558 |
+
- mark class as deprecated after 1.5.0.1
|
2559 |
+
Fixed Products prepare function
|
2560 |
+
- Change prepare products function
|
2561 |
+
- Update resource with phpDoc
|
2562 |
+
- Update wsdl
|
2563 |
+
Improved SOAP Faults in Shopping Cart
|
2564 |
+
- all faults for ShoppingCart are unique for each issue and have wide description
|
2565 |
+
Fixed Shopping Cart create order should return order increment id
|
2566 |
+
- updated wsdl, wsi
|
2567 |
+
- changed return type for Mage_Checkout_Model_Cart_Api::createOrder
|
2568 |
+
Fixed Grouped product has no configured price in Wishlist
|
2569 |
+
Fixed Unable to continue checkout when "Street Address" use non english characters
|
2570 |
+
Fixed Misprint in comment in Mage_Checkout_Model_Cart::init()
|
2571 |
+
Fixed Controllers used protected properties
|
2572 |
+
- removed protected property _hasDataChanges equals true in controllers
|
2573 |
+
- added property _hasDataChanges equals true in method "addComment" for all objects
|
2574 |
+
Fixed Page "404 Not Found" is showed by clicked Edit link in the Invoice page of placed order
|
2575 |
+
Fixed Google Base Synchronize
|
2576 |
+
Fixed probably SQL-injection in backend
|
2577 |
+
Fixed Error on Authorize.net Direct Post payment method in Backend
|
2578 |
+
Fixed API default/SOAP functionality switched
|
2579 |
+
- removed unused variable loading
|
2580 |
+
- changed loading default api handler in IndexController
|
2581 |
+
- added loading default "soap" api handler in SoapController
|
2582 |
+
Fixed Missed unique index on eav table
|
2583 |
+
Fixed Its possible to add&proceed to checkout with any product from the catalog no matter website its assign to.
|
2584 |
+
Fixed Order status visible_on_front flag in configuration file can't be overridden
|
2585 |
+
Fixed Unexpected error message appears when quantity to refund more than quantity invoiced
|
2586 |
+
Fixed PayPal payment methods are not shown on the checkout Payment Information step if Brazilian Real is set as base currency
|
2587 |
+
- Added new supported currency codes into config
|
2588 |
+
Fixed Trim value after explode
|
2589 |
+
Fixed Unable to save customer date attribute with date more then 2010
|
2590 |
+
Fixed No customer's information
|
2591 |
+
Fixed PayPal Business Email address update
|
2592 |
+
Fixed probable abuse with image re-size functionality on frontend
|
2593 |
+
Fixed Hovering mouse cursor on "Configure" button for a composite product shows incorrect hint
|
2594 |
+
Fixed Error in fulltext search indexation for values that contain 'à' character
|
2595 |
+
- modified regular expression to correct process of unicode characters
|
2596 |
+
Fixed Zooming don't work for an image larger or taller than the container
|
2597 |
+
Fixed Variable is used before its definition in Mage_CatalogRule_Helper_Data::calcPriceRule()
|
2598 |
+
Fixed Typo in app\design\frontend\base\default\template\checkout\success.phtml
|
2599 |
+
Fixed Fatal error during newsletters sending via cron
|
2600 |
+
- Also added missed PHP-docs to Mage_Newsletter_Model_Problem class.
|
2601 |
+
Fixed Quantity of bundle item is not stored correctly, in case when it is decimal
|
2602 |
+
Fixed Unable to change configurable product name for store view
|
2603 |
+
- the bug was in two HTML input tags with same names located on "General" and "Associated Products" tabs. One of them was been renamed to solve the problem.
|
2604 |
+
Fixed Microsoft Excel 2007 fails to open Magento generated XML file
|
2605 |
+
Fixed several probable XSS issues on front end and backend
|
2606 |
+
Fixed Admin page - incorrect displaying of pop-up message for gift options in Items Ordered block
|
2607 |
+
Fixed One extra unnecessary product appears in Items Ordered list of placed Order, when payment is provided using Authorize.net Direct Post
|
2608 |
+
Fixed If 3D Secure Card Validation is enabled then Gift Options section has wrong position during backend order creation
|
2609 |
+
Fixed Reindex of Category Products for large catalogs is extremely slow
|
2610 |
+
Fixed Product minimum quantity, add to cart
|
2611 |
+
Fixed Created in Backend customer doubled after creation order for him and not save any addres information
|
2612 |
+
Fixed Changes to helper text for the images for the application submission page
|
2613 |
+
Fixed Redirect patch
|
2614 |
+
Fixed product list images for iPad device to use base image
|
2615 |
+
Fixed Sending invoice email don`t change the status
|
2616 |
+
Fixed remove paypal country id hard coded
|
2617 |
+
Fixed Mobile Controller issue
|
2618 |
+
Fixed App locations (countries) do not match iTunes App Stores countries available
|
2619 |
+
Fixed Disabled cookie message issue
|
2620 |
+
Fixed Information about Gift Options is not stored, when admin user performs Edit Order action in backend
|
2621 |
+
Fixed Web form with empty fields can be saved - also is_object() calls are replaced with instanceof checking inside of Adminhtml/MobileController
|
2622 |
+
Fixed Bundle product with required option must have "Configure" button inactive if one of the option is out of stock.
|
2623 |
+
Fixed Unable to retrieve product attributes, "Unsupported operand types"
|
2624 |
+
Fixed Add to Wishlist is not work
|
2625 |
+
Fixed A bug inside catalog/model/product/Api.php::create prevents this function from working
|
2626 |
+
- Added $store parameter.
|
2627 |
+
Fixed CSS Merger Cache Ignores Hostname and HTTPS
|
2628 |
+
- on frontend when "Use Secure URLs in Frontend" is set to "yes", https is used only for some selected pages. This fix takes into account what's the protocol in use
|
2629 |
+
Fixed Improvement to block caching
|
2630 |
+
Fixed Typo in Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Type_Configurable_Attribute::savePrices()
|
2631 |
+
Fixed Shipping creation for bundle product shows wrong q-ty
|
2632 |
+
Fixed Check for controller instance in rating option resource model
|
2633 |
+
Fixed Export Filters are not working correctly during export of customers
|
2634 |
+
Fixed Function "Apply Tax On - Original price only" does not correct calculate product tax
|
2635 |
+
Fixed Mage_Index.csv is not used at all
|
2636 |
+
Fixed Incorrect tax count, when making new order through back-end and using discount coupon (price cart rule)
|
2637 |
+
Fixed Error "Source file moving failed" on Import process, when PHP version is 5.2
|
2638 |
+
Fixed "Store credit amount can not exceed order amount" error in Credit Memo applying to Store Credit for decimal quantities and decimal subtotals
|
2639 |
+
Fixed Disabled cookie message issue
|
2640 |
+
Fixed Edit Order without creating new one functionality doesn't save changes in non-default customer address attributes
|
2641 |
+
Fixed Unable to buy Downloadable product with specified option "Links can be purchased separately" set to "No"
|
2642 |
+
Fixed Incorrect message of soap fault
|
2643 |
+
Fixed Information about Gift Options is not stored, when admin user performs Edit Order action in backend
|
2644 |
+
Fixed Unable to open "View all wishlist items" link from email
|
2645 |
+
- Added action to add shared wishlist item to shopping cart
|
2646 |
+
Fixed iFrame must be centered for Website Payments Pro Hosted Solution payment method.
|
2647 |
+
Fixed Free shipping does not transfer to Google Checkout when it is enabled in a shipping method
|
2648 |
+
- Added support of UPS carrier methods with UPS XML type of rates calculation
|
2649 |
+
Fixed Incorrect tax summary for partial credit memos/invoices
|
2650 |
+
Fixed PayPal Standart: order has two invoice and two refund
|
2651 |
+
Fixed A product hasn't been added to whishlist from category with closed, upcoming events
|
2652 |
+
Fixed Customer password is not imported from CSV file
|
2653 |
+
Fixed CDN - necessary to replace information message
|
2654 |
+
Fixed When put values in Customer Name and Address Options they do not reflect on the backend customer and customer address forms
|
2655 |
+
Fixed Reports-> Products-> Products ordered - Trace appeared
|
2656 |
+
Fixed Mage_Core_Helper_Url::getCurrentUrl() method ignores server PORT
|
2657 |
+
Fixed No ability to change payment from Store Credits, when customer backs to a Cart from Order Review step, and then goes to checkout again (OnePageCheckout)
|
2658 |
+
Fixed Customer attribute labels not translated in validation error messages
|
2659 |
+
- added translation for attribute labels at classes Mage_Customer_Model_Attribute_Data_*
|
2660 |
+
Fixed Typos in: Varien_Db_Adapter_Pdo_Mysql, Varien_File_Uploader
|
2661 |
+
Fixed Mage_Core_Model_Design_Package::_prepareUrl() uses incorrect regular expression to check whether the url is relative
|
2662 |
+
- modified preg_match for detecting absolute urls
|
2663 |
+
Fixed Mage_Catalog_Block_Product_Gallery::getImageWidth() returns false for images with width smaller than 600px
|
2664 |
+
- modified method Mage_Catalog_Block_Product_Gallery::getImageWidth(), if width <= 600 return width value, not false
|
2665 |
+
Fixed Incorrect view of the shipping tax at the back end, unnecessary $0.01
|
2666 |
+
Fixed Wrong visualisation of "Original Price" in placed order
|
2667 |
+
- collecting totals for quote at multishipping checkout
|
2668 |
+
Fixed Incorrect view of popup windows for composite product on backend (only IE)
|
2669 |
+
Added Adding Composite Products in Admin Order Creation
|
2670 |
+
- Fixed styles in ie7
|
2671 |
+
Fixed "Items Ordered" tab is not refreshing while Admin order creation
|
2672 |
+
Fixed Free shipping does not transfer to Google Checkout when it is enabled in a shipping method
|
2673 |
+
- Re factored and optimized code
|
2674 |
+
- Improved performance
|
2675 |
+
- Added dependency for GoogleCheckout module from Usa module
|
2676 |
+
- Added fedex and usps free methods supporting
|
2677 |
+
|
2678 |
+
|
2679 |
+
==== 1.5.x-devel-100810 ====
|
2680 |
+
|
2681 |
+
=== Fixes ===
|
2682 |
+
|
2683 |
+
Fixed Shopping Cart Price Rule->Conditions->Shipping Country is not correctly controlled on multiple checkout.
|
2684 |
+
Fixed Moneybookers Multistore System Configuration
|
2685 |
+
Fixed Moneybookers OBT Defaults
|
2686 |
+
Fixed Product info API request
|
2687 |
+
- a behavior of the function, was optimized;
|
2688 |
+
- refactoring classes with calling function from helper without changing the inside logic;
|
2689 |
+
- duplicated code were moved to catalog/product helper with creating the new one function for that.
|
2690 |
+
Fixed Poor randomness of auto-generated passwords in Customer Model
|
2691 |
+
- was used function from core helper;
|
2692 |
+
- code style has been formatted.
|
2693 |
+
Fixed several probable vulnerabilities on front and backend
|
2694 |
+
Fixed typos in adminhtml widget form block
|
2695 |
+
- Changed reserved word 'const' to lower case in tax config model
|
2696 |
+
Fixed Google Base Synchronize
|
2697 |
+
- Fixed fatal error on very first Publish and then Synchronizing if in GB products already were
|
2698 |
+
- Fixed potential fatal when on mass Publish action we will not retrieve any item id: expected array, but null or empty string given
|
2699 |
+
Fixed Rounding issues in shipping methods and in sales payment
|
2700 |
+
Fixed Usage of non-mb-supported strlen() in custom option validation
|
2701 |
+
- fixed length calculation routine to work with multi-byte characters
|
2702 |
+
- changed order of evaluation, so that length is calculated only if length constraint is set for custom option
|
2703 |
+
Fixed Unused class Mage_Reports_Model_Mysql4_Shopcart_Product_Collection did not marked like deprecated
|
2704 |
+
- mark class as deprecated after 1.5.0.1
|
2705 |
+
|
2706 |
+
|
2707 |
+
==== 1.5.x-devel-100247 ====
|
2708 |
+
|
2709 |
+
=== Improvements ===
|
2710 |
+
Implemented GiftMessage API Faults
|
2711 |
+
- added faults in functions
|
2712 |
+
- added description in api.xml
|
2713 |
+
Implemented The names of WPPHS depend on a merchant`s country in the backend. Create a functionality for dynamic changing.
|
2714 |
+
- Added functionality for dynamic changing the names of WPPHS
|
2715 |
+
- Added backend config into system.xml
|
2716 |
+
|
2717 |
+
=== Fixes ===
|
2718 |
+
Fixed Products prepare function
|
2719 |
+
- Change prepare products function
|
2720 |
+
- Update resource with phpDoc
|
2721 |
+
- Update wsdl
|
2722 |
+
Improved Faults in Shopping Cart
|
2723 |
+
- all faults for ShoppingCart are unique for each issue and have wide description
|
2724 |
+
Fixed Shopping Cart create order should return order increment id
|
2725 |
+
- updated wsdl, wsi
|
2726 |
+
- changed return type for Mage_Checkout_Model_Cart_Api::createOrder
|
2727 |
+
Fixed Grouped product has no configured price in Wishlist
|
2728 |
+
Fixed Unable to continue checkout when "Street Address" use non english characters
|
2729 |
+
Fixed Misprint in comment in Mage_Checkout_Model_Cart::init()
|
2730 |
+
Fixed Controllers used protected properties
|
2731 |
+
- removed protected property _hasDataChanges equals true in controllers
|
2732 |
+
- added property _hasDataChanges equals true in method "addComment" for all objects
|
2733 |
+
Fixed Page "404 Not Found" is showed by clicked Edit link in the Invoice page of placed order
|
2734 |
+
Fixed probably XSS vulnerabilities in backend
|
2735 |
+
Fixed Google Base Synchronize
|
2736 |
+
Fixed probably SQL-injection in backend
|
2737 |
+
Fixed Error on Authorize.net Direct Post payment method in Backend
|
2738 |
+
Fixed API default/SOAP functionality switched
|
2739 |
+
- removed unused variable loading
|
2740 |
+
- changed loading default api handler in IndexController
|
2741 |
+
- added loading default "soap" api handler in SoapController
|
2742 |
+
Fixed Missed unique index on eav table
|
2743 |
+
Fixed Its possible to add&proceed to checkout with any product from the catalog no matter website its assign to.
|
2744 |
+
Fixed Order status visible_on_front flag in configuration file can't be overridden
|
2745 |
+
Fixed Unexpected error message appears when quantity to refund more than quantity invoiced
|
2746 |
+
Fixed PayPal payment methods are not shown on the checkout Payment Information step if Brazilian Real is set as base currency
|
2747 |
+
- Added new supported currency codes into config
|
2748 |
+
Fixed Trim value after explode
|
2749 |
+
Fixed Unable to save customer date attribute with date more then 2010
|
2750 |
+
Fixed No customer's information
|
2751 |
+
Fixed PayPal Business Email address update
|
2752 |
+
|
2753 |
+
|
2754 |
+
==== 1.5.x-devel-96719 ====
|
2755 |
+
|
2756 |
+
=== Improvements ===
|
2757 |
+
Implemented WS-I for API
|
2758 |
+
- added wsi.xml for all WebAPI modules
|
2759 |
+
- added new wsi-soap handler
|
2760 |
+
- added new wsi-soap adapter
|
2761 |
+
- changed admin configuration, added parameter into "Magento Core API"->WSI Compliance
|
2762 |
+
- changed api.xml
|
2763 |
+
Implemented GiftMessage for Cart
|
2764 |
+
|
2765 |
+
== Fixes ===
|
2766 |
+
Fixed probable abuse with image re-size functionality on frontend
|
2767 |
+
Fixed Hovering mouse cursor on "Configure" button for a composite product shows incorrect hint
|
2768 |
+
Fixed Error in fulltext search indexation for values that contain 'à' character
|
2769 |
+
- modified regular expression to correct process of unicode characters
|
2770 |
+
Fixed Zooming don't work for an image larger or taller than the container
|
2771 |
+
Fixed Variable is used before its definition in Mage_CatalogRule_Helper_Data::calcPriceRule()
|
2772 |
+
Fixed Typo in app\design\frontend\base\default\template\checkout\success.phtml
|
2773 |
+
Fixed Fatal error during newsletters sending via cron
|
2774 |
+
- Also added missed PHP-docs to Mage_Newsletter_Model_Problem class.
|
2775 |
+
Fixed Quantity of bundle item is not stored correctly, in case when it is decimal
|
2776 |
+
Fixed Unable to change configurable product name for store view
|
2777 |
+
- the bug was in two HTML input tags with same names located on "General" and "Associated Products" tabs. One of them was been renamed to solve the problem.
|
2778 |
+
Fixed Microsoft Excel 2007 fails to open Magento generated XML file
|
2779 |
+
Fixed several probable XSS issues on front end and backend
|
2780 |
+
Fixed probable SQL injection on frontend
|
2781 |
+
Fixed Admin page - incorrect displaying of pop-up message for gift options in Items Ordered block
|
2782 |
+
Fixed One extra unnecessary product appears in Items Ordered list of placed Order, when payment is provided using Authorize.net Direct Post
|
2783 |
+
Fixed If 3D Secure Card Validation is enabled then Gift Options section has wrong position during backend order creation
|
2784 |
+
Fixed Reindex of Category Products for large catalogs is extremely slow
|
2785 |
+
Fixed Product minimum quantity, add to cart
|
2786 |
+
Fixed Created in Backend customer doubled after creation order for him and not save any addres information
|
2787 |
+
Fixed Changes to helper text for the images for the application submission page
|
2788 |
+
Fixed Redirect patch
|
2789 |
+
Fixed product list images for iPad device to use base image
|
2790 |
+
Fixed Sending invoice email don`t change the status
|
2791 |
+
Fixed remove paypal country id hard coded
|
2792 |
+
Fixed Mobile Controller issue
|
2793 |
+
Fixed App locations (countries) do not match iTunes App Stores countries available
|
2794 |
+
Fixed Disabled cookie message issue
|
2795 |
+
Fixed Information about Gift Options is not stored, when admin user performs Edit Order action in backend
|
2796 |
+
Fixed Web form with empty fields can be saved - also is_object() calls are replaced with instanceof checking inside of Adminhtml/MobileController
|
2797 |
+
Fixed Bundle product with required option must have "Configure" button inactive if one of the option is out of stock.
|
2798 |
+
Fixed Unable to retrieve product attributes, "Unsupported operand types"
|
2799 |
+
Fixed Add to Wishlist is not work
|
2800 |
+
Fixed A bug inside catalog/model/product/Api.php::create prevents this function from working
|
2801 |
+
- Added $store parameter.
|
2802 |
+
Fixed CSS Merger Cache Ignores Hostname and HTTPS
|
2803 |
+
- on frontend when "Use Secure URLs in Frontend" is set to "yes", https is used only for some selected pages. This fix takes into account what's the protocol in use
|
2804 |
+
Fixed Improvement to block caching
|
2805 |
+
Fixed Typo in Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Type_Configurable_Attribute::savePrices()
|
2806 |
+
Fixed Shipping creation for bundle product shows wrong q-ty
|
2807 |
+
Fixed Check for controller instance in rating option resource model
|
2808 |
+
Fixed Export Filters are not working correctly during export of customers
|
2809 |
+
Fixed Function "Apply Tax On - Original price only" does not correct calculate product tax
|
2810 |
+
Fixed Mage_Index.csv is not used at all
|
2811 |
+
Fixed Incorrect tax count, when making new order through back-end and using discount coupon (price cart rule)
|
2812 |
+
Fixed Error "Source file moving failed" on Import process, when PHP version is 5.2
|
2813 |
+
Fixed "Store credit amount can not exceed order amount" error in Credit Memo applying to Store Credit for decimal quantities and decimal subtotals
|
2814 |
+
Fixed Disabled cookie message issue
|
2815 |
+
Fixed Edit Order without creating new one functionality doesn't save changes in non-default customer address attributes
|
2816 |
+
Fixed Unable to buy Downloadable product with specified option "Links can be purchased separately" set to "No"
|
2817 |
+
Fixed Incorrect message of soap fault
|
2818 |
+
Fixed Information about Gift Options is not stored, when admin user performs Edit Order action in backend
|
2819 |
+
Fixed Unable to open "View all wishlist items" link from email
|
2820 |
+
- Added action to add shared wishlist item to shopping cart
|
2821 |
+
Fixed iFrame must be centered for Website Payments Pro Hosted Solution payment method.
|
2822 |
+
Fixed Free shipping does not transfer to Google Checkout when it is enabled in a shipping method
|
2823 |
+
- Added support of UPS carrier methods with UPS XML type of rates calculation
|
2824 |
+
Fixed Incorrect tax summary for partial credit memos/invoices
|
2825 |
+
Fixed PayPal Standart: order has two invoice and two refund
|
2826 |
+
Fixed A product hasn't been added to whishlist from category with closed, upcoming events
|
2827 |
+
Fixed Customer password is not imported from CSV file
|
2828 |
+
Fixed CDN - necessary to replace information message
|
2829 |
+
Fixed When put values in Customer Name and Address Options they do not reflect on the backend customer and customer address forms
|
2830 |
+
Fixed Reports-> Products-> Products ordered - Trace appeared
|
2831 |
+
|
2832 |
+
|
2833 |
+
==== 1.5.x-devel-96719 ====
|
2834 |
+
|
2835 |
+
=== Fixes ===
|
2836 |
+
Fixed Mage_Core_Helper_Url::getCurrentUrl() method ignores server PORT
|
2837 |
+
Fixed No ability to change payment from Store Credits, when customer backs to a Cart from Order Review step, and then goes to checkout again (OnePageCheckout)
|
2838 |
+
Fixed Customer attribute labels not translated in validation error messages
|
2839 |
+
- added translation for attribute labels at classes Mage_Customer_Model_Attribute_Data_*
|
2840 |
+
Fixed Typos in: Varien_Db_Adapter_Pdo_Mysql, Varien_File_Uploader
|
2841 |
+
Fixed Mage_Core_Model_Design_Package::_prepareUrl() uses incorrect regular expression to check whether the url is relative
|
2842 |
+
- modified preg_match for detecting absolute urls
|
2843 |
+
Fixed Mage_Catalog_Block_Product_Gallery::getImageWidth() returns false for images with width smaller than 600px
|
2844 |
+
- modified method Mage_Catalog_Block_Product_Gallery::getImageWidth(), if width <= 600 return width value, not false
|
2845 |
+
Fixed Incorrect view of the shipping tax at the back end, unnecessary $0.01
|
2846 |
+
Fixed Wrong visualisation of "Original Price" in placed order
|
2847 |
+
- collecting totals for quote at multishipping checkout
|
2848 |
+
Fixed Incorrect view of popup windows for composite product on backend (only IE)
|
2849 |
+
Added Adding Composite Products in Admin Order Creation
|
2850 |
+
- Fixed styles in ie7
|
2851 |
+
Fixed "Items Ordered" tab is not refreshing while Admin order creation
|
2852 |
+
Fixed Free shipping does not transfer to Google Checkout when it is enabled in a shipping method
|
2853 |
+
- Re factored and optimized code
|
2854 |
+
- Improved performance
|
2855 |
+
- Fixed typos
|
2856 |
+
- Added dependency for GoogleCheckout module from Usa module
|
2857 |
+
- Added fedex and usps free methods supporting
|
2858 |
+
|
2859 |
+
|
2860 |
+
==== 1.5.0.1 =====
|
2861 |
+
|
2862 |
+
=== Major Highlights ===
|
2863 |
+
Due to a design flaw we are removing alternative image storage feature from this release. It will be redesigned and released in our upcoming releases
|
2864 |
+
|
2865 |
+
==== 1.5.0.0 =====
|
2866 |
+
|
2867 |
+
=== Major Highlights ===
|
2868 |
+
Added Payflow Link using HSS (Hosted Sole Solution)
|
2869 |
+
Balance Response, Partial Authorization Transactions, Authorization Reversals Support for MasterCard and Discover with Authorize.net
|
2870 |
+
3D Secure Authentication for Authorize.net payment method
|
2871 |
+
Authorize.Net SIM payment method
|
2872 |
+
Improved Import/Export functionality
|
2873 |
+
Ability to order composite products from backend including:
|
2874 |
+
- reconfigure already added products on front end
|
2875 |
+
- adding preconfigured products in wish-list
|
2876 |
+
Alternative media storage options
|
2877 |
+
- Database
|
2878 |
+
- CDN
|
2879 |
+
Order status management
|
2880 |
+
- ability to add new status and assign to some state
|
2881 |
+
- statuses now stored in DB table instead of configuration file
|
2882 |
+
Ability to edit order addresses for an existing order
|
2883 |
+
- this functionality admin has link to edit address for order view page
|
2884 |
+
Magento Mobile included in base packaging
|
2885 |
+
|
2886 |
+
=== Improvements ===
|
2887 |
+
Implemented Environment emulation in core email class
|
2888 |
+
- Added Emulation model.
|
2889 |
+
- Added Email Info and Email Template Mailer models.
|
2890 |
+
- Re-factored sendEmail() and sendUpdateEmail() methods of order, credit memo, invoice and shipment models.
|
2891 |
+
Added App Previewer for Android and iPad in XmlConenect
|
2892 |
+
Upgraded Zend Framework to 1.11.0
|
2893 |
+
Implemented new process of hashing parameters in Ogone payment method
|
2894 |
+
- implemented an advanced hashing method that invokes all transaction parameters for building security hash
|
2895 |
+
- updated fields sort order in system configuration
|
2896 |
+
- added the new parameter which designates whether to use the old or advanced hashing method
|
2897 |
+
- made SHA-IN and SHA-OUT sys config parameter titles corresponding to parameter titles on merchant site in Ogone
|
2898 |
+
- major refactoring of the Ogone helper: simplified public interface of hash validation, added support for SHA-1, SHA-256 and SHA-512 algorithms (not selectable in system config)
|
2899 |
+
- optimized performance of debugging and building redirect form: removed 2 excessive calls (one from template, another from debugging - it invoked form building even if debugging was disabled)
|
2900 |
+
- since the form is built from a block, prevented injecting SID parameter to URLs when building form
|
2901 |
+
- added HTML escaping in the template hidden fields
|
2902 |
+
- added new system configuration parameter - hashing algorithm
|
2903 |
+
- verified/fixed all API hashing parameters in accordance to documentation v.5.0
|
2904 |
+
Fixed several memory leaks in product model. Added tool method clear() to clean object data and references to this object
|
2905 |
+
Implemented Order payment action for PayPal
|
2906 |
+
Implemented SOAP Api calls for shopping cart
|
2907 |
+
Upgraded Zend Framework to 1.11.1
|
2908 |
+
Phoenix_Moneybookers improvements:
|
2909 |
+
- updated payment logo images
|
2910 |
+
- added "Maestro" and "Online Bank Transfer" payment methods into Moneybookers group
|
2911 |
+
- wrapped Moneybookers payment logo title and alt text on payment selection text into translation calls
|
2912 |
+
|
2913 |
+
|
2914 |
+
=== Changes ===
|
2915 |
+
Paypal HSS payment method label, comment and default title
|
2916 |
+
|
2917 |
+
=== Fixes ===
|
2918 |
+
Fixed User cannot place order using Paypal payment methods with 3d secure
|
2919 |
+
Fixed iPhone product list preview
|
2920 |
+
Fixed App locations (countries) do not match iTunes App Stores countries available
|
2921 |
+
Fixed Added parent quote items to discount calculation to prevent skipping of configurable products.
|
2922 |
+
Fixed Rounding issue on front end if discount with fixed amount is applied and no tax rules applies to the order.
|
2923 |
+
- added rounding item discount before take away from total discount
|
2924 |
+
Fixed Fatal error after deleting one of the shipping addresses during checkout with multiple addresses
|
2925 |
+
Fixed Merged CSS files with selected native Database as media storage are not applied with Chrome and FF
|
2926 |
+
- first trying to detect MIME type manually, and only after by native php function
|
2927 |
+
Fixed The buttons "Accept Payment" and "Deny Payment" do not appear in orders with status 'Payment Review'
|
2928 |
+
Fixed issue when Simple products not visible individually (part of grouped) are moved to Wishlist
|
2929 |
+
Fixed Impossible to delete product from Items Ordered (backend Order creation) using "remove" in Action dropdown
|
2930 |
+
Fixed Fatal error after deleting one of the shipping addresses during checkout with multiple addresses
|
2931 |
+
Fixed Qty for simple products (part of grouped) is incorrect when moved from order to Wishlist
|
2932 |
+
- additional fixture for other testcase
|
2933 |
+
Fixed Grouped product is added to Items Ordered as grouped, when any of buttons in sideblocks is pressed after product configuration in a product grid (backend Order creation)
|
2934 |
+
- prevent to add unconfigured grouped product on server side
|
2935 |
+
- in sales.js, do productConfigure.clean('quote_items') only if "Items Ordered" block is going to update
|
2936 |
+
- in sales.js, hide "Search" block only when product added to qoute from "Search" block
|
2937 |
+
- in configure.js, added ability to cleaning by list type scope
|
2938 |
+
Fixed Incorrect behavior of Partial Authorization process, when admin user cancels authorizations (Authorize.net)
|
2939 |
+
- added reloading block 'totals' after canceling partial authorization
|
2940 |
+
Fixed Google Checkout Issue - Transactions not appearing
|
2941 |
+
- adding transaction (transaction id = google order id) for googlecheckout payment
|
2942 |
+
- fixed usage of Mage_GoogleCheckout_Model_Api_Xml_Callback::_getTaxClassForShipping() method according to it's interface
|
2943 |
+
- fixed usage of Mage_GoogleCheckout_Model_Api_Xml_Abstract::_getTaxClassForShipping() method according to it's interface
|
2944 |
+
- creating transactions for refund and chargeback
|
2945 |
+
Fixed Missed index on sales.order table
|
2946 |
+
Fixed Price for composite products in a products grid on Order creation page
|
2947 |
+
Fixed Status of Order is now doesn't ignore the setting in Config for AUTH_AND_CAPTURE orders.
|
2948 |
+
Fixed Unable to install extension using MCM for CE
|
2949 |
+
Fixed Rounding error
|
2950 |
+
Fixed Preview iFrame of iPhone recieve error message
|
2951 |
+
- wrap images manipulations with try-catch (in controller)
|
2952 |
+
- alert the catched error message when preview is loaded
|
2953 |
+
Fixed Most product attibutes not exporting
|
2954 |
+
Fixed Removed error message on new orders payd by PayflowLink with "complete" status (like on virtual products)
|
2955 |
+
Fixed Behavior when customer changes billing/shipping address and/or changes items in cart, etc having started Partial Authorization
|
2956 |
+
- added chopping cart`s and address checksum checking for partial authorization process
|
2957 |
+
Fixed Moving composite products from shopping cart to wishlist does not work
|
2958 |
+
- fixed error handling - added catching and processing, so in case of errors only item with error will not be moved
|
2959 |
+
- fixed wishlist items to get right storeId (by passing product, and not productId)
|
2960 |
+
Fixed Rounding issue (1 cent) appears on Tax Calculation Method Based On = Row
|
2961 |
+
Fixed category/product image resizing
|
2962 |
+
- Image sizes for Ipad has been changed
|
2963 |
+
- Re-Factored: Application model call has been changed to helper method for all old calls
|
2964 |
+
Fixed Only check money payment at standard chechout process receive success
|
2965 |
+
Fixed Edit fonts configuration for iPad
|
2966 |
+
Added iPad preview should illustrate tabs' state.
|
2967 |
+
- Made separate icons
|
2968 |
+
- Active/inactive logic added
|
2969 |
+
- Added custom fonts for rating color customization
|
2970 |
+
- Fixed positions for the icons
|
2971 |
+
- Removed icons labels
|
2972 |
+
- "i"-icon should always be on screen (currently it becomes hidden after making "information"-tab inactive)
|
2973 |
+
Fixed Review collection need to sort with the latest added review
|
2974 |
+
Fixed XML Connect - Incorrect help link in Push Notification page
|
2975 |
+
Fixed API Certificate Based Authentication Used default signature value instead of the Certificate value
|
2976 |
+
Fixed XML Connect - Design page - Ipad backgrounds issue
|
2977 |
+
Fixed "Ship to different address" is not applied with IE8 with any payment method
|
2978 |
+
Fixed Added skipping delta in shipping calculation on free shipping
|
2979 |
+
Fixed Incorrect behavior of Gift Options popup for bundle product on backend Order View page. No ability to close popup
|
2980 |
+
Fixed Rounding issue (1 cent) appears on discount applied and Tax Calculation Method Based On = Row
|
2981 |
+
Fixed Add landscape mode background for Android and update information for portrait mode background
|
2982 |
+
- changed <backgroundImageAndroid> to <backgroundAndroidPortraitImage>,
|
2983 |
+
- changed all <someimagetagImageDeviceOrientatin> to <someimagetagDeviceOrientatinImage> for correctly image resizings,
|
2984 |
+
- same for Icon,
|
2985 |
+
- added orientation divisions for Android devices,
|
2986 |
+
- fixed wrong spelled word "Portret" onto "Portrait" for iPad's config tags
|
2987 |
+
- Image resize method has been changed
|
2988 |
+
- backround getter method fixed
|
2989 |
+
Fixed Tax rates export doesn't work
|
2990 |
+
Fixed Incorrect downloader version in footer
|
2991 |
+
Changed default title for HSS payment method
|
2992 |
+
Fixed Rounding issue on credit memos/invoices causing different totals in magento and 1 cent error on paypal
|
2993 |
+
- added adjustment for invoice`s subtotal_incl_tax and base_subtotal_incl_tax if invoice is last invoice of order
|
2994 |
+
Fixed Added setting of store id in payment method instance on Authorize.net partial authorization cancel from admin place.
|
2995 |
+
Fixed Fix Android preview area
|
2996 |
+
- Added custom fonts
|
2997 |
+
- Fixed header icons borders
|
2998 |
+
- Fixed button border on homepage
|
2999 |
+
- Added custom color declaration
|
3000 |
+
Fixed Tabs dont affect second preview screen for Android mobile application
|
3001 |
+
Fixed Incorrect design for Android mobile application in IE8
|
3002 |
+
Added update Preview Area for iPad
|
3003 |
+
- Fixed incorrect design for Ipad mobile application in IE8
|
3004 |
+
- added stars custom fonts for landscape mode
|
3005 |
+
- Fixed wrong positioning of the icons in landscape mode
|
3006 |
+
Fixed Double use Authorize.net Partial Authorization Multicard with 46225 zip in one order causes wrong checkout behavior
|
3007 |
+
Fixed Using MCM 2.0 shell script produces warnings and doesn't work correctly
|
3008 |
+
Fixed Labels for composite products (backend) are shown incorrect
|
3009 |
+
Fixed Ability to Refund the already refunded item in Patial Invoice
|
3010 |
+
- added qty`s limits into creating creditmemo functionality
|
3011 |
+
Fixed Performance issue with big amount of tax rates
|
3012 |
+
Fixed Notice error in system.xml after saving PayPal configuration
|
3013 |
+
Fixed No Qty column in the Wishlist sideblock
|
3014 |
+
Fixed Export functionality doesn't work
|
3015 |
+
Fixed Maestro International CC number has no validation
|
3016 |
+
- use "Switch/Maestro" instead of "Maestro (International)"
|
3017 |
+
Fixed No transactions is created, no ability to perform Invoice, when Order, which contains Gift Options, is placed from backend with Authorize.net Direct Post payment method
|
3018 |
+
Fixed Moving Grouped product from Order and Shopping cart to the Wishlist does not work
|
3019 |
+
Fixed Added advice block hiding on synchronize process
|
3020 |
+
Fixed Database as cache backend
|
3021 |
+
- fix for MySQL 4. Shorten field lengthes
|
3022 |
+
Fixed Improvemets for MCM and Magento Extension Packager after MCMUP
|
3023 |
+
Fixed PayPal Standard with specific tax settings for shop cart item with qty >= 2
|
3024 |
+
Fixed Wrong tax calculation for bundle products
|
3025 |
+
Fixed Export Filters are not working correctly during export of customers
|
3026 |
+
Fixed Unable to complete several partial online refunds with Authorize.net Direct Post
|
3027 |
+
Fixed Disable Mage_Checkout did not remove My Cart & Checkout links in the Top Link
|
3028 |
+
Fixed An error occurs with using Payflo Link payment method and IE8
|
3029 |
+
- just small fixture of strange for user popup in IE - "Do you want to see only secure content?"
|
3030 |
+
Fixed Price for composite products in a products grid on Order creation page
|
3031 |
+
Fixed No error message appears if execute synchronization with non-existing DB
|
3032 |
+
Fixed "Configure" link in Product grid (backend) does not work (only IE)
|
3033 |
+
Fixed "Void" button must not be active on the invoice with amount captured on-line
|
3034 |
+
- redefined methods canVoid for Express and Direct Paypal models - hiding button void for invoice and creditmemo
|
3035 |
+
- redefined methods cancel for Express and Direct Paypal models - no checking for invoices for order to decide void it or not at cancel.
|
3036 |
+
Fixed Dropdown for Amount is absent (only IE)
|
3037 |
+
- create new JS method that preserves visibility states of selects in pop-up block
|
3038 |
+
Fixed Status of Order is now doesn't ignore the setting in Config.
|
3039 |
+
Fixed Incorrect behavior of AJAX-popup for Gift Options (Individual Item) in IE8
|
3040 |
+
Fixed to show full review for the iPad device
|
3041 |
+
- added checking the current app's device type is not iPad and in this case the text of the review is truncated;
|
3042 |
+
- replaced TABs on spaces in helper's class
|
3043 |
+
- Re-factored XmlConnect helperfor unknown device type
|
3044 |
+
Fixed xmlconnect/catalog/product action returns invalid html for product's description
|
3045 |
+
- added an "xml" tag before DOCTYPE definition
|
3046 |
+
Fixed wrong using of translation in method getElementHtml()
|
3047 |
+
Fixed update Preview Area for iPad
|
3048 |
+
Fixed Missed active/Inactive tabs logic added for a preview
|
3049 |
+
Fixed Selecting catalog as a price rule condition redirects you on dashboard
|
3050 |
+
- check if post array values are integers > 0
|
3051 |
+
Fixed "Go to notifications" link works improperly
|
3052 |
+
Fixed Unable to complete several partial online refunds with Authorize.net Direct Post
|
3053 |
+
Fixed "Set Products as New to Date" is not working in Catalog New Products List widget
|
3054 |
+
Fixed Mage_Adminhtml_Block_Media_Uploader::getUploaderUrl() generates incorrect path if magento is installed in a sub-directory within the root one
|
3055 |
+
Fixed Now in Admin in System->TransactionalEmails all filters are saved to session.
|
3056 |
+
Fixed Tax discrepancy between Tax Report and Order Report
|
3057 |
+
Fixed PayPal Standard with specific tax settings for shop cart item with qty >= 2
|
3058 |
+
Fixed Incorrect hint for non-configured product in Order on backend
|
3059 |
+
Fixed Flush Cache Storage alert text is now changed to: "Cache storage may contain additional data. Are you sure that you want flush it?"
|
3060 |
+
Fixed "Read Details" link is present in the message about synchronization status
|
3061 |
+
- removed read details link from rows which have not url
|
3062 |
+
Fixed Mage_Catalog_Model_Product::setFinalPrice() doesn't return its class instance for chaining purposes.
|
3063 |
+
- fixed interface erroneously changed in 1.4.1.0
|
3064 |
+
- fixed erroneous phpDoc
|
3065 |
+
Fixed First Checkout by registered Customer: First Name and Last name fields are empty
|
3066 |
+
Fixed Error with addlisttype.phtml in system log
|
3067 |
+
- Removed not deleted layout block that was forgotten after rev 90337 with fix for MAGE-1955
|
3068 |
+
Fixed Changes in UI for Order Status Management
|
3069 |
+
Fixed Catalog Price Rule is not applied
|
3070 |
+
- Added Mage_CatalogRule_Model_Rule::applyAllRulesToProduct()
|
3071 |
+
Fixed Admin order creation - Unable to delete product from the cart
|
3072 |
+
- fixed showing giftmessage options template, when no grid items are present
|
3073 |
+
- fixed updating quote items and giftmessage items when backend receives wrong item id - now it doesn't fail with exception, but process it gracefully
|
3074 |
+
Fixed With IE6 impossible to configure a Composite product in Backend
|
3075 |
+
Fixed Message for non-configured composite product is changed after pressing "Update Items and Qty's"
|
3076 |
+
Fixed Option "Order" on Payment Action dropdown must be available only for Express Checkout method
|
3077 |
+
- Removed extra spaces in system.xml.
|
3078 |
+
Fixed With IE8 an error occurs after applying the second time Credit Card in Admin panel with 3D Secure and partial authorization (Authorize.net)
|
3079 |
+
- moved embedded gift options FORM tag out of other main FORM tag (such invalid layout broke DOM in IE)
|
3080 |
+
- refactored JS-scripts, moved static to static files
|
3081 |
+
- removed not used old js-file
|
3082 |
+
Fixed Products are erased from "Product Ordered" report after deleting them
|
3083 |
+
Fixed Incorrect behavior of Reorder action applied to Order, that contains Gift Options
|
3084 |
+
Fixed When adding several configurable products at one time to Items Ordered from product grid, only last remains specified configuration (admin Order creation)
|
3085 |
+
- restored JS-initing for controls on each popup show (was erroneously removed at rev 86017)
|
3086 |
+
- fixed Configurable javascript so it won't interfere with other products controls on page
|
3087 |
+
Fixed Incorrect transaction and Partial Refunds behavior with WPP Hosted Solution, when Order is partially invoiced
|
3088 |
+
Fixed Hint for "View Details" in the Wishlist is located incorrectly
|
3089 |
+
Fixed Onepage checkout - Shipping address issues
|
3090 |
+
Fixed Tax Rate = 0% displayed in Cart
|
3091 |
+
- display (0%) in rate title
|
3092 |
+
Fixed Magento Backend performance optimization
|
3093 |
+
Fixed Creating Purchase orders from backend works incorrect (IE)
|
3094 |
+
Fixed Moving simple products (part of grouped) from shopping cart to order does not work
|
3095 |
+
Fixed Payment Applicable From = "Specific Countries" option does not work for Express Checkout (Payflow Edition)
|
3096 |
+
Fixed Cannot place Order in backend with Authorize.net Direct Post, when settings for payment method is applied on a Website scope level
|
3097 |
+
Fixed SOAP don't use store for select products collection
|
3098 |
+
- Change setting the store into filter
|
3099 |
+
Fixed "Synchronize" button is disabled if select native database twice
|
3100 |
+
- modified storage full name generation and button state check
|
3101 |
+
Fixed Wrong algorithm to determine whether product can be configured (Composite Products feature)
|
3102 |
+
- removed used method isComposite() from canConfigure() method
|
3103 |
+
Fixed Missing nobr around date in Customer Product Reviews table
|
3104 |
+
Fixed Status of Order, which is paced with Authorize.net Direct Post (Payment Action = Authorization) is incorrect
|
3105 |
+
Fixed Added base_total_refunded field to invoice table
|
3106 |
+
Fixed "Flush External Page Cache" does not work
|
3107 |
+
Fixed Database as cache backend
|
3108 |
+
Fixed Selecting products in Wishlist (backend) redirects you on dashboard
|
3109 |
+
- Fixed searching by product names and days in wishlist
|
3110 |
+
- Removed 'Visible In' column, because it showed same values as 'Added from'
|
3111 |
+
- Fixed 'Added from' column to show real values, not some erroneous 'All Visible Stores'
|
3112 |
+
- Fixed sorting by product name and days in wishlist
|
3113 |
+
Fixed Only "Library Mail" works for USPS
|
3114 |
+
Fixed The "MY WISHLIST" link always shows quantity of line items in the Wishlist and never the real quantity of items
|
3115 |
+
- fix for case when out of stock products are not shown on frontend
|
3116 |
+
Fixed Wrong behavior of Varien_Data_Collection_Db::_getConditionSql
|
3117 |
+
Fixed Incorrect shipping tax calculation on invoice creditmemos with included tax
|
3118 |
+
- Rounding of shipment taxes was added
|
3119 |
+
Fixed Impossible save empty values for store view scope
|
3120 |
+
- Remove store_id from EAV module and move all store functionality into catalog module.
|
3121 |
+
Fixed Wrong tax calculation for bundle products
|
3122 |
+
Fixed File configuration dialog is not closed when pressing 'Ok' button
|
3123 |
+
- additional fix of backend Customer functionality for IE8 to eliminate JS errors
|
3124 |
+
Fixed Product creation -> Necessary validation for SKU field
|
3125 |
+
Fixed Link "Gift Options" is not shown in Items Ordered grid of create Order page, when "Allow Gift Messages for Order Items" is set to "No"
|
3126 |
+
- considering design html at right place
|
3127 |
+
- removed useless variable from observer
|
3128 |
+
Fixed Price for composite products in a products grid on Order creation page
|
3129 |
+
Fixed Tax from orders in status pending presents in Tax Report
|
3130 |
+
Fixed Catalog Price Rule is not applied
|
3131 |
+
Fixed Incorrect tax summary for partial credit memos/invoices
|
3132 |
+
Fixed Order success page is not displayed after placing Order using Website Payments Pro Hosted Solution method
|
3133 |
+
- now, return and cancel urls can be secure (https)
|
3134 |
+
Fixed Problems with newsletter template preview on newsletter queue edit page
|
3135 |
+
Fixed Link "configure" is inactive for downloadable products in product grid on Order creation page in backend
|
3136 |
+
Fixed A system error message is missing for cases when media storage synchronization is complete or an error occurred
|
3137 |
+
- output messages for notifications edited
|
3138 |
+
Fixed Incorrect price calculation for bundle product during backend order creation(Tax is doubles in Total)
|
3139 |
+
Fixed Gift Options tab is present on product page for virtual product types
|
3140 |
+
Fixed Magento Backend performance optimization
|
3141 |
+
Fixed Gift Message for Individual Item prompt is shown in AJAX-popup, although "Allow Gift Messages for Order Items" is disabled
|
3142 |
+
Fixed Unable to change customer password when email confirmation is enabled
|
3143 |
+
Fixed Incorrect tax calculation for Tax Calculation Method Based On = Unit Price and Catalog Prices = Including Tax
|
3144 |
+
Fixed "Preferred State" for extensions is not working
|
3145 |
+
Fixed Total amount is not recounted, when customer cancels the Gift Options during OnePageCheckout
|
3146 |
+
Fixed In "Gift options" AJAX popup "OK" button written incorrectly
|
3147 |
+
Fixed No address autocomplete while admin order create with single store
|
3148 |
+
- fixes due to unnecessary AJAX calls
|
3149 |
+
Fixed Information about Gift Options is not stored, when admin user performs Edit Order action in backend
|
3150 |
+
Fixed Gift column should be removed from product grid
|
3151 |
+
Fixed SKU validation error on creating products
|
3152 |
+
Fixed Shipped order has status "Processing" if invoice has been posted with "Not Capture" and amount was later captured on paypal side.
|
3153 |
+
- considering online and offline capture amout when checking if capture is final
|
3154 |
+
- trailing white spaces removed
|
3155 |
+
Fixed Link to file from downloadable product is not available after authorize and capture payment action via Authorize.net
|
3156 |
+
- Link management observer call methods are moved to save_commit_after events (for order and its item respectively) instead of save_after events
|
3157 |
+
Fixed Price for product with file custom options in Wishlist is calculated incorrect
|
3158 |
+
- Added ability to use special price templates for displaying wishlist items (as they can be partially/fully configured and catalog price template doesn't support it)
|
3159 |
+
- Added default template, that shows configured price in addition to default clean product price
|
3160 |
+
Fixed Cross-sells products disappears after adding another products to shopping cart
|
3161 |
+
Fixed Price for composite products in a products grid on Order creation page
|
3162 |
+
Fixed No ability to delete item from Wishlist by specifying Qty = 0 and click on Update Wishlist
|
3163 |
+
Fixed Do not hide ajax loader on 'Place order' step on onepage checkout when customer selected PayflowLink payment method until PayPal iframe will be loaded
|
3164 |
+
Fixed Admin reorder with bundle item cause wrong qty of simple products
|
3165 |
+
Fixed Incorrect bundle product price and bundle items Qty count during the process of Admin Order creation
|
3166 |
+
Fixed When bundle item is configured in that way, when it cannot have User defined quantity, Qty field remains editable in AJAX-popup
|
3167 |
+
Fixed "UPS XML" allowed methods bug
|
3168 |
+
Fixed Mage_Page_Block_Template_Links_Block::$_afterText is never used
|
3169 |
+
Fixed No configuration popup for Grouped products in admin backend new order creation
|
3170 |
+
- the problem was in sales.js during parsing currency from price cell. In case when no price was present in cell the JS exception occurs. So it was needed to determine currency symbol in other way. And it way was in sets this.currencySymbol in AdminOrder class when order obj initialization or when current currency is switched.
|
3171 |
+
- small fix in grouped.phtml and giftcatd.phtml: set additioal attributes for price calculation
|
3172 |
+
- small fix in configure.js: using parameter listType instead of this.current.listType in _requestItemConfiguration method
|
3173 |
+
- small fix in sales.js: do overall popup cleaning by productConfigure.clean() for each loadArea calling
|
3174 |
+
Fixed When bundle item is configured in that way, when it cannot have User defined quantity, Qty field remains editable in AJAX-popup
|
3175 |
+
Fixed Customer data not saved when returning to cart and back to checkout
|
3176 |
+
Fixed Bad sku value for non-configured bundle in Create New Order at admin backend
|
3177 |
+
Fixed Integrity Constraint Violation in Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price::_prepareWebsiteDateTable
|
3178 |
+
Fixed URL Rewrite Exeption
|
3179 |
+
Fixed Menu "Catalog-Manage Products-Gift Options" have incorrect design and wrong position in menu list:
|
3180 |
+
Fixed Displaying Out of Stock Products on the front-end.
|
3181 |
+
Fixed Incorrect shipping tax calculation on invoice creditmemos with included tax
|
3182 |
+
Fixed Cannot login to backend while notify "This is a required field." is present
|
3183 |
+
- There was JS error, invisible due to try-catch construction. Fixed
|
3184 |
+
Fixed Authorize.net invoice capture.
|
3185 |
+
- Do not capture/refund/void transaction if transaction has been captured/voided in authorize.net panel
|
3186 |
+
Fixed Inadequate URL in Moneybookers eWallet "More Info" Link
|
3187 |
+
Fixed It is impossible to export products using the new Export module
|
3188 |
+
Fixed Tax Rate = 0% displayed in Cart
|
3189 |
+
Fixed Unable to specify quantites for bundle items in AJAX-popup, when selection of bundle items is provided using radiobuttons
|
3190 |
+
Fixed Incorrect style tables in customer confirmation email. For orders with Authorize.net payment method
|
3191 |
+
- fixed incorrect styling in customer confirmation email;
|
3192 |
+
- simplified styling on admin order page
|
3193 |
+
Fixed Cron job dispatcher incorrectly releases locks
|
3194 |
+
Fixed Incorrect items number in "MY WISHLIST" after updated quantity in the Wishlist
|
3195 |
+
- Added new configuration option "Display Wishlist Summary" in System -> Configuration -> Customers -> Wishlist section
|
3196 |
+
- Removed quantity information from wishlist frontend page
|
3197 |
+
Fixed Update compare list after delete one item
|
3198 |
+
Fixed No hint for disabled "Configure" button
|
3199 |
+
Fixed In Bundle product's page "Availability" string is not placed well
|
3200 |
+
Fixed Non-correct headers uses for email return-path.
|
3201 |
+
Fixed Numerous issued with displaying tax on front-end for bundled items
|
3202 |
+
Fixed Impossible save empty values for store view scope
|
3203 |
+
Fixed Non-correct headers uses for email return-path.
|
3204 |
+
- Added "-f" parameter to transport instance at Mage_Core_Model_Email_Template::send() like PHP mail() needs
|
3205 |
+
Fixed Do not hide ajax loader on 'Place order' step on onepage checkout when customer selected PayflowLink payment method until PayPal iframe will be loaded
|
3206 |
+
Fixed Order can be placed with non-configured composite product in Ordered Items
|
3207 |
+
Fixed Using "Update Wishlist" adds quantity to existing value even nothing wasn't changed
|
3208 |
+
Fixed Cannot open menu configuration-general-design
|
3209 |
+
Fixed Added backend design exception model
|
3210 |
+
Fixed The options in the action dropdown for export are incorrectly labeled in the Sales section
|
3211 |
+
Fixed Checking if address exists was added before save addresses attributes (to prevent foreign key error in case of two users were logged in under one account in the same time).
|
3212 |
+
Fixed URL rewrite algorithm was changed: fix for permanent link for old URLs.
|
3213 |
+
Fixed Incorrect number of used card is shown after you have returned to 'Shopping Cart' in partial authorization (Authorize.Net)
|
3214 |
+
Fixed In one page checkout incorrect information for declined card is shown for partial authorization(Authorize.Net)
|
3215 |
+
Fixed Bundle products shoved without options
|
3216 |
+
Fixed Instructions on the Payflow Link Configuration Menu
|
3217 |
+
Fixed rate model checks rate to existence in rule before delete action
|
3218 |
+
Fixed store name 'Demo Store' was changes to variable with real store name var store.getFrontendName()
|
3219 |
+
Fixed Place order does not work with free shipping
|
3220 |
+
Fixed possibility to find product in advanced search with from-to price is 0 was fixed
|
3221 |
+
Fixed FPT with prices included tax problem
|
3222 |
+
Fixed Instable work of back-end notification
|
3223 |
+
- For now pop-up window doesn't go to our side. Flash availability check is removed
|
3224 |
+
- little refactoring
|
3225 |
+
- method Mage_AdminNotification_Helper_Data::isReadablePopupObject() marked as deprecated
|
3226 |
+
Fixed Onepage checkout - Shipping address issues
|
3227 |
+
- added resetting property to save billing address in address book
|
3228 |
+
- added saving of new shipping address
|
3229 |
+
- simplified condition in order preparation routine
|
3230 |
+
Fixed Backordered Item Status on Orders
|
3231 |
+
- saving current ordered items number for stock item and calculating backorder qty according to it
|
3232 |
+
Fixed The product category is empty after moving category with products to another one
|
3233 |
+
Fixed Magento Connect -> If substitute channel for package extension, MCM will send authorization data to the fake URL
|
3234 |
+
Fixed Image Label is not Uploading properly
|
3235 |
+
Fixed Category Tree -> Changing category color
|
3236 |
+
Fixed With enabled "Inline Translation" its impossible to finish purchase
|
3237 |
+
- Added checking for escaped html end tag
|
3238 |
+
Fixed #0024559: Special Price to Date can not set Use Default Value
|
3239 |
+
Fixed CMS -> Manage Pages: It's possible to save New Page with capital letters in URL key
|
3240 |
+
- corrected js validation;
|
3241 |
+
- added server-side url key validation.
|
3242 |
+
Fixed Makeup of subcategories dropdown menu at front-end glitter with category fields bar
|
3243 |
+
- removed property "z-index: 1" for #nav li.level-top
|
3244 |
+
Revert changes from rev #83486
|
3245 |
+
Fixed Tier prices are not recalculated in bundle product configuration with different currency
|
3246 |
+
Fixed On Multi store installation, 'specials' rss feed includes specials from other stores
|
3247 |
+
Fixed Subscribe to Order Status - translation problem
|
3248 |
+
Fixed There is a spelling error with the translation
|
3249 |
+
Fixed Single Coupon applying for each shipping location rather than whole order
|
3250 |
+
- applying cart fixed rules for first shipping address order only
|
3251 |
+
- store which quote address cart fixed rule was applied for in SalesRule_Model_Validator
|
3252 |
+
Added method getDefaultCountry and constant XML_PATH_DEFAULT_COUNTRY into Mage_Core_Helper_Data
|
3253 |
+
Added more abstract system config backend model for uploading files:
|
3254 |
+
- removed duplicated logic from system config backend image model.
|
3255 |
+
Fixed Grand total doubles when processing multi-shipping checkout and ordinary checkout
|
3256 |
+
- cleaning address information when checkout type changes from multi-shipping to onepage
|
3257 |
+
Fixed Problem with admin roles
|
3258 |
+
Checkout page IE6/7 CSS bug fixed.
|
3259 |
+
Fixed Edit product->"Inventory" tab - "Qty Increments" error contain mistake
|
3260 |
+
Fixed No field for "Search Query"
|
3261 |
+
Fixed Character "b" is added to Review
|
3262 |
+
Fixed Retain the selected tab on editing CMS page
|
3263 |
+
Fixed Invoices Tax class not displayed
|
3264 |
+
Fixed Full tax summary on invoice
|
3265 |
+
Fixed working with partial authorizations on first card submit
|
3266 |
+
Fixed CMS can't create Hierarchy Node Link widget in IE8
|
3267 |
+
Fixed The Wrong / not exist Url should be redirect to 404 page
|
3268 |
+
Fixed Interface Locale needs additional country
|
3269 |
+
Fixed The product category is empty after moving category with products to another one
|
3270 |
+
Fixed 'Gateway error: A valid amount is required' appears during create Credit Memo for order, which uses Authorize.net
|
3271 |
+
Fixed #19807: Product with visibility- Nowhere display on the fron-end in 'Last ordered items' block, if order create on back-end
|
3272 |
+
Fixed Displaying Out of Stock Products on the front-end
|
3273 |
+
- added price data for consider item stock status for wish-list and compare products items collections, in reorder for product collection which sales order item collection based on.
|
3274 |
+
Fixed active tabs in store view scope while disabled PayPal methods
|
3275 |
+
- Added functionality that disables corresponding methods in store view scope.
|
3276 |
+
- Fixed related bug: in website view scope Express Checkout PE checkbox appears improperly checked after page load.
|
3277 |
+
Fixed Active tabs in store view scope while disabled PayPal methods
|
3278 |
+
Fixed Bundle price wrong when static qty above 1
|
3279 |
+
Fixed No "Suspected Fraud" status for hacked orders
|
3280 |
+
Fixed PayPal API Certificate uses settings from the default configuration, instead of the website
|
3281 |
+
Fixed Don't show (-) in totals when shipping title and shiping method empty in a configuration
|
3282 |
+
Fixed Product with price 0.00 possibility purchase through Shortcut PayPal button
|
3283 |
+
Fixed Archived orders not displayed in customer's orders list
|
3284 |
+
Fixed Fatal error on magento compilation
|
3285 |
+
Fixed Mage::app() call is not overriding cache/var directories
|
3286 |
+
Fixed After switching "Manage Stock" option, product prices index does not invalidate
|
3287 |
+
Fixed Transfer Cart Line: dropdown with shipping Rates is absent on PayPal side
|
3288 |
+
Fixed Can't choose Group at the creation new Order by admin
|
3289 |
+
Fixed PayPal API Certificate uses settings from the default configuration, instead of the website
|
3290 |
+
- added forgotten file from rev 84979
|
3291 |
+
Fixed Bug in Error Message display for Send to Friend (Mage_Sendfriend_ProductController)
|
3292 |
+
Fixed Admin order creation JS error message
|
3293 |
+
Fixed Problems with category sort order
|
3294 |
+
Fixed Button "Credit Memo" after refund partial per invoice is enabled
|
3295 |
+
Fixed Report don't show order with status "Canceled"
|
3296 |
+
Fixed Wrong quantity checks architecture in inventory observer
|
3297 |
+
Fixed On page 404, link "go back" does not work
|
3298 |
+
Fixed Category editing "Use Parent Category Settings" inconsistent behavior (Google Chrome)
|
3299 |
+
Fixed Set products per Page
|
3300 |
+
Fixed product review filter by customer does not work
|
3301 |
+
- type is administrator when customer_id is NULL and store_id is admin store id
|
3302 |
+
Fixed Product review filter by customer does not work
|
3303 |
+
Fixed WYSIWYG Editor disabling issue
|
3304 |
+
Fixed Quantity increment for Group Product Issue
|
3305 |
+
Fixed #15780: Add configuration option to ignore SID on frontend
|
3306 |
+
- Changed fieldset scope from global to website, because the field has website scope.
|
3307 |
+
Fixed Message "The product has required options" appears twice in the back-end order for items with mandatory custom options
|
3308 |
+
Fixed Meta description can be more than 255 chars
|
3309 |
+
Fixed When creating a new customer from the backend in "Manage Customers", the welcome email is empty
|
3310 |
+
Fixed Image Label is not Uploading properly
|
3311 |
+
- Slightly changed logic in adding image algorithms due to possible existence of added pictures
|
3312 |
+
Fixed JavaScript Calendar Date Range
|
3313 |
+
- Also little fix to maintain corporate standards
|
3314 |
+
Fixed Gift message displaying conditions not properly work on frontend and backend:
|
3315 |
+
Fixed flat catalog tables do not contain varchar values for store view level
|
3316 |
+
Fixed Add check "Use Default" for dependent form elements (in the admin), because if field "Use Default" it should be always disabled.
|
3317 |
+
Fixed #21084: "can not" -> "cannot" text changes (found only one occurrence of "can not" and changed it)
|
3318 |
+
Fixed New added required attribute should be filled in by customer before checkout
|
3319 |
+
Fixed PayPal Billing Agreement presents in payment methods when no BA are created during admin order creation
|
3320 |
+
Fixed Free Shipping Banner appears to be hard coded into the template file - replaced hardcoded callouts with CNS blocks. Two CMS blocks should be added to RR install.
|
3321 |
+
Fixed Empty order status field
|
3322 |
+
- Configuration mistake
|
3323 |
+
Fixed Cart Rule discount with Fixed amount for a whole Cart is not applied for OnePageCheckout
|
3324 |
+
Fixed Coupon with "Apply fixed amount discount for whole cart" does not apply to bundle products with dynamic price
|
3325 |
+
Fixed Frontend additional attributes issue with price attributes.
|
3326 |
+
Fixed Unable to translate "Submit Invoice" button
|
3327 |
+
Fixed Undefined index after clicking on Print Shipment
|
3328 |
+
Fixed Customer cannot be confirmed from the admin
|
3329 |
+
Fixed Inline Translations don't work if you have more than one store
|
3330 |
+
Fixed Invitation link has a session ID parameter
|
3331 |
+
Fixed Magento creates order even if response from PaypalUk is empty
|
3332 |
+
- response validation has been added
|
3333 |
+
Fixed Displaying Out of Stock Products on the front-end
|
3334 |
+
Fixed Incorrect billing/shipping address transfer from magento to PayPal (WPP Payflow Edition, WPP Payflow Edition EC )
|
3335 |
+
Fixed User cannot be associated with webservice role if he was selected in the Role Users of Role inforamation Page
|
3336 |
+
Fixed CSS Merger Cache Ignores Hostname and HTTPS
|
3337 |
+
- removed "beta" mark on CSS merger feature in system configuration, because known issue with different host names for different store views is solved
|
3338 |
+
- split merged CSS storage into 2 parts: "css" and "css_secure"
|
3339 |
+
- included "port" and "base host name" parameters into merger hash generation algorithm as parameters
|
3340 |
+
Fixed: Default country setting not affect country select field default value on frontend
|
3341 |
+
Fixed Credit card data Iframe for PayflowLink is displayed on Order Review step for all payment methods
|
3342 |
+
Fixed The Wrong / not exist Url should be redirect to 404 page
|
3343 |
+
- Added section availability in preDispatch
|
3344 |
+
Fixed Report > Products Ordered ignores Store view switcher
|
3345 |
+
- reforming $storeIds checks
|
3346 |
+
Fixed Report > Products Ordered ignores Store view switcher
|
3347 |
+
Fixed Cannot create or save after editing customer's Address, "Please enter the street" error appears on frontend
|
3348 |
+
Fixed Magento allows admin to create category/product url rewrite for a store that doesn't have this category/product
|
3349 |
+
- Showing websites that only associated to current category or product.
|
3350 |
+
Fixed Magento allows admin to create category/product url rewrite for a store that doesn't have this category/product
|
3351 |
+
- Fixed coding standards
|
3352 |
+
Fixed Not all session data destroyed on logout
|
3353 |
+
Fixed Inline Translation - Pages View Issue
|
3354 |
+
- move cache types list in config
|
3355 |
+
Fixed Shop By index range is build based on Excl. Tax value, but filter products in catalog based on Incl tax value. filter works incorrect
|
3356 |
+
- it was problem with facets calculation, when we use Solr
|
3357 |
+
Fixed Security issue - processing of disallowed actions with orders through direct URL
|
3358 |
+
- wrong Credit Memo ACL resource name
|
3359 |
+
Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat
|
3360 |
+
Fixed Different order amount in Google checkout and Magento orders
|
3361 |
+
Fixed Bundle Product w/o required option calculates wrong fixed minimal price
|
3362 |
+
Fixed Admin unable to uninstall payment method without editing config
|
3363 |
+
- getMethodInstance method was rewrited
|
3364 |
+
- Added instance check in some payment models according to this
|
3365 |
+
Fixed lastInsertId invokes when no insert where proceed
|
3366 |
+
Fixed Changing the root category for a store doesn't work correctly
|
3367 |
+
Fixed Unable to translate notice messages, errors and success messages
|
3368 |
+
Fixed Problems with newsletter template preview on newsletter queue edit page
|
3369 |
+
Fixed Tax of shipping method Flat Rate is not passed to the order while Google Checkout
|
3370 |
+
Fixed Product Flat Data reindex
|
3371 |
+
- disable flat data usage during reindex process
|
3372 |
+
Fixed Catalog Rule does not work properly when condition uses Contains
|
3373 |
+
Fixed Wrong prices (currency) for shipping price via UPS XML rates
|
3374 |
+
Fixed Unable to translate product edit/create page
|
3375 |
+
Fixed During product save operation, Magento disables keys for catalog_product_index_* tables.
|
3376 |
+
Fixed FPT with prices included tax problem
|
3377 |
+
- Added 'Catalog Prices' option check
|
3378 |
+
Fixed Google Analytics e-commerce tracking not working
|
3379 |
+
Fixed Empty bundle selections are shown as item options
|
3380 |
+
Fixed Subtotal for Bundle product with quantity 2 calculates as for one
|
3381 |
+
Fixed Remove initSessionLayoutMessages() from ProductController
|
3382 |
+
Fixed Incorrect value of field "Custom Layout Update" causes fatal error
|
3383 |
+
Fixed Duplicate of a product creates it with no SKU value and is saved
|
3384 |
+
Fixed Field "Meta Description" should be has limit of 255 characters
|
3385 |
+
Fixed Row subtotal is not displayed for Downloadable product in Backend
|
3386 |
+
Fixed Bad styling of product options displayed in wishlist
|
3387 |
+
Fixed Need to show item options of customer shopping cart at backend
|
3388 |
+
Fixed Wishlist item configuration is not saved at backend
|
3389 |
+
Fixed "OK" button instead of "Ok" must be on product configuration popups in backend
|
3390 |
+
Fixed Products wishlist items are not sorted by added_at
|
3391 |
+
Fixed Mage_Core_Model_Template doesn't properly restore old design context
|
3392 |
+
Fixed StoreView value not in FlatCatalog for multiple-select type attribute
|
3393 |
+
Fixed Rule condition "is one of" disappeared for category_ids attribute
|
3394 |
+
- Added "is one of" and "is not one of" to multiselect type conditions
|
3395 |
+
Fixed Security issue - the way to get URL-path of Admin side through Front-end URL
|
3396 |
+
Fixed Pictures does not appears on the additional information tab on front end for product attribute with Catalog Input Type for Store Owner= Text Area
|
3397 |
+
Fixed Add method which was accidentally removed
|
3398 |
+
- Deprecated methods Mage_Catalog_Model_Product::loadParentProductIds, Mage_Catalog_Model_Resource_Eav_Mysql4_Product::getParentProductIds
|
3399 |
+
Fixed Can't create refund online for Google Chekout
|
3400 |
+
Fixed After pressing 'Cancel Payment' link nothing happens in Payflow Link payment method
|
3401 |
+
Fixed class Mage_Core_Model_Store has problem with _processConfigValue and processSubst
|
3402 |
+
- Added "@deprecated after 1.4.2.0" mark for processSubst() in Mage_Core_Model_Store
|
3403 |
+
Fixed Category tree is missing for product, assigned to root category
|
3404 |
+
Fixed Unable to translate "Delete Image" checkbox
|
3405 |
+
Fixed wrong XML paths in isAllowed() method for system->Admin roles controllers.
|
3406 |
+
Fixed Magento falls into the white screen when saving URL rewrite for a product on the Default Store View
|
3407 |
+
- Changed exception message
|
3408 |
+
Fixed Different shipping amount for creditmemo from order page and invoice page
|
3409 |
+
Fixed Tax rates with zip ranges doesn't match to addresses with asterisk ( * ) as zip code value
|
3410 |
+
Fixed Fedex doesn't react to overrided in website scope BaseCurrency value.
|
3411 |
+
Fixed Export Customers. Map billing or shipping street in the mapping interface. They won't be exported
|
3412 |
+
Fixed Advanced Import Profiles doesn't work
|
3413 |
+
Fixed Add New Customer Form: checkbox "Send Welcome Email" is not disabled if "Associate to Website"="Admin"
|
3414 |
+
Fixed JS validation prevent submit form
|
3415 |
+
Fixed Payment action: Ogone Default Operation is not working at all
|
3416 |
+
Fixed There are no ability to create several Refunds to Order completed using Partial Authorization
|
3417 |
+
Fixed Incorrect shipping tax calculation on invoice creditmemos with included tax
|
3418 |
+
Fixed URL key wasn't used while product save
|
3419 |
+
Fixed Inline Translations don't work if you have more than one store
|
3420 |
+
Fixed Tax Report Shows Wrong Tax Percent After Changing Tax Rate
|
3421 |
+
- added grouping by tax percent in report collections
|
3422 |
+
- modified unique key in the tax report aggregation table to allow generating report with grouping by tax percents
|
3423 |
+
- data in the tax report aggregation table is truncated and lifetime statistics must be re-generated after upgrade
|
3424 |
+
Fixed make increment_id fields unique in sales tables
|
3425 |
+
Fixed Added items to the Wishlist in the "Manage Shopping Cart" are not shown
|
3426 |
+
Fixed Orders: More than one filter to the same field is not possible
|
3427 |
+
- Function items was changed.
|
3428 |
+
Fixed Invoices: More than one filter to the same field is not possible
|
3429 |
+
- Function items was changed.
|
3430 |
+
Fixed Report counts configurable products twice
|
3431 |
+
Fixed Tax rate with ZIP XXXXX* doesn't match to customer zip XXXXX
|
3432 |
+
Fixed Method Mage_Wishlist_Block_Links::addWishlistLink removed
|
3433 |
+
- Added "@deprecated after 1.4.2.0"
|
3434 |
+
Fixed "Subscribed to Newsletter" success e-mail couldn't be sent if you changed customer's subscription in admin.
|
3435 |
+
Fixed Problems with newsletter template preview on newsletter queue edit page
|
3436 |
+
Fixed Dashboard reports bug
|
3437 |
+
- Added discount to Mage_Reports_Model_Mysql4_Order_Collection:::addSumAvgTotals()
|
3438 |
+
Fixed Google base timeout
|
3439 |
+
- Timeout is 60 seconds now.
|
3440 |
+
Fixed Bundle product is not shipped correctly
|
3441 |
+
Fixed Unable to translate product edit/create page
|
3442 |
+
Fixed Dataflow customers export optimization
|
3443 |
+
- customer groups are storing in memory instead of DB queries
|
3444 |
+
Fixed Price layer navigation does not count product with zero price
|
3445 |
+
Fixed Import Product doesn't work
|
3446 |
+
- added empty file checking
|
3447 |
+
Fixed Price Indexer does not apply configurable options surcharges for customer groups different to "NOT LOGGED IN"
|
3448 |
+
Fixed Category Update Not Reflected in Left Nav
|
3449 |
+
Fixed Notify Stock RSS Includes Products without stock
|
3450 |
+
Fixed FPT is not shown in the order review page (for website)
|
3451 |
+
Fixed SQL Upgrades have wrong implementation
|
3452 |
+
Fixed Email to a friend error, existing Order Send Email error
|
3453 |
+
- Added ability to access to /admin/sales_order/email/ action
|
3454 |
+
Fixed Total Refunded Report shows Offline Refunded orders like Online Refunded
|
3455 |
+
Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not USA
|
3456 |
+
- Added Mage::log() for errors @ Mage_Usa_Model_Shipping_Carrier_Ups::_parseXmlResponse()
|
3457 |
+
|
3458 |
+
==== 1.5.0.0-rc2 =====
|
3459 |
+
|
3460 |
+
== Changes ==
|
3461 |
+
Paypal HSS payment method label, comment and default title
|
3462 |
+
|
3463 |
+
== Fixes ==
|
3464 |
+
Fixed User cannot place order using Paypal payment methods with 3d secure
|
3465 |
+
Fixed iPhone product list preview
|
3466 |
+
Fixed App locations (countries) do not match iTunes App Stores countries available
|
3467 |
+
Fixed Added parent quote items to discount calculation to prevent skipping of configurable products.
|
3468 |
+
Fixed Rounding issue on front end if discount with fixed amount is applied and no tax rules applies to the order.
|
3469 |
+
- added rounding item discount before take away from total discount
|
3470 |
+
Fixed Fatal error after deleting one of the shipping addresses during checkout with multiple addresses
|
3471 |
+
Fixed Merged CSS files with selected native Database as media storage are not applied with Chrome and FF
|
3472 |
+
- first trying to detect MIME type manually, and only after by native php function
|
3473 |
+
Fixed The buttons "Accept Payment" and "Deny Payment" do not appear in orders with status 'Payment Review'
|
3474 |
+
Fixed issue when Simple products not visible individually (part of grouped) are moved to Wishlist
|
3475 |
+
Fixed Impossible to delete product from Items Ordered (backend Order creation) using "remove" in Action dropdown
|
3476 |
+
Fixed Fatal error after deleting one of the shipping addresses during checkout with multiple addresses
|
3477 |
+
Fixed Qty for simple products (part of grouped) is incorrect when moved from order to Wishlist
|
3478 |
+
- additional fixture for other testcase
|
3479 |
+
Fixed Grouped product is added to Items Ordered as grouped, when any of buttons in sideblocks is pressed after product configuration in a product grid (backend Order creation)
|
3480 |
+
- prevent to add unconfigured grouped product on server side
|
3481 |
+
- in sales.js, do productConfigure.clean('quote_items') only if "Items Ordered" block is going to update
|
3482 |
+
- in sales.js, hide "Search" block only when product added to qoute from "Search" block
|
3483 |
+
- in configure.js, added ability to cleaning by list type scope
|
3484 |
+
Fixed Incorrect behavior of Partial Authorization process, when admin user cancels authorizations (Authorize.net)
|
3485 |
+
- added reloading block 'totals' after canceling partial authorization
|
3486 |
+
Fixed Google Checkout Issue - Transactions not appearing
|
3487 |
+
- adding transaction (transaction id = google order id) for googlecheckout payment
|
3488 |
+
- fixed usage of Mage_GoogleCheckout_Model_Api_Xml_Callback::_getTaxClassForShipping() method according to it's interface
|
3489 |
+
- fixed usage of Mage_GoogleCheckout_Model_Api_Xml_Abstract::_getTaxClassForShipping() method according to it's interface
|
3490 |
+
- creating transactions for refund and chargeback
|
3491 |
+
|
3492 |
+
==== 1.5.0.0-rc1 =====
|
3493 |
+
|
3494 |
+
=== Fixes ===
|
3495 |
+
Fixed Missed index on sales.order table
|
3496 |
+
Fixed Price for composite products in a products grid on Order creation page
|
3497 |
+
Fixed Status of Order is now doesn't ignore the setting in Config for AUTH_AND_CAPTURE orders.
|
3498 |
+
Fixed Unable to install extension using MCM for CE
|
3499 |
+
Fixed Rounding error
|
3500 |
+
Fixed Preview iFrame of iPhone recieve error message
|
3501 |
+
- wrap images manipulations with try-catch (in controller)
|
3502 |
+
- alert the catched error message when preview is loaded
|
3503 |
+
Fixed Most product attibutes not exporting
|
3504 |
+
Fixed Removed error message on new orders payd by PayflowLink with "complete" status (like on virtual products)
|
3505 |
+
Fixed Behavior when customer changes billing/shipping address and/or changes items in cart, etc having started Partial Authorization
|
3506 |
+
- added chopping cart`s and address checksum checking for partial authorization process
|
3507 |
+
Fixed Moving composite products from shopping cart to wishlist does not work
|
3508 |
+
- fixed error handling - added catching and processing, so in case of errors only item with error will not be moved
|
3509 |
+
- fixed wishlist items to get right storeId (by passing product, and not productId)
|
3510 |
+
Fixed Rounding issue (1 cent) appears on Tax Calculation Method Based On = Row
|
3511 |
+
Fixed category/product image resizing
|
3512 |
+
- Image sizes for Ipad has been changed
|
3513 |
+
- Re-Factored: Application model call has been changed to helper method for all old calls
|
3514 |
+
Fixed Only check money payment at standard chechout process receive success
|
3515 |
+
Fixed Edit fonts configuration for iPad
|
3516 |
+
Added iPad preview should illustrate tabs' state.
|
3517 |
+
- Made separate icons
|
3518 |
+
- Active/inactive logic added
|
3519 |
+
- Added custom fonts for rating color customization
|
3520 |
+
- Fixed positions for the icons
|
3521 |
+
- Removed icons labels
|
3522 |
+
- "i"-icon should always be on screen (currently it becomes hidden after making "information"-tab inactive)
|
3523 |
+
Fixed Review collection need to sort with the latest added review
|
3524 |
+
Fixed XML Connect - Incorrect help link in Push Notification page
|
3525 |
+
Fixed API Certificate Based Authentication Used default signature value insted of the Certificate value
|
3526 |
+
Fixed XML Connect - Design page - Ipad backgrounds issue
|
3527 |
+
Fixed "Ship to different address" is not applied with IE8 with any payment method
|
3528 |
+
Fixed Added skipping delta in shipping calculation on free shipping
|
3529 |
+
Fixed Incorrect behavior of Gift Options popup for bundle product on backend Order View page. No ability to close popup
|
3530 |
+
Fixed Rounding issue (1 cent) appears on discount applied and Tax Calculation Method Based On = Row
|
3531 |
+
Fixed Add landscape mode background for Android and update information for portrait mode background
|
3532 |
+
- changed <backgroundImageAndroid> to <backgroundAndroidPortraitImage>,
|
3533 |
+
- changed all <someimagetagImageDeviceOrientatin> to <someimagetagDeviceOrientatinImage> for correctly image resizings,
|
3534 |
+
- same for Icon,
|
3535 |
+
- added orientation divisions for Android devices,
|
3536 |
+
- fixed wrong spelled word "Portret" onto "Portrait" for iPad's config tags
|
3537 |
+
- Image resize method has been changed
|
3538 |
+
- backround getter method fixed
|
3539 |
+
Fixed Tax rates export doesn't work
|
3540 |
+
Fixed Incorrect downloader version in footer
|
3541 |
+
Changed default title for HSS payment method
|
3542 |
+
Fixed Rounding issue on credit memos/invoices cousing different totals in magento and 1 cent error on paypal
|
3543 |
+
- added adjustment for invoice`s subtotal_incl_tax and base_subtotal_incl_tax if invoice is last invoice of order
|
3544 |
+
Fixed Added setting of store id in payment method instance on Authorize.net partial authorization cancel from admin place.
|
3545 |
+
Fixed Fix Android preview area
|
3546 |
+
- Added custom fonts
|
3547 |
+
- Fixed header icons borders
|
3548 |
+
- Fixed button border on homepage
|
3549 |
+
- Added custom color declaration
|
3550 |
+
Fixed Tabs dont affect second preview screen for Android mobile application
|
3551 |
+
Fixed Incorrect design for Android mobile application in IE8
|
3552 |
+
Added update Preview Area for iPad
|
3553 |
+
- Fixed incorrect design for Ipad mobile application in IE8
|
3554 |
+
- added stars custom fonts for landscape mode
|
3555 |
+
- Fixed wrong positioning of the icons in landscape mode
|
3556 |
+
Fixed Double use Authorize.net Partial Authorization Multicard with 46225 zip in one order causes wrong checkout behavior
|
3557 |
+
Fixed Using MCM 2.0 shell script produces warnings and doesn't work correctly
|
3558 |
+
|
3559 |
+
==== 1.5.0.0-beta2 =====
|
3560 |
+
|
3561 |
+
=== Improvements ===
|
3562 |
+
Implemented Environment emulation in core email class
|
3563 |
+
- Added Emulation model.
|
3564 |
+
- Added Email Info and Email Template Mailer models.
|
3565 |
+
- Re-factored sendEmail() and sendUpdateEmail() methods of order, credit memo, invoice and shipment models.
|
3566 |
+
Added App Previewer for Android and iPad in XmlConenect
|
3567 |
+
|
3568 |
+
=== Fixes ===
|
3569 |
+
Fixed Labels for composite products (backend) are shown incorrect
|
3570 |
+
Fixed Ability to Refund the already refunded item in Patial Invoice
|
3571 |
+
- added qty`s limits into creating creditmemo functionality
|
3572 |
+
Fixed Performance issue with big amount of tax rates
|
3573 |
+
Fixed Notice error in system.xml after saving PayPal configuration
|
3574 |
+
Fixed No Qty column in the Wishlist sideblock
|
3575 |
+
Fixed Export functionality doesn't work
|
3576 |
+
Fixed Maestro International CC number has no validation
|
3577 |
+
- use "Switch/Maestro" instead of "Maestro (International)"
|
3578 |
+
Fixed No transactions is created, no ability to perform Invoice, when Order, which contains Gift Options, is placed from backend with Authorize.net Direct Post payment method
|
3579 |
+
Fixed Moving Grouped product from Order and Shopping cart to the Wishlist does not work
|
3580 |
+
Fixed Added advice block hiding on synchronize process
|
3581 |
+
Fixed Database as cache backend
|
3582 |
+
- fix for MySQL 4. Shorten field lengthes
|
3583 |
+
Fixed Improvemets for MCM and Magento Extension Packager after MCMUP
|
3584 |
+
Fixed PayPal Standard with specific tax settings for shop cart item with qty >= 2
|
3585 |
+
Fixed Wrong tax calculation for bundle products
|
3586 |
+
Fixed Export Filters are not working correctly during export of customers
|
3587 |
+
Fixed Unable to complete several partial online refunds with Authorize.net Direct Post
|
3588 |
+
Fixed Disable Mage_Checkout did not remove My Cart & Checkout links in the Top Link
|
3589 |
+
Fixed An error occurs with using Payflo Link payment method and IE8
|
3590 |
+
- just small fixture of strange for user popup in IE - "Do you want to see only secure content?"
|
3591 |
+
Fixed Price for composite products in a products grid on Order creation page
|
3592 |
+
Fixed No error message appears if execute synchronization with non-existing DB
|
3593 |
+
Fixed "Configure" link in Product grid (backend) does not work (only IE)
|
3594 |
+
Fixed "Void" button must not be active on the invoice with amount captured on-line
|
3595 |
+
- redefined methods canVoid for Express and Direct Paypal models - hiding button void for invoice and creditmemo
|
3596 |
+
- redefined methods cancel for Express and Direct Paypal models - no checking for invoices for order to decide void it or not at cancel.
|
3597 |
+
Fixed Dropdown for Amount is absent (only IE)
|
3598 |
+
- create new JS method that preserves visibility states of selects in pop-up block
|
3599 |
+
Fixed Status of Order is now doesn't ignore the setting in Config.
|
3600 |
+
Fixed Incorrect behavior of AJAX-popup for Gift Options (Individual Item) in IE8
|
3601 |
+
Fixed to show full review for the iPad device
|
3602 |
+
- added checking the current app's device type is not iPad and in this case the text of the review is truncated;
|
3603 |
+
- replaced TABs on spaces in helper's class
|
3604 |
+
- Re-factored XmlConnect helperfor unknown device type
|
3605 |
+
Fixed xmlconnect/catalog/product action returns invalid html for product's description
|
3606 |
+
- added an "xml" tag before DOCTYPE definition
|
3607 |
+
Fixed wrong using of translation in method getElementHtml()
|
3608 |
+
Fixed update Preview Area for iPad
|
3609 |
+
Fixed Missed active/Inactive tabs logic added for a preview
|
3610 |
+
Fixed Selecting catalog as a price rule condition redirects you on dashboard
|
3611 |
+
- check if post array values are integers > 0
|
3612 |
+
Fixed "Go to notifications" link works improperly
|
3613 |
+
Fixed Unable to complete several partial online refunds with Authorize.net Direct Post
|
3614 |
+
Fixed "Set Products as New to Date" is not working in Catalog New Products List widget
|
3615 |
+
Fixed Mage_Adminhtml_Block_Media_Uploader::getUploaderUrl() generates incorrect path if magento is installed in a sub-directory within the root one
|
3616 |
+
Fixed Now in Admin in System->TransactionalEmails all filters are saved to session.
|
3617 |
+
Fixed Tax discrepancy between Tax Report and Order Report
|
3618 |
+
Fixed PayPal Standard with specific tax settings for shop cart item with qty >= 2
|
3619 |
+
Fixed Incorrect hint for non-configured product in Order on backend
|
3620 |
+
Fixed Flush Cache Storage alert text is now changed to: "Cache storage may contain additional data. Are you sure that you want flush it?"
|
3621 |
+
Fixed "Read Details" link is present in the message about synchronization status
|
3622 |
+
- removed read details link from rows which have not url
|
3623 |
+
Fixed Mage_Catalog_Model_Product::setFinalPrice() doesn't return its class instance for chaining purposes.
|
3624 |
+
- fixed interface erroneously changed in 1.4.1.0
|
3625 |
+
- fixed erroneous phpDoc
|
3626 |
+
Fixed First Checkout by registered Customer: First Name and Last name fields are empty
|
3627 |
+
Fixed Error with addlisttype.phtml in system log
|
3628 |
+
- Removed not deleted layout block that was forgotten after rev 90337 with fix for MAGE-1955
|
3629 |
+
Fixed Changes in UI for Order Status Management
|
3630 |
+
Fixed Catalog Price Rule is not applied
|
3631 |
+
- Added Mage_CatalogRule_Model_Rule::applyAllRulesToProduct()
|
3632 |
+
Fixed Admin order creation - Unable to delete product from the cart
|
3633 |
+
- fixed showing giftmessage options template, when no grid items are present
|
3634 |
+
- fixed updating quote items and giftmessage items when backend receives wrong item id - now it doesn't fail with exception, but process it gracefully
|
3635 |
+
Fixed With IE6 impossible to configure a Composite product in Backend
|
3636 |
+
Fixed Message for non-configured composite product is changed after pressing "Update Items and Qty's"
|
3637 |
+
Fixed Option "Order" on Payment Action dropdown must be available only for Express Checkout method
|
3638 |
+
- Removed extra spaces in system.xml.
|
3639 |
+
Fixed With IE8 an error occurs after applying the second time Credit Card in Admin panel with 3D Secure and patrial authorization (Authorize.net)
|
3640 |
+
- moved embedded gift options FORM tag out of other main FORM tag (such invalid layout broke DOM in IE)
|
3641 |
+
- refactored JS-scripts, moved static to static files
|
3642 |
+
- removed not used old js-file
|
3643 |
+
Fixed Products are erased from "Product Ordered" report after deleting them
|
3644 |
+
Fixed Incorrect behavior of ReOrder action applied to Order, that contains Gift Options
|
3645 |
+
Fixed When adding several configurable products at one time to Items Ordered from product grid, only last remains specified configuration (admin Order creation)
|
3646 |
+
- restored JS-initing for controls on each popup show (was erroneously removed at rev 86017)
|
3647 |
+
- fixed Configurable javascript so it won't interfere with other products controls on page
|
3648 |
+
Fixed Incorrect transaction and Partial Refunds behavior with WPP Hosted Solution, when Order is partially invoiced
|
3649 |
+
Fixed Hint for "View Details" in the Wishlist is located incorrectly
|
3650 |
+
Fixed Onepage checkout - Shipping address issues
|
3651 |
+
Fixed Tax Rate = 0% displayed in Cart
|
3652 |
+
- display (0%) in rate title
|
3653 |
+
Fixed Magento Backend performance optimization
|
3654 |
+
Fixed Creating Purchase orders from backend works incorrect (IE)
|
3655 |
+
Fixed Moving simple products (part of grouped) from shopping cart to order does not work
|
3656 |
+
Fixed Payment Applicable From = "Specific Countries" option does not work for Express Checkout (Payflow Edition)
|
3657 |
+
Fixed Cannot place Order in backend with Authorize.net Direct Post, when settings for payment method is applied on a Website scope level
|
3658 |
+
Fixed SOAP don't use store for select products collection
|
3659 |
+
- Change setting the store into filter
|
3660 |
+
Fixed "Synchronize" button is disabled if select native database twice
|
3661 |
+
- modified storage full name generation and button state check
|
3662 |
+
Fixed Wrong algorithm to determine whether product can be configured (Composite Products feature)
|
3663 |
+
- removed used method isComposite() from canConfigure() method
|
3664 |
+
Fixed Missing nobr around date in Customer Product Reviews table
|
3665 |
+
Fixed Status of Order, which is paced with Authorize.net Direct Post (Payment Action = Authorization) is incorrect
|
3666 |
+
Fixed Added base_total_refunded field to invoice table
|
3667 |
+
Fixed "Flush External Page Cache" does not work
|
3668 |
+
Fixed Database as cache backend
|
3669 |
+
Fixed Selecting products in Wishlist (backend) redirects you on dashboard
|
3670 |
+
- Fixed searching by product names and days in wishlist
|
3671 |
+
- Removed 'Visible In' column, because it showed same values as 'Added from'
|
3672 |
+
- Fixed 'Added from' column to show real values, not some erroneous 'All Visible Stores'
|
3673 |
+
- Fixed sorting by product name and days in wishlist
|
3674 |
+
|
3675 |
+
|
3676 |
+
==== 1.5.x-devel-92027 ====
|
3677 |
+
|
3678 |
+
=== Fixes ===
|
3679 |
+
Fixed Selecting catalog as a price rule condition redirects you on dashboard
|
3680 |
+
- check if post array values are integers > 0
|
3681 |
+
Fixed "Go to notifications" link works improperly
|
3682 |
+
Fixed Unable to complete several partial online refunds with Authorize.net Direct Post
|
3683 |
+
Fixed "Set Products as New to Date" is not working in Catalog New Products List widget
|
3684 |
+
Fixed Mage_Adminhtml_Block_Media_Uploader::getUploaderUrl() generates incorrect path if magento is installed in a sub-directory within the root one
|
3685 |
+
Fixed Now in Admin in System->TransactionalEmails all filters are saved to session.
|
3686 |
+
Fixed Tax discrepancy between Tax Report and Order Report
|
3687 |
+
Fixed PayPal Standard with specific tax settings for shop cart item with qty >= 2
|
3688 |
+
Fixed Incorrect hint for non-configured product in Order on backend
|
3689 |
+
Fixed Flush Cache Storage alert text is now changed to: "Cache storage may contain additional data. Are you sure that you want flush it?"
|
3690 |
+
Fixed "Read Details" link is present in the message about synchronization status
|
3691 |
+
- removed read details link from rows which have not url
|
3692 |
+
Fixed Mage_Catalog_Model_Product::setFinalPrice() doesn't return its class instance for chaining purposes.
|
3693 |
+
- fixed interface erroneously changed in 1.4.1.0
|
3694 |
+
- fixed erroneous phpDoc
|
3695 |
+
Fixed First Checkout by registered Customer: First Name and Last name fields are empty
|
3696 |
+
CR Change First Checkout by registered Customer: First Name and Last name fields are empty
|
3697 |
+
- reverted Billing.php to the its previous state
|
3698 |
+
- copied logic of determine customer name from customer address template base/default/template/customer/address/edit.phtml
|
3699 |
+
Fixed CRIT error with addlisttype.phtml in system log
|
3700 |
+
- Removed not deleted layout block that was forgotten after rev 90337 with fix for MAGE-1955
|
3701 |
+
Fixed Changes in UI for Order Status Management
|
3702 |
+
Fixed Catalog Price Rule is not applied
|
3703 |
+
- Added Mage_CatalogRule_Model_Rule::applyAllRulesToProduct()
|
3704 |
+
Fixed Admin order creation - Unable to delete product from the cart
|
3705 |
+
- fixed showing giftmessage options template, when no grid items are present
|
3706 |
+
- fixed updating quote items and giftmessage items when backend receives wrong item id - now it doesn't fail with exception, but process it gracefully
|
3707 |
+
Fixed With IE6 impossible to configure a Composite product in Backend
|
3708 |
+
Fixed Message for non-configured composite product is changed after pressing "Update Items and Qty's"
|
3709 |
+
Fixed Option "Order" on Payment Action dropdown must be available only for Express Checkout method
|
3710 |
+
- Removed extra spaces in system.xml.
|
3711 |
+
Fixed With IE8 an error occurs after applying the second time Credit Card in Admin panel with 3D Secure and patrial authorization (Authorize.net)
|
3712 |
+
- moved embedded gift options FORM tag out of other main FORM tag (such invalid layout broke DOM in IE)
|
3713 |
+
- refactored JS-scripts, moved static to static files
|
3714 |
+
- removed not used old js-file
|
3715 |
+
Fixed Products are erased from "Product Ordered" report after deleting them
|
3716 |
+
Fixed Incorrect behavior of ReOrder action applied to Order, that contains Gift Options
|
3717 |
+
Fixed When adding several configurable products at one time to Items Ordered from product grid, only last remains specified configuration (admin Order creation)
|
3718 |
+
- restored JS-initing for controls on each popup show (was erroneously removed at rev 86017)
|
3719 |
+
- fixed Configurable javascript so it won't interfere with other products controls on page
|
3720 |
+
Fixed Incorrect transaction and Partial Refunds behavior with WPP Hosted Solution, when Order is partially invoiced
|
3721 |
+
Fixed Hint for "View Details" in the Wishlist is located incorrectly
|
3722 |
+
Fixed Onepage checkout - Shipping address issues
|
3723 |
+
Fixed Tax Rate = 0% displayed in Cart
|
3724 |
+
- display (0%) in rate title
|
3725 |
+
Fixed Magento Backend performance optimization
|
3726 |
+
Fixed Creating Purchase orders from backend works incorrect (IE)
|
3727 |
+
Fixed Moving simple products (part of grouped) from shopping cart to order does not work
|
3728 |
+
Fixed Payment Applicable From = "Specific Countries" option does not work for Express Checkout (Payflow Edition)
|
3729 |
+
Fixed Cannot place Order in backend with Authorize.net Direct Post, when settings for payment method is applied on a Website scope level
|
3730 |
+
Fixed SOAP don't use store for select products collection
|
3731 |
+
- Change setting the store into filter
|
3732 |
+
Fixed "Synchronize" button is disabled if select native database twice
|
3733 |
+
- modified storage full name generation and button state check
|
3734 |
+
Fixed Wrong algorithm to determine whether product can be configured (Composite Products feature)
|
3735 |
+
- removed used method isComposite() from canConfigure() method
|
3736 |
+
Fixed Missing nobr around date in Customer Product Reviews table
|
3737 |
+
Fixed Status of Order, which is paced with Authorize.net Direct Post (Payment Action = Authorization) is incorrect
|
3738 |
+
Fixed Added base_total_refunded field to invoice table
|
3739 |
+
Fixed "Flush External Page Cache" does not work
|
3740 |
+
Fixed Database as cache backend
|
3741 |
+
Fixed Selecting products in Wishlist (backend) redirects you on dashboard
|
3742 |
+
- Fixed searching by product names and days in wishlist
|
3743 |
+
- Removed 'Visible In' column, because it showed same values as 'Added from'
|
3744 |
+
- Fixed 'Added from' column to show real values, not some erroneous 'All Visible Stores'
|
3745 |
+
- Fixed sorting by product name and days in wishlist
|
3746 |
+
|
3747 |
+
|
3748 |
+
==== 1.5.0.0-beta1 =====
|
3749 |
+
|
3750 |
+
=== Improvements ===
|
3751 |
+
Fixed several memory leaks in product model. Added tool method clear() to clean object data and references to this object
|
3752 |
+
Implemented Order payment action for PayPal
|
3753 |
+
Implemented SOAP Api calls for shopping cart
|
3754 |
+
|
3755 |
+
=== Fixes ===
|
3756 |
+
Fixed Only "Library Mail" works for USPS
|
3757 |
+
Fixed The "MY WISHLIST" link always shows quantity of line items in the Wishlist and never the real quantity of items
|
3758 |
+
- fix for case when out of stock products are not shown on frontend
|
3759 |
+
Fixed Wrong behavior of Varien_Data_Collection_Db::_getConditionSql
|
3760 |
+
Fixed Incorrect shipping tax calculation on invoice creditmemos with included tax
|
3761 |
+
- Rounding of shipment taxes was added
|
3762 |
+
Fixed Impossible save empty values for store view scope
|
3763 |
+
- Remove store_id from EAV module and move all store functionality into catalog module.
|
3764 |
+
Fixed Wrong tax calculation for bundle products
|
3765 |
+
Fixed File configuration dialog is not closed when pressing 'Ok' button
|
3766 |
+
- additional fix of backend Customer functionality for IE8 to eliminate JS errors
|
3767 |
+
Fixed Product creation -> Necessary validation for SKU field
|
3768 |
+
Fixed Link "Gift Options" is not shown in Items Ordered grid of create Order page, when "Allow Gift Messages for Order Items" is set to "No"
|
3769 |
+
- considering design html at right place
|
3770 |
+
- removed useless variable from observer
|
3771 |
+
Fixed Price for composite products in a products grid on Order creation page
|
3772 |
+
Fixed Tax from orders in status pending presents in Tax Report
|
3773 |
+
Fixed Catalog Price Rule is not applied
|
3774 |
+
Fixed Incorrect tax summary for partial credit memos/invoices
|
3775 |
+
Fixed Order success page is not displayed after placing Order using Website Payments Pro Hosted Solution method
|
3776 |
+
- now, return and cancel urls can be secure (https)
|
3777 |
+
Fixed Problems with newsletter template preview on newsletter queue edit page
|
3778 |
+
Fixed Link "configure" is inactive for downloadable products in product grid on Order creation page in backend
|
3779 |
+
- also fixed "Manage Customer" grids + Manage Shopping Cart (Enterprise Checkout) grids
|
3780 |
+
Fixed A system error message is missing for cases when media storage synchronization is complete or an error occurred
|
3781 |
+
- output messages for notifications edited
|
3782 |
+
Fixed Incorrect price calculation for bundle product during backend order creation(Tax is doubles in Total)
|
3783 |
+
Fixed Gift Options tab is present on product page for virtual product types
|
3784 |
+
Fixed Magento Backend performance optimization
|
3785 |
+
Fixed Gift Message for Individual Item prompt is shown in AJAX-popup, although "Allow Gift Messages for Order Items" is disabled
|
3786 |
+
Fixed Unable to change customer password when email confirmation is enabled
|
3787 |
+
Fixed Incorrect tax calculation for Tax Calculation Method Based On = Unit Price and Catalog Prices = Including Tax
|
3788 |
+
Fixed "Preferred State" for extensions is not working
|
3789 |
+
Fixed Total amount is not recounted, when customer cancels the Gift Options during OnePageCheckout
|
3790 |
+
Fixed In "Gift options" AJAX popup "OK" button written incorrectly
|
3791 |
+
Fixed No address autocomplete while admin order create with single store
|
3792 |
+
- fixes due to unnecessary AJAX calls
|
3793 |
+
Fixed Information about Gift Options is not stored, when admin user performs Edit Order action in backend
|
3794 |
+
Fixed Gift column should be removed from product grid
|
3795 |
+
Fixed SKU validation error on creating products
|
3796 |
+
Fixed Shipped order has status "Processing" if invoice has been posted with "Not Capture" and amount was later captured on paypal side.
|
3797 |
+
- considering online and offline capture amout when checking if capture is final
|
3798 |
+
- trailing white spaces removed
|
3799 |
+
Fixed Link to file from downloadable product is not available after authorize and capture payment action via Authorize.net
|
3800 |
+
- Link management observer call methods are moved to save_commit_after events (for order and its item respectively) instead of save_after events
|
3801 |
+
Fixed Price for product with file custom options in Wishlist is calculated incorrect
|
3802 |
+
- Added ability to use special price templates for displaying wishlist items (as they can be partially/fully configured and catalog price template doesn't support it)
|
3803 |
+
- Added default template, that shows configured price in addition to default clean product price
|
3804 |
+
Fixed Cross-sells products disappears after adding another products to shopping cart
|
3805 |
+
|
3806 |
+
|
3807 |
+
==== 1.5.x-devel-90295 ====
|
3808 |
+
|
3809 |
+
=== Fixes ===
|
3810 |
+
Fixed Configurable Product:Associated Product tab - Rounding issue
|
3811 |
+
Fixed Wrong usage of @see tag in phpdocs
|
3812 |
+
- replaced @see into @link phpdocs in cases where the value is a link
|
3813 |
+
Fixed A system error message is missing for cases when media storage synchronization is complete or an error occurred
|
3814 |
+
Fixed Order success page is not displayed after placing Order using Website Payments Pro Hosted Solution method
|
3815 |
+
Fixed Order contains information about used card type with Payflow Link (for USA and Canada) payment using
|
3816 |
+
Fixed Product export have no Entity Attributes
|
3817 |
+
Fixed Authorize.net Directpost payment method doesn't work when secure urls in frontend are being used
|
3818 |
+
Fixed The options in the action dropdown for export are incorrectly labeled in the Sales section
|
3819 |
+
- Rename XML and MSXML to Excel XML
|
3820 |
+
Fixed Round up to 0.01 of amount with tax in cart
|
3821 |
+
Fixed Shipped order has status "Processing" if invoice has been posted with "Not Capture" and amount was later captured on paypal side.
|
3822 |
+
- Return invoice model for transaction, if it didn't return by transaction_id
|
3823 |
+
Fixed File configuration dialog is not closed when pressing 'Ok' button
|
3824 |
+
- also made better logic to disable/enable file controls, so that file is not uploaded (and just thrown away by server) when there's no need in it
|
3825 |
+
Fixed Deleting attached files do not work
|
3826 |
+
Fixed Price for composite products in a products grid on Order creation page
|
3827 |
+
- it was also fixed converting to current currency rates
|
3828 |
+
Fixed Firefox iframe issue
|
3829 |
+
Fixed Can not add product to order from backend (IE8)
|
3830 |
+
Fixed Moving product with file custom options to Wishlist works incorrect
|
3831 |
+
Fixed Displaying Out of Stock Products on the front-end
|
3832 |
+
Fixed Price for composite products in a products grid on Order creation page
|
3833 |
+
- forgot to add parent::_afterLoad(); in Mage_Bundle_Model_Mysql4_Selection_Collection::_afterLoad() method witch leads to exception
|
3834 |
+
Fixed Fix for HSS amount is sent to PayPal. But need to test includeTax/excludeTax settings.
|
3835 |
+
Fixed A system error message is missing for cases when media storage synchronization is complete or an error occurred
|
3836 |
+
- fixed ability to save storage witch last sync was made on
|
3837 |
+
- removed link "read details" for local messages at notice bar
|
3838 |
+
- messages correction
|
3839 |
+
Fixed Authorize.net Directpost payment method. Can't create capture and refund transaction
|
3840 |
+
|
3841 |
+
|
3842 |
+
=== 1.5.0.0-alpha2 ====
|
3843 |
+
|
3844 |
+
=== Major Highlights ===
|
3845 |
+
Added Payflow Link using HSS (Hosted Sole Solution)
|
3846 |
+
|
3847 |
+
=== Improvements ===
|
3848 |
+
Upgraded Zend Framework to 1.11.1
|
3849 |
+
Phoenix_Moneybookers improvements:
|
3850 |
+
- updated payment logo images
|
3851 |
+
- added "Maestro" and "Online Bank Transfer" payment methods into Moneybookers group
|
3852 |
+
- wrapped Moneybookers payment logo title and alt text on payment selection text into translation calls
|
3853 |
+
|
3854 |
+
=== Fixes ===
|
3855 |
+
Fixed Price for composite products in a products grid on Order creation page
|
3856 |
+
Fixed No ability to delete item from Wishlist by specifying Qty = 0 and click on Update Wishlist
|
3857 |
+
Fixed Do not hide ajax loader on 'Place order' step on onepage checkout when customer selected PayflowLink payment method until PayPal iframe will be loaded
|
3858 |
+
Fixed Admin reorder with bundle item cause wrong qty of simple products
|
3859 |
+
Fixed Incorrect bundle product price and bundle items Qty count during the process of Admin Order creation
|
3860 |
+
Fixed When bundle item is configured in that way, when it cannot have User defined quantity, Qty field remains editable in AJAX-popup
|
3861 |
+
Fixed "UPS XML" allowed methods bug
|
3862 |
+
Fixed Mage_Page_Block_Template_Links_Block::$_afterText is never used
|
3863 |
+
Fixed No configuration popup for Grouped products in admin backend new order creation
|
3864 |
+
- the problem was in sales.js during parsing currency from price cell. In case when no price was present in cell the JS exeption occurs. So it was needed to determine currency symbol in other way. And it way was in sets this.currencySymbol in AdminOrder class when order obj initialization or when current currency is switched.
|
3865 |
+
- small fix in grouped.phtml and giftcatd.phtml: set additioal attributes for price calculation
|
3866 |
+
- small fix in configure.js: using parameter listType instead of this.current.listType in _requestItemConfiguration method
|
3867 |
+
- small fix in sales.js: do overall popup cleaning by productConfigure.clean() for each loadArea calling
|
3868 |
+
Fixed When bundle item is configured in that way, when it cannot have User defined quantity, Qty field remains editable in AJAX-popup
|
3869 |
+
Fixed Customer data not saved when returning to cart and back to checkout
|
3870 |
+
Fixed Bad sku value for non-configured bundle in Create New Order at admin backend
|
3871 |
+
Fixed Integrity Constraint Violation in Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price::_prepareWebsiteDateTable
|
3872 |
+
Fixed URL Rewrite Exeption
|
3873 |
+
Fixed Menu "Catalog-Manage Products-Gift Options" have incorrect design and wrong position in menu list:
|
3874 |
+
Fixed Displaying Out of Stock Products on the front-end.
|
3875 |
+
Fixed Incorrect shipping tax calculation on invoice creditmemos with included tax
|
3876 |
+
Fixed Cannot login to backend while notify "This is a required field." is present
|
3877 |
+
- There was JS error, invisible due to try-catch construction. Fixed
|
3878 |
+
Fixed Authorize.net invoice capture.
|
3879 |
+
- Do not capture/refund/void transaction if transaction has been captured/voided in authorize.net panel
|
3880 |
+
Fixed Inadequate URL in Moneybookers eWallet "More Info" Link
|
3881 |
+
Fixed It is impossible to export products using the new Export module
|
3882 |
+
Fixed Tax Rate = 0% displayed in Cart
|
3883 |
+
Fixed Unable to specify quantites for bundle items in AJAX-popup, when selection of bundle items is provided using radiobuttons
|
3884 |
+
Fixed Incorrect style tables in customer confirmation email. For orders with Authorize.net payment method
|
3885 |
+
- fixed incorrect styling in customer confirmation email;
|
3886 |
+
- simplified styling on admin order page
|
3887 |
+
Fixed Cron job dispatcher incorrectly releases locks
|
3888 |
+
Fixed Incorrect items number in "MY WISHLIST" after updated quantity in the Wishlist
|
3889 |
+
- Added new configuration option "Display Wishlist Summary" in System -> Configuration -> Customers -> Wishlist section
|
3890 |
+
- Removed quantity information from wishlist frontend page
|
3891 |
+
Fixed Update compare list after delete one item
|
3892 |
+
Fixed No hint for disabled "Configure" button
|
3893 |
+
Fixed In Bundle product's page "Availability" string is not placed well
|
3894 |
+
Fixed Non-correct headers uses for email return-path.
|
3895 |
+
Fixed Numerous issued with displaying tax on front-end for bundled items
|
3896 |
+
Fixed Impossible save empty values for store view scope
|
3897 |
+
Fixed Non-correct headers uses for email return-path.
|
3898 |
+
- Added "-f" parameter to transport instance at Mage_Core_Model_Email_Template::send() like PHP mail() needs
|
3899 |
+
Fixed Do not hide ajax loader on 'Place order' step on onepage checkout when customer selected PayflowLink payment method until PayPal iframe will be loaded
|
3900 |
+
Fixed Order can be placed with non-configured composite product in Ordered Items
|
3901 |
+
Fixed Using "Update Wishlist" adds quantity to existing value even nothing wasn't changed
|
3902 |
+
|
3903 |
+
|
3904 |
+
==== 1.5.x-devel-89318 ====
|
3905 |
+
|
3906 |
+
=== Fixes ===
|
3907 |
+
Fixed Tax Rate = 0% displayed in Cart
|
3908 |
+
Fixed Unable to specify quantites for bundle items in AJAX-popup, when selection of bundle items is provided using radiobuttons
|
3909 |
+
Fixed Incorrect style tables in customer confirmation email. For orders with Authorize.net payment method
|
3910 |
+
- fixed incorrect styling in customer confirmation email;
|
3911 |
+
- simplified styling on admin order page
|
3912 |
+
Fixed Cron job dispatcher incorrectly releases locks
|
3913 |
+
Fixed Incorrect items number in "MY WISHLIST" after updated quantity in the Wishlist
|
3914 |
+
- Added new configuration option "Display Wishlist Summary" in System -> Configuration -> Customers -> Wishlist section
|
3915 |
+
- Removed quantity information from wishlist frontend page
|
3916 |
+
Fixed Update compare list after delete one item
|
3917 |
+
Fixed No hint for disabled "Configure" button
|
3918 |
+
Fixed In Bundle product's page "Availability" string is not placed well
|
3919 |
+
Fixed Non-correct headers uses for email return-path.
|
3920 |
+
Fixed Numerous issued with displaying tax on front-end for bundled items
|
3921 |
+
Fixed Impossible save empty values for store view scope
|
3922 |
+
Fixed Non-correct headers uses for email return-path.
|
3923 |
+
- Added "-f" parameter to transport instance at Mage_Core_Model_Email_Template::send() like PHP mail() needs
|
3924 |
+
Fixed Do not hide ajax loader on 'Place order' step on onepage checkout when customer selected PayflowLink payment method until PayPal iframe will be loaded
|
3925 |
+
Fixed Order can be placed with non-configured composite product in Ordered Items
|
3926 |
+
Fixed Using "Update Wishlist" adds quantity to existing value even nothing wasn't changed
|
3927 |
+
|
3928 |
+
==== 1.5.0.0-alpha1 ====
|
3929 |
+
|
3930 |
+
=== Major Highlights ===
|
3931 |
+
Balance Response, Partial Authorization Transactions, Authorization Reversals Support for MasterCard and Discover
|
3932 |
+
3D Secure authentication for Authorize.net payment method
|
3933 |
+
PayflowLink payment method
|
3934 |
+
Authorize.Net SIM payment method
|
3935 |
+
Improved Import/Export functionality
|
3936 |
+
Ability to order composite products from backend and some extra functionality
|
3937 |
+
- reconfigure already added products on front end
|
3938 |
+
- adding preconfigured products in wish-list
|
3939 |
+
Alternative media storage
|
3940 |
+
- Database
|
3941 |
+
- CDN
|
3942 |
+
Order status management
|
3943 |
+
- ability to add new status and assign to some state
|
3944 |
+
- from now on statuses stored in appropriate DB table instead of configuration file
|
3945 |
+
Ability to edit order addresses
|
3946 |
+
- this functionality admin has link to edit address for order view page
|
3947 |
+
Magento Mobile included in base packaging
|
3948 |
+
|
3949 |
+
=== Improvements ===
|
3950 |
+
Upgraded Zend Framework to 1.11.0
|
3951 |
+
Implemented new process of hashing parameters in Ogone payment method
|
3952 |
+
- implemented an advanced hashing method that invokes all transaction parameters for building security hash
|
3953 |
+
- updated fields sort order in system configuration
|
3954 |
+
- added the new parameter which designates whether to use the old or advanced hashing method
|
3955 |
+
- made SHA-IN and SHA-OUT sys config parameter titles corresponding to parameter titles on merchant site in Ogone
|
3956 |
+
- major refactoring of the Ogone helper: simplified public interface of hash validation, added support for SHA-1, SHA-256 and SHA-512 algorithms (not selectable in system config)
|
3957 |
+
- optimized performance of debugging and building redirect form: removed 2 excessive calls (one from template, another from debugging - it invoked form building even if debugging was disabled)
|
3958 |
+
- since the form is built from a block, prevented injecting SID parameter to URLs when building form
|
3959 |
+
- added HTML escaping in the template hidden fields
|
3960 |
+
- added new system configuration parameter - hashing algorithm
|
3961 |
+
- verified/fixed all API hashing parameters in accordance to documentation v.5.0
|
3962 |
+
|
3963 |
+
=== Fixes ===
|
3964 |
+
Fixed Cannot open menu configuration-general-design
|
3965 |
+
Fixed Added backend design exception model
|
3966 |
+
Fixed The options in the action dropdown for export are incorrectly labeled in the Sales section
|
3967 |
+
Fixed Checking if address exists was added before save address'es attributes (to prevent foreign key error in case of two users were logged in under one account in the same time).
|
3968 |
+
Fixed URL rewrite algorithm was changed: fix for permanent link for old URLs.
|
3969 |
+
Fixed Incorrect number of used card is shown after you have returned to 'Shopping Cart' in partial authorization (Authorize.Net)
|
3970 |
+
Fixed In one page checkout incorrect information for declined card is shown for partial authorization(Authorize.Net)
|
3971 |
+
Fixed Bundle products shoved without options
|
3972 |
+
Fixed Instructions on the Payflow Link Configuration Menu
|
3973 |
+
Fixed rate model checks rate to existens in rule before delete action
|
3974 |
+
Fixed store name 'Demo Store' was changes to variable with real store name var store.getFrontendName()
|
3975 |
+
Fixed Place order does not work with free shipping
|
3976 |
+
Fixed possibility to find product in advanced search with from-to price is 0 was fixed
|
3977 |
+
Fixed FPT with prices included tax problem
|
3978 |
+
Fixed Instable work of back-end notification
|
3979 |
+
- For now pop-up window doesn't go to our side. Flash availability check is removed
|
3980 |
+
- little refactoring
|
3981 |
+
- method Mage_AdminNotification_Helper_Data::isReadablePopupObject() marked as deprecated
|
3982 |
+
Fixed Onepage checkout - Shipping address issues
|
3983 |
+
- added resetting property to save billing address in address book
|
3984 |
+
- added saving of new shipping address
|
3985 |
+
- simplified condition in order preparation routine
|
3986 |
+
Fixed Backordered Item Status on Orders
|
3987 |
+
- saving current ordered items number for stock item and calculating backorder qty according to it
|
3988 |
+
Fixed The product category is empty after moving category with products to another one
|
3989 |
+
Fixed Magento Connect -> If substitute channel for package extension, MCM will send authorization data to the fake URL
|
3990 |
+
Fixed Image Label is not Uploading properly
|
3991 |
+
Fixed Category Tree -> Changing category color
|
3992 |
+
Fixed With enabled "Inline Translation" its impossible to finish purchase
|
3993 |
+
- Added checking for escaped html end tag
|
3994 |
+
Fixed #0024559: Special Price to Date can not set Use Default Value
|
3995 |
+
Fixed CMS -> Manage Pages: It's possible to save New Page with capital letters in URL key
|
3996 |
+
- corrected js validation;
|
3997 |
+
- added server-side url key validation.
|
3998 |
+
Fixed Makeup of subcategories dropdown menu at front-end glitter with category fields bar
|
3999 |
+
- removed property "z-index: 1" for #nav li.level-top
|
4000 |
+
Revert changes from rev #83486
|
4001 |
+
Fixed Tier prices are not recalculated in bundle product configuration with different currency
|
4002 |
+
Fixed On Multi store installation, 'specials' rss feed includes specials from other stores
|
4003 |
+
Fixed Subscribe to Order Status - translation problem
|
4004 |
+
Fixed There is a spelling error with the translation
|
4005 |
+
Fixed Single Coupon applying for each shipping location rather than whole order
|
4006 |
+
- applying cart fixed rules for first shipping address order only
|
4007 |
+
- store which quote address cart fixed rule was applied for in SalesRule_Model_Validator
|
4008 |
+
Added method getDefaultCountry and constant XML_PATH_DEFAULT_COUNTRY into Mage_Core_Helper_Data
|
4009 |
+
Added more abstract system config backend model for uploading files:
|
4010 |
+
- removed duplicated logic from system config backend image model.
|
4011 |
+
Fixed Grand total doubles when processing multi-shipping checkout and ordinary checkout
|
4012 |
+
- cleaning address information when checkout type changes from multi-shipping to onepage
|
4013 |
+
Fixed Problem with admin roles
|
4014 |
+
Checkout page IE6/7 CSS bug fixed.
|
4015 |
+
Fixed Edit product->"Inventory" tab - "Qty Increments" error contain mistake
|
4016 |
+
Fixed No field for "Search Query"
|
4017 |
+
Fixed Character "b" is added to Review
|
4018 |
+
Fixed Retain the selected tab on editing CMS page
|
4019 |
+
Fixed Invoices Tax class not displayed
|
4020 |
+
Fixed Full tax summary on invoice
|
4021 |
+
Fixed working with partial authorizations on first card submit
|
4022 |
+
Fixed CMS can't create Hierarchy Node Link widget in IE8
|
4023 |
+
Fixed The Wrong / not exist Url should be redirect to 404 page
|
4024 |
+
Fixed Interface Locale needs additional country
|
4025 |
+
Fixed The product category is empty after moving category with products to another one
|
4026 |
+
Fixed 'Gateway error: A valid amount is required' appears during create Credit Memo for order, which uses Authorize.net
|
4027 |
+
Fixed #19807: Product with visibility- Nowhere display on the fron-end in 'Last ordered items' block, if order create on back-end
|
4028 |
+
Fixed Displaying Out of Stock Products on the front-end
|
4029 |
+
- added price data for consider item stock status for wish-list and compare products items collections, in reorder for product collection which sales order item collection based on.
|
4030 |
+
Fixed active tabs in store view scope while disabled PayPal methods
|
4031 |
+
- Added functionality that disables corresponding methods in store view scope.
|
4032 |
+
- Fixed related bug: in website view scope Express Checkout PE checkbox appears improperly checked after page load.
|
4033 |
+
Fixed Active tabs in store view scope while disabled PayPal methods
|
4034 |
+
Fixed Bundle price wrong when static qty above 1
|
4035 |
+
Fixed No "Suspected Fraud" status for hacked orders
|
4036 |
+
Fixed PayPal API Certificate uses settings from the default configuration, instead of the website
|
4037 |
+
Fixed Don't show (-) in totals when shipping title and shiping method empty in a configuration
|
4038 |
+
Fixed Product with price 0.00 possibility purchase through Shortcut PayPal button
|
4039 |
+
Fixed Archived orders not displayed in customer's orders list
|
4040 |
+
Fixed Fatal error on magento compilation
|
4041 |
+
Fixed Mage::app() call is not overriding cache/var directories
|
4042 |
+
Fixed After switching "Manage Stock" option, product prices index does not invalidate
|
4043 |
+
Fixed Transfer Cart Line: dropdown with shipping Rates is absent on PayPal side
|
4044 |
+
Fixed Can't choose Group at the creation new Order by admin
|
4045 |
+
Fixed PayPal API Certificate uses settings from the default configuration, instead of the website
|
4046 |
+
- added forgotten file from rev 84979
|
4047 |
+
Fixed Bug in Error Message display for Send to Friend (Mage_Sendfriend_ProductController)
|
4048 |
+
Fixed Admin order creation JS error message
|
4049 |
+
Fixed Problems with category sort order
|
4050 |
+
Fixed Button "Credit Memo" after refund partial per invoice is enabled
|
4051 |
+
Fixed Report don't show order with status "Canceled"
|
4052 |
+
Fixed Wrong quantity checks architecture in inventory observer
|
4053 |
+
Fixed On page 404, link "go back" does not work
|
4054 |
+
Fixed Category editing "Use Parent Category Settings" inconsistent behavior (Google Chrome)
|
4055 |
+
Fixed Set products per Page
|
4056 |
+
Fixed product review filter by customer does not work
|
4057 |
+
- type is administrator when customer_id is NULL and store_id is admin store id
|
4058 |
+
Fixed Product review filter by customer does not work
|
4059 |
+
Fixed WYSIWYG Editor disabling issue
|
4060 |
+
Fixed Quantity increment for Group Product Issue
|
4061 |
+
Fixed #15780: Add configuration option to ignore SID on frontend
|
4062 |
+
- Changed fieldset scope from global to website, because the field has website scope.
|
4063 |
+
Fixed Message "The product has required options" appears twice in the back-end order for items with mandatory custom options
|
4064 |
+
Fixed Meta description can be more than 255 chars
|
4065 |
+
Fixed When creating a new customer from the backend in "Manage Customers", the welcome email is empty
|
4066 |
+
Fixed Image Label is not Uploading properly
|
4067 |
+
- Slightly changed logic in adding image algorithms due to possible existence of added pictures
|
4068 |
+
Fixed JavaScript Calendar Date Range
|
4069 |
+
- Also little fix to maintain corporate standards
|
4070 |
+
Fixed Gift message displaying conditions not properly work on frontend and backend:
|
4071 |
+
Fixed flat catalog tables do not contain varchar values for store view level
|
4072 |
+
Fixed Add check "Use Default" for dependent form elements (in the admin), because if field "Use Default" it should be always disabled.
|
4073 |
+
Fixed #21084: "can not" -> "cannot" text changes (found only one occurrence of "can not" and changed it)
|
4074 |
+
Fixed New added required attribute should be filled in by customer before checkout
|
4075 |
+
Fixed PayPal Billing Agreement presents in payment methods when no BA are created during admin order creation
|
4076 |
+
Fixed Free Shipping Banner appears to be hard coded into the template file - replaced hardcoded callouts with CNS blocks. Two CMS blocks should be added to RR install.
|
4077 |
+
Fixed Empty order status field
|
4078 |
+
- Configuration mistake
|
4079 |
+
Fixed Cart Rule discount with Fixed amount for a whole Cart is not applied for OnePageCheckout
|
4080 |
+
Fixed Coupon with "Apply fixed amount discount for whole cart" does not apply to bundle products with dynamic price
|
4081 |
+
Fixed Frontend additional attributes issue with price attributes.
|
4082 |
+
Fixed Unable to translate "Submit Invoice" button
|
4083 |
+
Fixed Undefined index after clicking on Print Shipment
|
4084 |
+
Fixed Customer cannot be confirmed from the admin
|
4085 |
+
Fixed Inline Translations don't work if you have more than one store
|
4086 |
+
Fixed Invitation link has a session ID parameter
|
4087 |
+
Fixed Magento creates order even if response from PaypalUk is empty
|
4088 |
+
- response validation has been added
|
4089 |
+
Fixed Displaying Out of Stock Products on the front-end
|
4090 |
+
Fixed Incorrect billing/shipping address transfer from magento to PayPal (WPP Payflow Edition, WPP Payflow Edition EC )
|
4091 |
+
Fixed User cannot be associated with webservice role if he was selected in the Role Users of Role inforamation Page
|
4092 |
+
Fixed CSS Merger Cache Ignores Hostname and HTTPS
|
4093 |
+
- removed "beta" mark on CSS merger feature in system configuration, because known issue with different host names for different store views is solved
|
4094 |
+
- split merged CSS storage into 2 parts: "css" and "css_secure"
|
4095 |
+
- included "port" and "base host name" parameters into merger hash generation algorithm as parameters
|
4096 |
+
Fixed: Default country setting not affect country select field default value on frontend
|
4097 |
+
Fixed Credit card data Iframe for PayflowLink is displayed on Order Review step for all payment methods
|
4098 |
+
Fixed The Wrong / not exist Url should be redirect to 404 page
|
4099 |
+
- Added section availability in preDispatch
|
4100 |
+
Fixed Report > Products Ordered ignores Store view switcher
|
4101 |
+
- reforming $storeIds checks
|
4102 |
+
Fixed Report > Products Ordered ignores Store view switcher
|
4103 |
+
Fixed Cannot create or save after editing customer's Address, "Please enter the street" error appears on frontend
|
4104 |
+
Fixed Magento allows admin to create category/product url rewrite for a store that doesn't have this category/product
|
4105 |
+
- Showing websites that only associated to current category or product.
|
4106 |
+
Fixed Magento allows admin to create category/product url rewrite for a store that doesn't have this category/product
|
4107 |
+
- Fixed coding standards
|
4108 |
+
Fixed Not all session data destroyed on logout
|
4109 |
+
Fixed Inline Translation - Pages View Issue
|
4110 |
+
- move cache types list in config
|
4111 |
+
Fixed Shop By index range is build based on Excl. Tax value, but filter products in catalog based on Incl tax value. filter works incorrect
|
4112 |
+
- it was problem with facets calculation, when we use Solr
|
4113 |
+
Fixed Security issue - processing of disallowed actions with orders through direct URL
|
4114 |
+
- wrong Credit Memo ACL resource name
|
4115 |
+
Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat
|
4116 |
+
Fixed Different order amount in Google checkout and Magento orders
|
4117 |
+
Fixed Bundle Product w/o required option calculates wrong fixed minimal price
|
4118 |
+
Fixed Admin unable to uninstall payment method without editing config
|
4119 |
+
- getMethodInstance method was rewrited
|
4120 |
+
- Added instance check in some payment models according to this
|
4121 |
+
Fixed lastInsertId invokes when no insert where proceed
|
4122 |
+
Fixed Changing the root category for a store doesn't work correctly
|
4123 |
+
Fixed Unable to translate notice messages, errors and success messages
|
4124 |
+
Fixed Problems with newsletter template preview on newsletter queue edit page
|
4125 |
+
Fixed Tax of shipping method Flat Rate is not passed to the order while Google Checkout
|
4126 |
+
Fixed Product Flat Data reindex
|
4127 |
+
- disable flat data usage during reindex process
|
4128 |
+
Fixed Catalog Rule does not work properly when condition uses Contains
|
4129 |
+
Fixed Wrong prices (currency) for shipping price via UPS XML rates
|
4130 |
+
Fixed Unable to translate product edit/create page
|
4131 |
+
Fixed During product save operation, Magento disables keys for catalog_product_index_* tables.
|
4132 |
+
Fixed FPT with prices included tax problem
|
4133 |
+
- Added 'Catalog Prices' option check
|
4134 |
+
Fixed Google Analytics e-commerce tracking not working
|
4135 |
+
Fixed Empty bundle selections are shown as item options
|
4136 |
+
Fixed Subtotal for Bundle product with quantity 2 calculates as for one
|
4137 |
+
Fixed Remove initSessionLayoutMessages() from ProductController
|
4138 |
+
Fixed Incorrect value of field "Custom Layout Update" causes fatal error
|
4139 |
+
Fixed Duplicate of a product creates it with no SKU value and is saved
|
4140 |
+
Fixed Field "Meta Description" should be has limit of 255 characters
|
4141 |
+
Fixed Row subtotal is not displayed for Downloadable product in Backend
|
4142 |
+
Fixed Bad styling of product options displayed in wishlist
|
4143 |
+
Fixed Need to show item options of customer shopping cart at backend
|
4144 |
+
Fixed Wishlist item configuration is not saved at backend
|
4145 |
+
Fixed "OK" button instead of "Ok" must be on product configuration popups in backend
|
4146 |
+
Fixed Products wishlist items are not sorted by added_at
|
4147 |
+
Fixed Mage_Core_Model_Template doesn't properly restore old design context
|
4148 |
+
Fixed StoreView value not in FlatCatalog for multiple-select type attribute
|
4149 |
+
Fixed Rule condition "is one of" disappeared for category_ids attribute
|
4150 |
+
- Added "is one of" and "is not one of" to multiselect type conditions
|
4151 |
+
Fixed Security issue - the way to get URL-path of Admin side through Front-end URL
|
4152 |
+
Fixed Pictures does not appears on the additional information tab on front end for product attribute with Catalog Input Type for Store Owner= Text Area
|
4153 |
+
Fixed Add method which was accidentally removed
|
4154 |
+
- Deprecated methods Mage_Catalog_Model_Product::loadParentProductIds, Mage_Catalog_Model_Resource_Eav_Mysql4_Product::getParentProductIds
|
4155 |
+
Fixed Can't create refund online for Google Chekout
|
4156 |
+
Fixed After pressing 'Cancel Payment' link nothing happens in Payflow Link payment method
|
4157 |
+
Fixed class Mage_Core_Model_Store has problem with _processConfigValue and processSubst
|
4158 |
+
- Added "@deprecated after 1.4.2.0" mark for processSubst() in Mage_Core_Model_Store
|
4159 |
+
Fixed Category tree is missing for product, assigned to root category
|
4160 |
+
Fixed Unable to translate "Delete Image" checkbox
|
4161 |
+
Fixed wrong XML paths in isAllowed() method for system->Admin roles controllers.
|
4162 |
+
Fixed Magento falls into the white screen when saving URL rewrite for a product on the Default Store View
|
4163 |
+
- Changed exception message
|
4164 |
+
Fixed Different shipping amount for creditmemo from order page and invoice page
|
4165 |
+
Fixed Tax rates with zip ranges doesn't match to addresses with asterisk ( * ) as zip code value
|
4166 |
+
Fixed Fedex doesn't react to overrided in website scope BaseCurrency value.
|
4167 |
+
Fixed Export Customers. Map billing or shipping street in the mapping interface. They won't be exported
|
4168 |
+
Fixed Advanced Import Profiles doesn't work
|
4169 |
+
Fixed Add New Customer Form: checkbox "Send Welcome Email" is not disabled if "Associate to Website"="Admin"
|
4170 |
+
Fixed JS validation prevent submit form
|
4171 |
+
Fixed Payment action: Ogone Default Operation is not working at all
|
4172 |
+
Fixed There are no ability to create several Refunds to Order completed using Partial Authorization
|
4173 |
+
Fixed Incorrect shipping tax calculation on invoice creditmemos with included tax
|
4174 |
+
Fixed URL key wasn't used while product save
|
4175 |
+
Fixed Inline Translations don't work if you have more than one store
|
4176 |
+
Fixed Tax Report Shows Wrong Tax Percent After Changing Tax Rate
|
4177 |
+
- added grouping by tax percent in report collections
|
4178 |
+
- modified unique key in the tax report aggregation table to allow generating report with grouping by tax percents
|
4179 |
+
- data in the tax report aggregation table is truncated and lifetime statistics must be re-generated after upgrade
|
4180 |
+
Fixed make increment_id fields unique in sales tables
|
4181 |
+
Fixed Added items to the Wishlist in the "Manage Shopping Cart" are not shown
|
4182 |
+
Fixed Orders: More than one filter to the same field is not possible
|
4183 |
+
- Function items was changed.
|
4184 |
+
Fixed Invoices: More than one filter to the same field is not possible
|
4185 |
+
- Function items was changed.
|
4186 |
+
Fixed Report counts configurable products twice
|
4187 |
+
Fixed Tax rate with ZIP XXXXX* doesn't match to customer zip XXXXX
|
4188 |
+
Fixed Method Mage_Wishlist_Block_Links::addWishlistLink removed
|
4189 |
+
- Added "@deprecated after 1.4.2.0"
|
4190 |
+
Fixed "Subscribed to Newsletter" success e-mail couldn't be sent if you changed customer's subscription in admin.
|
4191 |
+
Fixed Problems with newsletter template preview on newsletter queue edit page
|
4192 |
+
Fixed Dashboard reports bug
|
4193 |
+
- Added discount to Mage_Reports_Model_Mysql4_Order_Collection:::addSumAvgTotals()
|
4194 |
+
Fixed Google base timeout
|
4195 |
+
- Timeout is 60 seconds now.
|
4196 |
+
Fixed Bundle product is not shipped correctly
|
4197 |
+
Fixed Unable to translate product edit/create page
|
4198 |
+
Fixed Dataflow customers export optimization
|
4199 |
+
- customer groups are storing in memory instead of DB queries
|
4200 |
+
Fixed Price layer navigation does not count product with zero price
|
4201 |
+
Fixed Import Product doesn't work
|
4202 |
+
- added empty file checking
|
4203 |
+
Fixed Price Indexer does not apply configurable options surcharges for customer groups different to "NOT LOGGED IN"
|
4204 |
+
Fixed Category Update Not Reflected in Left Nav
|
4205 |
+
Fixed Notify Stock RSS Includes Products without stock
|
4206 |
+
Fixed FPT is not shown in the order review page (for website)
|
4207 |
+
Fixed SQL Upgrades have wrong implementation
|
4208 |
+
Fixed Email to a friend error, existing Order Send Email error
|
4209 |
+
- Added ability to access to /admin/sales_order/email/ action
|
4210 |
+
Fixed Total Refunded Report shows Offline Refunded orders like Online Refunded
|
4211 |
+
Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not USA
|
4212 |
+
- Added Mage::log() for errors @ Mage_Usa_Model_Shipping_Carrier_Ups::_parseXmlResponse()
|
4213 |
+
|
4214 |
+
|
4215 |
+
==== 1.5.x-devel-88903 ====
|
4216 |
+
|
4217 |
+
=== Major Highlights ===
|
4218 |
+
Balance Response, Partial Authorization Transactions, Authorization Reversals Support for MasterCard and Discover
|
4219 |
+
3D Secure authentication for Authorize.net payment method
|
4220 |
+
PayflowLink payment method
|
4221 |
+
Improved Import/Export functionality
|
4222 |
+
Ability to order composite products from backend and some extra functionality
|
4223 |
+
- reconfigure already added products on front end
|
4224 |
+
- adding preconfigured products in wish-list
|
4225 |
+
Alternative media storage
|
4226 |
+
- Database
|
4227 |
+
- CDN
|
4228 |
+
Order status management
|
4229 |
+
- ability to add new status and assign to some state
|
4230 |
+
- from now on statuses stored in appropriate DB table instead of configuration file
|
4231 |
+
Ability to edit order addresses
|
4232 |
+
- this functionality admin has link to edit address for order view page
|
4233 |
+
|
4234 |
+
=== Improvements ===
|
4235 |
+
Upgraded Zend Framework to 1.11.0
|
4236 |
+
Implemented new process of hashing parameters in Ogone payment method
|
4237 |
+
- implemented an advanced hashing method that invokes all transaction parameters for building security hash
|
4238 |
+
- updated fields sort order in system configuration
|
4239 |
+
- added the new parameter which designates whether to use the old or advanced hashing method
|
4240 |
+
- made SHA-IN and SHA-OUT sys config parameter titles corresponding to parameter titles on merchant site in Ogone
|
4241 |
+
- major refactoring of the Ogone helper: simplified public interface of hash validation, added support for SHA-1, SHA-256 and SHA-512 algorithms (not selectable in system config)
|
4242 |
+
- optimized performance of debugging and building redirect form: removed 2 excessive calls (one from template, another from debugging - it invoked form building even if debugging was disabled)
|
4243 |
+
- since the form is built from a block, prevented injecting SID parameter to URLs when building form
|
4244 |
+
- added HTML escaping in the template hidden fields
|
4245 |
+
- added new system configuration parameter - hashing algorithm
|
4246 |
+
- verified/fixed all API hashing parameters in accordance to documentation v.5.0
|
4247 |
+
|
4248 |
+
=== Fixes ===
|
4249 |
+
Fixed Onepage checkout - Shipping address issues
|
4250 |
+
- added resetting property to save billing address in address book
|
4251 |
+
- added saving of new shipping address
|
4252 |
+
- simplified condition in order preparation routine
|
4253 |
+
Fixed Backordered Item Status on Orders
|
4254 |
+
- saving current ordered items number for stock item and calculating backorder qty according to it
|
4255 |
+
Fixed The product category is empty after moving category with products to another one
|
4256 |
+
Fixed Magento Connect -> If substitute channel for package extension, MCM will send authorization data to the fake URL
|
4257 |
+
Fixed Image Label is not Uploading properly
|
4258 |
+
Fixed Category Tree -> Changing category color
|
4259 |
+
Fixed With enabled "Inline Translation" its impossible to finish purchase
|
4260 |
+
- Added checking for escaped html end tag
|
4261 |
+
Fixed #0024559: Special Price to Date can not set Use Default Value
|
4262 |
+
Fixed CMS -> Manage Pages: It's possible to save New Page with capital letters in URL key
|
4263 |
+
- corrected js validation;
|
4264 |
+
- added server-side url key validation.
|
4265 |
+
Fixed Makeup of subcategories dropdown menu at front-end glitter with category fields bar
|
4266 |
+
- removed property "z-index: 1" for #nav li.level-top
|
4267 |
+
Revert changes from rev #83486
|
4268 |
+
Fixed Tier prices are not recalculated in bundle product configuration with different currency
|
4269 |
+
Fixed On Multi store installation, 'specials' rss feed includes specials from other stores
|
4270 |
+
Fixed Subscribe to Order Status - translation problem
|
4271 |
+
Fixed There is a spelling error with the translation
|
4272 |
+
Fixed Single Coupon applying for each shipping location rather than whole order
|
4273 |
+
- applying cart fixed rules for first shipping address order only
|
4274 |
+
- store which quote address cart fixed rule was applied for in SalesRule_Model_Validator
|
4275 |
+
Added method getDefaultCountry and constant XML_PATH_DEFAULT_COUNTRY into Mage_Core_Helper_Data
|
4276 |
+
Added more abstract system config backend model for uploading files:
|
4277 |
+
- removed duplicated logic from system config backend image model.
|
4278 |
+
Fixed Grand total doubles when processing multi-shipping checkout and ordinary checkout
|
4279 |
+
- cleaning address information when checkout type changes from multi-shipping to onepage
|
4280 |
+
Fixed Problem with admin roles
|
4281 |
+
Checkout page IE6/7 CSS bug fixed.
|
4282 |
+
Fixed Edit product->"Inventory" tab - "Qty Increments" error contain mistake
|
4283 |
+
Fixed No field for "Search Query"
|
4284 |
+
Fixed Character "b" is added to Review
|
4285 |
+
Fixed Retain the selected tab on editing CMS page
|
4286 |
+
Fixed Invoices Tax class not displayed
|
4287 |
+
Fixed Full tax summary on invoice
|
4288 |
+
Fixed working with partial authorizations on first card submit
|
4289 |
+
Fixed CMS can't create Hierarchy Node Link widget in IE8
|
4290 |
+
Fixed The Wrong / not exist Url should be redirect to 404 page
|
4291 |
+
Fixed Interface Locale needs additional country
|
4292 |
+
Fixed The product category is empty after moving category with products to another one
|
4293 |
+
Fixed 'Gateway error: A valid amount is required' appears during create Credit Memo for order, which uses Authorize.net
|
4294 |
+
Fixed #19807: Product with visibility- Nowhere display on the fron-end in 'Last ordered items' block, if order create on back-end
|
4295 |
+
Fixed Displaying Out of Stock Products on the front-end
|
4296 |
+
- added price data for consider item stock status for wish-list and compare products items collections, in reorder for product collection which sales order item collection based on.
|
4297 |
+
Fixed active tabs in store view scope while disabled PayPal methods
|
4298 |
+
- Added functionality that disables corresponding methods in store view scope.
|
4299 |
+
- Fixed related bug: in website view scope Express Checkout PE checkbox appears improperly checked after page load.
|
4300 |
+
Fixed Active tabs in store view scope while disabled PayPal methods
|
4301 |
+
Fixed Bundle price wrong when static qty above 1
|
4302 |
+
Fixed No "Suspected Fraud" status for hacked orders
|
4303 |
+
Fixed PayPal API Certificate uses settings from the default configuration, instead of the website
|
4304 |
+
Fixed Don't show (-) in totals when shipping title and shiping method empty in a configuration
|
4305 |
+
Fixed Product with price 0.00 possibility purchase through Shortcut PayPal button
|
4306 |
+
Fixed Archived orders not displayed in customer's orders list
|
4307 |
+
Fixed Fatal error on magento compilation
|
4308 |
+
Fixed Mage::app() call is not overriding cache/var directories
|
4309 |
+
Fixed After switching "Manage Stock" option, product prices index does not invalidate
|
4310 |
+
Fixed Transfer Cart Line: dropdown with shipping Rates is absent on PayPal side
|
4311 |
+
Fixed Can't choose Group at the creation new Order by admin
|
4312 |
+
Fixed PayPal API Certificate uses settings from the default configuration, instead of the website
|
4313 |
+
- added forgotten file from rev 84979
|
4314 |
+
Fixed Bug in Error Message display for Send to Friend (Mage_Sendfriend_ProductController)
|
4315 |
+
Fixed Admin order creation JS error message
|
4316 |
+
Fixed Problems with category sort order
|
4317 |
+
Fixed Button "Credit Memo" after refund partial per invoice is enabled
|
4318 |
+
Fixed Report don't show order with status "Canceled"
|
4319 |
+
Fixed Wrong quantity checks architecture in inventory observer
|
4320 |
+
Fixed On page 404, link "go back" does not work
|
4321 |
+
Fixed Category editing "Use Parent Category Settings" inconsistent behavior (Google Chrome)
|
4322 |
+
Fixed Set products per Page
|
4323 |
+
Fixed product review filter by customer does not work
|
4324 |
+
- type is administrator when customer_id is NULL and store_id is admin store id
|
4325 |
+
Fixed Product review filter by customer does not work
|
4326 |
+
Fixed WYSIWYG Editor disabling issue
|
4327 |
+
Fixed Quantity increment for Group Product Issue
|
4328 |
+
Fixed #15780: Add configuration option to ignore SID on frontend
|
4329 |
+
- Changed fieldset scope from global to website, because the field has website scope.
|
4330 |
+
Fixed Message "The product has required options" appears twice in the back-end order for items with mandatory custom options
|
4331 |
+
Fixed Meta description can be more than 255 chars
|
4332 |
+
Fixed When creating a new customer from the backend in "Manage Customers", the welcome email is empty
|
4333 |
+
Fixed Image Label is not Uploading properly
|
4334 |
+
- Slightly changed logic in adding image algorithms due to possible existence of added pictures
|
4335 |
+
Fixed JavaScript Calendar Date Range
|
4336 |
+
- Also little fix to maintain corporate standards
|
4337 |
+
Fixed Gift message displaying conditions not properly work on frontend and backend:
|
4338 |
+
Fixed flat catalog tables do not contain varchar values for store view level
|
4339 |
+
Fixed Add check "Use Default" for dependent form elements (in the admin), because if field "Use Default" it should be always disabled.
|
4340 |
+
Fixed #21084: "can not" -> "cannot" text changes (found only one occurrence of "can not" and changed it)
|
4341 |
+
Fixed New added required attribute should be filled in by customer before checkout
|
4342 |
+
Fixed PayPal Billing Agreement presents in payment methods when no BA are created during admin order creation
|
4343 |
+
Fixed Free Shipping Banner appears to be hard coded into the template file - replaced hardcoded callouts with CNS blocks. Two CMS blocks should be added to RR install.
|
4344 |
+
Fixed Empty order status field
|
4345 |
+
- Configuration mistake
|
4346 |
+
Fixed Cart Rule discount with Fixed amount for a whole Cart is not applied for OnePageCheckout
|
4347 |
+
Fixed Coupon with "Apply fixed amount discount for whole cart" does not apply to bundle products with dynamic price
|
4348 |
+
Fixed Frontend additional attributes issue with price attributes.
|
4349 |
+
Fixed Unable to translate "Submit Invoice" button
|
4350 |
+
Fixed Undefined index after clicking on Print Shipment
|
4351 |
+
Fixed Customer cannot be confirmed from the admin
|
4352 |
+
Fixed Inline Translations don't work if you have more than one store
|
4353 |
+
Fixed Invitation link has a session ID parameter
|
4354 |
+
Fixed Magento creates order even if response from PaypalUk is empty
|
4355 |
+
- response validation has been added
|
4356 |
+
Fixed Displaying Out of Stock Products on the front-end
|
4357 |
+
Fixed Incorrect billing/shipping address transfer from magento to PayPal (WPP Payflow Edition, WPP Payflow Edition EC )
|
4358 |
+
Fixed User cannot be associated with webservice role if he was selected in the Role Users of Role inforamation Page
|
4359 |
+
Fixed CSS Merger Cache Ignores Hostname and HTTPS
|
4360 |
+
- removed "beta" mark on CSS merger feature in system configuration, because known issue with different host names for different store views is solved
|
4361 |
+
- split merged CSS storage into 2 parts: "css" and "css_secure"
|
4362 |
+
- included "port" and "base host name" parameters into merger hash generation algorithm as parameters
|
4363 |
+
Fixed: Default country setting not affect country select field default value on frontend
|
4364 |
+
Fixed Credit card data Iframe for PayflowLink is displayed on Order Review step for all payment methods
|
4365 |
+
Fixed The Wrong / not exist Url should be redirect to 404 page
|
4366 |
+
- Added section availability in preDispatch
|
4367 |
+
Fixed Report > Products Ordered ignores Store view switcher
|
4368 |
+
- reforming $storeIds checks
|
4369 |
+
Fixed Report > Products Ordered ignores Store view switcher
|
4370 |
+
Fixed Cannot create or save after editing customer's Address, "Please enter the street" error appears on frontend
|
4371 |
+
Fixed Magento allows admin to create category/product url rewrite for a store that doesn't have this category/product
|
4372 |
+
- Showing websites that only associated to current category or product.
|
4373 |
+
Fixed Magento allows admin to create category/product url rewrite for a store that doesn't have this category/product
|
4374 |
+
- Fixed coding standards
|
4375 |
+
Fixed Not all session data destroyed on logout
|
4376 |
+
Fixed Inline Translation - Pages View Issue
|
4377 |
+
- move cache types list in config
|
4378 |
+
Fixed Shop By index range is build based on Excl. Tax value, but filter products in catalog based on Incl tax value. filter works incorrect
|
4379 |
+
- it was problem with facets calculation, when we use Solr
|
4380 |
+
Fixed Security issue - processing of disallowed actions with orders through direct URL
|
4381 |
+
- wrong Credit Memo ACL resource name
|
4382 |
+
Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat
|
4383 |
+
Fixed Different order amount in Google checkout and Magento orders
|
4384 |
+
Fixed Bundle Product w/o required option calculates wrong fixed minimal price
|
4385 |
+
Fixed Admin unable to uninstall payment method without editing config
|
4386 |
+
- getMethodInstance method was rewrited
|
4387 |
+
- Added instance check in some payment models according to this
|
4388 |
+
Fixed lastInsertId invokes when no insert where proceed
|
4389 |
+
Fixed Changing the root category for a store doesn't work correctly
|
4390 |
+
Fixed Unable to translate notice messages, errors and success messages
|
4391 |
+
Fixed Problems with newsletter template preview on newsletter queue edit page
|
4392 |
+
Fixed Tax of shipping method Flat Rate is not passed to the order while Google Checkout
|
4393 |
+
Fixed Product Flat Data reindex
|
4394 |
+
- disable flat data usage during reindex process
|
4395 |
+
Fixed Catalog Rule does not work properly when condition uses Contains
|
4396 |
+
Fixed Wrong prices (currency) for shipping price via UPS XML rates
|
4397 |
+
Fixed Unable to translate product edit/create page
|
4398 |
+
Fixed During product save operation, Magento disables keys for catalog_product_index_* tables.
|
4399 |
+
Fixed FPT with prices included tax problem
|
4400 |
+
- Added 'Catalog Prices' option check
|
4401 |
+
Fixed Google Analytics e-commerce tracking not working
|
4402 |
+
Fixed Empty bundle selections are shown as item options
|
4403 |
+
Fixed Subtotal for Bundle product with quantity 2 calculates as for one
|
4404 |
+
Fixed Remove initSessionLayoutMessages() from ProductController
|
4405 |
+
Fixed Incorrect value of field "Custom Layout Update" causes fatal error
|
4406 |
+
Fixed Duplicate of a product creates it with no SKU value and is saved
|
4407 |
+
Fixed Field "Meta Description" should be has limit of 255 characters
|
4408 |
+
Fixed Row subtotal is not displayed for Downloadable product in Backend
|
4409 |
+
Fixed Bad styling of product options displayed in wishlist
|
4410 |
+
Fixed Need to show item options of customer shopping cart at backend
|
4411 |
+
Fixed Wishlist item configuration is not saved at backend
|
4412 |
+
Fixed "OK" button instead of "Ok" must be on product configuration popups in backend
|
4413 |
+
Fixed Products wishlist items are not sorted by added_at
|
4414 |
+
Fixed Mage_Core_Model_Template doesn't properly restore old design context
|
4415 |
+
Fixed StoreView value not in FlatCatalog for multiple-select type attribute
|
4416 |
+
Fixed Rule condition "is one of" disappeared for category_ids attribute
|
4417 |
+
- Added "is one of" and "is not one of" to multiselect type conditions
|
4418 |
+
Fixed Security issue - the way to get URL-path of Admin side through Front-end URL
|
4419 |
+
Fixed Pictures does not appears on the additional information tab on front end for product attribute with Catalog Input Type for Store Owner= Text Area
|
4420 |
+
Fixed Add method which was accidentally removed
|
4421 |
+
- Deprecated methods Mage_Catalog_Model_Product::loadParentProductIds, Mage_Catalog_Model_Resource_Eav_Mysql4_Product::getParentProductIds
|
4422 |
+
Fixed Can't create refund online for Google Chekout
|
4423 |
+
Fixed After pressing 'Cancel Payment' link nothing happens in Payflow Link payment method
|
4424 |
+
Fixed class Mage_Core_Model_Store has problem with _processConfigValue and processSubst
|
4425 |
+
- Added "@deprecated after 1.4.2.0" mark for processSubst() in Mage_Core_Model_Store
|
4426 |
+
Fixed Category tree is missing for product, assigned to root category
|
4427 |
+
Fixed Unable to translate "Delete Image" checkbox
|
4428 |
+
Fixed wrong XML paths in isAllowed() method for system->Admin roles controllers.
|
4429 |
+
Fixed Magento falls into the white screen when saving URL rewrite for a product on the Default Store View
|
4430 |
+
- Changed exception message
|
4431 |
+
Fixed Different shipping amount for creditmemo from order page and invoice page
|
4432 |
+
Fixed Tax rates with zip ranges doesn't match to addresses with asterisk ( * ) as zip code value
|
4433 |
+
Fixed Fedex doesn't react to overrided in website scope BaseCurrency value.
|
4434 |
+
Fixed Export Customers. Map billing or shipping street in the mapping interface. They won't be exported
|
4435 |
+
Fixed Advanced Import Profiles doesn't work
|
4436 |
+
Fixed Add New Customer Form: checkbox "Send Welcome Email" is not disabled if "Associate to Website"="Admin"
|
4437 |
+
Fixed JS validation prevent submit form
|
4438 |
+
Fixed Payment action: Ogone Default Operation is not working at all
|
4439 |
+
Fixed There are no ability to create several Refunds to Order completed using Partial Authorization
|
4440 |
+
Fixed Incorrect shipping tax calculation on invoice creditmemos with included tax
|
4441 |
+
Fixed URL key wasn't used while product save
|
4442 |
+
Fixed Inline Translations don't work if you have more than one store
|
4443 |
+
Fixed Tax Report Shows Wrong Tax Percent After Changing Tax Rate
|
4444 |
+
- added grouping by tax percent in report collections
|
4445 |
+
- modified unique key in the tax report aggregation table to allow generating report with grouping by tax percents
|
4446 |
+
- data in the tax report aggregation table is truncated and lifetime statistics must be re-generated after upgrade
|
4447 |
+
Fixed make increment_id fields unique in sales tables
|
4448 |
+
Fixed Added items to the Wishlist in the "Manage Shopping Cart" are not shown
|
4449 |
+
Fixed Orders: More than one filter to the same field is not possible
|
4450 |
+
- Function items was changed.
|
4451 |
+
Fixed Invoices: More than one filter to the same field is not possible
|
4452 |
+
- Function items was changed.
|
4453 |
+
Fixed Report counts configurable products twice
|
4454 |
+
Fixed Tax rate with ZIP XXXXX* doesn't match to customer zip XXXXX
|
4455 |
+
Fixed Method Mage_Wishlist_Block_Links::addWishlistLink removed
|
4456 |
+
- Added "@deprecated after 1.4.2.0"
|
4457 |
+
Fixed "Subscribed to Newsletter" success e-mail couldn't be sent if you changed customer's subscription in admin.
|
4458 |
+
Fixed Problems with newsletter template preview on newsletter queue edit page
|
4459 |
+
Fixed Dashboard reports bug
|
4460 |
+
- Added discount to Mage_Reports_Model_Mysql4_Order_Collection:::addSumAvgTotals()
|
4461 |
+
Fixed Google base timeout
|
4462 |
+
- Timeout is 60 seconds now.
|
4463 |
+
Fixed Bundle product is not shipped correctly
|
4464 |
+
Fixed Unable to translate product edit/create page
|
4465 |
+
Fixed Dataflow customers export optimization
|
4466 |
+
- customer groups are storing in memory instead of DB queries
|
4467 |
+
Fixed Price layer navigation does not count product with zero price
|
4468 |
+
Fixed Import Product doesn't work
|
4469 |
+
- added empty file checking
|
4470 |
+
Fixed Price Indexer does not apply configurable options surcharges for customer groups different to "NOT LOGGED IN"
|
4471 |
+
Fixed Category Update Not Reflected in Left Nav
|
4472 |
+
Fixed Notify Stock RSS Includes Products without stock
|
4473 |
+
Fixed FPT is not shown in the order review page (for website)
|
4474 |
+
Fixed SQL Upgrades have wrong implementation
|
4475 |
+
Fixed Email to a friend error, existing Order Send Email error
|
4476 |
+
- Added ability to access to /admin/sales_order/email/ action
|
4477 |
+
Fixed Total Refunded Report shows Offline Refunded orders like Online Refunded
|
4478 |
+
Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not USA
|
4479 |
+
- Added Mage::log() for errors @ Mage_Usa_Model_Shipping_Carrier_Ups::_parseXmlResponse()
|
4480 |
+
|
4481 |
+
|
4482 |
+
==== 1.4.2.0 ====
|
4483 |
+
|
4484 |
+
=== Major Highlights ===
|
4485 |
+
* Starting from this release we are including TheFind extension.
|
4486 |
+
|
4487 |
+
== Upgrade Notes ==
|
4488 |
+
* Those who installed Magento version 1.4.2.0-beta1 or 1.4.2.0-rc1 through Magento Connect should reinstall it manually, because its version number is the same as of the current release and no automatic update will be available for it.
|
4489 |
+
|
4490 |
+
== Improvements ==
|
4491 |
+
* Added "Switch/Maestro" card type support to centinel 3DS validator. Added comment about maestro and 3d-secure to paypal system config
|
4492 |
+
* Added more flexible filters implementation in collections:
|
4493 |
+
** Varien_Data_Collection::addFilter() registers filters as objects and implements getFilter() method to be able to detect/modify already existing filters
|
4494 |
+
** Varien_Data_Collection_Db::_renderFilters():
|
4495 |
+
*** Added a hook _renderFiltersBefore()
|
4496 |
+
*** Implemented 'public' filter type, which maps the provided filter field from public into internal view and passes the "value" as a condition through _getConditionSql()
|
4497 |
+
** Added $this->_renderFilters() call to abstract EAV collection to accommodate the filters that may be set by addFilter() method
|
4498 |
+
* Added ability to pass multiple recipient emails and names to Mage_Core_Model_Email_Template::send()
|
4499 |
+
* Backordered Item Status for subitems in Orders
|
4500 |
+
** Added correct message at order for all backordered items. At back-end all items shows as backordered if their quantity is below or equal to zero
|
4501 |
+
** Fix of duplication backorder messages for composite product options with same backordered item - saving backorder messages per product id
|
4502 |
+
* Magento Connect Manager
|
4503 |
+
** checking cyclic dependency references and conflicts with local files
|
4504 |
+
** implemented adding to MCM manually installed extension
|
4505 |
+
** changed upgrade logic, previous version of package should be deleted before install new
|
4506 |
+
** Implemented new download process and dependencies rules
|
4507 |
+
** Added correct behavior during extension reinstall, so dependencies will not reinstall automatically
|
4508 |
+
* Optimized rewrite selection from DB, added url rewrite and suffix validation at admin backend
|
4509 |
+
* Added verification of access level for app/etc/local.xml.
|
4510 |
+
** Now if server configuration has issue and this file accessible from browser admin user gets notification in backend.
|
4511 |
+
* Upgraded Zend Framework to version 1.10.8
|
4512 |
+
* Added the Recurring Profiles tab in customer management
|
4513 |
+
* Implemented cache for shipping rates and fixing issues with rounding
|
4514 |
+
* Design packages and themes optimization/refactoring/improvements:
|
4515 |
+
** minor improvements and fixes
|
4516 |
+
** improved upgrade-ability of CE themes
|
4517 |
+
* iPhone Theme Refactoring
|
4518 |
+
* Added Widget settings sharing between widget types
|
4519 |
+
* For Invoices, Shipment, Credit Memos added possibility to show admin comments at user frontend (checkboxes "Visible on Frontend" in admin interface)
|
4520 |
+
** Added JS to enables/disable checkbox 'Append Comments' depending on checkbox 'Email Order Confirmation'
|
4521 |
+
** Refactored invoice/shipment/refund comments collections models to one abstract Comment Collection Model
|
4522 |
+
** Refactored Block Order Invoice/Shipment/Creditmemo comments to usage of common block and design - Block Order Comments
|
4523 |
+
* A little more accurate profiler - important for very quick measurements
|
4524 |
+
* Add Shopping Cart API
|
4525 |
+
* Implementing payment refund notifications
|
4526 |
+
* Added website price scope for bundle items
|
4527 |
+
* Added support of pending transaction to payflow pro. Also fixed "denied payment review" message in payment
|
4528 |
+
* Upgraded TinyMCE to v.3.3.7
|
4529 |
+
* Added to prototype validation by length min-length validation
|
4530 |
+
* Added Varien.DateElement for front-end date form fields and re-implemented Varien.DOB
|
4531 |
+
* Added functionality to disable dashboard charts in backend (System > Configuration > Admin > Dashboard)
|
4532 |
+
* Added functionality to disable dashboard charts during installation
|
4533 |
+
* Adminhtml W3C Validation improvements
|
4534 |
+
* Added ability to use session save method from configuration
|
4535 |
+
* Rendering customer attributes
|
4536 |
+
* Added favicon manager under System > Configuration > Design > HTML Head
|
4537 |
+
|
4538 |
+
== Changes ==
|
4539 |
+
* Refactored shipping rates calculation to keep process solid and do not try to recreate internal process of calculation, as it was
|
4540 |
+
* Added caching of requests to shipping carriers, because otherwise we get too much duplicate requests during calculation of every shipping method
|
4541 |
+
* Refactored "Special products" RSS feeed
|
4542 |
+
* Shortened the names of all foreign keys longer than 49 characters
|
4543 |
+
* Compilation scope for some EAV models which was causing blank page after enabling compilation
|
4544 |
+
* Deleted Mage_Sales_Model_Recurring_Profile_Info, which was not on its place and added accidentally
|
4545 |
+
* Category and product design settings inheritance logic
|
4546 |
+
* Refactored one routine in Inventory Observer to remove code duplication
|
4547 |
+
* Disabling product attribute usage in promo rules not affect existing promo rules
|
4548 |
+
* Refactoring validation states for Centinel
|
4549 |
+
** Added template method Mage_Centinel_Model_StateAbstract::isLookupSuccessful
|
4550 |
+
* Add boolean type for catalog price rules and condition for category_ids
|
4551 |
+
* Removed Maestro/Switch/Solo card from system. Added Maestro/Switch and Solo cards to Chronopay and Cybersource methods
|
4552 |
+
* Mage_Adminhtml_Block_Sales_Order_Creditmemo block had dependence from 'canCapture' 'canCapturePartial'. It was changed to 'canRefund' 'canRefundPartialPerInvoice'. For set result of Mage_Adminhtml_Block_Sales_Items_Abstract::CanEditQty`s we can use setCanEditQty
|
4553 |
+
* Added Maestro/Switch and Solo Dollars card types for paypal_direct payment method. Also removed Maestro/Solo/Switch card type for this method
|
4554 |
+
* Removed "Shipping address" block on recurring profile view page if product is virtual. Also fixed virtual order detection
|
4555 |
+
* Refactored PayPal cart line items and cart totals calculation to accommodate various discounts and tax settings
|
4556 |
+
** added hidden discount and hidden shipping taxes to the calculation
|
4557 |
+
** eliminated cart line items logic from the helper, moved it to the paypal/cart model
|
4558 |
+
** simplified transferring of the totals and line items to PayPal API objects
|
4559 |
+
* Refactored sales rule discount detection on "buy_x_get_y" rule type
|
4560 |
+
* Added catalog_product table definition to product review collection
|
4561 |
+
* Changed type of obscure input field to 'password', so this field is hidden even when user enters data in it
|
4562 |
+
* Removed dependence to payment method on getting billing agreement method title. For now payment method title stored in billing agreement
|
4563 |
+
* Removed invoice creation thought zero subtotal checkout with new order status "pending"
|
4564 |
+
* Removed SID from url generation when Use SID on Frontend option is disabled
|
4565 |
+
* Added customer session validation for loadCustomerQuote method
|
4566 |
+
* Iphone clears.css has been deleted
|
4567 |
+
|
4568 |
+
== Fixes ==
|
4569 |
+
* Fixed Default shipping address is passed to PayPal instead of the selected shipping address
|
4570 |
+
* reverted cloning of shipping address and it's setting to quote.
|
4571 |
+
* implemented method assignCustomerWithAddressChange() with setting billing and shipping addresses
|
4572 |
+
* Fixed Added transferring of last four digits of credit card number to give possibility refund authorize transactions.
|
4573 |
+
* Fixed Returning from paypal cancel existing order
|
4574 |
+
* Canceling order in cancelAction() only if it was placed from current quote
|
4575 |
+
* Fixed Taxes->Incorrect product price and tax value on the last chechout step
|
4576 |
+
* Fixed Opening bestseller product (admin/dashboards) results in adding new product
|
4577 |
+
** fixed case when dashboard shows report for non-existing product (i.e. deleted one)
|
4578 |
+
* Fixed Bestsellers statistic bug
|
4579 |
+
** removed NULL values from statistic tables and changed foreign keys to cascade deleting stats for deleted products
|
4580 |
+
* Fixed Gift message displaying conditions not properly work on frontend and backend
|
4581 |
+
* Fixed QTY of product is incorrectly showed in Customer's Current Activities - Shopping Cart and Customer's Shopping Cart.
|
4582 |
+
* Fixed Gift message displaying conditions not properly work on frontend and backend - fixed missed bracked
|
4583 |
+
* Fixed Magento Connect Manager -> No warning message
|
4584 |
+
* Fixed Unable to upload community extention in Magento Connect Manager without Community Channel installed
|
4585 |
+
* Fixed Bundle product price calculated not correctly
|
4586 |
+
* Fixed Customer's email doesn't escalate to billing/shipping addresses
|
4587 |
+
** added copying email field from quote address to order address
|
4588 |
+
** added sending email to PayPal, when user's address doesn't contain email info
|
4589 |
+
* Fixed Catalog-specific attribute options do not load when using through catalog/output helper
|
4590 |
+
** method _getLoadDataFields at product attribute resource collection modified to select additional needed fields;
|
4591 |
+
* Fixed saving attribute value in store view scope only
|
4592 |
+
* Fixed Not searchable attributes are searched by Quick search.
|
4593 |
+
* Fixed Customers won't appear in the search results on the customer grid in the admin
|
4594 |
+
* Fixed Huge memory consumption on flat shipping rates import
|
4595 |
+
** decrease to 5000 count of data wich inserts into DB in one iterate, to avoid exceed of 128M memory_limit
|
4596 |
+
* Fixed Config fields "Disable output" doesn't implement inherited value
|
4597 |
+
* Fixed Category created for some store view not displayed on frontend
|
4598 |
+
** include_in_menu attribute was made as required to set default value when category created in specified store
|
4599 |
+
* Fixed creating of "Shopping Cart Price Rule'
|
4600 |
+
** setActualProductAttributes method was called with 'attribute_set_id' value in $attributes param. But it does not exist in 'eav/attribute' table. So we need to check it
|
4601 |
+
* Fixed PayPal PE transaction_id detection: Overrided getPaypalTransactionId method in PE API - changed transaction id getting to process payflow accounts not assigned to paypal side
|
4602 |
+
* Fixed Configurable Product Catalog Price Rule Issue: the main idea is to calculate price rule on configurable price separately from base price
|
4603 |
+
* Fixed fatal error during import large file
|
4604 |
+
* Fixed Shipping information is not displayed in backend after Google Checkout operations
|
4605 |
+
* Fixed Field Mapping Issue during customer import
|
4606 |
+
* Fixed CMS blocks grid inoperable with store filter in GWS-limited mode
|
4607 |
+
* Fixed incorrect qty increment behaviour
|
4608 |
+
** qty increment not decimal validate
|
4609 |
+
** when adding product with qty increment to cart - redirect to product's page
|
4610 |
+
** generate message about mismatch of qty increment when editing item qty at cart
|
4611 |
+
* Fixed ups/usps and Guam
|
4612 |
+
* Fidex issues with attaching product to multiple stores: refresh product index query update
|
4613 |
+
* Fixed displaying of bundle product weight
|
4614 |
+
* Fixed "Select a PayPal Solution" checkbox bug: Website Payments Pro and Website Payments Pro Payflow Edition consider each other status in their checkboxes control logic
|
4615 |
+
* Fixed Invoice Comments Stripped When Quantities Updated
|
4616 |
+
* Fixed XSS security issue on frontend
|
4617 |
+
* Fixed Google Chekout: Discount for shipping amount doesn't apply
|
4618 |
+
* Fixed XSS issue in address form
|
4619 |
+
* Fixed Address in the customers address book cannot be deleted
|
4620 |
+
* Fixed CatalogSearch_Fulltext not being renewed for configurable products when editing attached simple products
|
4621 |
+
* Fixed Google Checkout: shipping method info is empty at order page in admin backend
|
4622 |
+
* Fixed Google Checkout: with discounted shipping - discount is applied again
|
4623 |
+
* Fixed Wrong timezone/DST in reports
|
4624 |
+
* Fixed coupon_code attribute inconsistency in some upgrade paths (from 1.4.0.0 to 1.4.1.0)
|
4625 |
+
* Fixed Created extension archive through Magento Connect include ".svn" directories
|
4626 |
+
* Fixed version of downloader
|
4627 |
+
* Fixed Magento Connect: User should has a possibility to choose version for extension upgrade
|
4628 |
+
* Fixed Magento Connect: User shouldn't be able to download Magento into "0000 permissions" folders
|
4629 |
+
* Fixed Magento Connect: JS validation is absent for "Authors" tab on package extensions page
|
4630 |
+
* Fixed Magento Connect: Saving information on settings page
|
4631 |
+
* Fixed Magento Connect: "Configuration" step - server validation is absent during installation
|
4632 |
+
* Fixed Magento Connect: "Log in" page - Message or some information about required fields doesn't appeared
|
4633 |
+
* Fixed Magento Connect: "Configuration" step - incorrect message appeared during installation
|
4634 |
+
* Fixed wrong shipping price in case of sales rule with fixed cart discount and 1 item in cart
|
4635 |
+
* Fixed the label for the configurable product attribute does not reflect correctly on the frontend
|
4636 |
+
* Fixed sales rule with fixed discount for whole cart doesn't work
|
4637 |
+
* Fixed "Slash for category or product urls causes error 404"
|
4638 |
+
* Fixed Shared shopping cart on the stores with different domains
|
4639 |
+
** check origin url in all store urls
|
4640 |
+
** prevent to getting SID param from current query
|
4641 |
+
* Fixed #18454: Import profiles do not reset websites values
|
4642 |
+
* Fixed Issue with zero grand total express checkout for recurring products.
|
4643 |
+
* Fixed "Allow Gift message" setting on the product page doesn't work in Front.
|
4644 |
+
* Fixed "Duplicate" of bundle product leads to an error
|
4645 |
+
* Fixed Catalog sitemap for categories shows inactive sub categories if flat catalog enabled
|
4646 |
+
* Fixed Added support of all product attributes in conditions/actions of salesRules.
|
4647 |
+
* Fixed Disabling product attribute usage in promo rules not affect existing promo rules
|
4648 |
+
* Fixed "Cart Price Rule not working with Product Attributes" (boolean values not properly shown in rule conditions)
|
4649 |
+
* Fixed Wrong amounts invoiced with FPT
|
4650 |
+
* Fixed Wrong order status after refund and additional related issue on frontend during checkout
|
4651 |
+
* Fixed Unable to delete uploaded sample for downloadable product
|
4652 |
+
* Fixed Paypal Direct send wrong billing address to API
|
4653 |
+
* Fixed Incorrect viewing of category settings after refreshing page
|
4654 |
+
* Fixed Catalog price rule discount not working during backend order creation
|
4655 |
+
* Fixed Double headers for session cookie set
|
4656 |
+
* Fixed Custom design is not reset properly after shipment comment emails
|
4657 |
+
* Fixed Tax report displays incorrect figures
|
4658 |
+
* Fixed Removed invoice creation on "completed" IPN message with payment_entity = "auth" to prevent double capture creation on single transaction with IPR.
|
4659 |
+
* Fixed Image browser in WYSIWYG editor doesn't fill mouse over/out fields
|
4660 |
+
* Fixed Added rounding to "Refund Shipping" field on credit memo creation page.
|
4661 |
+
* Fixed Added additional error messages to customer address validation on PHP side while creating.
|
4662 |
+
* Fixed "No server side check for password length when customer edits his account information"
|
4663 |
+
** Also added proper processing for password == '0', earlier it was considered as non-set password
|
4664 |
+
* Fixed WYSIWYG editor breaks directives that are not in src attribute
|
4665 |
+
* fixed directives decoding for a case when the secret key is present in URLs
|
4666 |
+
* Fixed Duplicate of a product creates it with no SKU value and is saved
|
4667 |
+
* Fixed Redundant catalog product attribute "category_ids" remains during upgrade from 1.3 to 1.4
|
4668 |
+
* Fixed Reports/Shopping cart/Products in carts optimization
|
4669 |
+
* Fixed "If all Storeviews value set up - disabled --> Front end shows default storeview instead of 404 page"
|
4670 |
+
* Fixed Added error on zero subtotal checkout with paypal express. Removed paypal express button on shopping cart with zero grand total.
|
4671 |
+
* Fixed Field labels and field values are not aligned vertically on Sales Orders in Admin
|
4672 |
+
* Fixed Spacing between field labels and field values is inappropriate on the Recurring Profiles tab in My Account section
|
4673 |
+
* Fixed Not searchable attributes are searched by Quick search.
|
4674 |
+
** Checking if attribute used in quick search before adding to fulltext field
|
4675 |
+
* Fixed Mage_Customer_Model_Customer::getGroupId can't return zero value
|
4676 |
+
* Fixed #23184: Huge memory consumption on flat shipping rates import
|
4677 |
+
* Optimized and refactored Table Rate import
|
4678 |
+
* Fixed Scrolling during category load results in some js-errors
|
4679 |
+
* Fixed "Javascript alert on "manage category" page"
|
4680 |
+
* Fixed Security Vulnerability on Mage_Core_Block_Template level
|
4681 |
+
* Fixed Merged CSS breaks Secure Pages (https)
|
4682 |
+
* Fixed SOAP webservices do not work when enabling "Add Store Code to URLs"
|
4683 |
+
* Fixed Incorrect displaying of the Start Date entered by customer while adding to the cart recurring product
|
4684 |
+
* Fixed Downloadable Product "lable" typo
|
4685 |
+
* Fixed While creating gift message from backend it disappears in case of refreshing page
|
4686 |
+
* Fixed Product export fails when the quantity of exported products is 25 000 or more (memory leak in products)
|
4687 |
+
* Fixed While creating gift message from backend it disappears in case of refreshing page
|
4688 |
+
* Fixed Google Chekout: Discount for shipping amount doesn't apply
|
4689 |
+
** onepage checkout recalculates shipping charges after setting the payment method (not solved yet in multishipping)
|
4690 |
+
** added warning about Carrier Calculated Shipping in Google Checkout system configuration
|
4691 |
+
** GC API callback now sets the payment method to quote on requests
|
4692 |
+
** the free shipping calculator now marks the entire address as "free shipping" if all its items have free shipping
|
4693 |
+
* Fixed On wide monitors checkbox "Create Permanent redirect" in admin backend wraps up to the end of input box
|
4694 |
+
* Fixed Tag isn't showed in Product Page and My account->My Tags, if tag are deleted by customer, approved by administrator, added by customer
|
4695 |
+
* Fixed Non standard images make troubles with "Next"/"Previous" buttons
|
4696 |
+
* Fixed There is no validation of the Tracking number field during first time creation of the shipment
|
4697 |
+
* Fixed Missed dollar sign in variable name
|
4698 |
+
* Fixed Incorrect escaping of Mage_Catalog_Model_Abstract::loadByAttribute method
|
4699 |
+
** Zend_DB_Select::where must get null values to skip quoting into $cond empty strings if value is null
|
4700 |
+
* Fixed "URL rewrites duplicating when assigning to root category"
|
4701 |
+
* Fixed Shipping method UPS_XML missing titles
|
4702 |
+
* Fixed The pager is missing for tagged product list
|
4703 |
+
* Fixed Report > Products Ordered ignores Store view switcher
|
4704 |
+
* Fixed Flat catalog index problem after upgrade with customizations present
|
4705 |
+
* Fixed Incorrect bundle items inventory decrements
|
4706 |
+
* Fixed Category and product design settings inheritance
|
4707 |
+
* Fixed Removed fatal error on removing non existent quote item from quote
|
4708 |
+
* Fixed Credit Card Maestro/Solo: The field "Start Date" is not displayed on order information page
|
4709 |
+
** deleted unused Maestro/Solo from Payment module config
|
4710 |
+
** moved Maestro/Switch and Solo card definition from Chronopay to Payment module config
|
4711 |
+
** deleted Meastro/Switch definition with incorrect code MS from Cybersource module config
|
4712 |
+
** fixed logic of showing "Issue number" and "Start Date" of Switch/Solo card on frontend
|
4713 |
+
* Added warning about offline refund
|
4714 |
+
* Fixed Mage_Checkout_Block_Cart_Item_Renderer::getIsInStock bug
|
4715 |
+
* Fixed Fatal on edit configurable product page, if custom required price attribute is used
|
4716 |
+
* Fixed #0011135: View invoice error with changed query string
|
4717 |
+
* Fixed Trailing semi-colon displayed on Profile Export page
|
4718 |
+
* Fixed New Orders & Other Authenticated RSS feeds should use HTTPS
|
4719 |
+
* Fixed Dataflow export products sku filter works as not "starts with", but "like"
|
4720 |
+
* Fixed Removed default shipping address assign on paypal express checkout
|
4721 |
+
* Fixed The customers from Puerto Rico can't pay with PayPal (Express Checkout in PaypalUk)
|
4722 |
+
* Fixed Shared shopping cart on the stores with different domains
|
4723 |
+
* Fixed Discount amount for the whole cart divide proportionally between all affected items according to their base price and then applied.
|
4724 |
+
* Fixed Removed store selector in single store mode on url rewrite edit page
|
4725 |
+
* Fixed Javascript validator's translation strings missing
|
4726 |
+
* Fixed Quick Search Autocomplete does not work via ajax http protocol for https page
|
4727 |
+
* Fixed Inventory->Qty Increments - unable to add
|
4728 |
+
* Fixed Loading search query performance issue
|
4729 |
+
* Fixed Changed labels in checkout and payment information blocs for credit cards Solo Maestro Switch
|
4730 |
+
* Fixed Product q-ty doesnt decrease after google checkout
|
4731 |
+
** added same 'checkout_submit_all_after' event to AmazonPayments
|
4732 |
+
** removed 'TODO' notice from Multishipping Checkout, because current scheme is better and will not be influenced by any Multishipping refactoring
|
4733 |
+
** fixed Observer reaction on 'checkout_submit_all_after' to include needed reindexing
|
4734 |
+
* Added checkout_multishipping_controller_success_action and checkout_onepage_controller_success_action events that pass the created order ids on frontend checkout success actions
|
4735 |
+
* Fixed Google Analytics tracking pages with wrong URI:
|
4736 |
+
** Completely reimplemented googleanalytics/ga block:
|
4737 |
+
*** it doesn't depend on session/quote, but just uses order_ids, if passed
|
4738 |
+
*** the page_name parameter is reimplemented as it was intended to be: an optional parameter that can be customized via layout for certain actions
|
4739 |
+
*** moved out the integration part with google checkout to observer
|
4740 |
+
*** eCommerce tracking passes shipping address instead of the billing address, if available
|
4741 |
+
*** replaced the "affiliation" into store frontend name in eCommerce tracking (as it is intended to be)
|
4742 |
+
*** eliminated passing order item "category" in eCommerce tracking (that never existed)
|
4743 |
+
*** optimized javascript code of GA with Google Checkout integration
|
4744 |
+
** Eliminated mutual code coupling between Google Analytics and Google Checkout modules
|
4745 |
+
** Improved integration of Google Analytics and Google Checkout:
|
4746 |
+
*** the GA integration should appear only when GC buttons are available
|
4747 |
+
*** there will be no integration when there is no GA tracking code configured
|
4748 |
+
*** the GA/GC integration seems like wasn't working because there was no pageTracker js variable accessible to the GC scripts
|
4749 |
+
* Fixed Wrong links in backend to "New Products/Low Stock/Customer reviews" RSS feeds
|
4750 |
+
* Fixed "Send auto-generated password" generates e-mail with incorrect template
|
4751 |
+
* Fixed Unable to refund Credit Memo because of Shipping Rounding
|
4752 |
+
* Fixed Added custom option info to recurring profile info page on frontend and backend.
|
4753 |
+
* Fixed Product Visibility and Status disappear when in search
|
4754 |
+
* Fixed Removed validation of new customer shipping address on backend for orders with virtual products only
|
4755 |
+
* Fixed ability to buy Product which have status "Out of Stock" through a direct link on button "Checkout with PayPal"
|
4756 |
+
* Fixed All free shipping methods in absent in Transfer Shipping Options menu on PayPal side
|
4757 |
+
* Fixed Payment methods titles for the PDF prints through admin gets from default config instead of the storeview config
|
4758 |
+
* Fixed PayPal and Puerto Rico shipping address
|
4759 |
+
* Fixed "Transfer Shipping Options" pass on PayPal side not correct value for Flat Rate method
|
4760 |
+
* Fixed Centinel JCB validation test cases 8-9
|
4761 |
+
* Fixed Saving caterory in store view scope
|
4762 |
+
* Fixed Attribute upgrades moved from 1.4.0.0.15 to 1.4.0.0.33
|
4763 |
+
* Fixed that product tagged by administrator has wrong URL at front-end
|
4764 |
+
* Fixed refusal from Card Verification (through link Exit), does not allow to place order repeatedly
|
4765 |
+
** If lookup was filed and customer tries again we will do new lookup.
|
4766 |
+
** If lookup was success and customer tries again without some changes we will not do new lookup
|
4767 |
+
** If authentication was filed and customer tries again we will do new lookup and authentication
|
4768 |
+
** If authentication was success and customer tries again without some changes we will not do new lookup and authentication
|
4769 |
+
* Fixed #22536: Light-weight email templates. Wishlist share email fix
|
4770 |
+
* Fixed declaration of Mage_Cybersource_Model_Api_ExtendedSoapClient::__doRequest() compatibility with SoapClient::__doRequest()
|
4771 |
+
* Fixed Two registration emails from a wrong store and without a logo are sent when a customer is created in Admin panel
|
4772 |
+
* Fixed Reindex for bundle products with date fields
|
4773 |
+
* Fixed Status is "Ready" instead to be "Reindex required" then creating new subcategory in mode "Manual Update"
|
4774 |
+
** index status changed to STATUS_REQUIRE_REINDEX when search engine changes
|
4775 |
+
* Fixed #23321: Wrong type casting in method
|
4776 |
+
* Fixed Print-All Includes Tracking # from All Shipments on Every Shipment
|
4777 |
+
* Fixed Ignored 'Include in Navigation Menu' category option with enabled flat catalog.
|
4778 |
+
* Fixed Admin unable to add Image through WYSIWYG to description and Short description without intermediate product saving
|
4779 |
+
* Fixed QTY decrement after multishipping
|
4780 |
+
* Double clicking adds product to cart twice
|
4781 |
+
* Fixed Catalog Price Rule(for NOT LOGGEN IN customers) is not applied for shopping cart and while checkout as guest or while first registration.
|
4782 |
+
* Fixed Payment methods titles for the PDF prints through admin gets from default config instead of the storeview config
|
4783 |
+
* Fixed Mage_Adminhtml_Model_System_Config_Backend_Serialized::_afterLoad() does not check input for unserialize()
|
4784 |
+
* Fixed Sending letters through "Contact Us" form, leads to error
|
4785 |
+
* Fixed PayPal Express with Flat Rate: incorrect counting Shipping amounts per order
|
4786 |
+
* Fixed Saving attribute value in store view scope only causes data loss.
|
4787 |
+
* Fixed #22607: Dispose of Mage_GiftRegistry module
|
4788 |
+
* Fixed Related products are not saved when you attach them to a product
|
4789 |
+
* Fixed Added qty to bundle unit price calculation to quote totals recalculating.
|
4790 |
+
* Fixed Saving category cause: 'Exception' with message 'File was not uploaded.' in /home/vadim.kusakin/dev/qa/2759/lib/Varien/File/Uploader.php:139
|
4791 |
+
* Fixed Fixed Magento Connect -> MCM -> If agreement checkbox is unchecked, "Continue" button should be disabled
|
4792 |
+
* Fixed Set the same column font size as in cells in PDF documents printing
|
4793 |
+
* Fixed Home page appears instead of predefined 404 page
|
4794 |
+
* Fixed Removed converting of "is one of" and "is not one of" values in decimal.
|
4795 |
+
* Fixed Wrong column type for order_increment_id on Invoice, Shipments, Creditmemo grids
|
4796 |
+
** order_increment_id was setted as "text" instead of "number" type
|
4797 |
+
* Fixed Inconsistency with credit memos showing buttons online vs offline
|
4798 |
+
* Fixed PayPal Express shortcut is missed on product page
|
4799 |
+
* Fixed An email is sent to a customer after its profile is edited in the Admin panel
|
4800 |
+
* Fixed that Payflow Pro includes only the first line of billing/shipping addresses into request
|
4801 |
+
* Fixed Incorrect showing of product page when inputing a product description with table which have attribute align = left
|
4802 |
+
* Fixed Wrong link for bestsellers in admin dashboard. Grids.php fixture doesn't do anything for this bug - just to beautify code.
|
4803 |
+
* Fixed Added fixes to reports - base_discount_amount is actually kept negative in DB.
|
4804 |
+
* Fixed Empty dropdown 'status' at the creation New Review Grid.
|
4805 |
+
* Fixed Incorrect work of "Recently Compared Products" functional on category's page
|
4806 |
+
* Fixed behavior when having single store, javascript raises exception and all followed code is not executed
|
4807 |
+
* Fixed that Special price for dynamic bundle applies twice
|
4808 |
+
* Fixed #21960: Labels in page/html_wrapper and core/text_list in layout
|
4809 |
+
* Fixed GUI bugs on Recurrent Profile frontend part
|
4810 |
+
* Fixed Magento Connect -> Message about invalid URL is duplicated
|
4811 |
+
* Fixed that suspend Recurring Profile from front side leads to error
|
4812 |
+
* Fixed Missing pager for tagged product list
|
4813 |
+
* Fixed Wrong profiler output for getUrl in Category
|
4814 |
+
* Fixed Saving of billing agreement relation with order - added force billing agreement re-saving and fixed isValid method in agreement detection.
|
4815 |
+
* Fixed Incorrect sort order reliable on mysql internal order during eav attribute load
|
4816 |
+
** move prepare select to separate method
|
4817 |
+
* Fixed passing additional totals to PayPal when cart line items are disabled:
|
4818 |
+
** simplified paypal/abstract api to just set the paypal/cart instance and the needed configuration settings
|
4819 |
+
** moved workarounds of setting shipping and discount totals as line items into the appropriate APIs: WPS and NVP
|
4820 |
+
* Fixed In My product Review short description HTML tags are shown
|
4821 |
+
* Fixed that Refund from google chekout don't display on the order in Magento
|
4822 |
+
* Fixed that "Compare Products" block does not appear on the category page and product page
|
4823 |
+
* Fixed Non-existing attribute's source model causes fatal error
|
4824 |
+
* Fixed Varien_Db_Select memory leak
|
4825 |
+
* Fixed #18569: Gift Messages not in OrderInfo returned array
|
4826 |
+
* Fixed PayPal API credentials wizard popup size
|
4827 |
+
* Fixed #11449: customer_id is mismatch with entity_id in customer.create
|
4828 |
+
* Fixed merging CSS-files with different skin domain to pick a proper base URL
|
4829 |
+
* Fixed Bad UI style on checkout success page
|
4830 |
+
* Fixed buying more than 1 virtual product in multishipping checkout
|
4831 |
+
* Fixed #22518: Wrong amount for second refund
|
4832 |
+
* Fixed #22776: Bug Causing Recursion Error
|
4833 |
+
* Fixed #22668: Incorrect reports for coupons
|
4834 |
+
* Fixed Products -> Product with "Out of stock" status displayed on frontend, but shouldn't
|
4835 |
+
* Fixed Password miss match for newly created in Back end customer
|
4836 |
+
* Fixed "There has been an error processing your request" page is displayed when specified order status is selected on Reports->Sales->Tax page
|
4837 |
+
* Fixed bug with 'Use Flat Catalog Category'
|
4838 |
+
* Fixed #13770, #16300, #21040 : Product Media Api Broken, product_media.create API overwrites image itself each upload, product_media.update API does not upgrade the image itself
|
4839 |
+
* Fixed #16306: Webservice with htaccess (changes in code style)
|
4840 |
+
* Fixed #22536: Light-weight email templates
|
4841 |
+
* Fixed #18935: Soap api v2 multiple complexFilters with the same key
|
4842 |
+
* Fixed incorrect Window titles on frontend
|
4843 |
+
* Fixed Eliminated display currency usage (instead of the base website currency) in shopping cart price rule conditions
|
4844 |
+
* Fixed #21146: Magento falls into the white screen when saving URL rewrite for a product on the Default Store View
|
4845 |
+
** corrected syntax mistakes
|
4846 |
+
* Fixed batch of issues related to google checkout:
|
4847 |
+
** Invoice don't create automatically with Google Checkout
|
4848 |
+
** Google checkout invoice duplication
|
4849 |
+
** Automatically authorize the buyer's credit card for the full amount of the order
|
4850 |
+
** Refund from google checkout don't display on the order in Magento
|
4851 |
+
** Google Chekout: Discount for shipping amount doesn't apply
|
4852 |
+
** Different order amount in Google checkout and Magento orders
|
4853 |
+
** Applying of discount for shipping, when using google checkout
|
4854 |
+
** Order is in google sandbox doesn't contain gift card
|
4855 |
+
* Fixed #23461: Wrong attribute value in catalog link widget XML
|
4856 |
+
* Fixed getting complete state for orders with zero grand total when processed
|
4857 |
+
* Added Store id param to billing agreement entity. Also fixed store setting in billing agreement payment method.
|
4858 |
+
* Fixed fatal error in payment method list fetching
|
4859 |
+
* Fixed #22575: Trace error during using filter "Products" on Tags page
|
4860 |
+
* Fixed Grids with settings remain active while disabled PayPal methods
|
4861 |
+
* Fixed configuration merger fatal error when store/website resource structure is inconsistent
|
4862 |
+
* Fixed PayPal admin setup: checkbox problem
|
4863 |
+
* Fixed Adding shipping address transferring on non guest checkout in Paypal Standard
|
4864 |
+
* Fixed "Save in address book" checkbox in the Shipping address area doesn't work while admin order creation
|
4865 |
+
* Fixed pre-selecting default address during checkout
|
4866 |
+
* Fixed Email with empty password is sent to a customer after an order is created in the Admin panel
|
4867 |
+
* Fixed Necessary to add data validation for filed "Trial Billing Frequency" in Recurring Profile
|
4868 |
+
* Fixed "Out of Stock" product is possible to purchase successfully through Shortcut button
|
4869 |
+
* Fixed phpdocs in lib/Varien and removed junk file
|
4870 |
+
* Fixed #21146: Magento falls into the white screen when saving URL rewrite for a product on the Default Store View
|
4871 |
+
* Fixed #21643: Fixed "wsdl" parameter validation for Soap V2
|
4872 |
+
** Changed class SoapServer with class Zend_Soap_server
|
4873 |
+
** Added ability to set response charset from admin panel: System->Configuration->Magento Core API
|
4874 |
+
* Fixed #21499: Default billing and shipping address
|
4875 |
+
* Fixed #21565: missing "comment" for salesOrderStatusHistoryEntity
|
4876 |
+
* Fixed #20481: Access Control List not retrieved for API user for resources() and resourceFaults() operations
|
4877 |
+
* Fixed #18367: FCGI Error on WSDL Url with Apache and mod_fastcgi
|
4878 |
+
* Fixed #22053: use HTTP 301 code instead of 302 in case of web/url/redirect_to_base
|
4879 |
+
* Fixed #20654: Admin order creation->Move mouse cursor isn't changed into hand while move it on some product for adding
|
4880 |
+
* Fixed #21590: Attribute 'Date': testing for uniqueness fields not working
|
4881 |
+
* Fixed #21566: Type of attribute 'Price': Possible to add text value for field 'default value'
|
4882 |
+
* Fixed #22053: added optional behavior (301 or 302)
|
4883 |
+
* Fixed #21570: Review from not logged in user is saved in list of All Reviews when "Allow guests to write reviews = No"
|
4884 |
+
* Fixed #22090: Different values of Qty Increments during create and after duplicate products
|
4885 |
+
* Fixed #22489: Eliminate difference between bundle.js in different skins
|
4886 |
+
* Fixed #22419: Set default stock_data if not exist in create/update product
|
4887 |
+
* Fixed #20227: "Review(x)" link should be added to the compare page.
|
4888 |
+
* Fixed #21570: Review from not logged in user is saved in list of All Reviews when "Allow guests to write reviews = No"
|
4889 |
+
* Fixed #20959: Locale problem in shipping tracking popup raises exception
|
4890 |
+
* Fixed #21955: Layout cache ignores product column count update
|
4891 |
+
* Fixed #20011: After using filter "Color" or "Manufacture" in Configurable Product meaning from column is disappear
|
4892 |
+
* Fixed #21908: Incorrect attribute ordering in "Compare products" page.
|
4893 |
+
* Fixed #22222: Edit review-> if browse stores in the "Visible In " drop-down, rating values reseted
|
4894 |
+
* Fixed #22075: Product Attribute title specified for StoreView isn't showing on the configurable product's page
|
4895 |
+
* Fixed #22605: catalog_category.level return root categories when website or store are null
|
4896 |
+
* Fixed #21806: Different values display on the shopping cart in front-end and back-end
|
4897 |
+
* Fixed #20113: Shipping address display as default on the front-end and as not default on admin for one customer
|
4898 |
+
* Fixed #22575: Trace error during using filter "Products" on Tags page
|
4899 |
+
** added 'filter_index' to array parameter in addColumn() method call
|
4900 |
+
* Fixed #14591: Incorrect SKU for Configurable Product with Custom Options
|
4901 |
+
* Fixed #22476: Blank Column in Related Products Grid
|
4902 |
+
** deleted duplicate <col> output for editable columns
|
4903 |
+
* Fixed #22575: Trace error during using filter "Products" on Tags page
|
4904 |
+
** apply filter_index field values to index
|
4905 |
+
* Fixed #22644: A discrepancy between GT(Base) and GT(Purchased)
|
4906 |
+
* Fixed #22645: Incorrect original price when using custom price in order.
|
4907 |
+
* Fixed #22653: Missed checking for file existence in JS/CSS merger
|
4908 |
+
** checking in source file exists. If not - do not check last modification and force to merge target file again
|
4909 |
+
* Fixed #22594: Unable to place orders through checkout with multiple addresses with PayPal direct + zero subtotal for one order
|
4910 |
+
* Fixed #21185: Newsletter confirmed automatically BEFORE account email is confirmed.
|
4911 |
+
* Fixed #22167: "Add new row" button in downloadable product
|
4912 |
+
* Fixed #21952: BUG - Category / Url Model (UYN-886991)
|
4913 |
+
* Fixed #15334, #17794
|
4914 |
+
** API category did not pass validation process due to available_sort_by must be ArrayOfString
|
4915 |
+
** Added category validation for backend (missed)
|
4916 |
+
** Creating separate validation for available_sort_by and default_sort_by attributes
|
4917 |
+
* Fixed #22599 Upgrade from 1.1.8 to 1.8.0.0 database compatibility issues (PARTIAL)
|
4918 |
+
* Fixed #22661: 1 cent bug
|
4919 |
+
* Fixed #22434: 100% discount of products -> the amounts of Tax and Grand Totals are or negative or not corectly
|
4920 |
+
* Fixed #10073: Unnecessary option for downloadable products
|
4921 |
+
* Fixed #20014: Qty use decimals for downloadable
|
4922 |
+
* Fixed #22164: Incorrect message for maximum shipping amount
|
4923 |
+
* Fixed #22174: Custom 'Qty to Refund' isn't remembered after message about incorrect amount
|
4924 |
+
* Fixed #22182: The value of 'Customer Since' field to duplicate clients at different sites.
|
4925 |
+
* Fixed #22243: Add new review by admin->type of this review is 'guest', but should be 'administrator'
|
4926 |
+
* Fixed #22313: Time of order creation if not displayed by the "Order Created At (datetime)" template variable.
|
4927 |
+
* Fixed #22348: "Add to card" button is absent for giftcard product in the catalog
|
4928 |
+
* Fixed #22640: Creating customer unable after adress tab manipulations
|
4929 |
+
* Fixed #22670: Credit memo - incorrect shipping price displaying
|
4930 |
+
* Fixed #22798: Excl and Inc. Tax don't display on the Estimate Shipping and Tax block
|
4931 |
+
* Fixed #20088: Admin able to push on-line refund button for the capture off-line invoice
|
4932 |
+
* Fixed #16306: Webservice with htaccess. Added server authorization (.htaccess)
|
4933 |
+
* Fixed #22266: HEADERS ALREADY SENT Error during dataflow import
|
4934 |
+
** Additionally: moveing layout update in separate layout file of dataflow module.
|
4935 |
+
* Fixed #21412: The "Save Attribute" and "Save and Continue Edit" buttons become disabled after saving attribute with attribute code that exists
|
4936 |
+
* Fixed #22844: After login to admin got 404 instead Startup Page
|
4937 |
+
* Fixed #22852: shopping cart price rule - search by ID - error page
|
4938 |
+
* Fixed #15897: Unsubscription Email Sender in the Newsletters Subscription Options is not working correctly
|
4939 |
+
* Fixed #15899: Newsletters subscription confirmation in not working
|
4940 |
+
* Fixed #22908: Grid Serializer doesn't handle dropdowns as edit columns
|
4941 |
+
* Fixed #22946: 'Products Tagged by Administrators' grid contains information about product that is assigned by the customer
|
4942 |
+
* Fixed #22935: Issue with Google AdWords and DSMM Code
|
4943 |
+
* Fixed #22910: view of system/design table with no records under IE 8
|
4944 |
+
* Fixed #22914: view of URL rewrite table with no records under IE 8
|
4945 |
+
* Fixed #22935: Issue with Google AdWords and DSMM Code
|
4946 |
+
* Fixed #22536: Light-weight email templates
|
4947 |
+
* Fixed #23017: Memcache session fallback does not work
|
4948 |
+
* Fixed #22992: Trace appears during create reorder from front-end
|
4949 |
+
* Fixed #22991: Cannot add items to shopping cart after active 'Use Flat Catalog Product'
|
4950 |
+
* Fixed #22813: Google base Undefined Offset when Managing attribute mapping
|
4951 |
+
* Fixed #23138: URL rewrite error on product creation
|
4952 |
+
* Added Regions for baltic states and Finland
|
4953 |
+
* Fixed #23092: Memcached and compiler
|
4954 |
+
* Fixed #19804: sorting/searching by "inventory" field
|
4955 |
+
* Fixed #23241: Catalog price rule not correctly appy for customer group
|
4956 |
+
* Fixed #16294: WSDL missing attributes for customerCustomerEntity
|
4957 |
+
* Fixed #22851: Used wrong resource model for api/user
|
4958 |
+
* Fixed #18207: SOAP-ERROR: Parsing Schema: can't import schema from 'http://schemas.xmlsoap.org/soap/encoding/'
|
4959 |
+
* Fixed Fatal error: Call to undefined function eaccelerator_fetch()
|
4960 |
+
|
4961 |
+
|
4962 |
+
==== 1.4.x-devel-83018 ====
|
4963 |
+
|
4964 |
+
== Fixes ==
|
4965 |
+
* Fixed Opening bestseller product (admin/dashboards) results in adding new product
|
4966 |
+
** fixed case when dashboard shows report for non-existing product (i.e. deleted one)
|
4967 |
+
* Fixed Bestsellers statistic bug
|
4968 |
+
** removed NULL values from statistic tables and changed foreign keys to cascade deleting stats for deleted products
|
4969 |
+
* Fixed Gift message displaying conditions not properly work on frontend and backend
|
4970 |
+
* Fixed QTY of product is incorrectly showed in Customer's Current Activities - Shopping Cart and Customer's Shopping Cart.
|
4971 |
+
* Fixed Gift message displaying conditions not properly work on frontend and backend - fixed missed bracked
|
4972 |
+
* Fixed Magento Connect Manager -> No warning message
|
4973 |
+
* Fixed Unable to upload community extention in Magento Connect Manager without Community Channel installed
|
4974 |
+
* Fixed Bundle product price calculated not correctly
|
4975 |
+
* Fixed Customer's email doesn't escalate to billing/shipping addresses
|
4976 |
+
** added copying email field from quote address to order address
|
4977 |
+
** added sending email to PayPal, when user's address doesn't contain email info
|
4978 |
+
|
4979 |
+
==== 1.4.x-devel-82478 ====
|
4980 |
+
|
4981 |
+
== Improvements ==
|
4982 |
+
* Added "Switch/Maestro" card type support to centinel 3DS validator. Added comment about maestro and 3d-secure to paypal system config
|
4983 |
+
* Added more flexible filters implementation in collections:
|
4984 |
+
** Varien_Data_Collection::addFilter() registers filters as objects and implements getFilter() method to be able to detect/modify already existing filters
|
4985 |
+
** Varien_Data_Collection_Db::_renderFilters():
|
4986 |
+
*** Added a hook _renderFiltersBefore()
|
4987 |
+
*** Implemented 'public' filter type, which maps the provided filter field from public into internal view and passes the "value" as a condition through _getConditionSql()
|
4988 |
+
** Added $this->_renderFilters() call to abstract EAV collection to accommodate the filters that may be set by addFilter() method
|
4989 |
+
* Added ability to pass multiple recipient emails and names to Mage_Core_Model_Email_Template::send()
|
4990 |
+
|
4991 |
+
== Changes ==
|
4992 |
+
* Refactored shipping rates calculation to keep process solid and do not try to recreate internal process of calculation, as it was
|
4993 |
+
* Added caching of requests to shipping carriers, because otherwise we get too much duplicate requests during calculation of every shipping method
|
4994 |
+
* Refactored "Special products" RSS feeed
|
4995 |
+
|
4996 |
+
== Fixes ==
|
4997 |
+
* Fixed Catalog-specific attribute options do not load when using through catalog/output helper
|
4998 |
+
** method _getLoadDataFields at product attribute resource collection modified to select additional needed fields;
|
4999 |
+
* Fixed saving attribute value in store view scope only
|
5000 |
+
* Fixed Not searchable attributes are searched by Quick search.
|
5001 |
+
* Fixed Customers won't appear in the search results on the customer grid in the admin
|
5002 |
+
* Fixed Huge memory consumption on flat shipping rates import
|
5003 |
+
** decrease to 5000 count of data wich inserts into DB in one iterate, to avoid exceed of 128M memory_limit
|
5004 |
+
* Fixed Config fields "Disable output" doesn't implement inherited value
|
5005 |
+
* Fixed Category created for some store view not displayed on frontend
|
5006 |
+
** include_in_menu attribute was made as required to set default value when category created in specified store
|
5007 |
+
* Fixed creating of "Shopping Cart Price Rule'
|
5008 |
+
** setActualProductAttributes method was called with 'attribute_set_id' value in $attributes param. But it does not exist in 'eav/attribute' table. So we need to check it
|
5009 |
+
* Fixed PayPal PE transaction_id detection: Overrided getPaypalTransactionId method in PE API - changed transaction id getting to process payflow accounts not assigned to paypal side
|
5010 |
+
* Fixed Configurable Product Catalog Price Rule Issue: the main idea is to calculate price rule on configurable price separately from base price
|
5011 |
+
* Fixed fatal error during import large file
|
5012 |
+
* Fixed Shipping information is not displayed in backend after Google Checkout operations
|
5013 |
+
* Fixed Field Mapping Issue during customer import
|
5014 |
+
* Fixed CMS blocks grid inoperable with store filter in GWS-limited mode
|
5015 |
+
* Fixed incorrect qty increment behaviour
|
5016 |
+
** qty increment not decimal validate
|
5017 |
+
** when adding product with qty increment to cart - redirect to product's page
|
5018 |
+
** generate message about mismatch of qty increment when editing item qty at cart
|
5019 |
+
* Fixed ups/usps and Guam
|
5020 |
+
* Fidex issues with attaching product to multiple stores: refresh product index query update
|
5021 |
+
* Fixed displaying of bundle product weight
|
5022 |
+
* Fixed "Select a PayPal Solution" checkbox bug: Website Payments Pro and Website Payments Pro Payflow Edition consider each other status in their checkboxes control logic
|
5023 |
+
* Fixed Invoice Comments Stripped When Quantities Updated
|
5024 |
+
* Fixed XSS security issue on frontend
|
5025 |
+
|
5026 |
+
==== 1.4.x-devel-81496 ====
|
5027 |
+
|
5028 |
+
== Improvements ==
|
5029 |
+
* Backordered Item Status for subitems in Orders
|
5030 |
+
** Added correct message at order for all backordered items. At back-end all items shows as backordered if their quantity is below or equal to zero
|
5031 |
+
** Fix of duplication backorder messages for composite product options with same backordered item - saving backorder messages per product id
|
5032 |
+
* Magento Connect Manager
|
5033 |
+
** checking cyclic dependency references and conflicts with local files
|
5034 |
+
** implemented adding to MCM manually installed extension
|
5035 |
+
** changed upgrade logic, previous version of package should be deleted before install new
|
5036 |
+
** Implemented new download process and dependencies rules
|
5037 |
+
** Added correct behavior during extension reinstall, so dependencies will not reinstall automatically
|
5038 |
+
|
5039 |
+
== Changes ==
|
5040 |
+
* Shortened the names of all foreign keys longer than 49 characters
|
5041 |
+
|
5042 |
+
== Fixes ==
|
5043 |
+
* Fixed Google Chekout: Discount for shipping amount doesn't apply
|
5044 |
+
* Fixed XSS issue in address form
|
5045 |
+
* Fixed Address in the customers address book cannot be deleted
|
5046 |
+
* Fixed CatalogSearch_Fulltext not being renewed for configurable products when editing attached simple products
|
5047 |
+
* Fixed Google Checkout: shipping method info is empty at order page in admin backend
|
5048 |
+
* Fixed Google Checkout: with discounted shipping - discount is applied again
|
5049 |
+
* Fixed Wrong timezone/DST in reports
|
5050 |
+
* Fixed coupon_code attribute inconsistency in some upgrade paths (from 1.4.0.0 to 1.4.1.0)
|
5051 |
+
* Fixed Created extension archive through Magento Connect include ".svn" directories
|
5052 |
+
* Fixed version of downloader
|
5053 |
+
* Fixed Magento Connect: User should has a possibility to choose version for extension upgrade
|
5054 |
+
* Fixed Magento Connect: User shouldn't be able to download Magento into "0000 permissions" folders
|
5055 |
+
* Fixed Magento Connect: JS validation is absent for "Authors" tab on package extensions page
|
5056 |
+
* Fixed Magento Connect: Saving information on settings page
|
5057 |
+
* Fixed Magento Connect: "Configuration" step - server validation is absent during installation
|
5058 |
+
* Fixed Magento Connect: "Log in" page - Message or some information about required fields doesn't appeared
|
5059 |
+
* Fixed Magento Connect: "Configuration" step - incorrect message appeared during installation
|
5060 |
+
* Fixed wrong shipping price in case of sales rule with fixed cart discount and 1 item in cart
|
5061 |
+
* Fixed the label for the configurable product attribute does not reflect correctly on the frontend
|
5062 |
+
* Fixed sales rule with fixed discount for whole cart doesn't work
|
5063 |
+
|
5064 |
+
==== 1.4.x-devel-80991 ====
|
5065 |
+
|
5066 |
+
== Improvements ==
|
5067 |
+
* Optimized rewrite selection from DB, added url rewrite and suffix validation at admin backend
|
5068 |
+
* Added verification of access level for app/etc/local.xml.
|
5069 |
+
** Now if server configuration has issue and this file accessible from browser admin user gets notification in backend.
|
5070 |
+
|
5071 |
+
== Changes ==
|
5072 |
+
* Compilation scope for some EAV models which was causing blank page after enabling compilation
|
5073 |
+
|
5074 |
+
== Fixes ==
|
5075 |
+
* Fixed "Slash for category or product urls causes error 404"
|
5076 |
+
* Fixed Shared shopping cart on the stores with different domains
|
5077 |
+
** check origin url in all store urls
|
5078 |
+
** prevent to getting SID param from current query
|
5079 |
+
* Fixed #18454: Import profiles do not reset websites values
|
5080 |
+
* Fixed Issue with zero grand total express checkout for recurring products.
|
5081 |
+
* Fixed "Allow Gift message" setting on the product page doesn't work in Front.
|
5082 |
+
* Fixed "Duplicate" of bundle product leads to an error
|
5083 |
+
* Fixed Catalog sitemap for categories shows inactive sub categories if flat catalog enabled
|
5084 |
+
* Fixed Added support of all product attributes in conditions/actions of salesRules.
|
5085 |
+
* Fixed Disabling product attribute usage in promo rules not affect existing promo rules
|
5086 |
+
* Fixed "Cart Price Rule not working with Product Attributes" (boolean values not properly shown in rule conditions)
|
5087 |
+
* Fixed Wrong amounts invoiced with FPT
|
5088 |
+
* Fixed Wrong order status after refund and additional related issue on frontend during checkout
|
5089 |
+
* Fixed Unable to delete uploaded sample for downloadable product
|
5090 |
+
* Fixed Paypal Direct send wrong billing address to API
|
5091 |
+
* Fixed Incorrect viewing of category settings after refreshing page
|
5092 |
+
* Fixed Catalog price rule discount not working during backend order creation
|
5093 |
+
* Fixed Double headers for session cookie set
|
5094 |
+
|
5095 |
+
==== 1.4.x-devel-80262 ====
|
5096 |
+
|
5097 |
+
== Improvements ==
|
5098 |
+
* Upgraded Zend Framework to version 1.10.8
|
5099 |
+
* Added the Recurring Profiles tab in customer management
|
5100 |
+
|
5101 |
+
== Changes ==
|
5102 |
+
* Deleted Mage_Sales_Model_Recurring_Profile_Info, which was not on its place and added accidentally
|
5103 |
+
* Category and product design settings inheritance logic
|
5104 |
+
|
5105 |
+
== Fixes ==
|
5106 |
+
* Fixed Custom design is not reset properly after shipment comment emails
|
5107 |
+
* Fixed Tax report displays incorrect figures
|
5108 |
+
* Fixed Removed invoice creation on "completed" IPN message with payment_entity = "auth" to prevent double capture creation on single transaction with IPR.
|
5109 |
+
* Fixed Image browser in WYSIWYG editor doesn't fill mouse over/out fields
|
5110 |
+
* Fixed Added rounding to "Refund Shipping" field on credit memo creation page.
|
5111 |
+
* Fixed Added additional error messages to customer address validation on PHP side while creating.
|
5112 |
+
* Fixed "No server side check for password length when customer edits his account information"
|
5113 |
+
** Also added proper processing for password == '0', earlier it was considered as non-set password
|
5114 |
+
* Fixed WYSIWYG editor breaks directives that are not in src attribute
|
5115 |
+
* fixed directives decoding for a case when the secret key is present in URLs
|
5116 |
+
* Fixed Duplicate of a product creates it with no SKU value and is saved
|
5117 |
+
* Fixed Redundant catalog product attribute "category_ids" remains during upgrade from 1.3 to 1.4
|
5118 |
+
* Fixed Reports/Shopping cart/Products in carts optimization
|
5119 |
+
* Fixed "If all Storeviews value set up - disabled --> Front end shows default storeview instead of 404 page"
|
5120 |
+
* Fixed Added error on zero subtotal checkout with paypal express. Removed paypal express button on shopping cart with zero grand total.
|
5121 |
+
* Fixed Field labels and field values are not aligned vertically on Sales Orders in Admin
|
5122 |
+
* Fixed Spacing between field labels and field values is inappropriate on the Recurring Profiles tab in My Account section
|
5123 |
+
* Fixed Not searchable attributes are searched by Quick search.
|
5124 |
+
** Checking if attribute used in quick search before adding to fulltext field
|
5125 |
+
* Fixed Mage_Customer_Model_Customer::getGroupId can't return zero value
|
5126 |
+
* Fixed #23184: Huge memory consumption on flat shipping rates import
|
5127 |
+
* Optimized and refactored Table Rate import
|
5128 |
+
* Fixed Scrolling during category load results in some js-errors
|
5129 |
+
* Fixed "Javascript alert on "manage category" page"
|
5130 |
+
* Fixed Security Vulnerability on Mage_Core_Block_Template level
|
5131 |
+
* Fixed Merged CSS breaks Secure Pages (https)
|
5132 |
+
|
5133 |
+
==== 1.4.x-devel-79607 ====
|
5134 |
+
|
5135 |
+
== Improvements ==
|
5136 |
+
* Implemented cache for shipping rates and fixing issues with rounding
|
5137 |
+
|
5138 |
+
== Changes ==
|
5139 |
+
* Refactored one routine in Inventory Observer to remove code duplication
|
5140 |
+
* Disabling product attribute usage in promo rules not affect existing promo rules
|
5141 |
+
|
5142 |
+
== Fixes ==
|
5143 |
+
* Fixed SOAP webservices do not work when enabling "Add Store Code to URLs"
|
5144 |
+
* Fixed Incorrect displaying of the Start Date entered by customer while adding to the cart recurring product
|
5145 |
+
* Fixed Downloadable Product "lable" typo
|
5146 |
+
* Fixed While creating gift message from backend it disappears in case of refreshing page
|
5147 |
+
* Fixed Product export fails when the quantity of exported products is 25 000 or more (memory leak in products)
|
5148 |
+
* Fixed While creating gift message from backend it disappears in case of refreshing page
|
5149 |
+
* Fixed Google Chekout: Discount for shipping amount doesn't apply
|
5150 |
+
** onepage checkout recalculates shipping charges after setting the payment method (not solved yet in multishipping)
|
5151 |
+
** added warning about Carrier Calculated Shipping in Google Checkout system configuration
|
5152 |
+
** GC API callback now sets the payment method to quote on requests
|
5153 |
+
** the free shipping calculator now marks the entire address as "free shipping" if all its items have free shipping
|
5154 |
+
* Fixed On wide monitors checkbox "Create Permanent redirect" in admin backend wraps up to the end of input box
|
5155 |
+
* Fixed Tag isn't showed in Product Page and My account->My Tags, if tag are deleted by customer, approved by administrator, added by customer
|
5156 |
+
* Fixed Non standard images make troubles with "Next"/"Previous" buttons
|
5157 |
+
* Fixed There is no validation of the Tracking number field during first time creation of the shipment
|
5158 |
+
* Fixed Missed dollar sign in variable name
|
5159 |
+
* Fixed Incorrect escaping of Mage_Catalog_Model_Abstract::loadByAttribute method
|
5160 |
+
** Zend_DB_Select::where must get null values to skip quoting into $cond empty strings if value is null
|
5161 |
+
* Fixed "URL rewrites duplicating when assigning to root category"
|
5162 |
+
* Fixed Shipping method UPS_XML missing titles
|
5163 |
+
* Fixed The pager is missing for tagged product list
|
5164 |
+
* Fixed Report > Products Ordered ignores Store view switcher
|
5165 |
+
* Fixed Flat catalog index problem after upgrade with customizations present
|
5166 |
+
* Fixed Incorrect bundle items inventory decrements
|
5167 |
+
* Fixed Category and product design settings inheritance
|
5168 |
+
* Fixed Removed fatal error on removing non existent quote item from quote
|
5169 |
+
* Fixed Credit Card Maestro/Solo: The field "Start Date" is not displayed on order information page
|
5170 |
+
** deleted unused Maestro/Solo from Payment module config
|
5171 |
+
** moved Maestro/Switch and Solo card definition from Chronopay to Payment module config
|
5172 |
+
** deleted Meastro/Switch definition with incorrect code MS from Cybersource module config
|
5173 |
+
** fixed logic of showing "Issue number" and "Start Date" of Switch/Solo card on frontend
|
5174 |
+
* Added warning about offline refund
|
5175 |
+
* Fixed Mage_Checkout_Block_Cart_Item_Renderer::getIsInStock bug
|
5176 |
+
* Fixed Fatal on edit configurable product page, if custom required price attribute is used
|
5177 |
+
* Fixed #0011135: View invoice error with changed query string
|
5178 |
+
* Fixed Trailing semi-colon displayed on Profile Export page
|
5179 |
+
* Fixed New Orders & Other Authenticated RSS feeds should use HTTPS
|
5180 |
+
* Fixed Dataflow export products sku filter works as not "starts with", but "like"
|
5181 |
+
* Fixed Removed default shipping address assign on paypal express checkout
|
5182 |
+
* Fixed The customers from Puerto Rico can't pay with PayPal (Express Checkout in PaypalUk)
|
5183 |
+
* Fixed Shared shopping cart on the stores with different domains
|
5184 |
+
* Fixed Discount amount for the whole cart divide proportionally between all affected items according to their base price and then applied.
|
5185 |
+
* Fixed Removed store selector in single store mode on url rewrite edit page
|
5186 |
+
* Fixed Javascript validator's translation strings missing
|
5187 |
+
* Fixed Quick Search Autocomplete does not work via ajax http protocol for https page
|
5188 |
+
* Fixed Inventory->Qty Increments - unable to add
|
5189 |
+
* Fixed Loading search query performance issue
|
5190 |
+
* Fixed Changed labels in checkout and payment information blocs for credit cards Solo Maestro Switch
|
5191 |
+
* Fixed Product q-ty doesnt decrease after google checkout
|
5192 |
+
** added same 'checkout_submit_all_after' event to AmazonPayments
|
5193 |
+
** removed 'TODO' notice from Multishipping Checkout, because current scheme is better and will not be influenced by any Multishipping refactoring
|
5194 |
+
** fixed Observer reaction on 'checkout_submit_all_after' to include needed reindexing
|
5195 |
+
* Added checkout_multishipping_controller_success_action and checkout_onepage_controller_success_action events that pass the created order ids on frontend checkout success actions
|
5196 |
+
* Fixed Google Analytics tracking pages with wrong URI:
|
5197 |
+
** Completely reimplemented googleanalytics/ga block:
|
5198 |
+
*** it doesn't depend on session/quote, but just uses order_ids, if passed
|
5199 |
+
*** the page_name parameter is reimplemented as it was intended to be: an optional parameter that can be customized via layout for certain actions
|
5200 |
+
*** moved out the integration part with google checkout to observer
|
5201 |
+
*** eCommerce tracking passes shipping address instead of the billing address, if available
|
5202 |
+
*** replaced the "affiliation" into store frontend name in eCommerce tracking (as it is intended to be)
|
5203 |
+
*** eliminated passing order item "category" in eCommerce tracking (that never existed)
|
5204 |
+
*** optimized javascript code of GA with Google Checkout integration
|
5205 |
+
** Eliminated mutual code coupling between Google Analytics and Google Checkout modules
|
5206 |
+
** Improved integration of Google Analytics and Google Checkout:
|
5207 |
+
*** the GA integration should appear only when GC buttons are available
|
5208 |
+
*** there will be no integration when there is no GA tracking code configured
|
5209 |
+
*** the GA/GC integration seems like wasn't working because there was no pageTracker js variable accessible to the GC scripts
|
5210 |
+
* Fixed Wrong links in backend to "New Products/Low Stock/Customer reviews" RSS feeds
|
5211 |
+
* Fixed "Send auto-generated password" generates e-mail with incorrect template
|
5212 |
+
* Fixed Unable to refund Credit Memo because of Shipping Rounding
|
5213 |
+
* Fixed Added custom option info to recurring profile info page on frontend and backend.
|
5214 |
+
* Fixed Product Visibility and Status disappear when in search
|
5215 |
+
* Fixed Removed validation of new customer shipping address on backend for orders with virtual products only
|
5216 |
+
|
5217 |
+
|
5218 |
+
==== 1.4.x-devel-78617 ====
|
5219 |
+
|
5220 |
+
== Improvements ==
|
5221 |
+
* Design packages and themes optimization/refactoring/improvements:
|
5222 |
+
** minor improvements and fixes
|
5223 |
+
** improved upgrade-ability of CE themes
|
5224 |
+
* iPhone Theme Refactoring
|
5225 |
+
* Added Widget settings sharing between widget types
|
5226 |
+
* For Invoices, Shipment, Credit Memos added possibility to show admin comments at user frontend (checkboxes "Visible on Frontend" in admin interface)
|
5227 |
+
** Added JS to enables/disable checkbox 'Append Comments' depending on checkbox 'Email Order Confirmation'
|
5228 |
+
** Refactored invoice/shipment/refund comments collections models to one abstract Comment Collection Model
|
5229 |
+
** Refactored Block Order Invoice/Shipment/Creditmemo comments to usage of common block and design - Block Order Comments
|
5230 |
+
* A little more accurate profiler - important for very quick measurements
|
5231 |
+
* Add Shopping Cart API
|
5232 |
+
* Implementing payment refund notifications
|
5233 |
+
* Added website price scope for bundle items
|
5234 |
+
* Added support of pending transaction to payflow pro. Also fixed "denied payment review" message in payment
|
5235 |
+
|
5236 |
+
== Changes ==
|
5237 |
+
* Refactoring validation states for Centinel
|
5238 |
+
** Added template method Mage_Centinel_Model_StateAbstract::isLookupSuccessful
|
5239 |
+
* Add boolean type for catalog price rules and condition for category_ids
|
5240 |
+
* Removed Maestro/Switch/Solo card from system. Added Maestro/Switch and Solo cards to Chronopay and Cybersource methods
|
5241 |
+
* Mage_Adminhtml_Block_Sales_Order_Creditmemo block had dependence from 'canCapture' 'canCapturePartial'. It was changed to 'canRefund' 'canRefundPartialPerInvoice'. For set result of Mage_Adminhtml_Block_Sales_Items_Abstract::CanEditQty`s we can use setCanEditQty
|
5242 |
+
* Added Maestro/Switch and Solo Dollars card types for paypal_direct payment method. Also removed Maestro/Solo/Switch card type for this method
|
5243 |
+
* Removed "Shipping address" block on recurring profile view page if product is virtual. Also fixed virtual order detection
|
5244 |
+
* Refactored PayPal cart line items and cart totals calculation to accommodate various discounts and tax settings
|
5245 |
+
** added hidden discount and hidden shipping taxes to the calculation
|
5246 |
+
** eliminated cart line items logic from the helper, moved it to the paypal/cart model
|
5247 |
+
** simplified transferring of the totals and line items to PayPal API objects
|
5248 |
+
* Refactored sales rule discount detection on "buy_x_get_y" rule type
|
5249 |
+
* Added catalog_product table definition to product review collection
|
5250 |
+
* Changed type of obscure input field to 'password', so this field is hidden even when user enters data in it
|
5251 |
+
* Removed dependence to payment method on getting billing agreement method title. For now payment method title stored in billing agreement
|
5252 |
+
* Removed invoice creation thought zero subtotal checkout with new order status "pending"
|
5253 |
+
|
5254 |
+
== Fixes ==
|
5255 |
+
* Fixed ability to buy Product which have status "Out of Stock" through a direct link on button "Checkout with PayPal"
|
5256 |
+
* Fixed All free shipping methods in absent in Transfer Shipping Options menu on PayPal side
|
5257 |
+
* Fixed Payment methods titles for the PDF prints through admin gets from default config instead of the storeview config
|
5258 |
+
* Fixed PayPal and Puerto Rico shipping address
|
5259 |
+
* Fixed "Transfer Shipping Options" pass on PayPal side not correct value for Flat Rate method
|
5260 |
+
* Fixed Centinel JCB validation test cases 8-9
|
5261 |
+
* Fixed Saving caterory in store view scope
|
5262 |
+
* Fixed Attribute upgrades moved from 1.4.0.0.15 to 1.4.0.0.33
|
5263 |
+
* Fixed that product tagged by administrator has wrong URL at front-end
|
5264 |
+
* Fixed refusal from Card Verification (through link Exit), does not allow to place order repeatedly
|
5265 |
+
** If lookup was filed and customer tries again we will do new lookup.
|
5266 |
+
** If lookup was success and customer tries again without some changes we will not do new lookup
|
5267 |
+
** If authentication was filed and customer tries again we will do new lookup and authentication
|
5268 |
+
** If authentication was success and customer tries again without some changes we will not do new lookup and authentication
|
5269 |
+
* Fixed #22536: Light-weight email templates. Wishlist share email fix
|
5270 |
+
* Fixed declaration of Mage_Cybersource_Model_Api_ExtendedSoapClient::__doRequest() compatibility with SoapClient::__doRequest()
|
5271 |
+
* Fixed Two registration emails from a wrong store and without a logo are sent when a customer is created in Admin panel
|
5272 |
+
* Fixed Reindex for bundle products with date fields
|
5273 |
+
* Fixed Status is "Ready" instead to be "Reindex required" then creating new subcategory in mode "Manual Update"
|
5274 |
+
** index status changed to STATUS_REQUIRE_REINDEX when search engine changes
|
5275 |
+
* Fixed #23321: Wrong type casting in method
|
5276 |
+
* Fixed Print-All Includes Tracking # from All Shipments on Every Shipment
|
5277 |
+
* Fixed Ignored 'Include in Navigation Menu' category option with enabled flat catalog.
|
5278 |
+
* Fixed Admin unable to add Image through WYSIWYG to description and Short description without intermediate product saving
|
5279 |
+
* Fixed QTY decrement after multishipping
|
5280 |
+
* Double clicking adds product to cart twice
|
5281 |
+
* Fixed Catalog Price Rule(for NOT LOGGEN IN customers) is not applied for shopping cart and while checkout as guest or while first registration.
|
5282 |
+
* Fixed Payment methods titles for the PDF prints through admin gets from default config instead of the storeview config
|
5283 |
+
* Fixed Mage_Adminhtml_Model_System_Config_Backend_Serialized::_afterLoad() does not check input for unserialize()
|
5284 |
+
* Fixed Sending letters through "Contact Us" form, leads to error
|
5285 |
+
* Fixed PayPal Express with Flat Rate: incorrect counting Shipping amounts per order
|
5286 |
+
* Fixed Saving attribute value in store view scope only causes data loss.
|
5287 |
+
* Fixed #22607: Dispose of Mage_GiftRegistry module
|
5288 |
+
* Fixed Related products are not saved when you attach them to a product
|
5289 |
+
* Fixed Added qty to bundle unit price calculation to quote totals recalculating.
|
5290 |
+
* Fixed Saving category cause: 'Exception' with message 'File was not uploaded.' in /home/vadim.kusakin/dev/qa/2759/lib/Varien/File/Uploader.php:139
|
5291 |
+
* Fixed Fixed Magento Connect -> MCM -> If agreement checkbox is unchecked, "Continue" button should be disabled
|
5292 |
+
* Fixed Set the same column font size as in cells in PDF documents printing
|
5293 |
+
* Fixed Home page appears instead of predefined 404 page
|
5294 |
+
* Fixed Removed converting of "is one of" and "is not one of" values in decimal.
|
5295 |
+
* Fixed Wrong column type for order_increment_id on Invoice, Shipments, Creditmemo grids
|
5296 |
+
** order_increment_id was setted as "text" instead of "number" type
|
5297 |
+
* Fixed Inconsistency with credit memos showing buttons online vs offline
|
5298 |
+
* Fixed PayPal Express shortcut is missed on product page
|
5299 |
+
* Fixed An email is sent to a customer after its profile is edited in the Admin panel
|
5300 |
+
* Fixed that Payflow Pro includes only the first line of billing/shipping addresses into request
|
5301 |
+
* Fixed Incorrect showing of product page when inputing a product description with table which have attribute align = left
|
5302 |
+
* Fixed Wrong link for bestsellers in admin dashboard. Grids.php fixture doesn't do anything for this bug - just to beautify code.
|
5303 |
+
* Fixed Added fixes to reports - base_discount_amount is actually kept negative in DB.
|
5304 |
+
* Fixed Empty dropdown 'status' at the creation New Review Grid.
|
5305 |
+
* Fixed Incorrect work of "Recently Compared Products" functional on category's page
|
5306 |
+
* Fixed behavior when having single store, javascript raises exception and all followed code is not executed
|
5307 |
+
* Fixed that Special price for dynamic bundle applies twice
|
5308 |
+
* Fixed #21960: Labels in page/html_wrapper and core/text_list in layout
|
5309 |
+
* Fixed GUI bugs on Recurrent Profile frontend part
|
5310 |
+
* Fixed Magento Connect -> Message about invalid URL is duplicated
|
5311 |
+
* Fixed that suspend Recurring Profile from front side leads to error
|
5312 |
+
* Fixed Missing pager for tagged product list
|
5313 |
+
* Fixed Wrong profiler output for getUrl in Category
|
5314 |
+
* Fixed Saving of billing agreement relation with order - added force billing agreement re-saving and fixed isValid method in agreement detection.
|
5315 |
+
* Fixed Incorrect sort order reliable on mysql internal order during eav attribute load
|
5316 |
+
** move prepare select to separate method
|
5317 |
+
* Fixed passing additional totals to PayPal when cart line items are disabled:
|
5318 |
+
** simplified paypal/abstract api to just set the paypal/cart instance and the needed configuration settings
|
5319 |
+
** moved workarounds of setting shipping and discount totals as line items into the appropriate APIs: WPS and NVP
|
5320 |
+
* Fixed In My product Review short description HTML tags are shown
|
5321 |
+
* Fixed that Refund from google chekout don't display on the order in Magento
|
5322 |
+
* Fixed that "Compare Products" block does not appear on the category page and product page
|
5323 |
+
* Fixed Non-existing attribute's source model causes fatal error
|
5324 |
+
* Fixed Varien_Db_Select memory leak
|
5325 |
+
|
5326 |
+
|
5327 |
+
==== 1.4.x-devel-77975 ====
|
5328 |
+
|
5329 |
+
== Improvements ==
|
5330 |
+
* Upgraded Zend Framework to version 1.10.5
|
5331 |
+
* Upgraded TinyMCE to v.3.3.7
|
5332 |
+
* Added to prototype validation by length min-length validation
|
5333 |
+
* Added Varien.DateElement for front-end date form fields and re-implemented Varien.DOB
|
5334 |
+
* Added functionality to disable dashboard charts in backend (System > Configuration > Admin > Dashboard)
|
5335 |
+
* Added functionality to disable dashboard charts during installation
|
5336 |
+
* Adminhtml W3C Validation improvements
|
5337 |
+
* Added ability to use session save method from configuration
|
5338 |
+
|
5339 |
+
== Changes ==
|
5340 |
+
* Removed SID from url generation when Use SID on Frontend option is disabled
|
5341 |
+
* Added customer session validation for loadCustomerQuote method
|
5342 |
+
* Iphone clears.css has been deleted
|
5343 |
+
|
5344 |
+
== Fixes ==
|
5345 |
+
* Fixed #18569: Gift Messages not in OrderInfo returned array
|
5346 |
+
* Fixed PayPal API credentials wizard popup size
|
5347 |
+
* Fixed #11449: customer_id is mismatch with entity_id in customer.create
|
5348 |
+
* Fixed merging CSS-files with different skin domain to pick a proper base URL
|
5349 |
+
* Fixed Bad UI style on checkout success page
|
5350 |
+
* Fixed buying more than 1 virtual product in multishipping checkout
|
5351 |
+
* Fixed #22518: Wrong amount for second refund
|
5352 |
+
* Fixed #22776: Bug Causing Recursion Error
|
5353 |
+
* Fixed #22668: Incorrect reports for coupons
|
5354 |
+
* Fixed Products -> Product with "Out of stock" status displayed on frontend, but shouldn't
|
5355 |
+
* Fixed Password miss match for newly created in Back end customer
|
5356 |
+
* Fixed "There has been an error processing your request" page is displayed when specified order status is selected on Reports->Sales->Tax page
|
5357 |
+
* Fixed bug with 'Use Flat Catalog Category'
|
5358 |
+
* Fixed #13770, #16300, #21040 : Product Media Api Broken, product_media.create API overwrites image itself each upload, product_media.update API does not upgrade the image itself
|
5359 |
+
* Fixed #16306: Webservice with htaccess (changes in code style)
|
5360 |
+
* Fixed #22536: Light-weight email templates
|
5361 |
+
* Fixed #18935: Soap api v2 multiple complexFilters with the same key
|
5362 |
+
* Fixed incorrect Window titles on frontend
|
5363 |
+
* Fixed Eliminated display currency usage (instead of the base website currency) in shopping cart price rule conditions
|
5364 |
+
* Fixed #21146: Magento falls into the white screen when saving URL rewrite for a product on the Default Store View
|
5365 |
+
** corrected syntax mistakes
|
5366 |
+
* Fixed batch of issues related to google checkout:
|
5367 |
+
** Invoice don't create automatically with Google Checkout
|
5368 |
+
** Google checkout invoice duplication
|
5369 |
+
** Automatically authorize the buyer's credit card for the full amount of the order
|
5370 |
+
** Refund from google checkout don't display on the order in Magento
|
5371 |
+
** Google Chekout: Discount for shipping amount doesn't apply
|
5372 |
+
** Different order amount in Google checkout and Magento orders
|
5373 |
+
** Applying of discount for shipping, when using google checkout
|
5374 |
+
** Order is in google sandbox doesn't contain gift card
|
5375 |
+
* Fixed #23461: Wrong attribute value in catalog link widget XML
|
5376 |
+
* Fixed getting complete state for orders with zero grand total when processed
|
5377 |
+
* Added Store id param to billing agreement entity. Also fixed store setting in billing agreement payment method.
|
5378 |
+
* Fixed #22575: Trace error during using filter "Products" on Tags page
|
5379 |
+
* Fixed Grids with settings remain active while disabled PayPal methods
|
5380 |
+
* Fixed configuration merger fatal error when store/website resource structure is inconsistent
|
5381 |
+
* Fixed PayPal admin setup: checkbox problem
|
5382 |
+
* Fixed Adding shipping address transferring on non guest checkout in Paypal Standard
|
5383 |
+
* Fixed "Save in address book" checkbox in the Shipping address area doesn't work while admin order creation
|
5384 |
+
* Fixed pre-selecting default address during checkout
|
5385 |
+
* Fixed Email with empty password is sent to a customer after an order is created in the Admin panel
|
5386 |
+
* Fixed Necessary to add data validation for filed "Trial Billing Frequency" in Recurring Profile
|
5387 |
+
* Fixed "Out of Stock" product is possible to purchase successfully through Shortcut button
|
5388 |
+
* Fixed phpdocs in lib/Varien and removed junk file
|
5389 |
+
|
5390 |
+
|
5391 |
+
==== 1.4.x-devel-77328 ====
|
5392 |
+
|
5393 |
+
== Improvements ==
|
5394 |
+
* Rendering customer attributes
|
5395 |
+
* Added favicon manager under System > Configuration > Design > HTML Head
|
5396 |
+
|
5397 |
+
== Fixes ==
|
5398 |
+
* Fixed #21146: Magento falls into the white screen when saving URL rewrite for a product on the Default Store View
|
5399 |
+
* Fixed #21643: Fixed "wsdl" parameter validation for Soap V2
|
5400 |
+
** Changed class SoapServer with class Zend_Soap_server
|
5401 |
+
** Added ability to set response charset from admin panel: System->Configuration->Magento Core API
|
5402 |
+
* Fixed #21499: Default billing and shipping address
|
5403 |
+
* Fixed #21565: missing "comment" for salesOrderStatusHistoryEntity
|
5404 |
+
* Fixed #20481: Access Control List not retrieved for API user for resources() and resourceFaults() operations
|
5405 |
+
* Fixed #18367: FCGI Error on WSDL Url with Apache and mod_fastcgi
|
5406 |
+
* Fixed #22053: use HTTP 301 code instead of 302 in case of web/url/redirect_to_base
|
5407 |
+
* Fixed #20654: Admin order creation->Move mouse cursor isn't changed into hand while move it on some product for adding
|
5408 |
+
* Fixed #21590: Attribute 'Date': testing for uniqueness fields not working
|
5409 |
+
* Fixed #21566: Type of attribute 'Price': Possible to add text value for field 'default value'
|
5410 |
+
* Fixed #22053: added optional behavior (301 or 302)
|
5411 |
+
* Fixed #21570: Review from not logged in user is saved in list of All Reviews when "Allow guests to write reviews = No"
|
5412 |
+
* Fixed #22090: Different values of Qty Increments during create and after duplicate products
|
5413 |
+
* Fixed #22489: Eliminate difference between bundle.js in different skins
|
5414 |
+
* Fixed #22419: Set default stock_data if not exist in create/update product
|
5415 |
+
* Fixed #20227: "Review(x)" link should be added to the compare page.
|
5416 |
+
* Fixed #21570: Review from not logged in user is saved in list of All Reviews when "Allow guests to write reviews = No"
|
5417 |
+
* Fixed #20959: Locale problem in shipping tracking popup raises exception
|
5418 |
+
* Fixed #21955: Layout cache ignores product column count update
|
5419 |
+
* Fixed #20011: After using filter "Color" or "Manufacture" in Configurable Product meaning from column is disappear
|
5420 |
+
* Fixed #21908: Incorrect attribute ordering in "Compare products" page.
|
5421 |
+
* Fixed #22222: Edit review-> if browse stores in the "Visible In " drop-down, rating values reseted
|
5422 |
+
* Fixed #22075: Product Attribute title specified for StoreView isn't showing on the configurable product's page
|
5423 |
+
* Fixed #22605: catalog_category.level return root categories when website or store are null
|
5424 |
+
* Fixed #21806: Different values display on the shopping cart in front-end and back-end
|
5425 |
+
* Fixed #20113: Shipping address display as default on the front-end and as not default on admin for one customer
|
5426 |
+
* Fixed #22575: Trace error during using filter "Products" on Tags page
|
5427 |
+
** added 'filter_index' to array parameter in addColumn() method call
|
5428 |
+
* Fixed #14591: Incorrect SKU for Configurable Product with Custom Options
|
5429 |
+
* Fixed #22476: Blank Column in Related Products Grid
|
5430 |
+
** deleted duplicate <col> output for editable columns
|
5431 |
+
* Fixed #22575: Trace error during using filter "Products" on Tags page
|
5432 |
+
** apply filter_index field values to index
|
5433 |
+
* Fixed #22644: A discrepancy between GT(Base) and GT(Purchased)
|
5434 |
+
* Fixed #22645: Incorrect original price when using custom price in order.
|
5435 |
+
* Fixed #22653: Missed checking for file existents in JS/CSS merger
|
5436 |
+
** cheking in source file exists. If not - do not check last modification and force to merge target file again
|
5437 |
+
* Fixed #22594: Unable to place orders through checkout with multiple addresses with PayPal direct + zero subtotal for one order
|
5438 |
+
* Fixed #21185: Newsletter confirmed automatically BEFORE account email is confirmed.
|
5439 |
+
* Fixed #22167: "Add new row" button in downloadable product
|
5440 |
+
* Fixed #21952: BUG - Category / Url Model (UYN-886991)
|
5441 |
+
* Fixed #15334, #17794
|
5442 |
+
** API category did not pass validation process due to available_sort_by must be ArrayOfString
|
5443 |
+
** Added category validation for backend (missed)
|
5444 |
+
** Creating separate validation for available_sort_by and default_sort_by attributes
|
5445 |
+
* Fixed #22599 Upgrade from 1.1.8 to 1.8.0.0 database compatibility issues (PARTIAL)
|
5446 |
+
* Fixed #22661: 1 cent bug
|
5447 |
+
* Fixed #22434: 100% discount of products -> the amounts of Tax and Grand Totals are or negative or not corectly
|
5448 |
+
* Fixed #10073: Unnecessary option for downloadable products
|
5449 |
+
* Fixed #20014: Qty use decimals for downloadable
|
5450 |
+
* Fixed #22164: Incorrect message for maximum shipping amount
|
5451 |
+
* Fixed #22174: Custom 'Qty to Refund' isn't remembered after message about incorrect amount
|
5452 |
+
* Fixed #22182: The value of 'Customer Since' field to duplicate clients at different sites.
|
5453 |
+
* Fixed #22243: Add new review by admin->type of this review is 'guest', but should be 'administrator'
|
5454 |
+
* Fixed #22313: Time of order creation if not displayed by the "Order Created At (datetime)" template variable.
|
5455 |
+
* Fixed #22348: "Add to card" button is absent for giftcard product in the catalog
|
5456 |
+
* Fixed #22640: Creating customer unable after adress tab manipulations
|
5457 |
+
* Fixed #22670: Credit memo - incorrect shipping price displaying
|
5458 |
+
* Fixed #22798: Excl and Inc. Tax don't display on the Estimate Shipping and Tax block
|
5459 |
+
* Fixed #20088: Admin able to push on-line refund button for the capture off-line invoice
|
5460 |
+
* Fixed #16306: Webservice with htaccess. Added server authorization (.htaccess)
|
5461 |
+
* Fixed #22266: HEADERS ALREADY SENT Error during dataflow import
|
5462 |
+
** Additionally: moveing layout update in separate layout file of dataflow module.
|
5463 |
+
* Fixed #21412: The "Save Attribute" and "Save and Continue Edit" buttons become disabled after saving attribute with attribute code that exists
|
5464 |
+
* Fixed #22844: After login to admin got 404 instead Startup Page
|
5465 |
+
* Fixed #22852: shopping cart price rule - search by ID - error page
|
5466 |
+
* Fixed #15897: Unsubscription Email Sender in the Newsletters Subscription Options is not working correctly
|
5467 |
+
* Fixed #15899: Newsletters subscription confirmation in not working
|
5468 |
+
* Fixed #22908: Grid Serializer doesn't handle dropdowns as edit columns
|
5469 |
+
* Fixed #22946: 'Products Tagged by Administrators' grid contains information about product that is assigned by the customer
|
5470 |
+
* Fixed #22935: Issue with Google AdWords and DSMM Code
|
5471 |
+
* Fixed #22910: view of system/design table with no records under IE 8
|
5472 |
+
* Fixed #22914: view of URL rewrite table with no records under IE 8
|
5473 |
+
* Fixed #22935: Issue with Google AdWords and DSMM Code
|
5474 |
+
* Fixed #22536: Light-weight email templates
|
5475 |
+
* Fixed #23017: Memcache session fallback does not work
|
5476 |
+
* Fixed #22992: Trace appears during create reorder from front-end
|
5477 |
+
* Fixed #22991: Cannot add items to shopping cart after active 'Use Flat Catalog Product'
|
5478 |
+
* Fixed #22813: Google base Undefined Offset when Managing attribute mapping
|
5479 |
+
* Fixed #23138: URL rewrite error on product creation
|
5480 |
+
* Added Regions for baltic states and Finland
|
5481 |
+
* Fixed #23092: Memcached and compiler
|
5482 |
+
* Fixed #19804: sorting/searching by "inventory" field
|
5483 |
+
* Fixed #23241: Catalog price rule not correctly appy for customer group
|
5484 |
+
* Fixed #16294: WSDL missing attributes for customerCustomerEntity
|
5485 |
+
* Fixed #22851: Used wrong resource model for api/user
|
5486 |
+
* Fixed #18207: SOAP-ERROR: Parsing Schema: can't import schema from 'http://schemas.xmlsoap.org/soap/encoding/'
|
5487 |
+
* Fixed Fatal error: Call to undefined function eaccelerator_fetch()
|
5488 |
+
|
5489 |
+
|
5490 |
+
|
5491 |
+
==== 1.4.2.0-beta1 ====
|
5492 |
+
|
5493 |
+
=== Major Highlights ===
|
5494 |
+
* Included new Magento Connect Manager 2
|
5495 |
+
|
5496 |
+
==== 1.4.1.1 ====
|
5497 |
+
|
5498 |
+
=== Changes ===
|
5499 |
+
* Checkout: added dispatching event 'checkout_submit_all_after' into all checkout models
|
5500 |
+
* Centinel: changed event for resetting validation state
|
5501 |
+
* Added check for Order ID before try to lookup transactions by Transaction Id
|
5502 |
+
* Added cvv field for Mastero/Switch/Solo cards. Also fixed html formatting.
|
5503 |
+
* Re-factored saving relation of billing agreement with order.
|
5504 |
+
* Added Qty Increments update in products mass-update.
|
5505 |
+
* Added ability to update filter map in Varien_Data_Collection_Db
|
5506 |
+
* Added comment about American Express cards in PayPal system configuration (http://www.paypal.com/amexupdate).
|
5507 |
+
|
5508 |
+
=== Fixes ===
|
5509 |
+
* Fixed Tax calculation for Downloadable product in purchase it through PayPal Express Checkout
|
5510 |
+
* Fixed "Notice: Undefined property: Mage_Catalog_Model_Template_Filter::$_useAbsoluteLinks " when you use WISIWYG Editor for field "Description"
|
5511 |
+
* Fixed Website PayPal Standard payment method is not working with Reward Point, Store Credit and gift Cards
|
5512 |
+
* Fixed Multiple address checkout with PauPalUK direct + 3d secure validation. Payment information error. Please start over.
|
5513 |
+
* Fixed Fatal error onBilling Agreement Related page with applied filters
|
5514 |
+
* Fixed The product's "Stock Status" is not changed from "In Stock" to "Out of Stock"
|
5515 |
+
* Fixed Qty of the product continues to decline when the "Decrease Stock When Order is Placed" is set to "No"
|
5516 |
+
* Fixed If set "Manage Stock" to "No": Qty decreasing when product is ordered
|
5517 |
+
* Fixed The bottom part of the list "Payment Method" in SCPR has too much free place
|
5518 |
+
** if title of Payment Method is empty, get it from overloaded configData('title') method of concrete Payment Method class
|
5519 |
+
** rework. Delegate to Mage::helper('payment')->getPaymentMethodList method for retrieve all payment methods
|
5520 |
+
** fixed by used new config features in 1.4.1 ver - <config_path> in system.xml
|
5521 |
+
** delete getConfigData method
|
5522 |
+
** add config_path with 'payment' section to each field in system.xml
|
5523 |
+
** in sql-upgrade change path to 'payment' section in core_config_data table
|
5524 |
+
* Fixed tax calculation in case Unit Price Tax with settings applying customer tax "After Discount".
|
5525 |
+
* Fixed Solo cards JS validation. Added expdate field to solo and maestro cards. Also removed some duplicates in credit card IIN ranges.
|
5526 |
+
* Fixed Maestro/Switch/Solo cards js validation on payment form: Added additional issue_number and issue_date checks.
|
5527 |
+
* Fixed fatal error in catalog/shopping cart rules based on recently deleted attribute.
|
5528 |
+
* Fixed incorrect redirect after order placing failed, during second try of order placing.
|
5529 |
+
* Fixed exception when "Created At" filter used on Transactions page.
|
5530 |
+
* Fixed incorrect redirect during multishipping checkout as guest.
|
5531 |
+
* Fixed issue with updating qty and addresses during checkout with multiple addresses which resets shipping address to the default billing address.
|
5532 |
+
* Payflow pro:
|
5533 |
+
** "Sale" action does not work.
|
5534 |
+
** Missed transaction ID on fraud services filter triggered.
|
5535 |
+
** Sub-standard order processing flow control and verbosity.
|
5536 |
+
** Inappropriate "state" passed to the gateway in the order addresses.
|
5537 |
+
* Fixed centinel JCB validation.
|
5538 |
+
* Fixed #14885: Unable to upload products into GoogleBase.
|
5539 |
+
* Fixed issue with creating credit memo for partial capture online invoice for the order witch where placed through Website Payments Pro (Payflow Edition) Payment method.
|
5540 |
+
* PayPal: fixed grammar in payment form/redirect text messages (EC, WPS)
|
5541 |
+
* Fixed: Subscribe to Order Status at the front end causing Fatal error: Call to undefined method Mage_Sales_Model_Mysql4_Order_Invoice::getDefaultAttributes() in app/code/core/Mage/Eav/Model/Config.php on line 438
|
5542 |
+
* Fixed fatal error when a configured payment method doesn't exist anymore
|
5543 |
+
* Fixed fatal error: Call to a member function getError() on a non-object in app/code/core/Mage/Shipping/Model/Shipping.php on line 143
|
5544 |
+
* Fixed syntax error caused by accidental manual conflict resolving in Mage_Api_Model_Server_Adapter_Soap
|
5545 |
+
* Fixed qty increments checking business logic for bundle products
|
5546 |
+
* Fixed Mage_Sales_Model_Mysql4_Order_Collection::addFieldToSearchFilter() to be compatible with flat sales structure
|
5547 |
+
* Fixed salesOrderList() broken API call
|
5548 |
+
* Fixed #18534: order_increment_id empty with api salesOrderInvoiceInfo
|
5549 |
+
* Fixed missing files and typo in Mage_Sales_Model_Order::prepareShipment() method described at http://www.magentocommerce.com/boards/viewthread/195761/P0/#top
|
5550 |
+
* Fixed adding tracking for sales_order_shipment.create API call; fixed #17820: Api v2 Shippment create not working
|
5551 |
+
* Fixed upgrading Sales module from backported 1.3 to 1.4: copied 0.9.38-0.9.39 upgrades to 1.3.99-1.4.0.0
|
5552 |
+
|
5553 |
+
=== Known Issue ===
|
5554 |
+
* Google checkout notification duplicates orders or double-process them on timeouts
|
5555 |
+
|
5556 |
+
|
5557 |
+
|
5558 |
+
==== 1.4.x-devel-73934 ====
|
5559 |
+
|
5560 |
+
=== Changes ===
|
5561 |
+
* Re-factored saving relation of billing agreement with order.
|
5562 |
+
* Added Qty Increments update in products mass-update.
|
5563 |
+
|
5564 |
+
== Fixes ==
|
5565 |
+
* Fixed tax calculation in case Unit Price Tax with settings applying customer tax "After Discount".
|
5566 |
+
* Fixed Solo cards JS validation. Added expdate field to solo and maestro cards. Also removed some duplicates in credit card IIN ranges.
|
5567 |
+
* Fixed Maestro/Switch/Solo cards js validation on payment form: Added additional issue_number and issue_date checks.
|
5568 |
+
* Fixed fatal error in catalog/shopping cart rules based on recently deleted attribute.
|
5569 |
+
* Fixed incorrect redirect after order placing failed, during second try of order placing.
|
5570 |
+
* Fixed exception when "Created At" filter used on Transactions page.
|
5571 |
+
* Fixed incorrect redirect during multishipping checkout as guest.
|
5572 |
+
* Fixed issue with updating qty and addresses during checkout with multiple addresses which resets shipping address to the default billing address.
|
5573 |
+
* Payflow pro:
|
5574 |
+
** "Sale" action does not work.
|
5575 |
+
** Missed transaction ID on fraud services filter triggered.
|
5576 |
+
** Sub-standard order processing flow control and verbosity.
|
5577 |
+
** Inappropriate "state" passed to the gateway in the order addresses.
|
5578 |
+
* Fixed centinel JCB validation.
|
5579 |
+
* Fixed #14885: Unable to upload products into GoogleBase.
|
5580 |
+
* Fixed issue with creating credit memo for partial capture online invoice for the order witch where placed through Website Payments Pro (Payflow Edition) Payment method.
|
5581 |
+
|
5582 |
+
==== 1.4.x-devel-71052 ====
|
5583 |
+
|
5584 |
+
=== Fixes ===
|
5585 |
+
* PayPal: fixed grammar in payment form/redirect text messages (EC, WPS)
|
5586 |
+
* Fixed: Subscribe to Order Status at the front end causing Fatal error: Call to undefined method Mage_Sales_Model_Mysql4_Order_Invoice::getDefaultAttributes() in app/code/core/Mage/Eav/Model/Config.php on line 438
|
5587 |
+
* Fixed fatal error when a configured payment method doesn't exist anymore
|
5588 |
+
* Fixed fatal error: Call to a member function getError() on a non-object in app/code/core/Mage/Shipping/Model/Shipping.php on line 143
|
5589 |
+
* Fixed syntax error caused by accidental manual conflict resolving in Mage_Api_Model_Server_Adapter_Soap
|
5590 |
+
|
5591 |
+
|
5592 |
+
==== 1.4.x-devel-70699 ====
|
5593 |
+
|
5594 |
+
=== Changes ===
|
5595 |
+
* Added ability to update filter map in Varien_Data_Collection_Db
|
5596 |
+
* Added comment about American Express cards in PayPal system configuration (http://www.paypal.com/amexupdate).
|
5597 |
+
|
5598 |
+
=== Fixes ===
|
5599 |
+
* Fixed qty increments checking business logic for bundle products
|
5600 |
+
* Fixed Mage_Sales_Model_Mysql4_Order_Collection::addFieldToSearchFilter() to be compatible with flat sales structure
|
5601 |
+
* Fixed salesOrderList() broken API call
|
5602 |
+
* Fixed #18534: order_increment_id empty with api salesOrderInvoiceInfo
|
5603 |
+
* Fixed missing files and typo in Mage_Sales_Model_Order::prepareShipment() method described at http://www.magentocommerce.com/boards/viewthread/195761/P0/#top
|
5604 |
+
* Fixed adding tracking for sales_order_shipment.create API call; fixed #17820: Api v2 Shippment create not working
|
5605 |
+
* Fixed upgrading Sales module from backported 1.3 to 1.4: copied 0.9.38-0.9.39 upgrades to 1.3.99-1.4.0.0
|
5606 |
+
|
5607 |
+
|
5608 |
+
==== 1.4.1.0 ====
|
5609 |
+
|
5610 |
+
=== Improvements ===
|
5611 |
+
* Added ability to use static URLs for media in WYSIWYG or image browser. Added ability to enable parsing {{store}} and {{media}} directives on catalog frontend.
|
5612 |
+
* URL rewrites history: ability to auto-generate custom rewrite with redirect from old to new URL when changing product URL-key
|
5613 |
+
* Added ability to exclude a category from navigation menu
|
5614 |
+
* Various improvements in system configuration UI. Introduced ability to make actual configuration structure to be independent on the system.xml structure
|
5615 |
+
* Added "Only X left" inventory feature
|
5616 |
+
* Implemented Centinel functionality in iphone theme
|
5617 |
+
* Upgraded TinyMCE to v.3.3.2
|
5618 |
+
* Improved PayPal integration, includes:
|
5619 |
+
** Recurring payment profiles entity and purchasing of "subscription" products. In checkout they are treated as "nominal" items.
|
5620 |
+
** Billing agreements
|
5621 |
+
** "Pending Review" order state, "Pending Review" and "Suspected Fraud" order statuses and logic related with this. Triggers by PayPal IPR, FMF and Unilateral payments.
|
5622 |
+
** Functionality of transactions listing/searching and fetching from gateway
|
5623 |
+
** Fetching PayPal settlement reports via SFTP
|
5624 |
+
** Various improvements of PayPal integration on the frontend and admin UI
|
5625 |
+
* Added notice about creating offline creditmemo from order view page.
|
5626 |
+
* Added getter for recurring payment methods in payment helper.
|
5627 |
+
* Implemented abstract block ability to have arbitrary groups of child blocks and a method that returns such a group. Implemented a method that fetches data from child block by specified alias.
|
5628 |
+
* Implemented ability to specify "sort_order" instead of "before" and "after" in the totals declaration. All nominal totals declaration utilize "sort_order"
|
5629 |
+
* Added getter for specified object data by key in core/template block: method getObjectData()
|
5630 |
+
* Defined payment methods grouping, implemented getter for payment method list (with option to group them). Added ability to render grouped options in the "select" grid filter.
|
5631 |
+
** Moneybookers: utilized the payment methods grouping for all its methods; removed redundant "translate" attribute in the methods definition in config.
|
5632 |
+
*** Utilized payment methods grouping for PayPal peyment methods.
|
5633 |
+
* Added more verbosity to PayPal NVP and IPN debugging
|
5634 |
+
|
5635 |
+
=== Changes ===
|
5636 |
+
* Sales module database structure changed from EAV into flat tables
|
5637 |
+
* Product custom URL rewrites redirect to SEF URL, rather than to catalog/product/view/id/
|
5638 |
+
* Reimplemented frontend top menu rendering logic (cross-browser and usability improvements)
|
5639 |
+
* Reviewed [logic of the sales reports|http://www.magentocommerce.com/wiki/doc/sales_reports_specifications]: Orders, Tax, Invoiced, Shipping, Refunds, Coupons
|
5640 |
+
* Reimplemented bestsellers report
|
5641 |
+
* Implemented 3D Secure validation for Maestro International and JCB cards
|
5642 |
+
* (!) Changed Shopping cart methods output (top + bottom): removed <li>-dependance from templates in other modules \-> moved to Checkout module
|
5643 |
+
* Moved the Payflow Pro payment method to PayPal module
|
5644 |
+
* Refactored sales/service_quote model: instead of submit() method the submitAll() should be used. It can submit nominal items separately from the order. The methods for submitting nominal items and order separately - are available as well.
|
5645 |
+
* Refactored onepage checkout model to use the new method sales/service_quote::submitAll(), added recurring profiles and billing agreements passing through the process until the success page
|
5646 |
+
* Utilized child blocks grouping to improve flexibility of rendering additional information in catalog/product/view template. The group is called "detailed_info"; any block from layout may insert itself to this group.
|
5647 |
+
* Removed redundant wrappers hard-coded into some catalog templates. Template of parent block is responsible for wrapping.
|
5648 |
+
* Refactored onepage checkout success block and template: simplified fetching related checkout information, added ability to render billing agreement and recurring profiles that might be created with the payment placement.
|
5649 |
+
|
5650 |
+
=== Fixes ===
|
5651 |
+
* Fixed read/write connection issue during new customer order place. See http://www.magentocommerce.com/boards/viewthread/19363/P0/
|
5652 |
+
* Fixed tax rule ZIP range matching (numeric values were matched as strings)
|
5653 |
+
* Various tax fixes
|
5654 |
+
* Optimized search reindex process
|
5655 |
+
|
5656 |
+
=== Known Issues ===
|
5657 |
+
* PayPal and Payflow pro modules are officially backwards incompatible.
|
5658 |
+
* The `sales_order_aggregated_created` table was re-created with new columns, it is not backwards compatible.
|
5659 |
+
|
5660 |
+
=== Upgrade Path ===
|
5661 |
+
* Once upgraded, go to system configuration section and re-enter all PayPal-related settings carefully. Make sure to specify the proper merchant country and email.
|
5662 |
+
|
5663 |
+
|
5664 |
+
|
5665 |
+
|
5666 |
+
==== 1.4.x-devel-69025 ====
|
5667 |
+
|
5668 |
+
=== Improvements ===
|
5669 |
+
* PayPal integration:
|
5670 |
+
** Settlement reports fetching from SFTP
|
5671 |
+
** Billing Agreements
|
5672 |
+
* Added website and store data to backend model when invoking in system configuration block
|
5673 |
+
* Added "original_data" key to elements when generating system configuration form
|
5674 |
+
|
5675 |
+
=== Changes ===
|
5676 |
+
* Mage_Sales_Model_Order_Payment::canCapture() - move methodInstance::_canCapture before authorization transaction check
|
5677 |
+
* Sales/Payment changes:
|
5678 |
+
** Implemented pending payment review functionality. Includes "Payment Review" order state and statuses "Payment Review" and "Suspected Fraud". In this state the order cannot be fulfilled until the payment is approved.
|
5679 |
+
** Holding orders on pending transactions was replaced in favor of "Payment Review" state. The 'fraud' status was removed from 'holded' order state.
|
5680 |
+
** Transactions resource model unsets the "isObjectNew" if it had a lookup of autoincrement key before saving
|
5681 |
+
** Payment capture and capture notification mark invoice as paid only if needed: when it is pending and the transaction is not pending
|
5682 |
+
** fixed float casting error in Mage_Sales_Model_Order_Payment::_isCaptureFinal()
|
5683 |
+
** fixed showing up credit card type in CC payment block, if there is no credit card type information
|
5684 |
+
* PayPal Instant Payment Review and Fraud Management:
|
5685 |
+
** implemented methods for handling PayPal-specific payment statuses
|
5686 |
+
** added more data importing to payment info in PayPal: payment status, pending reason, "is_fraud_detected"
|
5687 |
+
** added importing of all required for payment processing information in different points of WPP API calls
|
5688 |
+
** implemented IPR and FMF handling for Website Payments Pro methods family (Express Checkout, Direct Payments)
|
5689 |
+
* Fixed PayPal payment info block to not render redundant CC-related information (it extends CC info block)
|
5690 |
+
* (!) Changed Shopping cart methods output (top + bottom): removed <li>-dependance from templates in other modules -> moved to Checkout module
|
5691 |
+
* Added throwing exception on an incorrect attempt of unholding order (TRJ-148987).
|
5692 |
+
|
5693 |
+
|
5694 |
+
|
5695 |
+
|
5696 |
+
==== 1.4.x-devel-68590 ====
|
5697 |
+
|
5698 |
+
=== Improvements ===
|
5699 |
+
* Implemented serializing/unserializing model fields on abstract level. See Mage_Core_Model_Mysql4_Abstract::$_serializableFields
|
5700 |
+
* Implemented recurring payment profiles entity and purchasing of "subscription" products. In checkout they are treated as "nominal" items
|
5701 |
+
* Implemented functionality of transactions listing/searching and fetching from gateway
|
5702 |
+
* Upgraded TinyMCE to v.3.3.2
|
5703 |
+
* Added ability to parse "{{media}}" and "{{store}}" CMS directives in the catalog
|
5704 |
+
* Added ability to insert media content as static URLs in WYSIWYG or media browser mode
|
5705 |
+
* Implemented "Pending Review" order state, "Pending Review" and "Suspected Fraud" order statuses and logic related with this
|
5706 |
+
* Added ability to set fieldset always expanded (<expanded> node in system configuration for fieldset)
|
5707 |
+
* Added ability to set number of "levels up" to form javascript dependencies controller block
|
5708 |
+
* EAV: implemented a 'serialized' backend model
|
5709 |
+
* Added ability to separate actual configuration path and form field path in system.xml - use node <config_path>
|
5710 |
+
* Added ability to render "tooltips" in system configuration fieldsets - use node <tooltip>
|
5711 |
+
* Enhanced PayPal integration:
|
5712 |
+
* frontend and backend UI experience of PayPal solutions
|
5713 |
+
* Instant update API integrataion
|
5714 |
+
* Recurring payments integration
|
5715 |
+
* Instant Payment Review and Fraud Management Filters integration
|
5716 |
+
* EC unilateral payments integration
|
5717 |
+
* Transactions fetching for PayPal WPP methods
|
5718 |
+
|
5719 |
+
=== Changes ===
|
5720 |
+
* Reimplemented PayPal system configuration in a dedicated section.
|
5721 |
+
* Moved Payflow Pro payment method into PayPal module. Got rid of obsolete system configuration fields of this method.
|
5722 |
+
* Refactored implementation of serializing 'additional_information' field in sales/order_payment, sales/quote_payment and sales/order_payment_transaction
|
5723 |
+
* Introduced "Is Nominal" term in sales logic:
|
5724 |
+
* Nominal items participate in catalog, but during checkout and order processing they have zero row total.
|
5725 |
+
* Implemented separate shopping cart and address totals for nominal items: nominal totals, various changes/adjustments in existing totals
|
5726 |
+
* Added ability to calculate shipping charges for a quote/address item individually (on code level, utilized by the nominal items)
|
5727 |
+
* Reviewed credit card types supported by PayPal payment methods
|
5728 |
+
* Changed skin styles from "tax-total" to more generic "summary-total" (it is used now not only for tax totals, but for nominal items as well)
|
5729 |
+
* Moved field comments (aka "notes") of the product edit form from the last column under the field element.
|
5730 |
+
* Varien_Data_Form_Element_Time: added a hidden element with ID to maintain HTML consistency
|
5731 |
+
* Varien_Data_Form - changed logic of adding suffix/prefix to an element: when element doesn't have a name, the suffix will be result
|
5732 |
+
* Varien_Data_Form_Abstract and Varien_Data_Form_Element_Abstract: moved adding 'required-entry' class to the element to the moment of its generation instead of the moment of its adding. It adds more flexibility to change properties when the object is not yet rendered.
|
5733 |
+
* Added to Varien_Data_Collection_Db::_beforeLoad(), moved 'core_collection_abstract_load_before' event dispatching to Mage_Core_Model_Mysql4_Collection_Abstract::_beforeLoad()
|
5734 |
+
|
5735 |
+
=== Fixes ===
|
5736 |
+
* Fixed #21225: catalogProductUpdate / catalogProductCreate and tier_price attribute
|
5737 |
+
* Fixed #16596: category.assignedProducts always returns an empty result
|
5738 |
+
* Fixed js reference to non-existing element when CVV verification disabled and gateway supports SS-type credit cards
|
5739 |
+
|
5740 |
+
=== Known Issues ===
|
5741 |
+
* PayPal modules and Payflow Pro payment method backwards compatibility is officially not retained.
|
5742 |
+
* Nominal item total calculations do not work properly for multishipping checkout.
|
5743 |
+
|
5744 |
+
|
5745 |
+
|
5746 |
+
|
5747 |
+
==== 1.4.x-devel-67099 ====
|
5748 |
+
|
5749 |
+
=== Improvements ===
|
5750 |
+
* Added isModuleEnabled() to core helper; Added ability to hide configuration fields if related module is not enabled (use 'if_module_enabled' node in system.xml)
|
5751 |
+
* Implemented IDNA domains support in registration and login forms (see also #20203)
|
5752 |
+
|
5753 |
+
=== Fixes ===
|
5754 |
+
* Fixed #22490: .Biz domain email addresses cause checkout to throw error and return to main Checkout page. Fixed path argument passed to include function in Zend_Validate_Hostname::isValid() to be valid whether source code compiler is used or not
|
5755 |
+
* Fixed Negative value in Shopping Cart in case Tax Calculation Method Based On Unit Price
|
5756 |
+
* Fixed Subtotal (Incl.Tax) = -$0.01 during created credit memo with refund shipping
|
5757 |
+
* Fixed: 100% discount of products -> the amounts of Tax and Grand Totals are or negative or not corectly
|
5758 |
+
|
5759 |
+
|
5760 |
+
|
5761 |
+
|
5762 |
+
==== 1.4.x-devel-66609 ====
|
5763 |
+
|
5764 |
+
=== Improvements ===
|
5765 |
+
* Implemented 3D Secure validation for Maestro International and JCB cards
|
5766 |
+
* Added comments to system configuration fields "Catalog" > "Price" > "Catalog Price Scope" and "Currency Setup" > "Currency Options" > "Base Currency" that explain that base currency scope depends on the catalog prices scope.
|
5767 |
+
* Added note to reports that aggregated data depends on timezone and must be re-aggregated completely after global timezone change.
|
5768 |
+
|
5769 |
+
=== Changes ===
|
5770 |
+
* Cleaned up iphone theme from redundant files
|
5771 |
+
* Added Maestro International card type to credit card based payment methods (abstract).
|
5772 |
+
* Changed option "Notify Customer" into two options "Notify Customer by Email" and "Visible on Frontend" when adding an order comment. All comments that had the old value = 0, will be not visible on the frontend.
|
5773 |
+
* System configuration option "Sales" -> "Dashboard" -> "Use Aggregated Data" is marked as "beta"
|
5774 |
+
* Added "delta" rounding during shipping excluding/including tax calculation
|
5775 |
+
* Added discount tax as line item in PayPal
|
5776 |
+
* Reviewed logic of the sales reports:
|
5777 |
+
* Orders
|
5778 |
+
* Tax
|
5779 |
+
* Invoiced
|
5780 |
+
* Shipping
|
5781 |
+
* Refunds
|
5782 |
+
* Coupons
|
5783 |
+
|
5784 |
+
=== Fixes ===
|
5785 |
+
* Fixed issue when product quantity was incorrectly updated in stock after an order is placed for a configurable and a bundle products
|
5786 |
+
* Fixed #20697: wrong url rewrite resource model
|
5787 |
+
* Fixed duplicating of coupon code in shopping cart view
|
5788 |
+
* Fixed Catalog RSS feed showing prices including and excluding tax
|
5789 |
+
* Fixed #21501: Problem with translate inline and translations
|
5790 |
+
* Fixed setting URL key when using quick-create for simple products of the configurable.
|
5791 |
+
* Fixed adding comments to sales documents (invoices, shipments, credit memos)
|
5792 |
+
* Fixed #21816: Google Analytics Issue with Registration Checkout and Already Logged In
|
5793 |
+
* Fixed issue with number of orders that were created by Google Checkout
|
5794 |
+
* Fixed #22199: Duplicated Code - Useless Check
|
5795 |
+
* Fixed applied tax saving for shipping tax
|
5796 |
+
* Fixed issue that invoiced orders after cancelling become completed
|
5797 |
+
* Fixed #21533: Missing tranlation for "This date is a required value" in javascript
|
5798 |
+
* Fixed: Sales report last update date doesn't change after re-aggregating
|
5799 |
+
* Fixed rounding special price of selections in bundle product view
|
5800 |
+
* Fixed one day forward shift of dates in sales reports when showing empty rows
|
5801 |
+
* Fixed missed calculation of base_total_canceled & total_canceled fields on order cancellation
|
5802 |
+
* Fixed wrong calculation of base_discount_canceled & base_discount_canceled because of negative values of base_discount_amount in the sales order tables
|
5803 |
+
|
5804 |
+
=== Known Issues ===
|
5805 |
+
* The `sales_order_aggregated_created` table was re-created with new columns, it is not backwards compatible.
|
5806 |
+
|
5807 |
+
|
5808 |
+
|
5809 |
+
==== 1.4.x-devel-66014 ====
|
5810 |
+
|
5811 |
+
=== Improvements ===
|
5812 |
+
* Enabled "Refresh" mass-action as default in cache management grid
|
5813 |
+
* Implemented Centinel functionality in iphone theme
|
5814 |
+
* Optimized search reindex process a bit
|
5815 |
+
|
5816 |
+
=== Changes ===
|
5817 |
+
* Added 3rd optional argument to javascript function toggleValueElements(checkbox, container, excludedElements) in tools.js (products mass-update javascript)
|
5818 |
+
* Fixed #9600: Security compromised, Guest can subscribe a client to the newsletter
|
5819 |
+
* Checking if subscribing email adress does not belong to another user
|
5820 |
+
* If confirmation option selected and subscribing email is not user's login email - then confirmation is needed
|
5821 |
+
* Fixed #21304: Security compromised, guest can spam any email address
|
5822 |
+
* New config field added into cms -> customer -> newsletter "Allow Guest Subscription"
|
5823 |
+
|
5824 |
+
=== Fixes ===
|
5825 |
+
* Fixed order taxes report with Match Period To = Order Updated Date (typo)
|
5826 |
+
* Fixed issue when invoiced and not shipped yet orders after cancelling becomes completed
|
5827 |
+
* Fixed #21533: Missing tranlation for "This date is a required value" in javascript
|
5828 |
+
* Fixed stock management checking for a stock item when the stock management is disabled for this item (the check should be bypassed)
|
5829 |
+
* Fixed "New Products" RSS: added grouped and bundle products
|
5830 |
+
* Fixed the feed so that it contains grouped products now
|
5831 |
+
* The feed now shows the same products as shown in category view or "New products" widget (before the fix, incomplete products might be shown)
|
5832 |
+
* Fixed: virtual / downloadable product isn't deleted from the shopping cart, if change qty to '0'
|
5833 |
+
* Fixed #21866: 'Master Card' misspelling, should be spelled 'MasterCard' in credit card drop down options in checkout
|
5834 |
+
* Fixed #21771: Adjustment Refund & Adjustment Fee not showing in View Credit Memo
|
5835 |
+
* Fixed admin timeout issue inside iframe of Centinel validation
|
5836 |
+
* Fixed/reviewed tax calculation for components:
|
5837 |
+
* shipping price including tax in checkout process block
|
5838 |
+
* order/invoice/creditmemo shipping incl tax calculation
|
5839 |
+
* applied tax saving for shipping tax
|
5840 |
+
* applied tax saving for shipping tax
|
5841 |
+
* Fixed #16577: Dual Order with same Product
|
5842 |
+
* Fixed: #14502: Newsletter un-subscription message on customer account inappropriate
|
5843 |
+
|
5844 |
+
=== Known Issues ===
|
5845 |
+
* PayPal Direct PayFlow Edition may stuck with processing orders, if transactions are processed at manager.paypal.com. The problem is that IPN does not contain PNREF - the PayFlow transaction ID. This issue won't be fixed neither on PayPal, nor on Magento side. The only recommendation to merchant is to either process orders on Magento side only or on manager.paypal.com only.
|
5846 |
+
|
5847 |
+
|
5848 |
+
|
5849 |
+
|
5850 |
+
==== 1.4.x-devel-65494 ====
|
5851 |
+
|
5852 |
+
=== Improvements ===
|
5853 |
+
* Added ability to have a comment for promotion rule fielset, similar to generic fieldset.
|
5854 |
+
* Added method for getting self child selection options recursively for promotion rule combines
|
5855 |
+
* Optimized catalog search system configuration fields sort order to make it more extendable.
|
5856 |
+
* Added icon for some buttons in admin that don't do some action instantly, but redirect to other page.
|
5857 |
+
* Added cache key generation on core template block level
|
5858 |
+
* Added ability to register product ids for last viewed products index
|
5859 |
+
* Added ability to disable observer call with <type>disabled</type> node (after backwards compatibility violation discovered)
|
5860 |
+
* Performance improvements on Mage_Catalog_Helper_Output::productAttribute method level
|
5861 |
+
* Added ability to use lazy connection instantiation on EAV resource models
|
5862 |
+
* Added "_isStraight" flag support on Mage_Core_Controller_Request_Http - allows to process request without additional logic (url rewrites, custom design visitor logging)
|
5863 |
+
|
5864 |
+
=== Changes ===
|
5865 |
+
* Sales reports refactoring after migration to flat sales structure: added a few indexes, optimized statistics reaggregation, fixed issue with generating statistics in wrong timezone (it was in UTC, but needs to be in the admin timezone)
|
5866 |
+
* Added Mage_Core_Helper_Abstract::stripTags() and utilized it in templates instead of strip_tags()
|
5867 |
+
* Improved and optimized base design package templates and layouts, minor fixes in payment method templates.
|
5868 |
+
* Moved fireEvent() function from adminhtml/events.js to a more generic js.js for future use
|
5869 |
+
* Added Mage_Core_Model_Config_Data::getFieldsetDataValue($key) - ability to get a neighbour system configuration value in backend model, when saving system configuration
|
5870 |
+
* Reviewed Magento user interface text labels and messages for proper grammar, informativeness and capital letters usage.
|
5871 |
+
* Reimplemented top menu rendering logic: implemented Mage_Catalog_Block_Navigation::_renderCategoryMenuItemHtml(), deprecated Mage_Catalog_Block_Navigation::drawItem() and reimplemented to work through _renderCategoryMenuItemHtml for compatibility
|
5872 |
+
* Added url rewrites on last viewed products collection
|
5873 |
+
* Reimplemented products bestsellers report: report uses pre-aggregated data to improve performance
|
5874 |
+
* Moved logic of reaggregating reports data from sales report controller into separate controller, added bestsellers report handling there
|
5875 |
+
|
5876 |
+
=== Fixes ===
|
5877 |
+
* Fixed #20782: Wrong prices exc. tax with discount in cart
|
5878 |
+
* Fixed #21099: Wrong subtotal for manual order entry with manual price
|
5879 |
+
* Fixed #21271: Price inc tax and exc. tax same for grouped product
|
5880 |
+
* Fixed grid js object name in grid pager: now it uses block method instead of direct building
|
5881 |
+
* Fixed changing notification when editing a product in various tabs:
|
5882 |
+
* Downloadable products: links title (element had no id attribute and thus was omitted by the event dispatcher init code)
|
5883 |
+
* Custom options: whatever was added with "Add option"
|
5884 |
+
* Bundles: whatever was added with "Add option"
|
5885 |
+
* All date input fields when using the calendar widget
|
5886 |
+
* Prices: tiered prices box, all rows added with "Add tier"
|
5887 |
+
* Fixed #6321: Add RSS urls to head section
|
5888 |
+
* Fixed #21831: Tax Calculation Version 1.4.0.1 still incorrect
|
5889 |
+
* Fixed #12067: iPhone Terms and Conditions Box
|
5890 |
+
* Fixed #20631: Order totals when creating order from admin do not reflect currently selected currency
|
5891 |
+
* Fixed #21777: Catalog pricerules
|
5892 |
+
* Fixed #14591: Incorrect SKU for Configurable Product with Custom Options
|
5893 |
+
* Fixed #20832: PayPal Standard tax issue: implemented proper tax and discounts validation/transferring with cart line items
|
5894 |
+
* Fixed #17451: Header Links (top.links.phtml) does not output correctly because it is using the model code (the Toplinks block is deprecated)
|
5895 |
+
* Fixed #21302: PayPal PayFlow Pro: card expiration date format should be MMYY, not MMYYYY. Also fixed country code typo issue.
|
5896 |
+
* Fixed #21686: Typo in tag.xml
|
5897 |
+
* Fixed extra quoting in select html element
|
5898 |
+
* Fixed XHTML validation errors in admin in some places
|
5899 |
+
* Fixed #21912: calculation error transfer between multishipping address
|
5900 |
+
* Fixed typo in PayPal NVP API that caused impossibility to do partial captures
|
5901 |
+
|
5902 |
+
|
5903 |
+
|
5904 |
+
|
5905 |
+
==== 1.4.x-devel-64603 ====
|
5906 |
+
|
5907 |
+
=== Improvements ===
|
5908 |
+
* Implemented 3D Secure validation for the JCB credit cards
|
5909 |
+
* Added "Only X Left" feature - an option to show on a product view page how many items remains in stock, if it is lower than specific threshold.
|
5910 |
+
* (in progress) implementation of #7741: Customer group increase order size . The feature is called "Qty Increments" - to trade items in boxes only. I.e. allow to purchase 6, 12, 18 items etc...
|
5911 |
+
|
5912 |
+
=== Changes ===
|
5913 |
+
* Refactored frontend navigation menu HTML structure and javascripts: the menu expands and collapses with small delay making it more accessible for users. Fixed possible compatibility issue in Mage_Catalog_Block_Navigation::drawItem() and marked as deprecated after 1.4. Removed local calls of onmouseover/onmouseout events to improve SEO.
|
5914 |
+
* Added ability to assign id for field containers (TR tag) using node <use_container_id>1</use_container_id> in system configuration
|
5915 |
+
* Moving widgets.css below in the code for proper styles overriding.
|
5916 |
+
* Moved JCB credit card declaration and implementation into the Mage_Payment module. Removed it from other modules (they will inherit JCB card from "CC" payment method)
|
5917 |
+
* Modified Varien_Object_Mapper to check arrays using array_key_exists() instead of isset()
|
5918 |
+
* Indexer changes (related to the #21031):
|
5919 |
+
* Removed DROP/CREATE statements for index temporary tables
|
5920 |
+
* Created static index temporary tables (InnoDB and MEMORY) and separated using those tables in reindexiAll() and reindexEntities()
|
5921 |
+
* Added ability to set a comment in adminhtml generic fieldset renderer
|
5922 |
+
|
5923 |
+
=== Fixes ===
|
5924 |
+
* Fixed #21313: Display price including TAX
|
5925 |
+
* Fixed #21632: Associated products don't get cached
|
5926 |
+
* Minor bugfixes in 3D Secure integration (API debugging, improvements in css and javascript)
|
5927 |
+
* 3D Secure integraion - fixed confused constant values in centinel service model
|
5928 |
+
* Fixed autocomplete in year field on new user registration
|
5929 |
+
* Fixed _isCaptureNeeded validation for PayPal pro (exception during invoicing captured transaction)
|
5930 |
+
* Fixed typo in PayPal Direct API variable "AUTHSTATUS3DS" (error in official documentation)
|
5931 |
+
* Moneybookers:
|
5932 |
+
* fixed translations in the activation email
|
5933 |
+
* minor fixes in account confirmation javascript
|
5934 |
+
* Fixed #21752: Moneybookers configuration per store
|
5935 |
+
* Fixed #21302: PayPal PayFlow Pro: card expiration date format should be MMYY, not MMYYYY
|
5936 |
+
* Fixed #20932: unique key in catalog_product_link
|
5937 |
+
* Fixed #21031: Simultaneous product->save() causes "Base table or view already exists: 1050 Table catalog_product_index_price_idx' already exists
|
5938 |
+
|
5939 |
+
|
5940 |
+
|
5941 |
+
|
5942 |
+
==== 1.4.x-devel-64038 ====
|
5943 |
+
|
5944 |
+
=== Improvements ===
|
5945 |
+
* Minor CSS improvements in frontend themes
|
5946 |
+
* Image/media browser minor UI improvements
|
5947 |
+
* Added default placeholder for skin images in wysiwyg
|
5948 |
+
* Minor style improvements for widgets insertion overlay
|
5949 |
+
* Implemented 3D Secure transactions debugging
|
5950 |
+
* Added ability to set a writer adapter to the Mage::log() and to use Mage::log() regardless of system configuration settings
|
5951 |
+
* Added Magento Variable icon for WYSIWYG
|
5952 |
+
* Added ability to append custom class name to main pop-up window container
|
5953 |
+
* Added explanation comments for Centinel Api Custom URL
|
5954 |
+
|
5955 |
+
=== Changes ===
|
5956 |
+
* Added element as parameter of system configuration field getCommentText method
|
5957 |
+
* Added ability to use isObjectNew method of model for object save on resource model level
|
5958 |
+
* Added additional blocks support on order history and last orders blocks level
|
5959 |
+
* Made encryption key length check binary-safe
|
5960 |
+
* Added full exception trace logging to cron_schedule table
|
5961 |
+
* Moved shopping cart price rule coupon to separate table, improved shopping cart price rule management UI
|
5962 |
+
* Added ability to specify model for system config field comment generation (system.xml):
|
5963 |
+
* <comment><model>module/model</model></comment>
|
5964 |
+
* requires getCommentText method definition from defined model
|
5965 |
+
* Changed the way how payment methods debug transactions: instead of database the debug information is written into var/log/payment_<method_code>.log
|
5966 |
+
* Updated text labels in sales reports: terminology for "report type" (period matches to)
|
5967 |
+
* Added new column 'updated_at' for wishlist table. Changed controller and model logic to save new data.
|
5968 |
+
|
5969 |
+
=== Fixes ===
|
5970 |
+
* Fixed #21250: HTML code displaying like text in descriptions / List View Displaying HTML Entity Values
|
5971 |
+
* Fixed #21251: html code shows in category product listing
|
5972 |
+
* Fixed: Unit Price in Shopping Cart is incorrect when applying a Coupon Code
|
5973 |
+
* Fixed #18536: Rounding error on Shipping Tax calculations
|
5974 |
+
* Fixed bugs with row based tax calculation and shipping tax calculation
|
5975 |
+
* Fixed width/height in WYSIWYG image insertion
|
5976 |
+
* Fixed authorize.net payment transaction saving during capture
|
5977 |
+
* Fixed #20890: Incorrect function name
|
5978 |
+
* Fixed #21055: No Navigation on Advanced Search Results
|
5979 |
+
* Fixed #20912: memory_limit suffix other than 'M'
|
5980 |
+
* Fixed #20884: JS bug in Widget/Grid/Column/Action.php
|
5981 |
+
* Fixed #7228: Credit Memo - Adjustment Fee $ or %
|
5982 |
+
* Fixed #20832: paypal - standard Tax issue
|
5983 |
+
* (in progress) UI minor fixes in 3D Secure validation process
|
5984 |
+
* Added forgotten Moneybookers email template
|
5985 |
+
|
5986 |
+
|
5987 |
+
|
5988 |
+
|
5989 |
+
==== 1.4.x-devel-63512 ====
|
5990 |
+
|
5991 |
+
=== Improvements ===
|
5992 |
+
* Implemented #6321: Add RSS urls to head section
|
5993 |
+
* Implemented #7293: Track IP in abandoned cart
|
5994 |
+
* (in progress) Ability to not include a category into navigation menu
|
5995 |
+
|
5996 |
+
=== Changes ===
|
5997 |
+
* Refactored Sales module resource from EAV into flat structure.
|
5998 |
+
* Sales entities data structure changes:
|
5999 |
+
* Dashboard optimization + configuration option "Use Aggregated Data" for dashboard
|
6000 |
+
* Inventory: moved stock items qty manipulations out of transaction, fixed qty upgrade logic (x+delta)
|
6001 |
+
* Added configuration option "Automatically return Credit Memo item to Stock" for refunds autogeneration
|
6002 |
+
* Removed downloadable products FK relation with sales module
|
6003 |
+
* Sales order tax logic moved to tax module and relation with sales module by FK
|
6004 |
+
* Sales, SalesRule and Checkout modules changes:
|
6005 |
+
* Added product customer group property validation on sales rules level
|
6006 |
+
* Added ability to assign quote object to checkout cart model
|
6007 |
+
* Prevented redundant customer model load in customer address
|
6008 |
+
* Optimized saveDownloadableOrderItem item in downloadable product observer
|
6009 |
+
* Prevented double "order by" in collection select statement
|
6010 |
+
* Added _beforeLoad support and not changed object save protection on core abstract level
|
6011 |
+
* Extended abstract collection with add/remove fields to/from select
|
6012 |
+
* Escaped html entities in mail form in 404, 503 and report.php error pages, prevented errors if global array $_SERVER is undefined
|
6013 |
+
* Minor text changes in PayPal modules
|
6014 |
+
* Added not existin observers methods calls protection
|
6015 |
+
* Separated tax shipping total from tax subtotal. Now taxes for store prices (code tax_subtotal) calculates before shipping, then calculates shipping (code shipping) and taxes for shipping (code tax_shipping) and then calculates customer taxes (code tax).
|
6016 |
+
|
6017 |
+
|
6018 |
+
=== Fixes ===
|
6019 |
+
* Fixed #21061: Global country tax applied instead of specific state tax
|
6020 |
+
* Fixed catalog price rules different sorting when applying the rule vs. saving the product
|
6021 |
+
* Fixed #20603: Async Google Analytics throws js error (_gaq not defined)
|
6022 |
+
* Fixed SQL error possibility when adding bundle to cart
|
6023 |
+
* Fixed #16684: ini_set of auto_detect_line_endings during Varien_Io_File::streamReadCsv
|
6024 |
+
* Fixed #17748: Category chooser at price rules
|
6025 |
+
* Fixed #20161: Special From Date for website
|
6026 |
+
* Fixed Fatal error: Call to undefined method Mage_Admin_Model_Observer::actionPostDispatchAdmin() in \app\code\core\Mage\Core\Model\App.php on line 1207 (backward compatibility)
|
6027 |
+
|
6028 |
+
|
6029 |
+
|
6030 |
+
|
6031 |
+
==== 1.4.x-devel-62916 ====
|
6032 |
+
|
6033 |
+
=== Improvements ===
|
6034 |
+
* Improved visual design of widget and variable insertion, and media browser overlay
|
6035 |
+
* Product custom URL rewrites redirect to SEF URL, rather than to catalog/product/view/id/
|
6036 |
+
* URL rewrites history: ability to auto-generate custom rewrite with redirect from old to new URL when changing product URL-key
|
6037 |
+
* Optimized getAttributeRawValue() method in catalog module for retrieving more then one attributes
|
6038 |
+
|
6039 |
+
=== Changes ===
|
6040 |
+
* Added javascript validation for JCB cards
|
6041 |
+
* Changed confusing error message about quantity in shopping cart into proper one
|
6042 |
+
* Added comments collection loading when invoice, credit memo or shipment created with adding comment: needed before adding first comment.
|
6043 |
+
* Added Varien_Db_Ddl_Table
|
6044 |
+
* Added method createTable from DDL to Varien_Db_Apater_Pdo_Mysql
|
6045 |
+
* Removed getting Varien_Object id in Varien_Debug
|
6046 |
+
|
6047 |
+
=== Fixes ===
|
6048 |
+
* Fixed read/write connection issue during new customer order place. See http://www.magentocommerce.com/boards/viewthread/19363/P0/
|
6049 |
+
* Fixed confusion with admin page title when editing product
|
6050 |
+
* Fixed bug in Mage_Bundle_Model_Product_Type::getSelectionsCollection(): retrieved collection depends on passed optionIds only on first method call
|
6051 |
+
* Fixed: New products RSS feed appears instead of the Special products RSS feed
|
6052 |
+
* Fixed tax rule ZIP range matching (numeric values were matched as strings)
|
6053 |
+
* Fixed #14055: New orders RSS feed displaying incorrect customer name
|
6054 |
+
* Fixed #19192: Error when product inventory messed up on viewing order.
|
6055 |
+
* Fixed minor visual design issues in themes and skins
|
6056 |
+
* Fixed getting secure host URL in 404, 503 and report.php error pages
|
6057 |
+
* Fixed up filtering of filenames of uploaded files
|
6058 |
+
* Fixed position issue for cross-sell products
|
6059 |
+
* Fixed #20372: importing images
|
6060 |
+
* Fixed: #17845: Validation and Ampersand Flaws in Layered Navigation and other locations that use the fake query string
|
6061 |
+
* Fixed #15592: Mage_Adminhtml_Model_System_Config_Source_Shipping_Allowedmethods::toOptionArray() not compatiable with parent method
|
6062 |
+
* Made proper validate() independent of submit in form.js (Visions contribution)
|
6063 |
+
* Fixed incorrect js logic on order create backend page (Visions contribution):
|
6064 |
+
* Fixed: when create order, it is not possible to resubmit after initial validation failed (because submit button is disabled)
|
6065 |
+
* Improved client side validation that new order has shipping address (it is required to click "get shipping method and rates"
|
6066 |
+
* Improved client side validation that payment method is selected (like in checkout of frontend)
|
6067 |
+
* Improved usability of sales admin (Visions patch):
|
6068 |
+
* added ability to export csv or excel for orders, shipments, creditmemos, invoices
|
6069 |
+
* made filter for creditmemo and shipment type text so it is possible to just enter one id and find object looking for (unified with orders and invoices, there it is already text not number)
|
6070 |
+
* Fixed #17659: UPS Minimum Weight Required for Negotiated Rates
|
6071 |
+
* Fixed #20580: Index module not translated
|
6072 |
+
|
6073 |
+
=== Known Issues ===
|
6074 |
+
* It is impossible to run more than one 3D Secure card validations simultaneously in one session. Not fixable.
|
6075 |
+
|
6076 |
+
|
6077 |
+
|
6078 |
+
|
6079 |
+
==== 1.4.0.1 ====
|
6080 |
+
|
6081 |
+
=== Changes ===
|
6082 |
+
|
6083 |
+
* The error report exception printing is disabled by default for security reasons. To print the error report, copy the errors/local.xml.sample to errors/local.xml
|
6084 |
+
* XSS vulnerabilities review
|
6085 |
+
* Added Phoenix_Moneybookers payment method module (from now bundled in Magento out of the box)
|
6086 |
+
|
6087 |
+
=== Fixes ===
|
6088 |
+
|
6089 |
+
* Fixed #20680: Catalog - Google Sitemap
|
6090 |
+
* Fixed #20024: Error message 'Data saving problem' when try to checkout with multiple addresses (when address deleted during multishipping process)
|
6091 |
+
* Fixed #20625: Fatal error: Exception thrown without a stack frame in Unknown on line 0 (Fixed cache backend instantiation when a shared PEAR library is in the include path)
|
6092 |
+
* Fixed issues of upgrading from 1.3.x to 1.4.x through Magento Connect in some installations
|
6093 |
+
* Fixed #20659: Unable to choose images for upload (duplicates: #20588, #20573, #20616, #20595)
|
6094 |
+
* Fixed shell cron script runner
|
6095 |
+
* Refixed #17963: Ampersand in Search Breadcrumb: Double-encoded
|
6096 |
+
|
6097 |
+
=== Upgrade Notes ===
|
6098 |
+
|
6099 |
+
* We highly recommend disabling Magento cache before upgrading
|
6100 |
+
* In layout of any custom theme the usage of catalog/product_list_toolbar block should be changed to page/html_pager:
|
6101 |
+
1) Replace the catalog/product/list/toolbar.phtml of your theme by the new one
|
6102 |
+
2) Update catalog.xml layout: <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml"> should be replaced into <block type="page/html_pager" name="product_list_toolbar_pager"/>
|
6103 |
+
|
6104 |
+
|
6105 |
+
|
6106 |
+
|
6107 |
+
==== 1.4.0.0 ====
|
6108 |
+
|
6109 |
+
=== 1.4 Major Improvements since 1.3 ===
|
6110 |
+
* Implemented 3D Secure credit card validation (Visa and Mastercard)
|
6111 |
+
* Full reimplementation of PayPal modules, includes lot of new functionality and numerous bugfixes
|
6112 |
+
* Full review of frontend themes, introduced design cross-package fallback and the base/default theme. Includes SEO and accessibility enhancements. Changes are oriented to dramatically reduce themes maintenance.
|
6113 |
+
* Added ability to define arbitrary cache backends
|
6114 |
+
* Optimized performance of sales reports, added new sales report types
|
6115 |
+
* Added image/media uploader/browser, that can browse entire media folder
|
6116 |
+
* Optimized performance of search indexer
|
6117 |
+
* Made order processing workflow more informative and severe
|
6118 |
+
* Reimplemented 404 and report pages, introduced 503 page, specifically for maintenance purposes
|
6119 |
+
* Improved javascript files merging, added CSS files merging
|
6120 |
+
* Added Widgets functionality, added several widgets out of the box
|
6121 |
+
* Added Custom Variables functionality
|
6122 |
+
* Added lot of new System Configuration options
|
6123 |
+
* Improved order placement reliability
|
6124 |
+
* Added WYSIWYG for CMS and Catalog
|
6125 |
+
* Optimized cache initialization during startup
|
6126 |
+
* Optimized export from grids in admin area
|
6127 |
+
* Improved tax and discount totals calculation
|
6128 |
+
* Replaced admin notification flash popup into a simple HTML overlay
|
6129 |
+
* Implemented product and category URLs per store view
|
6130 |
+
* Added ability to configure entry point using virtualhost environment configuration, rather than creating another physical entry point
|
6131 |
+
* Optimized simple product view without custom options
|
6132 |
+
|
6133 |
+
=== Coommunity Edition Changes since 1.4.0.0-rc1 ===
|
6134 |
+
|
6135 |
+
== Improvements ==
|
6136 |
+
* Implemented 3D Secure credit card (Visa, Mastercard) validation for payment methods:
|
6137 |
+
* Saved CC
|
6138 |
+
* PayPal Website Payments Pro - Direct Payments
|
6139 |
+
* PayPal Website Payments Pro (Payflow Edition) - Direct Paymens
|
6140 |
+
* Payflow Pro
|
6141 |
+
* Improved modern theme: significantly reduced number of files in virtue of cross-package fallback to base/default theme
|
6142 |
+
* Implemented #11012: Support canonical link tag
|
6143 |
+
* Implemented WYSIWYG for newsletter templates
|
6144 |
+
* Minor improvements in sales reports
|
6145 |
+
* Renamed button "Refund" to "Refund Offline" on Credit Memo page for order
|
6146 |
+
* 19963: Mage_Eav_Model_Entity_Setup::addAttributeToGroup() (visions patch)
|
6147 |
+
* improved print.css for CE themes
|
6148 |
+
* SEO and accessibility improvements in default/default, default/modern and default/blank themes
|
6149 |
+
* left and right callouts templates, both callouts images and links are now controlled via catalog.xml
|
6150 |
+
* Added relevant page titles in admin area
|
6151 |
+
* Implemented column decorators and ability to use getter callback in admin grids
|
6152 |
+
* Made fetching payment methods sort order properly: via getConfigData() rather getStoreConfig() (optimization for 3rd-party customizations)
|
6153 |
+
* Implemented ability for page/html_wrapper block to not render the wrapper tag, made it output children sorted
|
6154 |
+
* Implemented wrappers for inserting additional blocks in:
|
6155 |
+
* before shopping cart line items list
|
6156 |
+
* before onepage checkout login/registration form
|
6157 |
+
* before customer registration form
|
6158 |
+
* before newsletter subcription form (customer "My Account")
|
6159 |
+
* before product review form
|
6160 |
+
* before product tag submission form (product view page)
|
6161 |
+
* Implemented giropay integration with PayPal Express Checkout
|
6162 |
+
* Added before/after initialize and before/after validate events to opcheckout.js
|
6163 |
+
* Optimized products toolbar functionality, prevent saving to session default grid parameters (for sorting, pager etc.)
|
6164 |
+
* Added filter by website in "Last ordered items" block
|
6165 |
+
|
6166 |
+
== Changes ===
|
6167 |
+
* PayPal Website Payments Pro (Payflow Edition) is completely rewritten, as extending Mage_Paypal module. With breaking code backwards compatibility.
|
6168 |
+
* Mage_Core_Model_Flag - moved setting flag_code to _construct()
|
6169 |
+
* AmazonPayments module is removed from package and will be available as a separate extension on Magento Connect
|
6170 |
+
* #19595: Varien_File_Uploader_Image not working - class is deprecated and should not be used
|
6171 |
+
* Marked dead code Mage_Checkout_Model_Type_Abstract::_emailOrderConfirmation() as deprecated
|
6172 |
+
* Reimplemented 404, 503 and report.php error pages: now fully configurable from errors/local.xml, with ability to override theme per entry point or even store view
|
6173 |
+
* error report doesn't disclose the trace by default anymore
|
6174 |
+
* Added to Catalog Product Price indexer upgrade operation by removing old temporary index tables if exists
|
6175 |
+
* Product image uploader security measurements:
|
6176 |
+
* disabled ability to run php scripts in "media" folder
|
6177 |
+
* added callback validation to File/Uploader.php
|
6178 |
+
* added image file validation to Catalog/Product/GalleryController.php
|
6179 |
+
* Prevented flushing output buffer caused by exceptions in templates included by core/template block
|
6180 |
+
* added default _type param to Design Package getters in core/design_package model
|
6181 |
+
* Added additional qty parameter to event 'catalog_product_get_final_price'
|
6182 |
+
* Updated sales sql-upgrades: fixed missing table prefixes in some places, rewrote adding foreign keys via methods
|
6183 |
+
* Implemented 'any-value-validate' logic for Catalog Rules; common methods moved to parent (Mage_CatalogRule_Model_Rule_Condition_Product) class
|
6184 |
+
* Expanded width of fields on product and category edit pages
|
6185 |
+
* Added ability to render number sign in currency and number grid renderers
|
6186 |
+
* Fixed datetime grid renderer to make it use getters (see parent class)
|
6187 |
+
* Added Mage_Core_Block_Abstract::escapeHtml() instead of htmlEscape()
|
6188 |
+
* Added ability to make output optional in page/html_pager block (when items total quantity is less than page size)
|
6189 |
+
* Added ability disable product list toolbar params saving to session
|
6190 |
+
* Added sorting by param name to query params part of url
|
6191 |
+
* Made page/html_wrapper block treat children empty output as if there are no children.
|
6192 |
+
* Implemented dynamic BN codes for PayPal. Pattern: Varien_Cart_(EC|DP|WPS)[_<country_code>] where country code is one of 18 country codes currently PayPal has localized market sites. * Fixed session cookie renew functionality, added ability define cookie settings for javescript methods
|
6193 |
+
* When LN filter for an anchor category is active not allow to use display mode "Static Block Only"
|
6194 |
+
* Sales: made online operations and notifications updating "online" totals, instead of totals mixed with online/offline sales documents. Removed updating "base_amount_canceled" total update when voided payment (this was backwards compatibility violation)
|
6195 |
+
|
6196 |
+
== Fixes ==
|
6197 |
+
* Fixed 'tax_rate_data_fetch' event params
|
6198 |
+
* Minor fixes in PayPal Express Checkout and PayPal Direct (non-reported bugs, terminology issues)
|
6199 |
+
* Fixed #16210: Input field size decreased in category products grid
|
6200 |
+
* Fixed #17281: Google Checkout: Incorrect assigning of [parent_id]
|
6201 |
+
* Fixed #14251: Google Checkout still does not allow free shipping
|
6202 |
+
* Fixed #11412: Rounding error in tax and shipping calculation
|
6203 |
+
* Fixed #11836: No authentication on customer reviews url
|
6204 |
+
* Fixed #13511: "Default web url" does not work as expected
|
6205 |
+
* Fixed #14469: Newly created products for configurable products do not stick
|
6206 |
+
* Fixed #14915: Invoice payment capture _needToAddDummy bug
|
6207 |
+
* Fixed #15235: Special price bug with multiple websites
|
6208 |
+
* Fixed #16425: printing in admin breaks top menu
|
6209 |
+
* Fixed #16499: Require customer login for reviews not 100% working
|
6210 |
+
* Fixed #17058: Currency Switch won't work on first time in shop frontend (session id issue)
|
6211 |
+
* Fixed #17504: Birthday getting swapped (Month and Day)
|
6212 |
+
* Fixed #17720: core_flag primary key is a smallint and has a max value of 65535
|
6213 |
+
* Fixed #17793: Google Base Special Price not mapped to Price
|
6214 |
+
* Fixed #Fixed #18127: Bundle Products pricing incorrectly when not required
|
6215 |
+
* Fixed #18341: Bugs in dataflow: number of records
|
6216 |
+
* Fixed #18745: Customer Import shouldn't send email
|
6217 |
+
* Fixed #18868: Unable to use Mage::log() before config is read
|
6218 |
+
* Fixed #19290: Changing 'My Account' info may destroy log in when password is blank
|
6219 |
+
* Fixed some XSS vulnerabilities in admin
|
6220 |
+
* Fixed #19448: Incorrect handling of empty attributes under PHP 5.2.0
|
6221 |
+
* Fixed #19449: Google Base
|
6222 |
+
* Fixed USPS First Class International and USPS Express Mail International shipping method that stopped working after gateway changes
|
6223 |
+
* Fixed #19512: /index.php/checkout/onepage/getAddress/address/ allows everyone logged in to get all addresses
|
6224 |
+
* Tax rates edit form won't clean on validation error anymore
|
6225 |
+
* Fixed #19702: getLastOrderId missing parameter
|
6226 |
+
* Fixed #19729: unable to translate "Display product options in" and "Product Type"
|
6227 |
+
* Fixed #19753: Compare products page breaks if no attributes are marked as "Comparable"
|
6228 |
+
* Fixed #19791: Shipment tracking not displayed from admin panel with store code in URLs enabled
|
6229 |
+
* Fixed #19838: missing two escape characters in validation.js at the validate-email regex
|
6230 |
+
* Fixed #19873: Minor warning fix
|
6231 |
+
* Fixed #19904: please remove double file extensions in filenames of uploaded files
|
6232 |
+
* Fixed #19954: Undefined variable
|
6233 |
+
* Fixed #19960: Google Analytics Asynchronous Tracking Code
|
6234 |
+
* Fixed #19964: cart sidebar shows zero total when displayed including tax
|
6235 |
+
* Fixed #19969: Css is wong for gift-message-form
|
6236 |
+
* Fixed #20023: Admin login is very slow when widgets.magentocommerce.com is down
|
6237 |
+
* Fixed #20080: Dataflow Profiles Need to be Sorted
|
6238 |
+
* Fixed #20250: Search'n'replace oversight
|
6239 |
+
* A few fixes in URL rewrites logic
|
6240 |
+
* Fixed #20350: WRONG "XML_PATH_SCHEDULE_GENERATE_EVERY"
|
6241 |
+
* Fixed #20361: Move Category Failed
|
6242 |
+
* Fixed #6564: Transactional Email Templates Using alt="Magento"
|
6243 |
+
* Fixed #8514: Negative Number in Sorting
|
6244 |
+
* Fixed Price indexer website date/rate
|
6245 |
+
* Fixed tier_price and website table names in Catalog Product Price Default indexer
|
6246 |
+
* Fixed command line installation - fatal caused by improper website initialization
|
6247 |
+
* Implemented correct setting attributes to entity including situation when there are no attribute value for default sore
|
6248 |
+
* Fixed #19263: Adminhtml Html Error: Double </label>
|
6249 |
+
* Fixed "undefined index" notice when saving Table Rates without uploading import rates file.
|
app/.htaccess
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
Order deny,allow
|
2 |
+
Deny from all
|
app/Mage.php
ADDED
@@ -0,0 +1,912 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Core
|
23 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
define('DS', DIRECTORY_SEPARATOR);
|
28 |
+
define('PS', PATH_SEPARATOR);
|
29 |
+
define('BP', dirname(dirname(__FILE__)));
|
30 |
+
|
31 |
+
Mage::register('original_include_path', get_include_path());
|
32 |
+
|
33 |
+
if (defined('COMPILER_INCLUDE_PATH')) {
|
34 |
+
$appPath = COMPILER_INCLUDE_PATH;
|
35 |
+
set_include_path($appPath . PS . Mage::registry('original_include_path'));
|
36 |
+
include_once "Mage_Core_functions.php";
|
37 |
+
include_once "Varien_Autoload.php";
|
38 |
+
} else {
|
39 |
+
/**
|
40 |
+
* Set include path
|
41 |
+
*/
|
42 |
+
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'local';
|
43 |
+
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'community';
|
44 |
+
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'core';
|
45 |
+
$paths[] = BP . DS . 'lib';
|
46 |
+
|
47 |
+
$appPath = implode(PS, $paths);
|
48 |
+
set_include_path($appPath . PS . Mage::registry('original_include_path'));
|
49 |
+
include_once "Mage/Core/functions.php";
|
50 |
+
include_once "Varien/Autoload.php";
|
51 |
+
}
|
52 |
+
|
53 |
+
Varien_Autoload::register();
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Main Mage hub class
|
57 |
+
*
|
58 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
59 |
+
*/
|
60 |
+
final class Mage
|
61 |
+
{
|
62 |
+
/**
|
63 |
+
* Registry collection
|
64 |
+
*
|
65 |
+
* @var array
|
66 |
+
*/
|
67 |
+
static private $_registry = array();
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Application root absolute path
|
71 |
+
*
|
72 |
+
* @var string
|
73 |
+
*/
|
74 |
+
static private $_appRoot;
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Application model
|
78 |
+
*
|
79 |
+
* @var Mage_Core_Model_App
|
80 |
+
*/
|
81 |
+
static private $_app;
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Config Model
|
85 |
+
*
|
86 |
+
* @var Mage_Core_Model_Config
|
87 |
+
*/
|
88 |
+
static private $_config;
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Event Collection Object
|
92 |
+
*
|
93 |
+
* @var Varien_Event_Collection
|
94 |
+
*/
|
95 |
+
static private $_events;
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Object cache instance
|
99 |
+
*
|
100 |
+
* @var Varien_Object_Cache
|
101 |
+
*/
|
102 |
+
static private $_objects;
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Is downloader flag
|
106 |
+
*
|
107 |
+
* @var bool
|
108 |
+
*/
|
109 |
+
static private $_isDownloader = false;
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Is developer mode flag
|
113 |
+
*
|
114 |
+
* @var bool
|
115 |
+
*/
|
116 |
+
static private $_isDeveloperMode = false;
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Is allow throw Exception about headers already sent
|
120 |
+
*
|
121 |
+
* @var bool
|
122 |
+
*/
|
123 |
+
public static $headersSentThrowsException = true;
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Is installed flag
|
127 |
+
*
|
128 |
+
* @var bool
|
129 |
+
*/
|
130 |
+
static private $_isInstalled;
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Gets the current Magento version string
|
134 |
+
* @link http://www.magentocommerce.com/blog/new-community-edition-release-process/
|
135 |
+
*
|
136 |
+
* @return string
|
137 |
+
*/
|
138 |
+
public static function getVersion()
|
139 |
+
{
|
140 |
+
$i = self::getVersionInfo();
|
141 |
+
return trim("{$i['major']}.{$i['minor']}.{$i['revision']}" . ($i['patch'] != '' ? ".{$i['patch']}" : "") . "-{$i['stability']}{$i['number']}", '.-');
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Gets the detailed Magento version information
|
146 |
+
* @link http://www.magentocommerce.com/blog/new-community-edition-release-process/
|
147 |
+
*
|
148 |
+
* @return array
|
149 |
+
*/
|
150 |
+
public static function getVersionInfo()
|
151 |
+
{
|
152 |
+
return array(
|
153 |
+
'major' => '1',
|
154 |
+
'minor' => '6',
|
155 |
+
'revision' => '1',
|
156 |
+
'patch' => '0',
|
157 |
+
'stability' => '',
|
158 |
+
'number' => '',
|
159 |
+
);
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Set all my static data to defaults
|
164 |
+
*
|
165 |
+
*/
|
166 |
+
public static function reset()
|
167 |
+
{
|
168 |
+
self::$_registry = array();
|
169 |
+
self::$_app = null;
|
170 |
+
self::$_config = null;
|
171 |
+
self::$_events = null;
|
172 |
+
self::$_objects = null;
|
173 |
+
self::$_isDownloader = false;
|
174 |
+
self::$_isDeveloperMode = false;
|
175 |
+
// do not reset $headersSentThrowsException
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Register a new variable
|
180 |
+
*
|
181 |
+
* @param string $key
|
182 |
+
* @param mixed $value
|
183 |
+
* @param bool $graceful
|
184 |
+
* @throws Mage_Core_Exception
|
185 |
+
*/
|
186 |
+
public static function register($key, $value, $graceful = false)
|
187 |
+
{
|
188 |
+
if (isset(self::$_registry[$key])) {
|
189 |
+
if ($graceful) {
|
190 |
+
return;
|
191 |
+
}
|
192 |
+
self::throwException('Mage registry key "'.$key.'" already exists');
|
193 |
+
}
|
194 |
+
self::$_registry[$key] = $value;
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Unregister a variable from register by key
|
199 |
+
*
|
200 |
+
* @param string $key
|
201 |
+
*/
|
202 |
+
public static function unregister($key)
|
203 |
+
{
|
204 |
+
if (isset(self::$_registry[$key])) {
|
205 |
+
if (is_object(self::$_registry[$key]) && (method_exists(self::$_registry[$key], '__destruct'))) {
|
206 |
+
self::$_registry[$key]->__destruct();
|
207 |
+
}
|
208 |
+
unset(self::$_registry[$key]);
|
209 |
+
}
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Retrieve a value from registry by a key
|
214 |
+
*
|
215 |
+
* @param string $key
|
216 |
+
* @return mixed
|
217 |
+
*/
|
218 |
+
public static function registry($key)
|
219 |
+
{
|
220 |
+
if (isset(self::$_registry[$key])) {
|
221 |
+
return self::$_registry[$key];
|
222 |
+
}
|
223 |
+
return null;
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Set application root absolute path
|
228 |
+
*
|
229 |
+
* @param string $appRoot
|
230 |
+
* @throws Mage_Core_Exception
|
231 |
+
*/
|
232 |
+
public static function setRoot($appRoot = '')
|
233 |
+
{
|
234 |
+
if (self::$_appRoot) {
|
235 |
+
return ;
|
236 |
+
}
|
237 |
+
|
238 |
+
if ('' === $appRoot) {
|
239 |
+
// automagically find application root by dirname of Mage.php
|
240 |
+
$appRoot = dirname(__FILE__);
|
241 |
+
}
|
242 |
+
|
243 |
+
$appRoot = realpath($appRoot);
|
244 |
+
|
245 |
+
if (is_dir($appRoot) and is_readable($appRoot)) {
|
246 |
+
self::$_appRoot = $appRoot;
|
247 |
+
} else {
|
248 |
+
self::throwException($appRoot . ' is not a directory or not readable by this user');
|
249 |
+
}
|
250 |
+
}
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Retrieve application root absolute path
|
254 |
+
*
|
255 |
+
* @return string
|
256 |
+
*/
|
257 |
+
public static function getRoot()
|
258 |
+
{
|
259 |
+
return self::$_appRoot;
|
260 |
+
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Retrieve Events Collection
|
264 |
+
*
|
265 |
+
* @return Varien_Event_Collection $collection
|
266 |
+
*/
|
267 |
+
public static function getEvents()
|
268 |
+
{
|
269 |
+
return self::$_events;
|
270 |
+
}
|
271 |
+
|
272 |
+
/**
|
273 |
+
* Varien Objects Cache
|
274 |
+
*
|
275 |
+
* @param string $key optional, if specified will load this key
|
276 |
+
* @return Varien_Object_Cache
|
277 |
+
*/
|
278 |
+
public static function objects($key = null)
|
279 |
+
{
|
280 |
+
if (!self::$_objects) {
|
281 |
+
self::$_objects = new Varien_Object_Cache;
|
282 |
+
}
|
283 |
+
if (is_null($key)) {
|
284 |
+
return self::$_objects;
|
285 |
+
} else {
|
286 |
+
return self::$_objects->load($key);
|
287 |
+
}
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Retrieve application root absolute path
|
292 |
+
*
|
293 |
+
* @param string $type
|
294 |
+
* @return string
|
295 |
+
*/
|
296 |
+
public static function getBaseDir($type = 'base')
|
297 |
+
{
|
298 |
+
return self::getConfig()->getOptions()->getDir($type);
|
299 |
+
}
|
300 |
+
|
301 |
+
/**
|
302 |
+
* Retrieve module absolute path by directory type
|
303 |
+
*
|
304 |
+
* @param string $type
|
305 |
+
* @param string $moduleName
|
306 |
+
* @return string
|
307 |
+
*/
|
308 |
+
public static function getModuleDir($type, $moduleName)
|
309 |
+
{
|
310 |
+
return self::getConfig()->getModuleDir($type, $moduleName);
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Retrieve config value for store by path
|
315 |
+
*
|
316 |
+
* @param string $path
|
317 |
+
* @param mixed $store
|
318 |
+
* @return mixed
|
319 |
+
*/
|
320 |
+
public static function getStoreConfig($path, $store = null)
|
321 |
+
{
|
322 |
+
return self::app()->getStore($store)->getConfig($path);
|
323 |
+
}
|
324 |
+
|
325 |
+
/**
|
326 |
+
* Retrieve config flag for store by path
|
327 |
+
*
|
328 |
+
* @param string $path
|
329 |
+
* @param mixed $store
|
330 |
+
* @return bool
|
331 |
+
*/
|
332 |
+
public static function getStoreConfigFlag($path, $store = null)
|
333 |
+
{
|
334 |
+
$flag = strtolower(self::getStoreConfig($path, $store));
|
335 |
+
if (!empty($flag) && 'false' !== $flag) {
|
336 |
+
return true;
|
337 |
+
} else {
|
338 |
+
return false;
|
339 |
+
}
|
340 |
+
}
|
341 |
+
|
342 |
+
/**
|
343 |
+
* Get base URL path by type
|
344 |
+
*
|
345 |
+
* @param string $type
|
346 |
+
* @return string
|
347 |
+
*/
|
348 |
+
public static function getBaseUrl($type = Mage_Core_Model_Store::URL_TYPE_LINK, $secure = null)
|
349 |
+
{
|
350 |
+
return self::app()->getStore()->getBaseUrl($type, $secure);
|
351 |
+
}
|
352 |
+
|
353 |
+
/**
|
354 |
+
* Generate url by route and parameters
|
355 |
+
*
|
356 |
+
* @param string $route
|
357 |
+
* @param array $params
|
358 |
+
* @return string
|
359 |
+
*/
|
360 |
+
public static function getUrl($route = '', $params = array())
|
361 |
+
{
|
362 |
+
return self::getModel('core/url')->getUrl($route, $params);
|
363 |
+
}
|
364 |
+
|
365 |
+
/**
|
366 |
+
* Get design package singleton
|
367 |
+
*
|
368 |
+
* @return Mage_Core_Model_Design_Package
|
369 |
+
*/
|
370 |
+
public static function getDesign()
|
371 |
+
{
|
372 |
+
return self::getSingleton('core/design_package');
|
373 |
+
}
|
374 |
+
|
375 |
+
/**
|
376 |
+
* Retrieve a config instance
|
377 |
+
*
|
378 |
+
* @return Mage_Core_Model_Config
|
379 |
+
*/
|
380 |
+
public static function getConfig()
|
381 |
+
{
|
382 |
+
return self::$_config;
|
383 |
+
}
|
384 |
+
|
385 |
+
/**
|
386 |
+
* Add observer to even object
|
387 |
+
*
|
388 |
+
* @param string $eventName
|
389 |
+
* @param callback $callback
|
390 |
+
* @param array $arguments
|
391 |
+
* @param string $observerName
|
392 |
+
*/
|
393 |
+
public static function addObserver($eventName, $callback, $data = array(), $observerName = '', $observerClass = '')
|
394 |
+
{
|
395 |
+
if ($observerClass == '') {
|
396 |
+
$observerClass = 'Varien_Event_Observer';
|
397 |
+
}
|
398 |
+
$observer = new $observerClass();
|
399 |
+
$observer->setName($observerName)->addData($data)->setEventName($eventName)->setCallback($callback);
|
400 |
+
return self::getEvents()->addObserver($observer);
|
401 |
+
}
|
402 |
+
|
403 |
+
/**
|
404 |
+
* Dispatch event
|
405 |
+
*
|
406 |
+
* Calls all observer callbacks registered for this event
|
407 |
+
* and multiobservers matching event name pattern
|
408 |
+
*
|
409 |
+
* @param string $name
|
410 |
+
* @param array $args
|
411 |
+
* @return Mage_Core_Model_App
|
412 |
+
*/
|
413 |
+
public static function dispatchEvent($name, array $data = array())
|
414 |
+
{
|
415 |
+
Varien_Profiler::start('DISPATCH EVENT:'.$name);
|
416 |
+
$result = self::app()->dispatchEvent($name, $data);
|
417 |
+
#$result = self::registry('events')->dispatch($name, $data);
|
418 |
+
Varien_Profiler::stop('DISPATCH EVENT:'.$name);
|
419 |
+
return $result;
|
420 |
+
}
|
421 |
+
|
422 |
+
/**
|
423 |
+
* Retrieve model object
|
424 |
+
*
|
425 |
+
* @link Mage_Core_Model_Config::getModelInstance
|
426 |
+
* @param string $modelClass
|
427 |
+
* @param array $arguments
|
428 |
+
* @return Mage_Core_Model_Abstract
|
429 |
+
*/
|
430 |
+
public static function getModel($modelClass = '', $arguments = array())
|
431 |
+
{
|
432 |
+
return self::getConfig()->getModelInstance($modelClass, $arguments);
|
433 |
+
}
|
434 |
+
|
435 |
+
/**
|
436 |
+
* Retrieve model object singleton
|
437 |
+
*
|
438 |
+
* @param string $modelClass
|
439 |
+
* @param array $arguments
|
440 |
+
* @return Mage_Core_Model_Abstract
|
441 |
+
*/
|
442 |
+
public static function getSingleton($modelClass='', array $arguments=array())
|
443 |
+
{
|
444 |
+
$registryKey = '_singleton/'.$modelClass;
|
445 |
+
if (!self::registry($registryKey)) {
|
446 |
+
self::register($registryKey, self::getModel($modelClass, $arguments));
|
447 |
+
}
|
448 |
+
return self::registry($registryKey);
|
449 |
+
}
|
450 |
+
|
451 |
+
/**
|
452 |
+
* Retrieve object of resource model
|
453 |
+
*
|
454 |
+
* @param string $modelClass
|
455 |
+
* @param array $arguments
|
456 |
+
* @return Object
|
457 |
+
*/
|
458 |
+
public static function getResourceModel($modelClass, $arguments = array())
|
459 |
+
{
|
460 |
+
return self::getConfig()->getResourceModelInstance($modelClass, $arguments);
|
461 |
+
}
|
462 |
+
|
463 |
+
/**
|
464 |
+
* Retrieve Controller instance by ClassName
|
465 |
+
*
|
466 |
+
* @param string $class
|
467 |
+
* @param Mage_Core_Controller_Request_Http $request
|
468 |
+
* @param Mage_Core_Controller_Response_Http $response
|
469 |
+
* @param array $invokeArgs
|
470 |
+
* @return Mage_Core_Controller_Front_Action
|
471 |
+
*/
|
472 |
+
public static function getControllerInstance($class, $request, $response, array $invokeArgs = array())
|
473 |
+
{
|
474 |
+
return new $class($request, $response, $invokeArgs);
|
475 |
+
}
|
476 |
+
|
477 |
+
/**
|
478 |
+
* Retrieve resource vodel object singleton
|
479 |
+
*
|
480 |
+
* @param string $modelClass
|
481 |
+
* @param array $arguments
|
482 |
+
* @return object
|
483 |
+
*/
|
484 |
+
public static function getResourceSingleton($modelClass = '', array $arguments = array())
|
485 |
+
{
|
486 |
+
$registryKey = '_resource_singleton/'.$modelClass;
|
487 |
+
if (!self::registry($registryKey)) {
|
488 |
+
self::register($registryKey, self::getResourceModel($modelClass, $arguments));
|
489 |
+
}
|
490 |
+
return self::registry($registryKey);
|
491 |
+
}
|
492 |
+
|
493 |
+
/**
|
494 |
+
* Deprecated, use self::helper()
|
495 |
+
*
|
496 |
+
* @param string $type
|
497 |
+
* @return object
|
498 |
+
*/
|
499 |
+
public static function getBlockSingleton($type)
|
500 |
+
{
|
501 |
+
$action = self::app()->getFrontController()->getAction();
|
502 |
+
return $action ? $action->getLayout()->getBlockSingleton($type) : false;
|
503 |
+
}
|
504 |
+
|
505 |
+
/**
|
506 |
+
* Retrieve helper object
|
507 |
+
*
|
508 |
+
* @param string $name the helper name
|
509 |
+
* @return Mage_Core_Helper_Abstract
|
510 |
+
*/
|
511 |
+
public static function helper($name)
|
512 |
+
{
|
513 |
+
$registryKey = '_helper/' . $name;
|
514 |
+
if (!self::registry($registryKey)) {
|
515 |
+
$helperClass = self::getConfig()->getHelperClassName($name);
|
516 |
+
self::register($registryKey, new $helperClass);
|
517 |
+
}
|
518 |
+
return self::registry($registryKey);
|
519 |
+
}
|
520 |
+
|
521 |
+
/**
|
522 |
+
* Retreive resource helper object
|
523 |
+
*
|
524 |
+
* @param string $moduleName
|
525 |
+
* @return Mage_Core_Model_Resource_Helper_Abstract
|
526 |
+
*/
|
527 |
+
public static function getResourceHelper($moduleName)
|
528 |
+
{
|
529 |
+
$registryKey = '_resource_helper/' . $moduleName;
|
530 |
+
if (!self::registry($registryKey)) {
|
531 |
+
$helperClass = self::getConfig()->getResourceHelper($moduleName);
|
532 |
+
self::register($registryKey, $helperClass);
|
533 |
+
}
|
534 |
+
|
535 |
+
return self::registry($registryKey);
|
536 |
+
}
|
537 |
+
|
538 |
+
/**
|
539 |
+
* Return new exception by module to be thrown
|
540 |
+
*
|
541 |
+
* @param string $module
|
542 |
+
* @param string $message
|
543 |
+
* @param integer $code
|
544 |
+
* @return Mage_Core_Exception
|
545 |
+
*/
|
546 |
+
public static function exception($module = 'Mage_Core', $message = '', $code = 0)
|
547 |
+
{
|
548 |
+
$className = $module . '_Exception';
|
549 |
+
return new $className($message, $code);
|
550 |
+
}
|
551 |
+
|
552 |
+
/**
|
553 |
+
* Throw Exception
|
554 |
+
*
|
555 |
+
* @param string $message
|
556 |
+
* @param string $messageStorage
|
557 |
+
*/
|
558 |
+
public static function throwException($message, $messageStorage = null)
|
559 |
+
{
|
560 |
+
if ($messageStorage && ($storage = self::getSingleton($messageStorage))) {
|
561 |
+
$storage->addError($message);
|
562 |
+
}
|
563 |
+
throw new Mage_Core_Exception($message);
|
564 |
+
}
|
565 |
+
|
566 |
+
/**
|
567 |
+
* Get initialized application object.
|
568 |
+
*
|
569 |
+
* @param string $code
|
570 |
+
* @param string $type
|
571 |
+
* @param string|array $options
|
572 |
+
* @return Mage_Core_Model_App
|
573 |
+
*/
|
574 |
+
public static function app($code = '', $type = 'store', $options = array())
|
575 |
+
{
|
576 |
+
if (null === self::$_app) {
|
577 |
+
self::$_app = new Mage_Core_Model_App();
|
578 |
+
self::setRoot();
|
579 |
+
self::$_events = new Varien_Event_Collection();
|
580 |
+
self::$_config = new Mage_Core_Model_Config($options);
|
581 |
+
|
582 |
+
Varien_Profiler::start('self::app::init');
|
583 |
+
self::$_app->init($code, $type, $options);
|
584 |
+
Varien_Profiler::stop('self::app::init');
|
585 |
+
self::$_app->loadAreaPart(Mage_Core_Model_App_Area::AREA_GLOBAL, Mage_Core_Model_App_Area::PART_EVENTS);
|
586 |
+
}
|
587 |
+
return self::$_app;
|
588 |
+
}
|
589 |
+
|
590 |
+
/**
|
591 |
+
* @static
|
592 |
+
* @param string $code
|
593 |
+
* @param string $type
|
594 |
+
* @param array $options
|
595 |
+
* @param string|array $modules
|
596 |
+
*/
|
597 |
+
public static function init($code = '', $type = 'store', $options = array(), $modules = array())
|
598 |
+
{
|
599 |
+
try {
|
600 |
+
self::setRoot();
|
601 |
+
self::$_app = new Mage_Core_Model_App();
|
602 |
+
self::$_config = new Mage_Core_Model_Config();
|
603 |
+
|
604 |
+
if (!empty($modules)) {
|
605 |
+
self::$_app->initSpecified($code, $type, $options, $modules);
|
606 |
+
} else {
|
607 |
+
self::$_app->init($code, $type, $options);
|
608 |
+
}
|
609 |
+
} catch (Mage_Core_Model_Session_Exception $e) {
|
610 |
+
header('Location: ' . self::getBaseUrl());
|
611 |
+
die;
|
612 |
+
} catch (Mage_Core_Model_Store_Exception $e) {
|
613 |
+
require_once(self::getBaseDir() . DS . 'errors' . DS . '404.php');
|
614 |
+
die;
|
615 |
+
} catch (Exception $e) {
|
616 |
+
self::printException($e);
|
617 |
+
die;
|
618 |
+
}
|
619 |
+
}
|
620 |
+
|
621 |
+
/**
|
622 |
+
* Front end main entry point
|
623 |
+
*
|
624 |
+
* @param string $code
|
625 |
+
* @param string $type
|
626 |
+
* @param string|array $options
|
627 |
+
*/
|
628 |
+
public static function run($code = '', $type = 'store', $options = array())
|
629 |
+
{
|
630 |
+
try {
|
631 |
+
Varien_Profiler::start('mage');
|
632 |
+
self::setRoot();
|
633 |
+
self::$_app = new Mage_Core_Model_App();
|
634 |
+
self::$_events = new Varien_Event_Collection();
|
635 |
+
self::$_config = new Mage_Core_Model_Config($options);
|
636 |
+
self::$_app->run(array(
|
637 |
+
'scope_code' => $code,
|
638 |
+
'scope_type' => $type,
|
639 |
+
'options' => $options,
|
640 |
+
));
|
641 |
+
Varien_Profiler::stop('mage');
|
642 |
+
} catch (Mage_Core_Model_Session_Exception $e) {
|
643 |
+
header('Location: ' . self::getBaseUrl());
|
644 |
+
die();
|
645 |
+
} catch (Mage_Core_Model_Store_Exception $e) {
|
646 |
+
require_once(self::getBaseDir() . DS . 'errors' . DS . '404.php');
|
647 |
+
die();
|
648 |
+
} catch (Exception $e) {
|
649 |
+
if (self::isInstalled() || self::$_isDownloader) {
|
650 |
+
self::printException($e);
|
651 |
+
exit();
|
652 |
+
}
|
653 |
+
try {
|
654 |
+
self::dispatchEvent('mage_run_exception', array('exception' => $e));
|
655 |
+
if (!headers_sent()) {
|
656 |
+
header('Location:' . self::getUrl('install'));
|
657 |
+
} else {
|
658 |
+
self::printException($e);
|
659 |
+
}
|
660 |
+
} catch (Exception $ne) {
|
661 |
+
self::printException($ne, $e->getMessage());
|
662 |
+
}
|
663 |
+
}
|
664 |
+
}
|
665 |
+
|
666 |
+
/**
|
667 |
+
* Retrieve application installation flag
|
668 |
+
*
|
669 |
+
* @param string|array $options
|
670 |
+
* @return bool
|
671 |
+
*/
|
672 |
+
public static function isInstalled($options = array())
|
673 |
+
{
|
674 |
+
if (self::$_isInstalled === null) {
|
675 |
+
self::setRoot();
|
676 |
+
|
677 |
+
if (is_string($options)) {
|
678 |
+
$options = array('etc_dir' => $options);
|
679 |
+
}
|
680 |
+
$etcDir = self::getRoot() . DS . 'etc';
|
681 |
+
if (!empty($options['etc_dir'])) {
|
682 |
+
$etcDir = $options['etc_dir'];
|
683 |
+
}
|
684 |
+
$localConfigFile = $etcDir . DS . 'local.xml';
|
685 |
+
|
686 |
+
self::$_isInstalled = false;
|
687 |
+
|
688 |
+
if (is_readable($localConfigFile)) {
|
689 |
+
$localConfig = simplexml_load_file($localConfigFile);
|
690 |
+
date_default_timezone_set('UTC');
|
691 |
+
if (($date = $localConfig->global->install->date) && strtotime($date)) {
|
692 |
+
self::$_isInstalled = true;
|
693 |
+
}
|
694 |
+
}
|
695 |
+
}
|
696 |
+
return self::$_isInstalled;
|
697 |
+
}
|
698 |
+
|
699 |
+
/**
|
700 |
+
* log facility (??)
|
701 |
+
*
|
702 |
+
* @param string $message
|
703 |
+
* @param integer $level
|
704 |
+
* @param string $file
|
705 |
+
* @param bool $forceLog
|
706 |
+
*/
|
707 |
+
public static function log($message, $level = null, $file = '', $forceLog = false)
|
708 |
+
{
|
709 |
+
if (!self::getConfig()) {
|
710 |
+
return;
|
711 |
+
}
|
712 |
+
|
713 |
+
try {
|
714 |
+
$logActive = self::getStoreConfig('dev/log/active');
|
715 |
+
if (empty($file)) {
|
716 |
+
$file = self::getStoreConfig('dev/log/file');
|
717 |
+
}
|
718 |
+
}
|
719 |
+
catch (Exception $e) {
|
720 |
+
$logActive = true;
|
721 |
+
}
|
722 |
+
|
723 |
+
if (!self::$_isDeveloperMode && !$logActive && !$forceLog) {
|
724 |
+
return;
|
725 |
+
}
|
726 |
+
|
727 |
+
static $loggers = array();
|
728 |
+
|
729 |
+
$level = is_null($level) ? Zend_Log::DEBUG : $level;
|
730 |
+
$file = empty($file) ? 'system.log' : $file;
|
731 |
+
|
732 |
+
try {
|
733 |
+
if (!isset($loggers[$file])) {
|
734 |
+
$logDir = self::getBaseDir('var') . DS . 'log';
|
735 |
+
$logFile = $logDir . DS . $file;
|
736 |
+
|
737 |
+
if (!is_dir($logDir)) {
|
738 |
+
mkdir($logDir);
|
739 |
+
chmod($logDir, 0777);
|
740 |
+
}
|
741 |
+
|
742 |
+
if (!file_exists($logFile)) {
|
743 |
+
file_put_contents($logFile, '');
|
744 |
+
chmod($logFile, 0777);
|
745 |
+
}
|
746 |
+
|
747 |
+
$format = '%timestamp% %priorityName% (%priority%): %message%' . PHP_EOL;
|
748 |
+
$formatter = new Zend_Log_Formatter_Simple($format);
|
749 |
+
$writerModel = (string)self::getConfig()->getNode('global/log/core/writer_model');
|
750 |
+
if (!self::$_app || !$writerModel) {
|
751 |
+
$writer = new Zend_Log_Writer_Stream($logFile);
|
752 |
+
}
|
753 |
+
else {
|
754 |
+
$writer = new $writerModel($logFile);
|
755 |
+
}
|
756 |
+
$writer->setFormatter($formatter);
|
757 |
+
$loggers[$file] = new Zend_Log($writer);
|
758 |
+
}
|
759 |
+
|
760 |
+
if (is_array($message) || is_object($message)) {
|
761 |
+
$message = print_r($message, true);
|
762 |
+
}
|
763 |
+
|
764 |
+
$loggers[$file]->log($message, $level);
|
765 |
+
}
|
766 |
+
catch (Exception $e) {
|
767 |
+
}
|
768 |
+
}
|
769 |
+
|
770 |
+
/**
|
771 |
+
* Write exception to log
|
772 |
+
*
|
773 |
+
* @param Exception $e
|
774 |
+
*/
|
775 |
+
public static function logException(Exception $e)
|
776 |
+
{
|
777 |
+
if (!self::getConfig()) {
|
778 |
+
return;
|
779 |
+
}
|
780 |
+
$file = self::getStoreConfig('dev/log/exception_file');
|
781 |
+
self::log("\n" . $e->__toString(), Zend_Log::ERR, $file);
|
782 |
+
}
|
783 |
+
|
784 |
+
/**
|
785 |
+
* Set enabled developer mode
|
786 |
+
*
|
787 |
+
* @param bool $mode
|
788 |
+
* @return bool
|
789 |
+
*/
|
790 |
+
public static function setIsDeveloperMode($mode)
|
791 |
+
{
|
792 |
+
self::$_isDeveloperMode = (bool)$mode;
|
793 |
+
return self::$_isDeveloperMode;
|
794 |
+
}
|
795 |
+
|
796 |
+
/**
|
797 |
+
* Retrieve enabled developer mode
|
798 |
+
*
|
799 |
+
* @return bool
|
800 |
+
*/
|
801 |
+
public static function getIsDeveloperMode()
|
802 |
+
{
|
803 |
+
return self::$_isDeveloperMode;
|
804 |
+
}
|
805 |
+
|
806 |
+
/**
|
807 |
+
* Display exception
|
808 |
+
*
|
809 |
+
* @param Exception $e
|
810 |
+
*/
|
811 |
+
public static function printException(Exception $e, $extra = '')
|
812 |
+
{
|
813 |
+
if (self::$_isDeveloperMode) {
|
814 |
+
print '<pre>';
|
815 |
+
|
816 |
+
if (!empty($extra)) {
|
817 |
+
print $extra . "\n\n";
|
818 |
+
}
|
819 |
+
|
820 |
+
print $e->getMessage() . "\n\n";
|
821 |
+
print $e->getTraceAsString();
|
822 |
+
print '</pre>';
|
823 |
+
} else {
|
824 |
+
|
825 |
+
$reportData = array(
|
826 |
+
!empty($extra) ? $extra . "\n\n" : '' . $e->getMessage(),
|
827 |
+
$e->getTraceAsString()
|
828 |
+
);
|
829 |
+
|
830 |
+
// retrieve server data
|
831 |
+
if (isset($_SERVER)) {
|
832 |
+
if (isset($_SERVER['REQUEST_URI'])) {
|
833 |
+
$reportData['url'] = $_SERVER['REQUEST_URI'];
|
834 |
+
}
|
835 |
+
if (isset($_SERVER['SCRIPT_NAME'])) {
|
836 |
+
$reportData['script_name'] = $_SERVER['SCRIPT_NAME'];
|
837 |
+
}
|
838 |
+
}
|
839 |
+
|
840 |
+
// attempt to specify store as a skin
|
841 |
+
try {
|
842 |
+
$storeCode = self::app()->getStore()->getCode();
|
843 |
+
$reportData['skin'] = $storeCode;
|
844 |
+
}
|
845 |
+
catch (Exception $e) {}
|
846 |
+
|
847 |
+
require_once(self::getBaseDir() . DS . 'errors' . DS . 'report.php');
|
848 |
+
}
|
849 |
+
|
850 |
+
die();
|
851 |
+
}
|
852 |
+
|
853 |
+
/**
|
854 |
+
* Define system folder directory url by virtue of running script directory name
|
855 |
+
* Try to find requested folder by shifting to domain root directory
|
856 |
+
*
|
857 |
+
* @param string $folder
|
858 |
+
* @param boolean $exitIfNot
|
859 |
+
* @return string
|
860 |
+
*/
|
861 |
+
public static function getScriptSystemUrl($folder, $exitIfNot = false)
|
862 |
+
{
|
863 |
+
$runDirUrl = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/');
|
864 |
+
$runDir = rtrim(dirname($_SERVER['SCRIPT_FILENAME']), DS);
|
865 |
+
|
866 |
+
$baseUrl = null;
|
867 |
+
if (is_dir($runDir.'/'.$folder)) {
|
868 |
+
$baseUrl = str_replace(DS, '/', $runDirUrl);
|
869 |
+
} else {
|
870 |
+
$runDirUrlArray = explode('/', $runDirUrl);
|
871 |
+
$runDirArray = explode('/', $runDir);
|
872 |
+
$count = count($runDirArray);
|
873 |
+
|
874 |
+
for ($i=0; $i < $count; $i++) {
|
875 |
+
array_pop($runDirUrlArray);
|
876 |
+
array_pop($runDirArray);
|
877 |
+
$_runDir = implode('/', $runDirArray);
|
878 |
+
if (!empty($_runDir)) {
|
879 |
+
$_runDir .= '/';
|
880 |
+
}
|
881 |
+
|
882 |
+
if (is_dir($_runDir.$folder)) {
|
883 |
+
$_runDirUrl = implode('/', $runDirUrlArray);
|
884 |
+
$baseUrl = str_replace(DS, '/', $_runDirUrl);
|
885 |
+
break;
|
886 |
+
}
|
887 |
+
}
|
888 |
+
}
|
889 |
+
|
890 |
+
if (is_null($baseUrl)) {
|
891 |
+
$errorMessage = "Unable detect system directory: $folder";
|
892 |
+
if ($exitIfNot) {
|
893 |
+
// exit because of infinity loop
|
894 |
+
exit($errorMessage);
|
895 |
+
} else {
|
896 |
+
self::printException(new Exception(), $errorMessage);
|
897 |
+
}
|
898 |
+
}
|
899 |
+
|
900 |
+
return $baseUrl;
|
901 |
+
}
|
902 |
+
|
903 |
+
/**
|
904 |
+
* Set is downloader flag
|
905 |
+
*
|
906 |
+
* @param bool $flag
|
907 |
+
*/
|
908 |
+
public static function setIsDownloader($flag = true)
|
909 |
+
{
|
910 |
+
self::$_isDownloader = $flag;
|
911 |
+
}
|
912 |
+
}
|
app/code/core/Mage/Admin/Helper/Data.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Admin Data Helper
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Admin
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Admin_Helper_Data extends Mage_Core_Helper_Abstract
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Configuration path to expiration period of reset password link
|
38 |
+
*/
|
39 |
+
const XML_PATH_ADMIN_RESET_PASSWORD_LINK_EXPIRATION_PERIOD
|
40 |
+
= 'default/admin/emails/password_reset_link_expiration_period';
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Generate unique token for reset password confirmation link
|
44 |
+
*
|
45 |
+
* @return string
|
46 |
+
*/
|
47 |
+
public function generateResetPasswordLinkToken()
|
48 |
+
{
|
49 |
+
return Mage::helper('core')->uniqHash();
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Retrieve customer reset password link expiration period in days
|
54 |
+
*
|
55 |
+
* @return int
|
56 |
+
*/
|
57 |
+
public function getResetPasswordLinkExpirationPeriod()
|
58 |
+
{
|
59 |
+
return (int) Mage::getConfig()->getNode(self::XML_PATH_ADMIN_RESET_PASSWORD_LINK_EXPIRATION_PERIOD);
|
60 |
+
}
|
61 |
+
}
|
app/code/core/Mage/Admin/Model/Acl.php
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Acl extends Zend_Acl
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* All the group roles are prepended by G
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
const ROLE_TYPE_GROUP = 'G';
|
42 |
+
|
43 |
+
/**
|
44 |
+
* All the user roles are prepended by U
|
45 |
+
*
|
46 |
+
*/
|
47 |
+
const ROLE_TYPE_USER = 'U';
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Permission level to deny access
|
51 |
+
*
|
52 |
+
*/
|
53 |
+
const RULE_PERM_DENY = 0;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Permission level to inheric access from parent role
|
57 |
+
*
|
58 |
+
*/
|
59 |
+
const RULE_PERM_INHERIT = 1;
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Permission level to allow access
|
63 |
+
*
|
64 |
+
*/
|
65 |
+
const RULE_PERM_ALLOW = 2;
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Get role registry object or create one
|
69 |
+
*
|
70 |
+
* @return Mage_Admin_Model_Acl_Role_Registry
|
71 |
+
*/
|
72 |
+
protected function _getRoleRegistry()
|
73 |
+
{
|
74 |
+
if (null === $this->_roleRegistry) {
|
75 |
+
$this->_roleRegistry = Mage::getModel('admin/acl_role_registry');
|
76 |
+
}
|
77 |
+
return $this->_roleRegistry;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Add parent to role object
|
82 |
+
*
|
83 |
+
* @param Zend_Acl_Role $role
|
84 |
+
* @param Zend_Acl_Role $parent
|
85 |
+
* @return Mage_Admin_Model_Acl
|
86 |
+
*/
|
87 |
+
public function addRoleParent($role, $parent)
|
88 |
+
{
|
89 |
+
$this->_getRoleRegistry()->addParent($role, $parent);
|
90 |
+
return $this;
|
91 |
+
}
|
92 |
+
}
|
app/code/core/Mage/Admin/Model/Acl/Assert/Ip.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* IP assertion for admin acl
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Acl_Assert_Ip implements Zend_Acl_Assert_Interface
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Check whether ip is allowed
|
39 |
+
*
|
40 |
+
* @param Zend_Acl $acl
|
41 |
+
* @param Zend_Acl_Role_Interface $role
|
42 |
+
* @param Zend_Acl_Resource_Interface $resource
|
43 |
+
* @param string $privilege
|
44 |
+
* @return boolean
|
45 |
+
*/
|
46 |
+
public function assert(Mage_Admin_Model_Acl $acl, Mage_Admin_Model_Acl_Role $role = null,
|
47 |
+
Mage_Admin_Model_Acl_Resource $resource = null, $privilege = null)
|
48 |
+
{
|
49 |
+
return $this->_isCleanIP(Mage::helper('core/http')->getRemoteAddr());
|
50 |
+
}
|
51 |
+
|
52 |
+
protected function _isCleanIP($ip)
|
53 |
+
{
|
54 |
+
// ...
|
55 |
+
}
|
56 |
+
}
|
app/code/core/Mage/Admin/Model/Acl/Assert/Time.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Assert time for admin acl
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Acl_Assert_Time implements Zend_Acl_Assert_Interface
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Assert time
|
39 |
+
*
|
40 |
+
* @param Zend_Acl $acl
|
41 |
+
* @param Zend_Acl_Role_Interface $role
|
42 |
+
* @param Zend_Acl_Resource_Interface $resource
|
43 |
+
* @param string $privilege
|
44 |
+
* @return boolean
|
45 |
+
*/
|
46 |
+
public function assert(Mage_Admin_Model_Acl $acl, Mage_Admin_Model_Acl_Role $role = null,
|
47 |
+
Mage_Admin_Model_Acl_Resource $resource = null, $privilege = null)
|
48 |
+
{
|
49 |
+
return $this->_isCleanTime(time());
|
50 |
+
}
|
51 |
+
|
52 |
+
protected function _isCleanTime($time)
|
53 |
+
{
|
54 |
+
// ...
|
55 |
+
}
|
56 |
+
}
|
app/code/core/Mage/Admin/Model/Acl/Resource.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) 2011 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 resource
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Acl_Resource extends Zend_Acl_Resource
|
36 |
+
{
|
37 |
+
|
38 |
+
}
|
app/code/core/Mage/Admin/Model/Acl/Role.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* User acl role
|
30 |
+
*
|
31 |
+
* @method Mage_Admin_Model_Resource_Acl_Role _getResource()
|
32 |
+
* @method Mage_Admin_Model_Resource_Acl_Role getResource()
|
33 |
+
* @method int getParentId()
|
34 |
+
* @method Mage_Admin_Model_Acl_Role setParentId(int $value)
|
35 |
+
* @method int getTreeLevel()
|
36 |
+
* @method Mage_Admin_Model_Acl_Role setTreeLevel(int $value)
|
37 |
+
* @method int getSortOrder()
|
38 |
+
* @method Mage_Admin_Model_Acl_Role setSortOrder(int $value)
|
39 |
+
* @method string getRoleType()
|
40 |
+
* @method Mage_Admin_Model_Acl_Role setRoleType(string $value)
|
41 |
+
* @method int getUserId()
|
42 |
+
* @method Mage_Admin_Model_Acl_Role setUserId(int $value)
|
43 |
+
* @method string getRoleName()
|
44 |
+
* @method Mage_Admin_Model_Acl_Role setRoleName(string $value)
|
45 |
+
*
|
46 |
+
* @category Mage
|
47 |
+
* @package Mage_Admin
|
48 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
49 |
+
*/
|
50 |
+
class Mage_Admin_Model_Acl_Role extends Mage_Core_Model_Abstract
|
51 |
+
{
|
52 |
+
/**
|
53 |
+
* Initialize resource model
|
54 |
+
*
|
55 |
+
*/
|
56 |
+
protected function _construct()
|
57 |
+
{
|
58 |
+
$this->_init('admin/acl_role');
|
59 |
+
}
|
60 |
+
}
|
app/code/core/Mage/Admin/Model/Acl/Role/Generic.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) 2011 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 |
+
* User acl role
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Acl_Role_Generic extends Zend_Acl_Role
|
36 |
+
{
|
37 |
+
|
38 |
+
}
|
app/code/core/Mage/Admin/Model/Acl/Role/Group.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) 2011 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 Group model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Acl_Role_Group extends Mage_Admin_Model_Acl_Role_Generic
|
36 |
+
{
|
37 |
+
|
38 |
+
}
|
app/code/core/Mage/Admin/Model/Acl/Role/Registry.php
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 role registry
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Acl_Role_Registry extends Zend_Acl_Role_Registry
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Add parent to the $role node
|
39 |
+
*
|
40 |
+
* @param Zend_Acl_Role_Interface|string $role
|
41 |
+
* @param array|Zend_Acl_Role_Interface|string $parents
|
42 |
+
* @return Mage_Auth_Model_Acl_Role_Registry
|
43 |
+
*/
|
44 |
+
function addParent($role, $parents)
|
45 |
+
{
|
46 |
+
try {
|
47 |
+
if ($role instanceof Zend_Acl_Role_Interface) {
|
48 |
+
$roleId = $role->getRoleId();
|
49 |
+
} else {
|
50 |
+
$roleId = $role;
|
51 |
+
$role = $this->get($role);
|
52 |
+
}
|
53 |
+
} catch (Zend_Acl_Role_Registry_Exception $e) {
|
54 |
+
throw new Zend_Acl_Role_Registry_Exception("Child Role id '$roleId' does not exist");
|
55 |
+
}
|
56 |
+
|
57 |
+
if (!is_array($parents)) {
|
58 |
+
$parents = array($parents);
|
59 |
+
}
|
60 |
+
foreach ($parents as $parent) {
|
61 |
+
try {
|
62 |
+
if ($parent instanceof Zend_Acl_Role_Interface) {
|
63 |
+
$roleParentId = $parent->getRoleId();
|
64 |
+
} else {
|
65 |
+
$roleParentId = $parent;
|
66 |
+
}
|
67 |
+
$roleParent = $this->get($roleParentId);
|
68 |
+
} catch (Zend_Acl_Role_Registry_Exception $e) {
|
69 |
+
throw new Zend_Acl_Role_Registry_Exception("Parent Role id '$roleParentId' does not exist");
|
70 |
+
}
|
71 |
+
$this->_roles[$roleId]['parents'][$roleParentId] = $roleParent;
|
72 |
+
$this->_roles[$roleParentId]['children'][$roleId] = $role;
|
73 |
+
}
|
74 |
+
return $this;
|
75 |
+
}
|
76 |
+
}
|
app/code/core/Mage/Admin/Model/Acl/Role/User.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) 2011 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 |
+
* User acl role
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Acl_Role_User extends Mage_Admin_Model_Acl_Role_Generic
|
36 |
+
{
|
37 |
+
|
38 |
+
}
|
app/code/core/Mage/Admin/Model/Config.php
ADDED
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Configuration for Admin model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Config extends Varien_Simplexml_Config
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* adminhtml.xml merged config
|
39 |
+
*
|
40 |
+
* @var Varien_Simplexml_Config
|
41 |
+
*/
|
42 |
+
protected $_adminhtmlConfig;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Load config from merged adminhtml.xml files
|
46 |
+
*/
|
47 |
+
public function __construct()
|
48 |
+
{
|
49 |
+
parent::__construct();
|
50 |
+
$this->setCacheId('adminhtml_acl_menu_config');
|
51 |
+
|
52 |
+
/* @var $adminhtmlConfig Varien_Simplexml_Config */
|
53 |
+
$adminhtmlConfig = Mage::app()->loadCache($this->getCacheId());
|
54 |
+
if ($adminhtmlConfig) {
|
55 |
+
$this->_adminhtmlConfig = new Varien_Simplexml_Config($adminhtmlConfig);
|
56 |
+
} else {
|
57 |
+
$adminhtmlConfig = new Varien_Simplexml_Config;
|
58 |
+
$adminhtmlConfig->loadString('<?xml version="1.0"?><config></config>');
|
59 |
+
Mage::getConfig()->loadModulesConfiguration('adminhtml.xml', $adminhtmlConfig);
|
60 |
+
$this->_adminhtmlConfig = $adminhtmlConfig;
|
61 |
+
|
62 |
+
/**
|
63 |
+
* @deprecated after 1.4.0.0-alpha2
|
64 |
+
* support backwards compatibility with config.xml
|
65 |
+
*/
|
66 |
+
$aclConfig = Mage::getConfig()->getNode('adminhtml/acl');
|
67 |
+
if ($aclConfig) {
|
68 |
+
$adminhtmlConfig->getNode()->extendChild($aclConfig, true);
|
69 |
+
}
|
70 |
+
$menuConfig = Mage::getConfig()->getNode('adminhtml/menu');
|
71 |
+
if ($menuConfig) {
|
72 |
+
$adminhtmlConfig->getNode()->extendChild($menuConfig, true);
|
73 |
+
}
|
74 |
+
|
75 |
+
if (Mage::app()->useCache('config')) {
|
76 |
+
Mage::app()->saveCache($adminhtmlConfig->getXmlString(), $this->getCacheId(),
|
77 |
+
array(Mage_Core_Model_Config::CACHE_TAG));
|
78 |
+
}
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Load Acl resources from config
|
84 |
+
*
|
85 |
+
* @param Mage_Admin_Model_Acl $acl
|
86 |
+
* @param Mage_Core_Model_Config_Element $resource
|
87 |
+
* @param string $parentName
|
88 |
+
* @return Mage_Admin_Model_Config
|
89 |
+
*/
|
90 |
+
public function loadAclResources(Mage_Admin_Model_Acl $acl, $resource = null, $parentName = null)
|
91 |
+
{
|
92 |
+
if (is_null($resource)) {
|
93 |
+
$resource = $this->getAdminhtmlConfig()->getNode("acl/resources");
|
94 |
+
$resourceName = null;
|
95 |
+
} else {
|
96 |
+
$resourceName = (is_null($parentName) ? '' : $parentName . '/') . $resource->getName();
|
97 |
+
$acl->add(Mage::getModel('admin/acl_resource', $resourceName), $parentName);
|
98 |
+
}
|
99 |
+
|
100 |
+
if (isset($resource->all)) {
|
101 |
+
$acl->add(Mage::getModel('admin/acl_resource', 'all'), null);
|
102 |
+
}
|
103 |
+
|
104 |
+
if (isset($resource->admin)) {
|
105 |
+
$children = $resource->admin;
|
106 |
+
} elseif (isset($resource->children)){
|
107 |
+
$children = $resource->children->children();
|
108 |
+
}
|
109 |
+
|
110 |
+
|
111 |
+
|
112 |
+
if (empty($children)) {
|
113 |
+
return $this;
|
114 |
+
}
|
115 |
+
|
116 |
+
foreach ($children as $res) {
|
117 |
+
$this->loadAclResources($acl, $res, $resourceName);
|
118 |
+
}
|
119 |
+
return $this;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Get acl assert config
|
124 |
+
*
|
125 |
+
* @param string $name
|
126 |
+
* @return Mage_Core_Model_Config_Element|boolean
|
127 |
+
*/
|
128 |
+
public function getAclAssert($name = '')
|
129 |
+
{
|
130 |
+
$asserts = $this->getNode("admin/acl/asserts");
|
131 |
+
if ('' === $name) {
|
132 |
+
return $asserts;
|
133 |
+
}
|
134 |
+
|
135 |
+
if (isset($asserts->$name)) {
|
136 |
+
return $asserts->$name;
|
137 |
+
}
|
138 |
+
|
139 |
+
return false;
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Retrieve privilege set by name
|
144 |
+
*
|
145 |
+
* @param string $name
|
146 |
+
* @return Mage_Core_Model_Config_Element|boolean
|
147 |
+
*/
|
148 |
+
public function getAclPrivilegeSet($name = '')
|
149 |
+
{
|
150 |
+
$sets = $this->getNode("admin/acl/privilegeSets");
|
151 |
+
if ('' === $name) {
|
152 |
+
return $sets;
|
153 |
+
}
|
154 |
+
|
155 |
+
if (isset($sets->$name)) {
|
156 |
+
return $sets->$name;
|
157 |
+
}
|
158 |
+
|
159 |
+
return false;
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Retrieve xml config
|
164 |
+
*
|
165 |
+
* @return Varien_Simplexml_Config
|
166 |
+
*/
|
167 |
+
public function getAdminhtmlConfig()
|
168 |
+
{
|
169 |
+
return $this->_adminhtmlConfig;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Get menu item label by item path
|
174 |
+
*
|
175 |
+
* @param string $path
|
176 |
+
* @return string
|
177 |
+
*/
|
178 |
+
public function getMenuItemLabel($path)
|
179 |
+
{
|
180 |
+
$moduleName = 'adminhtml';
|
181 |
+
$menuNode = $this->getAdminhtmlConfig()->getNode('menu/' . str_replace('/', '/children/', trim($path, '/')));
|
182 |
+
if ($menuNode->getAttribute('module')) {
|
183 |
+
$moduleName = (string)$menuNode->getAttribute('module');
|
184 |
+
}
|
185 |
+
return Mage::helper($moduleName)->__((string)$menuNode->title);
|
186 |
+
}
|
187 |
+
}
|
app/code/core/Mage/Admin/Model/Mysql4/Acl.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Resource model for admin ACL
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Mysql4_Acl extends Mage_Admin_Model_Resource_Acl
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Admin/Model/Mysql4/Acl/Role.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 role resource
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Mysql4_Acl_Role extends Mage_Admin_Model_Resource_Acl_Role
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Admin/Model/Mysql4/Acl/Role/Collection.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Roles collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Mysql4_Acl_Role_Collection extends Mage_Admin_Model_Resource_Acl_Role_Collection
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Admin/Model/Mysql4/Permissions/Collection.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Permissions Collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Mysql4_Permissions_Collection extends Mage_Admin_Model_Resource_Permissions_Collection
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Admin/Model/Mysql4/Role.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Mysql4 Role resource model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Mysql4_Role extends Mage_Admin_Model_Resource_Role
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Admin/Model/Mysql4/Role/Collection.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Role Collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Mysql4_Role_Collection extends Mage_Admin_Model_Resource_Role_Collection
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Admin/Model/Mysql4/Roles.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Mysql4 Roles resource model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Mysql4_Roles extends Mage_Admin_Model_Resource_Roles
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Admin/Model/Mysql4/Roles/Collection.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Roles Collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Mysql4_Roles_Collection extends Mage_Admin_Model_Resource_Roles_Collection
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Admin/Model/Mysql4/Roles/User/Collection.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Roles User Collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Mysql4_Roles_User_Collection extends Mage_Admin_Model_Resource_Roles_User_Collection
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Admin/Model/Mysql4/Rules.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Mysql4 Rules Resource Model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Mysql4_Rules extends Mage_Admin_Model_Resource_Rules
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Admin/Model/Mysql4/Rules/Collection.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Mysql4 Rules Collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Mysql4_Rules_Collection extends Mage_Admin_Model_Resource_Rules_Collection
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Admin/Model/Mysql4/User.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Mysql4_User extends Mage_Admin_Model_Resource_User
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Admin/Model/Mysql4/User/Collection.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Admin Mysql4 User Collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Mysql4_User_Collection extends Mage_Admin_Model_Resource_User_Collection
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Admin/Model/Observer.php
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Admin observer model
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Admin
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Admin_Model_Observer
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Handler for controller_action_predispatch event
|
38 |
+
*
|
39 |
+
* @param Varien_Event_Observer $observer
|
40 |
+
* @return boolean
|
41 |
+
*/
|
42 |
+
public function actionPreDispatchAdmin($observer)
|
43 |
+
{
|
44 |
+
$session = Mage::getSingleton('admin/session');
|
45 |
+
/** @var $session Mage_Admin_Model_Session */
|
46 |
+
$request = Mage::app()->getRequest();
|
47 |
+
$user = $session->getUser();
|
48 |
+
|
49 |
+
$requestedActionName = $request->getActionName();
|
50 |
+
$openActions = array(
|
51 |
+
'forgotpassword',
|
52 |
+
'resetpassword',
|
53 |
+
'resetpasswordpost',
|
54 |
+
'logout'
|
55 |
+
);
|
56 |
+
if (in_array($requestedActionName, $openActions)) {
|
57 |
+
$request->setDispatched(true);
|
58 |
+
} else {
|
59 |
+
if($user) {
|
60 |
+
$user->reload();
|
61 |
+
}
|
62 |
+
if (!$user || !$user->getId()) {
|
63 |
+
if ($request->getPost('login')) {
|
64 |
+
$postLogin = $request->getPost('login');
|
65 |
+
$username = isset($postLogin['username']) ? $postLogin['username'] : '';
|
66 |
+
$password = isset($postLogin['password']) ? $postLogin['password'] : '';
|
67 |
+
$user = $session->login($username, $password, $request);
|
68 |
+
$request->setPost('login', null);
|
69 |
+
}
|
70 |
+
if (!$request->getParam('forwarded')) {
|
71 |
+
if ($request->getParam('isIframe')) {
|
72 |
+
$request->setParam('forwarded', true)
|
73 |
+
->setControllerName('index')
|
74 |
+
->setActionName('deniedIframe')
|
75 |
+
->setDispatched(false);
|
76 |
+
} elseif($request->getParam('isAjax')) {
|
77 |
+
$request->setParam('forwarded', true)
|
78 |
+
->setControllerName('index')
|
79 |
+
->setActionName('deniedJson')
|
80 |
+
->setDispatched(false);
|
81 |
+
} else {
|
82 |
+
$request->setParam('forwarded', true)
|
83 |
+
->setRouteName('adminhtml')
|
84 |
+
->setControllerName('index')
|
85 |
+
->setActionName('login')
|
86 |
+
->setDispatched(false);
|
87 |
+
}
|
88 |
+
return false;
|
89 |
+
}
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
$session->refreshAcl();
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Unset session first visit flag after displaying page
|
98 |
+
*
|
99 |
+
* @deprecated after 1.4.0.1, logic moved to admin session
|
100 |
+
* @param Varien_Event_Observer $event
|
101 |
+
*/
|
102 |
+
public function actionPostDispatchAdmin($event)
|
103 |
+
{
|
104 |
+
}
|
105 |
+
}
|
app/code/core/Mage/Admin/Model/Resource/Acl.php
ADDED
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Resource model for admin ACL
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Resource_Acl extends Mage_Core_Model_Resource_Db_Abstract
|
36 |
+
{
|
37 |
+
const ACL_ALL_RULES = 'all';
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Initialize resource
|
41 |
+
*
|
42 |
+
*/
|
43 |
+
protected function _construct()
|
44 |
+
{
|
45 |
+
$this->_init('admin/role', 'role_id');
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Load ACL for the user
|
50 |
+
*
|
51 |
+
* @return Mage_Admin_Model_Acl
|
52 |
+
*/
|
53 |
+
public function loadAcl()
|
54 |
+
{
|
55 |
+
$acl = Mage::getModel('admin/acl');
|
56 |
+
|
57 |
+
Mage::getSingleton('admin/config')->loadAclResources($acl);
|
58 |
+
|
59 |
+
$roleTable = $this->getTable('admin/role');
|
60 |
+
$ruleTable = $this->getTable('admin/rule');
|
61 |
+
$assertTable = $this->getTable('admin/assert');
|
62 |
+
|
63 |
+
$adapter = $this->_getReadAdapter();
|
64 |
+
|
65 |
+
$select = $adapter->select()
|
66 |
+
->from($roleTable)
|
67 |
+
->order('tree_level');
|
68 |
+
|
69 |
+
$rolesArr = $adapter->fetchAll($select);
|
70 |
+
|
71 |
+
$this->loadRoles($acl, $rolesArr);
|
72 |
+
|
73 |
+
$select = $adapter->select()
|
74 |
+
->from(array('r' => $ruleTable))
|
75 |
+
->joinLeft(
|
76 |
+
array('a' => $assertTable),
|
77 |
+
'a.assert_id = r.assert_id',
|
78 |
+
array('assert_type', 'assert_data')
|
79 |
+
);
|
80 |
+
|
81 |
+
$rulesArr = $adapter->fetchAll($select);
|
82 |
+
|
83 |
+
$this->loadRules($acl, $rulesArr);
|
84 |
+
|
85 |
+
return $acl;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Load roles
|
90 |
+
*
|
91 |
+
* @param Mage_Admin_Model_Acl $acl
|
92 |
+
* @param array $rolesArr
|
93 |
+
* @return Mage_Admin_Model_Resource_Acl
|
94 |
+
*/
|
95 |
+
public function loadRoles(Mage_Admin_Model_Acl $acl, array $rolesArr)
|
96 |
+
{
|
97 |
+
foreach ($rolesArr as $role) {
|
98 |
+
$parent = ($role['parent_id'] > 0) ? Mage_Admin_Model_Acl::ROLE_TYPE_GROUP . $role['parent_id'] : null;
|
99 |
+
switch ($role['role_type']) {
|
100 |
+
case Mage_Admin_Model_Acl::ROLE_TYPE_GROUP:
|
101 |
+
$roleId = $role['role_type'] . $role['role_id'];
|
102 |
+
$acl->addRole(Mage::getModel('admin/acl_role_group', $roleId), $parent);
|
103 |
+
break;
|
104 |
+
|
105 |
+
case Mage_Admin_Model_Acl::ROLE_TYPE_USER:
|
106 |
+
$roleId = $role['role_type'] . $role['user_id'];
|
107 |
+
if (!$acl->hasRole($roleId)) {
|
108 |
+
$acl->addRole(Mage::getModel('admin/acl_role_user', $roleId), $parent);
|
109 |
+
} else {
|
110 |
+
$acl->addRoleParent($roleId, $parent);
|
111 |
+
}
|
112 |
+
break;
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
return $this;
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Load rules
|
121 |
+
*
|
122 |
+
* @param Mage_Admin_Model_Acl $acl
|
123 |
+
* @param array $rulesArr
|
124 |
+
* @return Mage_Admin_Model_Resource_Acl
|
125 |
+
*/
|
126 |
+
public function loadRules(Mage_Admin_Model_Acl $acl, array $rulesArr)
|
127 |
+
{
|
128 |
+
foreach ($rulesArr as $rule) {
|
129 |
+
$role = $rule['role_type'] . $rule['role_id'];
|
130 |
+
$resource = $rule['resource_id'];
|
131 |
+
$privileges = !empty($rule['privileges']) ? explode(',', $rule['privileges']) : null;
|
132 |
+
|
133 |
+
$assert = null;
|
134 |
+
if (0 != $rule['assert_id']) {
|
135 |
+
$assertClass = Mage::getSingleton('admin/config')->getAclAssert($rule['assert_type'])->getClassName();
|
136 |
+
$assert = new $assertClass(unserialize($rule['assert_data']));
|
137 |
+
}
|
138 |
+
try {
|
139 |
+
if ( $rule['permission'] == 'allow' ) {
|
140 |
+
if ($resource === self::ACL_ALL_RULES) {
|
141 |
+
$acl->allow($role, null, $privileges, $assert);
|
142 |
+
}
|
143 |
+
$acl->allow($role, $resource, $privileges, $assert);
|
144 |
+
} else if ( $rule['permission'] == 'deny' ) {
|
145 |
+
$acl->deny($role, $resource, $privileges, $assert);
|
146 |
+
}
|
147 |
+
} catch (Exception $e) {
|
148 |
+
//$m = $e->getMessage();
|
149 |
+
//if ( eregi("^Resource '(.*)' not found", $m) ) {
|
150 |
+
// Deleting non existent resource rule from rules table
|
151 |
+
//$cond = $this->_write->quoteInto('resource_id = ?', $resource);
|
152 |
+
//$this->_write->delete(Mage::getSingleton('core/resource')->getTableName('admin/rule'), $cond);
|
153 |
+
//} else {
|
154 |
+
//TODO: We need to log such exceptions to somewhere like a system/errors.log
|
155 |
+
//}
|
156 |
+
}
|
157 |
+
/*
|
158 |
+
switch ($rule['permission']) {
|
159 |
+
case Mage_Admin_Model_Acl::RULE_PERM_ALLOW:
|
160 |
+
$acl->allow($role, $resource, $privileges, $assert);
|
161 |
+
break;
|
162 |
+
|
163 |
+
case Mage_Admin_Model_Acl::RULE_PERM_DENY:
|
164 |
+
$acl->deny($role, $resource, $privileges, $assert);
|
165 |
+
break;
|
166 |
+
}
|
167 |
+
*/
|
168 |
+
}
|
169 |
+
return $this;
|
170 |
+
}
|
171 |
+
}
|
app/code/core/Mage/Admin/Model/Resource/Acl/Role.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 role resource
|
29 |
+
*
|
30 |
+
* @deprecated
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Resource_Acl_Role extends Mage_Core_Model_Resource_Db_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Define main table
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('admin/role', 'role_id');
|
44 |
+
}
|
45 |
+
}
|
app/code/core/Mage/Admin/Model/Resource/Acl/Role/Collection.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Roles collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Resource_Acl_Role_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Initialize resource
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('admin/acl_role');
|
44 |
+
}
|
45 |
+
}
|
app/code/core/Mage/Admin/Model/Resource/Permissions/Collection.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Admin permissions collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Resource_Permissions_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Initialize resource
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('admin/rules');
|
44 |
+
}
|
45 |
+
}
|
app/code/core/Mage/Admin/Model/Resource/Role.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Admin role resource model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Resource_Role extends Mage_Core_Model_Resource_Db_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Define main table
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('admin/role', 'role_id');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Process role before saving
|
48 |
+
*
|
49 |
+
* @param Mage_Core_Model_Abstract $object
|
50 |
+
* @return Mage_Admin_Model_Resource_Role
|
51 |
+
*/
|
52 |
+
protected function _beforeSave(Mage_Core_Model_Abstract $object)
|
53 |
+
{
|
54 |
+
if ( !$object->getId() ) {
|
55 |
+
$object->setCreated($this->formatDate(true));
|
56 |
+
}
|
57 |
+
$object->setModified($this->formatDate(true));
|
58 |
+
return $this;
|
59 |
+
}
|
60 |
+
}
|
app/code/core/Mage/Admin/Model/Resource/Role/Collection.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Admin role collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Resource_Role_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Initialize resource model
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('admin/role');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Add user filter
|
48 |
+
*
|
49 |
+
* @param int $userId
|
50 |
+
* @return Mage_Admin_Model_Resource_Role_Collection
|
51 |
+
*/
|
52 |
+
public function setUserFilter($userId)
|
53 |
+
{
|
54 |
+
$this->addFieldToFilter('user_id', $userId);
|
55 |
+
$this->addFieldToFilter('role_type', 'G');
|
56 |
+
return $this;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Set roles filter
|
61 |
+
*
|
62 |
+
* @return Mage_Admin_Model_Resource_Role_Collection
|
63 |
+
*/
|
64 |
+
public function setRolesFilter()
|
65 |
+
{
|
66 |
+
$this->addFieldToFilter('role_type', 'G');
|
67 |
+
return $this;
|
68 |
+
}
|
69 |
+
}
|
app/code/core/Mage/Admin/Model/Resource/Roles.php
ADDED
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Admin roles resource model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Resource_Roles extends Mage_Core_Model_Resource_Db_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Users table
|
39 |
+
*
|
40 |
+
* @var string
|
41 |
+
*/
|
42 |
+
protected $_usersTable;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Rule table
|
46 |
+
*
|
47 |
+
* @var string
|
48 |
+
*/
|
49 |
+
protected $_ruleTable;
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Define main table
|
53 |
+
*
|
54 |
+
*/
|
55 |
+
protected function _construct()
|
56 |
+
{
|
57 |
+
$this->_init('admin/role', 'role_id');
|
58 |
+
|
59 |
+
$this->_usersTable = $this->getTable('admin/user');
|
60 |
+
$this->_ruleTable = $this->getTable('admin/rule');
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Process role before saving
|
65 |
+
*
|
66 |
+
* @param Mage_Core_Model_Abstract $role
|
67 |
+
* @return Mage_Admin_Model_Resource_Roles
|
68 |
+
*/
|
69 |
+
protected function _beforeSave(Mage_Core_Model_Abstract $role)
|
70 |
+
{
|
71 |
+
if ($role->getId() == '') {
|
72 |
+
if ($role->getIdFieldName()) {
|
73 |
+
$role->unsetData($role->getIdFieldName());
|
74 |
+
} else {
|
75 |
+
$role->unsetData('id');
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
if ($role->getPid() > 0) {
|
80 |
+
$select = $this->_getReadAdapter()->select()
|
81 |
+
->from($this->getMainTable(), array('tree_level'))
|
82 |
+
->where("{$this->getIdFieldName()} = :pid");
|
83 |
+
|
84 |
+
$binds = array(
|
85 |
+
'pid' => (int) $role->getPid(),
|
86 |
+
);
|
87 |
+
|
88 |
+
$treeLevel = $this->_getReadAdapter()->fetchOne($select, $binds);
|
89 |
+
} else {
|
90 |
+
$treeLevel = 0;
|
91 |
+
}
|
92 |
+
$role->setTreeLevel($treeLevel + 1);
|
93 |
+
$role->setRoleName($role->getName());
|
94 |
+
return $this;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Process role after saving
|
99 |
+
*
|
100 |
+
* @param Mage_Core_Model_Abstract $role
|
101 |
+
* @return Mage_Admin_Model_Resource_Roles
|
102 |
+
*/
|
103 |
+
protected function _afterSave(Mage_Core_Model_Abstract $role)
|
104 |
+
{
|
105 |
+
$this->_updateRoleUsersAcl($role);
|
106 |
+
Mage::app()->getCache()->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG,
|
107 |
+
array(Mage_Adminhtml_Block_Page_Menu::CACHE_TAGS));
|
108 |
+
return $this;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Process role after deleting
|
113 |
+
*
|
114 |
+
* @param Mage_Core_Model_Abstract $role
|
115 |
+
* @return Mage_Admin_Model_Resource_Roles
|
116 |
+
*/
|
117 |
+
protected function _afterDelete(Mage_Core_Model_Abstract $role)
|
118 |
+
{
|
119 |
+
$adapter = $this->_getWriteAdapter();
|
120 |
+
|
121 |
+
$adapter->delete(
|
122 |
+
$this->getMainTable(),
|
123 |
+
array('parent_id = ?' => (int) $role->getId())
|
124 |
+
);
|
125 |
+
|
126 |
+
$adapter->delete(
|
127 |
+
$this->_ruleTable,
|
128 |
+
array('role_id = ?' => (int) $role->getId())
|
129 |
+
);
|
130 |
+
|
131 |
+
return $this;
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Get role users
|
136 |
+
*
|
137 |
+
* @param Mage_Admin_Model_Roles $role
|
138 |
+
* @return array|false
|
139 |
+
*/
|
140 |
+
public function getRoleUsers(Mage_Admin_Model_Roles $role)
|
141 |
+
{
|
142 |
+
$read = $this->_getReadAdapter();
|
143 |
+
|
144 |
+
$binds = array(
|
145 |
+
'role_id' => $role->getId(),
|
146 |
+
'role_type' => 'U'
|
147 |
+
);
|
148 |
+
|
149 |
+
$select = $read->select()
|
150 |
+
->from($this->getMainTable(), array('user_id'))
|
151 |
+
->where('parent_id = :role_id')
|
152 |
+
->where('role_type = :role_type')
|
153 |
+
->where('user_id > 0');
|
154 |
+
|
155 |
+
return $read->fetchCol($select, $binds);
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Update role users ACL
|
160 |
+
*
|
161 |
+
* @param Mage_Admin_Model_Roles $role
|
162 |
+
* @return bool
|
163 |
+
*/
|
164 |
+
private function _updateRoleUsersAcl(Mage_Admin_Model_Roles $role)
|
165 |
+
{
|
166 |
+
$write = $this->_getWriteAdapter();
|
167 |
+
$users = $this->getRoleUsers($role);
|
168 |
+
$rowsCount = 0;
|
169 |
+
|
170 |
+
if (sizeof($users) > 0) {
|
171 |
+
$bind = array('reload_acl_flag' => 1);
|
172 |
+
$where = array('user_id IN(?)' => $users);
|
173 |
+
$rowsCount = $write->update($this->_usersTable, $bind, $where);
|
174 |
+
}
|
175 |
+
|
176 |
+
return $rowsCount > 0;
|
177 |
+
}
|
178 |
+
}
|
app/code/core/Mage/Admin/Model/Resource/Roles/Collection.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Admin roles collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Resource_Roles_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Initialize resource model
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('admin/role');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Init select
|
48 |
+
*
|
49 |
+
* @return Mage_Admin_Model_Resource_Roles_Collection
|
50 |
+
*/
|
51 |
+
protected function _initSelect()
|
52 |
+
{
|
53 |
+
parent::_initSelect();
|
54 |
+
|
55 |
+
$this->getSelect()->where("main_table.role_type = ?", 'G');
|
56 |
+
|
57 |
+
return $this;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Convert to option array
|
62 |
+
*
|
63 |
+
* @return array
|
64 |
+
*/
|
65 |
+
public function toOptionArray()
|
66 |
+
{
|
67 |
+
return $this->_toOptionArray('role_id', 'role_name');
|
68 |
+
}
|
69 |
+
}
|
app/code/core/Mage/Admin/Model/Resource/Roles/User/Collection.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Admin role users collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Resource_Roles_User_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Initialize resource model
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('admin/user');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Initialize select
|
48 |
+
*
|
49 |
+
* @return Mage_Admin_Model_Resource_Roles_User_Collection
|
50 |
+
*/
|
51 |
+
protected function _initSelect()
|
52 |
+
{
|
53 |
+
parent::_initSelect();
|
54 |
+
|
55 |
+
$this->getSelect()->where("user_id > 0");
|
56 |
+
|
57 |
+
return $this;
|
58 |
+
}
|
59 |
+
}
|
app/code/core/Mage/Admin/Model/Resource/Rules.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Admin rule resource model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Resource_Rules extends Mage_Core_Model_Resource_Db_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Define main table
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('admin/rule', 'rule_id');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Save ACL resources
|
48 |
+
*
|
49 |
+
* @param Mage_Admin_Model_Rules $rule
|
50 |
+
*/
|
51 |
+
public function saveRel(Mage_Admin_Model_Rules $rule)
|
52 |
+
{
|
53 |
+
try {
|
54 |
+
$adapter = $this->_getWriteAdapter();
|
55 |
+
$adapter->beginTransaction();
|
56 |
+
$roleId = $rule->getRoleId();
|
57 |
+
|
58 |
+
$condition = array(
|
59 |
+
'role_id = ?' => (int) $roleId,
|
60 |
+
);
|
61 |
+
|
62 |
+
$adapter->delete($this->getMainTable(), $condition);
|
63 |
+
|
64 |
+
$postedResources = $rule->getResources();
|
65 |
+
if ($postedResources) {
|
66 |
+
$row = array(
|
67 |
+
'role_type' => 'G',
|
68 |
+
'resource_id' => 'all',
|
69 |
+
'privileges' => '', // not used yet
|
70 |
+
'assert_id' => 0,
|
71 |
+
'role_id' => $roleId,
|
72 |
+
'permission' => 'allow'
|
73 |
+
);
|
74 |
+
|
75 |
+
// If all was selected save it only and nothing else.
|
76 |
+
if ($postedResources === array('all')) {
|
77 |
+
$insertData = $this->_prepareDataForTable(new Varien_Object($row), $this->getMainTable());
|
78 |
+
|
79 |
+
$adapter->insert($this->getMainTable(), $insertData);
|
80 |
+
} else {
|
81 |
+
foreach (Mage::getModel('admin/roles')->getResourcesList2D() as $index => $resName) {
|
82 |
+
$row['permission'] = (in_array($resName, $postedResources) ? 'allow' : 'deny');
|
83 |
+
$row['resource_id'] = trim($resName, '/');
|
84 |
+
|
85 |
+
$insertData = $this->_prepareDataForTable(new Varien_Object($row), $this->getMainTable());
|
86 |
+
$adapter->insert($this->getMainTable(), $insertData);
|
87 |
+
}
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
$adapter->commit();
|
92 |
+
} catch (Mage_Core_Exception $e) {
|
93 |
+
$adapter->rollBack();
|
94 |
+
throw $e;
|
95 |
+
} catch (Exception $e){
|
96 |
+
$adapter->rollBack();
|
97 |
+
Mage::logException($e);
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
app/code/core/Mage/Admin/Model/Resource/Rules/Collection.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Rules collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Resource_Rules_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Initialize resource model
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('admin/rules');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Get rules by role id
|
48 |
+
*
|
49 |
+
* @param int $id
|
50 |
+
* @return Mage_Admin_Model_Resource_Rules_Collection
|
51 |
+
*/
|
52 |
+
public function getByRoles($id)
|
53 |
+
{
|
54 |
+
$this->addFieldToFilter('role_id', (int) $id);
|
55 |
+
return $this;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Sort by length
|
60 |
+
*
|
61 |
+
* @return Mage_Admin_Model_Resource_Rules_Collection
|
62 |
+
*/
|
63 |
+
public function addSortByLength()
|
64 |
+
{
|
65 |
+
$length = $this->getConnection()->getLengthSql('{{resource_id}}');
|
66 |
+
$this->addExpressionFieldToSelect('length', $length, 'resource_id');
|
67 |
+
$this->getSelect()->order('length ' . Zend_Db_Select::SQL_DESC);
|
68 |
+
|
69 |
+
return $this;
|
70 |
+
}
|
71 |
+
}
|
app/code/core/Mage/Admin/Model/Resource/User.php
ADDED
@@ -0,0 +1,463 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Resource_User extends Mage_Core_Model_Resource_Db_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Define main table
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('admin/user', 'user_id');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Initialize unique fields
|
48 |
+
*
|
49 |
+
* @return Mage_Admin_Model_Resource_User
|
50 |
+
*/
|
51 |
+
protected function _initUniqueFields()
|
52 |
+
{
|
53 |
+
$this->_uniqueFields = array(
|
54 |
+
array(
|
55 |
+
'field' => 'email',
|
56 |
+
'title' => Mage::helper('adminhtml')->__('Email')
|
57 |
+
),
|
58 |
+
array(
|
59 |
+
'field' => 'username',
|
60 |
+
'title' => Mage::helper('adminhtml')->__('User Name')
|
61 |
+
),
|
62 |
+
);
|
63 |
+
return $this;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Authenticate user by $username and $password
|
68 |
+
*
|
69 |
+
* @param Mage_Admin_Model_User $user
|
70 |
+
* @return Mage_Admin_Model_Resource_User
|
71 |
+
*/
|
72 |
+
public function recordLogin(Mage_Admin_Model_User $user)
|
73 |
+
{
|
74 |
+
$adapter = $this->_getWriteAdapter();
|
75 |
+
|
76 |
+
$data = array(
|
77 |
+
'logdate' => now(),
|
78 |
+
'lognum' => $user->getLognum() + 1
|
79 |
+
);
|
80 |
+
|
81 |
+
$condition = array(
|
82 |
+
'user_id = ?' => (int) $user->getUserId(),
|
83 |
+
);
|
84 |
+
|
85 |
+
$adapter->update($this->getMainTable(), $data, $condition);
|
86 |
+
|
87 |
+
return $this;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Load data by specified username
|
92 |
+
*
|
93 |
+
* @param string $username
|
94 |
+
* @return false|array
|
95 |
+
*/
|
96 |
+
public function loadByUsername($username)
|
97 |
+
{
|
98 |
+
$adapter = $this->_getReadAdapter();
|
99 |
+
|
100 |
+
$select = $adapter->select()
|
101 |
+
->from($this->getMainTable())
|
102 |
+
->where('username=:username');
|
103 |
+
|
104 |
+
$binds = array(
|
105 |
+
'username' => $username
|
106 |
+
);
|
107 |
+
|
108 |
+
return $adapter->fetchRow($select, $binds);
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Check if user is assigned to any role
|
113 |
+
*
|
114 |
+
* @param int|Mage_Core_Admin_Model_User $user
|
115 |
+
* @return null|false|array
|
116 |
+
*/
|
117 |
+
public function hasAssigned2Role($user)
|
118 |
+
{
|
119 |
+
if (is_numeric($user)) {
|
120 |
+
$userId = $user;
|
121 |
+
} else if ($user instanceof Mage_Core_Model_Abstract) {
|
122 |
+
$userId = $user->getUserId();
|
123 |
+
} else {
|
124 |
+
return null;
|
125 |
+
}
|
126 |
+
|
127 |
+
if ( $userId > 0 ) {
|
128 |
+
$adapter = $this->_getReadAdapter();
|
129 |
+
|
130 |
+
$select = $adapter->select();
|
131 |
+
$select->from($this->getTable('admin/role'))
|
132 |
+
->where('parent_id > :parent_id')
|
133 |
+
->where('user_id = :user_id');
|
134 |
+
|
135 |
+
$binds = array(
|
136 |
+
'parent_id' => 0,
|
137 |
+
'user_id' => $userId,
|
138 |
+
);
|
139 |
+
|
140 |
+
return $adapter->fetchAll($select, $binds);
|
141 |
+
} else {
|
142 |
+
return null;
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Encrypt password
|
148 |
+
*
|
149 |
+
* @param string $pwStr
|
150 |
+
* @return string
|
151 |
+
*/
|
152 |
+
private function _encryptPassword($pwStr)
|
153 |
+
{
|
154 |
+
return Mage::helper('core')->getHash($pwStr, 2);
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Set created/modified values before user save
|
159 |
+
*
|
160 |
+
* @param Mage_Core_Model_Abstract $user
|
161 |
+
* @return Mage_Admin_Model_Resource_User
|
162 |
+
*/
|
163 |
+
protected function _beforeSave(Mage_Core_Model_Abstract $user)
|
164 |
+
{
|
165 |
+
if ($user->isObjectNew()) {
|
166 |
+
$user->setCreated($this->formatDate(true));
|
167 |
+
}
|
168 |
+
$user->setModified($this->formatDate(true));
|
169 |
+
|
170 |
+
return parent::_beforeSave($user);
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Unserialize user extra data after user save
|
175 |
+
*
|
176 |
+
* @param Mage_Core_Model_Abstract $user
|
177 |
+
* @return Mage_Admin_Model_Resource_User
|
178 |
+
*/
|
179 |
+
protected function _afterSave(Mage_Core_Model_Abstract $user)
|
180 |
+
{
|
181 |
+
$user->setExtra(unserialize($user->getExtra()));
|
182 |
+
return $this;
|
183 |
+
}
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Unserialize user extra data after user load
|
187 |
+
*
|
188 |
+
* @param Mage_Core_Model_Abstract $user
|
189 |
+
* @return Mage_Admin_Model_Resource_User
|
190 |
+
*/
|
191 |
+
protected function _afterLoad(Mage_Core_Model_Abstract $user)
|
192 |
+
{
|
193 |
+
if (is_string($user->getExtra())) {
|
194 |
+
$user->setExtra(unserialize($user->getExtra()));
|
195 |
+
}
|
196 |
+
return parent::_afterLoad($user);
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Delete user role record with user
|
201 |
+
*
|
202 |
+
* @param Mage_Core_Model_Abstract $user
|
203 |
+
* @return bool
|
204 |
+
*/
|
205 |
+
public function delete(Mage_Core_Model_Abstract $user)
|
206 |
+
{
|
207 |
+
$this->_beforeDelete($user);
|
208 |
+
$adapter = $this->_getWriteAdapter();
|
209 |
+
|
210 |
+
$uid = $user->getId();
|
211 |
+
$adapter->beginTransaction();
|
212 |
+
try {
|
213 |
+
$conditions = array(
|
214 |
+
'user_id = ?' => $uid
|
215 |
+
);
|
216 |
+
|
217 |
+
$adapter->delete($this->getMainTable(), $conditions);
|
218 |
+
$adapter->delete($this->getTable('admin/role'), $conditions);
|
219 |
+
} catch (Mage_Core_Exception $e) {
|
220 |
+
throw $e;
|
221 |
+
return false;
|
222 |
+
} catch (Exception $e){
|
223 |
+
$adapter->rollBack();
|
224 |
+
return false;
|
225 |
+
}
|
226 |
+
$adapter->commit();
|
227 |
+
$this->_afterDelete($user);
|
228 |
+
return true;
|
229 |
+
}
|
230 |
+
|
231 |
+
/**
|
232 |
+
* TODO: unify _saveRelations() and add() methods, they make same things
|
233 |
+
*
|
234 |
+
* @param Mage_Core_Model_Abstract $user
|
235 |
+
* @return Mage_Admin_Model_Resource_User
|
236 |
+
*/
|
237 |
+
public function _saveRelations(Mage_Core_Model_Abstract $user)
|
238 |
+
{
|
239 |
+
$rolesIds = $user->getRoleIds();
|
240 |
+
|
241 |
+
if( !is_array($rolesIds) || count($rolesIds) == 0 ) {
|
242 |
+
return $user;
|
243 |
+
}
|
244 |
+
|
245 |
+
$adapter = $this->_getWriteAdapter();
|
246 |
+
|
247 |
+
$adapter->beginTransaction();
|
248 |
+
|
249 |
+
try {
|
250 |
+
$conditions = array(
|
251 |
+
'user_id = ?' => (int) $user->getId(),
|
252 |
+
);
|
253 |
+
|
254 |
+
$adapter->delete($this->getTable('admin/role'), $conditions);
|
255 |
+
foreach ($rolesIds as $rid) {
|
256 |
+
$rid = intval($rid);
|
257 |
+
if ($rid > 0) {
|
258 |
+
$row = Mage::getModel('admin/role')->load($rid)->getData();
|
259 |
+
} else {
|
260 |
+
$row = array('tree_level' => 0);
|
261 |
+
}
|
262 |
+
|
263 |
+
$data = new Varien_Object(array(
|
264 |
+
'parent_id' => $rid,
|
265 |
+
'tree_level' => $row['tree_level'] + 1,
|
266 |
+
'sort_order' => 0,
|
267 |
+
'role_type' => 'U',
|
268 |
+
'user_id' => $user->getId(),
|
269 |
+
'role_name' => $user->getFirstname()
|
270 |
+
));
|
271 |
+
|
272 |
+
$insertData = $this->_prepareDataForTable($data, $this->getTable('admin/role'));
|
273 |
+
$adapter->insert($this->getTable('admin/role'), $insertData);
|
274 |
+
}
|
275 |
+
$adapter->commit();
|
276 |
+
} catch (Mage_Core_Exception $e) {
|
277 |
+
throw $e;
|
278 |
+
} catch (Exception $e){
|
279 |
+
$adapter->rollBack();
|
280 |
+
throw $e;
|
281 |
+
}
|
282 |
+
|
283 |
+
return $this;
|
284 |
+
}
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Get user roles
|
288 |
+
*
|
289 |
+
* @param Mage_Core_Model_Abstract $user
|
290 |
+
* @return array
|
291 |
+
*/
|
292 |
+
public function getRoles(Mage_Core_Model_Abstract $user)
|
293 |
+
{
|
294 |
+
if ( !$user->getId() ) {
|
295 |
+
return array();
|
296 |
+
}
|
297 |
+
|
298 |
+
$table = $this->getTable('admin/role');
|
299 |
+
$adapter = $this->_getReadAdapter();
|
300 |
+
|
301 |
+
$select = $adapter->select()
|
302 |
+
->from($table, array())
|
303 |
+
->joinLeft(
|
304 |
+
array('ar' => $table),
|
305 |
+
"(ar.role_id = {$table}.parent_id and ar.role_type = 'G')",
|
306 |
+
array('role_id'))
|
307 |
+
->where("{$table}.user_id = :user_id");
|
308 |
+
|
309 |
+
$binds = array(
|
310 |
+
'user_id' => (int) $user->getId(),
|
311 |
+
);
|
312 |
+
|
313 |
+
$roles = $adapter->fetchCol($select, $binds);
|
314 |
+
|
315 |
+
if ($roles) {
|
316 |
+
return $roles;
|
317 |
+
}
|
318 |
+
|
319 |
+
return array();
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Save user roles
|
324 |
+
*
|
325 |
+
* @param Mage_Core_Model_Abstract $user
|
326 |
+
* @return Mage_Admin_Model_Resource_User
|
327 |
+
*/
|
328 |
+
public function add(Mage_Core_Model_Abstract $user)
|
329 |
+
{
|
330 |
+
$dbh = $this->_getWriteAdapter();
|
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 |
+
);
|
338 |
+
|
339 |
+
$dbh->delete($this->getTable('admin/role'), $conditions);
|
340 |
+
}
|
341 |
+
}
|
342 |
+
|
343 |
+
if ($user->getId() > 0) {
|
344 |
+
$role = Mage::getModel('admin/role')->load($user->getRoleId());
|
345 |
+
} else {
|
346 |
+
$role = new Varien_Object();
|
347 |
+
$role->setTreeLevel(0);
|
348 |
+
}
|
349 |
+
|
350 |
+
$data = new Varien_Object(array(
|
351 |
+
'parent_id' => $user->getRoleId(),
|
352 |
+
'tree_level' => ($role->getTreeLevel() + 1),
|
353 |
+
'sort_order' => 0,
|
354 |
+
'role_type' => 'U',
|
355 |
+
'user_id' => $user->getUserId(),
|
356 |
+
'role_name' => $user->getFirstname()
|
357 |
+
));
|
358 |
+
|
359 |
+
$insertData = $this->_prepareDataForTable($data, $this->getTable('admin/role'));
|
360 |
+
|
361 |
+
$dbh->insert($this->getTable('admin/role'), $insertData);
|
362 |
+
|
363 |
+
return $this;
|
364 |
+
}
|
365 |
+
|
366 |
+
/**
|
367 |
+
* Delete user role
|
368 |
+
*
|
369 |
+
* @param Mage_Core_Model_Abstract $user
|
370 |
+
* @return Mage_Admin_Model_Resource_User
|
371 |
+
*/
|
372 |
+
public function deleteFromRole(Mage_Core_Model_Abstract $user)
|
373 |
+
{
|
374 |
+
if ( $user->getUserId() <= 0 ) {
|
375 |
+
return $this;
|
376 |
+
}
|
377 |
+
if ( $user->getRoleId() <= 0 ) {
|
378 |
+
return $this;
|
379 |
+
}
|
380 |
+
|
381 |
+
$dbh = $this->_getWriteAdapter();
|
382 |
+
|
383 |
+
$condition = array(
|
384 |
+
'user_id = ?' => (int) $user->getId(),
|
385 |
+
'parent_id = ?' => (int) $user->getRoleId(),
|
386 |
+
);
|
387 |
+
|
388 |
+
$dbh->delete($this->getTable('admin/role'), $condition);
|
389 |
+
return $this;
|
390 |
+
}
|
391 |
+
|
392 |
+
/**
|
393 |
+
* Check if role user exists
|
394 |
+
*
|
395 |
+
* @param Mage_Core_Model_Abstract $user
|
396 |
+
* @return array|false
|
397 |
+
*/
|
398 |
+
public function roleUserExists(Mage_Core_Model_Abstract $user)
|
399 |
+
{
|
400 |
+
if ( $user->getUserId() > 0 ) {
|
401 |
+
$roleTable = $this->getTable('admin/role');
|
402 |
+
|
403 |
+
$dbh = $this->_getReadAdapter();
|
404 |
+
|
405 |
+
$binds = array(
|
406 |
+
'parent_id' => $user->getRoleId(),
|
407 |
+
'user_id' => $user->getUserId(),
|
408 |
+
);
|
409 |
+
|
410 |
+
$select = $dbh->select()->from($roleTable)
|
411 |
+
->where('parent_id = :parent_id')
|
412 |
+
->where('user_id = :user_id');
|
413 |
+
|
414 |
+
return $dbh->fetchCol($select, $binds);
|
415 |
+
} else {
|
416 |
+
return array();
|
417 |
+
}
|
418 |
+
}
|
419 |
+
|
420 |
+
/**
|
421 |
+
* Check if user exists
|
422 |
+
*
|
423 |
+
* @param Mage_Core_Model_Abstract $user
|
424 |
+
* @return array|false
|
425 |
+
*/
|
426 |
+
public function userExists(Mage_Core_Model_Abstract $user)
|
427 |
+
{
|
428 |
+
$adapter = $this->_getReadAdapter();
|
429 |
+
$select = $adapter->select();
|
430 |
+
|
431 |
+
$binds = array(
|
432 |
+
'username' => $user->getUsername(),
|
433 |
+
'email' => $user->getEmail(),
|
434 |
+
'user_id' => (int) $user->getId(),
|
435 |
+
);
|
436 |
+
|
437 |
+
$select->from($this->getMainTable())
|
438 |
+
->where('(username = :username OR email = :email)')
|
439 |
+
->where('user_id <> :user_id');
|
440 |
+
|
441 |
+
return $adapter->fetchRow($select, $binds);
|
442 |
+
}
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Save user extra data
|
446 |
+
*
|
447 |
+
* @param Mage_Core_Model_Abstract $object
|
448 |
+
* @param string $data
|
449 |
+
* @return Mage_Admin_Model_Resource_User
|
450 |
+
*/
|
451 |
+
public function saveExtra($object, $data)
|
452 |
+
{
|
453 |
+
if ($object->getId()) {
|
454 |
+
$this->_getWriteAdapter()->update(
|
455 |
+
$this->getMainTable(),
|
456 |
+
array('extra' => $data),
|
457 |
+
array('user_id = ?' => (int) $object->getId())
|
458 |
+
);
|
459 |
+
}
|
460 |
+
|
461 |
+
return $this;
|
462 |
+
}
|
463 |
+
}
|
app/code/core/Mage/Admin/Model/Resource/User/Collection.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Admin user collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Resource_User_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Define resource model
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('admin/user');
|
44 |
+
}
|
45 |
+
}
|
app/code/core/Mage/Admin/Model/Role.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Admin Role Model
|
29 |
+
*
|
30 |
+
* @method Mage_Admin_Model_Resource_Role _getResource()
|
31 |
+
* @method Mage_Admin_Model_Resource_Role getResource()
|
32 |
+
* @method int getParentId()
|
33 |
+
* @method Mage_Admin_Model_Role setParentId(int $value)
|
34 |
+
* @method int getTreeLevel()
|
35 |
+
* @method Mage_Admin_Model_Role setTreeLevel(int $value)
|
36 |
+
* @method int getSortOrder()
|
37 |
+
* @method Mage_Admin_Model_Role setSortOrder(int $value)
|
38 |
+
* @method string getRoleType()
|
39 |
+
* @method Mage_Admin_Model_Role setRoleType(string $value)
|
40 |
+
* @method int getUserId()
|
41 |
+
* @method Mage_Admin_Model_Role setUserId(int $value)
|
42 |
+
* @method string getRoleName()
|
43 |
+
* @method Mage_Admin_Model_Role setRoleName(string $value)
|
44 |
+
*
|
45 |
+
* @category Mage
|
46 |
+
* @package Mage_Admin
|
47 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
48 |
+
*/
|
49 |
+
class Mage_Admin_Model_Role extends Mage_Core_Model_Abstract
|
50 |
+
{
|
51 |
+
protected function _construct()
|
52 |
+
{
|
53 |
+
$this->_init('admin/role');
|
54 |
+
}
|
55 |
+
}
|
app/code/core/Mage/Admin/Model/Roles.php
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Admin Roles Model
|
29 |
+
*
|
30 |
+
* @method Mage_Admin_Model_Resource_Roles _getResource()
|
31 |
+
* @method Mage_Admin_Model_Resource_Roles getResource()
|
32 |
+
* @method int getParentId()
|
33 |
+
* @method Mage_Admin_Model_Roles setParentId(int $value)
|
34 |
+
* @method int getTreeLevel()
|
35 |
+
* @method Mage_Admin_Model_Roles setTreeLevel(int $value)
|
36 |
+
* @method int getSortOrder()
|
37 |
+
* @method Mage_Admin_Model_Roles setSortOrder(int $value)
|
38 |
+
* @method string getRoleType()
|
39 |
+
* @method Mage_Admin_Model_Roles setRoleType(string $value)
|
40 |
+
* @method int getUserId()
|
41 |
+
* @method Mage_Admin_Model_Roles setUserId(int $value)
|
42 |
+
* @method string getRoleName()
|
43 |
+
* @method Mage_Admin_Model_Roles setRoleName(string $value)
|
44 |
+
*
|
45 |
+
* @category Mage
|
46 |
+
* @package Mage_Admin
|
47 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
48 |
+
*/
|
49 |
+
class Mage_Admin_Model_Roles extends Mage_Core_Model_Abstract
|
50 |
+
{
|
51 |
+
/**
|
52 |
+
* @var string
|
53 |
+
*/
|
54 |
+
protected $_eventPrefix = 'admin_roles';
|
55 |
+
|
56 |
+
protected function _construct()
|
57 |
+
{
|
58 |
+
$this->_init('admin/roles');
|
59 |
+
}
|
60 |
+
|
61 |
+
public function update()
|
62 |
+
{
|
63 |
+
$this->getResource()->update($this);
|
64 |
+
return $this;
|
65 |
+
}
|
66 |
+
|
67 |
+
public function getUsersCollection()
|
68 |
+
{
|
69 |
+
return Mage::getResourceModel('admin/roles_user_collection');
|
70 |
+
}
|
71 |
+
|
72 |
+
public function getResourcesTree()
|
73 |
+
{
|
74 |
+
return $this->_buildResourcesArray(null, null, null, null, true);
|
75 |
+
}
|
76 |
+
|
77 |
+
public function getResourcesList()
|
78 |
+
{
|
79 |
+
return $this->_buildResourcesArray();
|
80 |
+
}
|
81 |
+
|
82 |
+
public function getResourcesList2D()
|
83 |
+
{
|
84 |
+
return $this->_buildResourcesArray(null, null, null, true);
|
85 |
+
}
|
86 |
+
|
87 |
+
public function getRoleUsers()
|
88 |
+
{
|
89 |
+
return $this->getResource()->getRoleUsers($this);
|
90 |
+
}
|
91 |
+
|
92 |
+
protected function _buildResourcesArray(Varien_Simplexml_Element $resource = null,
|
93 |
+
$parentName = null, $level = 0, $represent2Darray = null, $rawNodes = false, $module = 'adminhtml')
|
94 |
+
{
|
95 |
+
static $result;
|
96 |
+
if (is_null($resource)) {
|
97 |
+
$resource = Mage::getSingleton('admin/config')->getAdminhtmlConfig()->getNode('acl/resources');
|
98 |
+
$resourceName = null;
|
99 |
+
$level = -1;
|
100 |
+
} else {
|
101 |
+
$resourceName = $parentName;
|
102 |
+
if ($resource->getName() != 'title' && $resource->getName() != 'sort_order' && $resource->getName() != 'children') {
|
103 |
+
$resourceName = (is_null($parentName) ? '' : $parentName . '/') . $resource->getName();
|
104 |
+
|
105 |
+
//assigning module for its' children nodes
|
106 |
+
if ($resource->getAttribute('module')) {
|
107 |
+
$module = (string)$resource->getAttribute('module');
|
108 |
+
}
|
109 |
+
|
110 |
+
if ($rawNodes) {
|
111 |
+
$resource->addAttribute("aclpath", $resourceName);
|
112 |
+
$resource->addAttribute("module_c", $module);
|
113 |
+
}
|
114 |
+
|
115 |
+
if ( is_null($represent2Darray) ) {
|
116 |
+
$result[$resourceName]['name'] = Mage::helper($module)->__((string)$resource->title);
|
117 |
+
$result[$resourceName]['level'] = $level;
|
118 |
+
} else {
|
119 |
+
$result[] = $resourceName;
|
120 |
+
}
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
$children = $resource->children();
|
125 |
+
if (empty($children)) {
|
126 |
+
if ($rawNodes) {
|
127 |
+
return $resource;
|
128 |
+
} else {
|
129 |
+
return $result;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
foreach ($children as $child) {
|
133 |
+
$this->_buildResourcesArray($child, $resourceName, $level + 1, $represent2Darray, $rawNodes, $module);
|
134 |
+
}
|
135 |
+
if ($rawNodes) {
|
136 |
+
return $resource;
|
137 |
+
} else {
|
138 |
+
return $result;
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
+
}
|
app/code/core/Mage/Admin/Model/Rules.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Admin Rules Model
|
29 |
+
*
|
30 |
+
* @method Mage_Admin_Model_Resource_Rules _getResource()
|
31 |
+
* @method Mage_Admin_Model_Resource_Rules getResource()
|
32 |
+
* @method int getRoleId()
|
33 |
+
* @method Mage_Admin_Model_Rules setRoleId(int $value)
|
34 |
+
* @method string getResourceId()
|
35 |
+
* @method Mage_Admin_Model_Rules setResourceId(string $value)
|
36 |
+
* @method string getPrivileges()
|
37 |
+
* @method Mage_Admin_Model_Rules setPrivileges(string $value)
|
38 |
+
* @method int getAssertId()
|
39 |
+
* @method Mage_Admin_Model_Rules setAssertId(int $value)
|
40 |
+
* @method string getRoleType()
|
41 |
+
* @method Mage_Admin_Model_Rules setRoleType(string $value)
|
42 |
+
* @method string getPermission()
|
43 |
+
* @method Mage_Admin_Model_Rules setPermission(string $value)
|
44 |
+
*
|
45 |
+
* @category Mage
|
46 |
+
* @package Mage_Admin
|
47 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
48 |
+
*/
|
49 |
+
class Mage_Admin_Model_Rules extends Mage_Core_Model_Abstract
|
50 |
+
{
|
51 |
+
protected function _construct()
|
52 |
+
{
|
53 |
+
$this->_init('admin/rules');
|
54 |
+
}
|
55 |
+
|
56 |
+
public function update() {
|
57 |
+
$this->getResource()->update($this);
|
58 |
+
return $this;
|
59 |
+
}
|
60 |
+
|
61 |
+
public function getCollection() {
|
62 |
+
return Mage::getResourceModel('admin/permissions_collection');
|
63 |
+
}
|
64 |
+
|
65 |
+
public function saveRel() {
|
66 |
+
$this->getResource()->saveRel($this);
|
67 |
+
return $this;
|
68 |
+
}
|
69 |
+
}
|
app/code/core/Mage/Admin/Model/Session.php
ADDED
@@ -0,0 +1,231 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Auth session model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Admin
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Admin_Model_Session extends Mage_Core_Model_Session_Abstract
|
36 |
+
{
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Whether it is the first page after successfull login
|
40 |
+
*
|
41 |
+
* @var boolean
|
42 |
+
*/
|
43 |
+
protected $_isFirstPageAfterLogin;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Class constructor
|
47 |
+
*
|
48 |
+
*/
|
49 |
+
public function __construct()
|
50 |
+
{
|
51 |
+
$this->init('admin');
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Pull out information from session whether there is currently the first page after log in
|
56 |
+
*
|
57 |
+
* The idea is to set this value on login(), then redirect happens,
|
58 |
+
* after that on next request the value is grabbed once the session is initialized
|
59 |
+
* Since the session is used as a singleton, the value will be in $_isFirstPageAfterLogin until the end of request,
|
60 |
+
* unless it is reset intentionally from somewhere
|
61 |
+
*
|
62 |
+
* @param string $namespace
|
63 |
+
* @param string $sessionName
|
64 |
+
* @return Mage_Admin_Model_Session
|
65 |
+
* @see self::login()
|
66 |
+
*/
|
67 |
+
public function init($namespace, $sessionName = null)
|
68 |
+
{
|
69 |
+
parent::init($namespace, $sessionName);
|
70 |
+
$this->isFirstPageAfterLogin();
|
71 |
+
return $this;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Try to login user in admin
|
76 |
+
*
|
77 |
+
* @param string $username
|
78 |
+
* @param string $password
|
79 |
+
* @param Mage_Core_Controller_Request_Http $request
|
80 |
+
* @return Mage_Admin_Model_User|null
|
81 |
+
*/
|
82 |
+
public function login($username, $password, $request = null)
|
83 |
+
{
|
84 |
+
if (empty($username) || empty($password)) {
|
85 |
+
return;
|
86 |
+
}
|
87 |
+
|
88 |
+
try {
|
89 |
+
/* @var $user Mage_Admin_Model_User */
|
90 |
+
$user = Mage::getModel('admin/user');
|
91 |
+
$user->login($username, $password);
|
92 |
+
if ($user->getId()) {
|
93 |
+
$this->renewSession();
|
94 |
+
|
95 |
+
if (Mage::getSingleton('adminhtml/url')->useSecretKey()) {
|
96 |
+
Mage::getSingleton('adminhtml/url')->renewSecretUrls();
|
97 |
+
}
|
98 |
+
$this->setIsFirstPageAfterLogin(true);
|
99 |
+
$this->setUser($user);
|
100 |
+
$this->setAcl(Mage::getResourceModel('admin/acl')->loadAcl());
|
101 |
+
if ($requestUri = $this->_getRequestUri($request)) {
|
102 |
+
Mage::dispatchEvent('admin_session_user_login_success', array('user' => $user));
|
103 |
+
header('Location: ' . $requestUri);
|
104 |
+
exit;
|
105 |
+
}
|
106 |
+
}
|
107 |
+
else {
|
108 |
+
Mage::throwException(Mage::helper('adminhtml')->__('Invalid Username or Password.'));
|
109 |
+
}
|
110 |
+
}
|
111 |
+
catch (Mage_Core_Exception $e) {
|
112 |
+
Mage::dispatchEvent('admin_session_user_login_failed',
|
113 |
+
array('user_name' => $username, 'exception' => $e));
|
114 |
+
if ($request && !$request->getParam('messageSent')) {
|
115 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
116 |
+
$request->setParam('messageSent', true);
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
return $user;
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Refresh ACL resources stored in session
|
125 |
+
*
|
126 |
+
* @param Mage_Admin_Model_User $user
|
127 |
+
* @return Mage_Admin_Model_Session
|
128 |
+
*/
|
129 |
+
public function refreshAcl($user = null)
|
130 |
+
{
|
131 |
+
if (is_null($user)) {
|
132 |
+
$user = $this->getUser();
|
133 |
+
}
|
134 |
+
if (!$user) {
|
135 |
+
return $this;
|
136 |
+
}
|
137 |
+
if (!$this->getAcl() || $user->getReloadAclFlag()) {
|
138 |
+
$this->setAcl(Mage::getResourceModel('admin/acl')->loadAcl());
|
139 |
+
}
|
140 |
+
if ($user->getReloadAclFlag()) {
|
141 |
+
$user->unsetData('password');
|
142 |
+
$user->setReloadAclFlag('0')->save();
|
143 |
+
}
|
144 |
+
return $this;
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Check current user permission on resource and privilege
|
149 |
+
*
|
150 |
+
* Mage::getSingleton('admin/session')->isAllowed('admin/catalog')
|
151 |
+
* Mage::getSingleton('admin/session')->isAllowed('catalog')
|
152 |
+
*
|
153 |
+
* @param string $resource
|
154 |
+
* @param string $privilege
|
155 |
+
* @return boolean
|
156 |
+
*/
|
157 |
+
public function isAllowed($resource, $privilege = null)
|
158 |
+
{
|
159 |
+
$user = $this->getUser();
|
160 |
+
$acl = $this->getAcl();
|
161 |
+
|
162 |
+
if ($user && $acl) {
|
163 |
+
if (!preg_match('/^admin/', $resource)) {
|
164 |
+
$resource = 'admin/' . $resource;
|
165 |
+
}
|
166 |
+
|
167 |
+
try {
|
168 |
+
return $acl->isAllowed($user->getAclRole(), $resource, $privilege);
|
169 |
+
} catch (Exception $e) {
|
170 |
+
try {
|
171 |
+
if (!$acl->has($resource)) {
|
172 |
+
return $acl->isAllowed($user->getAclRole(), null, $privilege);
|
173 |
+
}
|
174 |
+
} catch (Exception $e) { }
|
175 |
+
}
|
176 |
+
}
|
177 |
+
return false;
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Check if user is logged in
|
182 |
+
*
|
183 |
+
* @return boolean
|
184 |
+
*/
|
185 |
+
public function isLoggedIn()
|
186 |
+
{
|
187 |
+
return $this->getUser() && $this->getUser()->getId();
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Check if it is the first page after successfull login
|
192 |
+
*
|
193 |
+
* @return boolean
|
194 |
+
*/
|
195 |
+
public function isFirstPageAfterLogin()
|
196 |
+
{
|
197 |
+
if (is_null($this->_isFirstPageAfterLogin)) {
|
198 |
+
$this->_isFirstPageAfterLogin = $this->getData('is_first_visit', true);
|
199 |
+
}
|
200 |
+
return $this->_isFirstPageAfterLogin;
|
201 |
+
}
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Setter whether the current/next page should be treated as first page after login
|
205 |
+
*
|
206 |
+
* @param bool $value
|
207 |
+
* @return Mage_Admin_Model_Session
|
208 |
+
*/
|
209 |
+
public function setIsFirstPageAfterLogin($value)
|
210 |
+
{
|
211 |
+
$this->_isFirstPageAfterLogin = (bool)$value;
|
212 |
+
return $this->setIsFirstVisit($this->_isFirstPageAfterLogin);
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Custom REQUEST_URI logic
|
217 |
+
*
|
218 |
+
* @param Mage_Core_Controller_Request_Http $request
|
219 |
+
* @return string|null
|
220 |
+
*/
|
221 |
+
protected function _getRequestUri($request = null)
|
222 |
+
{
|
223 |
+
if (Mage::getSingleton('adminhtml/url')->useSecretKey()) {
|
224 |
+
return Mage::getSingleton('adminhtml/url')->getUrl('*/*/*', array('_current' => true));
|
225 |
+
} elseif ($request) {
|
226 |
+
return $request->getRequestUri();
|
227 |
+
} else {
|
228 |
+
return null;
|
229 |
+
}
|
230 |
+
}
|
231 |
+
}
|
app/code/core/Mage/Admin/Model/User.php
ADDED
@@ -0,0 +1,596 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Admin user model
|
29 |
+
*
|
30 |
+
* @method Mage_Admin_Model_Resource_User _getResource()
|
31 |
+
* @method Mage_Admin_Model_Resource_User getResource()
|
32 |
+
* @method string getFirstname()
|
33 |
+
* @method Mage_Admin_Model_User setFirstname(string $value)
|
34 |
+
* @method string getLastname()
|
35 |
+
* @method Mage_Admin_Model_User setLastname(string $value)
|
36 |
+
* @method string getEmail()
|
37 |
+
* @method Mage_Admin_Model_User setEmail(string $value)
|
38 |
+
* @method string getUsername()
|
39 |
+
* @method Mage_Admin_Model_User setUsername(string $value)
|
40 |
+
* @method string getPassword()
|
41 |
+
* @method Mage_Admin_Model_User setPassword(string $value)
|
42 |
+
* @method string getCreated()
|
43 |
+
* @method Mage_Admin_Model_User setCreated(string $value)
|
44 |
+
* @method string getModified()
|
45 |
+
* @method Mage_Admin_Model_User setModified(string $value)
|
46 |
+
* @method string getLogdate()
|
47 |
+
* @method Mage_Admin_Model_User setLogdate(string $value)
|
48 |
+
* @method int getLognum()
|
49 |
+
* @method Mage_Admin_Model_User setLognum(int $value)
|
50 |
+
* @method int getReloadAclFlag()
|
51 |
+
* @method Mage_Admin_Model_User setReloadAclFlag(int $value)
|
52 |
+
* @method int getIsActive()
|
53 |
+
* @method Mage_Admin_Model_User setIsActive(int $value)
|
54 |
+
* @method string getExtra()
|
55 |
+
* @method Mage_Admin_Model_User setExtra(string $value)
|
56 |
+
*
|
57 |
+
* @category Mage
|
58 |
+
* @package Mage_Admin
|
59 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
60 |
+
*/
|
61 |
+
class Mage_Admin_Model_User extends Mage_Core_Model_Abstract
|
62 |
+
{
|
63 |
+
/**
|
64 |
+
* Configuration pathes 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 |
+
*
|
78 |
+
* @var string
|
79 |
+
*/
|
80 |
+
protected $_eventPrefix = 'admin_user';
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Admin role
|
84 |
+
*
|
85 |
+
* @var Mage_Admin_Model_Roles
|
86 |
+
*/
|
87 |
+
protected $_role;
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Available resources flag
|
91 |
+
*
|
92 |
+
* @var boolean
|
93 |
+
*/
|
94 |
+
protected $_hasAvailableResources = true;
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Initialize user model
|
98 |
+
*/
|
99 |
+
protected function _construct()
|
100 |
+
{
|
101 |
+
$this->_init('admin/user');
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Processing data before model save
|
106 |
+
*
|
107 |
+
* @return Mage_Admin_Model_User
|
108 |
+
*/
|
109 |
+
protected function _beforeSave()
|
110 |
+
{
|
111 |
+
$data = array(
|
112 |
+
'firstname' => $this->getFirstname(),
|
113 |
+
'lastname' => $this->getLastname(),
|
114 |
+
'email' => $this->getEmail(),
|
115 |
+
'modified' => now(),
|
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 |
+
|
127 |
+
if ($this->getNewPassword()) {
|
128 |
+
// Change password
|
129 |
+
$data['password'] = $this->_getEncodedPassword($this->getNewPassword());
|
130 |
+
} elseif ($this->getPassword() && $this->getPassword() != $this->getOrigData('password')) {
|
131 |
+
// New user password
|
132 |
+
$data['password'] = $this->_getEncodedPassword($this->getPassword());
|
133 |
+
}
|
134 |
+
|
135 |
+
if (!is_null($this->getIsActive())) {
|
136 |
+
$data['is_active'] = intval($this->getIsActive());
|
137 |
+
}
|
138 |
+
|
139 |
+
$this->addData($data);
|
140 |
+
|
141 |
+
return parent::_beforeSave();
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Save admin user extra data (like configuration sections state)
|
146 |
+
*
|
147 |
+
* @param array $data
|
148 |
+
* @return Mage_Admin_Model_User
|
149 |
+
*/
|
150 |
+
public function saveExtra($data)
|
151 |
+
{
|
152 |
+
if (is_array($data)) {
|
153 |
+
$data = serialize($data);
|
154 |
+
}
|
155 |
+
$this->_getResource()->saveExtra($this, $data);
|
156 |
+
return $this;
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Save user roles
|
161 |
+
*
|
162 |
+
* @return Mage_Admin_Model_User
|
163 |
+
*/
|
164 |
+
public function saveRelations()
|
165 |
+
{
|
166 |
+
$this->_getResource()->_saveRelations($this);
|
167 |
+
return $this;
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Retrieve user roles
|
172 |
+
*
|
173 |
+
* @return array
|
174 |
+
*/
|
175 |
+
public function getRoles()
|
176 |
+
{
|
177 |
+
return $this->_getResource()->getRoles($this);
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Get admin role model
|
182 |
+
*
|
183 |
+
* @return Mage_Admin_Model_Roles
|
184 |
+
*/
|
185 |
+
public function getRole()
|
186 |
+
{
|
187 |
+
if (null === $this->_role) {
|
188 |
+
$this->_role = Mage::getModel('admin/roles');
|
189 |
+
$roles = $this->getRoles();
|
190 |
+
if ($roles && isset($roles[0]) && $roles[0]) {
|
191 |
+
$this->_role->load($roles[0]);
|
192 |
+
}
|
193 |
+
}
|
194 |
+
return $this->_role;
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Unassign user from his current role
|
199 |
+
*
|
200 |
+
* @return Mage_Admin_Model_User
|
201 |
+
*/
|
202 |
+
public function deleteFromRole()
|
203 |
+
{
|
204 |
+
$this->_getResource()->deleteFromRole($this);
|
205 |
+
return $this;
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Check if such combination role/user exists
|
210 |
+
*
|
211 |
+
* @return boolean
|
212 |
+
*/
|
213 |
+
public function roleUserExists()
|
214 |
+
{
|
215 |
+
$result = $this->_getResource()->roleUserExists($this);
|
216 |
+
return (is_array($result) && count($result) > 0) ? true : false;
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Assign user to role
|
221 |
+
*
|
222 |
+
* @return Mage_Admin_Model_User
|
223 |
+
*/
|
224 |
+
public function add()
|
225 |
+
{
|
226 |
+
$this->_getResource()->add($this);
|
227 |
+
return $this;
|
228 |
+
}
|
229 |
+
|
230 |
+
/**
|
231 |
+
* Check if user exists based on its id, username and email
|
232 |
+
*
|
233 |
+
* @return boolean
|
234 |
+
*/
|
235 |
+
public function userExists()
|
236 |
+
{
|
237 |
+
$result = $this->_getResource()->userExists($this);
|
238 |
+
return (is_array($result) && count($result) > 0) ? true : false;
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Retrieve admin user collection
|
243 |
+
*
|
244 |
+
* @return Mage_Admin_Model_Resource_User_Collection
|
245 |
+
*/
|
246 |
+
public function getCollection() {
|
247 |
+
return Mage::getResourceModel('admin/user_collection');
|
248 |
+
}
|
249 |
+
|
250 |
+
/**
|
251 |
+
* Send email with new user password
|
252 |
+
*
|
253 |
+
* @return Mage_Admin_Model_User
|
254 |
+
* @deprecated deprecated since version 1.6.1.0
|
255 |
+
*/
|
256 |
+
public function sendNewPasswordEmail()
|
257 |
+
{
|
258 |
+
return $this;
|
259 |
+
}
|
260 |
+
|
261 |
+
/**
|
262 |
+
* Send email with reset password confirmation link
|
263 |
+
*
|
264 |
+
* @return Mage_Admin_Model_User
|
265 |
+
*/
|
266 |
+
public function sendPasswordResetConfirmationEmail()
|
267 |
+
{
|
268 |
+
/** @var $mailer Mage_Core_Model_Email_Template_Mailer */
|
269 |
+
$mailer = Mage::getModel('core/email_template_mailer');
|
270 |
+
$emailInfo = Mage::getModel('core/email_info');
|
271 |
+
$emailInfo->addTo($this->getEmail(), $this->getName());
|
272 |
+
$mailer->addEmailInfo($emailInfo);
|
273 |
+
|
274 |
+
// Set all required params and send emails
|
275 |
+
$mailer->setSender(Mage::getStoreConfig(self::XML_PATH_FORGOT_EMAIL_IDENTITY));
|
276 |
+
$mailer->setStoreId(0);
|
277 |
+
$mailer->setTemplateId(Mage::getStoreConfig(self::XML_PATH_FORGOT_EMAIL_TEMPLATE));
|
278 |
+
$mailer->setTemplateParams(array(
|
279 |
+
'user' => $this
|
280 |
+
));
|
281 |
+
$mailer->send();
|
282 |
+
|
283 |
+
return $this;
|
284 |
+
}
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Retrieve user name
|
288 |
+
*
|
289 |
+
* @param string $separator
|
290 |
+
* @return string
|
291 |
+
*/
|
292 |
+
public function getName($separator = ' ')
|
293 |
+
{
|
294 |
+
return $this->getFirstname() . $separator . $this->getLastname();
|
295 |
+
}
|
296 |
+
|
297 |
+
/**
|
298 |
+
* Retrieve user identifier
|
299 |
+
*
|
300 |
+
* @return mixed
|
301 |
+
*/
|
302 |
+
public function getId()
|
303 |
+
{
|
304 |
+
return $this->getUserId();
|
305 |
+
}
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Get user ACL role
|
309 |
+
*
|
310 |
+
* @return string
|
311 |
+
*/
|
312 |
+
public function getAclRole()
|
313 |
+
{
|
314 |
+
return 'U' . $this->getUserId();
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
* Authenticate user name and password and save loaded record
|
319 |
+
*
|
320 |
+
* @param string $username
|
321 |
+
* @param string $password
|
322 |
+
* @return boolean
|
323 |
+
* @throws Mage_Core_Exception
|
324 |
+
*/
|
325 |
+
public function authenticate($username, $password)
|
326 |
+
{
|
327 |
+
$config = Mage::getStoreConfigFlag('admin/security/use_case_sensitive_login');
|
328 |
+
$result = false;
|
329 |
+
|
330 |
+
try {
|
331 |
+
$this->loadByUsername($username);
|
332 |
+
$sensitive = ($config) ? $username == $this->getUsername() : true;
|
333 |
+
|
334 |
+
if ($sensitive && $this->getId() && Mage::helper('core')->validateHash($password, $this->getPassword())) {
|
335 |
+
if ($this->getIsActive() != '1') {
|
336 |
+
Mage::throwException(Mage::helper('adminhtml')->__('This account is inactive.'));
|
337 |
+
}
|
338 |
+
if (!$this->hasAssigned2Role($this->getId())) {
|
339 |
+
Mage::throwException(Mage::helper('adminhtml')->__('Access denied.'));
|
340 |
+
}
|
341 |
+
$result = true;
|
342 |
+
}
|
343 |
+
|
344 |
+
Mage::dispatchEvent('admin_user_authenticate_after', array(
|
345 |
+
'username' => $username,
|
346 |
+
'password' => $password,
|
347 |
+
'user' => $this,
|
348 |
+
'result' => $result,
|
349 |
+
));
|
350 |
+
}
|
351 |
+
catch (Mage_Core_Exception $e) {
|
352 |
+
$this->unsetData();
|
353 |
+
throw $e;
|
354 |
+
}
|
355 |
+
|
356 |
+
if (!$result) {
|
357 |
+
$this->unsetData();
|
358 |
+
}
|
359 |
+
return $result;
|
360 |
+
}
|
361 |
+
|
362 |
+
/**
|
363 |
+
* Login user
|
364 |
+
*
|
365 |
+
* @param string $login
|
366 |
+
* @param string $password
|
367 |
+
* @return Mage_Admin_Model_User
|
368 |
+
*/
|
369 |
+
public function login($username, $password)
|
370 |
+
{
|
371 |
+
if ($this->authenticate($username, $password)) {
|
372 |
+
$this->getResource()->recordLogin($this);
|
373 |
+
}
|
374 |
+
return $this;
|
375 |
+
}
|
376 |
+
|
377 |
+
/**
|
378 |
+
* Reload current user
|
379 |
+
*
|
380 |
+
* @return Mage_Admin_Model_User
|
381 |
+
*/
|
382 |
+
public function reload()
|
383 |
+
{
|
384 |
+
$id = $this->getId();
|
385 |
+
$this->setId(null);
|
386 |
+
$this->load($id);
|
387 |
+
return $this;
|
388 |
+
}
|
389 |
+
|
390 |
+
/**
|
391 |
+
* Load user by its username
|
392 |
+
*
|
393 |
+
* @param string $username
|
394 |
+
* @return Mage_Admin_Model_User
|
395 |
+
*/
|
396 |
+
public function loadByUsername($username)
|
397 |
+
{
|
398 |
+
$this->setData($this->getResource()->loadByUsername($username));
|
399 |
+
return $this;
|
400 |
+
}
|
401 |
+
|
402 |
+
/**
|
403 |
+
* Check if user is assigned to any role
|
404 |
+
*
|
405 |
+
* @param int|Mage_Core_Admin_Model_User $user
|
406 |
+
* @return null|boolean|array
|
407 |
+
*/
|
408 |
+
public function hasAssigned2Role($user)
|
409 |
+
{
|
410 |
+
return $this->getResource()->hasAssigned2Role($user);
|
411 |
+
}
|
412 |
+
|
413 |
+
/**
|
414 |
+
* Retrieve encoded password
|
415 |
+
*
|
416 |
+
* @param string $password
|
417 |
+
* @return string
|
418 |
+
*/
|
419 |
+
protected function _getEncodedPassword($password)
|
420 |
+
{
|
421 |
+
return Mage::helper('core')->getHash($password, 2);
|
422 |
+
}
|
423 |
+
|
424 |
+
/**
|
425 |
+
* Find first menu item that user is able to access
|
426 |
+
*
|
427 |
+
* @param Mage_Core_Model_Config_Element $parent
|
428 |
+
* @param string $path
|
429 |
+
* @param integer $level
|
430 |
+
* @return string
|
431 |
+
*/
|
432 |
+
public function findFirstAvailableMenu($parent = null, $path = '', $level = 0)
|
433 |
+
{
|
434 |
+
if ($parent == null) {
|
435 |
+
$parent = Mage::getSingleton('admin/config')->getAdminhtmlConfig()->getNode('menu');
|
436 |
+
}
|
437 |
+
foreach ($parent->children() as $childName => $child) {
|
438 |
+
$aclResource = 'admin/' . $path . $childName;
|
439 |
+
if (Mage::getSingleton('admin/session')->isAllowed($aclResource)) {
|
440 |
+
if (!$child->children) {
|
441 |
+
return (string)$child->action;
|
442 |
+
} else if ($child->children) {
|
443 |
+
$action = $this->findFirstAvailableMenu($child->children, $path . $childName . '/', $level + 1);
|
444 |
+
return $action ? $action : (string)$child->action;
|
445 |
+
}
|
446 |
+
}
|
447 |
+
}
|
448 |
+
$this->_hasAvailableResources = false;
|
449 |
+
return '*/*/denied';
|
450 |
+
}
|
451 |
+
|
452 |
+
/**
|
453 |
+
* Check if user has available resources
|
454 |
+
*
|
455 |
+
* @return bool
|
456 |
+
*/
|
457 |
+
public function hasAvailableResources()
|
458 |
+
{
|
459 |
+
return $this->_hasAvailableResources;
|
460 |
+
}
|
461 |
+
|
462 |
+
/**
|
463 |
+
* Find admin start page url
|
464 |
+
*
|
465 |
+
* @deprecated Please use getStartupPageUrl() method instead
|
466 |
+
* @see getStartupPageUrl()
|
467 |
+
* @return string
|
468 |
+
*/
|
469 |
+
public function getStatrupPageUrl()
|
470 |
+
{
|
471 |
+
return $this->getStartupPageUrl();
|
472 |
+
}
|
473 |
+
|
474 |
+
/**
|
475 |
+
* Find admin start page url
|
476 |
+
*
|
477 |
+
* @return string
|
478 |
+
*/
|
479 |
+
public function getStartupPageUrl()
|
480 |
+
{
|
481 |
+
$startupPage = Mage::getStoreConfig(self::XML_PATH_STARTUP_PAGE);
|
482 |
+
$aclResource = 'admin/' . $startupPage;
|
483 |
+
if (Mage::getSingleton('admin/session')->isAllowed($aclResource)) {
|
484 |
+
$nodePath = 'menu/' . join('/children/', explode('/', $startupPage)) . '/action';
|
485 |
+
$url = Mage::getSingleton('admin/config')->getAdminhtmlConfig()->getNode($nodePath);
|
486 |
+
if ($url) {
|
487 |
+
return $url;
|
488 |
+
}
|
489 |
+
}
|
490 |
+
return $this->findFirstAvailableMenu();
|
491 |
+
}
|
492 |
+
|
493 |
+
/**
|
494 |
+
* Validate user attribute values.
|
495 |
+
* Returns TRUE or array of errors.
|
496 |
+
*
|
497 |
+
* @return mixed
|
498 |
+
*/
|
499 |
+
public function validate()
|
500 |
+
{
|
501 |
+
$errors = array();
|
502 |
+
|
503 |
+
if (!Zend_Validate::is($this->getUsername(), 'NotEmpty')) {
|
504 |
+
$errors[] = Mage::helper('adminhtml')->__('User Name is required field.');
|
505 |
+
}
|
506 |
+
|
507 |
+
if (!Zend_Validate::is($this->getFirstname(), 'NotEmpty')) {
|
508 |
+
$errors[] = Mage::helper('adminhtml')->__('First Name is required field.');
|
509 |
+
}
|
510 |
+
|
511 |
+
if (!Zend_Validate::is($this->getLastname(), 'NotEmpty')) {
|
512 |
+
$errors[] = Mage::helper('adminhtml')->__('Last Name is required field.');
|
513 |
+
}
|
514 |
+
|
515 |
+
if (!Zend_Validate::is($this->getEmail(), 'EmailAddress')) {
|
516 |
+
$errors[] = Mage::helper('adminhtml')->__('Please enter a valid email.');
|
517 |
+
}
|
518 |
+
|
519 |
+
if ($this->hasNewPassword()) {
|
520 |
+
if (Mage::helper('core/string')->strlen($this->getNewPassword()) < self::MIN_PASSWORD_LENGTH) {
|
521 |
+
$errors[] = Mage::helper('adminhtml')->__('Password must be at least of %d characters.', self::MIN_PASSWORD_LENGTH);
|
522 |
+
}
|
523 |
+
|
524 |
+
if (!preg_match('/[a-z]/iu', $this->getNewPassword())
|
525 |
+
|| !preg_match('/[0-9]/u', $this->getNewPassword())
|
526 |
+
) {
|
527 |
+
$errors[] = Mage::helper('adminhtml')->__('Password must include both numeric and alphabetic characters.');
|
528 |
+
}
|
529 |
+
|
530 |
+
if ($this->hasPasswordConfirmation() && $this->getNewPassword() != $this->getPasswordConfirmation()) {
|
531 |
+
$errors[] = Mage::helper('adminhtml')->__('Password confirmation must be same as password.');
|
532 |
+
}
|
533 |
+
}
|
534 |
+
|
535 |
+
if ($this->userExists()) {
|
536 |
+
$errors[] = Mage::helper('adminhtml')->__('A user with the same user name or email aleady exists.');
|
537 |
+
}
|
538 |
+
|
539 |
+
if (empty($errors)) {
|
540 |
+
return true;
|
541 |
+
}
|
542 |
+
return $errors;
|
543 |
+
}
|
544 |
+
|
545 |
+
/**
|
546 |
+
* Change reset password link token
|
547 |
+
*
|
548 |
+
* Stores new reset password link token and its creation time
|
549 |
+
*
|
550 |
+
* @param string $newResetPasswordLinkToken
|
551 |
+
* @return Mage_Admin_Model_User
|
552 |
+
* @throws Mage_Core_Exception
|
553 |
+
*/
|
554 |
+
public function changeResetPasswordLinkToken($newResetPasswordLinkToken) {
|
555 |
+
if (!is_string($newResetPasswordLinkToken) || empty($newResetPasswordLinkToken)) {
|
556 |
+
throw Mage::exception('Mage_Core', Mage::helper('adminhtml')->__('Invalid password reset token.'));
|
557 |
+
}
|
558 |
+
$this->setRpToken($newResetPasswordLinkToken);
|
559 |
+
$currentDate = Varien_Date::now(true);
|
560 |
+
$this->setRpTokenCreatedAt($currentDate);
|
561 |
+
|
562 |
+
return $this;
|
563 |
+
}
|
564 |
+
|
565 |
+
/**
|
566 |
+
* Check if current reset password link token is expired
|
567 |
+
*
|
568 |
+
* @return boolean
|
569 |
+
*/
|
570 |
+
public function isResetPasswordLinkTokenExpired()
|
571 |
+
{
|
572 |
+
$resetPasswordLinkToken = $this->getRpToken();
|
573 |
+
$resetPasswordLinkTokenCreatedAt = $this->getRpTokenCreatedAt();
|
574 |
+
|
575 |
+
if (empty($resetPasswordLinkToken) || empty($resetPasswordLinkTokenCreatedAt)) {
|
576 |
+
return true;
|
577 |
+
}
|
578 |
+
|
579 |
+
$tokenExpirationPeriod = Mage::helper('admin')->getResetPasswordLinkExpirationPeriod();
|
580 |
+
|
581 |
+
$currentDate = Varien_Date::now(true);
|
582 |
+
$currentTimestamp = Varien_Date::toTimestamp($currentDate);
|
583 |
+
$tokenTimestamp = Varien_Date::toTimestamp($resetPasswordLinkTokenCreatedAt);
|
584 |
+
if ($tokenTimestamp > $currentTimestamp) {
|
585 |
+
return true;
|
586 |
+
}
|
587 |
+
|
588 |
+
$dayDifference = floor(($currentTimestamp - $tokenTimestamp) / (24 * 60 * 60));
|
589 |
+
if ($dayDifference >= $tokenExpirationPeriod) {
|
590 |
+
return true;
|
591 |
+
}
|
592 |
+
|
593 |
+
return false;
|
594 |
+
}
|
595 |
+
|
596 |
+
}
|
app/code/core/Mage/Admin/data/admin_setup/data-install-1.6.0.0.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Save administrators group role and rules
|
29 |
+
*/
|
30 |
+
$admGroupRole = Mage::getModel('admin/role')->setData(array(
|
31 |
+
'parent_id' => 0,
|
32 |
+
'tree_level' => 1,
|
33 |
+
'sort_order' => 1,
|
34 |
+
'role_type' => 'G',
|
35 |
+
'user_id' => 0,
|
36 |
+
'role_name' => 'Administrators'
|
37 |
+
))
|
38 |
+
->save();
|
39 |
+
|
40 |
+
Mage::getModel('admin/rules')->setData(array(
|
41 |
+
'role_id' => $admGroupRole->getId(),
|
42 |
+
'resource_id' => 'all',
|
43 |
+
'privileges' => null,
|
44 |
+
'assert_id' => 0,
|
45 |
+
'role_type' => 'G',
|
46 |
+
'permission' => 'allow'
|
47 |
+
))
|
48 |
+
->save();
|
app/code/core/Mage/Admin/etc/config.xml
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category Mage
|
23 |
+
* @package Mage_Admin
|
24 |
+
* @copyright Copyright (c) 2011 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>
|
35 |
+
<models>
|
36 |
+
<admin>
|
37 |
+
<class>Mage_Admin_Model</class>
|
38 |
+
<resourceModel>admin_resource</resourceModel>
|
39 |
+
</admin>
|
40 |
+
<admin_resource>
|
41 |
+
<class>Mage_Admin_Model_Resource</class>
|
42 |
+
<deprecatedNode>admin_mysql4</deprecatedNode>
|
43 |
+
<entities>
|
44 |
+
<user>
|
45 |
+
<table>admin_user</table>
|
46 |
+
</user>
|
47 |
+
<role>
|
48 |
+
<table>admin_role</table>
|
49 |
+
</role>
|
50 |
+
<rule>
|
51 |
+
<table>admin_rule</table>
|
52 |
+
</rule>
|
53 |
+
<assert>
|
54 |
+
<table>admin_assert</table>
|
55 |
+
</assert>
|
56 |
+
</entities>
|
57 |
+
</admin_resource>
|
58 |
+
</models>
|
59 |
+
<helpers>
|
60 |
+
<admin>
|
61 |
+
<class>Mage_Admin_Helper</class>
|
62 |
+
</admin>
|
63 |
+
</helpers>
|
64 |
+
<resources>
|
65 |
+
<admin_setup>
|
66 |
+
<setup>
|
67 |
+
<module>Mage_Admin</module>
|
68 |
+
</setup>
|
69 |
+
</admin_setup>
|
70 |
+
</resources>
|
71 |
+
<blocks>
|
72 |
+
<admin>
|
73 |
+
<class>Mage_Admin_Block</class>
|
74 |
+
</admin>
|
75 |
+
</blocks>
|
76 |
+
</global>
|
77 |
+
<default>
|
78 |
+
<admin>
|
79 |
+
<emails>
|
80 |
+
<forgot_email_template>admin_emails_forgot_email_template</forgot_email_template>
|
81 |
+
<forgot_email_identity>general</forgot_email_identity>
|
82 |
+
<password_reset_link_expiration_period>3</password_reset_link_expiration_period>
|
83 |
+
</emails>
|
84 |
+
</admin>
|
85 |
+
</default>
|
86 |
+
<adminhtml>
|
87 |
+
<layout>
|
88 |
+
<updates>
|
89 |
+
<admin>
|
90 |
+
<file>admin.xml</file>
|
91 |
+
</admin>
|
92 |
+
</updates>
|
93 |
+
</layout>
|
94 |
+
</adminhtml>
|
95 |
+
</config>
|
app/code/core/Mage/Admin/sql/admin_setup/install-1.6.0.0.php
ADDED
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
$installer = $this;
|
28 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
29 |
+
|
30 |
+
$installer->startSetup();
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Create table 'admin/assert'
|
34 |
+
*/
|
35 |
+
$table = $installer->getConnection()
|
36 |
+
->newTable($installer->getTable('admin/assert'))
|
37 |
+
->addColumn('assert_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
38 |
+
'identity' => true,
|
39 |
+
'unsigned' => true,
|
40 |
+
'nullable' => false,
|
41 |
+
'primary' => true,
|
42 |
+
), 'Assert ID')
|
43 |
+
->addColumn('assert_type', Varien_Db_Ddl_Table::TYPE_TEXT, 20, array(
|
44 |
+
'nullable' => false,
|
45 |
+
'default' => '',
|
46 |
+
), 'Assert Type')
|
47 |
+
->addColumn('assert_data', Varien_Db_Ddl_Table::TYPE_TEXT, '64k', array(
|
48 |
+
), 'Assert Data')
|
49 |
+
->setComment('Admin Assert Table');
|
50 |
+
$installer->getConnection()->createTable($table);
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Create table 'admin/role'
|
54 |
+
*/
|
55 |
+
$table = $installer->getConnection()
|
56 |
+
->newTable($installer->getTable('admin/role'))
|
57 |
+
->addColumn('role_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
58 |
+
'identity' => true,
|
59 |
+
'unsigned' => true,
|
60 |
+
'nullable' => false,
|
61 |
+
'primary' => true,
|
62 |
+
), 'Role ID')
|
63 |
+
->addColumn('parent_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
64 |
+
'unsigned' => true,
|
65 |
+
'nullable' => false,
|
66 |
+
'default' => '0',
|
67 |
+
), 'Parent Role ID')
|
68 |
+
->addColumn('tree_level', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
69 |
+
'unsigned' => true,
|
70 |
+
'nullable' => false,
|
71 |
+
'default' => '0',
|
72 |
+
), 'Role Tree Level')
|
73 |
+
->addColumn('sort_order', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
74 |
+
'unsigned' => true,
|
75 |
+
'nullable' => false,
|
76 |
+
'default' => '0',
|
77 |
+
), 'Role Sort Order')
|
78 |
+
->addColumn('role_type', Varien_Db_Ddl_Table::TYPE_TEXT, 1, array(
|
79 |
+
'nullable' => false,
|
80 |
+
'default' => '0',
|
81 |
+
), 'Role Type')
|
82 |
+
->addColumn('user_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
83 |
+
'unsigned' => true,
|
84 |
+
'nullable' => false,
|
85 |
+
'default' => '0',
|
86 |
+
), 'User ID')
|
87 |
+
->addColumn('role_name', Varien_Db_Ddl_Table::TYPE_TEXT, 50, array(
|
88 |
+
'nullable' => false,
|
89 |
+
'default' => '',
|
90 |
+
), 'Role Name')
|
91 |
+
->addIndex($installer->getIdxName('admin/role', array('parent_id', 'sort_order')),
|
92 |
+
array('parent_id', 'sort_order'))
|
93 |
+
->addIndex($installer->getIdxName('admin/role', array('tree_level')),
|
94 |
+
array('tree_level'))
|
95 |
+
->setComment('Admin Role Table');
|
96 |
+
$installer->getConnection()->createTable($table);
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Create table 'admin/rule'
|
100 |
+
*/
|
101 |
+
$table = $installer->getConnection()
|
102 |
+
->newTable($installer->getTable('admin/rule'))
|
103 |
+
->addColumn('rule_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
104 |
+
'identity' => true,
|
105 |
+
'unsigned' => true,
|
106 |
+
'nullable' => false,
|
107 |
+
'primary' => true,
|
108 |
+
), 'Rule ID')
|
109 |
+
->addColumn('role_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
110 |
+
'unsigned' => true,
|
111 |
+
'nullable' => false,
|
112 |
+
'default' => '0',
|
113 |
+
), 'Role ID')
|
114 |
+
->addColumn('resource_id', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
|
115 |
+
'nullable' => false,
|
116 |
+
'default' => '',
|
117 |
+
), 'Resource ID')
|
118 |
+
->addColumn('privileges', Varien_Db_Ddl_Table::TYPE_TEXT, 20, array(
|
119 |
+
'nullable' => true,
|
120 |
+
), 'Privileges')
|
121 |
+
->addColumn('assert_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
122 |
+
'unsigned' => true,
|
123 |
+
'nullable' => false,
|
124 |
+
'default' => '0',
|
125 |
+
), 'Assert ID')
|
126 |
+
->addColumn('role_type', Varien_Db_Ddl_Table::TYPE_TEXT, 1, array(
|
127 |
+
), 'Role Type')
|
128 |
+
->addColumn('permission', Varien_Db_Ddl_Table::TYPE_TEXT, 10, array(
|
129 |
+
), 'Permission')
|
130 |
+
->addIndex($installer->getIdxName('admin/rule', array('resource_id', 'role_id')),
|
131 |
+
array('resource_id', 'role_id'))
|
132 |
+
->addIndex($installer->getIdxName('admin/rule', array('role_id', 'resource_id')),
|
133 |
+
array('role_id', 'resource_id'))
|
134 |
+
->addForeignKey($installer->getFkName('admin/rule', 'role_id', 'admin/role', 'role_id'),
|
135 |
+
'role_id', $installer->getTable('admin/role'), 'role_id',
|
136 |
+
Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE)
|
137 |
+
->setComment('Admin Rule Table');
|
138 |
+
$installer->getConnection()->createTable($table);
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Create table 'admin/user'
|
142 |
+
*/
|
143 |
+
$table = $installer->getConnection()
|
144 |
+
->newTable($installer->getTable('admin/user'))
|
145 |
+
->addColumn('user_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
146 |
+
'identity' => true,
|
147 |
+
'unsigned' => true,
|
148 |
+
'nullable' => false,
|
149 |
+
'primary' => true,
|
150 |
+
), 'User ID')
|
151 |
+
->addColumn('firstname', Varien_Db_Ddl_Table::TYPE_TEXT, 32, array(
|
152 |
+
'nullable' => true,
|
153 |
+
), 'User First Name')
|
154 |
+
->addColumn('lastname', Varien_Db_Ddl_Table::TYPE_TEXT, 32, array(
|
155 |
+
'nullable' => true,
|
156 |
+
), 'User Last Name')
|
157 |
+
->addColumn('email', Varien_Db_Ddl_Table::TYPE_TEXT, 128, array(
|
158 |
+
'nullable' => true,
|
159 |
+
), 'User Email')
|
160 |
+
->addColumn('username', Varien_Db_Ddl_Table::TYPE_TEXT, 40, array(
|
161 |
+
'nullable' => true,
|
162 |
+
), 'User Login')
|
163 |
+
->addColumn('password', Varien_Db_Ddl_Table::TYPE_TEXT, 40, array(
|
164 |
+
'nullable' => true,
|
165 |
+
), 'User Password')
|
166 |
+
->addColumn('created', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
|
167 |
+
'nullable' => false,
|
168 |
+
), 'User Created Time')
|
169 |
+
->addColumn('modified', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
|
170 |
+
), 'User Modified Time')
|
171 |
+
->addColumn('logdate', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
|
172 |
+
), 'User Last Login Time')
|
173 |
+
->addColumn('lognum', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
174 |
+
'unsigned' => true,
|
175 |
+
'nullable' => false,
|
176 |
+
'default' => '0',
|
177 |
+
), 'User Login Number')
|
178 |
+
->addColumn('reload_acl_flag', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
179 |
+
'nullable' => false,
|
180 |
+
'default' => '0',
|
181 |
+
), 'Reload ACL')
|
182 |
+
->addColumn('is_active', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
183 |
+
'nullable' => false,
|
184 |
+
'default' => '1',
|
185 |
+
), 'User Is Active')
|
186 |
+
->addColumn('extra', Varien_Db_Ddl_Table::TYPE_TEXT, '64k', array(
|
187 |
+
), 'User Extra Data')
|
188 |
+
->addIndex($installer->getIdxName('admin/user', array('username'), Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE),
|
189 |
+
array('username'), array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE))
|
190 |
+
->setComment('Admin User Table');
|
191 |
+
$installer->getConnection()->createTable($table);
|
192 |
+
|
193 |
+
$installer->endSetup();
|
app/code/core/Mage/Admin/sql/admin_setup/mysql4-install-0.7.0.php
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
$installer = $this;
|
28 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
29 |
+
|
30 |
+
$installer->startSetup();
|
31 |
+
|
32 |
+
$installer->run("
|
33 |
+
|
34 |
+
-- DROP TABLE IF EXISTS {$this->getTable('admin_assert')};
|
35 |
+
CREATE TABLE {$this->getTable('admin_assert')} (
|
36 |
+
`assert_id` int(10) unsigned NOT NULL auto_increment,
|
37 |
+
`assert_type` varchar(20) character set utf8 NOT NULL default '',
|
38 |
+
`assert_data` text character set utf8,
|
39 |
+
PRIMARY KEY (`assert_id`)
|
40 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ACL Asserts';
|
41 |
+
|
42 |
+
-- DROP TABLE IF EXISTS {$this->getTable('admin_role')};
|
43 |
+
CREATE TABLE {$this->getTable('admin_role')} (
|
44 |
+
`role_id` int(10) unsigned NOT NULL auto_increment,
|
45 |
+
`parent_id` int(10) unsigned NOT NULL default '0',
|
46 |
+
`tree_level` tinyint(3) unsigned NOT NULL default '0',
|
47 |
+
`sort_order` tinyint(3) unsigned NOT NULL default '0',
|
48 |
+
`role_type` char(1) character set utf8 NOT NULL default '0',
|
49 |
+
`user_id` int(11) unsigned NOT NULL default '0',
|
50 |
+
`role_name` varchar(50) character set utf8 NOT NULL default '',
|
51 |
+
PRIMARY KEY (`role_id`),
|
52 |
+
KEY `parent_id` (`parent_id`,`sort_order`),
|
53 |
+
KEY `tree_level` (`tree_level`)
|
54 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ACL Roles';
|
55 |
+
|
56 |
+
insert into {$this->getTable('admin_role')}(`role_id`,`parent_id`,`tree_level`,`sort_order`,`role_type`,`user_id`,`role_name`) values (1,0,1,1,'G',0,'Administrators'),(2,1,2,1,'U',1,'Administrator');
|
57 |
+
|
58 |
+
-- DROP TABLE IF EXISTS {$this->getTable('admin_rule')};
|
59 |
+
CREATE TABLE {$this->getTable('admin_rule')} (
|
60 |
+
`rule_id` int(10) unsigned NOT NULL auto_increment,
|
61 |
+
`role_id` int(10) unsigned NOT NULL default '0',
|
62 |
+
`resource_id` varchar(255) character set utf8 NOT NULL default '',
|
63 |
+
`privileges` varchar(20) character set utf8 NOT NULL default '',
|
64 |
+
`assert_id` int(10) unsigned NOT NULL default '0',
|
65 |
+
`role_type` char(1) default NULL,
|
66 |
+
`permission` varchar(10) default NULL,
|
67 |
+
PRIMARY KEY (`rule_id`),
|
68 |
+
KEY `resource` (`resource_id`,`role_id`),
|
69 |
+
KEY `role_id` (`role_id`,`resource_id`),
|
70 |
+
CONSTRAINT `FK_admin_rule` FOREIGN KEY (`role_id`) REFERENCES {$this->getTable('admin_role')} (`role_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
71 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ACL Rules';
|
72 |
+
|
73 |
+
insert into {$this->getTable('admin_rule')}(`rule_id`, `role_id`, `resource_id`, `privileges`, `assert_id`, `role_type`, `permission`) values (1,1,'all','',0,'G','allow');
|
74 |
+
|
75 |
+
-- DROP TABLE IF EXISTS {$this->getTable('admin_user')};
|
76 |
+
CREATE TABLE {$this->getTable('admin_user')} (
|
77 |
+
`user_id` mediumint(9) unsigned NOT NULL auto_increment,
|
78 |
+
`firstname` varchar(32) character set utf8 NOT NULL default '',
|
79 |
+
`lastname` varchar(32) character set utf8 NOT NULL default '',
|
80 |
+
`email` varchar(128) character set utf8 NOT NULL default '',
|
81 |
+
`username` varchar(40) character set utf8 NOT NULL default '',
|
82 |
+
`password` varchar(40) character set utf8 NOT NULL default '',
|
83 |
+
`created` datetime NOT NULL default '0000-00-00 00:00:00',
|
84 |
+
`modified` datetime default NULL,
|
85 |
+
`logdate` datetime default NULL,
|
86 |
+
`lognum` smallint(5) unsigned NOT NULL default '0',
|
87 |
+
`reload_acl_flag` tinyint(1) NOT NULL default '0',
|
88 |
+
`is_active` tinyint(1) NOT NULL default '1',
|
89 |
+
PRIMARY KEY (`user_id`)
|
90 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Users';
|
91 |
+
");
|
92 |
+
|
93 |
+
$installer->endSetup();
|
app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-0.7.0-0.7.1.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
$installer = $this;
|
28 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
29 |
+
|
30 |
+
$installer->startSetup();
|
31 |
+
|
32 |
+
$installer->getConnection()->addColumn($this->getTable('admin/user'), 'extra', 'TEXT NULL');
|
33 |
+
|
34 |
+
$installer->endSetup();
|
app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-0.7.1-0.7.2.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
$installer = $this;
|
28 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
29 |
+
|
30 |
+
$installer->startSetup();
|
31 |
+
|
32 |
+
$tableAdmins = $installer->getTable('admin/user');
|
33 |
+
|
34 |
+
// delete admin username duplicates
|
35 |
+
$duplicatedUsers = $installer->getConnection()->fetchPairs("
|
36 |
+
SELECT user_id, username FROM {$tableAdmins} GROUP by username HAVING COUNT(user_id) > 1
|
37 |
+
");
|
38 |
+
$installer->run("DELETE FROM {$tableAdmins} WHERE username "
|
39 |
+
. $installer->getConnection()->quoteInto('IN (?) ', array_values($duplicatedUsers))
|
40 |
+
. 'AND user_id ' . $installer->getConnection()->quoteInto('NOT IN (?) ', array_keys($duplicatedUsers))
|
41 |
+
);
|
42 |
+
|
43 |
+
// add unique key to username field
|
44 |
+
$installer->getConnection()->addKey($tableAdmins, 'UNQ_ADMIN_USER_USERNAME', 'username', 'unique');
|
45 |
+
|
46 |
+
$installer->endSetup();
|
app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php
ADDED
@@ -0,0 +1,329 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
/**
|
32 |
+
* Drop foreign keys
|
33 |
+
*/
|
34 |
+
$connection = $installer->getConnection()->dropForeignKey(
|
35 |
+
$installer->getTable('admin/rule'),
|
36 |
+
'FK_ADMIN_RULE'
|
37 |
+
);
|
38 |
+
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Drop indexes
|
42 |
+
*/
|
43 |
+
$installer->getConnection()->dropIndex(
|
44 |
+
$installer->getTable('admin/role'),
|
45 |
+
'PARENT_ID'
|
46 |
+
);
|
47 |
+
|
48 |
+
$installer->getConnection()->dropIndex(
|
49 |
+
$installer->getTable('admin/role'),
|
50 |
+
'TREE_LEVEL'
|
51 |
+
);
|
52 |
+
|
53 |
+
$installer->getConnection()->dropIndex(
|
54 |
+
$installer->getTable('admin/rule'),
|
55 |
+
'RESOURCE'
|
56 |
+
);
|
57 |
+
|
58 |
+
$installer->getConnection()->dropIndex(
|
59 |
+
$installer->getTable('admin/rule'),
|
60 |
+
'ROLE_ID'
|
61 |
+
);
|
62 |
+
|
63 |
+
$installer->getConnection()->dropIndex(
|
64 |
+
$installer->getTable('admin/user'),
|
65 |
+
'UNQ_ADMIN_USER_USERNAME'
|
66 |
+
);
|
67 |
+
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Change columns
|
71 |
+
*/
|
72 |
+
$tables = array(
|
73 |
+
$installer->getTable('admin/user') => array(
|
74 |
+
'columns' => array(
|
75 |
+
'user_id' => array(
|
76 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
77 |
+
'identity' => true,
|
78 |
+
'unsigned' => true,
|
79 |
+
'nullable' => false,
|
80 |
+
'primary' => true,
|
81 |
+
'comment' => 'User ID'
|
82 |
+
),
|
83 |
+
'firstname' => array(
|
84 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
85 |
+
'length' => 32,
|
86 |
+
'comment' => 'User First Name'
|
87 |
+
),
|
88 |
+
'lastname' => array(
|
89 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
90 |
+
'length' => 32,
|
91 |
+
'comment' => 'User Last Name'
|
92 |
+
),
|
93 |
+
'email' => array(
|
94 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
95 |
+
'length' => 128,
|
96 |
+
'comment' => 'User Email'
|
97 |
+
),
|
98 |
+
'username' => array(
|
99 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
100 |
+
'length' => 40,
|
101 |
+
'comment' => 'User Login'
|
102 |
+
),
|
103 |
+
'password' => array(
|
104 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
105 |
+
'length' => 100,
|
106 |
+
'comment' => 'User Password'
|
107 |
+
),
|
108 |
+
'created' => array(
|
109 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TIMESTAMP,
|
110 |
+
'nullable' => false,
|
111 |
+
'comment' => 'User Created Time'
|
112 |
+
),
|
113 |
+
'modified' => array(
|
114 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TIMESTAMP,
|
115 |
+
'comment' => 'User Modified Time'
|
116 |
+
),
|
117 |
+
'logdate' => array(
|
118 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TIMESTAMP,
|
119 |
+
'comment' => 'User Last Login Time'
|
120 |
+
),
|
121 |
+
'lognum' => array(
|
122 |
+
'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
|
123 |
+
'unsigned' => true,
|
124 |
+
'nullable' => false,
|
125 |
+
'default' => '0',
|
126 |
+
'comment' => 'User Login Number'
|
127 |
+
),
|
128 |
+
'reload_acl_flag' => array(
|
129 |
+
'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
|
130 |
+
'nullable' => false,
|
131 |
+
'default' => '0',
|
132 |
+
'comment' => 'Reload ACL'
|
133 |
+
),
|
134 |
+
'is_active' => array(
|
135 |
+
'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
|
136 |
+
'nullable' => false,
|
137 |
+
'default' => '1',
|
138 |
+
'comment' => 'User Is Active'
|
139 |
+
),
|
140 |
+
'extra' => array(
|
141 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
142 |
+
'length' => '64K',
|
143 |
+
'comment' => 'User Extra Data'
|
144 |
+
)
|
145 |
+
),
|
146 |
+
'comment' => 'Admin User Table'
|
147 |
+
),
|
148 |
+
$installer->getTable('admin/role') => array(
|
149 |
+
'columns' => array(
|
150 |
+
'role_id' => array(
|
151 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
152 |
+
'identity' => true,
|
153 |
+
'unsigned' => true,
|
154 |
+
'nullable' => false,
|
155 |
+
'primary' => true,
|
156 |
+
'comment' => 'Role ID'
|
157 |
+
),
|
158 |
+
'parent_id' => array(
|
159 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
160 |
+
'unsigned' => true,
|
161 |
+
'nullable' => false,
|
162 |
+
'default' => '0',
|
163 |
+
'comment' => 'Parent Role ID'
|
164 |
+
),
|
165 |
+
'tree_level' => array(
|
166 |
+
'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
|
167 |
+
'unsigned' => true,
|
168 |
+
'nullable' => false,
|
169 |
+
'default' => '0',
|
170 |
+
'comment' => 'Role Tree Level'
|
171 |
+
),
|
172 |
+
'sort_order' => array(
|
173 |
+
'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
|
174 |
+
'unsigned' => true,
|
175 |
+
'nullable' => false,
|
176 |
+
'default' => '0',
|
177 |
+
'comment' => 'Role Sort Order'
|
178 |
+
),
|
179 |
+
'role_type' => array(
|
180 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
181 |
+
'length' => 1,
|
182 |
+
'nullable' => false,
|
183 |
+
'default' => '0',
|
184 |
+
'comment' => 'Role Type'
|
185 |
+
),
|
186 |
+
'user_id' => array(
|
187 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
188 |
+
'unsigned' => true,
|
189 |
+
'nullable' => false,
|
190 |
+
'default' => '0',
|
191 |
+
'comment' => 'User ID'
|
192 |
+
),
|
193 |
+
'role_name' => array(
|
194 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
195 |
+
'length' => 50,
|
196 |
+
'nullable' => false,
|
197 |
+
'comment' => 'Role Name'
|
198 |
+
)
|
199 |
+
),
|
200 |
+
'comment' => 'Admin Role Table'
|
201 |
+
),
|
202 |
+
$installer->getTable('admin/rule') => array(
|
203 |
+
'columns' => array(
|
204 |
+
'rule_id' => array(
|
205 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
206 |
+
'identity' => true,
|
207 |
+
'unsigned' => true,
|
208 |
+
'nullable' => false,
|
209 |
+
'primary' => true,
|
210 |
+
'comment' => 'Rule ID'
|
211 |
+
),
|
212 |
+
'role_id' => array(
|
213 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
214 |
+
'unsigned' => true,
|
215 |
+
'nullable' => false,
|
216 |
+
'default' => '0',
|
217 |
+
'comment' => 'Role ID'
|
218 |
+
),
|
219 |
+
'resource_id' => array(
|
220 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
221 |
+
'length' => 255,
|
222 |
+
'nullable' => false,
|
223 |
+
'comment' => 'Resource ID'
|
224 |
+
),
|
225 |
+
'privileges' => array(
|
226 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
227 |
+
'length' => 20,
|
228 |
+
'comment' => 'Privileges'
|
229 |
+
),
|
230 |
+
'assert_id' => array(
|
231 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
232 |
+
'unsigned' => true,
|
233 |
+
'nullable' => false,
|
234 |
+
'default' => '0',
|
235 |
+
'comment' => 'Assert ID'
|
236 |
+
),
|
237 |
+
'role_type' => array(
|
238 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
239 |
+
'length' => 1,
|
240 |
+
'comment' => 'Role Type'
|
241 |
+
),
|
242 |
+
'permission' => array(
|
243 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
244 |
+
'length' => 10,
|
245 |
+
'comment' => 'Permission'
|
246 |
+
)
|
247 |
+
),
|
248 |
+
'comment' => 'Admin Rule Table'
|
249 |
+
),
|
250 |
+
$installer->getTable('admin/assert') => array(
|
251 |
+
'columns' => array(
|
252 |
+
'assert_id' => array(
|
253 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
254 |
+
'identity' => true,
|
255 |
+
'unsigned' => true,
|
256 |
+
'nullable' => false,
|
257 |
+
'primary' => true,
|
258 |
+
'comment' => 'Assert ID'
|
259 |
+
),
|
260 |
+
'assert_type' => array(
|
261 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
262 |
+
'length' => 20,
|
263 |
+
'nullable' => false,
|
264 |
+
'comment' => 'Assert Type'
|
265 |
+
),
|
266 |
+
'assert_data' => array(
|
267 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
268 |
+
'length' => '64K',
|
269 |
+
'comment' => 'Assert Data'
|
270 |
+
)
|
271 |
+
),
|
272 |
+
'comment' => 'Admin Assert Table'
|
273 |
+
)
|
274 |
+
);
|
275 |
+
|
276 |
+
$installer->getConnection()->modifyTables($tables);
|
277 |
+
|
278 |
+
|
279 |
+
/**
|
280 |
+
* Add indexes
|
281 |
+
*/
|
282 |
+
$installer->getConnection()->addIndex(
|
283 |
+
$installer->getTable('admin/role'),
|
284 |
+
$installer->getIdxName('admin/role', array('parent_id', 'sort_order')),
|
285 |
+
array('parent_id', 'sort_order')
|
286 |
+
);
|
287 |
+
|
288 |
+
$installer->getConnection()->addIndex(
|
289 |
+
$installer->getTable('admin/role'),
|
290 |
+
$installer->getIdxName('admin/role', array('tree_level')),
|
291 |
+
array('tree_level')
|
292 |
+
);
|
293 |
+
|
294 |
+
$installer->getConnection()->addIndex(
|
295 |
+
$installer->getTable('admin/rule'),
|
296 |
+
$installer->getIdxName('admin/rule', array('resource_id', 'role_id')),
|
297 |
+
array('resource_id', 'role_id')
|
298 |
+
);
|
299 |
+
|
300 |
+
$installer->getConnection()->addIndex(
|
301 |
+
$installer->getTable('admin/rule'),
|
302 |
+
$installer->getIdxName('admin/rule', array('role_id', 'resource_id')),
|
303 |
+
array('role_id', 'resource_id')
|
304 |
+
);
|
305 |
+
|
306 |
+
$installer->getConnection()->addIndex(
|
307 |
+
$installer->getTable('admin/user'),
|
308 |
+
$installer->getIdxName(
|
309 |
+
'admin/user',
|
310 |
+
array('username'),
|
311 |
+
Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
|
312 |
+
),
|
313 |
+
array('username'),
|
314 |
+
Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
|
315 |
+
);
|
316 |
+
|
317 |
+
|
318 |
+
/**
|
319 |
+
* Add foreign keys
|
320 |
+
*/
|
321 |
+
$installer->getConnection()->addForeignKey(
|
322 |
+
$installer->getFkName('admin/rule', 'role_id', 'admin/role', 'role_id'),
|
323 |
+
$installer->getTable('admin/rule'),
|
324 |
+
'role_id',
|
325 |
+
$installer->getTable('admin/role'),
|
326 |
+
'role_id'
|
327 |
+
);
|
328 |
+
|
329 |
+
$installer->endSetup();
|
app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-1.6.0.0-1.6.1.0.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
// Add reset password link token column
|
32 |
+
$installer->getConnection()->addColumn($installer->getTable('admin/user'), 'rp_token', array(
|
33 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
34 |
+
'length' => 256,
|
35 |
+
'nullable' => true,
|
36 |
+
'default' => null,
|
37 |
+
'comment' => 'Reset Password Link Token'
|
38 |
+
));
|
39 |
+
|
40 |
+
// Add reset password link token creation date column
|
41 |
+
$installer->getConnection()->addColumn($installer->getTable('admin/user'), 'rp_token_created_at', array(
|
42 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TIMESTAMP,
|
43 |
+
'nullable' => true,
|
44 |
+
'default' => null,
|
45 |
+
'comment' => 'Reset Password Link Token Creation Date'
|
46 |
+
));
|
47 |
+
|
48 |
+
$installer->endSetup();
|
app/code/core/Mage/AdminNotification/Helper/Data.php
ADDED
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_AdminNotification
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* AdminNotification Data helper
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_AdminNotification
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_AdminNotification_Helper_Data extends Mage_Core_Helper_Abstract
|
36 |
+
{
|
37 |
+
const XML_PATH_POPUP_URL = 'system/adminnotification/popup_url';
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Widget Popup Notification Object URL
|
41 |
+
*
|
42 |
+
* @var string
|
43 |
+
*/
|
44 |
+
protected $_popupUrl;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Is readable Popup Notification Object flag
|
48 |
+
*
|
49 |
+
* @var bool
|
50 |
+
*/
|
51 |
+
protected $_popupReadable;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Last Notice object
|
55 |
+
*
|
56 |
+
* @var Mage_AdminNotification_Model_Inbox
|
57 |
+
*/
|
58 |
+
protected $_latestNotice;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* count of unread notes by type
|
62 |
+
*
|
63 |
+
* @var array
|
64 |
+
*/
|
65 |
+
protected $_unreadNoticeCounts;
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Retrieve latest notice model
|
69 |
+
*
|
70 |
+
* @return Mage_AdminNotification_Model_Inbox
|
71 |
+
*/
|
72 |
+
public function getLatestNotice()
|
73 |
+
{
|
74 |
+
if (is_null($this->_latestNotice)) {
|
75 |
+
$this->_latestNotice = Mage::getModel('adminnotification/inbox')->loadLatestNotice();
|
76 |
+
}
|
77 |
+
return $this->_latestNotice;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Retrieve count of unread notes by type
|
82 |
+
*
|
83 |
+
* @param int $severity
|
84 |
+
* @return int
|
85 |
+
*/
|
86 |
+
public function getUnreadNoticeCount($severity)
|
87 |
+
{
|
88 |
+
if (is_null($this->_unreadNoticeCounts)) {
|
89 |
+
$this->_unreadNoticeCounts = Mage::getModel('adminnotification/inbox')->getNoticeStatus();
|
90 |
+
}
|
91 |
+
return isset($this->_unreadNoticeCounts[$severity]) ? $this->_unreadNoticeCounts[$severity] : 0;
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Retrieve Widget Popup Notification Object URL
|
96 |
+
*
|
97 |
+
* @param bool $withExt
|
98 |
+
* @return string
|
99 |
+
*/
|
100 |
+
public function getPopupObjectUrl($withExt = false)
|
101 |
+
{
|
102 |
+
if (is_null($this->_popupUrl)) {
|
103 |
+
$sheme = Mage::app()->getFrontController()->getRequest()->isSecure()
|
104 |
+
? 'https://'
|
105 |
+
: 'http://';
|
106 |
+
|
107 |
+
$this->_popupUrl = $sheme . Mage::getStoreConfig(self::XML_PATH_POPUP_URL);
|
108 |
+
}
|
109 |
+
return $this->_popupUrl . ($withExt ? '.swf' : '');
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Check is readable Popup Notification Object
|
114 |
+
* @deprecated after 1.4.2.0
|
115 |
+
*
|
116 |
+
* @return bool
|
117 |
+
*/
|
118 |
+
public function isReadablePopupObject()
|
119 |
+
{
|
120 |
+
if (is_null($this->_popupReadable)) {
|
121 |
+
$this->_popupReadable = false;
|
122 |
+
$curl = new Varien_Http_Adapter_Curl();
|
123 |
+
$curl->setConfig(array(
|
124 |
+
'timeout' => 2
|
125 |
+
));
|
126 |
+
$curl->write(Zend_Http_Client::GET, $this->getPopupObjectUrl(true));
|
127 |
+
if ($curl->read()) {
|
128 |
+
if ($curl->getInfo(CURLINFO_HTTP_CODE) == 200) {
|
129 |
+
$this->_popupReadable = true;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
}
|
133 |
+
return $this->_popupReadable;
|
134 |
+
}
|
135 |
+
}
|
app/code/core/Mage/AdminNotification/Model/Feed.php
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_AdminNotification
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* AdminNotification Feed model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_AdminNotification
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_AdminNotification_Model_Feed extends Mage_Core_Model_Abstract
|
36 |
+
{
|
37 |
+
const XML_USE_HTTPS_PATH = 'system/adminnotification/use_https';
|
38 |
+
const XML_FEED_URL_PATH = 'system/adminnotification/feed_url';
|
39 |
+
const XML_FREQUENCY_PATH = 'system/adminnotification/frequency';
|
40 |
+
const XML_LAST_UPDATE_PATH = 'system/adminnotification/last_update';
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Feed url
|
44 |
+
*
|
45 |
+
* @var string
|
46 |
+
*/
|
47 |
+
protected $_feedUrl;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Init model
|
51 |
+
*
|
52 |
+
*/
|
53 |
+
protected function _construct()
|
54 |
+
{}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Retrieve feed url
|
58 |
+
*
|
59 |
+
* @return string
|
60 |
+
*/
|
61 |
+
public function getFeedUrl()
|
62 |
+
{
|
63 |
+
if (is_null($this->_feedUrl)) {
|
64 |
+
$this->_feedUrl = (Mage::getStoreConfigFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://')
|
65 |
+
. Mage::getStoreConfig(self::XML_FEED_URL_PATH);
|
66 |
+
}
|
67 |
+
return $this->_feedUrl;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Check feed for modification
|
72 |
+
*
|
73 |
+
* @return Mage_AdminNotification_Model_Feed
|
74 |
+
*/
|
75 |
+
public function checkUpdate()
|
76 |
+
{
|
77 |
+
if (($this->getFrequency() + $this->getLastUpdate()) > time()) {
|
78 |
+
return $this;
|
79 |
+
}
|
80 |
+
|
81 |
+
$feedData = array();
|
82 |
+
|
83 |
+
$feedXml = $this->getFeedData();
|
84 |
+
|
85 |
+
if ($feedXml && $feedXml->channel && $feedXml->channel->item) {
|
86 |
+
foreach ($feedXml->channel->item as $item) {
|
87 |
+
$feedData[] = array(
|
88 |
+
'severity' => (int)$item->severity,
|
89 |
+
'date_added' => $this->getDate((string)$item->pubDate),
|
90 |
+
'title' => (string)$item->title,
|
91 |
+
'description' => (string)$item->description,
|
92 |
+
'url' => (string)$item->link,
|
93 |
+
);
|
94 |
+
}
|
95 |
+
|
96 |
+
if ($feedData) {
|
97 |
+
Mage::getModel('adminnotification/inbox')->parse(array_reverse($feedData));
|
98 |
+
}
|
99 |
+
|
100 |
+
}
|
101 |
+
$this->setLastUpdate();
|
102 |
+
|
103 |
+
return $this;
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Retrieve DB date from RSS date
|
108 |
+
*
|
109 |
+
* @param string $rssDate
|
110 |
+
* @return string YYYY-MM-DD YY:HH:SS
|
111 |
+
*/
|
112 |
+
public function getDate($rssDate)
|
113 |
+
{
|
114 |
+
return gmdate('Y-m-d H:i:s', strtotime($rssDate));
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Retrieve Update Frequency
|
119 |
+
*
|
120 |
+
* @return int
|
121 |
+
*/
|
122 |
+
public function getFrequency()
|
123 |
+
{
|
124 |
+
return Mage::getStoreConfig(self::XML_FREQUENCY_PATH) * 3600;
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Retrieve Last update time
|
129 |
+
*
|
130 |
+
* @return int
|
131 |
+
*/
|
132 |
+
public function getLastUpdate()
|
133 |
+
{
|
134 |
+
return Mage::app()->loadCache('admin_notifications_lastcheck');
|
135 |
+
// return Mage::getStoreConfig(self::XML_LAST_UPDATE_PATH);
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Set last update time (now)
|
140 |
+
*
|
141 |
+
* @return Mage_AdminNotification_Model_Feed
|
142 |
+
*/
|
143 |
+
public function setLastUpdate()
|
144 |
+
{
|
145 |
+
Mage::app()->saveCache(time(), 'admin_notifications_lastcheck');
|
146 |
+
// $config = Mage::getModel('core/config');
|
147 |
+
// /* @var $config Mage_Core_Model_Config */
|
148 |
+
// $config->saveConfig(self::XML_LAST_UPDATE_PATH, time());
|
149 |
+
return $this;
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Retrieve feed data as XML element
|
154 |
+
*
|
155 |
+
* @return SimpleXMLElement
|
156 |
+
*/
|
157 |
+
public function getFeedData()
|
158 |
+
{
|
159 |
+
$curl = new Varien_Http_Adapter_Curl();
|
160 |
+
$curl->setConfig(array(
|
161 |
+
'timeout' => 2
|
162 |
+
));
|
163 |
+
$curl->write(Zend_Http_Client::GET, $this->getFeedUrl(), '1.0');
|
164 |
+
$data = $curl->read();
|
165 |
+
if ($data === false) {
|
166 |
+
return false;
|
167 |
+
}
|
168 |
+
$data = preg_split('/^\r?$/m', $data, 2);
|
169 |
+
$data = trim($data[1]);
|
170 |
+
$curl->close();
|
171 |
+
|
172 |
+
try {
|
173 |
+
$xml = new SimpleXMLElement($data);
|
174 |
+
}
|
175 |
+
catch (Exception $e) {
|
176 |
+
return false;
|
177 |
+
}
|
178 |
+
|
179 |
+
return $xml;
|
180 |
+
}
|
181 |
+
|
182 |
+
public function getFeedXml()
|
183 |
+
{
|
184 |
+
try {
|
185 |
+
$data = $this->getFeedData();
|
186 |
+
$xml = new SimpleXMLElement($data);
|
187 |
+
}
|
188 |
+
catch (Exception $e) {
|
189 |
+
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8" ?>');
|
190 |
+
}
|
191 |
+
|
192 |
+
return $xml;
|
193 |
+
}
|
194 |
+
}
|
app/code/core/Mage/AdminNotification/Model/Inbox.php
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_AdminNotification
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* AdminNotification Inbox model
|
30 |
+
*
|
31 |
+
* @method Mage_AdminNotification_Model_Resource_Inbox _getResource()
|
32 |
+
* @method Mage_AdminNotification_Model_Resource_Inbox getResource()
|
33 |
+
* @method int getSeverity()
|
34 |
+
* @method Mage_AdminNotification_Model_Inbox setSeverity(int $value)
|
35 |
+
* @method string getDateAdded()
|
36 |
+
* @method Mage_AdminNotification_Model_Inbox setDateAdded(string $value)
|
37 |
+
* @method string getTitle()
|
38 |
+
* @method Mage_AdminNotification_Model_Inbox setTitle(string $value)
|
39 |
+
* @method string getDescription()
|
40 |
+
* @method Mage_AdminNotification_Model_Inbox setDescription(string $value)
|
41 |
+
* @method string getUrl()
|
42 |
+
* @method Mage_AdminNotification_Model_Inbox setUrl(string $value)
|
43 |
+
* @method int getIsRead()
|
44 |
+
* @method Mage_AdminNotification_Model_Inbox setIsRead(int $value)
|
45 |
+
* @method int getIsRemove()
|
46 |
+
* @method Mage_AdminNotification_Model_Inbox setIsRemove(int $value)
|
47 |
+
*
|
48 |
+
* @category Mage
|
49 |
+
* @package Mage_AdminNotification
|
50 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
51 |
+
*/
|
52 |
+
class Mage_AdminNotification_Model_Inbox extends Mage_Core_Model_Abstract
|
53 |
+
{
|
54 |
+
const SEVERITY_CRITICAL = 1;
|
55 |
+
const SEVERITY_MAJOR = 2;
|
56 |
+
const SEVERITY_MINOR = 3;
|
57 |
+
const SEVERITY_NOTICE = 4;
|
58 |
+
|
59 |
+
protected function _construct()
|
60 |
+
{
|
61 |
+
$this->_init('adminnotification/inbox');
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Retrieve Severity collection array
|
66 |
+
*
|
67 |
+
* @return array|string
|
68 |
+
*/
|
69 |
+
public function getSeverities($severity = null)
|
70 |
+
{
|
71 |
+
$severities = array(
|
72 |
+
self::SEVERITY_CRITICAL => Mage::helper('adminnotification')->__('critical'),
|
73 |
+
self::SEVERITY_MAJOR => Mage::helper('adminnotification')->__('major'),
|
74 |
+
self::SEVERITY_MINOR => Mage::helper('adminnotification')->__('minor'),
|
75 |
+
self::SEVERITY_NOTICE => Mage::helper('adminnotification')->__('notice'),
|
76 |
+
);
|
77 |
+
|
78 |
+
if (!is_null($severity)) {
|
79 |
+
if (isset($severities[$severity])) {
|
80 |
+
return $severities[$severity];
|
81 |
+
}
|
82 |
+
return null;
|
83 |
+
}
|
84 |
+
|
85 |
+
return $severities;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Retrieve Latest Notice
|
90 |
+
*
|
91 |
+
* @return Mage_AdminNotification_Model_Inbox
|
92 |
+
*/
|
93 |
+
public function loadLatestNotice()
|
94 |
+
{
|
95 |
+
$this->setData(array());
|
96 |
+
$this->getResource()->loadLatestNotice($this);
|
97 |
+
return $this;
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Retrieve notice statuses
|
102 |
+
*
|
103 |
+
* @return array
|
104 |
+
*/
|
105 |
+
public function getNoticeStatus()
|
106 |
+
{
|
107 |
+
return $this->getResource()->getNoticeStatus($this);
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Parse and save new data
|
112 |
+
*
|
113 |
+
* @param array $data
|
114 |
+
* @return Mage_AdminNotification_Model_Inbox
|
115 |
+
*/
|
116 |
+
public function parse(array $data)
|
117 |
+
{
|
118 |
+
return $this->getResource()->parse($this, $data);
|
119 |
+
}
|
120 |
+
}
|
app/code/core/Mage/AdminNotification/Model/Mysql4/Inbox.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_AdminNotification
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* AdminNotification Inbox model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_AdminNotification
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_AdminNotification_Model_Mysql4_Inbox extends Mage_AdminNotification_Model_Resource_Inbox
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/AdminNotification/Model/Mysql4/Inbox/Collection.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_AdminNotification
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* AdminNotification Inbox model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_AdminNotification
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_AdminNotification_Model_Mysql4_Inbox_Collection
|
36 |
+
extends Mage_AdminNotification_Model_Resource_Inbox_Collection
|
37 |
+
{
|
38 |
+
}
|
app/code/core/Mage/AdminNotification/Model/Observer.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_AdminNotification
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* AdminNotification observer
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_AdminNotification
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_AdminNotification_Model_Observer
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Predispath admin action controller
|
39 |
+
*
|
40 |
+
* @param Varien_Event_Observer $observer
|
41 |
+
*/
|
42 |
+
public function preDispatch(Varien_Event_Observer $observer)
|
43 |
+
{
|
44 |
+
|
45 |
+
if (Mage::getSingleton('admin/session')->isLoggedIn()) {
|
46 |
+
|
47 |
+
$feedModel = Mage::getModel('adminnotification/feed');
|
48 |
+
/* @var $feedModel Mage_AdminNotification_Model_Feed */
|
49 |
+
|
50 |
+
$feedModel->checkUpdate();
|
51 |
+
|
52 |
+
}
|
53 |
+
|
54 |
+
}
|
55 |
+
}
|
app/code/core/Mage/AdminNotification/Model/Resource/Inbox.php
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_AdminNotification
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* AdminNotification Inbox model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_AdminNotification
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_AdminNotification_Model_Resource_Inbox extends Mage_Core_Model_Resource_Db_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* AdminNotification Resource initialization
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('adminnotification/inbox', 'notification_id');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Load latest notice
|
48 |
+
*
|
49 |
+
* @param Mage_AdminNotification_Model_Inbox $object
|
50 |
+
* @return Mage_AdminNotification_Model_Resource_Inbox
|
51 |
+
*/
|
52 |
+
public function loadLatestNotice(Mage_AdminNotification_Model_Inbox $object)
|
53 |
+
{
|
54 |
+
$adapter = $this->_getReadAdapter();
|
55 |
+
$select = $adapter->select()
|
56 |
+
->from($this->getMainTable())
|
57 |
+
->order($this->getIdFieldName() . ' DESC')
|
58 |
+
->where('is_read != 1')
|
59 |
+
->where('is_remove != 1')
|
60 |
+
->limit(1);
|
61 |
+
$data = $adapter->fetchRow($select);
|
62 |
+
|
63 |
+
if ($data) {
|
64 |
+
$object->setData($data);
|
65 |
+
}
|
66 |
+
|
67 |
+
$this->_afterLoad($object);
|
68 |
+
|
69 |
+
return $this;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Get notifications grouped by severity
|
74 |
+
*
|
75 |
+
* @param Mage_AdminNotification_Model_Inbox $object
|
76 |
+
* @return array
|
77 |
+
*/
|
78 |
+
public function getNoticeStatus(Mage_AdminNotification_Model_Inbox $object)
|
79 |
+
{
|
80 |
+
$adapter = $this->_getReadAdapter();
|
81 |
+
$select = $adapter->select()
|
82 |
+
->from($this->getMainTable(), array(
|
83 |
+
'severity' => 'severity',
|
84 |
+
'count_notice' => new Zend_Db_Expr('COUNT(' . $this->getIdFieldName() . ')')))
|
85 |
+
->group('severity')
|
86 |
+
->where('is_remove=?', 0)
|
87 |
+
->where('is_read=?', 0);
|
88 |
+
$return = $adapter->fetchPairs($select);
|
89 |
+
return $return;
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Save notifications (if not exists)
|
94 |
+
*
|
95 |
+
* @param Mage_AdminNotification_Model_Inbox $object
|
96 |
+
* @param array $data
|
97 |
+
*/
|
98 |
+
public function parse(Mage_AdminNotification_Model_Inbox $object, array $data)
|
99 |
+
{
|
100 |
+
$adapter = $this->_getWriteAdapter();
|
101 |
+
foreach ($data as $item) {
|
102 |
+
$select = $adapter->select()
|
103 |
+
->from($this->getMainTable())
|
104 |
+
->where('url=?', $item['url']);
|
105 |
+
|
106 |
+
if (isset($item['internal'])) {
|
107 |
+
$row = false;
|
108 |
+
unset($item['internal']);
|
109 |
+
} else {
|
110 |
+
$row = $adapter->fetchRow($select);
|
111 |
+
}
|
112 |
+
|
113 |
+
if (!$row) {
|
114 |
+
$adapter->insert($this->getMainTable(), $item);
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
+
}
|
app/code/core/Mage/AdminNotification/Model/Resource/Inbox/Collection.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_AdminNotification
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* AdminNotification Inbox model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_AdminNotification
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_AdminNotification_Model_Resource_Inbox_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Resource collection initialization
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('adminnotification/inbox');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Add remove filter
|
48 |
+
*
|
49 |
+
* @return Mage_AdminNotification_Model_Resource_Inbox_Collection
|
50 |
+
*/
|
51 |
+
public function addRemoveFilter()
|
52 |
+
{
|
53 |
+
$this->getSelect()
|
54 |
+
->where('is_remove=?', 0);
|
55 |
+
return $this;
|
56 |
+
}
|
57 |
+
}
|
app/code/core/Mage/AdminNotification/Model/Survey.php
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_AdminNotification
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* AdminNotification survey model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_AdminNotification
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_AdminNotification_Model_Survey
|
36 |
+
{
|
37 |
+
protected static $_flagCode = 'admin_notification_survey';
|
38 |
+
protected static $_flagModel = null;
|
39 |
+
|
40 |
+
const SURVEY_URL = 'www.magentocommerce.com/instsurvey.html';
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Check if survey url valid (exists) or not
|
44 |
+
*
|
45 |
+
* @return boolen
|
46 |
+
*/
|
47 |
+
public static function isSurveyUrlValid()
|
48 |
+
{
|
49 |
+
$curl = new Varien_Http_Adapter_Curl();
|
50 |
+
$curl->setConfig(array('timeout' => 5))
|
51 |
+
->write(Zend_Http_Client::GET, self::getSurveyUrl(), '1.0');
|
52 |
+
$response = $curl->read();
|
53 |
+
if (Zend_Http_Response::extractCode($response) == 200) {
|
54 |
+
return true;
|
55 |
+
}
|
56 |
+
return false;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Return survey url
|
61 |
+
*
|
62 |
+
* @return string
|
63 |
+
*/
|
64 |
+
public static function getSurveyUrl()
|
65 |
+
{
|
66 |
+
$host = Mage::app()->getRequest()->isSecure() ? 'https://' : 'http://';
|
67 |
+
return $host . self::SURVEY_URL;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Return core flag model
|
72 |
+
*
|
73 |
+
* @return Mage_Core_Model_Flag
|
74 |
+
*/
|
75 |
+
protected static function _getFlagModel()
|
76 |
+
{
|
77 |
+
if (self::$_flagModel === null) {
|
78 |
+
self::$_flagModel = Mage::getModel('core/flag', array('flag_code' => self::$_flagCode))->loadSelf();
|
79 |
+
}
|
80 |
+
return self::$_flagModel;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Check if survey question was already asked
|
85 |
+
* or survey url was viewed during installation process
|
86 |
+
*
|
87 |
+
* @return boolean
|
88 |
+
*/
|
89 |
+
public static function isSurveyViewed()
|
90 |
+
{
|
91 |
+
$flagData = self::_getFlagModel()->getFlagData();
|
92 |
+
if (isset($flagData['survey_viewed']) && $flagData['survey_viewed'] == 1) {
|
93 |
+
return true;
|
94 |
+
}
|
95 |
+
return false;
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Save survey viewed flag in core flag
|
100 |
+
*
|
101 |
+
* @param boolean $viewed
|
102 |
+
*/
|
103 |
+
public static function saveSurveyViewed($viewed)
|
104 |
+
{
|
105 |
+
$flagData = self::_getFlagModel()->getFlagData();
|
106 |
+
if (is_null($flagData)) {
|
107 |
+
$flagData = array();
|
108 |
+
}
|
109 |
+
$flagData = array_merge($flagData, array('survey_viewed' => (bool)$viewed));
|
110 |
+
self::_getFlagModel()->setFlagData($flagData)->save();
|
111 |
+
}
|
112 |
+
}
|
app/code/core/Mage/AdminNotification/etc/adminhtml.xml
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category Mage
|
23 |
+
* @package Mage_AdminNotification
|
24 |
+
* @copyright Copyright (c) 2011 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 |
+
<acl>
|
30 |
+
<resources>
|
31 |
+
<admin>
|
32 |
+
<children>
|
33 |
+
<system>
|
34 |
+
<children>
|
35 |
+
<adminnotification translate="title" module="adminnotification">
|
36 |
+
<title>Notifications</title>
|
37 |
+
<sort_order>10</sort_order>
|
38 |
+
<children>
|
39 |
+
<show_toolbar translate="title">
|
40 |
+
<title>Show Toolbar</title>
|
41 |
+
<sort_order>10</sort_order>
|
42 |
+
</show_toolbar>
|
43 |
+
<show_list translate="title">
|
44 |
+
<title>Show List</title>
|
45 |
+
<sort_order>20</sort_order>
|
46 |
+
</show_list>
|
47 |
+
<mark_as_read translate="title">
|
48 |
+
<title>Mark as read</title>
|
49 |
+
<sort_order>30</sort_order>
|
50 |
+
</mark_as_read>
|
51 |
+
<remove translate="title">
|
52 |
+
<title>Remove</title>
|
53 |
+
<sort_order>40</sort_order>
|
54 |
+
</remove>
|
55 |
+
</children>
|
56 |
+
</adminnotification>
|
57 |
+
</children>
|
58 |
+
</system>
|
59 |
+
</children>
|
60 |
+
</admin>
|
61 |
+
</resources>
|
62 |
+
</acl>
|
63 |
+
<menu>
|
64 |
+
<system>
|
65 |
+
<children>
|
66 |
+
<adminnotification translate="title" module="adminnotification">
|
67 |
+
<title>Notifications</title>
|
68 |
+
<action>adminhtml/notification</action>
|
69 |
+
<sort_order>15</sort_order>
|
70 |
+
</adminnotification>
|
71 |
+
</children>
|
72 |
+
</system>
|
73 |
+
</menu>
|
74 |
+
</config>
|
app/code/core/Mage/AdminNotification/etc/config.xml
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category Mage
|
23 |
+
* @package Mage_AdminNotification
|
24 |
+
* @copyright Copyright (c) 2011 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_AdminNotification>
|
31 |
+
<version>1.6.0.0</version>
|
32 |
+
</Mage_AdminNotification>
|
33 |
+
</modules>
|
34 |
+
<global>
|
35 |
+
<models>
|
36 |
+
<adminnotification>
|
37 |
+
<class>Mage_AdminNotification_Model</class>
|
38 |
+
<resourceModel>adminnotification_resource</resourceModel>
|
39 |
+
</adminnotification>
|
40 |
+
<adminnotification_resource>
|
41 |
+
<class>Mage_AdminNotification_Model_Resource</class>
|
42 |
+
<deprecatedNode>adminnotification_mysql4</deprecatedNode>
|
43 |
+
<entities>
|
44 |
+
<inbox>
|
45 |
+
<table>adminnotification_inbox</table>
|
46 |
+
</inbox>
|
47 |
+
</entities>
|
48 |
+
</adminnotification_resource>
|
49 |
+
</models>
|
50 |
+
<helpers>
|
51 |
+
<adminnotification>
|
52 |
+
<class>Mage_AdminNotification_Helper</class>
|
53 |
+
</adminnotification>
|
54 |
+
</helpers>
|
55 |
+
<resources>
|
56 |
+
<adminnotification_setup>
|
57 |
+
<setup>
|
58 |
+
<module>Mage_AdminNotification</module>
|
59 |
+
</setup>
|
60 |
+
</adminnotification_setup>
|
61 |
+
</resources>
|
62 |
+
</global>
|
63 |
+
<adminhtml>
|
64 |
+
<translate>
|
65 |
+
<modules>
|
66 |
+
<Mage_AdminNotification>
|
67 |
+
<files>
|
68 |
+
<default>Mage_AdminNotification.csv</default>
|
69 |
+
</files>
|
70 |
+
</Mage_AdminNotification>
|
71 |
+
</modules>
|
72 |
+
</translate>
|
73 |
+
<events>
|
74 |
+
<controller_action_predispatch>
|
75 |
+
<observers>
|
76 |
+
<adminnotification>
|
77 |
+
<class>adminnotification/observer</class>
|
78 |
+
<method>preDispatch</method>
|
79 |
+
</adminnotification>
|
80 |
+
</observers>
|
81 |
+
</controller_action_predispatch>
|
82 |
+
</events>
|
83 |
+
<layout>
|
84 |
+
<updates>
|
85 |
+
<adminnotification>
|
86 |
+
<file>adminnotification.xml</file>
|
87 |
+
</adminnotification>
|
88 |
+
</updates>
|
89 |
+
</layout>
|
90 |
+
</adminhtml>
|
91 |
+
<default>
|
92 |
+
<system>
|
93 |
+
<adminnotification>
|
94 |
+
<feed_url>notifications.magentocommerce.com/community/notifications.rss</feed_url>
|
95 |
+
<popup_url>widgets.magentocommerce.com/notificationPopup</popup_url>
|
96 |
+
<severity_icons_url>widgets.magentocommerce.com/%s/%s.gif</severity_icons_url>
|
97 |
+
<use_https>0</use_https>
|
98 |
+
<frequency>1</frequency>
|
99 |
+
<last_update>0</last_update>
|
100 |
+
</adminnotification>
|
101 |
+
</system>
|
102 |
+
</default>
|
103 |
+
</config>
|
app/code/core/Mage/AdminNotification/etc/system.xml
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category Mage
|
23 |
+
* @package Mage_AdminNotification
|
24 |
+
* @copyright Copyright (c) 2011 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 |
+
<sections>
|
30 |
+
<system>
|
31 |
+
<groups>
|
32 |
+
<adminnotification translate="label" module="adminnotification">
|
33 |
+
<label>Notifications</label>
|
34 |
+
<frontend_type>text</frontend_type>
|
35 |
+
<sort_order>250</sort_order>
|
36 |
+
<show_in_default>1</show_in_default>
|
37 |
+
<show_in_website>0</show_in_website>
|
38 |
+
<show_in_store>0</show_in_store>
|
39 |
+
<fields>
|
40 |
+
<use_https translate="label">
|
41 |
+
<label>Use HTTPS to Get Feed</label>
|
42 |
+
<frontend_type>select</frontend_type>
|
43 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
44 |
+
<sort_order>1</sort_order>
|
45 |
+
<show_in_default>1</show_in_default>
|
46 |
+
<show_in_website>0</show_in_website>
|
47 |
+
<show_in_store>0</show_in_store>
|
48 |
+
</use_https>
|
49 |
+
<frequency translate="label">
|
50 |
+
<label>Update Frequency</label>
|
51 |
+
<frontend_type>select</frontend_type>
|
52 |
+
<source_model>adminhtml/system_config_source_notification_frequency</source_model>
|
53 |
+
<sort_order>2</sort_order>
|
54 |
+
<show_in_default>1</show_in_default>
|
55 |
+
<show_in_website>0</show_in_website>
|
56 |
+
<show_in_store>0</show_in_store>
|
57 |
+
</frequency>
|
58 |
+
<last_update translate="label">
|
59 |
+
<label>Last Update</label>
|
60 |
+
<frontend_type>label</frontend_type>
|
61 |
+
<frontend_model>adminhtml/system_config_form_field_notification</frontend_model>
|
62 |
+
<sort_order>3</sort_order>
|
63 |
+
<show_in_default>1</show_in_default>
|
64 |
+
<show_in_website>0</show_in_website>
|
65 |
+
<show_in_store>0</show_in_store>
|
66 |
+
</last_update>
|
67 |
+
</fields>
|
68 |
+
</adminnotification>
|
69 |
+
</groups>
|
70 |
+
</system>
|
71 |
+
</sections>
|
72 |
+
</config>
|
app/code/core/Mage/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_AdminNotification
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* AdminNotification install
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_AdminNotification
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
$installer = $this;
|
35 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
36 |
+
|
37 |
+
$installer->startSetup();
|
38 |
+
/**
|
39 |
+
* Create table 'adminnotification/inbox'
|
40 |
+
*/
|
41 |
+
$table = $installer->getConnection()
|
42 |
+
->newTable($installer->getTable('adminnotification/inbox'))
|
43 |
+
->addColumn('notification_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
44 |
+
'identity' => true,
|
45 |
+
'unsigned' => true,
|
46 |
+
'nullable' => false,
|
47 |
+
'primary' => true,
|
48 |
+
), 'Notification id')
|
49 |
+
->addColumn('severity', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
50 |
+
'unsigned' => true,
|
51 |
+
'nullable' => false,
|
52 |
+
'default' => '0',
|
53 |
+
), 'Problem type')
|
54 |
+
->addColumn('date_added', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
|
55 |
+
'nullable' => false,
|
56 |
+
), 'Create date')
|
57 |
+
->addColumn('title', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
|
58 |
+
'nullable' => false,
|
59 |
+
), 'Title')
|
60 |
+
->addColumn('description', Varien_Db_Ddl_Table::TYPE_TEXT, '64k', array(
|
61 |
+
), 'Description')
|
62 |
+
->addColumn('url', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
|
63 |
+
), 'Url')
|
64 |
+
->addColumn('is_read', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
65 |
+
'unsigned' => true,
|
66 |
+
'nullable' => false,
|
67 |
+
'default' => '0',
|
68 |
+
), 'Flag if notification read')
|
69 |
+
->addColumn('is_remove', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
70 |
+
'unsigned' => true,
|
71 |
+
'nullable' => false,
|
72 |
+
'default' => '0',
|
73 |
+
), 'Flag if notification might be removed')
|
74 |
+
->addIndex($installer->getIdxName('adminnotification/inbox', array('severity')),
|
75 |
+
array('severity'))
|
76 |
+
->addIndex($installer->getIdxName('adminnotification/inbox', array('is_read')),
|
77 |
+
array('is_read'))
|
78 |
+
->addIndex($installer->getIdxName('adminnotification/inbox', array('is_remove')),
|
79 |
+
array('is_remove'))
|
80 |
+
->setComment('Adminnotification Inbox');
|
81 |
+
$installer->getConnection()->createTable($table);
|
82 |
+
|
83 |
+
$installer->endSetup();
|
app/code/core/Mage/AdminNotification/sql/adminnotification_setup/mysql4-install-1.0.0.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_AdminNotification
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
$installer = $this;
|
28 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
29 |
+
|
30 |
+
$installer->startSetup();
|
31 |
+
$installer->run("
|
32 |
+
-- DROP TABLE IF EXISTS `{$installer->getTable('adminnotification_inbox')}`;
|
33 |
+
CREATE TABLE IF NOT EXISTS `{$installer->getTable('adminnotification_inbox')}` (
|
34 |
+
`notification_id` int(10) unsigned NOT NULL auto_increment,
|
35 |
+
`severity` tinyint(3) unsigned NOT NULL default '0',
|
36 |
+
`date_added` datetime NOT NULL,
|
37 |
+
`title` varchar(255) NOT NULL,
|
38 |
+
`description` text,
|
39 |
+
`url` varchar(255) NOT NULL,
|
40 |
+
`is_read` tinyint(1) unsigned NOT NULL default '0',
|
41 |
+
`is_remove` tinyint(1) unsigned NOT NULL default '0',
|
42 |
+
PRIMARY KEY (`notification_id`),
|
43 |
+
KEY `IDX_SEVERITY` (`severity`),
|
44 |
+
KEY `IDX_IS_READ` (`is_read`),
|
45 |
+
KEY `IDX_IS_REMOVE` (`is_remove`)
|
46 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
47 |
+
");
|
48 |
+
$installer->endSetup();
|
app/code/core/Mage/AdminNotification/sql/adminnotification_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php
ADDED
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_AdminNotification
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
/**
|
32 |
+
* Drop indexes
|
33 |
+
*/
|
34 |
+
$connection = $installer->getConnection()->dropIndex(
|
35 |
+
$installer->getTable('adminnotification/inbox'),
|
36 |
+
'IDX_SEVERITY'
|
37 |
+
);
|
38 |
+
|
39 |
+
$connection = $installer->getConnection()->dropIndex(
|
40 |
+
$installer->getTable('adminnotification/inbox'),
|
41 |
+
'IDX_IS_READ'
|
42 |
+
);
|
43 |
+
|
44 |
+
$connection = $installer->getConnection()->dropIndex(
|
45 |
+
$installer->getTable('adminnotification/inbox'),
|
46 |
+
'IDX_IS_REMOVE'
|
47 |
+
);
|
48 |
+
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Change columns
|
52 |
+
*/
|
53 |
+
$tables = array(
|
54 |
+
$installer->getTable('adminnotification/inbox') => array(
|
55 |
+
'columns' => array(
|
56 |
+
'notification_id' => array(
|
57 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
58 |
+
'identity' => true,
|
59 |
+
'unsigned' => true,
|
60 |
+
'nullable' => false,
|
61 |
+
'primary' => true,
|
62 |
+
'comment' => 'Notification id'
|
63 |
+
),
|
64 |
+
'severity' => array(
|
65 |
+
'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
|
66 |
+
'unsigned' => true,
|
67 |
+
'nullable' => false,
|
68 |
+
'default' => '0',
|
69 |
+
'comment' => 'Problem type'
|
70 |
+
),
|
71 |
+
'date_added' => array(
|
72 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TIMESTAMP,
|
73 |
+
'nullable' => false,
|
74 |
+
'comment' => 'Create date'
|
75 |
+
),
|
76 |
+
'title' => array(
|
77 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
78 |
+
'length' => 255,
|
79 |
+
'nullable' => false,
|
80 |
+
'comment' => 'Title'
|
81 |
+
),
|
82 |
+
'description' => array(
|
83 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
84 |
+
'length' => '64K',
|
85 |
+
'comment' => 'Description'
|
86 |
+
),
|
87 |
+
'url' => array(
|
88 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
89 |
+
'length' => 255,
|
90 |
+
'comment' => 'Url'
|
91 |
+
),
|
92 |
+
'is_read' => array(
|
93 |
+
'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
|
94 |
+
'unsigned' => true,
|
95 |
+
'nullable' => false,
|
96 |
+
'default' => '0',
|
97 |
+
'comment' => 'Flag if notification read'
|
98 |
+
),
|
99 |
+
'is_remove' => array(
|
100 |
+
'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
|
101 |
+
'unsigned' => true,
|
102 |
+
'nullable' => false,
|
103 |
+
'default' => '0',
|
104 |
+
'comment' => 'Flag if notification might be removed'
|
105 |
+
)
|
106 |
+
),
|
107 |
+
'comment' => 'Adminnotification Inbox'
|
108 |
+
)
|
109 |
+
);
|
110 |
+
|
111 |
+
$installer->getConnection()->modifyTables($tables);
|
112 |
+
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Add indexes
|
116 |
+
*/
|
117 |
+
$connection = $installer->getConnection()->addIndex(
|
118 |
+
$installer->getTable('adminnotification/inbox'),
|
119 |
+
$installer->getIdxName('adminnotification/inbox', array('severity')),
|
120 |
+
array('severity')
|
121 |
+
);
|
122 |
+
|
123 |
+
$connection = $installer->getConnection()->addIndex(
|
124 |
+
$installer->getTable('adminnotification/inbox'),
|
125 |
+
$installer->getIdxName('adminnotification/inbox', array('is_read')),
|
126 |
+
array('is_read')
|
127 |
+
);
|
128 |
+
|
129 |
+
$connection = $installer->getConnection()->addIndex(
|
130 |
+
$installer->getTable('adminnotification/inbox'),
|
131 |
+
$installer->getIdxName('adminnotification/inbox', array('is_remove')),
|
132 |
+
array('is_remove')
|
133 |
+
);
|
134 |
+
|
135 |
+
$installer->endSetup();
|
app/code/core/Mage/Api/Controller/Action.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Base api controller
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
*/
|
33 |
+
class Mage_Api_Controller_Action extends Mage_Core_Controller_Front_Action
|
34 |
+
{
|
35 |
+
public function preDispatch()
|
36 |
+
{
|
37 |
+
$this->getLayout()->setArea('adminhtml');
|
38 |
+
Mage::app()->setCurrentStore('admin');
|
39 |
+
$this->setFlag('', self::FLAG_NO_START_SESSION, 1); // Do not start standart session
|
40 |
+
parent::preDispatch();
|
41 |
+
return $this;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Retrive webservice server
|
46 |
+
*
|
47 |
+
* @return Mage_Api_Model_Server
|
48 |
+
*/
|
49 |
+
protected function _getServer()
|
50 |
+
{
|
51 |
+
return Mage::getSingleton('api/server');
|
52 |
+
}
|
53 |
+
}
|
app/code/core/Mage/Api/Exception.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 exception
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_Exception extends Mage_Core_Exception
|
35 |
+
{
|
36 |
+
protected $_customMessage = null;
|
37 |
+
|
38 |
+
public function __construct($faultCode, $customMessage=null)
|
39 |
+
{
|
40 |
+
parent::__construct($faultCode);
|
41 |
+
$this->_customMessage = $customMessage;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Custom error message, if error is not in api.
|
46 |
+
*
|
47 |
+
* @return unknown
|
48 |
+
*/
|
49 |
+
public function getCustomMessage()
|
50 |
+
{
|
51 |
+
return $this->_customMessage;
|
52 |
+
}
|
53 |
+
} // Class Mage_Api_Model_Resource_Exception End
|
app/code/core/Mage/Api/Helper/Data.php
ADDED
@@ -0,0 +1,239 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Web service api main helper
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_Helper_Data extends Mage_Core_Helper_Abstract
|
35 |
+
{
|
36 |
+
const XML_PATH_API_WSI = 'api/config/compliance_wsi';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* @return boolean
|
40 |
+
*/
|
41 |
+
public function isComplianceWSI()
|
42 |
+
{
|
43 |
+
return Mage::getStoreConfig(self::XML_PATH_API_WSI);
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Go thru a WSI args array and turns it to correct state.
|
48 |
+
*
|
49 |
+
* @param Object $obj - Link to Object
|
50 |
+
* @return Object
|
51 |
+
*/
|
52 |
+
public function wsiArrayUnpacker(&$obj)
|
53 |
+
{
|
54 |
+
if (is_object($obj)) {
|
55 |
+
|
56 |
+
$modifiedKeys = $this->clearWsiFootprints($obj);
|
57 |
+
|
58 |
+
foreach ($obj as $key => $value) {
|
59 |
+
if (is_object($value)) {
|
60 |
+
$this->wsiArrayUnpacker($value);
|
61 |
+
}
|
62 |
+
if (is_array($value)) {
|
63 |
+
foreach ($value as &$val) {
|
64 |
+
if (is_object($val)) {
|
65 |
+
$this->wsiArrayUnpacker($val);
|
66 |
+
}
|
67 |
+
}
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
foreach ($modifiedKeys as $arrKey) {
|
72 |
+
$this->associativeArrayUnpack($obj->$arrKey);
|
73 |
+
}
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Go thru an object parameters and unpak associative object to array.
|
79 |
+
*
|
80 |
+
* @param Object $obj - Link to Object
|
81 |
+
* @return Object
|
82 |
+
*/
|
83 |
+
public function v2AssociativeArrayUnpacker(&$obj)
|
84 |
+
{
|
85 |
+
if (is_object($obj)
|
86 |
+
&& property_exists($obj, 'key')
|
87 |
+
&& property_exists($obj, 'value')
|
88 |
+
) {
|
89 |
+
if (count(array_keys(get_object_vars($obj))) == 2) {
|
90 |
+
$obj = array($obj->key => $obj->value);
|
91 |
+
return true;
|
92 |
+
}
|
93 |
+
} elseif (is_array($obj)) {
|
94 |
+
$arr = array();
|
95 |
+
$needReplacement = true;
|
96 |
+
foreach ($obj as $key => &$value) {
|
97 |
+
$isAssoc = $this->v2AssociativeArrayUnpacker($value);
|
98 |
+
if ($isAssoc) {
|
99 |
+
foreach ($value as $aKey => $aVal) {
|
100 |
+
$arr[$aKey] = $aVal;
|
101 |
+
}
|
102 |
+
} else {
|
103 |
+
$needReplacement = false;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
if ($needReplacement) {
|
107 |
+
$obj = $arr;
|
108 |
+
}
|
109 |
+
} elseif (is_object($obj)) {
|
110 |
+
$objectKeys = array_keys(get_object_vars($obj));
|
111 |
+
|
112 |
+
foreach ($objectKeys as $key) {
|
113 |
+
$this->v2AssociativeArrayUnpacker($obj->$key);
|
114 |
+
}
|
115 |
+
}
|
116 |
+
return false;
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Go thru mixed and turns it to a correct look.
|
121 |
+
*
|
122 |
+
* @param Mixed $mixed A link to variable that may contain associative array.
|
123 |
+
*/
|
124 |
+
public function associativeArrayUnpack(&$mixed)
|
125 |
+
{
|
126 |
+
if (is_array($mixed)) {
|
127 |
+
$tmpArr = array();
|
128 |
+
foreach ($mixed as $key => $value) {
|
129 |
+
if (is_object($value)) {
|
130 |
+
$value = get_object_vars($value);
|
131 |
+
if (count($value) == 2 && isset($value['key']) && isset($value['value'])) {
|
132 |
+
$tmpArr[$value['key']] = $value['value'];
|
133 |
+
}
|
134 |
+
}
|
135 |
+
}
|
136 |
+
if (count($tmpArr)) {
|
137 |
+
$mixed = $tmpArr;
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
if (is_object($mixed)) {
|
142 |
+
$numOfVals = count(get_object_vars($mixed));
|
143 |
+
if ($numOfVals == 2 && isset($mixed->key) && isset($mixed->value)) {
|
144 |
+
$mixed = get_object_vars($mixed);
|
145 |
+
/*
|
146 |
+
* Processing an associative arrays.
|
147 |
+
* $mixed->key = '2'; $mixed->value = '3'; turns to array(2 => '3');
|
148 |
+
*/
|
149 |
+
$mixed = array($mixed['key'] => $mixed['value']);
|
150 |
+
}
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Corrects data representation.
|
156 |
+
*
|
157 |
+
* @param Object $obj - Link to Object
|
158 |
+
* @return Object
|
159 |
+
*/
|
160 |
+
public function clearWsiFootprints(&$obj)
|
161 |
+
{
|
162 |
+
$modifiedKeys = array();
|
163 |
+
|
164 |
+
$objectKeys = array_keys(get_object_vars($obj));
|
165 |
+
|
166 |
+
foreach ($objectKeys as $key) {
|
167 |
+
if (is_object($obj->$key) && isset($obj->$key->complexObjectArray)) {
|
168 |
+
$obj->$key = $obj->$key->complexObjectArray;
|
169 |
+
$modifiedKeys[] = $key;
|
170 |
+
}
|
171 |
+
}
|
172 |
+
return $modifiedKeys;
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* For the WSI, generates an response object.
|
177 |
+
*
|
178 |
+
* @param mixed $mixed - Link to Object
|
179 |
+
* @return mixed
|
180 |
+
*/
|
181 |
+
public function wsiArrayPacker($mixed)
|
182 |
+
{
|
183 |
+
if (is_array($mixed)) {
|
184 |
+
$arrKeys = array_keys($mixed);
|
185 |
+
$isDigit = false;
|
186 |
+
$isString = false;
|
187 |
+
foreach ($arrKeys as $key) {
|
188 |
+
if (is_int($key)) {
|
189 |
+
$isDigit = true;
|
190 |
+
break;
|
191 |
+
}
|
192 |
+
}
|
193 |
+
if ($isDigit) {
|
194 |
+
$mixed = $this->packArrayToObjec($mixed);
|
195 |
+
} else {
|
196 |
+
$mixed = (object) $mixed;
|
197 |
+
}
|
198 |
+
}
|
199 |
+
if (is_object($mixed) && isset($mixed->complexObjectArray)) {
|
200 |
+
foreach ($mixed->complexObjectArray as $k => $v) {
|
201 |
+
$mixed->complexObjectArray[$k] = $this->wsiArrayPacker($v);
|
202 |
+
}
|
203 |
+
}
|
204 |
+
return $mixed;
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* For response to the WSI, generates an object from array.
|
209 |
+
*
|
210 |
+
* @param Array $arr - Link to Object
|
211 |
+
* @return Object
|
212 |
+
*/
|
213 |
+
public function packArrayToObjec(Array $arr)
|
214 |
+
{
|
215 |
+
$obj = new stdClass();
|
216 |
+
$obj->complexObjectArray = $arr;
|
217 |
+
return $obj;
|
218 |
+
}
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Convert objects and arrays to array recursively
|
222 |
+
*
|
223 |
+
* @param array|object $data
|
224 |
+
* @return void
|
225 |
+
*/
|
226 |
+
public function toArray(&$data)
|
227 |
+
{
|
228 |
+
if (is_object($data)) {
|
229 |
+
$data = get_object_vars($data);
|
230 |
+
}
|
231 |
+
if (is_array($data)) {
|
232 |
+
foreach ($data as &$value) {
|
233 |
+
if (is_array($value) or is_object($value)) {
|
234 |
+
$this->toArray($value);
|
235 |
+
}
|
236 |
+
}
|
237 |
+
}
|
238 |
+
}
|
239 |
+
} // Class Mage_Api_Helper_Data End
|
app/code/core/Mage/Api/Model/Acl.php
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Acl extends Zend_Acl
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* All the group roles are prepended by G
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
const ROLE_TYPE_GROUP = 'G';
|
42 |
+
|
43 |
+
/**
|
44 |
+
* All the user roles are prepended by U
|
45 |
+
*
|
46 |
+
*/
|
47 |
+
const ROLE_TYPE_USER = 'U';
|
48 |
+
|
49 |
+
/**
|
50 |
+
* User types for store access
|
51 |
+
* G - Guest customer (anonymous)
|
52 |
+
* C - Authenticated customer
|
53 |
+
* A - Authenticated admin user
|
54 |
+
*
|
55 |
+
*/
|
56 |
+
const USER_TYPE_GUEST = 'G';
|
57 |
+
const USER_TYPE_CUSTOMER = 'C';
|
58 |
+
const USER_TYPE_ADMIN = 'A';
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Permission level to deny access
|
62 |
+
*
|
63 |
+
*/
|
64 |
+
const RULE_PERM_DENY = 0;
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Permission level to inheric access from parent role
|
68 |
+
*
|
69 |
+
*/
|
70 |
+
const RULE_PERM_INHERIT = 1;
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Permission level to allow access
|
74 |
+
*
|
75 |
+
*/
|
76 |
+
const RULE_PERM_ALLOW = 2;
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Get role registry object or create one
|
80 |
+
*
|
81 |
+
* @return Mage_Api_Model_Acl_Role_Registry
|
82 |
+
*/
|
83 |
+
protected function _getRoleRegistry()
|
84 |
+
{
|
85 |
+
if (null === $this->_roleRegistry) {
|
86 |
+
$this->_roleRegistry = Mage::getModel('api/acl_role_registry');
|
87 |
+
}
|
88 |
+
return $this->_roleRegistry;
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Add parent to role object
|
93 |
+
*
|
94 |
+
* @param Zend_Acl_Role $role
|
95 |
+
* @param Zend_Acl_Role $parent
|
96 |
+
* @return Mage_Api_Model_Acl
|
97 |
+
*/
|
98 |
+
public function addRoleParent($role, $parent)
|
99 |
+
{
|
100 |
+
$this->_getRoleRegistry()->addParent($role, $parent);
|
101 |
+
return $this;
|
102 |
+
}
|
103 |
+
}
|
app/code/core/Mage/Api/Model/Acl/Assert/Ip.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* IP assertion for admin acl
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Acl_Assert_Ip implements Zend_Acl_Assert_Interface
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Check whether ip is allowed
|
39 |
+
*
|
40 |
+
* @param Zend_Acl $acl
|
41 |
+
* @param Zend_Acl_Role_Interface $role
|
42 |
+
* @param Zend_Acl_Resource_Interface $resource
|
43 |
+
* @param string $privilege
|
44 |
+
* @return boolean
|
45 |
+
*/
|
46 |
+
public function assert(Mage_Api_Model_Acl $acl, Mage_Api_Model_Acl_Role $role = null,
|
47 |
+
Mage_Api_Model_Acl_Resource $resource = null, $privilege = null)
|
48 |
+
{
|
49 |
+
return $this->_isCleanIP(Mage::helper('core/http')->getRemoteAddr());
|
50 |
+
}
|
51 |
+
|
52 |
+
protected function _isCleanIP($ip)
|
53 |
+
{
|
54 |
+
// ...
|
55 |
+
}
|
56 |
+
}
|
app/code/core/Mage/Api/Model/Acl/Assert/Time.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Assert time for admin acl
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Acl_Assert_Time implements Zend_Acl_Assert_Interface
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Assert time
|
39 |
+
*
|
40 |
+
* @param Zend_Acl $acl
|
41 |
+
* @param Zend_Acl_Role_Interface $role
|
42 |
+
* @param Zend_Acl_Resource_Interface $resource
|
43 |
+
* @param string $privilege
|
44 |
+
* @return boolean
|
45 |
+
*/
|
46 |
+
public function assert(Mage_Api_Model_Acl $acl, Mage_Api_Model_Acl_Role $role = null,
|
47 |
+
Mage_Api_Model_Acl_Resource $resource = null, $privilege = null)
|
48 |
+
{
|
49 |
+
return $this->_isCleanTime(time());
|
50 |
+
}
|
51 |
+
|
52 |
+
protected function _isCleanTime($time)
|
53 |
+
{
|
54 |
+
// ...
|
55 |
+
}
|
56 |
+
}
|
app/code/core/Mage/Api/Model/Acl/Resource.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_Api
|
23 |
+
* @copyright Copyright (c) 2011 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 resource
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Acl_Resource extends Zend_Acl_Resource
|
36 |
+
{
|
37 |
+
|
38 |
+
}
|
app/code/core/Mage/Api/Model/Acl/Role.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* User acl role
|
30 |
+
*
|
31 |
+
* @method Mage_Api_Model_Resource_Role _getResource()
|
32 |
+
* @method Mage_Api_Model_Resource_Role getResource()
|
33 |
+
* @method int getParentId()
|
34 |
+
* @method Mage_Api_Model_Acl_Role setParentId(int $value)
|
35 |
+
* @method int getTreeLevel()
|
36 |
+
* @method Mage_Api_Model_Acl_Role setTreeLevel(int $value)
|
37 |
+
* @method int getSortOrder()
|
38 |
+
* @method Mage_Api_Model_Acl_Role setSortOrder(int $value)
|
39 |
+
* @method string getRoleType()
|
40 |
+
* @method Mage_Api_Model_Acl_Role setRoleType(string $value)
|
41 |
+
* @method int getUserId()
|
42 |
+
* @method Mage_Api_Model_Acl_Role setUserId(int $value)
|
43 |
+
* @method string getRoleName()
|
44 |
+
* @method Mage_Api_Model_Acl_Role setRoleName(string $value)
|
45 |
+
*
|
46 |
+
* @category Mage
|
47 |
+
* @package Mage_Api
|
48 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
49 |
+
*/
|
50 |
+
class Mage_Api_Model_Acl_Role extends Mage_Core_Model_Abstract
|
51 |
+
{
|
52 |
+
protected function _construct()
|
53 |
+
{
|
54 |
+
$this->_init('api/role');
|
55 |
+
}
|
56 |
+
}
|
app/code/core/Mage/Api/Model/Acl/Role/Generic.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_Api
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* User acl role
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Acl_Role_Generic extends Zend_Acl_Role
|
36 |
+
{
|
37 |
+
|
38 |
+
}
|
app/code/core/Mage/Api/Model/Acl/Role/Group.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_Api
|
23 |
+
* @copyright Copyright (c) 2011 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 Group model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Acl_Role_Group extends Mage_Api_Model_Acl_Role_Generic
|
36 |
+
{
|
37 |
+
|
38 |
+
}
|
app/code/core/Mage/Api/Model/Acl/Role/Registry.php
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 role registry
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Acl_Role_Registry extends Zend_Acl_Role_Registry
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Add parent to the $role node
|
39 |
+
*
|
40 |
+
* @param Zend_Acl_Role_Interface|string $role
|
41 |
+
* @param array|Zend_Acl_Role_Interface|string $parents
|
42 |
+
* @return Mage_Auth_Model_Acl_Role_Registry
|
43 |
+
*/
|
44 |
+
function addParent($role, $parents)
|
45 |
+
{
|
46 |
+
try {
|
47 |
+
if ($role instanceof Zend_Acl_Role_Interface) {
|
48 |
+
$roleId = $role->getRoleId();
|
49 |
+
} else {
|
50 |
+
$roleId = $role;
|
51 |
+
$role = $this->get($role);
|
52 |
+
}
|
53 |
+
} catch (Zend_Acl_Role_Registry_Exception $e) {
|
54 |
+
throw new Zend_Acl_Role_Registry_Exception("Child Role id '$roleId' does not exist");
|
55 |
+
}
|
56 |
+
|
57 |
+
if (!is_array($parents)) {
|
58 |
+
$parents = array($parents);
|
59 |
+
}
|
60 |
+
foreach ($parents as $parent) {
|
61 |
+
try {
|
62 |
+
if ($parent instanceof Zend_Acl_Role_Interface) {
|
63 |
+
$roleParentId = $parent->getRoleId();
|
64 |
+
} else {
|
65 |
+
$roleParentId = $parent;
|
66 |
+
}
|
67 |
+
$roleParent = $this->get($roleParentId);
|
68 |
+
} catch (Zend_Acl_Role_Registry_Exception $e) {
|
69 |
+
throw new Zend_Acl_Role_Registry_Exception("Parent Role id '$roleParentId' does not exist");
|
70 |
+
}
|
71 |
+
$this->_roles[$roleId]['parents'][$roleParentId] = $roleParent;
|
72 |
+
$this->_roles[$roleParentId]['children'][$roleId] = $role;
|
73 |
+
}
|
74 |
+
return $this;
|
75 |
+
}
|
76 |
+
}
|
app/code/core/Mage/Api/Model/Acl/Role/User.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_Api
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* User acl role
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Acl_Role_User extends Mage_Api_Model_Acl_Role_Generic
|
36 |
+
{
|
37 |
+
|
38 |
+
}
|
app/code/core/Mage/Api/Model/Config.php
ADDED
@@ -0,0 +1,273 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Webservice api config model
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_Model_Config extends Varien_Simplexml_Config
|
35 |
+
{
|
36 |
+
const CACHE_TAG = 'config_api';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Constructor
|
40 |
+
*
|
41 |
+
* @see Varien_Simplexml_Config
|
42 |
+
*/
|
43 |
+
public function __construct($sourceData=null)
|
44 |
+
{
|
45 |
+
$this->setCacheId('config_api');
|
46 |
+
$this->setCacheTags(array(self::CACHE_TAG));
|
47 |
+
|
48 |
+
parent::__construct($sourceData);
|
49 |
+
$this->_construct();
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Init configuration for webservices api
|
54 |
+
*
|
55 |
+
* @return Mage_Api_Model_Config
|
56 |
+
*/
|
57 |
+
protected function _construct()
|
58 |
+
{
|
59 |
+
if (Mage::app()->useCache('config_api')) {
|
60 |
+
if ($this->loadCache()) {
|
61 |
+
return $this;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
$config = Mage::getConfig()->loadModulesConfiguration('api.xml');
|
66 |
+
$this->setXml($config->getNode('api'));
|
67 |
+
|
68 |
+
if (Mage::app()->useCache('config_api')) {
|
69 |
+
$this->saveCache();
|
70 |
+
}
|
71 |
+
return $this;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Retrieve all adapters
|
76 |
+
*
|
77 |
+
* @return array
|
78 |
+
*/
|
79 |
+
public function getAdapters()
|
80 |
+
{
|
81 |
+
$adapters = array();
|
82 |
+
foreach ($this->getNode('adapters')->children() as $adapterName => $adapter) {
|
83 |
+
/* @var $adapter Varien_SimpleXml_Element */
|
84 |
+
if (isset($adapter->use)) {
|
85 |
+
$adapter = $this->getNode('adapters/' . (string) $adapter->use);
|
86 |
+
}
|
87 |
+
$adapters[$adapterName] = $adapter;
|
88 |
+
}
|
89 |
+
return $adapters;
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Retrieve active adapters
|
94 |
+
*
|
95 |
+
* @return array
|
96 |
+
*/
|
97 |
+
public function getActiveAdapters()
|
98 |
+
{
|
99 |
+
$adapters = array();
|
100 |
+
foreach ($this->getAdapters() as $adapterName => $adapter) {
|
101 |
+
if (!isset($adapter->active) || $adapter->active == '0') {
|
102 |
+
continue;
|
103 |
+
}
|
104 |
+
|
105 |
+
if (isset($adapter->required) && isset($adapter->required->extensions)) {
|
106 |
+
foreach ($adapter->required->extensions->children() as $extension=>$data) {
|
107 |
+
if (!extension_loaded($extension)) {
|
108 |
+
continue;
|
109 |
+
}
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
$adapters[$adapterName] = $adapter;
|
114 |
+
}
|
115 |
+
|
116 |
+
return $adapters;
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Retrieve handlers
|
121 |
+
*
|
122 |
+
* @return Varien_Simplexml_Element
|
123 |
+
*/
|
124 |
+
public function getHandlers()
|
125 |
+
{
|
126 |
+
return $this->getNode('handlers')->children();
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Retrieve resources
|
131 |
+
*
|
132 |
+
* @return Varien_Simplexml_Element
|
133 |
+
*/
|
134 |
+
public function getResources()
|
135 |
+
{
|
136 |
+
return $this->getNode('resources')->children();
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Retrieve resources alias
|
141 |
+
*
|
142 |
+
* @return Varien_Simplexml_Element
|
143 |
+
*/
|
144 |
+
public function getResourcesAlias()
|
145 |
+
{
|
146 |
+
return $this->getNode('resources_alias')->children();
|
147 |
+
}
|
148 |
+
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Load Acl resources from config
|
152 |
+
*
|
153 |
+
* @param Mage_Api_Model_Acl $acl
|
154 |
+
* @param Mage_Core_Model_Config_Element $resource
|
155 |
+
* @param string $parentName
|
156 |
+
* @return Mage_Api_Model_Config
|
157 |
+
*/
|
158 |
+
public function loadAclResources(Mage_Api_Model_Acl $acl, $resource=null, $parentName=null)
|
159 |
+
{
|
160 |
+
$resourceName = null;
|
161 |
+
if (is_null($resource)) {
|
162 |
+
$resource = $this->getNode('acl/resources');
|
163 |
+
} else {
|
164 |
+
$resourceName = (is_null($parentName) ? '' : $parentName.'/').$resource->getName();
|
165 |
+
$acl->add(Mage::getModel('api/acl_resource', $resourceName), $parentName);
|
166 |
+
}
|
167 |
+
|
168 |
+
$children = $resource->children();
|
169 |
+
|
170 |
+
if (empty($children)) {
|
171 |
+
return $this;
|
172 |
+
}
|
173 |
+
|
174 |
+
foreach ($children as $res) {
|
175 |
+
if ($res->getName() != 'title' && $res->getName() != 'sort_order') {
|
176 |
+
$this->loadAclResources($acl, $res, $resourceName);
|
177 |
+
}
|
178 |
+
}
|
179 |
+
return $this;
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Get acl assert config
|
184 |
+
*
|
185 |
+
* @param string $name
|
186 |
+
* @return Mage_Core_Model_Config_Element|boolean
|
187 |
+
*/
|
188 |
+
public function getAclAssert($name='')
|
189 |
+
{
|
190 |
+
$asserts = $this->getNode('acl/asserts');
|
191 |
+
if (''===$name) {
|
192 |
+
return $asserts;
|
193 |
+
}
|
194 |
+
|
195 |
+
if (isset($asserts->$name)) {
|
196 |
+
return $asserts->$name;
|
197 |
+
}
|
198 |
+
|
199 |
+
return false;
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Retrieve privilege set by name
|
204 |
+
*
|
205 |
+
* @param string $name
|
206 |
+
* @return Mage_Core_Model_Config_Element|boolean
|
207 |
+
*/
|
208 |
+
public function getAclPrivilegeSet($name='')
|
209 |
+
{
|
210 |
+
$sets = $this->getNode('acl/privilegeSets');
|
211 |
+
if (''===$name) {
|
212 |
+
return $sets;
|
213 |
+
}
|
214 |
+
|
215 |
+
if (isset($sets->$name)) {
|
216 |
+
return $sets->$name;
|
217 |
+
}
|
218 |
+
|
219 |
+
return false;
|
220 |
+
}
|
221 |
+
|
222 |
+
public function getFaults($resourceName=null)
|
223 |
+
{
|
224 |
+
if (is_null($resourceName)
|
225 |
+
|| !isset($this->getResources()->$resourceName)
|
226 |
+
|| !isset($this->getResources()->$resourceName->faults)) {
|
227 |
+
$faultsNode = $this->getNode('faults');
|
228 |
+
} else {
|
229 |
+
$faultsNode = $this->getResources()->$resourceName->faults;
|
230 |
+
}
|
231 |
+
/* @var $faultsNode Varien_Simplexml_Element */
|
232 |
+
|
233 |
+
$translateModule = 'api';
|
234 |
+
if (isset($faultsNode['module'])) {
|
235 |
+
$translateModule = (string) $faultsNode['module'];
|
236 |
+
}
|
237 |
+
|
238 |
+
$faults = array();
|
239 |
+
foreach ($faultsNode->children() as $faultName => $fault) {
|
240 |
+
$faults[$faultName] = array(
|
241 |
+
'code' => (string) $fault->code,
|
242 |
+
'message' => Mage::helper($translateModule)->__((string)$fault->message)
|
243 |
+
);
|
244 |
+
}
|
245 |
+
|
246 |
+
return $faults;
|
247 |
+
}
|
248 |
+
|
249 |
+
/**
|
250 |
+
* Retrieve cache object
|
251 |
+
*
|
252 |
+
* @return Zend_Cache_Frontend_File
|
253 |
+
*/
|
254 |
+
public function getCache()
|
255 |
+
{
|
256 |
+
return Mage::app()->getCache();
|
257 |
+
}
|
258 |
+
|
259 |
+
protected function _loadCache($id)
|
260 |
+
{
|
261 |
+
return Mage::app()->loadCache($id);
|
262 |
+
}
|
263 |
+
|
264 |
+
protected function _saveCache($data, $id, $tags=array(), $lifetime=false)
|
265 |
+
{
|
266 |
+
return Mage::app()->saveCache($data, $id, $tags, $lifetime);
|
267 |
+
}
|
268 |
+
|
269 |
+
protected function _removeCache($id)
|
270 |
+
{
|
271 |
+
return Mage::app()->removeCache($id);
|
272 |
+
}
|
273 |
+
} // Class Mage_Api_Model_Config End
|
app/code/core/Mage/Api/Model/Mysql4/Acl.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Resource model for admin ACL
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Mysql4_Acl extends Mage_Api_Model_Resource_Acl
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Api/Model/Mysql4/Acl/Role.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 role resource
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Mysql4_Acl_Role extends Mage_Api_Model_Resource_Acl_Role
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Api/Model/Mysql4/Acl/Role/Collection.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Roles collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Mysql4_Acl_Role_Collection extends Mage_Api_Model_Resource_Acl_Role_Collection
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Api/Model/Mysql4/Permissions/Collection.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Enter description here ...
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Mysql4_Permissions_Collection extends Mage_Api_Model_Resource_Permissions_Collection
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Api/Model/Mysql4/Role.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Enter description here ...
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Mysql4_Role extends Mage_Api_Model_Resource_Role
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Api/Model/Mysql4/Role/Collection.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Enter description here ...
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Mysql4_Role_Collection extends Mage_Api_Model_Resource_Role_Collection
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Api/Model/Mysql4/Roles.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Enter description here ...
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Mysql4_Roles extends Mage_Api_Model_Resource_Roles
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Api/Model/Mysql4/Roles/Collection.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Enter description here ...
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Mysql4_Roles_Collection extends Mage_Api_Model_Resource_Roles_Collection
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Api/Model/Mysql4/Roles/User/Collection.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Enter description here ...
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Mysql4_Roles_User_Collection extends Mage_Api_Model_Resource_Roles_User_Collection
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Api/Model/Mysql4/Rules.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Enter description here ...
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Mysql4_Rules extends Mage_Api_Model_Resource_Rules
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Api/Model/Mysql4/Rules/Collection.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Enter description here ...
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Mysql4_Rules_Collection extends Mage_Api_Model_Resource_Rules_Collection
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Api/Model/Mysql4/User.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Mysql4_User extends Mage_Api_Model_Resource_User
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Api/Model/Mysql4/User/Collection.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Enter description here ...
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Mysql4_User_Collection extends Mage_Api_Model_Resource_User_Collection
|
36 |
+
{
|
37 |
+
}
|
app/code/core/Mage/Api/Model/Resource/Abstract.php
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 resource abstract
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_Model_Resource_Abstract
|
35 |
+
{
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Resource configuration
|
39 |
+
*
|
40 |
+
* @var Varien_Simplexml_Element
|
41 |
+
*/
|
42 |
+
protected $_resourceConfig = null;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Retrieve webservice session
|
46 |
+
*
|
47 |
+
* @return Mage_Api_Model_Session
|
48 |
+
*/
|
49 |
+
protected function _getSession()
|
50 |
+
{
|
51 |
+
return Mage::getSingleton('api/session');
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Retrieve webservice configuration
|
56 |
+
*
|
57 |
+
* @return Mage_Api_Model_Config
|
58 |
+
*/
|
59 |
+
protected function _getConfig()
|
60 |
+
{
|
61 |
+
return Mage::getSingleton('api/config');
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Set configuration for api resource
|
66 |
+
*
|
67 |
+
* @param Varien_Simplexml_Element $xml
|
68 |
+
* @return Mage_Api_Model_Resource_Abstract
|
69 |
+
*/
|
70 |
+
public function setResourceConfig(Varien_Simplexml_Element $xml)
|
71 |
+
{
|
72 |
+
$this->_resourceConfig = $xml;
|
73 |
+
return $this;
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Retrieve configuration for api resource
|
78 |
+
*
|
79 |
+
* @return Varien_Simplexml_Element
|
80 |
+
*/
|
81 |
+
public function getResourceConfig()
|
82 |
+
{
|
83 |
+
return $this->_resourceConfig;
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Retrieve webservice server
|
88 |
+
*
|
89 |
+
* @return Mage_Api_Model_Server
|
90 |
+
*/
|
91 |
+
protected function _getServer()
|
92 |
+
{
|
93 |
+
return Mage::getSingleton('api/server');
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Dispatches fault
|
98 |
+
*
|
99 |
+
* @param string $code
|
100 |
+
*/
|
101 |
+
protected function _fault($code, $customMessage=null)
|
102 |
+
{
|
103 |
+
throw new Mage_Api_Exception($code, $customMessage);
|
104 |
+
}
|
105 |
+
} // Class Mage_Api_Model_Resource_Abstract End
|
app/code/core/Mage/Api/Model/Resource/Acl.php
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Resource model for admin ACL
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Resource_Acl extends Mage_Core_Model_Resource_Db_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Initialize resource connections
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('api/role', 'role_id');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Load ACL for the user
|
48 |
+
*
|
49 |
+
* @return Mage_Api_Model_Acl
|
50 |
+
*/
|
51 |
+
public function loadAcl()
|
52 |
+
{
|
53 |
+
$acl = Mage::getModel('api/acl');
|
54 |
+
$adapter = $this->_getReadAdapter();
|
55 |
+
|
56 |
+
Mage::getSingleton('api/config')->loadAclResources($acl);
|
57 |
+
|
58 |
+
$rolesArr = $adapter->fetchAll(
|
59 |
+
$adapter->select()
|
60 |
+
->from($this->getTable('api/role'))
|
61 |
+
->order(array('tree_level', 'role_type'))
|
62 |
+
);
|
63 |
+
$this->loadRoles($acl, $rolesArr);
|
64 |
+
|
65 |
+
$rulesArr = $adapter->fetchAll(
|
66 |
+
$adapter->select()
|
67 |
+
->from(array('r'=>$this->getTable('api/rule')))
|
68 |
+
->joinLeft(
|
69 |
+
array('a'=>$this->getTable('api/assert')),
|
70 |
+
'a.assert_id=r.assert_id',
|
71 |
+
array('assert_type', 'assert_data')
|
72 |
+
));
|
73 |
+
$this->loadRules($acl, $rulesArr);
|
74 |
+
return $acl;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Load roles
|
79 |
+
*
|
80 |
+
* @param Mage_Api_Model_Acl $acl
|
81 |
+
* @param array $rolesArr
|
82 |
+
* @return Mage_Api_Model_Resource_Acl
|
83 |
+
*/
|
84 |
+
public function loadRoles(Mage_Api_Model_Acl $acl, array $rolesArr)
|
85 |
+
{
|
86 |
+
foreach ($rolesArr as $role) {
|
87 |
+
$parent = $role['parent_id']>0 ? Mage_Api_Model_Acl::ROLE_TYPE_GROUP.$role['parent_id'] : null;
|
88 |
+
switch ($role['role_type']) {
|
89 |
+
case Mage_Api_Model_Acl::ROLE_TYPE_GROUP:
|
90 |
+
$roleId = $role['role_type'].$role['role_id'];
|
91 |
+
$acl->addRole(Mage::getModel('api/acl_role_group', $roleId), $parent);
|
92 |
+
break;
|
93 |
+
|
94 |
+
case Mage_Api_Model_Acl::ROLE_TYPE_USER:
|
95 |
+
$roleId = $role['role_type'].$role['user_id'];
|
96 |
+
if (!$acl->hasRole($roleId)) {
|
97 |
+
$acl->addRole(Mage::getModel('api/acl_role_user', $roleId), $parent);
|
98 |
+
} else {
|
99 |
+
$acl->addRoleParent($roleId, $parent);
|
100 |
+
}
|
101 |
+
break;
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Load rules
|
110 |
+
*
|
111 |
+
* @param Mage_Api_Model_Acl $acl
|
112 |
+
* @param array $rulesArr
|
113 |
+
* @return Mage_Api_Model_Resource_Acl
|
114 |
+
*/
|
115 |
+
public function loadRules(Mage_Api_Model_Acl $acl, array $rulesArr)
|
116 |
+
{
|
117 |
+
foreach ($rulesArr as $rule) {
|
118 |
+
$role = $rule['role_type'].$rule['role_id'];
|
119 |
+
$resource = $rule['resource_id'];
|
120 |
+
$privileges = !empty($rule['api_privileges']) ? explode(',', $rule['api_privileges']) : null;
|
121 |
+
|
122 |
+
$assert = null;
|
123 |
+
if (0!=$rule['assert_id']) {
|
124 |
+
$assertClass = Mage::getSingleton('api/config')->getAclAssert($rule['assert_type'])->getClassName();
|
125 |
+
$assert = new $assertClass(unserialize($rule['assert_data']));
|
126 |
+
}
|
127 |
+
try {
|
128 |
+
if ($rule['api_permission'] == 'allow') {
|
129 |
+
$acl->allow($role, $resource, $privileges, $assert);
|
130 |
+
} else if ($rule['api_permission'] == 'deny') {
|
131 |
+
$acl->deny($role, $resource, $privileges, $assert);
|
132 |
+
}
|
133 |
+
} catch (Exception $e) {
|
134 |
+
//$m = $e->getMessage();
|
135 |
+
//if ( eregi("^Resource '(.*)' not found", $m) ) {
|
136 |
+
// Deleting non existent resource rule from rules table
|
137 |
+
//$cond = $this->_write->quoteInto('resource_id = ?', $resource);
|
138 |
+
//$this->_write->delete(Mage::getSingleton('core/resource')->getTableName('admin/rule'), $cond);
|
139 |
+
//} else {
|
140 |
+
//TODO: We need to log such exceptions to somewhere like a system/errors.log
|
141 |
+
//}
|
142 |
+
}
|
143 |
+
/*
|
144 |
+
switch ($rule['api_permission']) {
|
145 |
+
case Mage_Api_Model_Acl::RULE_PERM_ALLOW:
|
146 |
+
$acl->allow($role, $resource, $privileges, $assert);
|
147 |
+
break;
|
148 |
+
|
149 |
+
case Mage_Api_Model_Acl::RULE_PERM_DENY:
|
150 |
+
$acl->deny($role, $resource, $privileges, $assert);
|
151 |
+
break;
|
152 |
+
}
|
153 |
+
*/
|
154 |
+
}
|
155 |
+
return $this;
|
156 |
+
}
|
157 |
+
}
|
app/code/core/Mage/Api/Model/Resource/Acl/Role.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 role resource
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Resource_Acl_Role extends Mage_Core_Model_Resource_Db_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Resource initialization
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('api/role', 'role_id');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Action before save
|
48 |
+
*
|
49 |
+
* @param Mage_Core_Model_Abstract $object
|
50 |
+
* @return Mage_Api_Model_Resource_Acl_Role
|
51 |
+
*/
|
52 |
+
protected function _beforeSave(Mage_Core_Model_Abstract $object)
|
53 |
+
{
|
54 |
+
if (!$object->getId()) {
|
55 |
+
$this->setCreated(Mage::getSingleton('core/date')->gmtDate());
|
56 |
+
}
|
57 |
+
return $this;
|
58 |
+
}
|
59 |
+
}
|
app/code/core/Mage/Api/Model/Resource/Acl/Role/Collection.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 Role Resource Collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Resource_Acl_Role_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Resource collection initialization
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('api/role');
|
44 |
+
}
|
45 |
+
}
|
app/code/core/Mage/Api/Model/Resource/Permissions/Collection.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Permissions Resource Collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Resource_Permissions_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Resource collection initialization
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('api/rules');
|
44 |
+
}
|
45 |
+
}
|
app/code/core/Mage/Api/Model/Resource/Role.php
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 role resource
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Resource_Role extends Mage_Core_Model_Resource_Db_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Resource initialization
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('api/role', 'role_id');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Action before save
|
48 |
+
*
|
49 |
+
* @param Mage_Core_Model_Abstract $object
|
50 |
+
* @return Mage_Api_Model_Resource_Role
|
51 |
+
*/
|
52 |
+
protected function _beforeSave(Mage_Core_Model_Abstract $object)
|
53 |
+
{
|
54 |
+
if (!$object->getId()) {
|
55 |
+
$object->setCreated(now());
|
56 |
+
}
|
57 |
+
$object->setModified(now());
|
58 |
+
return $this;
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Load an object
|
63 |
+
*
|
64 |
+
* @param Mage_Core_Model_Abstract $object
|
65 |
+
* @param mixed $value
|
66 |
+
* @param string $field field to load by (defaults to model id)
|
67 |
+
* @return Mage_Core_Model_Resource_Db_Abstract
|
68 |
+
*/
|
69 |
+
public function load(Mage_Core_Model_Abstract $object, $value, $field = null)
|
70 |
+
{
|
71 |
+
if (!intval($value) && is_string($value)) {
|
72 |
+
$field = 'role_id';
|
73 |
+
}
|
74 |
+
return parent::load($object, $value, $field);
|
75 |
+
}
|
76 |
+
}
|
app/code/core/Mage/Api/Model/Resource/Role/Collection.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Api Role Resource Collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Resource_Role_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Resource collection initialization
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('api/role');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Aet user filter
|
48 |
+
*
|
49 |
+
* @param int $userId
|
50 |
+
* @return Mage_Api_Model_Resource_Role_Collection
|
51 |
+
*/
|
52 |
+
public function setUserFilter($userId)
|
53 |
+
{
|
54 |
+
$this->addFieldToFilter('user_id', $userId);
|
55 |
+
$this->addFieldToFilter('role_type', Mage_Api_Model_Acl::ROLE_TYPE_GROUP);
|
56 |
+
return $this;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Set roles filter
|
61 |
+
*
|
62 |
+
* @return Mage_Api_Model_Resource_Role_Collection
|
63 |
+
*/
|
64 |
+
public function setRolesFilter()
|
65 |
+
{
|
66 |
+
$this->addFieldToFilter('role_type', Mage_Api_Model_Acl::ROLE_TYPE_GROUP);
|
67 |
+
return $this;
|
68 |
+
}
|
69 |
+
}
|
app/code/core/Mage/Api/Model/Resource/Roles.php
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 roles resource
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Resource_Roles extends Mage_Core_Model_Resource_Db_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* User table name
|
39 |
+
*
|
40 |
+
* @var unknown
|
41 |
+
*/
|
42 |
+
protected $_usersTable;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Rule table name
|
46 |
+
*
|
47 |
+
* @var unknown
|
48 |
+
*/
|
49 |
+
protected $_ruleTable;
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Resource initialization
|
53 |
+
*
|
54 |
+
*/
|
55 |
+
protected function _construct()
|
56 |
+
{
|
57 |
+
$this->_init('api/role', 'role_id');
|
58 |
+
|
59 |
+
$this->_usersTable = $this->getTable('api/user');
|
60 |
+
$this->_ruleTable = $this->getTable('api/rule');
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Action before save
|
65 |
+
*
|
66 |
+
* @param Mage_Core_Model_Abstract $role
|
67 |
+
* @return Mage_Api_Model_Resource_Roles
|
68 |
+
*/
|
69 |
+
protected function _beforeSave(Mage_Core_Model_Abstract $role)
|
70 |
+
{
|
71 |
+
if ($role->getId() == '') {
|
72 |
+
if ($role->getIdFieldName()) {
|
73 |
+
$role->unsetData($role->getIdFieldName());
|
74 |
+
} else {
|
75 |
+
$role->unsetData('id');
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
if ($role->getPid() > 0) {
|
80 |
+
$row = $this->load($role->getPid());
|
81 |
+
} else {
|
82 |
+
$row = array('tree_level' => 0);
|
83 |
+
}
|
84 |
+
$role->setTreeLevel($row['tree_level'] + 1);
|
85 |
+
$role->setRoleName($role->getName());
|
86 |
+
return $this;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Action after save
|
91 |
+
*
|
92 |
+
* @param Mage_Core_Model_Abstract $role
|
93 |
+
* @return Mage_Api_Model_Resource_Roles
|
94 |
+
*/
|
95 |
+
protected function _afterSave(Mage_Core_Model_Abstract $role)
|
96 |
+
{
|
97 |
+
$this->_updateRoleUsersAcl($role);
|
98 |
+
Mage::app()->getCache()->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG);
|
99 |
+
return $this;
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Action after delete
|
104 |
+
*
|
105 |
+
* @param Mage_Core_Model_Abstract $role
|
106 |
+
* @return Mage_Api_Model_Resource_Roles
|
107 |
+
*/
|
108 |
+
protected function _afterDelete(Mage_Core_Model_Abstract $role)
|
109 |
+
{
|
110 |
+
$adapter = $this->_getWriteAdapter();
|
111 |
+
$adapter->delete($this->getMainTable(), array('parent_id=?'=>$role->getId()));
|
112 |
+
$adapter->delete($this->_ruleTable, array('role_id=?'=>$role->getId()));
|
113 |
+
return $this;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Get role users
|
118 |
+
*
|
119 |
+
* @param Mage_Api_Model_Roles $role
|
120 |
+
* @return unknown
|
121 |
+
*/
|
122 |
+
public function getRoleUsers(Mage_Api_Model_Roles $role)
|
123 |
+
{
|
124 |
+
$adapter = $this->_getReadAdapter();
|
125 |
+
$select = $adapter->select()
|
126 |
+
->from($this->getMainTable(), array('user_id'))
|
127 |
+
->where('parent_id = ?', $role->getId())
|
128 |
+
->where('role_type = ?', Mage_Api_Model_Acl::ROLE_TYPE_USER)
|
129 |
+
->where('user_id > 0');
|
130 |
+
return $adapter->fetchCol($select);
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Update role users
|
135 |
+
*
|
136 |
+
* @param Mage_Api_Model_Roles $role
|
137 |
+
* @return boolean
|
138 |
+
*/
|
139 |
+
private function _updateRoleUsersAcl(Mage_Api_Model_Roles $role)
|
140 |
+
{
|
141 |
+
$users = $this->getRoleUsers($role);
|
142 |
+
$rowsCount = 0;
|
143 |
+
if (sizeof($users) > 0) {
|
144 |
+
$rowsCount = $this->_getWriteAdapter()->update(
|
145 |
+
$this->_usersTable,
|
146 |
+
array('reload_acl_flag' => 1),
|
147 |
+
array('user_id IN(?)' => $users));
|
148 |
+
}
|
149 |
+
return ($rowsCount > 0) ? true : false;
|
150 |
+
}
|
151 |
+
}
|
app/code/core/Mage/Api/Model/Resource/Roles/Collection.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Api Roles Resource Collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Resource_Roles_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Resource collection initialization
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('api/role');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Init collection select
|
48 |
+
*
|
49 |
+
* @return Mage_Api_Model_Resource_Roles_Collection
|
50 |
+
*/
|
51 |
+
protected function _initSelect()
|
52 |
+
{
|
53 |
+
parent::_initSelect();
|
54 |
+
$this->getSelect()->where('main_table.role_type = ?', Mage_Api_Model_Acl::ROLE_TYPE_GROUP);
|
55 |
+
return $this;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Convert items array to array for select options
|
60 |
+
*
|
61 |
+
* @return array
|
62 |
+
*/
|
63 |
+
public function toOptionArray()
|
64 |
+
{
|
65 |
+
return $this->_toOptionArray('role_id', 'role_name');
|
66 |
+
}
|
67 |
+
}
|
app/code/core/Mage/Api/Model/Resource/Roles/User/Collection.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Roles User Resource Collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Resource_Roles_User_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Resource collection initialization
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('api/user');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Init collection select
|
48 |
+
*
|
49 |
+
* @return Mage_Api_Model_Resource_Roles_User_Collection
|
50 |
+
*/
|
51 |
+
protected function _initSelect()
|
52 |
+
{
|
53 |
+
parent::_initSelect();
|
54 |
+
|
55 |
+
$this->getSelect()->where("user_id > 0");
|
56 |
+
|
57 |
+
return $this;
|
58 |
+
}
|
59 |
+
}
|
app/code/core/Mage/Api/Model/Resource/Rules.php
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Rules resource model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Resource_Rules extends Mage_Core_Model_Resource_Db_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Resource initialization
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('api/rule', 'rule_id');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Save rule
|
48 |
+
*
|
49 |
+
* @param Mage_Api_Model_Rules $rule
|
50 |
+
*/
|
51 |
+
public function saveRel(Mage_Api_Model_Rules $rule)
|
52 |
+
{
|
53 |
+
$adapter = $this->_getWriteAdapter();
|
54 |
+
$adapter->beginTransaction();
|
55 |
+
|
56 |
+
try {
|
57 |
+
$roleId = $rule->getRoleId();
|
58 |
+
$adapter->delete($this->getMainTable(), array('role_id = ?' => $roleId));
|
59 |
+
$masterResources = Mage::getModel('api/roles')->getResourcesList2D();
|
60 |
+
$masterAdmin = false;
|
61 |
+
if ($postedResources = $rule->getResources()) {
|
62 |
+
foreach ($masterResources as $index => $resName) {
|
63 |
+
if (!$masterAdmin) {
|
64 |
+
$permission = (in_array($resName, $postedResources))? 'allow' : 'deny';
|
65 |
+
$adapter->insert($this->getMainTable(), array(
|
66 |
+
'role_type' => 'G',
|
67 |
+
'resource_id' => trim($resName, '/'),
|
68 |
+
'api_privileges' => null,
|
69 |
+
'assert_id' => 0,
|
70 |
+
'role_id' => $roleId,
|
71 |
+
'api_permission' => $permission
|
72 |
+
));
|
73 |
+
}
|
74 |
+
if ($resName == 'all' && $permission == 'allow') {
|
75 |
+
$masterAdmin = true;
|
76 |
+
}
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
$adapter->commit();
|
81 |
+
} catch (Mage_Core_Exception $e) {
|
82 |
+
throw $e;
|
83 |
+
} catch (Exception $e) {
|
84 |
+
$adapter->rollBack();
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
app/code/core/Mage/Api/Model/Resource/Rules/Collection.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Api Rules Resource Collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Resource_Rules_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Resource collection initialization
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('api/rules');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Retrieve rules by role
|
48 |
+
*
|
49 |
+
* @param int $id
|
50 |
+
* @return Mage_Api_Model_Resource_Rules_Collection
|
51 |
+
*/
|
52 |
+
public function getByRoles($id)
|
53 |
+
{
|
54 |
+
$this->getSelect()->where("role_id = ?", (int)$id);
|
55 |
+
return $this;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Add sort by length
|
60 |
+
*
|
61 |
+
* @return Mage_Api_Model_Resource_Rules_Collection
|
62 |
+
*/
|
63 |
+
public function addSortByLength()
|
64 |
+
{
|
65 |
+
$this->getSelect()->columns(array('length' => $this->getConnection()->getLengthSql('resource_id')))
|
66 |
+
->order('length DESC');
|
67 |
+
return $this;
|
68 |
+
}
|
69 |
+
}
|
app/code/core/Mage/Api/Model/Resource/User.php
ADDED
@@ -0,0 +1,435 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Resource_User extends Mage_Core_Model_Resource_Db_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Resource initialization
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('api/user', 'user_id');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Initialize unique fields
|
48 |
+
*
|
49 |
+
* @return Mage_Api_Model_Resource_User
|
50 |
+
*/
|
51 |
+
protected function _initUniqueFields()
|
52 |
+
{
|
53 |
+
$this->_uniqueFields = array(
|
54 |
+
array(
|
55 |
+
'field' => 'email',
|
56 |
+
'title' => Mage::helper('api')->__('Email')
|
57 |
+
),
|
58 |
+
array(
|
59 |
+
'field' => 'username',
|
60 |
+
'title' => Mage::helper('api')->__('User Name')
|
61 |
+
),
|
62 |
+
);
|
63 |
+
return $this;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Authenticate user by $username and $password
|
68 |
+
*
|
69 |
+
* @param Mage_Api_Model_User $user
|
70 |
+
* @return Mage_Api_Model_Resource_User
|
71 |
+
*/
|
72 |
+
public function recordLogin(Mage_Api_Model_User $user)
|
73 |
+
{
|
74 |
+
$data = array(
|
75 |
+
'lognum' => $user->getLognum()+1,
|
76 |
+
);
|
77 |
+
$condition = $this->_getReadAdapter()->quoteInto('user_id=?', $user->getUserId());
|
78 |
+
$this->_getWriteAdapter()->update($this->getTable('api/user'), $data, $condition);
|
79 |
+
return $this;
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Record api user session
|
84 |
+
*
|
85 |
+
* @param Mage_Api_Model_User $user
|
86 |
+
* @return Mage_Api_Model_Resource_User
|
87 |
+
*/
|
88 |
+
public function recordSession(Mage_Api_Model_User $user)
|
89 |
+
{
|
90 |
+
$readAdapter = $this->_getReadAdapter();
|
91 |
+
$writeAdapter = $this->_getWriteAdapter();
|
92 |
+
$select = $readAdapter->select()
|
93 |
+
->from($this->getTable('api/session'), 'user_id')
|
94 |
+
->where('user_id = ?', $user->getId())
|
95 |
+
->where('sessid = ?', $user->getSessid());
|
96 |
+
$loginDate = now();
|
97 |
+
if ($readAdapter->fetchRow($select)) {
|
98 |
+
$writeAdapter->update(
|
99 |
+
$this->getTable('api/session'),
|
100 |
+
array ('logdate' => $loginDate),
|
101 |
+
$readAdapter->quoteInto('user_id = ?', $user->getId()) . ' AND '
|
102 |
+
. $readAdapter->quoteInto('sessid = ?', $user->getSessid())
|
103 |
+
);
|
104 |
+
} else {
|
105 |
+
$writeAdapter->insert(
|
106 |
+
$this->getTable('api/session'),
|
107 |
+
array(
|
108 |
+
'user_id' => $user->getId(),
|
109 |
+
'logdate' => $loginDate,
|
110 |
+
'sessid' => $user->getSessid()
|
111 |
+
)
|
112 |
+
);
|
113 |
+
}
|
114 |
+
$user->setLogdate($loginDate);
|
115 |
+
return $this;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Clean old session
|
120 |
+
*
|
121 |
+
* @param Mage_Api_Model_User $user
|
122 |
+
* @return Mage_Api_Model_Resource_User
|
123 |
+
*/
|
124 |
+
public function cleanOldSessions(Mage_Api_Model_User $user)
|
125 |
+
{
|
126 |
+
$readAdapter = $this->_getReadAdapter();
|
127 |
+
$writeAdapter = $this->_getWriteAdapter();
|
128 |
+
$timeout = Mage::getStoreConfig('api/config/session_timeout');
|
129 |
+
$timeSubtract = $readAdapter->getDateAddSql(
|
130 |
+
'logdate',
|
131 |
+
$timeout,
|
132 |
+
Varien_Db_Adapter_Interface::INTERVAL_SECOND);
|
133 |
+
$writeAdapter->delete(
|
134 |
+
$this->getTable('api/session'),
|
135 |
+
array('user_id = ?' => $user->getId(), $readAdapter->quote(now()) . ' > '.$timeSubtract)
|
136 |
+
);
|
137 |
+
return $this;
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Load data by username
|
142 |
+
*
|
143 |
+
* @param string $username
|
144 |
+
* @return array
|
145 |
+
*/
|
146 |
+
public function loadByUsername($username)
|
147 |
+
{
|
148 |
+
$adapter = $this->_getReadAdapter();
|
149 |
+
$select = $adapter->select()->from($this->getTable('api/user'))
|
150 |
+
->where('username=:username');
|
151 |
+
return $adapter->fetchRow($select, array('username'=>$username));
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* load by session id
|
156 |
+
*
|
157 |
+
* @param string $sessId
|
158 |
+
* @return array
|
159 |
+
*/
|
160 |
+
public function loadBySessId($sessId)
|
161 |
+
{
|
162 |
+
$result = array();
|
163 |
+
$adapter = $this->_getReadAdapter();
|
164 |
+
$select = $adapter->select()
|
165 |
+
->from($this->getTable('api/session'))
|
166 |
+
->where('sessid = ?', $sessId);
|
167 |
+
if ($apiSession = $adapter->fetchRow($select)) {
|
168 |
+
$selectUser = $adapter->select()
|
169 |
+
->from($this->getTable('api/user'))
|
170 |
+
->where('user_id = ?', $apiSession['user_id']);
|
171 |
+
if ($user = $adapter->fetchRow($selectUser)) {
|
172 |
+
$result = array_merge($user, $apiSession);
|
173 |
+
}
|
174 |
+
}
|
175 |
+
return $result;
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Clear by session
|
180 |
+
*
|
181 |
+
* @param string $sessid
|
182 |
+
* @return Mage_Api_Model_Resource_User
|
183 |
+
*/
|
184 |
+
public function clearBySessId($sessid)
|
185 |
+
{
|
186 |
+
$this->_getWriteAdapter()->delete(
|
187 |
+
$this->getTable('api/session'),
|
188 |
+
array('sessid = ?' => $sessid)
|
189 |
+
);
|
190 |
+
return $this;
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Retrieve api user role data if it was assigned to role
|
195 |
+
*
|
196 |
+
* @param int | Mage_Api_Model_User $user
|
197 |
+
* @return null | array
|
198 |
+
*/
|
199 |
+
public function hasAssigned2Role($user)
|
200 |
+
{
|
201 |
+
$userId = null;
|
202 |
+
$result = null;
|
203 |
+
if (is_numeric($user)) {
|
204 |
+
$userId = $user;
|
205 |
+
} else if ($user instanceof Mage_Core_Model_Abstract) {
|
206 |
+
$userId = $user->getUserId();
|
207 |
+
}
|
208 |
+
|
209 |
+
if ($userId) {
|
210 |
+
$adapter = $this->_getReadAdapter();
|
211 |
+
$select = $adapter->select();
|
212 |
+
$select->from($this->getTable('api/role'))
|
213 |
+
->where('parent_id > 0 AND user_id = ?', $userId);
|
214 |
+
$result = $adapter->fetchAll($select);
|
215 |
+
}
|
216 |
+
return $result;
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Action before save
|
221 |
+
*
|
222 |
+
* @param Mage_Core_Model_Abstract $user
|
223 |
+
* @return Mage_Api_Model_Resource_User
|
224 |
+
*/
|
225 |
+
protected function _beforeSave(Mage_Core_Model_Abstract $user)
|
226 |
+
{
|
227 |
+
if (!$user->getId()) {
|
228 |
+
$user->setCreated(now());
|
229 |
+
}
|
230 |
+
$user->setModified(now());
|
231 |
+
return $this;
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Delete the object
|
236 |
+
*
|
237 |
+
* @param Mage_Core_Model_Abstract $user
|
238 |
+
* @return boolean
|
239 |
+
*/
|
240 |
+
public function delete(Mage_Core_Model_Abstract $user)
|
241 |
+
{
|
242 |
+
$dbh = $this->_getWriteAdapter();
|
243 |
+
$uid = (int) $user->getId();
|
244 |
+
$dbh->beginTransaction();
|
245 |
+
try {
|
246 |
+
$dbh->delete($this->getTable('api/user'), array('user_id = ?' => $uid));
|
247 |
+
$dbh->delete($this->getTable('api/role'), array('user_id = ?' => $uid));
|
248 |
+
} catch (Mage_Core_Exception $e) {
|
249 |
+
throw $e;
|
250 |
+
return false;
|
251 |
+
} catch (Exception $e) {
|
252 |
+
$dbh->rollBack();
|
253 |
+
return false;
|
254 |
+
}
|
255 |
+
$dbh->commit();
|
256 |
+
return true;
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* Save user roles
|
261 |
+
*
|
262 |
+
* @param Mage_Core_Model_Abstract $user
|
263 |
+
* @return unknown
|
264 |
+
*/
|
265 |
+
public function _saveRelations(Mage_Core_Model_Abstract $user)
|
266 |
+
{
|
267 |
+
$rolesIds = $user->getRoleIds();
|
268 |
+
if (!is_array($rolesIds) || count($rolesIds) == 0) {
|
269 |
+
return $user;
|
270 |
+
}
|
271 |
+
|
272 |
+
$adapter = $this->_getWriteAdapter();
|
273 |
+
|
274 |
+
$adapter->beginTransaction();
|
275 |
+
|
276 |
+
try {
|
277 |
+
$adapter->delete(
|
278 |
+
$this->getTable('api/role'),
|
279 |
+
array('user_id = ?' => (int) $user->getId()));
|
280 |
+
foreach ($rolesIds as $rid) {
|
281 |
+
$rid = intval($rid);
|
282 |
+
if ($rid > 0) {
|
283 |
+
//$row = $this->load($user, $rid);
|
284 |
+
} else {
|
285 |
+
$row = array('tree_level' => 0);
|
286 |
+
}
|
287 |
+
$row = array('tree_level' => 0);
|
288 |
+
|
289 |
+
$data = array(
|
290 |
+
'parent_id' => $rid,
|
291 |
+
'tree_level' => $row['tree_level'] + 1,
|
292 |
+
'sort_order' => 0,
|
293 |
+
'role_type' => Mage_Api_Model_Acl::ROLE_TYPE_USER,
|
294 |
+
'user_id' => $user->getId(),
|
295 |
+
'role_name' => $user->getFirstname()
|
296 |
+
);
|
297 |
+
$adapter->insert($this->getTable('api/role'), $data);
|
298 |
+
}
|
299 |
+
$adapter->commit();
|
300 |
+
} catch (Mage_Core_Exception $e) {
|
301 |
+
throw $e;
|
302 |
+
} catch (Exception $e) {
|
303 |
+
$adapter->rollBack();
|
304 |
+
}
|
305 |
+
return $this;
|
306 |
+
}
|
307 |
+
|
308 |
+
/**
|
309 |
+
* Retrieve roles data
|
310 |
+
*
|
311 |
+
* @param Mage_Core_Model_Abstract $user
|
312 |
+
* @return array
|
313 |
+
*/
|
314 |
+
public function _getRoles(Mage_Core_Model_Abstract $user)
|
315 |
+
{
|
316 |
+
if (!$user->getId()) {
|
317 |
+
return array();
|
318 |
+
}
|
319 |
+
$table = $this->getTable('api/role');
|
320 |
+
$adapter = $this->_getReadAdapter();
|
321 |
+
$select = $adapter->select()
|
322 |
+
->from($table, array())
|
323 |
+
->joinLeft(
|
324 |
+
array('ar' => $table),
|
325 |
+
$adapter->quoteInto(
|
326 |
+
"ar.role_id = {$table}.parent_id AND ar.role_type = ?",
|
327 |
+
Mage_Api_Model_Acl::ROLE_TYPE_GROUP),
|
328 |
+
array('role_id'))
|
329 |
+
->where("{$table}.user_id = ?", $user->getId());
|
330 |
+
|
331 |
+
return (($roles = $adapter->fetchCol($select)) ? $roles : array());
|
332 |
+
}
|
333 |
+
|
334 |
+
/**
|
335 |
+
* Add Role
|
336 |
+
*
|
337 |
+
* @param Mage_Core_Model_Abstract $user
|
338 |
+
* @return Mage_Api_Model_Resource_User
|
339 |
+
*/
|
340 |
+
public function add(Mage_Core_Model_Abstract $user)
|
341 |
+
{
|
342 |
+
$adapter = $this->_getWriteAdapter();
|
343 |
+
$aRoles = $this->hasAssigned2Role($user);
|
344 |
+
if (sizeof($aRoles) > 0) {
|
345 |
+
foreach ($aRoles as $idx => $data) {
|
346 |
+
$adapter->delete(
|
347 |
+
$this->getTable('api/role'),
|
348 |
+
array('role_id = ?' => $data['role_id'])
|
349 |
+
);
|
350 |
+
}
|
351 |
+
}
|
352 |
+
|
353 |
+
if ($user->getId() > 0) {
|
354 |
+
$role = Mage::getModel('api/role')->load($user->getRoleId());
|
355 |
+
} else {
|
356 |
+
$role = new Varien_Object(array('tree_level' => 0));
|
357 |
+
}
|
358 |
+
$adapter->insert($this->getTable('api/role'), array(
|
359 |
+
'parent_id' => $user->getRoleId(),
|
360 |
+
'tree_level'=> ($role->getTreeLevel() + 1),
|
361 |
+
'sort_order'=> 0,
|
362 |
+
'role_type' => Mage_Api_Model_Acl::ROLE_TYPE_USER,
|
363 |
+
'user_id' => $user->getUserId(),
|
364 |
+
'role_name' => $user->getFirstname()
|
365 |
+
));
|
366 |
+
|
367 |
+
return $this;
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Delete from role
|
372 |
+
*
|
373 |
+
* @param Mage_Core_Model_Abstract $user
|
374 |
+
* @return Mage_Api_Model_Resource_User
|
375 |
+
*/
|
376 |
+
public function deleteFromRole(Mage_Core_Model_Abstract $user)
|
377 |
+
{
|
378 |
+
if ($user->getUserId() <= 0) {
|
379 |
+
return $this;
|
380 |
+
}
|
381 |
+
if ($user->getRoleId() <= 0) {
|
382 |
+
return $this;
|
383 |
+
};
|
384 |
+
|
385 |
+
$adapter = $this->_getWriteAdapter();
|
386 |
+
$table = $this->getTable('api/role');
|
387 |
+
|
388 |
+
$condition = array(
|
389 |
+
"{$table}.user_id = ?" => $user->getUserId(),
|
390 |
+
"{$table}.parent_id = ?"=> $user->getRoleId()
|
391 |
+
);
|
392 |
+
$adapter->delete($table, $condition);
|
393 |
+
return $this;
|
394 |
+
}
|
395 |
+
|
396 |
+
/**
|
397 |
+
* Retrieve roles which exists for user
|
398 |
+
*
|
399 |
+
* @param Mage_Core_Model_Abstract $user
|
400 |
+
* @return array
|
401 |
+
*/
|
402 |
+
public function roleUserExists(Mage_Core_Model_Abstract $user)
|
403 |
+
{
|
404 |
+
$result = array();
|
405 |
+
if ($user->getUserId() > 0) {
|
406 |
+
$adapter = $this->_getReadAdapter();
|
407 |
+
$select = $adapter->select()->from($this->getTable('api/role'))
|
408 |
+
->where('parent_id = ?', $user->getRoleId())
|
409 |
+
->where('user_id = ?', $user->getUserId());
|
410 |
+
$result = $adapter->fetchCol($select);
|
411 |
+
}
|
412 |
+
return $result;
|
413 |
+
}
|
414 |
+
|
415 |
+
/**
|
416 |
+
* Check if user not unique
|
417 |
+
*
|
418 |
+
* @param Mage_Core_Model_Abstract $user
|
419 |
+
* @return array
|
420 |
+
*/
|
421 |
+
public function userExists(Mage_Core_Model_Abstract $user)
|
422 |
+
{
|
423 |
+
$usersTable = $this->getTable('api/user');
|
424 |
+
$adapter = $this->_getReadAdapter();
|
425 |
+
$condition = array(
|
426 |
+
$adapter->quoteInto("{$usersTable}.username = ?", $user->getUsername()),
|
427 |
+
$adapter->quoteInto("{$usersTable}.email = ?", $user->getEmail()),
|
428 |
+
);
|
429 |
+
$select = $adapter->select()
|
430 |
+
->from($usersTable)
|
431 |
+
->where(implode(' OR ', $condition))
|
432 |
+
->where($usersTable.'.user_id != ?', (int) $user->getId());
|
433 |
+
return $adapter->fetchRow($select);
|
434 |
+
}
|
435 |
+
}
|
app/code/core/Mage/Api/Model/Resource/User/Collection.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Api User Resource Collection
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Api
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Mage_Api_Model_Resource_User_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Resource collection initialization
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
$this->_init('api/user');
|
44 |
+
}
|
45 |
+
}
|
app/code/core/Mage/Api/Model/Role.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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_Role _getResource()
|
31 |
+
* @method Mage_Api_Model_Resource_Role getResource()
|
32 |
+
* @method int getParentId()
|
33 |
+
* @method Mage_Api_Model_Role setParentId(int $value)
|
34 |
+
* @method int getTreeLevel()
|
35 |
+
* @method Mage_Api_Model_Role setTreeLevel(int $value)
|
36 |
+
* @method int getSortOrder()
|
37 |
+
* @method Mage_Api_Model_Role setSortOrder(int $value)
|
38 |
+
* @method string getRoleType()
|
39 |
+
* @method Mage_Api_Model_Role setRoleType(string $value)
|
40 |
+
* @method int getUserId()
|
41 |
+
* @method Mage_Api_Model_Role setUserId(int $value)
|
42 |
+
* @method string getRoleName()
|
43 |
+
* @method Mage_Api_Model_Role setRoleName(string $value)
|
44 |
+
*
|
45 |
+
* @category Mage
|
46 |
+
* @package Mage_Api
|
47 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
48 |
+
*/
|
49 |
+
class Mage_Api_Model_Role extends Mage_Core_Model_Abstract
|
50 |
+
{
|
51 |
+
protected function _construct()
|
52 |
+
{
|
53 |
+
$this->_init('api/role');
|
54 |
+
}
|
55 |
+
}
|
app/code/core/Mage/Api/Model/Roles.php
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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_Roles _getResource()
|
31 |
+
* @method Mage_Api_Model_Resource_Roles getResource()
|
32 |
+
* @method int getParentId()
|
33 |
+
* @method Mage_Api_Model_Roles setParentId(int $value)
|
34 |
+
* @method int getTreeLevel()
|
35 |
+
* @method Mage_Api_Model_Roles setTreeLevel(int $value)
|
36 |
+
* @method int getSortOrder()
|
37 |
+
* @method Mage_Api_Model_Roles setSortOrder(int $value)
|
38 |
+
* @method string getRoleType()
|
39 |
+
* @method Mage_Api_Model_Roles setRoleType(string $value)
|
40 |
+
* @method int getUserId()
|
41 |
+
* @method Mage_Api_Model_Roles setUserId(int $value)
|
42 |
+
* @method string getRoleName()
|
43 |
+
* @method Mage_Api_Model_Roles setRoleName(string $value)
|
44 |
+
*
|
45 |
+
* @category Mage
|
46 |
+
* @package Mage_Api
|
47 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
48 |
+
*/
|
49 |
+
class Mage_Api_Model_Roles extends Mage_Core_Model_Abstract
|
50 |
+
{
|
51 |
+
protected function _construct()
|
52 |
+
{
|
53 |
+
$this->_init('api/roles');
|
54 |
+
}
|
55 |
+
|
56 |
+
public function update()
|
57 |
+
{
|
58 |
+
$this->getResource()->update($this);
|
59 |
+
return $this;
|
60 |
+
}
|
61 |
+
|
62 |
+
public function getUsersCollection()
|
63 |
+
{
|
64 |
+
return Mage::getResourceModel('api/roles_user_collection');
|
65 |
+
}
|
66 |
+
|
67 |
+
public function getResourcesTree()
|
68 |
+
{
|
69 |
+
return $this->_buildResourcesArray(null, null, null, null, true);
|
70 |
+
}
|
71 |
+
|
72 |
+
public function getResourcesList()
|
73 |
+
{
|
74 |
+
return $this->_buildResourcesArray();
|
75 |
+
}
|
76 |
+
|
77 |
+
public function getResourcesList2D()
|
78 |
+
{
|
79 |
+
return $this->_buildResourcesArray(null, null, null, true);
|
80 |
+
}
|
81 |
+
|
82 |
+
public function getRoleUsers()
|
83 |
+
{
|
84 |
+
return $this->getResource()->getRoleUsers($this);
|
85 |
+
}
|
86 |
+
|
87 |
+
protected function _buildResourcesArray(Varien_Simplexml_Element $resource=null, $parentName=null, $level=0, $represent2Darray=null, $rawNodes = false, $module = 'adminhtml')
|
88 |
+
{
|
89 |
+
static $result;
|
90 |
+
|
91 |
+
if (is_null($resource)) {
|
92 |
+
$resource = Mage::getSingleton('api/config')->getNode('acl/resources');
|
93 |
+
$resourceName = null;
|
94 |
+
$level = -1;
|
95 |
+
} else {
|
96 |
+
$resourceName = $parentName;
|
97 |
+
if ($resource->getName()!='title' && $resource->getName()!='sort_order' && $resource->getName() != 'children') {
|
98 |
+
$resourceName = (is_null($parentName) ? '' : $parentName.'/').$resource->getName();
|
99 |
+
|
100 |
+
//assigning module for its' children nodes
|
101 |
+
if ($resource->getAttribute('module')) {
|
102 |
+
$module = (string)$resource->getAttribute('module');
|
103 |
+
}
|
104 |
+
|
105 |
+
if ($rawNodes) {
|
106 |
+
$resource->addAttribute("aclpath", $resourceName);
|
107 |
+
}
|
108 |
+
|
109 |
+
$resource->title = Mage::helper($module)->__((string)$resource->title);
|
110 |
+
|
111 |
+
if ( is_null($represent2Darray) ) {
|
112 |
+
$result[$resourceName]['name'] = (string)$resource->title;
|
113 |
+
$result[$resourceName]['level'] = $level;
|
114 |
+
} else {
|
115 |
+
$result[] = $resourceName;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
$children = $resource->children();
|
121 |
+
if (empty($children)) {
|
122 |
+
if ($rawNodes) {
|
123 |
+
return $resource;
|
124 |
+
} else {
|
125 |
+
return $result;
|
126 |
+
}
|
127 |
+
}
|
128 |
+
foreach ($children as $child) {
|
129 |
+
$this->_buildResourcesArray($child, $resourceName, $level+1, $represent2Darray, $rawNodes, $module);
|
130 |
+
}
|
131 |
+
if ($rawNodes) {
|
132 |
+
return $resource;
|
133 |
+
} else {
|
134 |
+
return $result;
|
135 |
+
}
|
136 |
+
}
|
137 |
+
|
138 |
+
}
|
app/code/core/Mage/Api/Model/Rules.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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_Rules _getResource()
|
31 |
+
* @method Mage_Api_Model_Resource_Rules getResource()
|
32 |
+
* @method int getRoleId()
|
33 |
+
* @method Mage_Api_Model_Rules setRoleId(int $value)
|
34 |
+
* @method string getResourceId()
|
35 |
+
* @method Mage_Api_Model_Rules setResourceId(string $value)
|
36 |
+
* @method string getPrivileges()
|
37 |
+
* @method Mage_Api_Model_Rules setPrivileges(string $value)
|
38 |
+
* @method int getAssertId()
|
39 |
+
* @method Mage_Api_Model_Rules setAssertId(int $value)
|
40 |
+
* @method string getRoleType()
|
41 |
+
* @method Mage_Api_Model_Rules setRoleType(string $value)
|
42 |
+
* @method string getPermission()
|
43 |
+
* @method Mage_Api_Model_Rules setPermission(string $value)
|
44 |
+
*
|
45 |
+
* @category Mage
|
46 |
+
* @package Mage_Api
|
47 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
48 |
+
*/
|
49 |
+
class Mage_Api_Model_Rules extends Mage_Core_Model_Abstract
|
50 |
+
{
|
51 |
+
protected function _construct()
|
52 |
+
{
|
53 |
+
$this->_init('api/rules');
|
54 |
+
}
|
55 |
+
|
56 |
+
public function update() {
|
57 |
+
$this->getResource()->update($this);
|
58 |
+
return $this;
|
59 |
+
}
|
60 |
+
|
61 |
+
public function getCollection() {
|
62 |
+
return Mage::getResourceModel('api/permissions_collection');
|
63 |
+
}
|
64 |
+
|
65 |
+
public function saveRel() {
|
66 |
+
$this->getResource()->saveRel($this);
|
67 |
+
return $this;
|
68 |
+
}
|
69 |
+
}
|
app/code/core/Mage/Api/Model/Server.php
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Webservice api abstract
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_Model_Server
|
35 |
+
{
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Api Name by Adapter
|
39 |
+
* @var string
|
40 |
+
*/
|
41 |
+
protected $_api = "";
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Web service adapter
|
45 |
+
*
|
46 |
+
* @var Mage_Api_Model_Server_Adaper_Interface
|
47 |
+
*/
|
48 |
+
protected $_adapter;
|
49 |
+
|
50 |
+
public function init(Mage_Api_Controller_Action $controller, $adapter='default', $handler='default')
|
51 |
+
{
|
52 |
+
$adapters = Mage::getSingleton('api/config')->getActiveAdapters();
|
53 |
+
$handlers = Mage::getSingleton('api/config')->getHandlers();
|
54 |
+
$this->_api = $adapter;
|
55 |
+
if (isset($adapters[$adapter])) {
|
56 |
+
$adapterModel = Mage::getModel((string) $adapters[$adapter]->model);
|
57 |
+
/* @var $adapterModel Mage_Api_Model_Server_Adapter_Interface */
|
58 |
+
if (!($adapterModel instanceof Mage_Api_Model_Server_Adapter_Interface)) {
|
59 |
+
Mage::throwException(Mage::helper('api')->__('Invalid webservice adapter specified.'));
|
60 |
+
}
|
61 |
+
|
62 |
+
$this->_adapter = $adapterModel;
|
63 |
+
$this->_adapter->setController($controller);
|
64 |
+
|
65 |
+
if (!isset($handlers->$handler)) {
|
66 |
+
Mage::throwException(Mage::helper('api')->__('Invalid webservice handler specified.'));
|
67 |
+
}
|
68 |
+
|
69 |
+
$handlerClassName = Mage::getConfig()->getModelClassName((string) $handlers->$handler->model);
|
70 |
+
$this->_adapter->setHandler($handlerClassName);
|
71 |
+
} else {
|
72 |
+
Mage::throwException(Mage::helper('api')->__('Invalid webservice adapter specified.'));
|
73 |
+
}
|
74 |
+
|
75 |
+
return $this;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Run server
|
80 |
+
*
|
81 |
+
*/
|
82 |
+
public function run()
|
83 |
+
{
|
84 |
+
$this->getAdapter()->run();
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Get Api name by Adapter
|
89 |
+
* @return string
|
90 |
+
*/
|
91 |
+
public function getApiName()
|
92 |
+
{
|
93 |
+
return $this->_api;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Retrieve web service adapter
|
98 |
+
*
|
99 |
+
* @return Mage_Api_Model_Server_Adaper_Interface
|
100 |
+
*/
|
101 |
+
public function getAdapter()
|
102 |
+
{
|
103 |
+
return $this->_adapter;
|
104 |
+
}
|
105 |
+
|
106 |
+
|
107 |
+
} // Class Mage_Api_Model_Server_Abstract End
|
app/code/core/Mage/Api/Model/Server/Adapter/Interface.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Web service api server interface
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
interface Mage_Api_Model_Server_Adapter_Interface
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Set handler class name for webservice
|
38 |
+
*
|
39 |
+
* @param string $handler
|
40 |
+
* @return Mage_Api_Model_Server_Adapter_Interface
|
41 |
+
*/
|
42 |
+
function setHandler($handler);
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Retrive handler class name for webservice
|
46 |
+
*
|
47 |
+
* @return string
|
48 |
+
*/
|
49 |
+
function getHandler();
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Set webservice api controller
|
53 |
+
*
|
54 |
+
* @param Mage_Api_Controller_Action $controller
|
55 |
+
* @return Mage_Api_Model_Server_Adapter_Interface
|
56 |
+
*/
|
57 |
+
function setController(Mage_Api_Controller_Action $controller);
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Retrive webservice api controller
|
61 |
+
*
|
62 |
+
* @return Mage_Api_Controller_Action
|
63 |
+
*/
|
64 |
+
function getController();
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Run webservice
|
68 |
+
*
|
69 |
+
* @return Mage_Api_Model_Server_Adapter_Interface
|
70 |
+
*/
|
71 |
+
function run();
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Dispatch webservice fault
|
75 |
+
*
|
76 |
+
* @param int $code
|
77 |
+
* @param string $message
|
78 |
+
*/
|
79 |
+
function fault($code, $message);
|
80 |
+
|
81 |
+
} // Class Mage_Api_Model_Server_Adapter_Interface End
|
app/code/core/Mage/Api/Model/Server/Adapter/Soap.php
ADDED
@@ -0,0 +1,246 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Webservice soap adapter
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_Model_Server_Adapter_Soap
|
35 |
+
extends Varien_Object
|
36 |
+
implements Mage_Api_Model_Server_Adapter_Interface
|
37 |
+
{
|
38 |
+
/**
|
39 |
+
* Soap server
|
40 |
+
*
|
41 |
+
* @var SoapServer
|
42 |
+
*/
|
43 |
+
protected $_soap = null;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Set handler class name for webservice
|
47 |
+
*
|
48 |
+
* @param string $handler
|
49 |
+
* @return Mage_Api_Model_Server_Adapter_Soap
|
50 |
+
*/
|
51 |
+
public function setHandler($handler)
|
52 |
+
{
|
53 |
+
$this->setData('handler', $handler);
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Retrive handler class name for webservice
|
59 |
+
*
|
60 |
+
* @return string
|
61 |
+
*/
|
62 |
+
public function getHandler()
|
63 |
+
{
|
64 |
+
return $this->getData('handler');
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Set webservice api controller
|
69 |
+
*
|
70 |
+
* @param Mage_Api_Controller_Action $controller
|
71 |
+
* @return Mage_Api_Model_Server_Adapter_Soap
|
72 |
+
*/
|
73 |
+
public function setController(Mage_Api_Controller_Action $controller)
|
74 |
+
{
|
75 |
+
$this->setData('controller', $controller);
|
76 |
+
return $this;
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Retrive webservice api controller
|
81 |
+
*
|
82 |
+
* @return Mage_Api_Controller_Action
|
83 |
+
*/
|
84 |
+
public function getController()
|
85 |
+
{
|
86 |
+
return $this->getData('controller');
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Run webservice
|
91 |
+
*
|
92 |
+
* @param Mage_Api_Controller_Action $controller
|
93 |
+
* @return Mage_Api_Model_Server_Adapter_Soap
|
94 |
+
*/
|
95 |
+
public function run()
|
96 |
+
{
|
97 |
+
|
98 |
+
$apiConfigCharset = Mage::getStoreConfig("api/config/charset");
|
99 |
+
|
100 |
+
if ($this->getController()->getRequest()->getParam('wsdl') !== null) {
|
101 |
+
// Generating wsdl content from template
|
102 |
+
$io = new Varien_Io_File();
|
103 |
+
$io->open(array('path'=>Mage::getModuleDir('etc', 'Mage_Api')));
|
104 |
+
|
105 |
+
$wsdlContent = $io->read('wsdl.xml');
|
106 |
+
|
107 |
+
$template = Mage::getModel('core/email_template_filter');
|
108 |
+
|
109 |
+
$wsdlConfig = new Varien_Object();
|
110 |
+
$queryParams = $this->getController()->getRequest()->getQuery();
|
111 |
+
if (isset($queryParams['wsdl'])) {
|
112 |
+
unset($queryParams['wsdl']);
|
113 |
+
}
|
114 |
+
|
115 |
+
$wsdlConfig->setUrl(
|
116 |
+
htmlspecialchars(Mage::getUrl('*/*/*', array('_query'=>$queryParams) ))
|
117 |
+
);
|
118 |
+
$wsdlConfig->setName('Magento');
|
119 |
+
$wsdlConfig->setHandler($this->getHandler());
|
120 |
+
|
121 |
+
$template->setVariables(array('wsdl'=>$wsdlConfig));
|
122 |
+
|
123 |
+
|
124 |
+
$this->getController()->getResponse()
|
125 |
+
->clearHeaders()
|
126 |
+
->setHeader('Content-Type','text/xml; charset='.$apiConfigCharset)
|
127 |
+
->setBody(
|
128 |
+
preg_replace(
|
129 |
+
'/<\?xml version="([^\"]+)"([^\>]+)>/i',
|
130 |
+
'<?xml version="$1" encoding="'.$apiConfigCharset.'"?>',
|
131 |
+
$template->filter($wsdlContent)
|
132 |
+
)
|
133 |
+
);
|
134 |
+
} else {
|
135 |
+
try {
|
136 |
+
$this->_instantiateServer();
|
137 |
+
|
138 |
+
$this->getController()->getResponse()
|
139 |
+
->clearHeaders()
|
140 |
+
->setHeader('Content-Type','text/xml; charset='.$apiConfigCharset)
|
141 |
+
->setBody(
|
142 |
+
preg_replace(
|
143 |
+
'/<\?xml version="([^\"]+)"([^\>]+)>/i',
|
144 |
+
'<?xml version="$1" encoding="'.$apiConfigCharset.'"?>',
|
145 |
+
$this->_soap->handle()
|
146 |
+
)
|
147 |
+
);
|
148 |
+
} catch( Zend_Soap_Server_Exception $e ) {
|
149 |
+
$this->fault( $e->getCode(), $e->getMessage() );
|
150 |
+
} catch( Exception $e ) {
|
151 |
+
$this->fault( $e->getCode(), $e->getMessage() );
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
return $this;
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Dispatch webservice fault
|
160 |
+
*
|
161 |
+
* @param int $code
|
162 |
+
* @param string $message
|
163 |
+
*/
|
164 |
+
public function fault($code, $message)
|
165 |
+
{
|
166 |
+
if ($this->_extensionLoaded()) {
|
167 |
+
throw new SoapFault($code, $message);
|
168 |
+
} else {
|
169 |
+
die('<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
|
170 |
+
<SOAP-ENV:Body>
|
171 |
+
<SOAP-ENV:Fault>
|
172 |
+
<faultcode>' . $code . '</faultcode>
|
173 |
+
<faultstring>' . $message . '</faultstring>
|
174 |
+
</SOAP-ENV:Fault>
|
175 |
+
</SOAP-ENV:Body>
|
176 |
+
</SOAP-ENV:Envelope>');
|
177 |
+
}
|
178 |
+
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Check whether Soap extension is loaded
|
183 |
+
*
|
184 |
+
* @return boolean
|
185 |
+
*/
|
186 |
+
protected function _extensionLoaded()
|
187 |
+
{
|
188 |
+
return class_exists('SoapServer', false);
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Transform wsdl url if $_SERVER["PHP_AUTH_USER"] is set
|
193 |
+
*
|
194 |
+
* @param array
|
195 |
+
* @return String
|
196 |
+
*/
|
197 |
+
protected function getWsdlUrl($params = null, $withAuth = true)
|
198 |
+
{
|
199 |
+
$urlModel = Mage::getModel('core/url')
|
200 |
+
->setUseSession(false);
|
201 |
+
|
202 |
+
$wsdlUrl = ($params !== null)? $urlModel->getUrl('*/*/*', $params) : $urlModel->getUrl('*/*/*');
|
203 |
+
|
204 |
+
if( $withAuth ) {
|
205 |
+
$phpAuthUser = $this->getController()->getRequest()->getServer('PHP_AUTH_USER', false);
|
206 |
+
$phpAuthPw = $this->getController()->getRequest()->getServer('PHP_AUTH_PW', false);
|
207 |
+
|
208 |
+
if ($phpAuthUser && $phpAuthPw) {
|
209 |
+
$wsdlUrl = sprintf("http://%s:%s@%s", $phpAuthUser, $phpAuthPw, str_replace('http://', '', $wsdlUrl ) );
|
210 |
+
}
|
211 |
+
}
|
212 |
+
|
213 |
+
return $wsdlUrl;
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Try to instantiate Zend_Soap_Server
|
218 |
+
* If schema import error is caught, it will retry in 1 second.
|
219 |
+
*
|
220 |
+
* @throws Zend_Soap_Server_Exception
|
221 |
+
*/
|
222 |
+
protected function _instantiateServer()
|
223 |
+
{
|
224 |
+
$apiConfigCharset = Mage::getStoreConfig('api/config/charset');
|
225 |
+
ini_set('soap.wsdl_cache_enabled', '0');
|
226 |
+
$tries = 0;
|
227 |
+
do {
|
228 |
+
$retry = false;
|
229 |
+
try {
|
230 |
+
$this->_soap = new Zend_Soap_Server($this->getWsdlUrl(array("wsdl" => 1)), array('encoding' => $apiConfigCharset));
|
231 |
+
} catch (SoapFault $e) {
|
232 |
+
if (false !== strpos($e->getMessage(), "can't import schema from 'http://schemas.xmlsoap.org/soap/encoding/'")) {
|
233 |
+
$retry = true;
|
234 |
+
sleep(1);
|
235 |
+
} else {
|
236 |
+
throw $e;
|
237 |
+
}
|
238 |
+
$tries++;
|
239 |
+
}
|
240 |
+
} while ($retry && $tries < 5);
|
241 |
+
use_soap_error_handler(false);
|
242 |
+
$this->_soap
|
243 |
+
->setReturnResponse(true)
|
244 |
+
->setClass($this->getHandler());
|
245 |
+
}
|
246 |
+
}
|
app/code/core/Mage/Api/Model/Server/Adapter/Xmlrpc.php
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Webservice XmlRpc adapter
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_Model_Server_Adapter_Xmlrpc
|
35 |
+
extends Varien_Object
|
36 |
+
implements Mage_Api_Model_Server_Adapter_Interface
|
37 |
+
{
|
38 |
+
/**
|
39 |
+
* XmlRpc Server
|
40 |
+
*
|
41 |
+
* @var Zend_XmlRpc_Server
|
42 |
+
*/
|
43 |
+
protected $_xmlRpc = null;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Set handler class name for webservice
|
47 |
+
*
|
48 |
+
* @param string $handler
|
49 |
+
* @return Mage_Api_Model_Server_Adapter_Xmlrpc
|
50 |
+
*/
|
51 |
+
public function setHandler($handler)
|
52 |
+
{
|
53 |
+
$this->setData('handler', $handler);
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Retrive handler class name for webservice
|
59 |
+
*
|
60 |
+
* @return string
|
61 |
+
*/
|
62 |
+
public function getHandler()
|
63 |
+
{
|
64 |
+
return $this->getData('handler');
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Set webservice api controller
|
69 |
+
*
|
70 |
+
* @param Mage_Api_Controller_Action $controller
|
71 |
+
* @return Mage_Api_Model_Server_Adapter_Xmlrpc
|
72 |
+
*/
|
73 |
+
public function setController(Mage_Api_Controller_Action $controller)
|
74 |
+
{
|
75 |
+
$this->setData('controller', $controller);
|
76 |
+
return $this;
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Retrive webservice api controller
|
81 |
+
*
|
82 |
+
* @return Mage_Api_Controller_Action
|
83 |
+
*/
|
84 |
+
public function getController()
|
85 |
+
{
|
86 |
+
return $this->getData('controller');
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Run webservice
|
91 |
+
*
|
92 |
+
* @param Mage_Api_Controller_Action $controller
|
93 |
+
* @return Mage_Api_Model_Server_Adapter_Xmlrpc
|
94 |
+
*/
|
95 |
+
public function run()
|
96 |
+
{
|
97 |
+
$apiConfigCharset = Mage::getStoreConfig("api/config/charset");
|
98 |
+
|
99 |
+
$this->_xmlRpc = new Zend_XmlRpc_Server();
|
100 |
+
$this->_xmlRpc->setEncoding($apiConfigCharset)
|
101 |
+
->setClass($this->getHandler());
|
102 |
+
$this->getController()->getResponse()
|
103 |
+
->clearHeaders()
|
104 |
+
->setHeader('Content-Type','text/xml; charset='.$apiConfigCharset)
|
105 |
+
->setBody($this->_xmlRpc->handle());
|
106 |
+
return $this;
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Dispatch webservice fault
|
111 |
+
*
|
112 |
+
* @param int $code
|
113 |
+
* @param string $message
|
114 |
+
*/
|
115 |
+
public function fault($code, $message)
|
116 |
+
{
|
117 |
+
throw new Zend_XmlRpc_Server_Exception($message, $code);
|
118 |
+
}
|
119 |
+
} // Class Mage_Api_Model_Server_Adapter_Xmlrpc End
|
app/code/core/Mage/Api/Model/Server/Handler.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Webservices default server handler
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_Model_Server_Handler extends Mage_Api_Model_Server_Handler_Abstract
|
35 |
+
{
|
36 |
+
|
37 |
+
} // Class Mage_Api_Model_Server_Handler End
|
app/code/core/Mage/Api/Model/Server/Handler/Abstract.php
ADDED
@@ -0,0 +1,542 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Webservice default handler
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
abstract class Mage_Api_Model_Server_Handler_Abstract
|
35 |
+
{
|
36 |
+
protected $_resourceSuffix = null;
|
37 |
+
|
38 |
+
public function __construct()
|
39 |
+
{
|
40 |
+
set_error_handler(array($this, 'handlePhpError'), E_ALL);
|
41 |
+
Mage::app()->loadAreaPart(Mage_Core_Model_App_Area::AREA_ADMINHTML, Mage_Core_Model_App_Area::PART_EVENTS);
|
42 |
+
}
|
43 |
+
|
44 |
+
public function handlePhpError($errorCode, $errorMessage, $errorFile)
|
45 |
+
{
|
46 |
+
Mage::log($errorMessage . $errorFile);
|
47 |
+
if (in_array($errorCode, array(E_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR))) {
|
48 |
+
$this->_fault('internal');
|
49 |
+
}
|
50 |
+
return true;
|
51 |
+
}
|
52 |
+
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Retrive webservice session
|
56 |
+
*
|
57 |
+
* @return Mage_Api_Model_Session
|
58 |
+
*/
|
59 |
+
protected function _getSession()
|
60 |
+
{
|
61 |
+
return Mage::getSingleton('api/session');
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Retrive webservice configuration
|
66 |
+
*
|
67 |
+
* @return Mage_Api_Model_Config
|
68 |
+
*/
|
69 |
+
protected function _getConfig()
|
70 |
+
{
|
71 |
+
return Mage::getSingleton('api/config');
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Retrive webservice server
|
76 |
+
*
|
77 |
+
* @return Mage_Api_Model_Server
|
78 |
+
*/
|
79 |
+
protected function _getServer()
|
80 |
+
{
|
81 |
+
return Mage::getSingleton('api/server');
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Start webservice session
|
86 |
+
*
|
87 |
+
* @param string $sessionId
|
88 |
+
* @return Mage_Api_Model_Server_Handler_Abstract
|
89 |
+
*/
|
90 |
+
protected function _startSession($sessionId=null)
|
91 |
+
{
|
92 |
+
$this->_getSession()->setSessionId($sessionId);
|
93 |
+
$this->_getSession()->init('api', 'api');
|
94 |
+
return $this;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Check current user permission on resource and privilege
|
99 |
+
*
|
100 |
+
*
|
101 |
+
* @param string $resource
|
102 |
+
* @param string $privilege
|
103 |
+
* @return bool
|
104 |
+
*/
|
105 |
+
protected function _isAllowed($resource, $privilege=null)
|
106 |
+
{
|
107 |
+
return $this->_getSession()->isAllowed($resource, $privilege);
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Check session expiration
|
112 |
+
*
|
113 |
+
* @return boolean
|
114 |
+
*/
|
115 |
+
protected function _isSessionExpired ()
|
116 |
+
{
|
117 |
+
return $this->_getSession()->isSessionExpired();
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Dispatch webservice fault
|
122 |
+
*
|
123 |
+
* @param string $faultName
|
124 |
+
* @param string $resourceName
|
125 |
+
* @param string $customMessage
|
126 |
+
*/
|
127 |
+
protected function _fault($faultName, $resourceName=null, $customMessage=null)
|
128 |
+
{
|
129 |
+
$faults = $this->_getConfig()->getFaults($resourceName);
|
130 |
+
if (!isset($faults[$faultName]) && !is_null($resourceName)) {
|
131 |
+
$this->_fault($faultName);
|
132 |
+
return;
|
133 |
+
} elseif (!isset($faults[$faultName])) {
|
134 |
+
$this->_fault('unknown');
|
135 |
+
return;
|
136 |
+
}
|
137 |
+
$this->_getServer()->getAdapter()->fault(
|
138 |
+
$faults[$faultName]['code'],
|
139 |
+
(is_null($customMessage) ? $faults[$faultName]['message'] : $customMessage)
|
140 |
+
);
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Retrive webservice fault as array
|
145 |
+
*
|
146 |
+
* @param string $faultName
|
147 |
+
* @param string $resourceName
|
148 |
+
* @param string $customMessage
|
149 |
+
* @return array
|
150 |
+
*/
|
151 |
+
protected function _faultAsArray($faultName, $resourceName=null, $customMessage=null)
|
152 |
+
{
|
153 |
+
$faults = $this->_getConfig()->getFaults($resourceName);
|
154 |
+
if (!isset($faults[$faultName]) && !is_null($resourceName)) {
|
155 |
+
return $this->_faultAsArray($faultName);
|
156 |
+
} elseif (!isset($faults[$faultName])) {
|
157 |
+
return $this->_faultAsArray('unknown');
|
158 |
+
}
|
159 |
+
|
160 |
+
return array(
|
161 |
+
'isFault' => true,
|
162 |
+
'faultCode' => $faults[$faultName]['code'],
|
163 |
+
'faultMessage' => (is_null($customMessage) ? $faults[$faultName]['message'] : $customMessage)
|
164 |
+
);
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Start web service session
|
169 |
+
*
|
170 |
+
* @return string
|
171 |
+
*/
|
172 |
+
public function startSession()
|
173 |
+
{
|
174 |
+
$this->_startSession();
|
175 |
+
return $this->_getSession()->getSessionId();
|
176 |
+
}
|
177 |
+
|
178 |
+
|
179 |
+
/**
|
180 |
+
* End web service session
|
181 |
+
*
|
182 |
+
* @param string $sessionId
|
183 |
+
* @return boolean
|
184 |
+
*/
|
185 |
+
public function endSession($sessionId)
|
186 |
+
{
|
187 |
+
$this->_startSession($sessionId);
|
188 |
+
$this->_getSession()->clear();
|
189 |
+
return true;
|
190 |
+
}
|
191 |
+
|
192 |
+
/**
|
193 |
+
* Enter description here...
|
194 |
+
*
|
195 |
+
* @param string $resource
|
196 |
+
* @return string
|
197 |
+
*/
|
198 |
+
protected function _prepareResourceModelName($resource)
|
199 |
+
{
|
200 |
+
if (null !== $this->_resourceSuffix) {
|
201 |
+
return $resource . $this->_resourceSuffix;
|
202 |
+
}
|
203 |
+
return $resource;
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Login user and Retrieve session id
|
208 |
+
*
|
209 |
+
* @param string $username
|
210 |
+
* @param string $apiKey
|
211 |
+
* @return string
|
212 |
+
*/
|
213 |
+
public function login($username, $apiKey)
|
214 |
+
{
|
215 |
+
$this->_startSession();
|
216 |
+
try {
|
217 |
+
$this->_getSession()->login($username, $apiKey);
|
218 |
+
} catch (Exception $e) {
|
219 |
+
return $this->_fault('access_denied');
|
220 |
+
}
|
221 |
+
return $this->_getSession()->getSessionId();
|
222 |
+
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* Call resource functionality
|
226 |
+
*
|
227 |
+
* @param string $sessionId
|
228 |
+
* @param string $resourcePath
|
229 |
+
* @param array $args
|
230 |
+
* @return mixed
|
231 |
+
*/
|
232 |
+
public function call($sessionId, $apiPath, $args = array())
|
233 |
+
{
|
234 |
+
$this->_startSession($sessionId);
|
235 |
+
|
236 |
+
if (!$this->_getSession()->isLoggedIn($sessionId)) {
|
237 |
+
return $this->_fault('session_expired');
|
238 |
+
}
|
239 |
+
|
240 |
+
list($resourceName, $methodName) = explode('.', $apiPath);
|
241 |
+
|
242 |
+
if (empty($resourceName) || empty($methodName)) {
|
243 |
+
return $this->_fault('resource_path_invalid');
|
244 |
+
}
|
245 |
+
|
246 |
+
$resourcesAlias = $this->_getConfig()->getResourcesAlias();
|
247 |
+
$resources = $this->_getConfig()->getResources();
|
248 |
+
if (isset($resourcesAlias->$resourceName)) {
|
249 |
+
$resourceName = (string) $resourcesAlias->$resourceName;
|
250 |
+
}
|
251 |
+
|
252 |
+
if (!isset($resources->$resourceName)
|
253 |
+
|| !isset($resources->$resourceName->methods->$methodName)) {
|
254 |
+
return $this->_fault('resource_path_invalid');
|
255 |
+
}
|
256 |
+
|
257 |
+
if (!isset($resources->$resourceName->public)
|
258 |
+
&& isset($resources->$resourceName->acl)
|
259 |
+
&& !$this->_isAllowed((string)$resources->$resourceName->acl)) {
|
260 |
+
return $this->_fault('access_denied');
|
261 |
+
|
262 |
+
}
|
263 |
+
|
264 |
+
|
265 |
+
if (!isset($resources->$resourceName->methods->$methodName->public)
|
266 |
+
&& isset($resources->$resourceName->methods->$methodName->acl)
|
267 |
+
&& !$this->_isAllowed((string)$resources->$resourceName->methods->$methodName->acl)) {
|
268 |
+
return $this->_fault('access_denied');
|
269 |
+
}
|
270 |
+
|
271 |
+
$methodInfo = $resources->$resourceName->methods->$methodName;
|
272 |
+
|
273 |
+
try {
|
274 |
+
$method = (isset($methodInfo->method) ? (string) $methodInfo->method : $methodName);
|
275 |
+
|
276 |
+
$modelName = $this->_prepareResourceModelName((string) $resources->$resourceName->model);
|
277 |
+
try {
|
278 |
+
$model = Mage::getModel($modelName);
|
279 |
+
if ($model instanceof Mage_Api_Model_Resource_Abstract) {
|
280 |
+
$model->setResourceConfig($resources->$resourceName);
|
281 |
+
}
|
282 |
+
} catch (Exception $e) {
|
283 |
+
throw new Mage_Api_Exception('resource_path_not_callable');
|
284 |
+
}
|
285 |
+
|
286 |
+
if (is_callable(array(&$model, $method))) {
|
287 |
+
if (isset($methodInfo->arguments) && ((string)$methodInfo->arguments) == 'array') {
|
288 |
+
return $model->$method((is_array($args) ? $args : array($args)));
|
289 |
+
} elseif (!is_array($args)) {
|
290 |
+
return $model->$method($args);
|
291 |
+
} else {
|
292 |
+
return call_user_func_array(array(&$model, $method), $args);
|
293 |
+
}
|
294 |
+
} else {
|
295 |
+
throw new Mage_Api_Exception('resource_path_not_callable');
|
296 |
+
}
|
297 |
+
} catch (Mage_Api_Exception $e) {
|
298 |
+
return $this->_fault($e->getMessage(), $resourceName, $e->getCustomMessage());
|
299 |
+
} catch (Exception $e) {
|
300 |
+
Mage::logException($e);
|
301 |
+
return $this->_fault('internal', null, $e->getMessage());
|
302 |
+
}
|
303 |
+
}
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Multiple calls of resource functionality
|
307 |
+
*
|
308 |
+
* @param string $sessionId
|
309 |
+
* @param array $calls
|
310 |
+
* @param array $options
|
311 |
+
* @return array
|
312 |
+
*/
|
313 |
+
public function multiCall($sessionId, array $calls = array(), $options = array())
|
314 |
+
{
|
315 |
+
$this->_startSession($sessionId);
|
316 |
+
|
317 |
+
if (!$this->_getSession()->isLoggedIn($sessionId)) {
|
318 |
+
return $this->_fault('session_expired');
|
319 |
+
}
|
320 |
+
|
321 |
+
$result = array();
|
322 |
+
|
323 |
+
$resourcesAlias = $this->_getConfig()->getResourcesAlias();
|
324 |
+
$resources = $this->_getConfig()->getResources();
|
325 |
+
|
326 |
+
foreach ($calls as $call) {
|
327 |
+
if (!isset($call[0])) {
|
328 |
+
$result[] = $this->_faultAsArray('resource_path_invalid');
|
329 |
+
if (isset($options['break']) && $options['break']==1) {
|
330 |
+
break;
|
331 |
+
} else {
|
332 |
+
continue;
|
333 |
+
}
|
334 |
+
}
|
335 |
+
|
336 |
+
$apiPath = $call[0];
|
337 |
+
$args = (isset($call[1]) ? $call[1] : array());
|
338 |
+
|
339 |
+
list($resourceName, $methodName) = explode('.', $apiPath);
|
340 |
+
|
341 |
+
if (empty($resourceName) || empty($methodName)) {
|
342 |
+
$result[] = $this->_faultAsArray('resource_path_invalid');
|
343 |
+
if (isset($options['break']) && $options['break']==1) {
|
344 |
+
break;
|
345 |
+
} else {
|
346 |
+
continue;
|
347 |
+
}
|
348 |
+
}
|
349 |
+
|
350 |
+
if (isset($resourcesAlias->$resourceName)) {
|
351 |
+
$resourceName = (string) $resourcesAlias->$resourceName;
|
352 |
+
}
|
353 |
+
|
354 |
+
if (!isset($resources->$resourceName)
|
355 |
+
|| !isset($resources->$resourceName->methods->$methodName)) {
|
356 |
+
$result[] = $this->_faultAsArray('resource_path_invalid');
|
357 |
+
if (isset($options['break']) && $options['break']==1) {
|
358 |
+
break;
|
359 |
+
} else {
|
360 |
+
continue;
|
361 |
+
}
|
362 |
+
}
|
363 |
+
|
364 |
+
if (!isset($resources->$resourceName->public)
|
365 |
+
&& isset($resources->$resourceName->acl)
|
366 |
+
&& !$this->_isAllowed((string)$resources->$resourceName->acl)) {
|
367 |
+
$result[] = $this->_faultAsArray('access_denied');
|
368 |
+
if (isset($options['break']) && $options['break']==1) {
|
369 |
+
break;
|
370 |
+
} else {
|
371 |
+
continue;
|
372 |
+
}
|
373 |
+
}
|
374 |
+
|
375 |
+
|
376 |
+
if (!isset($resources->$resourceName->methods->$methodName->public)
|
377 |
+
&& isset($resources->$resourceName->methods->$methodName->acl)
|
378 |
+
&& !$this->_isAllowed((string)$resources->$resourceName->methods->$methodName->acl)) {
|
379 |
+
$result[] = $this->_faultAsArray('access_denied');
|
380 |
+
if (isset($options['break']) && $options['break']==1) {
|
381 |
+
break;
|
382 |
+
} else {
|
383 |
+
continue;
|
384 |
+
}
|
385 |
+
}
|
386 |
+
|
387 |
+
$methodInfo = $resources->$resourceName->methods->$methodName;
|
388 |
+
|
389 |
+
try {
|
390 |
+
$method = (isset($methodInfo->method) ? (string) $methodInfo->method : $methodName);
|
391 |
+
|
392 |
+
$modelName = $this->_prepareResourceModelName((string) $resources->$resourceName->model);
|
393 |
+
try {
|
394 |
+
$model = Mage::getModel($modelName);
|
395 |
+
} catch (Exception $e) {
|
396 |
+
throw new Mage_Api_Exception('resource_path_not_callable');
|
397 |
+
}
|
398 |
+
|
399 |
+
if (is_callable(array(&$model, $method))) {
|
400 |
+
if (isset($methodInfo->arguments) && ((string)$methodInfo->arguments) == 'array') {
|
401 |
+
$result[] = $model->$method((is_array($args) ? $args : array($args)));
|
402 |
+
} elseif (!is_array($args)) {
|
403 |
+
$result[] = $model->$method($args);
|
404 |
+
} else {
|
405 |
+
$result[] = call_user_func_array(array(&$model, $method), $args);
|
406 |
+
}
|
407 |
+
} else {
|
408 |
+
throw new Mage_Api_Exception('resource_path_not_callable');
|
409 |
+
}
|
410 |
+
} catch (Mage_Api_Exception $e) {
|
411 |
+
$result[] = $this->_faultAsArray($e->getMessage(), $resourceName, $e->getCustomMessage());
|
412 |
+
if (isset($options['break']) && $options['break']==1) {
|
413 |
+
break;
|
414 |
+
} else {
|
415 |
+
continue;
|
416 |
+
}
|
417 |
+
} catch (Exception $e) {
|
418 |
+
Mage::logException($e);
|
419 |
+
$result[] = $this->_faultAsArray('internal');
|
420 |
+
if (isset($options['break']) && $options['break']==1) {
|
421 |
+
break;
|
422 |
+
} else {
|
423 |
+
continue;
|
424 |
+
}
|
425 |
+
}
|
426 |
+
}
|
427 |
+
|
428 |
+
return $result;
|
429 |
+
}
|
430 |
+
|
431 |
+
/**
|
432 |
+
* List of available resources
|
433 |
+
*
|
434 |
+
* @param string $sessionId
|
435 |
+
* @return array
|
436 |
+
*/
|
437 |
+
public function resources($sessionId)
|
438 |
+
{
|
439 |
+
$this->_startSession($sessionId);
|
440 |
+
|
441 |
+
if (!$this->_getSession()->isLoggedIn($sessionId)) {
|
442 |
+
return $this->_fault('session_expired');
|
443 |
+
}
|
444 |
+
|
445 |
+
$resources = array();
|
446 |
+
|
447 |
+
$resourcesAlias = array();
|
448 |
+
foreach ($this->_getConfig()->getResourcesAlias() as $alias => $resourceName) {
|
449 |
+
$resourcesAlias[(string) $resourceName][] = $alias;
|
450 |
+
}
|
451 |
+
|
452 |
+
|
453 |
+
foreach ($this->_getConfig()->getResources() as $resourceName => $resource) {
|
454 |
+
if (isset($resource->acl) && !$this->_isAllowed((string) $resource->acl)) {
|
455 |
+
continue;
|
456 |
+
}
|
457 |
+
|
458 |
+
$methods = array();
|
459 |
+
foreach ($resource->methods->children() as $methodName => $method) {
|
460 |
+
if (isset($method->acl) && !$this->_isAllowed((string) $method->acl)) {
|
461 |
+
continue;
|
462 |
+
}
|
463 |
+
$methodAliases = array();
|
464 |
+
if (isset($resourcesAlias[$resourceName])) {
|
465 |
+
foreach ($resourcesAlias[$resourceName] as $alias) {
|
466 |
+
$methodAliases[] = $alias . '.' . $methodName;
|
467 |
+
}
|
468 |
+
}
|
469 |
+
|
470 |
+
$methods[] = array(
|
471 |
+
'title' => (string) $method->title,
|
472 |
+
'description' => (isset($method->description) ? (string)$method->description : null),
|
473 |
+
'path' => $resourceName . '.' . $methodName,
|
474 |
+
'name' => $methodName,
|
475 |
+
'aliases' => $methodAliases
|
476 |
+
);
|
477 |
+
}
|
478 |
+
|
479 |
+
if (count($methods) == 0) {
|
480 |
+
continue;
|
481 |
+
}
|
482 |
+
|
483 |
+
$resources[] = array(
|
484 |
+
'title' => (string) $resource->title,
|
485 |
+
'description' => (isset($resource->description) ? (string)$resource->description : null),
|
486 |
+
'name' => $resourceName,
|
487 |
+
'aliases' => (isset($resourcesAlias[$resourceName]) ? $resourcesAlias[$resourceName] : array()),
|
488 |
+
'methods' => $methods
|
489 |
+
);
|
490 |
+
}
|
491 |
+
|
492 |
+
return $resources;
|
493 |
+
}
|
494 |
+
|
495 |
+
/**
|
496 |
+
* List of resource faults
|
497 |
+
*
|
498 |
+
* @param string $sessionId
|
499 |
+
* @param string $resourceName
|
500 |
+
* @return array
|
501 |
+
*/
|
502 |
+
public function resourceFaults($sessionId, $resourceName)
|
503 |
+
{
|
504 |
+
$this->_startSession($sessionId);
|
505 |
+
|
506 |
+
if (!$this->_getSession()->isLoggedIn($sessionId)) {
|
507 |
+
return $this->_fault('session_expired');
|
508 |
+
}
|
509 |
+
|
510 |
+
$resourcesAlias = $this->_getConfig()->getResourcesAlias();
|
511 |
+
$resources = $this->_getConfig()->getResources();
|
512 |
+
|
513 |
+
if (isset($resourcesAlias->$resourceName)) {
|
514 |
+
$resourceName = (string) $resourcesAlias->$resourceName;
|
515 |
+
}
|
516 |
+
|
517 |
+
|
518 |
+
if (empty($resourceName)
|
519 |
+
|| !isset($resources->$resourceName)) {
|
520 |
+
return $this->_fault('resource_path_invalid');
|
521 |
+
}
|
522 |
+
|
523 |
+
if (isset($resources->$resourceName->acl)
|
524 |
+
&& !$this->_isAllowed((string)$resources->$resourceName->acl)) {
|
525 |
+
return $this->_fault('access_denied');
|
526 |
+
}
|
527 |
+
|
528 |
+
return array_values($this->_getConfig()->getFaults($resourceName));
|
529 |
+
}
|
530 |
+
|
531 |
+
/**
|
532 |
+
* List of global faults
|
533 |
+
*
|
534 |
+
* @param string $sessionId
|
535 |
+
* @return array
|
536 |
+
*/
|
537 |
+
public function globalFaults($sessionId)
|
538 |
+
{
|
539 |
+
$this->_startSession($sessionId);
|
540 |
+
return array_values($this->_getConfig()->getFaults());
|
541 |
+
}
|
542 |
+
} // Class Mage_Api_Model_Server_Handler_Abstract End
|
app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Webservice soap adapter
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_Model_Server_V2_Adapter_Soap extends Mage_Api_Model_Server_Adapter_Soap
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Run webservice
|
38 |
+
*
|
39 |
+
* @param Mage_Api_Controller_Action $controller
|
40 |
+
* @return Mage_Api_Model_Server_Adapter_Soap
|
41 |
+
*/
|
42 |
+
public function run()
|
43 |
+
{
|
44 |
+
$apiConfigCharset = Mage::getStoreConfig("api/config/charset");
|
45 |
+
|
46 |
+
if ($this->getController()->getRequest()->getParam('wsdl') !== null) {
|
47 |
+
$wsdlConfig = Mage::getModel('api/wsdl_config');
|
48 |
+
$wsdlConfig->setHandler($this->getHandler())
|
49 |
+
->init();
|
50 |
+
$this->getController()->getResponse()
|
51 |
+
->clearHeaders()
|
52 |
+
->setHeader('Content-Type','text/xml; charset='.$apiConfigCharset)
|
53 |
+
->setBody(
|
54 |
+
preg_replace(
|
55 |
+
'/<\?xml version="([^\"]+)"([^\>]+)>/i',
|
56 |
+
'<?xml version="$1" encoding="'.$apiConfigCharset.'"?>',
|
57 |
+
$wsdlConfig->getWsdlContent()
|
58 |
+
)
|
59 |
+
);
|
60 |
+
} else {
|
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 ) {
|
77 |
+
$this->fault( $e->getCode(), $e->getMessage() );
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
return $this;
|
82 |
+
}
|
83 |
+
}
|
app/code/core/Mage/Api/Model/Server/V2/Handler.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Webservices server handler v2
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_Model_Server_V2_Handler extends Mage_Api_Model_Server_Handler_Abstract
|
35 |
+
{
|
36 |
+
protected $_resourceSuffix = '_v2';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Interceptor for all interfaces
|
40 |
+
*
|
41 |
+
* @param sttring $function
|
42 |
+
* @param array $args
|
43 |
+
*/
|
44 |
+
|
45 |
+
public function __call( $function, $args )
|
46 |
+
{
|
47 |
+
$sessionId = array_shift( $args );
|
48 |
+
$apiKey = '';
|
49 |
+
$nodes = Mage::getSingleton('api/config')->getNode('v2/resources_function_prefix')->children();
|
50 |
+
foreach ($nodes as $resource => $prefix) {
|
51 |
+
$prefix = $prefix->asArray();
|
52 |
+
if (false !== strpos($function, $prefix)) {
|
53 |
+
$method = substr($function, strlen($prefix));
|
54 |
+
$apiKey = $resource . '.' . strtolower($method[0]).substr($method, 1);
|
55 |
+
}
|
56 |
+
}
|
57 |
+
return $this->call($sessionId, $apiKey, $args);
|
58 |
+
}
|
59 |
+
}
|
app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Webservice soap adapter
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_Model_Server_WSI_Adapter_Soap extends Mage_Api_Model_Server_Adapter_Soap
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Run webservice
|
38 |
+
*
|
39 |
+
* @param Mage_Api_Controller_Action $controller
|
40 |
+
* @return Mage_Api_Model_Server_Adapter_Soap
|
41 |
+
*/
|
42 |
+
public function run()
|
43 |
+
{
|
44 |
+
$apiConfigCharset = Mage::getStoreConfig("api/config/charset");
|
45 |
+
|
46 |
+
if ($this->getController()->getRequest()->getParam('wsdl') !== null) {
|
47 |
+
$wsdlConfig = Mage::getModel('api/wsdl_config');
|
48 |
+
$wsdlConfig->setHandler($this->getHandler())
|
49 |
+
->init();
|
50 |
+
$this->getController()->getResponse()
|
51 |
+
->clearHeaders()
|
52 |
+
->setHeader('Content-Type','text/xml; charset='.$apiConfigCharset)
|
53 |
+
->setBody(
|
54 |
+
preg_replace(
|
55 |
+
'/(\>\<)/i',
|
56 |
+
">\n<",
|
57 |
+
str_replace(
|
58 |
+
'<soap:operation soapAction=""></soap:operation>',
|
59 |
+
"<soap:operation soapAction=\"\" />\n",
|
60 |
+
str_replace(
|
61 |
+
'<soap:body use="literal"></soap:body>',
|
62 |
+
"<soap:body use=\"literal\" />\n",
|
63 |
+
preg_replace(
|
64 |
+
'/<\?xml version="([^\"]+)"([^\>]+)>/i',
|
65 |
+
'<?xml version="$1" encoding="'.$apiConfigCharset.'"?>',
|
66 |
+
$wsdlConfig->getWsdlContent()
|
67 |
+
)
|
68 |
+
)
|
69 |
+
)
|
70 |
+
)
|
71 |
+
);
|
72 |
+
} else {
|
73 |
+
try {
|
74 |
+
$this->_instantiateServer();
|
75 |
+
|
76 |
+
$this->getController()->getResponse()
|
77 |
+
->clearHeaders()
|
78 |
+
->setHeader('Content-Type','text/xml; charset='.$apiConfigCharset)
|
79 |
+
->setBody(
|
80 |
+
preg_replace(
|
81 |
+
'/(\>\<)/i',
|
82 |
+
">\n<",
|
83 |
+
str_replace(
|
84 |
+
'<soap:operation soapAction=""></soap:operation>',
|
85 |
+
"<soap:operation soapAction=\"\" />\n",
|
86 |
+
str_replace(
|
87 |
+
'<soap:body use="literal"></soap:body>',
|
88 |
+
"<soap:body use=\"literal\" />\n",
|
89 |
+
preg_replace(
|
90 |
+
'/<\?xml version="([^\"]+)"([^\>]+)>/i',
|
91 |
+
'<?xml version="$1" encoding="'.$apiConfigCharset.'"?>',
|
92 |
+
$this->_soap->handle()
|
93 |
+
)
|
94 |
+
)
|
95 |
+
)
|
96 |
+
)
|
97 |
+
);
|
98 |
+
} catch( Zend_Soap_Server_Exception $e ) {
|
99 |
+
$this->fault( $e->getCode(), $e->getMessage() );
|
100 |
+
} catch( Exception $e ) {
|
101 |
+
$this->fault( $e->getCode(), $e->getMessage() );
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
}
|
app/code/core/Mage/Api/Model/Server/Wsi/Handler.php
ADDED
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Webservices server handler WSI
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_Model_Server_WSI_Handler extends Mage_Api_Model_Server_Handler_Abstract
|
35 |
+
{
|
36 |
+
protected $_resourceSuffix = '_v2';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Interceptor for all interfaces
|
40 |
+
*
|
41 |
+
* @param string $function
|
42 |
+
* @param array $args
|
43 |
+
*/
|
44 |
+
|
45 |
+
public function __call ($function, $args)
|
46 |
+
{
|
47 |
+
$args = $args[0];
|
48 |
+
|
49 |
+
/** @var Mage_Api_Helper_Data */
|
50 |
+
$helper = Mage::helper('api/data');
|
51 |
+
|
52 |
+
$helper->wsiArrayUnpacker($args);
|
53 |
+
$args = get_object_vars($args);
|
54 |
+
|
55 |
+
if(isset($args['sessionId'])){
|
56 |
+
$sessionId = $args['sessionId'];
|
57 |
+
unset($args['sessionId']);
|
58 |
+
} else {
|
59 |
+
// Was left for backward compatibility.
|
60 |
+
$sessionId = array_shift( $args );
|
61 |
+
}
|
62 |
+
|
63 |
+
$apiKey = '';
|
64 |
+
$nodes = Mage::getSingleton('api/config')->getNode('v2/resources_function_prefix')->children();
|
65 |
+
foreach ($nodes as $resource => $prefix) {
|
66 |
+
$prefix = $prefix->asArray();
|
67 |
+
if (false !== strpos($function, $prefix)) {
|
68 |
+
$method = substr($function, strlen($prefix));
|
69 |
+
$apiKey = $resource . '.' . strtolower($method[0]).substr($method, 1);
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
list($modelName, $methodName) = $this->_getResourceName($apiKey);
|
74 |
+
$methodParams = $this->getMethodParams($modelName, $methodName);
|
75 |
+
|
76 |
+
$args = $this->prepareArgs($methodParams, $args);
|
77 |
+
|
78 |
+
$res = $this->call($sessionId, $apiKey, $args);
|
79 |
+
|
80 |
+
$obj = $helper->wsiArrayPacker($res);
|
81 |
+
$stdObj = new stdClass();
|
82 |
+
$stdObj->result = $obj;
|
83 |
+
|
84 |
+
return $stdObj;
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Login user and Retrieve session id
|
89 |
+
*
|
90 |
+
* @param string $username
|
91 |
+
* @param string $apiKey
|
92 |
+
* @return string
|
93 |
+
*/
|
94 |
+
public function login($username, $apiKey=null)
|
95 |
+
{
|
96 |
+
|
97 |
+
/** @todo implement WS-I support check */
|
98 |
+
//
|
99 |
+
if (is_object($username)) {
|
100 |
+
$apiKey = $username->apiKey;
|
101 |
+
$username = $username->username;
|
102 |
+
}
|
103 |
+
|
104 |
+
$stdObject = new stdClass();
|
105 |
+
$stdObject->result = parent::login($username, $apiKey);
|
106 |
+
return $stdObject;
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Return called class and method names
|
111 |
+
*
|
112 |
+
* @param String $apiPath
|
113 |
+
* @return Array
|
114 |
+
*/
|
115 |
+
protected function _getResourceName($apiPath){
|
116 |
+
|
117 |
+
list($resourceName, $methodName) = explode('.', $apiPath);
|
118 |
+
|
119 |
+
if (empty($resourceName) || empty($methodName)) {
|
120 |
+
return $this->_fault('resource_path_invalid');
|
121 |
+
}
|
122 |
+
|
123 |
+
$resourcesAlias = $this->_getConfig()->getResourcesAlias();
|
124 |
+
$resources = $this->_getConfig()->getResources();
|
125 |
+
if (isset($resourcesAlias->$resourceName)) {
|
126 |
+
$resourceName = (string) $resourcesAlias->$resourceName;
|
127 |
+
}
|
128 |
+
|
129 |
+
$methodInfo = $resources->$resourceName->methods->$methodName;
|
130 |
+
|
131 |
+
$modelName = $this->_prepareResourceModelName((string) $resources->$resourceName->model);
|
132 |
+
|
133 |
+
$modelClass = Mage::getConfig()->getModelClassName($modelName);
|
134 |
+
|
135 |
+
$method = (isset($methodInfo->method) ? (string) $methodInfo->method : $methodName);
|
136 |
+
|
137 |
+
return array($modelClass, $method);
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Return an array of parameters for the callable method.
|
142 |
+
*
|
143 |
+
* @param String $modelName
|
144 |
+
* @param String $methodName
|
145 |
+
* @return Array of ReflectionParameter
|
146 |
+
*/
|
147 |
+
public function getMethodParams($modelName, $methodName) {
|
148 |
+
|
149 |
+
$method = new ReflectionMethod($modelName, $methodName);
|
150 |
+
|
151 |
+
return $method->getParameters();
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Prepares arguments for the method calling. Sort in correct order, set default values for omitted parameters.
|
156 |
+
*
|
157 |
+
* @param Array $params
|
158 |
+
* @param Array $args
|
159 |
+
* @return Array
|
160 |
+
*/
|
161 |
+
public function prepareArgs($params, $args) {
|
162 |
+
|
163 |
+
$callArgs = array();
|
164 |
+
|
165 |
+
/** @var $parameter ReflectionParameter */
|
166 |
+
foreach($params AS $parameter){
|
167 |
+
$pName = $parameter->getName();
|
168 |
+
if( isset( $args[$pName] ) ){
|
169 |
+
$callArgs[$pName] = $args[$pName];
|
170 |
+
} else {
|
171 |
+
if($parameter->isOptional()){
|
172 |
+
$callArgs[$pName] = $parameter->getDefaultValue();
|
173 |
+
} else {
|
174 |
+
Mage::logException(new Exception("Required parameter \"$pName\" is missing.", 0, null));
|
175 |
+
$this->_fault('invalid_request_param');
|
176 |
+
}
|
177 |
+
}
|
178 |
+
}
|
179 |
+
return $callArgs;
|
180 |
+
}
|
181 |
+
|
182 |
+
}
|
app/code/core/Mage/Api/Model/Session.php
ADDED
@@ -0,0 +1,211 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Webservice api session
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_Model_Session extends Mage_Core_Model_Session_Abstract
|
35 |
+
{
|
36 |
+
public $sessionIds = array();
|
37 |
+
protected $_currentSessId = null;
|
38 |
+
|
39 |
+
public function start($sessionName=null)
|
40 |
+
{
|
41 |
+
// parent::start($sessionName=null);
|
42 |
+
$this->_currentSessId = md5(time() . $sessionName);
|
43 |
+
$this->sessionIds[] = $this->getSessionId();
|
44 |
+
return $this;
|
45 |
+
}
|
46 |
+
|
47 |
+
public function init($namespace, $sessionName=null)
|
48 |
+
{
|
49 |
+
if (is_null($this->_currentSessId)) {
|
50 |
+
$this->start();
|
51 |
+
}
|
52 |
+
return $this;
|
53 |
+
}
|
54 |
+
|
55 |
+
public function getSessionId()
|
56 |
+
{
|
57 |
+
return $this->_currentSessId;
|
58 |
+
}
|
59 |
+
|
60 |
+
public function setSessionId($sessId = null)
|
61 |
+
{
|
62 |
+
if (!is_null($sessId)) {
|
63 |
+
$this->_currentSessId = $sessId;
|
64 |
+
}
|
65 |
+
return $this;
|
66 |
+
}
|
67 |
+
|
68 |
+
public function revalidateCookie()
|
69 |
+
{
|
70 |
+
// In api we don't use cookies
|
71 |
+
}
|
72 |
+
|
73 |
+
public function clear() {
|
74 |
+
if ($sessId = $this->getSessionId()) {
|
75 |
+
try {
|
76 |
+
Mage::getModel('api/user')->logoutBySessId($sessId);
|
77 |
+
} catch (Exception $e) {
|
78 |
+
return false;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
return true;
|
82 |
+
}
|
83 |
+
|
84 |
+
public function login($username, $apiKey)
|
85 |
+
{
|
86 |
+
if (empty($username) || empty($apiKey)) {
|
87 |
+
return;
|
88 |
+
}
|
89 |
+
|
90 |
+
$user = Mage::getModel('api/user')
|
91 |
+
->setSessid($this->getSessionId())
|
92 |
+
->login($username, $apiKey);
|
93 |
+
|
94 |
+
if ( $user->getId() && $user->getIsActive() != '1' ) {
|
95 |
+
Mage::throwException(Mage::helper('api')->__('Your account has been deactivated.'));
|
96 |
+
} elseif (!Mage::getModel('api/user')->hasAssigned2Role($user->getId())) {
|
97 |
+
Mage::throwException(Mage::helper('api')->__('Access denied.'));
|
98 |
+
} else {
|
99 |
+
if ($user->getId()) {
|
100 |
+
$this->setUser($user);
|
101 |
+
$this->setAcl(Mage::getResourceModel('api/acl')->loadAcl());
|
102 |
+
} else {
|
103 |
+
Mage::throwException(Mage::helper('api')->__('Unable to login.'));
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
return $user;
|
108 |
+
}
|
109 |
+
|
110 |
+
public function refreshAcl($user=null)
|
111 |
+
{
|
112 |
+
if (is_null($user)) {
|
113 |
+
$user = $this->getUser();
|
114 |
+
}
|
115 |
+
if (!$user) {
|
116 |
+
return $this;
|
117 |
+
}
|
118 |
+
if (!$this->getAcl() || $user->getReloadAclFlag()) {
|
119 |
+
$this->setAcl(Mage::getResourceModel('api/acl')->loadAcl());
|
120 |
+
}
|
121 |
+
if ($user->getReloadAclFlag()) {
|
122 |
+
$user->unsetData('api_key');
|
123 |
+
$user->setReloadAclFlag('0')->save();
|
124 |
+
}
|
125 |
+
return $this;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Check current user permission on resource and privilege
|
130 |
+
*
|
131 |
+
*
|
132 |
+
* @param string $resource
|
133 |
+
* @param string $privilege
|
134 |
+
* @return bool
|
135 |
+
*/
|
136 |
+
public function isAllowed($resource, $privilege=null)
|
137 |
+
{
|
138 |
+
$user = $this->getUser();
|
139 |
+
$acl = $this->getAcl();
|
140 |
+
|
141 |
+
if ($user && $acl) {
|
142 |
+
try {
|
143 |
+
if ($acl->isAllowed($user->getAclRole(), 'all', null)){
|
144 |
+
return true;
|
145 |
+
}
|
146 |
+
} catch (Exception $e) {}
|
147 |
+
|
148 |
+
try {
|
149 |
+
return $acl->isAllowed($user->getAclRole(), $resource, $privilege);
|
150 |
+
} catch (Exception $e) {
|
151 |
+
return false;
|
152 |
+
}
|
153 |
+
}
|
154 |
+
return false;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Check session expiration
|
159 |
+
*
|
160 |
+
* @return boolean
|
161 |
+
*/
|
162 |
+
public function isSessionExpired ($user)
|
163 |
+
{
|
164 |
+
if (!$user->getId()) {
|
165 |
+
return true;
|
166 |
+
}
|
167 |
+
$timeout = strtotime( now() ) - strtotime( $user->getLogdate() );
|
168 |
+
return $timeout > Mage::getStoreConfig('api/config/session_timeout');
|
169 |
+
}
|
170 |
+
|
171 |
+
|
172 |
+
public function isLoggedIn($sessId = false)
|
173 |
+
{
|
174 |
+
$userExists = $this->getUser() && $this->getUser()->getId();
|
175 |
+
|
176 |
+
if (!$userExists && $sessId !== false) {
|
177 |
+
return $this->_renewBySessId($sessId);
|
178 |
+
}
|
179 |
+
|
180 |
+
if ($userExists) {
|
181 |
+
Mage::register('isSecureArea', true, true);
|
182 |
+
}
|
183 |
+
return $userExists;
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Renew user by session ID if session not expired
|
188 |
+
*
|
189 |
+
* @param string $sessId
|
190 |
+
* @return boolean
|
191 |
+
*/
|
192 |
+
protected function _renewBySessId ($sessId)
|
193 |
+
{
|
194 |
+
$user = Mage::getModel('api/user')->loadBySessId($sessId);
|
195 |
+
if (!$user->getId() || !$user->getSessid()) {
|
196 |
+
return false;
|
197 |
+
}
|
198 |
+
|
199 |
+
if ($user->getSessid() == $sessId && !$this->isSessionExpired($user)) {
|
200 |
+
$this->setUser($user);
|
201 |
+
$this->setAcl(Mage::getResourceModel('api/acl')->loadAcl());
|
202 |
+
|
203 |
+
$user->getResource()->recordLogin($user)
|
204 |
+
->recordSession($user);
|
205 |
+
|
206 |
+
return true;
|
207 |
+
}
|
208 |
+
return false;
|
209 |
+
}
|
210 |
+
|
211 |
+
} // Class Mage_Api_Model_Session End
|
app/code/core/Mage/Api/Model/User.php
ADDED
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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()
|
32 |
+
* @method string getFirstname()
|
33 |
+
* @method Mage_Api_Model_User setFirstname(string $value)
|
34 |
+
* @method string getLastname()
|
35 |
+
* @method Mage_Api_Model_User setLastname(string $value)
|
36 |
+
* @method string getEmail()
|
37 |
+
* @method Mage_Api_Model_User setEmail(string $value)
|
38 |
+
* @method string getUsername()
|
39 |
+
* @method Mage_Api_Model_User setUsername(string $value)
|
40 |
+
* @method string getApiKey()
|
41 |
+
* @method Mage_Api_Model_User setApiKey(string $value)
|
42 |
+
* @method string getCreated()
|
43 |
+
* @method Mage_Api_Model_User setCreated(string $value)
|
44 |
+
* @method string getModified()
|
45 |
+
* @method Mage_Api_Model_User setModified(string $value)
|
46 |
+
* @method int getLognum()
|
47 |
+
* @method Mage_Api_Model_User setLognum(int $value)
|
48 |
+
* @method int getReloadAclFlag()
|
49 |
+
* @method Mage_Api_Model_User setReloadAclFlag(int $value)
|
50 |
+
* @method int getIsActive()
|
51 |
+
* @method Mage_Api_Model_User setIsActive(int $value)
|
52 |
+
*
|
53 |
+
* @category Mage
|
54 |
+
* @package Mage_Api
|
55 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
56 |
+
*/
|
57 |
+
class Mage_Api_Model_User extends Mage_Core_Model_Abstract
|
58 |
+
{
|
59 |
+
protected function _construct()
|
60 |
+
{
|
61 |
+
$this->_init('api/user');
|
62 |
+
}
|
63 |
+
|
64 |
+
public function save()
|
65 |
+
{
|
66 |
+
$this->_beforeSave();
|
67 |
+
$data = array(
|
68 |
+
'firstname' => $this->getFirstname(),
|
69 |
+
'lastname' => $this->getLastname(),
|
70 |
+
'email' => $this->getEmail(),
|
71 |
+
'modified' => Mage::getSingleton('core/date')->gmtDate()
|
72 |
+
);
|
73 |
+
|
74 |
+
if($this->getId() > 0) {
|
75 |
+
$data['user_id'] = $this->getId();
|
76 |
+
}
|
77 |
+
|
78 |
+
if( $this->getUsername() ) {
|
79 |
+
$data['username'] = $this->getUsername();
|
80 |
+
}
|
81 |
+
|
82 |
+
if ($this->getApiKey()) {
|
83 |
+
$data['api_key'] = $this->_getEncodedApiKey($this->getApiKey());
|
84 |
+
}
|
85 |
+
|
86 |
+
if ($this->getNewApiKey()) {
|
87 |
+
$data['api_key'] = $this->_getEncodedApiKey($this->getNewApiKey());
|
88 |
+
}
|
89 |
+
|
90 |
+
if ( !is_null($this->getIsActive()) ) {
|
91 |
+
$data['is_active'] = intval($this->getIsActive());
|
92 |
+
}
|
93 |
+
|
94 |
+
$this->setData($data);
|
95 |
+
$this->_getResource()->save($this);
|
96 |
+
$this->_afterSave();
|
97 |
+
return $this;
|
98 |
+
}
|
99 |
+
|
100 |
+
public function delete()
|
101 |
+
{
|
102 |
+
$this->_beforeDelete();
|
103 |
+
$this->_getResource()->delete($this);
|
104 |
+
$this->_afterDelete();
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
|
108 |
+
public function saveRelations()
|
109 |
+
{
|
110 |
+
$this->_getResource()->_saveRelations($this);
|
111 |
+
return $this;
|
112 |
+
}
|
113 |
+
|
114 |
+
public function getRoles()
|
115 |
+
{
|
116 |
+
return $this->_getResource()->_getRoles($this);
|
117 |
+
}
|
118 |
+
|
119 |
+
public function deleteFromRole()
|
120 |
+
{
|
121 |
+
$this->_getResource()->deleteFromRole($this);
|
122 |
+
return $this;
|
123 |
+
}
|
124 |
+
|
125 |
+
public function roleUserExists()
|
126 |
+
{
|
127 |
+
$result = $this->_getResource()->roleUserExists($this);
|
128 |
+
return ( is_array($result) && count($result) > 0 ) ? true : false;
|
129 |
+
}
|
130 |
+
|
131 |
+
public function add()
|
132 |
+
{
|
133 |
+
$this->_getResource()->add($this);
|
134 |
+
return $this;
|
135 |
+
}
|
136 |
+
|
137 |
+
public function userExists()
|
138 |
+
{
|
139 |
+
$result = $this->_getResource()->userExists($this);
|
140 |
+
return ( is_array($result) && count($result) > 0 ) ? true : false;
|
141 |
+
}
|
142 |
+
|
143 |
+
public function getCollection() {
|
144 |
+
return Mage::getResourceModel('api/user_collection');
|
145 |
+
}
|
146 |
+
|
147 |
+
public function getName($separator=' ')
|
148 |
+
{
|
149 |
+
return $this->getFirstname().$separator.$this->getLastname();
|
150 |
+
}
|
151 |
+
|
152 |
+
public function getId()
|
153 |
+
{
|
154 |
+
return $this->getUserId();
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Get user ACL role
|
159 |
+
*
|
160 |
+
* @return string
|
161 |
+
*/
|
162 |
+
public function getAclRole()
|
163 |
+
{
|
164 |
+
return 'U'.$this->getUserId();
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Authenticate user name and api key and save loaded record
|
169 |
+
*
|
170 |
+
* @param string $username
|
171 |
+
* @param string $apiKey
|
172 |
+
* @return boolean
|
173 |
+
*/
|
174 |
+
public function authenticate($username, $apiKey)
|
175 |
+
{
|
176 |
+
$this->loadByUsername($username);
|
177 |
+
if (!$this->getId()) {
|
178 |
+
return false;
|
179 |
+
}
|
180 |
+
$auth = Mage::helper('core')->validateHash($apiKey, $this->getApiKey());
|
181 |
+
if ($auth) {
|
182 |
+
return true;
|
183 |
+
} else {
|
184 |
+
$this->unsetData();
|
185 |
+
return false;
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Login user
|
191 |
+
*
|
192 |
+
* @param string $login
|
193 |
+
* @param string $apiKey
|
194 |
+
* @return Mage_Api_Model_User
|
195 |
+
*/
|
196 |
+
public function login($username, $apiKey)
|
197 |
+
{
|
198 |
+
$sessId = $this->getSessid();
|
199 |
+
if ($this->authenticate($username, $apiKey)) {
|
200 |
+
$this->setSessid($sessId);
|
201 |
+
$this->getResource()->cleanOldSessions($this)
|
202 |
+
->recordLogin($this)
|
203 |
+
->recordSession($this);
|
204 |
+
Mage::dispatchEvent('api_user_authenticated', array(
|
205 |
+
'model' => $this,
|
206 |
+
'api_key' => $apiKey,
|
207 |
+
));
|
208 |
+
}
|
209 |
+
|
210 |
+
return $this;
|
211 |
+
}
|
212 |
+
|
213 |
+
public function reload()
|
214 |
+
{
|
215 |
+
$this->load($this->getId());
|
216 |
+
return $this;
|
217 |
+
}
|
218 |
+
|
219 |
+
public function loadByUsername($username)
|
220 |
+
{
|
221 |
+
$this->setData($this->getResource()->loadByUsername($username));
|
222 |
+
return $this;
|
223 |
+
}
|
224 |
+
|
225 |
+
public function loadBySessId ($sessId)
|
226 |
+
{
|
227 |
+
$this->setData($this->getResource()->loadBySessId($sessId));
|
228 |
+
return $this;
|
229 |
+
}
|
230 |
+
|
231 |
+
public function logoutBySessId($sessid)
|
232 |
+
{
|
233 |
+
$this->getResource()->clearBySessId($sessid);
|
234 |
+
return $this;
|
235 |
+
}
|
236 |
+
|
237 |
+
public function hasAssigned2Role($user)
|
238 |
+
{
|
239 |
+
return $this->getResource()->hasAssigned2Role($user);
|
240 |
+
}
|
241 |
+
|
242 |
+
protected function _getEncodedApiKey($apiKey)
|
243 |
+
{
|
244 |
+
return Mage::helper('core')->getHash($apiKey, 2);
|
245 |
+
}
|
246 |
+
|
247 |
+
}
|
app/code/core/Mage/Api/Model/Wsdl/Config.php
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Wsdl config model
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_Model_Wsdl_Config extends Mage_Api_Model_Wsdl_Config_Base
|
35 |
+
{
|
36 |
+
protected static $_namespacesPrefix = null;
|
37 |
+
|
38 |
+
public function __construct($sourceData=null)
|
39 |
+
{
|
40 |
+
$this->setCacheId('wsdl_config_global');
|
41 |
+
parent::__construct($sourceData);
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Return wsdl content
|
46 |
+
*
|
47 |
+
* @return string
|
48 |
+
*/
|
49 |
+
public function getWsdlContent()
|
50 |
+
{
|
51 |
+
return $this->_xml->asXML();
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Return namespaces with their prefix
|
56 |
+
*
|
57 |
+
* @return array
|
58 |
+
*/
|
59 |
+
public static function getNamespacesPrefix()
|
60 |
+
{
|
61 |
+
if (is_null(self::$_namespacesPrefix)) {
|
62 |
+
self::$_namespacesPrefix = array();
|
63 |
+
$config = Mage::getSingleton('api/config')->getNode('v2/wsdl/prefix')->children();
|
64 |
+
foreach ($config as $prefix => $namespace) {
|
65 |
+
self::$_namespacesPrefix[$namespace->asArray()] = $prefix;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
return self::$_namespacesPrefix;
|
69 |
+
}
|
70 |
+
|
71 |
+
public function getCache()
|
72 |
+
{
|
73 |
+
return Mage::app()->getCache();
|
74 |
+
}
|
75 |
+
|
76 |
+
protected function _loadCache($id)
|
77 |
+
{
|
78 |
+
return Mage::app()->loadCache($id);
|
79 |
+
}
|
80 |
+
|
81 |
+
protected function _saveCache($data, $id, $tags=array(), $lifetime=false)
|
82 |
+
{
|
83 |
+
return Mage::app()->saveCache($data, $id, $tags, $lifetime);
|
84 |
+
}
|
85 |
+
|
86 |
+
protected function _removeCache($id)
|
87 |
+
{
|
88 |
+
return Mage::app()->removeCache($id);
|
89 |
+
}
|
90 |
+
|
91 |
+
public function init()
|
92 |
+
{
|
93 |
+
$this->setCacheChecksum(null);
|
94 |
+
$saveCache = true;
|
95 |
+
|
96 |
+
if (Mage::app()->useCache('config')) {
|
97 |
+
$loaded = $this->loadCache();
|
98 |
+
if ($loaded) {
|
99 |
+
return $this;
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
$mergeWsdl = new Mage_Api_Model_Wsdl_Config_Base();
|
104 |
+
$mergeWsdl->setHandler($this->getHandler());
|
105 |
+
|
106 |
+
if(Mage::helper('api/data')->isComplianceWSI()){
|
107 |
+
/**
|
108 |
+
* Exclude Mage_Api wsdl xml file because it used for previous version
|
109 |
+
* of API wsdl declaration
|
110 |
+
*/
|
111 |
+
$mergeWsdl->addLoadedFile(Mage::getConfig()->getModuleDir('etc', "Mage_Api").DS.'wsi.xml');
|
112 |
+
|
113 |
+
$baseWsdlFile = Mage::getConfig()->getModuleDir('etc', "Mage_Api").DS.'wsi.xml';
|
114 |
+
$this->loadFile($baseWsdlFile);
|
115 |
+
Mage::getConfig()->loadModulesConfiguration('wsi.xml', $this, $mergeWsdl);
|
116 |
+
} else {
|
117 |
+
/**
|
118 |
+
* Exclude Mage_Api wsdl xml file because it used for previous version
|
119 |
+
* of API wsdl declaration
|
120 |
+
*/
|
121 |
+
$mergeWsdl->addLoadedFile(Mage::getConfig()->getModuleDir('etc', "Mage_Api").DS.'wsdl.xml');
|
122 |
+
|
123 |
+
$baseWsdlFile = Mage::getConfig()->getModuleDir('etc', "Mage_Api").DS.'wsdl2.xml';
|
124 |
+
$this->loadFile($baseWsdlFile);
|
125 |
+
Mage::getConfig()->loadModulesConfiguration('wsdl.xml', $this, $mergeWsdl);
|
126 |
+
}
|
127 |
+
|
128 |
+
if (Mage::app()->useCache('config')) {
|
129 |
+
$this->saveCache(array('config'));
|
130 |
+
}
|
131 |
+
|
132 |
+
return $this;
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Return Xml of node as string
|
137 |
+
*
|
138 |
+
* @return string
|
139 |
+
*/
|
140 |
+
public function getXmlString()
|
141 |
+
{
|
142 |
+
return $this->getNode()->asXML();
|
143 |
+
}
|
144 |
+
}
|
app/code/core/Mage/Api/Model/Wsdl/Config/Base.php
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Wsdl base config
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_Model_Wsdl_Config_Base extends Varien_Simplexml_Config
|
35 |
+
{
|
36 |
+
protected $_handler = '';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* @var Varien_Object
|
40 |
+
*/
|
41 |
+
protected $_wsdlVariables = null;
|
42 |
+
|
43 |
+
protected $_loadedFiles = array();
|
44 |
+
|
45 |
+
public function __construct($sourceData=null)
|
46 |
+
{
|
47 |
+
$this->_elementClass = 'Mage_Api_Model_Wsdl_Config_Element';
|
48 |
+
parent::__construct($sourceData);
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Set handler
|
53 |
+
*
|
54 |
+
* @param string $handler
|
55 |
+
* @return Mage_Api_Model_Wsdl_Config_Base
|
56 |
+
*/
|
57 |
+
public function setHandler($handler)
|
58 |
+
{
|
59 |
+
$this->_handler = $handler;
|
60 |
+
return $this;
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Get handler
|
65 |
+
*
|
66 |
+
* @return string
|
67 |
+
*/
|
68 |
+
public function getHandler()
|
69 |
+
{
|
70 |
+
return $this->_handler;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Processing file data
|
75 |
+
*
|
76 |
+
* @param string $text
|
77 |
+
* @return string
|
78 |
+
*/
|
79 |
+
public function processFileData($text)
|
80 |
+
{
|
81 |
+
$template = Mage::getModel('core/email_template_filter');
|
82 |
+
|
83 |
+
if (null === $this->_wsdlVariables) {
|
84 |
+
$this->_wsdlVariables = new Varien_Object();
|
85 |
+
$this->_wsdlVariables->setUrl(Mage::getUrl('*/*/*'));
|
86 |
+
$this->_wsdlVariables->setName('Magento');
|
87 |
+
$this->_wsdlVariables->setHandler($this->getHandler());
|
88 |
+
}
|
89 |
+
|
90 |
+
$template->setVariables(array('wsdl'=>$this->_wsdlVariables));
|
91 |
+
|
92 |
+
$text = $template->filter($text);
|
93 |
+
|
94 |
+
return $text;
|
95 |
+
}
|
96 |
+
|
97 |
+
public function addLoadedFile($file)
|
98 |
+
{
|
99 |
+
if (!in_array($file, $this->_loadedFiles)) {
|
100 |
+
$this->_loadedFiles[] = $file;
|
101 |
+
}
|
102 |
+
return $this;
|
103 |
+
}
|
104 |
+
|
105 |
+
public function loadFile($file)
|
106 |
+
{
|
107 |
+
if (in_array($file, $this->_loadedFiles)) {
|
108 |
+
return false;
|
109 |
+
}
|
110 |
+
$res = parent::loadFile($file);
|
111 |
+
if ($res) {
|
112 |
+
$this->addLoadedFile($file);
|
113 |
+
}
|
114 |
+
return $this;
|
115 |
+
}
|
116 |
+
}
|
app/code/core/Mage/Api/Model/Wsdl/Config/Element.php
ADDED
@@ -0,0 +1,265 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Wsdl element model
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Core
|
33 |
+
*/
|
34 |
+
class Mage_Api_Model_Wsdl_Config_Element extends Varien_Simplexml_Element
|
35 |
+
{
|
36 |
+
public function extend($source, $overwrite=false)
|
37 |
+
{
|
38 |
+
if (!$source instanceof Varien_Simplexml_Element) {
|
39 |
+
return $this;
|
40 |
+
}
|
41 |
+
|
42 |
+
foreach ($this->getChildren($source) as $namespace => $children) {
|
43 |
+
foreach ($children as $child) {
|
44 |
+
$this->extendChild($child, $overwrite, $namespace);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
return $this;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Extends one node
|
53 |
+
*
|
54 |
+
* @param Varien_Simplexml_Element $source
|
55 |
+
* @param boolean $overwrite
|
56 |
+
* @return Varien_Simplexml_Element
|
57 |
+
*/
|
58 |
+
public function extendChild($source, $overwrite=false, $elmNamespace = '')
|
59 |
+
{
|
60 |
+
// this will be our new target node
|
61 |
+
$targetChild = null;
|
62 |
+
|
63 |
+
// name of the source node
|
64 |
+
$sourceName = $source->getName();
|
65 |
+
|
66 |
+
// here we have children of our source node
|
67 |
+
$sourceChildren = $this->getChildren($source);
|
68 |
+
|
69 |
+
if ($elmNamespace == '') {
|
70 |
+
$elmNamespace = null;
|
71 |
+
}
|
72 |
+
|
73 |
+
if (!$source->hasChildren()) {
|
74 |
+
// handle string node
|
75 |
+
$elm = $this->getElementByName($source, $elmNamespace);
|
76 |
+
if (!is_null($elm)) {
|
77 |
+
|
78 |
+
// if target already has children return without regard
|
79 |
+
if ($this->getChildren($elm)) {
|
80 |
+
return $this;
|
81 |
+
}
|
82 |
+
if ($overwrite) {
|
83 |
+
// unset($this->$sourceName);
|
84 |
+
unset($elm);
|
85 |
+
} else {
|
86 |
+
return $this;
|
87 |
+
}
|
88 |
+
}
|
89 |
+
$targetChild = $this->addChild($sourceName, $source->xmlentities(), $elmNamespace);
|
90 |
+
$targetChild->setParent($this);
|
91 |
+
foreach ($this->getAttributes($source) as $namespace => $attributes) {
|
92 |
+
foreach ($attributes as $key => $value) {
|
93 |
+
$_namespacesPrefix = Mage_Api_Model_Wsdl_Config::getNamespacesPrefix();
|
94 |
+
if ($namespace == '') {
|
95 |
+
$namespace = null;
|
96 |
+
} elseif (array_key_exists($namespace, $_namespacesPrefix)) {
|
97 |
+
$key = $_namespacesPrefix[$namespace] . ':' . $key;
|
98 |
+
}
|
99 |
+
|
100 |
+
$targetChild->addAttribute($key, $this->xmlentities($value), $namespace);
|
101 |
+
}
|
102 |
+
}
|
103 |
+
return $this;
|
104 |
+
}
|
105 |
+
|
106 |
+
$elm = $this->getElementByName($source, $elmNamespace);
|
107 |
+
if (!is_null($elm)) {
|
108 |
+
$targetChild = $elm;
|
109 |
+
}
|
110 |
+
if (is_null($targetChild)) {
|
111 |
+
// if child target is not found create new and descend
|
112 |
+
$targetChild = $this->addChild($sourceName, null, $elmNamespace);
|
113 |
+
$targetChild->setParent($this);
|
114 |
+
foreach ($this->getAttributes($source) as $namespace => $attributes) {
|
115 |
+
foreach ($attributes as $key => $value) {
|
116 |
+
$_namespacesPrefix = Mage_Api_Model_Wsdl_Config::getNamespacesPrefix();
|
117 |
+
if ($namespace == '') {
|
118 |
+
$namespace = null;
|
119 |
+
} elseif (array_key_exists($namespace, $_namespacesPrefix)) {
|
120 |
+
$key = $_namespacesPrefix[$namespace] . ':' . $key;
|
121 |
+
}
|
122 |
+
$targetChild->addAttribute($key, $this->xmlentities($value), $namespace);
|
123 |
+
}
|
124 |
+
}
|
125 |
+
}
|
126 |
+
|
127 |
+
foreach ($sourceChildren as $elmNamespace => $children) {
|
128 |
+
foreach ($children as $childKey => $childNode) {
|
129 |
+
$targetChild->extendChild($childNode, $overwrite, $elmNamespace);
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
return $this;
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Return attributes of all namespaces
|
138 |
+
*
|
139 |
+
* array(
|
140 |
+
* namespace => array(
|
141 |
+
* attribute_key => attribute_value,
|
142 |
+
* ...
|
143 |
+
* )
|
144 |
+
* )
|
145 |
+
*
|
146 |
+
* @param Varien_Simplexml_Element $source
|
147 |
+
* @return array
|
148 |
+
*/
|
149 |
+
public function getAttributes($source, $namespace = null)
|
150 |
+
{
|
151 |
+
$attributes = array();
|
152 |
+
if (!is_null($namespace)) {
|
153 |
+
$attributes[$namespace] = $source->attributes($namespace);
|
154 |
+
return $attributes;
|
155 |
+
}
|
156 |
+
$namespaces = $source->getNamespaces(true);
|
157 |
+
$attributes[''] = $source->attributes('');
|
158 |
+
foreach ($namespaces as $key => $value) {
|
159 |
+
if ($key == '' || $key == 'soap') {
|
160 |
+
continue;
|
161 |
+
}
|
162 |
+
$attributes[$value] = $source->attributes($value);
|
163 |
+
}
|
164 |
+
return $attributes;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Return children of all namespaces
|
169 |
+
*
|
170 |
+
* @param Varien_Simplexml_Element $source
|
171 |
+
*/
|
172 |
+
public function getChildren($source)
|
173 |
+
{
|
174 |
+
$children = array();
|
175 |
+
$namespaces = $source->getNamespaces(true);
|
176 |
+
|
177 |
+
$isWsi = Mage::helper('api/data')->isComplianceWSI();
|
178 |
+
|
179 |
+
foreach ($namespaces as $key => $value) {
|
180 |
+
if ($key == '' || (!$isWsi && $key == 'wsdl')) {
|
181 |
+
continue;
|
182 |
+
}
|
183 |
+
$children[$value] = $source->children($value);
|
184 |
+
}
|
185 |
+
$children[''] = $source->children('');
|
186 |
+
return $children;
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Return if has children
|
191 |
+
*
|
192 |
+
* @return boolean
|
193 |
+
*/
|
194 |
+
public function hasChildren()
|
195 |
+
{
|
196 |
+
if (!$this->getChildren($this)) {
|
197 |
+
return false;
|
198 |
+
}
|
199 |
+
|
200 |
+
// simplexml bug: @attributes is in children() but invisible in foreach
|
201 |
+
foreach ($this->getChildren($this) as $namespace => $children) {
|
202 |
+
foreach ($children as $k => $child) {
|
203 |
+
return true;
|
204 |
+
}
|
205 |
+
}
|
206 |
+
return false;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Return element by tag name, and checking attributes with namespaces
|
211 |
+
*
|
212 |
+
* @param Varien_Simplexml_Element $source
|
213 |
+
* @param string $namespace
|
214 |
+
* @return null|Varien_Simplexml_Element
|
215 |
+
*/
|
216 |
+
public function getElementByName($source, $elmNamespace = '')
|
217 |
+
{
|
218 |
+
$sourceName = $source->getName();
|
219 |
+
$extendElmAttributes = $this->getAttributes($source);
|
220 |
+
foreach ($this->children($elmNamespace) as $k => $child) {
|
221 |
+
if ($child->getName() == $sourceName) {
|
222 |
+
$elm = true;
|
223 |
+
foreach ($extendElmAttributes as $namespace => $attributes) {
|
224 |
+
/**
|
225 |
+
* if count of attributes of extend element is 0 in $namespace,
|
226 |
+
* and current element has attributes in $namespace - different elements
|
227 |
+
*/
|
228 |
+
// if (!count($attributes) && count($this->getAttributes($child, $namespace))) {
|
229 |
+
// foreach ($this->getAttributes($child, $namespace) as $attribute) {
|
230 |
+
// $elm = false;
|
231 |
+
// break;
|
232 |
+
// }
|
233 |
+
// }
|
234 |
+
foreach ($attributes as $key => $value) {
|
235 |
+
if (is_null($child->getAttribute($key, $namespace)) || $child->getAttribute($key, $namespace) != $value) {
|
236 |
+
$elm = false;
|
237 |
+
}
|
238 |
+
}
|
239 |
+
}
|
240 |
+
/**
|
241 |
+
* if count of namespaces attributes of element to extend is 0,
|
242 |
+
* but current element has namespaces attributes - different elements
|
243 |
+
*/
|
244 |
+
if (!count($extendElmAttributes) && count($this->getAttributes($child))) {
|
245 |
+
$elm = false;
|
246 |
+
}
|
247 |
+
if ($elm) {
|
248 |
+
return $child;
|
249 |
+
}
|
250 |
+
}
|
251 |
+
}
|
252 |
+
return null;
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Returns attribute value by attribute name
|
257 |
+
*
|
258 |
+
* @return string
|
259 |
+
*/
|
260 |
+
public function getAttribute($name, $namespace = ''){
|
261 |
+
$attrs = $this->attributes($namespace);
|
262 |
+
return isset($attrs[$name]) ? (string)$attrs[$name] : null;
|
263 |
+
}
|
264 |
+
|
265 |
+
}
|
app/code/core/Mage/Api/controllers/IndexController.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Webservice main controller
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_IndexController extends Mage_Api_Controller_Action
|
35 |
+
{
|
36 |
+
public function indexAction()
|
37 |
+
{
|
38 |
+
/* @var $server Mage_Api_Model_Server */
|
39 |
+
$this->_getServer()->init($this)
|
40 |
+
->run();
|
41 |
+
}
|
42 |
+
} // Class Mage_Api_IndexController End
|
app/code/core/Mage/Api/controllers/SoapController.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Webservice main controller
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_SoapController extends Mage_Api_Controller_Action
|
35 |
+
{
|
36 |
+
public function indexAction()
|
37 |
+
{
|
38 |
+
/* @var $server Mage_Api_Model_Server */
|
39 |
+
$this->_getServer()->init($this, 'soap')
|
40 |
+
->run();
|
41 |
+
}
|
42 |
+
} // Class Mage_Api_IndexController End
|
app/code/core/Mage/Api/controllers/V2/SoapController.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* Webservice main controller
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_V2_SoapController extends Mage_Api_Controller_Action
|
35 |
+
{
|
36 |
+
public function indexAction()
|
37 |
+
{
|
38 |
+
if(Mage::helper('api/data')->isComplianceWSI()){
|
39 |
+
$handler_name = 'soap_wsi';
|
40 |
+
} else {
|
41 |
+
$handler_name = 'soap_v2';
|
42 |
+
}
|
43 |
+
|
44 |
+
/* @var $server Mage_Api_Model_Server */
|
45 |
+
$this->_getServer()->init($this, $handler_name, $handler_name)
|
46 |
+
->run();
|
47 |
+
}
|
48 |
+
} // Class Mage_Api_IndexController End
|
app/code/core/Mage/Api/controllers/XmlrpcController.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) 2011 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 |
+
* Xml Rpc webservice controller
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Api_XmlrpcController extends Mage_Api_Controller_Action
|
35 |
+
{
|
36 |
+
public function indexAction()
|
37 |
+
{
|
38 |
+
$this->_getServer()->init($this, 'xmlrpc')
|
39 |
+
->run();
|
40 |
+
}
|
41 |
+
} // Class Mage_Api_XmlrpcController End
|
app/code/core/Mage/Api/etc/adminhtml.xml
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category Mage
|
23 |
+
* @package Mage_Api
|
24 |
+
* @copyright Copyright (c) 2011 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 |
+
<acl>
|
30 |
+
<resources>
|
31 |
+
<admin>
|
32 |
+
<children>
|
33 |
+
<system>
|
34 |
+
<children>
|
35 |
+
<api translate="title" module="api">
|
36 |
+
<title>Web Services</title>
|
37 |
+
<sort_order>0</sort_order>
|
38 |
+
<children>
|
39 |
+
<users translate="title">
|
40 |
+
<title>Users</title>
|
41 |
+
<sort_order>10</sort_order>
|
42 |
+
</users>
|
43 |
+
<roles translate="title">
|
44 |
+
<title>Roles</title>
|
45 |
+
<sort_order>20</sort_order>
|
46 |
+
</roles>
|
47 |
+
</children>
|
48 |
+
</api>
|
49 |
+
<config>
|
50 |
+
<children>
|
51 |
+
<api translate="title" module="api">
|
52 |
+
<title>Magento Core API Section</title>
|
53 |
+
</api>
|
54 |
+
</children>
|
55 |
+
</config>
|
56 |
+
</children>
|
57 |
+
</system>
|
58 |
+
</children>
|
59 |
+
</admin>
|
60 |
+
</resources>
|
61 |
+
</acl>
|
62 |
+
<menu>
|
63 |
+
<system>
|
64 |
+
<children>
|
65 |
+
<api translate="title" module="api">
|
66 |
+
<title>Web Services</title>
|
67 |
+
<sort_order>25</sort_order>
|
68 |
+
<children>
|
69 |
+
<users translate="title">
|
70 |
+
<title>Users</title>
|
71 |
+
<action>adminhtml/api_user</action>
|
72 |
+
</users>
|
73 |
+
<roles translate="title">
|
74 |
+
<title>Roles</title>
|
75 |
+
<action>adminhtml/api_role</action>
|
76 |
+
</roles>
|
77 |
+
</children>
|
78 |
+
</api>
|
79 |
+
</children>
|
80 |
+
</system>
|
81 |
+
</menu>
|
82 |
+
</config>
|
app/code/core/Mage/Api/etc/api.xml
ADDED
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category Mage
|
23 |
+
* @package Mage_Api
|
24 |
+
* @copyright Copyright (c) 2011 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 |
+
<api>
|
30 |
+
<adapters>
|
31 |
+
<soap>
|
32 |
+
<model>api/server_adapter_soap</model>
|
33 |
+
<handler>default</handler>
|
34 |
+
<active>1</active>
|
35 |
+
<required>
|
36 |
+
<extensions>
|
37 |
+
<soap />
|
38 |
+
</extensions>
|
39 |
+
</required>
|
40 |
+
</soap>
|
41 |
+
<soap_v2>
|
42 |
+
<model>api/server_v2_adapter_soap</model>
|
43 |
+
<handler>soap_v2</handler>
|
44 |
+
<active>1</active>
|
45 |
+
<required>
|
46 |
+
<extensions>
|
47 |
+
<soap />
|
48 |
+
</extensions>
|
49 |
+
</required>
|
50 |
+
</soap_v2>
|
51 |
+
<soap_wsi>
|
52 |
+
<model>api/server_wsi_adapter_soap</model>
|
53 |
+
<handler>soap_wsi</handler>
|
54 |
+
<active>1</active>
|
55 |
+
<required>
|
56 |
+
<extensions>
|
57 |
+
<soap />
|
58 |
+
</extensions>
|
59 |
+
</required>
|
60 |
+
</soap_wsi>
|
61 |
+
<xmlrpc>
|
62 |
+
<model>api/server_adapter_xmlrpc</model>
|
63 |
+
<handler>default</handler>
|
64 |
+
<active>1</active>
|
65 |
+
</xmlrpc>
|
66 |
+
<default>
|
67 |
+
<use>soap</use>
|
68 |
+
</default>
|
69 |
+
</adapters>
|
70 |
+
<handlers>
|
71 |
+
<default>
|
72 |
+
<model>api/server_handler</model>
|
73 |
+
</default>
|
74 |
+
<soap_v2>
|
75 |
+
<model>api/server_v2_handler</model>
|
76 |
+
</soap_v2>
|
77 |
+
<soap_wsi>
|
78 |
+
<model>api/server_wsi_handler</model>
|
79 |
+
</soap_wsi>
|
80 |
+
</handlers>
|
81 |
+
<resources>
|
82 |
+
</resources>
|
83 |
+
<resources_alias>
|
84 |
+
</resources_alias>
|
85 |
+
<v2>
|
86 |
+
<wsdl>
|
87 |
+
<prefix>
|
88 |
+
<wsdl>http://schemas.xmlsoap.org/wsdl/</wsdl>
|
89 |
+
</prefix>
|
90 |
+
</wsdl>
|
91 |
+
</v2>
|
92 |
+
<faults>
|
93 |
+
<unknown>
|
94 |
+
<code>0</code>
|
95 |
+
<message>Unknown Error</message>
|
96 |
+
</unknown>
|
97 |
+
<internal>
|
98 |
+
<code>1</code>
|
99 |
+
<message>Internal Error. Please see log for details.</message>
|
100 |
+
</internal>
|
101 |
+
<access_denied>
|
102 |
+
<code>2</code>
|
103 |
+
<message>Access denied.</message>
|
104 |
+
</access_denied>
|
105 |
+
<resource_path_invalid>
|
106 |
+
<code>3</code>
|
107 |
+
<message>Invalid api path.</message>
|
108 |
+
</resource_path_invalid>
|
109 |
+
<resource_path_not_callable>
|
110 |
+
<code>4</code>
|
111 |
+
<message>Resource path is not callable.</message>
|
112 |
+
</resource_path_not_callable>
|
113 |
+
<session_expired>
|
114 |
+
<code>5</code>
|
115 |
+
<message>Session expired. Try to relogin.</message>
|
116 |
+
</session_expired>
|
117 |
+
<invalid_request_param>
|
118 |
+
<code>6</code>
|
119 |
+
<message>Required parameter is missing, for more details see "exception.log".</message>
|
120 |
+
</invalid_request_param>
|
121 |
+
</faults>
|
122 |
+
<acl>
|
123 |
+
<asserts>
|
124 |
+
<ip><class>Mage_Api_Model_Acl_Assert_Ip</class></ip>
|
125 |
+
<time><class>Mage_Api_Model_Acl_Assert_Time</class></time>
|
126 |
+
</asserts>
|
127 |
+
|
128 |
+
<resources>
|
129 |
+
<all>
|
130 |
+
</all>
|
131 |
+
</resources>
|
132 |
+
|
133 |
+
<privilegeSets>
|
134 |
+
<default>
|
135 |
+
<view descr="View entity"/>
|
136 |
+
<edit descr="Edit entity"/>
|
137 |
+
<delete descr="Delete entity"/>
|
138 |
+
<create descr="Create entity"/>
|
139 |
+
</default>
|
140 |
+
</privilegeSets>
|
141 |
+
</acl>
|
142 |
+
</api>
|
143 |
+
</config>
|
app/code/core/Mage/Api/etc/config.xml
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category Mage
|
23 |
+
* @package Mage_Api
|
24 |
+
* @copyright Copyright (c) 2011 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>
|
35 |
+
<ignoredModules>
|
36 |
+
<entities>
|
37 |
+
<api/>
|
38 |
+
</entities>
|
39 |
+
</ignoredModules>
|
40 |
+
<cache>
|
41 |
+
<types>
|
42 |
+
<config_api translate="label,description" module="api">
|
43 |
+
<label>Web Services Configuration</label>
|
44 |
+
<description>Web Services definition files (api.xml).</description>
|
45 |
+
<tags>CONFIG_API</tags>
|
46 |
+
</config_api>
|
47 |
+
</types>
|
48 |
+
</cache>
|
49 |
+
<models>
|
50 |
+
<api>
|
51 |
+
<class>Mage_Api_Model</class>
|
52 |
+
<resourceModel>api_resource</resourceModel>
|
53 |
+
</api>
|
54 |
+
<api_resource>
|
55 |
+
<class>Mage_Api_Model_Resource</class>
|
56 |
+
<deprecatedNode>api_mysql4</deprecatedNode>
|
57 |
+
<entities>
|
58 |
+
<assert>
|
59 |
+
<table>api_assert</table>
|
60 |
+
</assert>
|
61 |
+
<role>
|
62 |
+
<table>api_role</table>
|
63 |
+
</role>
|
64 |
+
<rule>
|
65 |
+
<table>api_rule</table>
|
66 |
+
</rule>
|
67 |
+
<user>
|
68 |
+
<table>api_user</table>
|
69 |
+
</user>
|
70 |
+
<session>
|
71 |
+
<table>api_session</table>
|
72 |
+
</session>
|
73 |
+
</entities>
|
74 |
+
</api_resource>
|
75 |
+
</models>
|
76 |
+
<resources>
|
77 |
+
<api_setup>
|
78 |
+
<setup>
|
79 |
+
<module>Mage_Api</module>
|
80 |
+
</setup>
|
81 |
+
</api_setup>
|
82 |
+
</resources>
|
83 |
+
<request>
|
84 |
+
<direct_front_name>
|
85 |
+
<api/>
|
86 |
+
</direct_front_name>
|
87 |
+
</request>
|
88 |
+
</global>
|
89 |
+
<frontend>
|
90 |
+
<routers>
|
91 |
+
<api>
|
92 |
+
<use>standard</use>
|
93 |
+
<args>
|
94 |
+
<module>Mage_Api</module>
|
95 |
+
<frontName>api</frontName>
|
96 |
+
</args>
|
97 |
+
</api>
|
98 |
+
</routers>
|
99 |
+
<translate>
|
100 |
+
<modules>
|
101 |
+
<Mage_Api>
|
102 |
+
<files>
|
103 |
+
<default>Mage_Api.csv</default>
|
104 |
+
</files>
|
105 |
+
</Mage_Api>
|
106 |
+
</modules>
|
107 |
+
</translate>
|
108 |
+
</frontend>
|
109 |
+
<adminhtml>
|
110 |
+
<translate>
|
111 |
+
<modules>
|
112 |
+
<Mage_Api>
|
113 |
+
<files>
|
114 |
+
<default>Mage_Api.csv</default>
|
115 |
+
</files>
|
116 |
+
</Mage_Api>
|
117 |
+
</modules>
|
118 |
+
</translate>
|
119 |
+
</adminhtml>
|
120 |
+
<default>
|
121 |
+
<api>
|
122 |
+
<config>
|
123 |
+
<charset>UTF-8</charset>
|
124 |
+
<session_timeout>3600</session_timeout>
|
125 |
+
<compliance_wsi>0</compliance_wsi>
|
126 |
+
</config>
|
127 |
+
</api>
|
128 |
+
</default>
|
129 |
+
</config>
|
app/code/core/Mage/Api/etc/system.xml
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category Mage
|
23 |
+
* @package Mage_Api
|
24 |
+
* @copyright Copyright (c) 2011 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 |
+
<sections>
|
30 |
+
<api translate="label" module="api">
|
31 |
+
<label>Magento Core API</label>
|
32 |
+
<tab>service</tab>
|
33 |
+
<frontend_type>text</frontend_type>
|
34 |
+
<sort_order>101</sort_order>
|
35 |
+
<show_in_default>1</show_in_default>
|
36 |
+
<show_in_website>1</show_in_website>
|
37 |
+
<show_in_store>1</show_in_store>
|
38 |
+
<groups>
|
39 |
+
<config translate="label">
|
40 |
+
<label>General Settings</label>
|
41 |
+
<frontend_type>text</frontend_type>
|
42 |
+
<sort_order>1</sort_order>
|
43 |
+
<show_in_default>1</show_in_default>
|
44 |
+
<show_in_website>1</show_in_website>
|
45 |
+
<show_in_store>1</show_in_store>
|
46 |
+
<fields>
|
47 |
+
<charset translate="label">
|
48 |
+
<label>Default Response Charset</label>
|
49 |
+
<frontend_type>text</frontend_type>
|
50 |
+
<sort_order>10</sort_order>
|
51 |
+
<show_in_default>1</show_in_default>
|
52 |
+
<show_in_website>1</show_in_website>
|
53 |
+
<show_in_store>1</show_in_store>
|
54 |
+
</charset>
|
55 |
+
<session_timeout translate="label">
|
56 |
+
<label>Client Session Timeout (sec.)</label>
|
57 |
+
<frontend_type>text</frontend_type>
|
58 |
+
<sort_order>20</sort_order>
|
59 |
+
<show_in_default>1</show_in_default>
|
60 |
+
<show_in_website>1</show_in_website>
|
61 |
+
<show_in_store>1</show_in_store>
|
62 |
+
</session_timeout>
|
63 |
+
<compliance_wsi translate="label">
|
64 |
+
<label>WS-I Compliance</label>
|
65 |
+
<frontend_type>select</frontend_type>
|
66 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
67 |
+
<backend_model>adminhtml/system_config_backend_store</backend_model>
|
68 |
+
<sort_order>30</sort_order>
|
69 |
+
<show_in_default>1</show_in_default>
|
70 |
+
<show_in_website>1</show_in_website>
|
71 |
+
<show_in_store>1</show_in_store>
|
72 |
+
</compliance_wsi>
|
73 |
+
</fields>
|
74 |
+
</config>
|
75 |
+
</groups>
|
76 |
+
</api>
|
77 |
+
</sections>
|
78 |
+
</config>
|
app/code/core/Mage/Api/etc/wsdl.xml
ADDED
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<definitions xmlns:typens="urn:{{var wsdl.name}}" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
3 |
+
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"
|
4 |
+
name="{{var wsdl.name}}" targetNamespace="urn:{{var wsdl.name}}">
|
5 |
+
<types>
|
6 |
+
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
|
7 |
+
<!-- <import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />-->
|
8 |
+
<complexType name="FixedArray">
|
9 |
+
<complexContent>
|
10 |
+
<restriction base="soapenc:Array">
|
11 |
+
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:anyType[]" />
|
12 |
+
</restriction>
|
13 |
+
</complexContent>
|
14 |
+
</complexType>
|
15 |
+
</schema>
|
16 |
+
</types>
|
17 |
+
<message name="call">
|
18 |
+
<part name="sessionId" type="xsd:string" />
|
19 |
+
<part name="resourcePath" type="xsd:string" />
|
20 |
+
<part name="args" type="xsd:anyType" />
|
21 |
+
</message>
|
22 |
+
<message name="callResponse">
|
23 |
+
<part name="callReturn" type="xsd:anyType" />
|
24 |
+
</message>
|
25 |
+
<message name="multiCall">
|
26 |
+
<part name="sessionId" type="xsd:string" />
|
27 |
+
<part name="calls" type="typens:FixedArray" />
|
28 |
+
<part name="options" type="xsd:anyType" />
|
29 |
+
</message>
|
30 |
+
<message name="multiCallResponse">
|
31 |
+
<part name="multiCallReturn" type="typens:FixedArray" />
|
32 |
+
</message>
|
33 |
+
<message name="endSession">
|
34 |
+
<part name="sessionId" type="xsd:string" />
|
35 |
+
</message>
|
36 |
+
<message name="endSessionResponse">
|
37 |
+
<part name="endSessionReturn" type="xsd:boolean" />
|
38 |
+
</message>
|
39 |
+
<message name="login">
|
40 |
+
<part name="username" type="xsd:string" />
|
41 |
+
<part name="apiKey" type="xsd:string" />
|
42 |
+
</message>
|
43 |
+
<message name="loginResponse">
|
44 |
+
<part name="loginReturn" type="xsd:string" />
|
45 |
+
</message>
|
46 |
+
<message name="resources">
|
47 |
+
<part name="sessionId" type="xsd:string" />
|
48 |
+
</message>
|
49 |
+
<message name="resourcesResponse">
|
50 |
+
<part name="resourcesReturn" type="typens:FixedArray" />
|
51 |
+
</message>
|
52 |
+
<message name="globalFaults">
|
53 |
+
<part name="sessionId" type="xsd:string" />
|
54 |
+
</message>
|
55 |
+
<message name="globalFaultsResponse">
|
56 |
+
<part name="globalFaultsReturn" type="typens:FixedArray" />
|
57 |
+
</message>
|
58 |
+
<message name="resourceFaults">
|
59 |
+
<part name="resourceName" type="xsd:string" />
|
60 |
+
<part name="sessionId" type="xsd:string" />
|
61 |
+
</message>
|
62 |
+
<message name="resourceFaultsResponse">
|
63 |
+
<part name="resourceFaultsReturn" type="typens:FixedArray" />
|
64 |
+
</message>
|
65 |
+
<message name="startSession" />
|
66 |
+
<message name="startSessionResponse">
|
67 |
+
<part name="startSessionReturn" type="xsd:string" />
|
68 |
+
</message>
|
69 |
+
<portType name="{{var wsdl.handler}}PortType">
|
70 |
+
<operation name="call">
|
71 |
+
<documentation>Call api functionality</documentation>
|
72 |
+
<input message="typens:call" />
|
73 |
+
<output message="typens:callResponse" />
|
74 |
+
</operation>
|
75 |
+
<operation name="multiCall">
|
76 |
+
<documentation>Multiple calls of resource functionality</documentation>
|
77 |
+
<input message="typens:multiCall" />
|
78 |
+
<output message="typens:multiCallResponse" />
|
79 |
+
</operation>
|
80 |
+
<operation name="endSession">
|
81 |
+
<documentation>End web service session</documentation>
|
82 |
+
<input message="typens:endSession" />
|
83 |
+
<output message="typens:endSessionResponse" />
|
84 |
+
</operation>
|
85 |
+
<operation name="login">
|
86 |
+
<documentation>Login user and retrive session id</documentation>
|
87 |
+
<input message="typens:login" />
|
88 |
+
<output message="typens:loginResponse" />
|
89 |
+
</operation>
|
90 |
+
<operation name="startSession">
|
91 |
+
<documentation>Start web service session</documentation>
|
92 |
+
<input message="typens:startSession" />
|
93 |
+
<output message="typens:startSessionResponse" />
|
94 |
+
</operation>
|
95 |
+
<operation name="resources">
|
96 |
+
<documentation>List of available resources</documentation>
|
97 |
+
<input message="typens:resources" />
|
98 |
+
<output message="typens:resourcesResponse" />
|
99 |
+
</operation>
|
100 |
+
<operation name="globalFaults">
|
101 |
+
<documentation>List of resource faults</documentation>
|
102 |
+
<input message="typens:globalFaults" />
|
103 |
+
<output message="typens:globalFaultsResponse" />
|
104 |
+
</operation>
|
105 |
+
<operation name="resourceFaults">
|
106 |
+
<documentation>List of global faults</documentation>
|
107 |
+
<input message="typens:resourceFaults" />
|
108 |
+
<output message="typens:resourceFaultsResponse" />
|
109 |
+
</operation>
|
110 |
+
</portType>
|
111 |
+
<binding name="{{var wsdl.handler}}Binding" type="typens:{{var wsdl.handler}}PortType">
|
112 |
+
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
|
113 |
+
<operation name="call">
|
114 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
115 |
+
<input>
|
116 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
117 |
+
</input>
|
118 |
+
<output>
|
119 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
120 |
+
</output>
|
121 |
+
</operation>
|
122 |
+
<operation name="multiCall">
|
123 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
124 |
+
<input>
|
125 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
126 |
+
</input>
|
127 |
+
<output>
|
128 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
129 |
+
</output>
|
130 |
+
</operation>
|
131 |
+
<operation name="endSession">
|
132 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
133 |
+
<input>
|
134 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
135 |
+
</input>
|
136 |
+
<output>
|
137 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
138 |
+
</output>
|
139 |
+
</operation>
|
140 |
+
<operation name="login">
|
141 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
142 |
+
<input>
|
143 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
144 |
+
</input>
|
145 |
+
<output>
|
146 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
147 |
+
</output>
|
148 |
+
</operation>
|
149 |
+
<operation name="startSession">
|
150 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
151 |
+
<input>
|
152 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
153 |
+
</input>
|
154 |
+
<output>
|
155 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
156 |
+
</output>
|
157 |
+
</operation>
|
158 |
+
<operation name="resources">
|
159 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
160 |
+
<input>
|
161 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
162 |
+
</input>
|
163 |
+
<output>
|
164 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
165 |
+
</output>
|
166 |
+
</operation>
|
167 |
+
<operation name="globalFaults">
|
168 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
169 |
+
<input>
|
170 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
171 |
+
</input>
|
172 |
+
<output>
|
173 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
174 |
+
</output>
|
175 |
+
</operation>
|
176 |
+
<operation name="resourceFaults">
|
177 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
178 |
+
<input>
|
179 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
180 |
+
</input>
|
181 |
+
<output>
|
182 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
183 |
+
</output>
|
184 |
+
</operation>
|
185 |
+
</binding>
|
186 |
+
<service name="{{var wsdl.name}}Service">
|
187 |
+
<port name="{{var wsdl.handler}}Port" binding="typens:{{var wsdl.handler}}Binding">
|
188 |
+
<soap:address location="{{var wsdl.url}}" />
|
189 |
+
</port>
|
190 |
+
</service>
|
191 |
+
</definitions>
|
app/code/core/Mage/Api/etc/wsdl2.xml
ADDED
@@ -0,0 +1,229 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<definitions xmlns:typens="urn:{{var wsdl.name}}" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
3 |
+
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"
|
4 |
+
name="{{var wsdl.name}}" targetNamespace="urn:{{var wsdl.name}}">
|
5 |
+
<types>
|
6 |
+
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
|
7 |
+
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />
|
8 |
+
<complexType name="associativeEntity">
|
9 |
+
<all>
|
10 |
+
<element name="key" type="xsd:string" />
|
11 |
+
<element name="value" type="xsd:string" />
|
12 |
+
</all>
|
13 |
+
</complexType>
|
14 |
+
<complexType name="associativeArray">
|
15 |
+
<complexContent>
|
16 |
+
<restriction base="soapenc:Array">
|
17 |
+
<attribute ref="soapenc:arrayType" wsdl:arrayType="typens:associativeEntity[]" />
|
18 |
+
</restriction>
|
19 |
+
</complexContent>
|
20 |
+
</complexType>
|
21 |
+
<complexType name="filters">
|
22 |
+
<all>
|
23 |
+
<element name="filter" type="typens:associativeArray" minOccurs="0" />
|
24 |
+
<element name="complex_filter" type="typens:complexFilterArray" minOccurs="0" />
|
25 |
+
</all>
|
26 |
+
</complexType>
|
27 |
+
<complexType name="complexFilterArray">
|
28 |
+
<complexContent>
|
29 |
+
<restriction base="soapenc:Array">
|
30 |
+
<attribute ref="soapenc:arrayType" wsdl:arrayType="typens:complexFilter[]" />
|
31 |
+
</restriction>
|
32 |
+
</complexContent>
|
33 |
+
</complexType>
|
34 |
+
<complexType name="complexFilter">
|
35 |
+
<all>
|
36 |
+
<element name="key" type="xsd:string" />
|
37 |
+
<element name="value" type="typens:associativeEntity" />
|
38 |
+
</all>
|
39 |
+
</complexType>
|
40 |
+
<complexType name="ArrayOfString">
|
41 |
+
<complexContent>
|
42 |
+
<restriction base="soapenc:Array">
|
43 |
+
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]" />
|
44 |
+
</restriction>
|
45 |
+
</complexContent>
|
46 |
+
</complexType>
|
47 |
+
<complexType name="ArrayOfInt">
|
48 |
+
<complexContent>
|
49 |
+
<restriction base="soapenc:Array">
|
50 |
+
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]" />
|
51 |
+
</restriction>
|
52 |
+
</complexContent>
|
53 |
+
</complexType>
|
54 |
+
<complexType name="apiMethodEntity">
|
55 |
+
<all>
|
56 |
+
<element name="title" type="xsd:string" />
|
57 |
+
<element name="path" type="xsd:string" />
|
58 |
+
<element name="name" type="xsd:string" />
|
59 |
+
<element name="aliases" type="typens:ArrayOfString" />
|
60 |
+
</all>
|
61 |
+
</complexType>
|
62 |
+
<complexType name="ArrayOfApiMethods">
|
63 |
+
<complexContent>
|
64 |
+
<restriction base="soapenc:Array">
|
65 |
+
<attribute ref="soapenc:arrayType" wsdl:arrayType="typens:apiMethodEntity[]" />
|
66 |
+
</restriction>
|
67 |
+
</complexContent>
|
68 |
+
</complexType>
|
69 |
+
<complexType name="apiEntity">
|
70 |
+
<all>
|
71 |
+
<element name="title" type="xsd:string" />
|
72 |
+
<element name="name" type="xsd:string" />
|
73 |
+
<element name="aliases" type="typens:ArrayOfString" />
|
74 |
+
<element name="methods" type="typens:ArrayOfApiMethods" />
|
75 |
+
</all>
|
76 |
+
</complexType>
|
77 |
+
<complexType name="ArrayOfApis">
|
78 |
+
<complexContent>
|
79 |
+
<restriction base="soapenc:Array">
|
80 |
+
<attribute ref="soapenc:arrayType" wsdl:arrayType="typens:apiEntity[]" />
|
81 |
+
</restriction>
|
82 |
+
</complexContent>
|
83 |
+
</complexType>
|
84 |
+
<complexType name="existsFaltureEntity">
|
85 |
+
<all>
|
86 |
+
<element name="code" type="xsd:string" />
|
87 |
+
<element name="message" type="xsd:string" />
|
88 |
+
</all>
|
89 |
+
</complexType>
|
90 |
+
<complexType name="ArrayOfExistsFaltures">
|
91 |
+
<complexContent>
|
92 |
+
<restriction base="soapenc:Array">
|
93 |
+
<attribute ref="soapenc:arrayType" wsdl:arrayType="typens:existsFaltureEntity[]" />
|
94 |
+
</restriction>
|
95 |
+
</complexContent>
|
96 |
+
</complexType>
|
97 |
+
</schema>
|
98 |
+
</types>
|
99 |
+
<message name="endSession">
|
100 |
+
<part name="sessionId" type="xsd:string" />
|
101 |
+
</message>
|
102 |
+
<message name="endSessionResponse">
|
103 |
+
<part name="endSessionReturn" type="xsd:boolean" />
|
104 |
+
</message>
|
105 |
+
<message name="login">
|
106 |
+
<part name="username" type="xsd:string" />
|
107 |
+
<part name="apiKey" type="xsd:string" />
|
108 |
+
</message>
|
109 |
+
<message name="loginResponse">
|
110 |
+
<part name="loginReturn" type="xsd:string" />
|
111 |
+
</message>
|
112 |
+
<message name="resourcesRequest">
|
113 |
+
<part name="sessionId" type="xsd:string" />
|
114 |
+
</message>
|
115 |
+
<message name="resourcesResponse">
|
116 |
+
<part name="resourcesReturn" type="typens:ArrayOfApis" />
|
117 |
+
</message>
|
118 |
+
<message name="globalFaults">
|
119 |
+
<part name="sessionId" type="xsd:string" />
|
120 |
+
</message>
|
121 |
+
<message name="globalFaultsResponse">
|
122 |
+
<part name="globalFaultsReturn" type="typens:ArrayOfExistsFaltures" />
|
123 |
+
</message>
|
124 |
+
<message name="resourceFaults">
|
125 |
+
<part name="resourceName" type="xsd:string" />
|
126 |
+
<part name="sessionId" type="xsd:string" />
|
127 |
+
</message>
|
128 |
+
<message name="resourceFaultsResponse">
|
129 |
+
<part name="resourceFaultsReturn" type="typens:ArrayOfExistsFaltures" />
|
130 |
+
</message>
|
131 |
+
<message name="startSession" />
|
132 |
+
<message name="startSessionResponse">
|
133 |
+
<part name="startSessionReturn" type="xsd:string" />
|
134 |
+
</message>
|
135 |
+
<portType name="{{var wsdl.handler}}PortType">
|
136 |
+
<operation name="endSession">
|
137 |
+
<documentation>End web service session</documentation>
|
138 |
+
<input message="typens:endSession" />
|
139 |
+
<output message="typens:endSessionResponse" />
|
140 |
+
</operation>
|
141 |
+
<operation name="login">
|
142 |
+
<documentation>Login user and retrive session id</documentation>
|
143 |
+
<input message="typens:login" />
|
144 |
+
<output message="typens:loginResponse" />
|
145 |
+
</operation>
|
146 |
+
<operation name="startSession">
|
147 |
+
<documentation>Start web service session</documentation>
|
148 |
+
<input message="typens:startSession" />
|
149 |
+
<output message="typens:startSessionResponse" />
|
150 |
+
</operation>
|
151 |
+
<operation name="resources">
|
152 |
+
<documentation>List of available resources</documentation>
|
153 |
+
<input message="typens:resourcesRequest" />
|
154 |
+
<output message="typens:resourcesResponse" />
|
155 |
+
</operation>
|
156 |
+
<operation name="globalFaults">
|
157 |
+
<documentation>List of global faults</documentation>
|
158 |
+
<input message="typens:globalFaults" />
|
159 |
+
<output message="typens:globalFaultsResponse" />
|
160 |
+
</operation>
|
161 |
+
<operation name="resourceFaults">
|
162 |
+
<documentation>List of resource faults</documentation>
|
163 |
+
<input message="typens:resourceFaults" />
|
164 |
+
<output message="typens:resourceFaultsResponse" />
|
165 |
+
</operation>
|
166 |
+
</portType>
|
167 |
+
<binding name="{{var wsdl.handler}}Binding" type="typens:{{var wsdl.handler}}PortType">
|
168 |
+
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
|
169 |
+
<operation name="endSession">
|
170 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
171 |
+
<input>
|
172 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
173 |
+
</input>
|
174 |
+
<output>
|
175 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
176 |
+
</output>
|
177 |
+
</operation>
|
178 |
+
<operation name="login">
|
179 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
180 |
+
<input>
|
181 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
182 |
+
</input>
|
183 |
+
<output>
|
184 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
185 |
+
</output>
|
186 |
+
</operation>
|
187 |
+
<operation name="startSession">
|
188 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
189 |
+
<input>
|
190 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
191 |
+
</input>
|
192 |
+
<output>
|
193 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
194 |
+
</output>
|
195 |
+
</operation>
|
196 |
+
<operation name="resources">
|
197 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
198 |
+
<input>
|
199 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
200 |
+
</input>
|
201 |
+
<output>
|
202 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
203 |
+
</output>
|
204 |
+
</operation>
|
205 |
+
<operation name="globalFaults">
|
206 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
207 |
+
<input>
|
208 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
209 |
+
</input>
|
210 |
+
<output>
|
211 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
212 |
+
</output>
|
213 |
+
</operation>
|
214 |
+
<operation name="resourceFaults">
|
215 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
216 |
+
<input>
|
217 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
218 |
+
</input>
|
219 |
+
<output>
|
220 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
221 |
+
</output>
|
222 |
+
</operation>
|
223 |
+
</binding>
|
224 |
+
<service name="{{var wsdl.name}}Service">
|
225 |
+
<port name="{{var wsdl.handler}}Port" binding="typens:{{var wsdl.handler}}Binding">
|
226 |
+
<soap:address location="{{var wsdl.url}}" />
|
227 |
+
</port>
|
228 |
+
</service>
|
229 |
+
</definitions>
|
app/code/core/Mage/Api/etc/wsi.xml
ADDED
@@ -0,0 +1,381 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<wsdl:definitions xmlns:typens="urn:{{var wsdl.name}}"
|
3 |
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4 |
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
5 |
+
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
|
6 |
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
7 |
+
name="{{var wsdl.name}}"
|
8 |
+
targetNamespace="urn:{{var wsdl.name}}">
|
9 |
+
<wsdl:types>
|
10 |
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:{{var wsdl.name}}">
|
11 |
+
<xsd:complexType name="associativeEntity">
|
12 |
+
<xsd:sequence>
|
13 |
+
<xsd:element name="key" type="xsd:string" />
|
14 |
+
<xsd:element name="value" type="xsd:string" />
|
15 |
+
</xsd:sequence>
|
16 |
+
</xsd:complexType>
|
17 |
+
<xsd:complexType name="associativeArray">
|
18 |
+
<xsd:sequence>
|
19 |
+
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:associativeEntity" />
|
20 |
+
</xsd:sequence>
|
21 |
+
</xsd:complexType>
|
22 |
+
<xsd:complexType name="associativeMultiEntity">
|
23 |
+
<xsd:sequence>
|
24 |
+
<xsd:element name="key" type="xsd:string" />
|
25 |
+
<xsd:element name="value" type="typens:ArrayOfString" />
|
26 |
+
</xsd:sequence>
|
27 |
+
</xsd:complexType>
|
28 |
+
<xsd:complexType name="associativeMultiArray">
|
29 |
+
<xsd:sequence>
|
30 |
+
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:associativeMultiEntity" />
|
31 |
+
</xsd:sequence>
|
32 |
+
</xsd:complexType>
|
33 |
+
<xsd:complexType name="complexFilter">
|
34 |
+
<xsd:sequence>
|
35 |
+
<xsd:element name="key" type="xsd:string" />
|
36 |
+
<xsd:element name="value" type="typens:associativeEntity" />
|
37 |
+
</xsd:sequence>
|
38 |
+
</xsd:complexType>
|
39 |
+
<xsd:complexType name="complexFilterArray">
|
40 |
+
<xsd:sequence>
|
41 |
+
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:complexFilter" />
|
42 |
+
</xsd:sequence>
|
43 |
+
</xsd:complexType>
|
44 |
+
<xsd:complexType name="filters">
|
45 |
+
<xsd:sequence>
|
46 |
+
<xsd:element name="filter" type="typens:associativeArray" minOccurs="0" />
|
47 |
+
<xsd:element name="complex_filter" type="typens:complexFilterArray" minOccurs="0" />
|
48 |
+
</xsd:sequence>
|
49 |
+
</xsd:complexType>
|
50 |
+
<xsd:complexType name="ArrayOfString">
|
51 |
+
<xsd:sequence>
|
52 |
+
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="xsd:string" />
|
53 |
+
</xsd:sequence>
|
54 |
+
</xsd:complexType>
|
55 |
+
<xsd:complexType name="ArrayOfInt">
|
56 |
+
<xsd:sequence>
|
57 |
+
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="xsd:int" />
|
58 |
+
</xsd:sequence>
|
59 |
+
</xsd:complexType>
|
60 |
+
<xsd:complexType name="apiMethodEntity">
|
61 |
+
<xsd:sequence>
|
62 |
+
<xsd:element name="title" type="xsd:string" />
|
63 |
+
<xsd:element name="path" type="xsd:string" />
|
64 |
+
<xsd:element name="name" type="xsd:string" />
|
65 |
+
<xsd:element name="aliases" type="typens:ArrayOfString" />
|
66 |
+
</xsd:sequence>
|
67 |
+
</xsd:complexType>
|
68 |
+
<xsd:complexType name="ArrayOfApiMethods">
|
69 |
+
<xsd:sequence>
|
70 |
+
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:apiMethodEntity" />
|
71 |
+
</xsd:sequence>
|
72 |
+
</xsd:complexType>
|
73 |
+
<xsd:complexType name="apiEntity">
|
74 |
+
<xsd:sequence>
|
75 |
+
<xsd:element name="title" type="xsd:string" />
|
76 |
+
<xsd:element name="name" type="xsd:string" />
|
77 |
+
<xsd:element name="aliases" type="typens:ArrayOfString" />
|
78 |
+
<xsd:element name="methods" type="typens:ArrayOfApiMethods" />
|
79 |
+
</xsd:sequence>
|
80 |
+
</xsd:complexType>
|
81 |
+
<xsd:complexType name="ArrayOfApis">
|
82 |
+
<xsd:sequence>
|
83 |
+
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:apiEntity" />
|
84 |
+
</xsd:sequence>
|
85 |
+
</xsd:complexType>
|
86 |
+
<xsd:complexType name="existsFaltureEntity">
|
87 |
+
<xsd:sequence>
|
88 |
+
<xsd:element name="code" type="xsd:string" />
|
89 |
+
<xsd:element name="message" type="xsd:string" />
|
90 |
+
</xsd:sequence>
|
91 |
+
</xsd:complexType>
|
92 |
+
<xsd:complexType name="ArrayOfExistsFaltures">
|
93 |
+
<xsd:sequence>
|
94 |
+
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:existsFaltureEntity" />
|
95 |
+
</xsd:sequence>
|
96 |
+
</xsd:complexType>
|
97 |
+
|
98 |
+
|
99 |
+
|
100 |
+
<xsd:element name="callParam">
|
101 |
+
<xsd:complexType>
|
102 |
+
<xsd:sequence>
|
103 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
|
104 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="apiPath" type="xsd:string" />
|
105 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="args" type="xsd:anyType" />
|
106 |
+
</xsd:sequence>
|
107 |
+
</xsd:complexType>
|
108 |
+
</xsd:element>
|
109 |
+
<xsd:element name="callResponseParam">
|
110 |
+
<xsd:complexType>
|
111 |
+
<xsd:sequence>
|
112 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="result" type="xsd:anyType" />
|
113 |
+
</xsd:sequence>
|
114 |
+
</xsd:complexType>
|
115 |
+
</xsd:element>
|
116 |
+
<xsd:element name="multiCallParam">
|
117 |
+
<xsd:complexType>
|
118 |
+
<xsd:sequence>
|
119 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
|
120 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="calls" type="xsd:anyType" />
|
121 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="options" type="xsd:anyType" />
|
122 |
+
</xsd:sequence>
|
123 |
+
</xsd:complexType>
|
124 |
+
</xsd:element>
|
125 |
+
<xsd:element name="multiCallResponseParam">
|
126 |
+
<xsd:complexType>
|
127 |
+
<xsd:sequence>
|
128 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="result" type="xsd:anyType" />
|
129 |
+
</xsd:sequence>
|
130 |
+
</xsd:complexType>
|
131 |
+
</xsd:element>
|
132 |
+
<xsd:element name="endSessionParam">
|
133 |
+
<xsd:complexType>
|
134 |
+
<xsd:sequence>
|
135 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
|
136 |
+
</xsd:sequence>
|
137 |
+
</xsd:complexType>
|
138 |
+
</xsd:element>
|
139 |
+
<xsd:element name="endSessionResponseParam">
|
140 |
+
<xsd:complexType>
|
141 |
+
<xsd:sequence>
|
142 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="result" type="xsd:boolean" />
|
143 |
+
</xsd:sequence>
|
144 |
+
</xsd:complexType>
|
145 |
+
</xsd:element>
|
146 |
+
<xsd:element name="loginParam">
|
147 |
+
<xsd:complexType>
|
148 |
+
<xsd:sequence>
|
149 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="username" type="xsd:string" />
|
150 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="apiKey" type="xsd:string" />
|
151 |
+
</xsd:sequence>
|
152 |
+
</xsd:complexType>
|
153 |
+
</xsd:element>
|
154 |
+
<xsd:element name="loginResponseParam">
|
155 |
+
<xsd:complexType>
|
156 |
+
<xsd:sequence>
|
157 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="result" type="xsd:string" />
|
158 |
+
</xsd:sequence>
|
159 |
+
</xsd:complexType>
|
160 |
+
</xsd:element>
|
161 |
+
<xsd:element name="resourcesRequestParam">
|
162 |
+
<xsd:complexType>
|
163 |
+
<xsd:sequence>
|
164 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
|
165 |
+
</xsd:sequence>
|
166 |
+
</xsd:complexType>
|
167 |
+
</xsd:element>
|
168 |
+
<xsd:element name="resourcesResponseParam">
|
169 |
+
<xsd:complexType>
|
170 |
+
<xsd:sequence>
|
171 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="result" type="typens:ArrayOfApis" />
|
172 |
+
</xsd:sequence>
|
173 |
+
</xsd:complexType>
|
174 |
+
</xsd:element>
|
175 |
+
<xsd:element name="globalFaultsParam">
|
176 |
+
<xsd:complexType>
|
177 |
+
<xsd:sequence>
|
178 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
|
179 |
+
</xsd:sequence>
|
180 |
+
</xsd:complexType>
|
181 |
+
</xsd:element>
|
182 |
+
<xsd:element name="globalFaultsResponseParam">
|
183 |
+
<xsd:complexType>
|
184 |
+
<xsd:sequence>
|
185 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="result" type="typens:ArrayOfExistsFaltures" />
|
186 |
+
</xsd:sequence>
|
187 |
+
</xsd:complexType>
|
188 |
+
</xsd:element>
|
189 |
+
<xsd:element name="resourceFaultsParam">
|
190 |
+
<xsd:complexType>
|
191 |
+
<xsd:sequence>
|
192 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
|
193 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="resourceName" type="xsd:string" />
|
194 |
+
</xsd:sequence>
|
195 |
+
</xsd:complexType>
|
196 |
+
</xsd:element>
|
197 |
+
<xsd:element name="resourceFaultsResponseParam">
|
198 |
+
<xsd:complexType>
|
199 |
+
<xsd:sequence>
|
200 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="result" type="typens:ArrayOfExistsFaltures" />
|
201 |
+
</xsd:sequence>
|
202 |
+
</xsd:complexType>
|
203 |
+
</xsd:element>
|
204 |
+
<xsd:element name="startSessionResponseParam">
|
205 |
+
<xsd:complexType>
|
206 |
+
<xsd:sequence>
|
207 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="result" type="xsd:string" />
|
208 |
+
</xsd:sequence>
|
209 |
+
</xsd:complexType>
|
210 |
+
</xsd:element>
|
211 |
+
</xsd:schema>
|
212 |
+
</wsdl:types>
|
213 |
+
<wsdl:message name="call">
|
214 |
+
<wsdl:part name="parameters" element="typens:callParam" />
|
215 |
+
</wsdl:message>
|
216 |
+
<wsdl:message name="callResponse">
|
217 |
+
<wsdl:part name="parameters" element="typens:callResponseParam" />
|
218 |
+
</wsdl:message>
|
219 |
+
<wsdl:message name="multiCall">
|
220 |
+
<wsdl:part name="parameters" element="typens:multiCallParam" />
|
221 |
+
</wsdl:message>
|
222 |
+
<wsdl:message name="multiCallResponse">
|
223 |
+
<wsdl:part name="parameters" element="typens:multiCallResponseParam" />
|
224 |
+
</wsdl:message>
|
225 |
+
<wsdl:message name="endSession">
|
226 |
+
<wsdl:part name="parameters" element="typens:endSessionParam" />
|
227 |
+
</wsdl:message>
|
228 |
+
<wsdl:message name="endSessionResponse">
|
229 |
+
<wsdl:part name="parameters" element="typens:endSessionResponseParam" />
|
230 |
+
</wsdl:message>
|
231 |
+
<wsdl:message name="login">
|
232 |
+
<wsdl:part name="parameters" element="typens:loginParam" />
|
233 |
+
</wsdl:message>
|
234 |
+
<wsdl:message name="loginResponse">
|
235 |
+
<wsdl:part name="parameters" element="typens:loginResponseParam" />
|
236 |
+
</wsdl:message>
|
237 |
+
<wsdl:message name="resourcesRequest">
|
238 |
+
<wsdl:part name="parameters" element="typens:resourcesRequestParam" />
|
239 |
+
</wsdl:message>
|
240 |
+
<wsdl:message name="resourcesResponse">
|
241 |
+
<wsdl:part name="parameters" element="typens:resourcesResponseParam" />
|
242 |
+
</wsdl:message>
|
243 |
+
<wsdl:message name="globalFaults">
|
244 |
+
<wsdl:part name="parameters" element="typens:globalFaultsParam" />
|
245 |
+
</wsdl:message>
|
246 |
+
<wsdl:message name="globalFaultsResponse">
|
247 |
+
<wsdl:part name="parameters" element="typens:globalFaultsResponseParam" />
|
248 |
+
</wsdl:message>
|
249 |
+
<wsdl:message name="resourceFaults">
|
250 |
+
<wsdl:part name="parameters" element="typens:resourceFaultsParam" />
|
251 |
+
</wsdl:message>
|
252 |
+
<wsdl:message name="resourceFaultsResponse">
|
253 |
+
<wsdl:part name="parameters" element="typens:resourceFaultsResponseParam" />
|
254 |
+
</wsdl:message>
|
255 |
+
<wsdl:message name="startSession" />
|
256 |
+
<wsdl:message name="startSessionResponse">
|
257 |
+
<wsdl:part name="parameters" element="typens:startSessionResponseParam" />
|
258 |
+
</wsdl:message>
|
259 |
+
<wsdl:portType name="{{var wsdl.handler}}PortType">
|
260 |
+
<wsdl:operation name="call">
|
261 |
+
<wsdl:documentation>Call api functionality</wsdl:documentation>
|
262 |
+
<wsdl:input message="typens:call" />
|
263 |
+
<wsdl:output message="typens:callResponse" />
|
264 |
+
</wsdl:operation>
|
265 |
+
<wsdl:operation name="multiCall">
|
266 |
+
<wsdl:documentation>Multiple calls of resource functionality</wsdl:documentation>
|
267 |
+
<wsdl:input message="typens:multiCall" />
|
268 |
+
<wsdl:output message="typens:multiCallResponse" />
|
269 |
+
</wsdl:operation>
|
270 |
+
<wsdl:operation name="endSession">
|
271 |
+
<wsdl:documentation>End web service session</wsdl:documentation>
|
272 |
+
<wsdl:input message="typens:endSession" />
|
273 |
+
<wsdl:output message="typens:endSessionResponse" />
|
274 |
+
</wsdl:operation>
|
275 |
+
<wsdl:operation name="login">
|
276 |
+
<wsdl:documentation>Login user and retrive session id</wsdl:documentation>
|
277 |
+
<wsdl:input message="typens:login" />
|
278 |
+
<wsdl:output message="typens:loginResponse" />
|
279 |
+
</wsdl:operation>
|
280 |
+
<wsdl:operation name="startSession">
|
281 |
+
<wsdl:documentation>Start web service session</wsdl:documentation>
|
282 |
+
<wsdl:input message="typens:startSession" />
|
283 |
+
<wsdl:output message="typens:startSessionResponse" />
|
284 |
+
</wsdl:operation>
|
285 |
+
<wsdl:operation name="resources">
|
286 |
+
<wsdl:documentation>List of available resources</wsdl:documentation>
|
287 |
+
<wsdl:input message="typens:resourcesRequest" />
|
288 |
+
<wsdl:output message="typens:resourcesResponse" />
|
289 |
+
</wsdl:operation>
|
290 |
+
<wsdl:operation name="globalFaults">
|
291 |
+
<wsdl:documentation>List of global faults</wsdl:documentation>
|
292 |
+
<wsdl:input message="typens:globalFaults" />
|
293 |
+
<wsdl:output message="typens:globalFaultsResponse" />
|
294 |
+
</wsdl:operation>
|
295 |
+
<wsdl:operation name="resourceFaults">
|
296 |
+
<wsdl:documentation>List of resource faults</wsdl:documentation>
|
297 |
+
<wsdl:input message="typens:resourceFaults" />
|
298 |
+
<wsdl:output message="typens:resourceFaultsResponse" />
|
299 |
+
</wsdl:operation>
|
300 |
+
</wsdl:portType>
|
301 |
+
<wsdl:binding name="{{var wsdl.handler}}Binding" type="typens:{{var wsdl.handler}}PortType">
|
302 |
+
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
303 |
+
<wsdl:operation name="call">
|
304 |
+
<soap:operation soapAction="" />
|
305 |
+
<wsdl:input>
|
306 |
+
<soap:body use="literal" />
|
307 |
+
</wsdl:input>
|
308 |
+
<wsdl:output>
|
309 |
+
<soap:body use="literal" />
|
310 |
+
</wsdl:output>
|
311 |
+
</wsdl:operation>
|
312 |
+
<wsdl:operation name="multiCall">
|
313 |
+
<soap:operation soapAction="" />
|
314 |
+
<wsdl:input>
|
315 |
+
<soap:body use="literal" />
|
316 |
+
</wsdl:input>
|
317 |
+
<wsdl:output>
|
318 |
+
<soap:body use="literal" />
|
319 |
+
</wsdl:output>
|
320 |
+
</wsdl:operation>
|
321 |
+
<wsdl:operation name="endSession">
|
322 |
+
<soap:operation soapAction="" />
|
323 |
+
<wsdl:input>
|
324 |
+
<soap:body use="literal" />
|
325 |
+
</wsdl:input>
|
326 |
+
<wsdl:output>
|
327 |
+
<soap:body use="literal" />
|
328 |
+
</wsdl:output>
|
329 |
+
</wsdl:operation>
|
330 |
+
<wsdl:operation name="login">
|
331 |
+
<soap:operation soapAction="" />
|
332 |
+
<wsdl:input>
|
333 |
+
<soap:body use="literal" />
|
334 |
+
</wsdl:input>
|
335 |
+
<wsdl:output>
|
336 |
+
<soap:body use="literal" />
|
337 |
+
</wsdl:output>
|
338 |
+
</wsdl:operation>
|
339 |
+
<wsdl:operation name="startSession">
|
340 |
+
<soap:operation soapAction="" />
|
341 |
+
<wsdl:input>
|
342 |
+
<soap:body use="literal" />
|
343 |
+
</wsdl:input>
|
344 |
+
<wsdl:output>
|
345 |
+
<soap:body use="literal" />
|
346 |
+
</wsdl:output>
|
347 |
+
</wsdl:operation>
|
348 |
+
<wsdl:operation name="resources">
|
349 |
+
<soap:operation soapAction="" />
|
350 |
+
<wsdl:input>
|
351 |
+
<soap:body use="literal" />
|
352 |
+
</wsdl:input>
|
353 |
+
<wsdl:output>
|
354 |
+
<soap:body use="literal" />
|
355 |
+
</wsdl:output>
|
356 |
+
</wsdl:operation>
|
357 |
+
<wsdl:operation name="globalFaults">
|
358 |
+
<soap:operation soapAction="" />
|
359 |
+
<wsdl:input>
|
360 |
+
<soap:body use="literal" />
|
361 |
+
</wsdl:input>
|
362 |
+
<wsdl:output>
|
363 |
+
<soap:body use="literal" />
|
364 |
+
</wsdl:output>
|
365 |
+
</wsdl:operation>
|
366 |
+
<wsdl:operation name="resourceFaults">
|
367 |
+
<soap:operation soapAction="" />
|
368 |
+
<wsdl:input>
|
369 |
+
<soap:body use="literal" />
|
370 |
+
</wsdl:input>
|
371 |
+
<wsdl:output>
|
372 |
+
<soap:body use="literal" />
|
373 |
+
</wsdl:output>
|
374 |
+
</wsdl:operation>
|
375 |
+
</wsdl:binding>
|
376 |
+
<wsdl:service name="{{var wsdl.name}}Service">
|
377 |
+
<wsdl:port name="{{var wsdl.handler}}Port" binding="typens:{{var wsdl.handler}}Binding">
|
378 |
+
<soap:address location="{{var wsdl.url}}" />
|
379 |
+
</wsdl:port>
|
380 |
+
</wsdl:service>
|
381 |
+
</wsdl:definitions>
|
app/code/core/Mage/Api/sql/api_setup/install-1.6.0.0.php
ADDED
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 install
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
$installer = $this;
|
35 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
36 |
+
|
37 |
+
$installer->startSetup();
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Create table 'api/assert'
|
41 |
+
*/
|
42 |
+
$table = $installer->getConnection()
|
43 |
+
->newTable($installer->getTable('api/assert'))
|
44 |
+
->addColumn('assert_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
45 |
+
'identity' => true,
|
46 |
+
'unsigned' => true,
|
47 |
+
'nullable' => false,
|
48 |
+
'primary' => true,
|
49 |
+
), 'Assert id')
|
50 |
+
->addColumn('assert_type', Varien_Db_Ddl_Table::TYPE_TEXT, 20, array(
|
51 |
+
), 'Assert type')
|
52 |
+
->addColumn('assert_data', Varien_Db_Ddl_Table::TYPE_TEXT, '64k', array(
|
53 |
+
), 'Assert additional data')
|
54 |
+
->setComment('Api ACL Asserts');
|
55 |
+
$installer->getConnection()->createTable($table);
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Create table 'api/role'
|
59 |
+
*/
|
60 |
+
$table = $installer->getConnection()
|
61 |
+
->newTable($installer->getTable('api/role'))
|
62 |
+
->addColumn('role_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
63 |
+
'identity' => true,
|
64 |
+
'unsigned' => true,
|
65 |
+
'nullable' => false,
|
66 |
+
'primary' => true,
|
67 |
+
), 'Role id')
|
68 |
+
->addColumn('parent_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
69 |
+
'unsigned' => true,
|
70 |
+
'nullable' => false,
|
71 |
+
'default' => '0',
|
72 |
+
), 'Parent role id')
|
73 |
+
->addColumn('tree_level', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
74 |
+
'unsigned' => true,
|
75 |
+
'nullable' => false,
|
76 |
+
'default' => '0',
|
77 |
+
), 'Role level in tree')
|
78 |
+
->addColumn('sort_order', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
79 |
+
'unsigned' => true,
|
80 |
+
'nullable' => false,
|
81 |
+
'default' => '0',
|
82 |
+
), 'Sort order to display on admin area')
|
83 |
+
->addColumn('role_type', Varien_Db_Ddl_Table::TYPE_TEXT, 1, array(
|
84 |
+
'nullable' => false,
|
85 |
+
'default' => '0',
|
86 |
+
), 'Role type')
|
87 |
+
->addColumn('user_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
88 |
+
'unsigned' => true,
|
89 |
+
'nullable' => false,
|
90 |
+
'default' => '0',
|
91 |
+
), 'User id')
|
92 |
+
->addColumn('role_name', Varien_Db_Ddl_Table::TYPE_TEXT, 50, array(
|
93 |
+
), 'Role name')
|
94 |
+
->addIndex($installer->getIdxName('api/role', array('parent_id', 'sort_order')),
|
95 |
+
array('parent_id', 'sort_order'))
|
96 |
+
->addIndex($installer->getIdxName('api/role', array('tree_level')),
|
97 |
+
array('tree_level'))
|
98 |
+
->setComment('Api ACL Roles');
|
99 |
+
$installer->getConnection()->createTable($table);
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Create table 'api/rule'
|
103 |
+
*/
|
104 |
+
$table = $installer->getConnection()
|
105 |
+
->newTable($installer->getTable('api/rule'))
|
106 |
+
->addColumn('rule_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
107 |
+
'identity' => true,
|
108 |
+
'unsigned' => true,
|
109 |
+
'nullable' => false,
|
110 |
+
'primary' => true,
|
111 |
+
), 'Api rule Id')
|
112 |
+
->addColumn('role_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
113 |
+
'unsigned' => true,
|
114 |
+
'nullable' => false,
|
115 |
+
'default' => '0',
|
116 |
+
), 'Api role Id')
|
117 |
+
->addColumn('resource_id', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
|
118 |
+
), 'Module code')
|
119 |
+
->addColumn('api_privileges', Varien_Db_Ddl_Table::TYPE_TEXT, 20, array(
|
120 |
+
), 'Privileges')
|
121 |
+
->addColumn('assert_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
122 |
+
'unsigned' => true,
|
123 |
+
'nullable' => false,
|
124 |
+
'default' => '0',
|
125 |
+
), 'Assert id')
|
126 |
+
->addColumn('role_type', Varien_Db_Ddl_Table::TYPE_TEXT, 1, array(
|
127 |
+
), 'Role type')
|
128 |
+
->addColumn('api_permission', Varien_Db_Ddl_Table::TYPE_TEXT, 10, array(
|
129 |
+
), 'Permission')
|
130 |
+
->addIndex($installer->getIdxName('api/rule', array('resource_id', 'role_id')),
|
131 |
+
array('resource_id', 'role_id'))
|
132 |
+
->addIndex($installer->getIdxName('api/rule', array('role_id', 'resource_id')),
|
133 |
+
array('role_id', 'resource_id'))
|
134 |
+
->addForeignKey($installer->getFkName('api/rule', 'role_id', 'api/role', 'role_id'),
|
135 |
+
'role_id', $installer->getTable('api/role'), 'role_id',
|
136 |
+
Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE)
|
137 |
+
->setComment('Api ACL Rules');
|
138 |
+
$installer->getConnection()->createTable($table);
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Create table 'api/user'
|
142 |
+
*/
|
143 |
+
$table = $installer->getConnection()
|
144 |
+
->newTable($installer->getTable('api/user'))
|
145 |
+
->addColumn('user_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
146 |
+
'identity' => true,
|
147 |
+
'unsigned' => true,
|
148 |
+
'nullable' => false,
|
149 |
+
'primary' => true,
|
150 |
+
), 'User id')
|
151 |
+
->addColumn('firstname', Varien_Db_Ddl_Table::TYPE_TEXT, 32, array(
|
152 |
+
), 'First name')
|
153 |
+
->addColumn('lastname', Varien_Db_Ddl_Table::TYPE_TEXT, 32, array(
|
154 |
+
), 'Last name')
|
155 |
+
->addColumn('email', Varien_Db_Ddl_Table::TYPE_TEXT, 128, array(
|
156 |
+
), 'Email')
|
157 |
+
->addColumn('username', Varien_Db_Ddl_Table::TYPE_TEXT, 40, array(
|
158 |
+
), 'Nickname')
|
159 |
+
->addColumn('api_key', Varien_Db_Ddl_Table::TYPE_TEXT, 40, array(
|
160 |
+
), 'Api key')
|
161 |
+
->addColumn('created', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
|
162 |
+
'nullable' => false,
|
163 |
+
), 'User record create date')
|
164 |
+
->addColumn('modified', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
|
165 |
+
), 'User record modify date')
|
166 |
+
->addColumn('lognum', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
167 |
+
'unsigned' => true,
|
168 |
+
'nullable' => false,
|
169 |
+
'default' => '0',
|
170 |
+
), 'Quantity of log ins')
|
171 |
+
->addColumn('reload_acl_flag', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
172 |
+
'nullable' => false,
|
173 |
+
'default' => '0',
|
174 |
+
), 'Refresh ACL flag')
|
175 |
+
->addColumn('is_active', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
176 |
+
'nullable' => false,
|
177 |
+
'default' => '1',
|
178 |
+
), 'Account status')
|
179 |
+
->setComment('Api Users');
|
180 |
+
$installer->getConnection()->createTable($table);
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Create table 'api/session'
|
184 |
+
*/
|
185 |
+
$table = $installer->getConnection()
|
186 |
+
->newTable($installer->getTable('api/session'))
|
187 |
+
->addColumn('user_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
188 |
+
'unsigned' => true,
|
189 |
+
'nullable' => false,
|
190 |
+
), 'User id')
|
191 |
+
->addColumn('logdate', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
|
192 |
+
'nullable' => false,
|
193 |
+
), 'Login date')
|
194 |
+
->addColumn('sessid', Varien_Db_Ddl_Table::TYPE_TEXT, 40, array(
|
195 |
+
), 'Sessioin id')
|
196 |
+
->addIndex($installer->getIdxName('api/session', array('user_id')),
|
197 |
+
array('user_id'))
|
198 |
+
->addIndex($installer->getIdxName('api/session', array('sessid')),
|
199 |
+
array('sessid'))
|
200 |
+
->addForeignKey($installer->getFkName('api/session', 'user_id', 'api/user', 'user_id'),
|
201 |
+
'user_id', $installer->getTable('api/user'), 'user_id',
|
202 |
+
Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE)
|
203 |
+
->setComment('Api Sessions');
|
204 |
+
$installer->getConnection()->createTable($table);
|
205 |
+
|
206 |
+
|
207 |
+
|
208 |
+
$installer->endSetup();
|
app/code/core/Mage/Api/sql/api_setup/mysql4-install-0.7.0.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
$installer = $this;
|
28 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
29 |
+
|
30 |
+
$installer->startSetup();
|
31 |
+
|
32 |
+
$installer->run("
|
33 |
+
|
34 |
+
-- DROP TABLE IF EXISTS {$this->getTable('api_assert')};
|
35 |
+
CREATE TABLE {$this->getTable('api_assert')} (
|
36 |
+
`assert_id` int(10) unsigned NOT NULL auto_increment,
|
37 |
+
`assert_type` varchar(20) character set utf8 NOT NULL default '',
|
38 |
+
`assert_data` text character set utf8,
|
39 |
+
PRIMARY KEY (`assert_id`)
|
40 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Api ACL Asserts';
|
41 |
+
|
42 |
+
-- DROP TABLE IF EXISTS {$this->getTable('api_role')};
|
43 |
+
CREATE TABLE {$this->getTable('api_role')} (
|
44 |
+
`role_id` int(10) unsigned NOT NULL auto_increment,
|
45 |
+
`parent_id` int(10) unsigned NOT NULL default '0',
|
46 |
+
`tree_level` tinyint(3) unsigned NOT NULL default '0',
|
47 |
+
`sort_order` tinyint(3) unsigned NOT NULL default '0',
|
48 |
+
`role_type` char(1) character set utf8 NOT NULL default '0',
|
49 |
+
`user_id` int(11) unsigned NOT NULL default '0',
|
50 |
+
`role_name` varchar(50) character set utf8 NOT NULL default '',
|
51 |
+
PRIMARY KEY (`role_id`),
|
52 |
+
KEY `parent_id` (`parent_id`,`sort_order`),
|
53 |
+
KEY `tree_level` (`tree_level`)
|
54 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Api ACL Roles';
|
55 |
+
|
56 |
+
-- DROP TABLE IF EXISTS {$this->getTable('api_rule')};
|
57 |
+
CREATE TABLE {$this->getTable('api_rule')} (
|
58 |
+
`rule_id` int(10) unsigned NOT NULL auto_increment,
|
59 |
+
`role_id` int(10) unsigned NOT NULL default '0',
|
60 |
+
`resource_id` varchar(255) character set utf8 NOT NULL default '',
|
61 |
+
`privileges` varchar(20) character set utf8 NOT NULL default '',
|
62 |
+
`assert_id` int(10) unsigned NOT NULL default '0',
|
63 |
+
`role_type` char(1) default NULL,
|
64 |
+
`permission` varchar(10) default NULL,
|
65 |
+
PRIMARY KEY (`rule_id`),
|
66 |
+
KEY `resource` (`resource_id`,`role_id`),
|
67 |
+
KEY `role_id` (`role_id`,`resource_id`),
|
68 |
+
CONSTRAINT `FK_api_rule` FOREIGN KEY (`role_id`) REFERENCES {$this->getTable('api_role')} (`role_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
69 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Api ACL Rules';
|
70 |
+
|
71 |
+
-- DROP TABLE IF EXISTS {$this->getTable('api_user')};
|
72 |
+
CREATE TABLE {$this->getTable('api_user')} (
|
73 |
+
`user_id` mediumint(9) unsigned NOT NULL auto_increment,
|
74 |
+
`firstname` varchar(32) character set utf8 NOT NULL default '',
|
75 |
+
`lastname` varchar(32) character set utf8 NOT NULL default '',
|
76 |
+
`email` varchar(128) character set utf8 NOT NULL default '',
|
77 |
+
`username` varchar(40) character set utf8 NOT NULL default '',
|
78 |
+
`api_key` varchar(40) character set utf8 NOT NULL default '',
|
79 |
+
`created` datetime NOT NULL default '0000-00-00 00:00:00',
|
80 |
+
`modified` datetime default NULL,
|
81 |
+
`logdate` datetime default NULL,
|
82 |
+
`lognum` smallint(5) unsigned NOT NULL default '0',
|
83 |
+
`reload_acl_flag` tinyint(1) NOT NULL default '0',
|
84 |
+
`is_active` tinyint(1) NOT NULL default '1',
|
85 |
+
PRIMARY KEY (`user_id`)
|
86 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Api Users';
|
87 |
+
|
88 |
+
");
|
89 |
+
|
90 |
+
$installer->endSetup();
|
app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.7.0-0.7.1.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* FOREIGN KEY update
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Api
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
|
35 |
+
$installer = $this;
|
36 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
37 |
+
|
38 |
+
$installer->startSetup();
|
39 |
+
$installer->run("ALTER TABLE {$this->getTable('api_user')} ADD `sessid` VARCHAR(40) NOT NULL AFTER `lognum`;");
|
40 |
+
$installer->endSetup();
|
app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.8.0-0.8.1.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
* @category Mage
|
30 |
+
* @package Mage_Api
|
31 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
32 |
+
*/
|
33 |
+
|
34 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
35 |
+
$installer = $this;
|
36 |
+
|
37 |
+
$installer->startSetup();
|
38 |
+
$installer->run("
|
39 |
+
CREATE TABLE `{$installer->getTable('api/session')}` (
|
40 |
+
`user_id` mediumint(9) UNSIGNED NOT NULL,
|
41 |
+
`logdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
42 |
+
`sessid` varchar(40) NOT NULL DEFAULT '',
|
43 |
+
KEY `API_SESSION_USER` (`user_id`),
|
44 |
+
KEY `API_SESSION_SESSID` (`sessid`),
|
45 |
+
CONSTRAINT `FK_API_SESSION_USER` FOREIGN KEY (`user_id`) REFERENCES `{$installer->getTable('api/user')}` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
46 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Api Sessions';
|
47 |
+
");
|
48 |
+
|
49 |
+
$insertStmt = "INSERT INTO
|
50 |
+
`{$installer->getTable('api/session')}` (`user_id`, `logdate`, `sessid`)
|
51 |
+
SELECT `user_id`, `logdate`, `sessid` FROM `{$installer->getTable('api/user')}`";
|
52 |
+
$installer->run($insertStmt);
|
53 |
+
$installer->getConnection()->dropColumn($installer->getTable('api/user'), 'logdate');
|
54 |
+
$installer->getConnection()->dropColumn($installer->getTable('api/user'), 'sessid');
|
55 |
+
|
56 |
+
$installer->endSetup();
|
app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php
ADDED
@@ -0,0 +1,375 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2011 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 |
+
/**
|
32 |
+
* Drop foreign keys
|
33 |
+
*/
|
34 |
+
$installer->getConnection()->dropForeignKey(
|
35 |
+
$installer->getTable('api/rule'),
|
36 |
+
'FK_API_RULE'
|
37 |
+
);
|
38 |
+
|
39 |
+
$installer->getConnection()->dropForeignKey(
|
40 |
+
$installer->getTable('api/session'),
|
41 |
+
'FK_API_SESSION_USER'
|
42 |
+
);
|
43 |
+
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Drop indexes
|
47 |
+
*/
|
48 |
+
$installer->getConnection()->dropIndex(
|
49 |
+
$installer->getTable('api/role'),
|
50 |
+
'PARENT_ID'
|
51 |
+
);
|
52 |
+
|
53 |
+
$installer->getConnection()->dropIndex(
|
54 |
+
$installer->getTable('api/role'),
|
55 |
+
'TREE_LEVEL'
|
56 |
+
);
|
57 |
+
|
58 |
+
$installer->getConnection()->dropIndex(
|
59 |
+
$installer->getTable('api/rule'),
|
60 |
+
'RESOURCE'
|
61 |
+
);
|
62 |
+
|
63 |
+
$installer->getConnection()->dropIndex(
|
64 |
+
$installer->getTable('api/rule'),
|
65 |
+
'ROLE_ID'
|
66 |
+
);
|
67 |
+
|
68 |
+
$installer->getConnection()->dropIndex(
|
69 |
+
$installer->getTable('api/session'),
|
70 |
+
'API_SESSION_USER'
|
71 |
+
);
|
72 |
+
|
73 |
+
$installer->getConnection()->dropIndex(
|
74 |
+
$installer->getTable('api/session'),
|
75 |
+
'API_SESSION_SESSID'
|
76 |
+
);
|
77 |
+
|
78 |
+
|
79 |
+
/*
|
80 |
+
* Change columns
|
81 |
+
*/
|
82 |
+
$tables = array(
|
83 |
+
$installer->getTable('api/assert') => array(
|
84 |
+
'columns' => array(
|
85 |
+
'assert_id' => array(
|
86 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
87 |
+
'identity' => true,
|
88 |
+
'unsigned' => true,
|
89 |
+
'nullable' => false,
|
90 |
+
'primary' => true,
|
91 |
+
'comment' => 'Assert id'
|
92 |
+
),
|
93 |
+
'assert_type' => array(
|
94 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
95 |
+
'length' => 20,
|
96 |
+
'comment' => 'Assert type'
|
97 |
+
),
|
98 |
+
'assert_data' => array(
|
99 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
100 |
+
'length' => '64K',
|
101 |
+
'comment' => 'Assert additional data'
|
102 |
+
)
|
103 |
+
),
|
104 |
+
'comment' => 'Api ACL Asserts'
|
105 |
+
),
|
106 |
+
$installer->getTable('api/role') => array(
|
107 |
+
'columns' => array(
|
108 |
+
'role_id' => array(
|
109 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
110 |
+
'identity' => true,
|
111 |
+
'unsigned' => true,
|
112 |
+
'nullable' => false,
|
113 |
+
'primary' => true,
|
114 |
+
'comment' => 'Role id'
|
115 |
+
),
|
116 |
+
'parent_id' => array(
|
117 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
118 |
+
'unsigned' => true,
|
119 |
+
'nullable' => false,
|
120 |
+
'default' => '0',
|
121 |
+
'comment' => 'Parent role id'
|
122 |
+
),
|
123 |
+
'tree_level' => array(
|
124 |
+
'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
|
125 |
+
'unsigned' => true,
|
126 |
+
'nullable' => false,
|
127 |
+
'default' => '0',
|
128 |
+
'comment' => 'Role level in tree'
|
129 |
+
),
|
130 |
+
'sort_order' => array(
|
131 |
+
'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
|
132 |
+
'unsigned' => true,
|
133 |
+
'nullable' => false,
|
134 |
+
'default' => '0',
|
135 |
+
'comment' => 'Sort order to display on admin area'
|
136 |
+
),
|
137 |
+
'role_type' => array(
|
138 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
139 |
+
'length' => 1,
|
140 |
+
'nullable' => false,
|
141 |
+
'default' => '0',
|
142 |
+
'comment' => 'Role type'
|
143 |
+
),
|
144 |
+
'user_id' => array(
|
145 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
146 |
+
'unsigned' => true,
|
147 |
+
'nullable' => false,
|
148 |
+
'default' => '0',
|
149 |
+
'comment' => 'User id'
|
150 |
+
),
|
151 |
+
'role_name' => array(
|
152 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
153 |
+
'length' => 50,
|
154 |
+
'comment' => 'Role name'
|
155 |
+
)
|
156 |
+
),
|
157 |
+
'comment' => 'Api ACL Roles'
|
158 |
+
),
|
159 |
+
$installer->getTable('api/rule') => array(
|
160 |
+
'columns' => array(
|
161 |
+
'rule_id' => array(
|
162 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
163 |
+
'identity' => true,
|
164 |
+
'unsigned' => true,
|
165 |
+
'nullable' => false,
|
166 |
+
'primary' => true,
|
167 |
+
'comment' => 'Api rule Id'
|
168 |
+
),
|
169 |
+
'role_id' => array(
|
170 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
171 |
+
'unsigned' => true,
|
172 |
+
'nullable' => false,
|
173 |
+
'default' => '0',
|
174 |
+
'comment' => 'Api role Id'
|
175 |
+
),
|
176 |
+
'resource_id' => array(
|
177 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
178 |
+
'length' => 255,
|
179 |
+
'comment' => 'Module code'
|
180 |
+
),
|
181 |
+
'assert_id' => array(
|
182 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
183 |
+
'unsigned' => true,
|
184 |
+
'nullable' => false,
|
185 |
+
'default' => '0',
|
186 |
+
'comment' => 'Assert id'
|
187 |
+
),
|
188 |
+
'role_type' => array(
|
189 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
190 |
+
'length' => 1,
|
191 |
+
'comment' => 'Role type'
|
192 |
+
)
|
193 |
+
),
|
194 |
+
'comment' => 'Api ACL Rules'
|
195 |
+
),
|
196 |
+
$installer->getTable('api/user') => array(
|
197 |
+
'columns' => array(
|
198 |
+
'user_id' => array(
|
199 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
200 |
+
'identity' => true,
|
201 |
+
'unsigned' => true,
|
202 |
+
'nullable' => false,
|
203 |
+
'primary' => true,
|
204 |
+
'comment' => 'User id'
|
205 |
+
),
|
206 |
+
'firstname' => array(
|
207 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
208 |
+
'length' => 32,
|
209 |
+
'comment' => 'First name'
|
210 |
+
),
|
211 |
+
'lastname' => array(
|
212 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
213 |
+
'length' => 32,
|
214 |
+
'comment' => 'Last name'
|
215 |
+
),
|
216 |
+
'email' => array(
|
217 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
218 |
+
'length' => 128,
|
219 |
+
'comment' => 'Email'
|
220 |
+
),
|
221 |
+
'username' => array(
|
222 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
223 |
+
'length' => 40,
|
224 |
+
'comment' => 'Nickname'
|
225 |
+
),
|
226 |
+
'api_key' => array(
|
227 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
228 |
+
'length' => 40,
|
229 |
+
'comment' => 'Api key'
|
230 |
+
),
|
231 |
+
'created' => array(
|
232 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TIMESTAMP,
|
233 |
+
'nullable' => false,
|
234 |
+
'comment' => 'User record create date'
|
235 |
+
),
|
236 |
+
'modified' => array(
|
237 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TIMESTAMP,
|
238 |
+
'comment' => 'User record modify date'
|
239 |
+
),
|
240 |
+
'lognum' => array(
|
241 |
+
'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
|
242 |
+
'unsigned' => true,
|
243 |
+
'nullable' => false,
|
244 |
+
'default' => '0',
|
245 |
+
'comment' => 'Quantity of log ins'
|
246 |
+
),
|
247 |
+
'reload_acl_flag' => array(
|
248 |
+
'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
|
249 |
+
'nullable' => false,
|
250 |
+
'default' => '0',
|
251 |
+
'comment' => 'Refresh ACL flag'
|
252 |
+
),
|
253 |
+
'is_active' => array(
|
254 |
+
'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
|
255 |
+
'nullable' => false,
|
256 |
+
'default' => '1',
|
257 |
+
'comment' => 'Account status'
|
258 |
+
)
|
259 |
+
),
|
260 |
+
'comment' => 'Api Users'
|
261 |
+
),
|
262 |
+
$installer->getTable('api/session') => array(
|
263 |
+
'columns' => array(
|
264 |
+
'user_id' => array(
|
265 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
266 |
+
'unsigned' => true,
|
267 |
+
'nullable' => false,
|
268 |
+
'default' => '0',
|
269 |
+
'comment' => 'User id'
|
270 |
+
),
|
271 |
+
'logdate' => array(
|
272 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TIMESTAMP,
|
273 |
+
'nullable' => false,
|
274 |
+
'comment' => 'Login date'
|
275 |
+
),
|
276 |
+
'sessid' => array(
|
277 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
278 |
+
'length' => 40,
|
279 |
+
'comment' => 'Sessioin id'
|
280 |
+
)
|
281 |
+
),
|
282 |
+
'comment' => 'Api Sessions'
|
283 |
+
)
|
284 |
+
);
|
285 |
+
|
286 |
+
$installer->getConnection()->modifyTables($tables);
|
287 |
+
|
288 |
+
$installer->getConnection()->changeColumn(
|
289 |
+
$installer->getTable('api/rule'),
|
290 |
+
'privileges',
|
291 |
+
'api_privileges',
|
292 |
+
array(
|
293 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
294 |
+
'length' => 20,
|
295 |
+
'comment' => 'Privileges'
|
296 |
+
)
|
297 |
+
);
|
298 |
+
|
299 |
+
$installer->getConnection()->changeColumn(
|
300 |
+
$installer->getTable('api/rule'),
|
301 |
+
'permission',
|
302 |
+
'api_permission',
|
303 |
+
array(
|
304 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
305 |
+
'length' => 10,
|
306 |
+
'comment' => 'Permission'
|
307 |
+
)
|
308 |
+
);
|
309 |
+
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Add indexes
|
313 |
+
*/
|
314 |
+
$installer->getConnection()->addIndex(
|
315 |
+
$installer->getTable('api/rule'),
|
316 |
+
$installer->getIdxName('api/rule', array('resource_id', 'role_id')),
|
317 |
+
array('resource_id', 'role_id'),
|
318 |
+
Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX
|
319 |
+
);
|
320 |
+
|
321 |
+
$installer->getConnection()->addIndex(
|
322 |
+
$installer->getTable('api/rule'),
|
323 |
+
$installer->getIdxName('api/rule', array('role_id', 'resource_id')),
|
324 |
+
array('role_id', 'resource_id'),
|
325 |
+
Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX
|
326 |
+
);
|
327 |
+
|
328 |
+
$installer->getConnection()->addIndex(
|
329 |
+
$installer->getTable('api/session'),
|
330 |
+
$installer->getIdxName('api/session', array('user_id')),
|
331 |
+
array('user_id'),
|
332 |
+
Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX
|
333 |
+
);
|
334 |
+
|
335 |
+
$installer->getConnection()->addIndex(
|
336 |
+
$installer->getTable('api/session'),
|
337 |
+
$installer->getIdxName('api/session', array('sessid')),
|
338 |
+
array('sessid'),
|
339 |
+
Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX
|
340 |
+
);
|
341 |
+
|
342 |
+
$installer->getConnection()->addIndex(
|
343 |
+
$installer->getTable('api/role'),
|
344 |
+
$installer->getIdxName('api/role', array('parent_id', 'sort_order')),
|
345 |
+
array('parent_id', 'sort_order'),
|
346 |
+
Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX
|
347 |
+
);
|
348 |
+
|
349 |
+
$installer->getConnection()->addIndex(
|
350 |
+
$installer->getTable('api/role'),
|
351 |
+
$installer->getIdxName('api/role', array('tree_level')),
|
352 |
+
array('tree_level'),
|
353 |
+
Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX
|
354 |
+
);
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Add foreign keys
|
358 |
+
*/
|
359 |
+
$installer->getConnection()->addForeignKey(
|
360 |
+
$installer->getFkName('api/rule', 'role_id', 'api/role', 'role_id'),
|
361 |
+
$installer->getTable('api/rule'),
|
362 |
+
'role_id',
|
363 |
+
$installer->getTable('api/role'),
|
364 |
+
'role_id'
|
365 |
+
);
|
366 |
+
|
367 |
+
$installer->getConnection()->addForeignKey(
|
368 |
+
$installer->getFkName('api/session', 'user_id', 'api/user', 'user_id'),
|
369 |
+
$installer->getTable('api/session'),
|
370 |
+
'user_id',
|
371 |
+
$installer->getTable('api/user'),
|
372 |
+
'user_id'
|
373 |
+
);
|
374 |
+
|
375 |
+
$installer->endSetup();
|
app/code/core/Mage/Authorizenet/Block/Directpost/Form.php
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Authorizenet
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* DirectPost form block
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Authorizenet
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Authorizenet_Block_Directpost_Form extends Mage_Payment_Block_Form_Cc
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Internal constructor
|
38 |
+
* Set info template for payment step
|
39 |
+
*
|
40 |
+
*/
|
41 |
+
protected function _construct()
|
42 |
+
{
|
43 |
+
parent::_construct();
|
44 |
+
$this->setTemplate('authorizenet/directpost/info.phtml');
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Render block HTML
|
49 |
+
* If method is not directpost - nothing to return
|
50 |
+
*
|
51 |
+
* @return string
|
52 |
+
*/
|
53 |
+
protected function _toHtml()
|
54 |
+
{
|
55 |
+
if ($this->getMethod()->getCode() != Mage::getSingleton('authorizenet/directpost')->getCode()) {
|
56 |
+
return null;
|
57 |
+
}
|
58 |
+
|
59 |
+
return parent::_toHtml();
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Set method info
|
64 |
+
*
|
65 |
+
* @return Mage_Authorizenet_Block_Directpost_Form
|
66 |
+
*/
|
67 |
+
public function setMethodInfo()
|
68 |
+
{
|
69 |
+
$payment = Mage::getSingleton('checkout/type_onepage')
|
70 |
+
->getQuote()
|
71 |
+
->getPayment();
|
72 |
+
$this->setMethod($payment->getMethodInstance());
|
73 |
+
|
74 |
+
return $this;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Get type of request
|
79 |
+
*
|
80 |
+
* @return bool
|
81 |
+
*/
|
82 |
+
public function isAjaxRequest()
|
83 |
+
{
|
84 |
+
return $this->getAction()
|
85 |
+
->getRequest()
|
86 |
+
->getParam('isAjax');
|
87 |
+
}
|
88 |
+
}
|
app/code/core/Mage/Authorizenet/Block/Directpost/Iframe.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Authorizenet
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* DirectPost iframe block
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Authorizenet
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Authorizenet_Block_Directpost_Iframe extends Mage_Core_Block_Template
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Request params
|
38 |
+
* @var array
|
39 |
+
*/
|
40 |
+
protected $_params = array();
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Internal constructor
|
44 |
+
* Set template for iframe
|
45 |
+
*
|
46 |
+
*/
|
47 |
+
protected function _construct()
|
48 |
+
{
|
49 |
+
parent::_construct();
|
50 |
+
$this->setTemplate('authorizenet/directpost/iframe.phtml');
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Set output params
|
55 |
+
*
|
56 |
+
* @param array $params
|
57 |
+
* @return Mage_Authorizenet_Block_Directpost_Iframe
|
58 |
+
*/
|
59 |
+
public function setParams($params)
|
60 |
+
{
|
61 |
+
$this->_params = $params;
|
62 |
+
return $this;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Get params
|
67 |
+
*
|
68 |
+
* @return array
|
69 |
+
*/
|
70 |
+
public function getParams()
|
71 |
+
{
|
72 |
+
return $this->_params;
|
73 |
+
}
|
74 |
+
}
|
app/code/core/Mage/Authorizenet/Helper/Data.php
ADDED
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Authorizenet
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* Authorizenet Data Helper
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Authorizenet
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Authorizenet_Helper_Data extends Mage_Core_Helper_Abstract
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Return URL for admin area
|
38 |
+
*
|
39 |
+
* @param string $route
|
40 |
+
* @param array $params
|
41 |
+
* @return string
|
42 |
+
*/
|
43 |
+
public function getAdminUrl($route, $params)
|
44 |
+
{
|
45 |
+
return Mage::getModel('adminhtml/url')->getUrl($route, $params);
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Set secure url checkout is secure for current store.
|
50 |
+
*
|
51 |
+
* @param string $route
|
52 |
+
* @param array $params
|
53 |
+
* @return string
|
54 |
+
*/
|
55 |
+
protected function _getUrl($route, $params = array())
|
56 |
+
{
|
57 |
+
$params['_type'] = Mage_Core_Model_Store::URL_TYPE_LINK;
|
58 |
+
if (isset($params['is_secure'])) {
|
59 |
+
$params['_secure'] = (bool)$params['is_secure'];
|
60 |
+
} elseif (Mage::app()->getStore()->isCurrentlySecure()) {
|
61 |
+
$params['_secure'] = true;
|
62 |
+
}
|
63 |
+
return parent::_getUrl($route, $params);
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Retrieve save order url params
|
68 |
+
*
|
69 |
+
* @param string $controller
|
70 |
+
* @return array
|
71 |
+
*/
|
72 |
+
public function getSaveOrderUrlParams($controller)
|
73 |
+
{
|
74 |
+
$route = array();
|
75 |
+
switch ($controller) {
|
76 |
+
case 'onepage':
|
77 |
+
$route['action'] = 'saveOrder';
|
78 |
+
$route['controller'] = 'onepage';
|
79 |
+
$route['module'] = 'checkout';
|
80 |
+
break;
|
81 |
+
|
82 |
+
case 'sales_order_create':
|
83 |
+
case 'sales_order_edit':
|
84 |
+
$route['action'] = 'save';
|
85 |
+
$route['controller'] = 'sales_order_create';
|
86 |
+
$route['module'] = 'admin';
|
87 |
+
break;
|
88 |
+
|
89 |
+
default:
|
90 |
+
break;
|
91 |
+
}
|
92 |
+
|
93 |
+
return $route;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Retrieve redirect ifrmae url
|
98 |
+
*
|
99 |
+
* @param array params
|
100 |
+
* @return string
|
101 |
+
*/
|
102 |
+
public function getRedirectIframeUrl($params)
|
103 |
+
{
|
104 |
+
switch ($params['controller_action_name']) {
|
105 |
+
case 'onepage':
|
106 |
+
$route = 'authorizenet/directpost_payment/redirect';
|
107 |
+
break;
|
108 |
+
|
109 |
+
case 'sales_order_create':
|
110 |
+
case 'sales_order_edit':
|
111 |
+
$route = 'adminhtml/authorizenet_directpost_payment/redirect';
|
112 |
+
break;
|
113 |
+
|
114 |
+
default:
|
115 |
+
$route = 'authorizenet/directpost_payment/redirect';
|
116 |
+
break;
|
117 |
+
}
|
118 |
+
|
119 |
+
return $this->_getUrl($route, $params);
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Retrieve place order url on front
|
124 |
+
*
|
125 |
+
* @return string
|
126 |
+
*/
|
127 |
+
public function getPlaceOrderFrontUrl()
|
128 |
+
{
|
129 |
+
return $this->_getUrl('authorizenet/directpost_payment/place');
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Retrieve place order url in admin
|
134 |
+
*
|
135 |
+
* @return string
|
136 |
+
*/
|
137 |
+
public function getPlaceOrderAdminUrl()
|
138 |
+
{
|
139 |
+
return $this->getAdminUrl('*/authorizenet_directpost_payment/place', array());
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Retrieve place order url
|
144 |
+
*
|
145 |
+
* @param array params
|
146 |
+
* @return string
|
147 |
+
*/
|
148 |
+
public function getSuccessOrderUrl($params)
|
149 |
+
{
|
150 |
+
$param = array();
|
151 |
+
switch ($params['controller_action_name']) {
|
152 |
+
case 'onepage':
|
153 |
+
$route = 'checkout/onepage/success';
|
154 |
+
break;
|
155 |
+
|
156 |
+
case 'sales_order_create':
|
157 |
+
case 'sales_order_edit':
|
158 |
+
$route = 'adminhtml/sales_order/view';
|
159 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($params['x_invoice_num']);
|
160 |
+
$param['order_id'] = $order->getId();
|
161 |
+
return $this->getAdminUrl($route, $param);
|
162 |
+
|
163 |
+
default :
|
164 |
+
$route = 'checkout/onepage/success';
|
165 |
+
break;
|
166 |
+
}
|
167 |
+
|
168 |
+
return $this->_getUrl($route, $param);
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Get controller name
|
173 |
+
*
|
174 |
+
* @return string
|
175 |
+
*/
|
176 |
+
public function getControllerName()
|
177 |
+
{
|
178 |
+
return Mage::app()->getFrontController()->getRequest()->getControllerName();
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Update all child and parent order's edit increment numbers.
|
183 |
+
* Needed for Admin area.
|
184 |
+
*
|
185 |
+
* @param Mage_Sales_Model_Order $order
|
186 |
+
*/
|
187 |
+
public function updateOrderEditIncrements(Mage_Sales_Model_Order $order)
|
188 |
+
{
|
189 |
+
if ($order->getId() && $order->getOriginalIncrementId()) {
|
190 |
+
$collection = $order->getCollection();
|
191 |
+
$quotedIncrId = $collection->getConnection()->quote($order->getOriginalIncrementId());
|
192 |
+
$collection->getSelect()->where(
|
193 |
+
"original_increment_id = {$quotedIncrId} OR increment_id = {$quotedIncrId}"
|
194 |
+
);
|
195 |
+
|
196 |
+
foreach ($collection as $orderToUpdate) {
|
197 |
+
$orderToUpdate->setEditIncrement($order->getEditIncrement());
|
198 |
+
$orderToUpdate->save();
|
199 |
+
}
|
200 |
+
}
|
201 |
+
}
|
202 |
+
}
|
app/code/core/Mage/Authorizenet/Model/Directpost.php
ADDED
@@ -0,0 +1,651 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Authorizenet
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* Authorize.net DirectPost payment method model.
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Authorizenet
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Authorizenet_Model_Directpost extends Mage_Paygate_Model_Authorizenet
|
35 |
+
{
|
36 |
+
protected $_code = 'authorizenet_directpost';
|
37 |
+
protected $_formBlockType = 'directpost/form';
|
38 |
+
protected $_infoBlockType = 'payment/info';
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Availability options
|
42 |
+
*/
|
43 |
+
protected $_canAuthorize = true;
|
44 |
+
protected $_canCapture = true;
|
45 |
+
protected $_canCapturePartial = false;
|
46 |
+
protected $_canRefund = true;
|
47 |
+
protected $_canRefundInvoicePartial = true;
|
48 |
+
protected $_canVoid = true;
|
49 |
+
protected $_canUseInternal = true;
|
50 |
+
protected $_canUseCheckout = true;
|
51 |
+
protected $_canUseForMultishipping = false;
|
52 |
+
protected $_canSaveCc = false;
|
53 |
+
protected $_isInitializeNeeded = true;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Do not validate payment form using server methods
|
57 |
+
*
|
58 |
+
* @return bool
|
59 |
+
*/
|
60 |
+
public function validate()
|
61 |
+
{
|
62 |
+
return true;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Send authorize request to gateway
|
67 |
+
*
|
68 |
+
* @param Varien_Object $payment
|
69 |
+
* @param decimal $amount
|
70 |
+
* @return Mage_Paygate_Model_Authorizenet
|
71 |
+
* @throws Mage_Core_Exception
|
72 |
+
*/
|
73 |
+
public function authorize(Varien_Object $payment, $amount)
|
74 |
+
{
|
75 |
+
$payment->setAdditionalInformation('payment_type', $this->getConfigData('payment_action'));
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Send capture request to gateway
|
80 |
+
*
|
81 |
+
* @param Varien_Object $payment
|
82 |
+
* @param decimal $amount
|
83 |
+
* @return Mage_Authorizenet_Model_Directpost
|
84 |
+
* @throws Mage_Core_Exception
|
85 |
+
*/
|
86 |
+
public function capture(Varien_Object $payment, $amount)
|
87 |
+
{
|
88 |
+
if ($amount <= 0) {
|
89 |
+
Mage::throwException(Mage::helper('paygate')->__('Invalid amount for capture.'));
|
90 |
+
}
|
91 |
+
|
92 |
+
$payment->setAmount($amount);
|
93 |
+
|
94 |
+
if ($payment->getParentTransactionId()) {
|
95 |
+
$payment->setAnetTransType(self::REQUEST_TYPE_PRIOR_AUTH_CAPTURE);
|
96 |
+
$payment->setXTransId($this->_getRealParentTransactionId($payment));
|
97 |
+
} else {
|
98 |
+
$payment->setAnetTransType(self::REQUEST_TYPE_AUTH_CAPTURE);
|
99 |
+
}
|
100 |
+
|
101 |
+
$request= $this->_buildRequest($payment);
|
102 |
+
$result = $this->_postRequest($request);
|
103 |
+
|
104 |
+
switch ($result->getResponseCode()) {
|
105 |
+
case self::RESPONSE_CODE_APPROVED:
|
106 |
+
if ($result->getResponseReasonCode() == self::RESPONSE_REASON_CODE_APPROVED) {
|
107 |
+
if (!$payment->getParentTransactionId() ||
|
108 |
+
$result->getTransactionId() != $payment->getParentTransactionId()) {
|
109 |
+
$payment->setTransactionId($result->getTransactionId());
|
110 |
+
}
|
111 |
+
$payment
|
112 |
+
->setIsTransactionClosed(0)
|
113 |
+
->setTransactionAdditionalInfo($this->_realTransactionIdKey, $result->getTransactionId());
|
114 |
+
return $this;
|
115 |
+
}
|
116 |
+
Mage::throwException($this->_wrapGatewayError($result->getResponseReasonText()));
|
117 |
+
case self::RESPONSE_CODE_DECLINED:
|
118 |
+
case self::RESPONSE_CODE_ERROR:
|
119 |
+
Mage::throwException($this->_wrapGatewayError($result->getResponseReasonText()));
|
120 |
+
default:
|
121 |
+
Mage::throwException(Mage::helper('paygate')->__('Payment capturing error.'));
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Check refund availability
|
127 |
+
*
|
128 |
+
* @return bool
|
129 |
+
*/
|
130 |
+
public function canRefund()
|
131 |
+
{
|
132 |
+
return $this->_canRefund;
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Check void availability
|
137 |
+
*
|
138 |
+
* @param Varien_Object $invoicePayment
|
139 |
+
* @return bool
|
140 |
+
*/
|
141 |
+
public function canVoid(Varien_Object $payment)
|
142 |
+
{
|
143 |
+
return $this->_canVoid;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Void the payment through gateway
|
148 |
+
*
|
149 |
+
* @param Varien_Object $payment
|
150 |
+
* @return Mage_Authorizenet_Model_Directpost
|
151 |
+
* @throws Mage_Core_Exception
|
152 |
+
*/
|
153 |
+
public function void(Varien_Object $payment)
|
154 |
+
{
|
155 |
+
if (!$payment->getParentTransactionId()) {
|
156 |
+
Mage::throwException(Mage::helper('paygate')->__('Invalid transaction ID.'));
|
157 |
+
}
|
158 |
+
|
159 |
+
$payment->setAnetTransType(self::REQUEST_TYPE_VOID);
|
160 |
+
$payment->setXTransId($this->_getRealParentTransactionId($payment));
|
161 |
+
|
162 |
+
$request = $this->_buildRequest($payment);
|
163 |
+
$result = $this->_postRequest($request);
|
164 |
+
|
165 |
+
switch ($result->getResponseCode()) {
|
166 |
+
case self::RESPONSE_CODE_APPROVED:
|
167 |
+
if ($result->getResponseReasonCode() == self::RESPONSE_REASON_CODE_APPROVED) {
|
168 |
+
if ($result->getTransactionId() != $payment->getParentTransactionId()) {
|
169 |
+
$payment->setTransactionId($result->getTransactionId());
|
170 |
+
}
|
171 |
+
$payment
|
172 |
+
->setIsTransactionClosed(1)
|
173 |
+
->setShouldCloseParentTransaction(1)
|
174 |
+
->setTransactionAdditionalInfo($this->_realTransactionIdKey, $result->getTransactionId());
|
175 |
+
return $this;
|
176 |
+
}
|
177 |
+
Mage::throwException($this->_wrapGatewayError($result->getResponseReasonText()));
|
178 |
+
case self::RESPONSE_CODE_DECLINED:
|
179 |
+
case self::RESPONSE_CODE_ERROR:
|
180 |
+
Mage::throwException($this->_wrapGatewayError($result->getResponseReasonText()));
|
181 |
+
default:
|
182 |
+
Mage::throwException(Mage::helper('paygate')->__('Payment voiding error.'));
|
183 |
+
}
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Set capture transaction ID to invoice for informational purposes
|
188 |
+
* @param Mage_Sales_Model_Order_Invoice $invoice
|
189 |
+
* @param Mage_Sales_Model_Order_Payment $payment
|
190 |
+
* @return Mage_Payment_Model_Method_Abstract
|
191 |
+
*/
|
192 |
+
public function processInvoice($invoice, $payment)
|
193 |
+
{
|
194 |
+
return Mage_Payment_Model_Method_Abstract::processInvoice($invoice, $payment);
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Set transaction ID into creditmemo for informational purposes
|
199 |
+
* @param Mage_Sales_Model_Order_Creditmemo $creditmemo
|
200 |
+
* @param Mage_Sales_Model_Order_Payment $payment
|
201 |
+
* @return Mage_Payment_Model_Method_Abstract
|
202 |
+
*/
|
203 |
+
public function processCreditmemo($creditmemo, $payment)
|
204 |
+
{
|
205 |
+
return Mage_Payment_Model_Method_Abstract::processCreditmemo($creditmemo, $payment);
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Refund the amount
|
210 |
+
* Need to decode Last 4 digits for request.
|
211 |
+
*
|
212 |
+
* @param Varien_Object $payment
|
213 |
+
* @param decimal $amount
|
214 |
+
* @return Mage_Authorizenet_Model_Directpost
|
215 |
+
* @throws Mage_Core_Exception
|
216 |
+
*/
|
217 |
+
public function refund(Varien_Object $payment, $amount)
|
218 |
+
{
|
219 |
+
$last4 = $payment->getCcLast4();
|
220 |
+
$payment->setCcLast4($payment->decrypt($last4));
|
221 |
+
try {
|
222 |
+
$this->_refund($payment, $amount);
|
223 |
+
} catch (Exception $e) {
|
224 |
+
$payment->setCcLast4($last4);
|
225 |
+
throw $e;
|
226 |
+
}
|
227 |
+
$payment->setCcLast4($last4);
|
228 |
+
return $this;
|
229 |
+
}
|
230 |
+
|
231 |
+
/**
|
232 |
+
* refund the amount with transaction id
|
233 |
+
*
|
234 |
+
* @param string $payment Varien_Object object
|
235 |
+
* @return Mage_Authorizenet_Model_Directpost
|
236 |
+
* @throws Mage_Core_Exception
|
237 |
+
*/
|
238 |
+
protected function _refund(Varien_Object $payment, $amount)
|
239 |
+
{
|
240 |
+
if ($amount <= 0) {
|
241 |
+
Mage::throwException(Mage::helper('paygate')->__('Invalid amount for refund.'));
|
242 |
+
}
|
243 |
+
|
244 |
+
if (!$payment->getParentTransactionId()) {
|
245 |
+
Mage::throwException(Mage::helper('paygate')->__('Invalid transaction ID.'));
|
246 |
+
}
|
247 |
+
|
248 |
+
$payment->setAnetTransType(self::REQUEST_TYPE_CREDIT);
|
249 |
+
$payment->setAmount($amount);
|
250 |
+
$payment->setXTransId($this->_getRealParentTransactionId($payment));
|
251 |
+
|
252 |
+
$request = $this->_buildRequest($payment);
|
253 |
+
$result = $this->_postRequest($request);
|
254 |
+
|
255 |
+
switch ($result->getResponseCode()) {
|
256 |
+
case self::RESPONSE_CODE_APPROVED:
|
257 |
+
if ($result->getResponseReasonCode() == self::RESPONSE_REASON_CODE_APPROVED) {
|
258 |
+
if ($result->getTransactionId() != $payment->getParentTransactionId()) {
|
259 |
+
$payment->setTransactionId($result->getTransactionId());
|
260 |
+
}
|
261 |
+
$shouldCloseCaptureTransaction = $payment->getOrder()->canCreditmemo() ? 0 : 1;
|
262 |
+
$payment
|
263 |
+
->setIsTransactionClosed(1)
|
264 |
+
->setShouldCloseParentTransaction($shouldCloseCaptureTransaction)
|
265 |
+
->setTransactionAdditionalInfo($this->_realTransactionIdKey, $result->getTransactionId());
|
266 |
+
return $this;
|
267 |
+
}
|
268 |
+
Mage::throwException($this->_wrapGatewayError($result->getResponseReasonText()));
|
269 |
+
case self::RESPONSE_CODE_DECLINED:
|
270 |
+
case self::RESPONSE_CODE_ERROR:
|
271 |
+
Mage::throwException($this->_wrapGatewayError($result->getResponseReasonText()));
|
272 |
+
default:
|
273 |
+
Mage::throwException(Mage::helper('paygate')->__('Payment refunding error.'));
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Get CGI url
|
279 |
+
*
|
280 |
+
* @return string
|
281 |
+
*/
|
282 |
+
public function getCgiUrl()
|
283 |
+
{
|
284 |
+
$uri = $this->getConfigData('cgi_url');
|
285 |
+
return $uri ? $uri : self::CGI_URL;
|
286 |
+
}
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Return URL on which Authorize.net server will return payment result data in hidden request.
|
290 |
+
*
|
291 |
+
* @param int $storeId
|
292 |
+
* @return string
|
293 |
+
*/
|
294 |
+
public function getRelayUrl($storeId = null)
|
295 |
+
{
|
296 |
+
if ($storeId == null && $this->getStore()) {
|
297 |
+
$storeId = $this->getStore();
|
298 |
+
}
|
299 |
+
return Mage::app()->getStore($storeId)
|
300 |
+
->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK).
|
301 |
+
'authorizenet/directpost_payment/response';
|
302 |
+
}
|
303 |
+
|
304 |
+
/**
|
305 |
+
* Return request model for form data building
|
306 |
+
*
|
307 |
+
* @return Mage_Authorizenet_Model_Directpost_Request
|
308 |
+
*/
|
309 |
+
protected function _getRequestModel()
|
310 |
+
{
|
311 |
+
return Mage::getModel('authorizenet/directpost_request');
|
312 |
+
}
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Return response.
|
316 |
+
*
|
317 |
+
* @return Mage_Authorizenet_Model_Directpost_Response
|
318 |
+
*/
|
319 |
+
public function getResponse()
|
320 |
+
{
|
321 |
+
return Mage::getSingleton('authorizenet/directpost_response');
|
322 |
+
}
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Instantiate state and set it to state object
|
326 |
+
*
|
327 |
+
* @param string $paymentAction
|
328 |
+
* @param Varien_Object
|
329 |
+
*/
|
330 |
+
public function initialize($paymentAction, $stateObject)
|
331 |
+
{
|
332 |
+
switch ($paymentAction) {
|
333 |
+
case self::ACTION_AUTHORIZE:
|
334 |
+
case self::ACTION_AUTHORIZE_CAPTURE:
|
335 |
+
$payment = $this->getInfoInstance();
|
336 |
+
$order = $payment->getOrder();
|
337 |
+
$order->setCanSendNewEmailFlag(false);
|
338 |
+
$payment->authorize(true, $order->getBaseTotalDue()); // base amount will be set inside
|
339 |
+
$payment->setAmountAuthorized($order->getTotalDue());
|
340 |
+
|
341 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, 'pending_payment', '', false);
|
342 |
+
|
343 |
+
$stateObject->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT);
|
344 |
+
$stateObject->setStatus('pending_payment');
|
345 |
+
$stateObject->setIsNotified(false);
|
346 |
+
break;
|
347 |
+
default:
|
348 |
+
break;
|
349 |
+
}
|
350 |
+
}
|
351 |
+
|
352 |
+
/**
|
353 |
+
* Generate request object and fill its fields from Quote or Order object
|
354 |
+
*
|
355 |
+
* @param Mage_Core_Model_Abstract $entity Quote or order object.
|
356 |
+
* @return Mage_Authorizenet_Model_Directpost_Request
|
357 |
+
*/
|
358 |
+
public function generateRequestFromOrder(Mage_Sales_Model_Order $order)
|
359 |
+
{
|
360 |
+
$request = $this->_getRequestModel();
|
361 |
+
$request->setConstantData($this)
|
362 |
+
->setDataFromOrder($order, $this)
|
363 |
+
->signRequestData();
|
364 |
+
|
365 |
+
$this->_debug(array('request' => $request->getData()));
|
366 |
+
|
367 |
+
return $request;
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Fill response with data.
|
372 |
+
*
|
373 |
+
* @param array $postData
|
374 |
+
* @return Mage_Authorizenet_Model_Directpost
|
375 |
+
*/
|
376 |
+
public function setResponseData(array $postData)
|
377 |
+
{
|
378 |
+
$this->getResponse()->setData($postData);
|
379 |
+
return $this;
|
380 |
+
}
|
381 |
+
|
382 |
+
/**
|
383 |
+
* Validate response data. Needed in controllers.
|
384 |
+
*
|
385 |
+
* @return bool true in case of validation success.
|
386 |
+
* @throws Mage_Core_Exception in case of validation error
|
387 |
+
*/
|
388 |
+
public function validateResponse()
|
389 |
+
{
|
390 |
+
$response = $this->getResponse();
|
391 |
+
//md5 check
|
392 |
+
if (!$this->getConfigData('trans_md5') || !$this->getConfigData('login') ||
|
393 |
+
!$response->isValidHash($this->getConfigData('trans_md5'), $this->getConfigData('login'))
|
394 |
+
) {
|
395 |
+
Mage::throwException(
|
396 |
+
Mage::helper('authorizenet')->__('Response hash validation failed. Transaction declined.')
|
397 |
+
);
|
398 |
+
}
|
399 |
+
return true;
|
400 |
+
}
|
401 |
+
|
402 |
+
/**
|
403 |
+
* Operate with order using data from $_POST which came from authorize.net by Relay URL.
|
404 |
+
*
|
405 |
+
* @param array $responseData data from Authorize.net from $_POST
|
406 |
+
* @throws Mage_Core_Exception in case of validation error or order creation error
|
407 |
+
*/
|
408 |
+
public function process(array $responseData)
|
409 |
+
{
|
410 |
+
$debugData = array(
|
411 |
+
'response' => $responseData
|
412 |
+
);
|
413 |
+
$this->_debug($debugData);
|
414 |
+
|
415 |
+
$this->setResponseData($responseData);
|
416 |
+
|
417 |
+
//check MD5 error or others response errors
|
418 |
+
//throws exception on false.
|
419 |
+
$this->validateResponse();
|
420 |
+
|
421 |
+
$response = $this->getResponse();
|
422 |
+
//operate with order
|
423 |
+
$orderIncrementId = $response->getXInvoiceNum();
|
424 |
+
$responseText = $this->_wrapGatewayError($response->getXResponseReasonText());
|
425 |
+
$isError = false;
|
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);
|
432 |
+
} else {
|
433 |
+
$isError = true;
|
434 |
+
}
|
435 |
+
} else {
|
436 |
+
$isError = true;
|
437 |
+
}
|
438 |
+
|
439 |
+
if ($isError) {
|
440 |
+
Mage::throwException(
|
441 |
+
($responseText && !$response->isApproved()) ?
|
442 |
+
$responseText :
|
443 |
+
Mage::helper('authorizenet')->__('Payment error. Order was not found.')
|
444 |
+
);
|
445 |
+
}
|
446 |
+
}
|
447 |
+
|
448 |
+
/**
|
449 |
+
* Fill payment with credit card data from response from Authorize.net.
|
450 |
+
*
|
451 |
+
* @param Varien_Object $payment
|
452 |
+
*/
|
453 |
+
protected function _fillPaymentByResponse(Varien_Object $payment)
|
454 |
+
{
|
455 |
+
$response = $this->getResponse();
|
456 |
+
$payment->setTransactionId($response->getXTransId())
|
457 |
+
->setParentTransactionId(null)
|
458 |
+
->setIsTransactionClosed(0)
|
459 |
+
->setTransactionAdditionalInfo($this->_realTransactionIdKey, $response->getXTransId());
|
460 |
+
|
461 |
+
if ($response->getXMethod() == self::REQUEST_METHOD_CC) {
|
462 |
+
$payment->setCcAvsStatus($response->getXAvsCode())
|
463 |
+
->setCcLast4($payment->encrypt(substr($response->getXAccountNumber(), -4)));
|
464 |
+
}
|
465 |
+
}
|
466 |
+
|
467 |
+
/**
|
468 |
+
* Check response code came from authorize.net.
|
469 |
+
*
|
470 |
+
* @return true in case of Approved response
|
471 |
+
* @throws Mage_Core_Exception in case of Declined or Error response from Authorize.net
|
472 |
+
*/
|
473 |
+
public function checkResponseCode()
|
474 |
+
{
|
475 |
+
switch ($this->getResponse()->getXResponseCode()) {
|
476 |
+
case self::RESPONSE_CODE_APPROVED:
|
477 |
+
return true;
|
478 |
+
case self::RESPONSE_CODE_DECLINED:
|
479 |
+
case self::RESPONSE_CODE_ERROR:
|
480 |
+
Mage::throwException($this->_wrapGatewayError($this->getResponse()->getXResponseReasonText()));
|
481 |
+
default:
|
482 |
+
Mage::throwException(Mage::helper('authorizenet')->__('Payment authorization error.'));
|
483 |
+
}
|
484 |
+
}
|
485 |
+
|
486 |
+
/**
|
487 |
+
* Check transaction id came from Authorize.net
|
488 |
+
*
|
489 |
+
* @return true in case of right transaction id
|
490 |
+
* @throws Mage_Core_Exception in case of bad transaction id.
|
491 |
+
*/
|
492 |
+
public function checkTransId()
|
493 |
+
{
|
494 |
+
if (!$this->getResponse()->getXTransId()) {
|
495 |
+
Mage::throwException(
|
496 |
+
Mage::helper('authorizenet')->__('Payment authorization error. Transacion id is empty.')
|
497 |
+
);
|
498 |
+
}
|
499 |
+
return true;
|
500 |
+
}
|
501 |
+
|
502 |
+
/**
|
503 |
+
* Compare amount with amount from the response from Authorize.net.
|
504 |
+
*
|
505 |
+
* @param float $amount
|
506 |
+
* @return bool
|
507 |
+
*/
|
508 |
+
protected function _matchAmount($amount)
|
509 |
+
{
|
510 |
+
return sprintf('%.2F', $amount) == sprintf('%.2F', $this->getResponse()->getXAmount());
|
511 |
+
}
|
512 |
+
|
513 |
+
/**
|
514 |
+
* Operate with order using information from Authorize.net.
|
515 |
+
* Authorize order or authorize and capture it.
|
516 |
+
*
|
517 |
+
* @param Mage_Sales_Model_Order $order
|
518 |
+
*/
|
519 |
+
protected function _authOrder(Mage_Sales_Model_Order $order)
|
520 |
+
{
|
521 |
+
try {
|
522 |
+
$this->checkResponseCode();
|
523 |
+
$this->checkTransId();
|
524 |
+
} catch (Exception $e) {
|
525 |
+
//decline the order (in case of wrong response code) but don't return money to customer.
|
526 |
+
$message = $e->getMessage();
|
527 |
+
$this->_declineOrder($order, $message, false);
|
528 |
+
throw $e;
|
529 |
+
}
|
530 |
+
|
531 |
+
$response = $this->getResponse();
|
532 |
+
|
533 |
+
//create transaction. need for void if amount will not match.
|
534 |
+
$payment = $order->getPayment();
|
535 |
+
$this->_fillPaymentByResponse($payment);
|
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');
|
548 |
+
if (!$orderStatus || $order->getIsVirtual()) {
|
549 |
+
$orderStatus = $order->getConfig()->getStateDefaultStatus($orderState);
|
550 |
+
}
|
551 |
+
|
552 |
+
$order->setState($orderState, $orderStatus ? $orderStatus : true, $message, false)
|
553 |
+
->save();
|
554 |
+
|
555 |
+
//match amounts. should be equals for authorization.
|
556 |
+
//decline the order if amount does not match.
|
557 |
+
if (!$this->_matchAmount($payment->getBaseAmountAuthorized())) {
|
558 |
+
$message = Mage::helper('authorizenet')->__('Payment error. Paid amount doesn\'t match the order amount.');
|
559 |
+
$this->_declineOrder($order, $message, true);
|
560 |
+
Mage::throwException($message);
|
561 |
+
}
|
562 |
+
|
563 |
+
//capture order using AIM if needed
|
564 |
+
$this->_captureOrder($order);
|
565 |
+
|
566 |
+
try {
|
567 |
+
if (!$response->hasOrderSendConfirmation() || $response->getOrderSendConfirmation()) {
|
568 |
+
$order->sendNewOrderEmail();
|
569 |
+
}
|
570 |
+
|
571 |
+
Mage::getModel('sales/quote')
|
572 |
+
->load($order->getQuoteId())
|
573 |
+
->setIsActive(false)
|
574 |
+
->save();
|
575 |
+
} catch (Exception $e) {} // do not cancel order if we couldn't send email
|
576 |
+
}
|
577 |
+
|
578 |
+
/**
|
579 |
+
* Register order cancellation. Return money to customer if needed.
|
580 |
+
*
|
581 |
+
* @param Mage_Sales_Model_Order $order
|
582 |
+
* @param string $message
|
583 |
+
* @param bool $voidPayment
|
584 |
+
*/
|
585 |
+
protected function _declineOrder(Mage_Sales_Model_Order $order, $message = '', $voidPayment = true)
|
586 |
+
{
|
587 |
+
try {
|
588 |
+
$response = $this->getResponse();
|
589 |
+
if ($voidPayment &&
|
590 |
+
$response->getXTransId() &&
|
591 |
+
strtoupper($response->getXType()) == self::REQUEST_TYPE_AUTH_ONLY
|
592 |
+
) {
|
593 |
+
$order->getPayment()
|
594 |
+
->setTransactionId(null)
|
595 |
+
->setParentTransactionId($response->getXTransId())
|
596 |
+
->void();
|
597 |
+
}
|
598 |
+
$order->registerCancellation($message)
|
599 |
+
->save();
|
600 |
+
} catch (Exception $e) {
|
601 |
+
//quiet decline
|
602 |
+
Mage::logException($e);
|
603 |
+
}
|
604 |
+
}
|
605 |
+
|
606 |
+
/**
|
607 |
+
* Capture order's payment using AIM.
|
608 |
+
*
|
609 |
+
* @param Mage_Sales_Model_Order $order
|
610 |
+
*/
|
611 |
+
protected function _captureOrder(Mage_Sales_Model_Order $order)
|
612 |
+
{
|
613 |
+
$payment = $order->getPayment();
|
614 |
+
if ($payment->getAdditionalInformation('payment_type') == self::ACTION_AUTHORIZE_CAPTURE) {
|
615 |
+
try {
|
616 |
+
$payment->setTransactionId(null)
|
617 |
+
->setParentTransactionId($this->getResponse()->getXTransId())
|
618 |
+
->capture(null);
|
619 |
+
|
620 |
+
// set status from config for AUTH_AND_CAPTURE orders.
|
621 |
+
if ($order->getState() == Mage_Sales_Model_Order::STATE_PROCESSING) {
|
622 |
+
$orderStatus = $this->getConfigData('order_status');
|
623 |
+
if (!$orderStatus || $order->getIsVirtual()) {
|
624 |
+
$orderStatus = $order->getConfig()
|
625 |
+
->getStateDefaultStatus(Mage_Sales_Model_Order::STATE_PROCESSING);
|
626 |
+
}
|
627 |
+
if ($orderStatus) {
|
628 |
+
$order->setStatus($orderStatus);
|
629 |
+
}
|
630 |
+
}
|
631 |
+
|
632 |
+
$order->save();
|
633 |
+
} catch (Exception $e) {
|
634 |
+
Mage::logException($e);
|
635 |
+
//if we couldn't capture order, just leave it as NEW order.
|
636 |
+
}
|
637 |
+
}
|
638 |
+
}
|
639 |
+
|
640 |
+
/**
|
641 |
+
* Return additional information`s transaction_id value of parent transaction model
|
642 |
+
*
|
643 |
+
* @param Mage_Sales_Model_Order_Payment $payment
|
644 |
+
* @return string
|
645 |
+
*/
|
646 |
+
protected function _getRealParentTransactionId($payment)
|
647 |
+
{
|
648 |
+
$transaction = $payment->getTransaction($payment->getParentTransactionId());
|
649 |
+
return $transaction->getAdditionalInformation($this->_realTransactionIdKey);
|
650 |
+
}
|
651 |
+
}
|
app/code/core/Mage/Authorizenet/Model/Directpost/Observer.php
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Authorizenet
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
* Authorizenet directpayment observer
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Authorizenet
|
32 |
+
* @author
|