diff --git a/.htaccess b/.htaccess index 60e17952c88..aca7f55d48b 100644 --- a/.htaccess +++ b/.htaccess @@ -207,3 +207,28 @@ ## http://developer.yahoo.com/performance/rules.html#etags #FileETag none + +########################################### +## Deny access to cron.php + + +############################################ +## uncomment next lines to enable cron access with base HTTP authorization +## http://httpd.apache.org/docs/2.2/howto/auth.html +## +## Warning: .htpasswd file should be placed somewhere not accessible from the web. +## This is so that folks cannot download the password file. +## For example, if your documents are served out of /usr/local/apache/htdocs +## you might want to put the password file(s) in /usr/local/apache/. + + #AuthName "Cron auth" + #AuthUserFile ../.htpasswd + #AuthType basic + #Require valid-user + +############################################ + + Order allow,deny + Deny from all + + diff --git a/.htaccess.sample b/.htaccess.sample index b8821af2226..383313a3834 100644 --- a/.htaccess.sample +++ b/.htaccess.sample @@ -176,3 +176,27 @@ #FileETag none +########################################### +## Deny access to cron.php + + +############################################ +## uncomment next lines to enable cron access with base HTTP authorization +## http://httpd.apache.org/docs/2.2/howto/auth.html +## +## Warning: .htpasswd file should be placed somewhere not accessible from the web. +## This is so that folks cannot download the password file. +## For example, if your documents are served out of /usr/local/apache/htdocs +## you might want to put the password file(s) in /usr/local/apache/. + + #AuthName "Cron auth" + #AuthUserFile ../.htpasswd + #AuthType basic + #Require valid-user + +############################################ + + Order allow,deny + Deny from all + + diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index 54cedb9139a..f726d8c364b 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -1,3 +1,13 @@ +==== 1.9.2.2 ==== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +] NOTE: Current Release Notes are maintained at: [ +] [ +] http://merch.docs.magento.com/ce/user_guide/Magento_Community_Edition_User_Guide.html#magento/release-notes-ce-1.9.2.2.html [ +] [ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ==== 1.9.2.1 ==== ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -31,7 +41,7 @@ ==== 1.7.0.2 ==== === Fixes === -Fixed: Security vulnerability in Zend_XmlRpc - http://framework.zend.com/security/advisory/ZF2012-01 +Fixed: Security vulnerability in Zend_XmlRpc - http://framework.zend.com/security/advisory/ZF2012-01 Fixed: PayPal Standard does not display on frontend during checkout with some merchant countries @@ -651,7 +661,7 @@ Added captcha functionality Implemented different base prices for customer groups Added auto generation of coupon codes Backup and Rollback functionality -VAT ID Validation added +VAT ID Validation added Implemented DHL for Europe Added REST API @@ -662,7 +672,7 @@ Mobile theme was redesigned Added ability to translate action array parameter nodes via layout.xml Added support for using custom currency symbols Added functionality to cleaning old cache files by cron task -Refactored rules-based modules +Refactored rules-based modules Improved customer address handling using PayPal Express checkout Refactored escaping functionality used with translations Added ability to customize logo in emails from the admin @@ -678,7 +688,7 @@ Library js/scriptaculous/dragdrop.js is upgraded to version 1.9.0 Image file of "jpg" type are allowed for favicon Added ability to extend list of attributes to select for categories loaded via Mage_Catalog_Model_Resource_Category_Flat::_loadNodes() Added changes to lib/Varien/Http/Adapter/Curl.php to provide interface for setting different cURL options -Displaying State or Province can be optional for any country +Displaying State or Province can be optional for any country Added ability to get Magento type from Mage.php === Fixes === @@ -911,13 +921,13 @@ Fixed Maintenance flag isn't deleted if rollback fails with not enough permissio Fixed Customer's group isn't changed if his billing address modified within back-end Added Add a message and the link in the mini shopping cart, when the cart is empty Fixed On Edit Shipping Address page button "Validate VAT Number" should be hidden -Fixed Fatal error when try to ship order with Flat Rate shipping method +Fixed Fatal error when try to ship order with Flat Rate shipping method - fixed potentially problematic chaining involved getShippingCarrier method Fixed No ability to open PDF file with Label Fixed Incorrect final price for configurable products if several custom options used Fixed "Length", "Width" and "Height" fields on "Create Packages" pop up are active, when "Documents" type is selected in IE7 and IE9 Fixed HTTP 500 error on front-end for bundle fixed with percent options enabled for sub-products -Fixed Shipment created on Magento side doesn't send to Google side for Merchant Calculated shipping +Fixed Shipment created on Magento side doesn't send to Google side for Merchant Calculated shipping - added check for process only Google Checkout internal methods Fixed PDF files for invoices and credit memos are not displaying Including Tax Price Fixed Default value that was specified in system settings doesn't presented in Code Format drop-down on Manage Coupon Codes tab @@ -950,7 +960,7 @@ Fixed "Same As Billing Address" check-box doesn't work Fixed Impossible to enter zero in the base price field for customer groups Fixed Group Price attribute position on the Prices tab is incorrect Fixed Add new column to the grid with number of used coupons -Fixed Custom options are not stored when downloadable product is duplicated +Fixed Custom options are not stored when downloadable product is duplicated Fixed Broken logic for "Zero Subtotal Checkout" order statuses Fixed Coupon codes generation fails when trying to generate large amount of codes Fixed PayFlow Link: Using "Pay with PayPal" and selected shipping method that is greater than 0 doesn't process order @@ -1215,7 +1225,7 @@ Fixed Unnecessary comments in "Share Wishlist" email Added ability to translate action array parameter nodes via layout.xml Added support for using custom currency symbols Added functionality to cleaning old cache files by cron task -Refactored rules-based modules +Refactored rules-based modules Improved customer address handling using PayPal Express checkout Refactored escaping functionality used with translations Added ability to customize logo in emails from the admin @@ -1230,7 +1240,7 @@ Library js/scriptaculous/dragdrop.js is upgraded to version 1.9.0 Image file of "jpg" type are allowed for favicon Added ability to extend list of attributes to select for categories loaded via Mage_Catalog_Model_Resource_Category_Flat::_loadNodes() Added changes to lib/Varien/Http/Adapter/Curl.php to provide interface for setting different cURL options -Displaying State or Province can be optional for any country +Displaying State or Province can be optional for any country Added ability to get Magento type from Mage.php @@ -1415,13 +1425,13 @@ Fixed Maintenance flag isn't deleted if rollback fails with not enough permissio Fixed Customer's group isn't changed if his billing address modified within back-end Added Add a message and the link in the mini shopping cart, when the cart is empty Fixed On Edit Shipping Address page button "Validate VAT Number" should be hidden -Fixed Fatal error when try to ship order with Flat Rate shipping method +Fixed Fatal error when try to ship order with Flat Rate shipping method - fixed potentially problematic chaining involved getShippingCarrier method Fixed No ability to open PDF file with Label Fixed Incorrect final price for configurable products if several custom options used Fixed "Length", "Width" and "Height" fields on "Create Packages" pop up are active, when "Documents" type is selected in IE7 and IE9 Fixed HTTP 500 error on front-end for bundle fixed with percent options enabled for sub-products -Fixed Shipment created on Magento side doesn't send to Google side for Merchant Calculated shipping +Fixed Shipment created on Magento side doesn't send to Google side for Merchant Calculated shipping - added check for process only Google Checkout internal methods Fixed PDF files for invoices and credit memos are not displaying Including Tax Price Fixed Default value that was specified in system settings doesn't presented in Code Format drop-down on Manage Coupon Codes tab @@ -1455,7 +1465,7 @@ Fixed "Same As Billing Address" check-box doesn't work Fixed Impossible to enter zero in the base price field for customer groups Fixed Group Price attribute position on the Prices tab is incorrect Fixed Add new column to the grid with number of used coupons -Fixed Custom options are not stored when downloadable product is duplicated +Fixed Custom options are not stored when downloadable product is duplicated Fixed Broken logic for "Zero Subtotal Checkout" order statuses Fixed Coupon codes generation fails when trying to generate large amount of codes Fixed PayFlow Link: Using "Pay with PayPal" and selected shipping method that is greater than 0 doesn't process order @@ -1473,7 +1483,7 @@ Fixed Export of Group Price data doesn't work === Improvements === Refactored indexing process: -- Changed logic around reindexing to prevent conflicts between partial and full reindexing +- Changed logic around reindexing to prevent conflicts between partial and full reindexing - Prevented situations where concurrent indexing processes run at the same time and overwrite each other's data === Changes === @@ -1509,7 +1519,7 @@ Added captcha functionality Implemented different base prices for customer groups Added auto generation of coupon codes Backup and Rollback functionality -VAT ID Validation added +VAT ID Validation added Implemented DHL for Europe === Improvements === @@ -2242,7 +2252,7 @@ Fixed Catalog price rules for composite products changes Fixed Moving modules to the correct place Fixed Wishlist shows items per store scope, not website Fixed Products in Wishlist disappears, when Store View is changed -Fixed Wrong Comments History in notification of order creation/cancellation +Fixed Wrong Comments History in notification of order creation/cancellation Fixed In AJAX popup fields "From" and "To" have behavior as mandatory fields Fixed Filter by Allow Countries not working for Customer Address Form in the Backend Fixed Product price lower than 0 (after catalog price rule applying) @@ -2418,7 +2428,7 @@ Fixed Catalog price rules for composite products changes Fixed Moving modules to the correct place Fixed Wishlist shows items per store scope, not website Fixed Products in Wishlist disappears, when Store View is changed -Fixed Wrong Comments History in notification of order creation/cancellation +Fixed Wrong Comments History in notification of order creation/cancellation Fixed In AJAX popup fields "From" and "To" have behavior as mandatory fields Fixed Filter by Allow Countries not working for Customer Address Form in the Backend Fixed Product price lower than 0 (after catalog price rule applying) @@ -2519,7 +2529,7 @@ Updated PayflowLink HSS user interface in checkout === Changes === TheFind integration was removed Google Optimizer was removed (it will be supported as a core extension) -Improved how discounts are applied to sub products +Improved how discounts are applied to sub products === Fixes === Fixed Saved CC form is not displayed, when there are no other available payment methods except Saved CC @@ -2562,7 +2572,7 @@ Fixed Catalog price rules for composite products changes Fixed Moving modules to the correct place Fixed Wishlist shows items per store scope, not website Fixed Products in Wishlist disappears, when Store View is changed -Fixed Wrong Comments History in notification of order creation/cancellation +Fixed Wrong Comments History in notification of order creation/cancellation Fixed In AJAX popup fields "From" and "To" have behavior as mandatory fields Fixed Filter by Allow Countries not working for Customer Address Form in the Backend Fixed Product price lower than 0 (after catalog price rule applying) @@ -2664,7 +2674,7 @@ Updated PayflowLink HSS user interface in checkout === Changes === TheFind integration was removed Google Optimizer was removed (it will be supported as a core extension) -Improved how discounts are applied to sub products +Improved how discounts are applied to sub products === Fixes === Fixed When using direct Export, the _super_product_sku and _super_product_option on the configurable product does not match @@ -2690,7 +2700,7 @@ Fixed Catalog price rules for composite products changes Fixed Moving modules to the correct place Fixed Wishlist shows items per store scope, not website Fixed Products in Wishlist disappears, when Store View is changed -Fixed Wrong Comments History in notification of order creation/cancellation +Fixed Wrong Comments History in notification of order creation/cancellation Fixed In AJAX popup fields "From" and "To" have behavior as mandatory fields Fixed Filter by Allow Countries not working for Customer Address Form in the Backend Fixed Product price lower than 0 (after catalog price rule applying) @@ -2781,7 +2791,7 @@ Fixed After upgrading dashboard "Top 5 Search Terms" grid doesn't show search t ==== 1.6.x-devel-119961 ==== === Fixes === -Fixed Wrong Comments History in notification of order creation/cancellation +Fixed Wrong Comments History in notification of order creation/cancellation Fixed In AJAX popup fields "From" and "To" have behavior as mandatory fields Fixed Filter by Allow Countries not working for Customer Address Form in the Backend Fixed Product price lower than 0 (after catalog price rule applying) @@ -3349,7 +3359,7 @@ Fixed Error is presented by saving address, creating order with created attribut === Major Highlights === Minimum Advertised Price Persistent Shopping Cart -Known issues: if you see the Service Temporarily Unavailable page after refreshing the frontend, open the Magento installation +Known issues: 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. === Improvements === @@ -4276,8 +4286,8 @@ Fixed Tax/VAT number not displayed Fixed HTML typo in Transactional mail "account_new_confirmation.html" Fixed Varien_Db_Adapter_Mysqli::raw_query() should throw an Exception after 10 tries -==== 1.5.1.0 ==== - +==== 1.5.1.0 ==== + === Improvements === Alternative image storage feature enabled with fixed get.php file. Magento Mobile updated to release v20 @@ -4301,7 +4311,7 @@ Replaced usage of Varien_File_Uploader with Mage_Core_Model_File_Uploader === Fixes === Fixed PayPal Standard: order has two invoice and two refund Fixed Adjustment Fee, Adjustment Refund and Refund Shipping fields must be disabled on credit memo for Payflow Pro and PayFlowLink payment methods -- Actualized API params mapping +- Actualized API params mapping - Added parameter Amount into refund request Fixed Broken mysql4-data-upgrade-1.4.0.0.13-1.4.0.0.14.php file Fixed XMLConnect - edited parameter cannot be saved @@ -4310,7 +4320,7 @@ Fixed Media storage - problem with image in the CMS pages Fixed Unable to place order using PayPal Billing agreement through Checkout with multiple addresses - Added additional multi shipping checkout exceptions logging. Fixed No AmericanExpress support in Website Payments Pro Payflow Edition -- Added to Direct payment +- Added to Direct payment Fixed Incorrect Subtotal(Incl. Tax) in Shopping Cart, when catalog prices entered by admin include tax Fixed Function "Apply Tax On - Original price only" does not correct calculate product tax Fixed No ability to save Product Attribute with type Media Image @@ -4338,7 +4348,7 @@ Fixed Custom URL Rewrite creation broken - skip filtering for store select if no product or category specified in case of custom rewrite Fixed Shopping Cart Price Rule->Conditions->Shipping Country is not correctly controlled on multiple checkout. - 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 -Fixed Resources names are not translated on Role Resources page at backend +Fixed Resources names are not translated on Role Resources page at backend Fixed Multiselect and Dropdown Attribute values set to "0" are not exported correctly Fixed WYSIWYG Editor - Unable to Create a Folder when Inserting a File Fixed Wrong cache key for websites @@ -4522,7 +4532,7 @@ Magento Mobile updated to release v20 === Fixes === Fixed PayPal Standard: order has two invoice and two refund Fixed Adjustmen Fee, Adjustment Refund and Refund Shipping fields must be disabled on credit memo for Payflow Pro and PayFlowLink payment methods -- Actualized API params mapping +- Actualized API params mapping - Added parameter Amount into refund request Fixed Broken mysql4-data-upgrade-1.4.0.0.13-1.4.0.0.14.php file Fixed XMLConnect - edited parameter cannot be saved @@ -4531,7 +4541,7 @@ Fixed Media storage - problem with image in the CMS pages Fixed Unable to place order using PayPal Billing agreement through Checkout with multiple addresses - Added additional multi shipping checkout exceptions logging. Fixed No AmericanExpress support in Website Payments Pro Payflow Edition -- Added to Direct payment +- Added to Direct payment Fixed Incorrect Subtotal(Incl. Tax) in Shopping Cart, when catalog prices entered by admin include tax Fixed Function "Apply Tax On - Original price only" does not correct calculate product tax Fixed No ability to save Product Attribute with type Media Image @@ -4570,7 +4580,7 @@ Fixed Custom URL Rewrite creation broken - skip filtering for store select if no product or category specified in case of custom rewrite Fixed Shopping Cart Price Rule->Conditions->Shipping Country is not correctly controlled on multiple checkout. - 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 -Fixed Resources names are not translated on Role Resources page at backend +Fixed Resources names are not translated on Role Resources page at backend Fixed Multiselect and Dropdown Attribute values set to "0" are not exported correctly Fixed WYSIWYG Editor - Unable to Create a Folder when Inserting a File Fixed Wrong cache key for websites @@ -4826,10 +4836,10 @@ Fixed Google Base Synchronize - Fixed fatal error on very first Publish and then Synchronizing if in GB products already were - Fixed potential fatal when on mass Publish action we will not retrieve any item id: expected array, but null or empty string given Fixed Rounding issues in shipping methods and in sales payment -Fixed Usage of non-mb-supported strlen() in custom option validation +Fixed Usage of non-mb-supported strlen() in custom option validation - fixed length calculation routine to work with multi-byte characters - changed order of evaluation, so that length is calculated only if length constraint is set for custom option -Fixed Unused class Mage_Reports_Model_Mysql4_Shopcart_Product_Collection did not marked like deprecated +Fixed Unused class Mage_Reports_Model_Mysql4_Shopcart_Product_Collection did not marked like deprecated - mark class as deprecated after 1.5.0.1 @@ -4982,7 +4992,7 @@ Fixed Free shipping does not transfer to Google Checkout when it is enabled in a - Re factored and optimized code - Improved performance - Fixed typos -- Added dependency for GoogleCheckout module from Usa module +- Added dependency for GoogleCheckout module from Usa module - Added fedex and usps free methods supporting @@ -4994,7 +5004,7 @@ Due to a design flaw we are removing alternative image storage feature from this ==== 1.5.0.0 ===== === Major Highlights === -Added Payflow Link using HSS (Hosted Sole Solution) +Added Payflow Link using HSS (Hosted Sole Solution) Balance Response, Partial Authorization Transactions, Authorization Reversals Support for MasterCard and Discover with Authorize.net 3D Secure Authentication for Authorize.net payment method Authorize.Net SIM payment method @@ -5324,12 +5334,12 @@ Fixed Incorrect items number in "MY WISHLIST" after updated quantity in the Wish - Added new configuration option "Display Wishlist Summary" in System -> Configuration -> Customers -> Wishlist section - Removed quantity information from wishlist frontend page Fixed Update compare list after delete one item -Fixed No hint for disabled "Configure" button +Fixed No hint for disabled "Configure" button Fixed In Bundle product's page "Availability" string is not placed well Fixed Non-correct headers uses for email return-path. Fixed Numerous issued with displaying tax on front-end for bundled items Fixed Impossible save empty values for store view scope -Fixed Non-correct headers uses for email return-path. +Fixed Non-correct headers uses for email return-path. - Added "-f" parameter to transport instance at Mage_Core_Model_Email_Template::send() like PHP mail() needs 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 Fixed Order can be placed with non-configured composite product in Ordered Items @@ -5466,7 +5476,7 @@ Fixed CSS Merger Cache Ignores Hostname and HTTPS - removed "beta" mark on CSS merger feature in system configuration, because known issue with different host names for different store views is solved - split merged CSS storage into 2 parts: "css" and "css_secure" - included "port" and "base host name" parameters into merger hash generation algorithm as parameters -Fixed: Default country setting not affect country select field default value on frontend +Fixed: Default country setting not affect country select field default value on frontend Fixed Credit card data Iframe for PayflowLink is displayed on Order Review step for all payment methods Fixed The Wrong / not exist Url should be redirect to 404 page - Added section availability in preDispatch @@ -6018,12 +6028,12 @@ Fixed Incorrect items number in "MY WISHLIST" after updated quantity in the Wish - Added new configuration option "Display Wishlist Summary" in System -> Configuration -> Customers -> Wishlist section - Removed quantity information from wishlist frontend page Fixed Update compare list after delete one item -Fixed No hint for disabled "Configure" button +Fixed No hint for disabled "Configure" button Fixed In Bundle product's page "Availability" string is not placed well Fixed Non-correct headers uses for email return-path. Fixed Numerous issued with displaying tax on front-end for bundled items Fixed Impossible save empty values for store view scope -Fixed Non-correct headers uses for email return-path. +Fixed Non-correct headers uses for email return-path. - Added "-f" parameter to transport instance at Mage_Core_Model_Email_Template::send() like PHP mail() needs 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 Fixed Order can be placed with non-configured composite product in Ordered Items @@ -6043,12 +6053,12 @@ Fixed Incorrect items number in "MY WISHLIST" after updated quantity in the Wish - Added new configuration option "Display Wishlist Summary" in System -> Configuration -> Customers -> Wishlist section - Removed quantity information from wishlist frontend page Fixed Update compare list after delete one item -Fixed No hint for disabled "Configure" button +Fixed No hint for disabled "Configure" button Fixed In Bundle product's page "Availability" string is not placed well Fixed Non-correct headers uses for email return-path. Fixed Numerous issued with displaying tax on front-end for bundled items Fixed Impossible save empty values for store view scope -Fixed Non-correct headers uses for email return-path. +Fixed Non-correct headers uses for email return-path. - Added "-f" parameter to transport instance at Mage_Core_Model_Email_Template::send() like PHP mail() needs 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 Fixed Order can be placed with non-configured composite product in Ordered Items @@ -6222,7 +6232,7 @@ Fixed CSS Merger Cache Ignores Hostname and HTTPS - removed "beta" mark on CSS merger feature in system configuration, because known issue with different host names for different store views is solved - split merged CSS storage into 2 parts: "css" and "css_secure" - included "port" and "base host name" parameters into merger hash generation algorithm as parameters -Fixed: Default country setting not affect country select field default value on frontend +Fixed: Default country setting not affect country select field default value on frontend Fixed Credit card data Iframe for PayflowLink is displayed on Order Review step for all payment methods Fixed The Wrong / not exist Url should be redirect to 404 page - Added section availability in preDispatch @@ -6489,7 +6499,7 @@ Fixed CSS Merger Cache Ignores Hostname and HTTPS - removed "beta" mark on CSS merger feature in system configuration, because known issue with different host names for different store views is solved - split merged CSS storage into 2 parts: "css" and "css_secure" - included "port" and "base host name" parameters into merger hash generation algorithm as parameters -Fixed: Default country setting not affect country select field default value on frontend +Fixed: Default country setting not affect country select field default value on frontend Fixed Credit card data Iframe for PayflowLink is displayed on Order Review step for all payment methods Fixed The Wrong / not exist Url should be redirect to 404 page - Added section availability in preDispatch @@ -6635,7 +6645,7 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not ** Implemented new download process and dependencies rules ** Added correct behavior during extension reinstall, so dependencies will not reinstall automatically * Optimized rewrite selection from DB, added url rewrite and suffix validation at admin backend -* Added verification of access level for app/etc/local.xml. +* Added verification of access level for app/etc/local.xml. ** Now if server configuration has issue and this file accessible from browser admin user gets notification in backend. * Upgraded Zend Framework to version 1.10.8 * Added the Recurring Profiles tab in customer management @@ -6763,7 +6773,7 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed wrong shipping price in case of sales rule with fixed cart discount and 1 item in cart * Fixed the label for the configurable product attribute does not reflect correctly on the frontend * Fixed sales rule with fixed discount for whole cart doesn't work -* Fixed "Slash for category or product urls causes error 404" +* Fixed "Slash for category or product urls causes error 404" * Fixed Shared shopping cart on the stores with different domains ** check origin url in all store urls ** prevent to getting SID param from current query @@ -6788,7 +6798,7 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed Image browser in WYSIWYG editor doesn't fill mouse over/out fields * Fixed Added rounding to "Refund Shipping" field on credit memo creation page. * Fixed Added additional error messages to customer address validation on PHP side while creating. -* Fixed "No server side check for password length when customer edits his account information" +* Fixed "No server side check for password length when customer edits his account information" ** Also added proper processing for password == '0', earlier it was considered as non-set password * Fixed WYSIWYG editor breaks directives that are not in src attribute * fixed directives decoding for a case when the secret key is present in URLs @@ -6855,7 +6865,7 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed Quick Search Autocomplete does not work via ajax http protocol for https page * Fixed Inventory->Qty Increments - unable to add * Fixed Loading search query performance issue -* Fixed Changed labels in checkout and payment information blocs for credit cards Solo Maestro Switch +* Fixed Changed labels in checkout and payment information blocs for credit cards Solo Maestro Switch * Fixed Product q-ty doesnt decrease after google checkout ** added same 'checkout_submit_all_after' event to AmazonPayments ** removed 'TODO' notice from Multishipping Checkout, because current scheme is better and will not be influenced by any Multishipping refactoring @@ -6880,7 +6890,7 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed Unable to refund Credit Memo because of Shipping Rounding * Fixed Added custom option info to recurring profile info page on frontend and backend. * Fixed Product Visibility and Status disappear when in search -* Fixed Removed validation of new customer shipping address on backend for orders with virtual products only +* Fixed Removed validation of new customer shipping address on backend for orders with virtual products only * Fixed ability to buy Product which have status "Out of Stock" through a direct link on button "Checkout with PayPal" * Fixed All free shipping methods in absent in Transfer Shipping Options menu on PayPal side * Fixed Payment methods titles for the PDF prints through admin gets from default config instead of the storeview config @@ -6934,13 +6944,13 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed Incorrect work of "Recently Compared Products" functional on category's page * Fixed behavior when having single store, javascript raises exception and all followed code is not executed * Fixed that Special price for dynamic bundle applies twice -* Fixed #21960: Labels in page/html_wrapper and core/text_list in layout +* Fixed #21960: Labels in page/html_wrapper and core/text_list in layout * Fixed GUI bugs on Recurrent Profile frontend part * Fixed Magento Connect -> Message about invalid URL is duplicated * Fixed that suspend Recurring Profile from front side leads to error * Fixed Missing pager for tagged product list * Fixed Wrong profiler output for getUrl in Category -* Fixed Saving of billing agreement relation with order - added force billing agreement re-saving and fixed isValid method in agreement detection. +* Fixed Saving of billing agreement relation with order - added force billing agreement re-saving and fixed isValid method in agreement detection. * Fixed Incorrect sort order reliable on mysql internal order during eav attribute load ** move prepare select to separate method * Fixed passing additional totals to PayPal when cart line items are disabled: @@ -6966,7 +6976,7 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed bug with 'Use Flat Catalog Category' * 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 * Fixed #16306: Webservice with htaccess (changes in code style) -* Fixed #22536: Light-weight email templates +* Fixed #22536: Light-weight email templates * Fixed #18935: Soap api v2 multiple complexFilters with the same key * Fixed incorrect Window titles on frontend * Fixed Eliminated display currency usage (instead of the base website currency) in shopping cart price rule conditions @@ -7005,47 +7015,47 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed #20481: Access Control List not retrieved for API user for resources() and resourceFaults() operations * Fixed #18367: FCGI Error on WSDL Url with Apache and mod_fastcgi * Fixed #22053: use HTTP 301 code instead of 302 in case of web/url/redirect_to_base -* Fixed #20654: Admin order creation->Move mouse cursor isn't changed into hand while move it on some product for adding +* Fixed #20654: Admin order creation->Move mouse cursor isn't changed into hand while move it on some product for adding * Fixed #21590: Attribute 'Date': testing for uniqueness fields not working * Fixed #21566: Type of attribute 'Price': Possible to add text value for field 'default value' * Fixed #22053: added optional behavior (301 or 302) * Fixed #21570: Review from not logged in user is saved in list of All Reviews when "Allow guests to write reviews = No" * Fixed #22090: Different values of Qty Increments during create and after duplicate products -* Fixed #22489: Eliminate difference between bundle.js in different skins +* Fixed #22489: Eliminate difference between bundle.js in different skins * Fixed #22419: Set default stock_data if not exist in create/update product * Fixed #20227: "Review(x)" link should be added to the compare page. * Fixed #21570: Review from not logged in user is saved in list of All Reviews when "Allow guests to write reviews = No" -* Fixed #20959: Locale problem in shipping tracking popup raises exception +* Fixed #20959: Locale problem in shipping tracking popup raises exception * Fixed #21955: Layout cache ignores product column count update * Fixed #20011: After using filter "Color" or "Manufacture" in Configurable Product meaning from column is disappear * Fixed #21908: Incorrect attribute ordering in "Compare products" page. -* Fixed #22222: Edit review-> if browse stores in the "Visible In " drop-down, rating values reseted +* Fixed #22222: Edit review-> if browse stores in the "Visible In " drop-down, rating values reseted * Fixed #22075: Product Attribute title specified for StoreView isn't showing on the configurable product's page * Fixed #22605: catalog_category.level return root categories when website or store are null -* Fixed #21806: Different values display on the shopping cart in front-end and back-end -* Fixed #20113: Shipping address display as default on the front-end and as not default on admin for one customer +* Fixed #21806: Different values display on the shopping cart in front-end and back-end +* Fixed #20113: Shipping address display as default on the front-end and as not default on admin for one customer * Fixed #22575: Trace error during using filter "Products" on Tags page ** added 'filter_index' to array parameter in addColumn() method call -* Fixed #14591: Incorrect SKU for Configurable Product with Custom Options +* Fixed #14591: Incorrect SKU for Configurable Product with Custom Options * Fixed #22476: Blank Column in Related Products Grid ** deleted duplicate output for editable columns * Fixed #22575: Trace error during using filter "Products" on Tags page ** apply filter_index field values to index -* Fixed #22644: A discrepancy between GT(Base) and GT(Purchased) -* Fixed #22645: Incorrect original price when using custom price in order. +* Fixed #22644: A discrepancy between GT(Base) and GT(Purchased) +* Fixed #22645: Incorrect original price when using custom price in order. * Fixed #22653: Missed checking for file existence in JS/CSS merger ** checking in source file exists. If not - do not check last modification and force to merge target file again -* Fixed #22594: Unable to place orders through checkout with multiple addresses with PayPal direct + zero subtotal for one order -* Fixed #21185: Newsletter confirmed automatically BEFORE account email is confirmed. -* Fixed #22167: "Add new row" button in downloadable product -* Fixed #21952: BUG - Category / Url Model (UYN-886991) +* Fixed #22594: Unable to place orders through checkout with multiple addresses with PayPal direct + zero subtotal for one order +* Fixed #21185: Newsletter confirmed automatically BEFORE account email is confirmed. +* Fixed #22167: "Add new row" button in downloadable product +* Fixed #21952: BUG - Category / Url Model (UYN-886991) * Fixed #15334, #17794 ** API category did not pass validation process due to available_sort_by must be ArrayOfString ** Added category validation for backend (missed) ** Creating separate validation for available_sort_by and default_sort_by attributes * Fixed #22599 Upgrade from 1.1.8 to 1.8.0.0 database compatibility issues (PARTIAL) -* Fixed #22661: 1 cent bug -* Fixed #22434: 100% discount of products -> the amounts of Tax and Grand Totals are or negative or not corectly +* Fixed #22661: 1 cent bug +* Fixed #22434: 100% discount of products -> the amounts of Tax and Grand Totals are or negative or not corectly * Fixed #10073: Unnecessary option for downloadable products * Fixed #20014: Qty use decimals for downloadable * Fixed #22164: Incorrect message for maximum shipping amount @@ -7062,20 +7072,20 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed #22266: HEADERS ALREADY SENT Error during dataflow import ** Additionally: moveing layout update in separate layout file of dataflow module. * Fixed #21412: The "Save Attribute" and "Save and Continue Edit" buttons become disabled after saving attribute with attribute code that exists -* Fixed #22844: After login to admin got 404 instead Startup Page -* Fixed #22852: shopping cart price rule - search by ID - error page +* Fixed #22844: After login to admin got 404 instead Startup Page +* Fixed #22852: shopping cart price rule - search by ID - error page * Fixed #15897: Unsubscription Email Sender in the Newsletters Subscription Options is not working correctly * Fixed #15899: Newsletters subscription confirmation in not working * Fixed #22908: Grid Serializer doesn't handle dropdowns as edit columns * Fixed #22946: 'Products Tagged by Administrators' grid contains information about product that is assigned by the customer -* Fixed #22935: Issue with Google AdWords and DSMM Code -* Fixed #22910: view of system/design table with no records under IE 8 +* Fixed #22935: Issue with Google AdWords and DSMM Code +* Fixed #22910: view of system/design table with no records under IE 8 * Fixed #22914: view of URL rewrite table with no records under IE 8 -* Fixed #22935: Issue with Google AdWords and DSMM Code -* Fixed #22536: Light-weight email templates +* Fixed #22935: Issue with Google AdWords and DSMM Code +* Fixed #22536: Light-weight email templates * Fixed #23017: Memcache session fallback does not work -* Fixed #22992: Trace appears during create reorder from front-end -* Fixed #22991: Cannot add items to shopping cart after active 'Use Flat Catalog Product' +* Fixed #22992: Trace appears during create reorder from front-end +* Fixed #22991: Cannot add items to shopping cart after active 'Use Flat Catalog Product' * Fixed #22813: Google base Undefined Offset when Managing attribute mapping * Fixed #23138: URL rewrite error on product creation * Added Regions for baltic states and Finland @@ -7194,14 +7204,14 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not == Improvements == * Optimized rewrite selection from DB, added url rewrite and suffix validation at admin backend -* Added verification of access level for app/etc/local.xml. +* Added verification of access level for app/etc/local.xml. ** Now if server configuration has issue and this file accessible from browser admin user gets notification in backend. == Changes == * Compilation scope for some EAV models which was causing blank page after enabling compilation == Fixes == -* Fixed "Slash for category or product urls causes error 404" +* Fixed "Slash for category or product urls causes error 404" * Fixed Shared shopping cart on the stores with different domains ** check origin url in all store urls ** prevent to getting SID param from current query @@ -7238,7 +7248,7 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed Image browser in WYSIWYG editor doesn't fill mouse over/out fields * Fixed Added rounding to "Refund Shipping" field on credit memo creation page. * Fixed Added additional error messages to customer address validation on PHP side while creating. -* Fixed "No server side check for password length when customer edits his account information" +* Fixed "No server side check for password length when customer edits his account information" ** Also added proper processing for password == '0', earlier it was considered as non-set password * Fixed WYSIWYG editor breaks directives that are not in src attribute * fixed directives decoding for a case when the secret key is present in URLs @@ -7316,7 +7326,7 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed Quick Search Autocomplete does not work via ajax http protocol for https page * Fixed Inventory->Qty Increments - unable to add * Fixed Loading search query performance issue -* Fixed Changed labels in checkout and payment information blocs for credit cards Solo Maestro Switch +* Fixed Changed labels in checkout and payment information blocs for credit cards Solo Maestro Switch * Fixed Product q-ty doesnt decrease after google checkout ** added same 'checkout_submit_all_after' event to AmazonPayments ** removed 'TODO' notice from Multishipping Checkout, because current scheme is better and will not be influenced by any Multishipping refactoring @@ -7341,7 +7351,7 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed Unable to refund Credit Memo because of Shipping Rounding * Fixed Added custom option info to recurring profile info page on frontend and backend. * Fixed Product Visibility and Status disappear when in search -* Fixed Removed validation of new customer shipping address on backend for orders with virtual products only +* Fixed Removed validation of new customer shipping address on backend for orders with virtual products only ==== 1.4.x-devel-78617 ==== @@ -7434,13 +7444,13 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed Incorrect work of "Recently Compared Products" functional on category's page * Fixed behavior when having single store, javascript raises exception and all followed code is not executed * Fixed that Special price for dynamic bundle applies twice -* Fixed #21960: Labels in page/html_wrapper and core/text_list in layout +* Fixed #21960: Labels in page/html_wrapper and core/text_list in layout * Fixed GUI bugs on Recurrent Profile frontend part * Fixed Magento Connect -> Message about invalid URL is duplicated * Fixed that suspend Recurring Profile from front side leads to error * Fixed Missing pager for tagged product list * Fixed Wrong profiler output for getUrl in Category -* Fixed Saving of billing agreement relation with order - added force billing agreement re-saving and fixed isValid method in agreement detection. +* Fixed Saving of billing agreement relation with order - added force billing agreement re-saving and fixed isValid method in agreement detection. * Fixed Incorrect sort order reliable on mysql internal order during eav attribute load ** move prepare select to separate method * Fixed passing additional totals to PayPal when cart line items are disabled: @@ -7486,7 +7496,7 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed bug with 'Use Flat Catalog Category' * 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 * Fixed #16306: Webservice with htaccess (changes in code style) -* Fixed #22536: Light-weight email templates +* Fixed #22536: Light-weight email templates * Fixed #18935: Soap api v2 multiple complexFilters with the same key * Fixed incorrect Window titles on frontend * Fixed Eliminated display currency usage (instead of the base website currency) in shopping cart price rule conditions @@ -7533,47 +7543,47 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed #20481: Access Control List not retrieved for API user for resources() and resourceFaults() operations * Fixed #18367: FCGI Error on WSDL Url with Apache and mod_fastcgi * Fixed #22053: use HTTP 301 code instead of 302 in case of web/url/redirect_to_base -* Fixed #20654: Admin order creation->Move mouse cursor isn't changed into hand while move it on some product for adding +* Fixed #20654: Admin order creation->Move mouse cursor isn't changed into hand while move it on some product for adding * Fixed #21590: Attribute 'Date': testing for uniqueness fields not working * Fixed #21566: Type of attribute 'Price': Possible to add text value for field 'default value' * Fixed #22053: added optional behavior (301 or 302) * Fixed #21570: Review from not logged in user is saved in list of All Reviews when "Allow guests to write reviews = No" * Fixed #22090: Different values of Qty Increments during create and after duplicate products -* Fixed #22489: Eliminate difference between bundle.js in different skins +* Fixed #22489: Eliminate difference between bundle.js in different skins * Fixed #22419: Set default stock_data if not exist in create/update product * Fixed #20227: "Review(x)" link should be added to the compare page. * Fixed #21570: Review from not logged in user is saved in list of All Reviews when "Allow guests to write reviews = No" -* Fixed #20959: Locale problem in shipping tracking popup raises exception +* Fixed #20959: Locale problem in shipping tracking popup raises exception * Fixed #21955: Layout cache ignores product column count update * Fixed #20011: After using filter "Color" or "Manufacture" in Configurable Product meaning from column is disappear * Fixed #21908: Incorrect attribute ordering in "Compare products" page. -* Fixed #22222: Edit review-> if browse stores in the "Visible In " drop-down, rating values reseted +* Fixed #22222: Edit review-> if browse stores in the "Visible In " drop-down, rating values reseted * Fixed #22075: Product Attribute title specified for StoreView isn't showing on the configurable product's page * Fixed #22605: catalog_category.level return root categories when website or store are null -* Fixed #21806: Different values display on the shopping cart in front-end and back-end -* Fixed #20113: Shipping address display as default on the front-end and as not default on admin for one customer +* Fixed #21806: Different values display on the shopping cart in front-end and back-end +* Fixed #20113: Shipping address display as default on the front-end and as not default on admin for one customer * Fixed #22575: Trace error during using filter "Products" on Tags page ** added 'filter_index' to array parameter in addColumn() method call -* Fixed #14591: Incorrect SKU for Configurable Product with Custom Options +* Fixed #14591: Incorrect SKU for Configurable Product with Custom Options * Fixed #22476: Blank Column in Related Products Grid ** deleted duplicate output for editable columns * Fixed #22575: Trace error during using filter "Products" on Tags page ** apply filter_index field values to index -* Fixed #22644: A discrepancy between GT(Base) and GT(Purchased) -* Fixed #22645: Incorrect original price when using custom price in order. +* Fixed #22644: A discrepancy between GT(Base) and GT(Purchased) +* Fixed #22645: Incorrect original price when using custom price in order. * Fixed #22653: Missed checking for file existents in JS/CSS merger ** cheking in source file exists. If not - do not check last modification and force to merge target file again -* Fixed #22594: Unable to place orders through checkout with multiple addresses with PayPal direct + zero subtotal for one order -* Fixed #21185: Newsletter confirmed automatically BEFORE account email is confirmed. -* Fixed #22167: "Add new row" button in downloadable product -* Fixed #21952: BUG - Category / Url Model (UYN-886991) +* Fixed #22594: Unable to place orders through checkout with multiple addresses with PayPal direct + zero subtotal for one order +* Fixed #21185: Newsletter confirmed automatically BEFORE account email is confirmed. +* Fixed #22167: "Add new row" button in downloadable product +* Fixed #21952: BUG - Category / Url Model (UYN-886991) * Fixed #15334, #17794 ** API category did not pass validation process due to available_sort_by must be ArrayOfString ** Added category validation for backend (missed) ** Creating separate validation for available_sort_by and default_sort_by attributes * Fixed #22599 Upgrade from 1.1.8 to 1.8.0.0 database compatibility issues (PARTIAL) -* Fixed #22661: 1 cent bug -* Fixed #22434: 100% discount of products -> the amounts of Tax and Grand Totals are or negative or not corectly +* Fixed #22661: 1 cent bug +* Fixed #22434: 100% discount of products -> the amounts of Tax and Grand Totals are or negative or not corectly * Fixed #10073: Unnecessary option for downloadable products * Fixed #20014: Qty use decimals for downloadable * Fixed #22164: Incorrect message for maximum shipping amount @@ -7590,20 +7600,20 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed #22266: HEADERS ALREADY SENT Error during dataflow import ** Additionally: moveing layout update in separate layout file of dataflow module. * Fixed #21412: The "Save Attribute" and "Save and Continue Edit" buttons become disabled after saving attribute with attribute code that exists -* Fixed #22844: After login to admin got 404 instead Startup Page -* Fixed #22852: shopping cart price rule - search by ID - error page +* Fixed #22844: After login to admin got 404 instead Startup Page +* Fixed #22852: shopping cart price rule - search by ID - error page * Fixed #15897: Unsubscription Email Sender in the Newsletters Subscription Options is not working correctly * Fixed #15899: Newsletters subscription confirmation in not working * Fixed #22908: Grid Serializer doesn't handle dropdowns as edit columns * Fixed #22946: 'Products Tagged by Administrators' grid contains information about product that is assigned by the customer -* Fixed #22935: Issue with Google AdWords and DSMM Code -* Fixed #22910: view of system/design table with no records under IE 8 +* Fixed #22935: Issue with Google AdWords and DSMM Code +* Fixed #22910: view of system/design table with no records under IE 8 * Fixed #22914: view of URL rewrite table with no records under IE 8 -* Fixed #22935: Issue with Google AdWords and DSMM Code -* Fixed #22536: Light-weight email templates +* Fixed #22935: Issue with Google AdWords and DSMM Code +* Fixed #22536: Light-weight email templates * Fixed #23017: Memcache session fallback does not work -* Fixed #22992: Trace appears during create reorder from front-end -* Fixed #22991: Cannot add items to shopping cart after active 'Use Flat Catalog Product' +* Fixed #22992: Trace appears during create reorder from front-end +* Fixed #22991: Cannot add items to shopping cart after active 'Use Flat Catalog Product' * Fixed #22813: Google base Undefined Offset when Managing attribute mapping * Fixed #23138: URL rewrite error on product creation * Added Regions for baltic states and Finland @@ -7613,7 +7623,7 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not * Fixed #16294: WSDL missing attributes for customerCustomerEntity * Fixed #22851: Used wrong resource model for api/user * Fixed #18207: SOAP-ERROR: Parsing Schema: can't import schema from 'http://schemas.xmlsoap.org/soap/encoding/' -* Fixed Fatal error: Call to undefined function eaccelerator_fetch() +* Fixed Fatal error: Call to undefined function eaccelerator_fetch() @@ -7626,7 +7636,7 @@ Fixed UPS XML Shipping method doesn't work, if country of shipping origin is not === Changes === * Checkout: added dispatching event 'checkout_submit_all_after' into all checkout models -* Centinel: changed event for resetting validation state +* Centinel: changed event for resetting validation state * Added check for Order ID before try to lookup transactions by Transaction Id * Added cvv field for Mastero/Switch/Solo cards. Also fixed html formatting. * Re-factored saving relation of billing agreement with order. diff --git a/app/Mage.php b/app/Mage.php index 4170479dc97..14339e9cb60 100644 --- a/app/Mage.php +++ b/app/Mage.php @@ -171,7 +171,7 @@ public static function getVersionInfo() 'major' => '1', 'minor' => '9', 'revision' => '2', - 'patch' => '1', + 'patch' => '2', 'stability' => '', 'number' => '', ); diff --git a/app/code/core/Mage/Admin/Model/Block.php b/app/code/core/Mage/Admin/Model/Block.php new file mode 100644 index 00000000000..f701d3ff5ad --- /dev/null +++ b/app/code/core/Mage/Admin/Model/Block.php @@ -0,0 +1,84 @@ + + */ +class Mage_Admin_Model_Block extends Mage_Core_Model_Abstract +{ + /** + * Initialize variable model + */ + protected function _construct() + { + $this->_init('admin/block'); + } + + /** + * @return array|bool + * @throws Exception + * @throws Zend_Validate_Exception + */ + public function validate() + { + $errors = array(); + + if (!Zend_Validate::is($this->getBlockName(), 'NotEmpty')) { + $errors[] = Mage::helper('adminhtml')->__('Block Name is required field.'); + } + if (!Zend_Validate::is($this->getBlockName(), 'Regex', array('/^[-_a-zA-Z0-9\/]*$/'))) { + $errors[] = Mage::helper('adminhtml')->__('Block Name is incorrect.'); + } + + if (!in_array($this->getIsAllowed(), array('0', '1'))) { + $errors[] = Mage::helper('adminhtml')->__('Is Allowed is required field.'); + } + + if (empty($errors)) { + return true; + } + return $errors; + } + + /** + * Check is block with such type allowed for parsinf via blockDirective method + * + * @param $type + * @return int + */ + public function isTypeAllowed($type) + { + /** @var Mage_Admin_Model_Resource_Block_Collection $collection */ + $collection = Mage::getResourceModel('admin/block_collection'); + $collection->addFieldToFilter('block_name', array('eq' => $type)) + ->addFieldToFilter('is_allowed', array('eq' => 1)); + return $collection->load()->count(); + } +} diff --git a/app/code/core/Mage/Admin/Model/Resource/Block.php b/app/code/core/Mage/Admin/Model/Resource/Block.php new file mode 100644 index 00000000000..f8ff3beb18e --- /dev/null +++ b/app/code/core/Mage/Admin/Model/Resource/Block.php @@ -0,0 +1,44 @@ + + */ +class Mage_Admin_Model_Resource_Block extends Mage_Core_Model_Resource_Db_Abstract +{ + /** + * Define main table + * + */ + protected function _construct() + { + $this->_init('admin/permission_block', 'block_id'); + } +} diff --git a/app/code/core/Mage/Admin/Model/Resource/Block/Collection.php b/app/code/core/Mage/Admin/Model/Resource/Block/Collection.php new file mode 100644 index 00000000000..08bb60e4099 --- /dev/null +++ b/app/code/core/Mage/Admin/Model/Resource/Block/Collection.php @@ -0,0 +1,44 @@ + + */ +class Mage_Admin_Model_Resource_Block_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract +{ + /** + * Define resource model + * + */ + protected function _construct() + { + $this->_init('admin/block'); + } +} diff --git a/app/code/core/Mage/Admin/Model/Resource/Variable.php b/app/code/core/Mage/Admin/Model/Resource/Variable.php new file mode 100644 index 00000000000..b0a62b4a922 --- /dev/null +++ b/app/code/core/Mage/Admin/Model/Resource/Variable.php @@ -0,0 +1,43 @@ + + */ +class Mage_Admin_Model_Resource_Variable extends Mage_Core_Model_Resource_Db_Abstract +{ + /** + * Define main table + */ + protected function _construct() + { + $this->_init('admin/permission_variable', 'variable_id'); + } +} diff --git a/app/code/core/Mage/Admin/Model/Resource/Variable/Collection.php b/app/code/core/Mage/Admin/Model/Resource/Variable/Collection.php new file mode 100644 index 00000000000..7b108c5a8b4 --- /dev/null +++ b/app/code/core/Mage/Admin/Model/Resource/Variable/Collection.php @@ -0,0 +1,44 @@ + + */ +class Mage_Admin_Model_Resource_Variable_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract +{ + /** + * Define resource model + * + */ + protected function _construct() + { + $this->_init('admin/variable'); + } +} diff --git a/app/code/core/Mage/Admin/Model/Variable.php b/app/code/core/Mage/Admin/Model/Variable.php new file mode 100644 index 00000000000..cccbe473e31 --- /dev/null +++ b/app/code/core/Mage/Admin/Model/Variable.php @@ -0,0 +1,80 @@ +_init('admin/variable'); + } + + /** + * @return array|bool + * @throws Exception + * @throws Zend_Validate_Exception + */ + public function validate() + { + $errors = array(); + + if (!Zend_Validate::is($this->getVariableName(), 'NotEmpty')) { + $errors[] = Mage::helper('adminhtml')->__('Variable Name is required field.'); + } + if (!Zend_Validate::is($this->getVariableName(), 'Regex', array('/^[-_a-zA-Z0-9\/]*$/'))) { + $errors[] = Mage::helper('adminhtml')->__('Variable Name is incorrect.'); + } + + if (!in_array($this->getIsAllowed(), array('0', '1'))) { + $errors[] = Mage::helper('adminhtml')->__('Is Allowed is required field.'); + } + + if (empty($errors)) { + return true; + } + return $errors; + } + + /** + * Check is config directive with given path can be parsed via configDirective method + * + * @param $path string + * @return int + */ + public function isPathAllowed($path) + { + /** @var Mage_Admin_Model_Resource_Variable_Collection $collection */ + $collection = Mage::getResourceModel('admin/variable_collection'); + $collection->addFieldToFilter('variable_name', array('eq' => $path)) + ->addFieldToFilter('is_allowed', array('eq' => 1)); + return $collection->load()->count(); + } +} diff --git a/app/code/core/Mage/Admin/etc/config.xml b/app/code/core/Mage/Admin/etc/config.xml index 7136e9cb1c5..774b17bf86a 100644 --- a/app/code/core/Mage/Admin/etc/config.xml +++ b/app/code/core/Mage/Admin/etc/config.xml @@ -28,7 +28,7 @@ - 1.6.1.1 + 1.6.1.2 @@ -50,6 +50,12 @@ admin_rule
+ + permission_variable
+
+ + permission_block
+
admin_assert
diff --git a/app/code/core/Mage/Admin/sql/admin_setup/upgrade-1.6.1.1-1.6.1.2.php b/app/code/core/Mage/Admin/sql/admin_setup/upgrade-1.6.1.1-1.6.1.2.php new file mode 100644 index 00000000000..0518ddd33de --- /dev/null +++ b/app/code/core/Mage/Admin/sql/admin_setup/upgrade-1.6.1.1-1.6.1.2.php @@ -0,0 +1,103 @@ +startSetup(); + +$table = $installer->getConnection() + ->newTable($installer->getTable('admin/permission_variable')) + ->addColumn('variable_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( + 'identity' => true, + 'unsigned' => true, + 'nullable' => false, + 'primary' => true, + ), 'Variable ID') + ->addColumn('variable_name', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array( + 'primary' => true, + 'nullable' => false, + 'default' => "", + ), 'Config Path') + ->addColumn('is_allowed', Varien_Db_Ddl_Table::TYPE_BOOLEAN, null, array( + 'nullable' => false, + 'default' => 0, + ), 'Mark that config can be processed by filters') + ->addIndex($installer->getIdxName('admin/permission_variable', array('variable_name'), Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE), + array('variable_name'), array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE)) + ->setComment('System variables that can be processed via content filter'); +$installer->getConnection()->createTable($table); + +$installer->getConnection()->insertMultiple( + $installer->getTable('admin/permission_variable'), + array( + array('variable_name' => 'trans_email/ident_support/name', 'is_allowed' => 1), + array('variable_name' => 'trans_email/ident_support/email','is_allowed' => 1), + array('variable_name' => 'web/unsecure/base_url','is_allowed' => 1), + array('variable_name' => 'web/secure/base_url','is_allowed' => 1), + array('variable_name' => 'trans_email/ident_general/name','is_allowed' => 1), + array('variable_name' => 'trans_email/ident_general/email', 'is_allowed' => 1), + array('variable_name' => 'trans_email/ident_sales/name','is_allowed' => 1), + array('variable_name' => 'trans_email/ident_sales/email','is_allowed' => 1), + array('variable_name' => 'trans_email/ident_custom1/name','is_allowed' => 1), + array('variable_name' => 'trans_email/ident_custom1/email','is_allowed' => 1), + array('variable_name' => 'trans_email/ident_custom2/name','is_allowed' => 1), + array('variable_name' => 'trans_email/ident_custom2/email','is_allowed' => 1), + array('variable_name' => 'general/store_information/name', 'is_allowed' => 1), + array('variable_name' => 'general/store_information/phone','is_allowed' => 1), + array('variable_name' => 'general/store_information/address', 'is_allowed' => 1), + ) +); + +$table = $installer->getConnection() + ->newTable($installer->getTable('admin/permission_block')) + ->addColumn('block_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( + 'identity' => true, + 'unsigned' => true, + 'nullable' => false, + 'primary' => true, + ), 'Block ID') + ->addColumn('block_name', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array( + 'nullable' => false, + 'default' => "", + ), 'Block Name') + ->addColumn('is_allowed', Varien_Db_Ddl_Table::TYPE_BOOLEAN, null, array( + 'nullable' => false, + 'default' => 0, + ), 'Mark that block can be processed by filters') + ->addIndex($installer->getIdxName('admin/permission_block', array('block_name'), Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE), + array('block_name'), array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE)) + ->setComment('System blocks that can be processed via content filter'); +$installer->getConnection()->createTable($table); + +$installer->getConnection()->insertMultiple( + $installer->getTable('admin/permission_block'), + array( + array('block_name' => 'core/template', 'is_allowed' => 1), + array('block_name' => 'catalog/product_new', 'is_allowed' => 1), + ) +); + +$installer->endSetup(); diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Block.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Block.php new file mode 100644 index 00000000000..9df4eb389ec --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Block.php @@ -0,0 +1,57 @@ + + */ +class Mage_Adminhtml_Block_Permissions_Block extends Mage_Adminhtml_Block_Widget_Grid_Container +{ + /** + * Construct + */ + public function __construct() + { + $this->_controller = 'permissions_block'; + $this->_headerText = Mage::helper('adminhtml')->__('Blocks'); + $this->_addButtonLabel = Mage::helper('adminhtml')->__('Add New Block'); + parent::__construct(); + } + + /** + * Prepare output HTML + * + * @return string + */ + protected function _toHtml() + { + Mage::dispatchEvent('permissions_block_html_before', array('block' => $this)); + return parent::_toHtml(); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit.php new file mode 100644 index 00000000000..93d6f4067f5 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit.php @@ -0,0 +1,64 @@ + + */ +class Mage_Adminhtml_Block_Permissions_Block_Edit extends Mage_Adminhtml_Block_Widget_Form_Container +{ + /** + * Construct + */ + public function __construct() + { + $this->_objectId = 'block_id'; + $this->_controller = 'permissions_block'; + + parent::__construct(); + + $this->_updateButton('save', 'label', Mage::helper('adminhtml')->__('Save Block')); + $this->_updateButton('delete', 'label', Mage::helper('adminhtml')->__('Delete Block')); + } + + /** + * Return text that to be placed to block header + * + * @return string + */ + public function getHeaderText() + { + if (Mage::registry('permissions_block')->getId()) { + return Mage::helper('adminhtml')->__("Edit Block '%s'", $this->escapeHtml(Mage::registry('permissions_block')->getBlockName())); + } + else { + return Mage::helper('adminhtml')->__('New block'); + } + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit/Form.php new file mode 100644 index 00000000000..3a7084a4e6f --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit/Form.php @@ -0,0 +1,84 @@ + + */ +class Mage_Adminhtml_Block_Permissions_Block_Edit_Form extends Mage_Adminhtml_Block_Widget_Form +{ + + /** + * @return Mage_Adminhtml_Block_Widget_Form + * @throws Exception + */ + protected function _prepareForm() + { + $block = Mage::getModel('admin/block')->load((int) $this->getRequest()->getParam('block_id')); + + $form = new Varien_Data_Form(array( + 'id' => 'edit_form', + 'action' => $this->getUrl('*/*/save', array('block_id' => (int) $this->getRequest()->getParam('block_id'))), + 'method' => 'post' + )); + $fieldset = $form->addFieldset( + 'block_details', array('legend' => $this->__('Block Details')) + ); + + $fieldset->addField('block_name', 'text', array( + 'label' => $this->__('Block Name'), + 'required' => true, + 'name' => 'block_name', + )); + + + $yesno = array( + array( + 'value' => 0, + 'label' => $this->__('No') + ), + array( + 'value' => 1, + 'label' => $this->__('Yes') + )); + + + $fieldset->addField('is_allowed', 'select', array( + 'name' => 'is_allowed', + 'label' => $this->__('Is Allowed'), + 'title' => $this->__('Is Allowed'), + 'values' => $yesno, + )); + + $form->setUseContainer(true); + $form->setValues($block->getData()); + $this->setForm($form); + return parent::_prepareForm(); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Block/Grid.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Block/Grid.php new file mode 100644 index 00000000000..fb49065c646 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Block/Grid.php @@ -0,0 +1,103 @@ + + */ +class Mage_Adminhtml_Block_Permissions_Block_Grid extends Mage_Adminhtml_Block_Widget_Grid +{ + /** + * Construct + */ + public function __construct() + { + parent::__construct(); + $this->setId('permissionsBlockGrid'); + $this->setDefaultSort('block_id'); + $this->setDefaultDir('asc'); + $this->setUseAjax(true); + } + + /** + * @return Mage_Adminhtml_Block_Widget_Grid + */ + protected function _prepareCollection() + { + $collection = Mage::getResourceModel('admin/block_collection'); + $this->setCollection($collection); + return parent::_prepareCollection(); + } + + /** + * @return $this + * @throws Exception + */ + protected function _prepareColumns() + { + $this->addColumn('block_id', array( + 'header' => Mage::helper('adminhtml')->__('ID'), + 'width' => 5, + 'align' => 'right', + 'sortable' => true, + 'index' => 'block_id' + )); + + $this->addColumn('block_name', array( + 'header' => Mage::helper('adminhtml')->__('Block Name'), + 'index' => 'block_name' + )); + + $this->addColumn('is_allowed', array( + 'header' => Mage::helper('adminhtml')->__('Status'), + 'index' => 'is_allowed', + 'type' => 'options', + 'options' => array('1' => Mage::helper('adminhtml')->__('Allowed'), '0' => Mage::helper('adminhtml')->__('Not allowed')), + )); + + return parent::_prepareColumns(); + } + + /** + * @param $row + * @return string + */ + public function getRowUrl($row) + { + return $this->getUrl('*/*/edit', array('block_id' => $row->getId())); + } + + /** + * @return string + */ + public function getGridUrl() + { + return $this->getUrl('*/*/blockGrid', array()); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Variable.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Variable.php new file mode 100644 index 00000000000..a2a651d1425 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Variable.php @@ -0,0 +1,57 @@ + + */ +class Mage_Adminhtml_Block_Permissions_Variable extends Mage_Adminhtml_Block_Widget_Grid_Container +{ + /** + * Construct + */ + public function __construct() + { + $this->_controller = 'permissions_variable'; + $this->_headerText = Mage::helper('adminhtml')->__('Variables'); + $this->_addButtonLabel = Mage::helper('adminhtml')->__('Add new variable'); + parent::__construct(); + } + + /** + * Prepare output HTML + * + * @return string + */ + protected function _toHtml() + { + Mage::dispatchEvent('permissions_variable_html_before', array('block' => $this)); + return parent::_toHtml(); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit.php new file mode 100644 index 00000000000..98ad880a035 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit.php @@ -0,0 +1,62 @@ + + */ +class Mage_Adminhtml_Block_Permissions_Variable_Edit extends Mage_Adminhtml_Block_Widget_Form_Container +{ + /** + * Construct + */ + public function __construct() + { + $this->_objectId = 'variable_id'; + $this->_controller = 'permissions_variable'; + + parent::__construct(); + + $this->_updateButton('save', 'label', Mage::helper('adminhtml')->__('Save Variable')); + $this->_updateButton('delete', 'label', Mage::helper('adminhtml')->__('Delete Variable')); + } + + /** + * @return string + */ + public function getHeaderText() + { + if (Mage::registry('permissions_variable')->getId()) { + return Mage::helper('adminhtml')->__("Edit Variable '%s'", $this->escapeHtml(Mage::registry('permissions_variable')->getVariableName())); + } + else { + return Mage::helper('adminhtml')->__('New Variable'); + } + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit/Form.php new file mode 100644 index 00000000000..34a5ff3453c --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit/Form.php @@ -0,0 +1,88 @@ + + */ +class Mage_Adminhtml_Block_Permissions_Variable_Edit_Form extends Mage_Adminhtml_Block_Widget_Form +{ + /** + * @return Mage_Adminhtml_Block_Widget_Form + * @throws Exception + */ + protected function _prepareForm() + { + $block = Mage::getModel('admin/variable')->load((int) $this->getRequest()->getParam('variable_id')); + + $form = new Varien_Data_Form(array( + 'id' => 'edit_form', + 'action' => $this->getUrl( + '*/*/save', + array( + 'variable_id' => (int) $this->getRequest()->getParam('variable_id') + ) + ), + 'method' => 'post' + )); + $fieldset = $form->addFieldset( + 'variable_details', array('legend' => $this->__('Variable Details')) + ); + + $fieldset->addField('variable_name', 'text', array( + 'label' => $this->__('Variable Name'), + 'required' => true, + 'name' => 'variable_name', + )); + + + $yesno = array( + array( + 'value' => 0, + 'label' => $this->__('No') + ), + array( + 'value' => 1, + 'label' => $this->__('Yes') + )); + + + $fieldset->addField('is_allowed', 'select', array( + 'name' => 'is_allowed', + 'label' => $this->__('Is Allowed'), + 'title' => $this->__('Is Allowed'), + 'values' => $yesno, + )); + + $form->setUseContainer(true); + $form->setValues($block->getData()); + $this->setForm($form); + return parent::_prepareForm(); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Grid.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Grid.php new file mode 100644 index 00000000000..b40fea53c4f --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Grid.php @@ -0,0 +1,104 @@ + + */ +class Mage_Adminhtml_Block_Permissions_Variable_Grid extends Mage_Adminhtml_Block_Widget_Grid +{ + /** + * Construct + */ + public function __construct() + { + parent::__construct(); + $this->setId('permissionsVariableGrid'); + $this->setDefaultSort('variable_id'); + $this->setDefaultDir('asc'); + $this->setUseAjax(true); + } + + /** + * @return Mage_Adminhtml_Block_Widget_Grid + */ + protected function _prepareCollection() + { + /** @var Mage_Admin_Model_Resource_Variable_Collection $collection */ + $collection = Mage::getResourceModel('admin/variable_collection'); + $this->setCollection($collection); + return parent::_prepareCollection(); + } + + /** + * @throws Exception + */ + protected function _prepareColumns() + { + $this->addColumn('variable_id', array( + 'header' => Mage::helper('adminhtml')->__('ID'), + 'width' => 5, + 'align' => 'right', + 'sortable' => true, + 'index' => 'variable_id' + )); + $this->addColumn('variable_name', array( + 'header' => Mage::helper('adminhtml')->__('Variable'), + 'index' => 'variable_name' + )); + $this->addColumn('is_allowed', array( + 'header' => Mage::helper('adminhtml')->__('Status'), + 'index' => 'is_allowed', + 'type' => 'options', + 'options' => array( + '1' => Mage::helper('adminhtml')->__('Allowed'), + '0' => Mage::helper('adminhtml')->__('Not allowed')), + ) + ); + + parent::_prepareColumns(); + } + + /** + * @param $row + * @return string + */ + public function getRowUrl($row) + { + return $this->getUrl('*/*/edit', array('variable_id' => $row->getId())); + } + + /** + * @return string + */ + public function getGridUrl() + { + return $this->getUrl('*/*/variableGrid', array()); + } +} diff --git a/app/code/core/Mage/Adminhtml/controllers/Permissions/BlockController.php b/app/code/core/Mage/Adminhtml/controllers/Permissions/BlockController.php new file mode 100644 index 00000000000..4f35094e78b --- /dev/null +++ b/app/code/core/Mage/Adminhtml/controllers/Permissions/BlockController.php @@ -0,0 +1,216 @@ + + */ +class Mage_Adminhtml_Permissions_BlockController extends Mage_Adminhtml_Controller_Action +{ + /** + * @return $this + */ + protected function _initAction() + { + $this->loadLayout() + ->_setActiveMenu('system/acl') + ->_addBreadcrumb($this->__('System'), $this->__('System')) + ->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions')) + ->_addBreadcrumb($this->__('Blocks'), $this->__('Blocks')); + return $this; + } + + /** + * Index action + */ + public function indexAction() + { + $this->_title($this->__('System')) + ->_title($this->__('Permissions')) + ->_title($this->__('Blocks')); + + /** @var Mage_Adminhtml_Block_Permissions_Block $block */ + $block = $this->getLayout()->createBlock('adminhtml/permissions_block'); + $this->_initAction() + ->_addContent($block) + ->renderLayout(); + } + + /** + * New action + */ + public function newAction() + { + $this->_forward('edit'); + } + + /** + * Edit action + */ + public function editAction() + { + $this->_title($this->__('System')) + ->_title($this->__('Permissions')) + ->_title($this->__('Blocks')); + + $id = (int) $this->getRequest()->getParam('block_id'); + $model = Mage::getModel('admin/block'); + + if ($id) { + $model->load($id); + if (! $model->getId()) { + Mage::getSingleton('adminhtml/session')->addError($this->__('This block no longer exists.')); + $this->_redirect('*/*/'); + return; + } + } + + $this->_title($model->getId() ? $model->getBlockName() : $this->__('New Block')); + + // Restore previously entered form data from session + $data = Mage::getSingleton('adminhtml/session')->getUserData(true); + if (!empty($data)) { + $model->setData($data); + } + + Mage::register('permissions_block', $model); + + if (isset($id)) { + $breadcrumb = $this->__('Edit Block'); + } else { + $breadcrumb = $this->__('New Block'); + } + $this->_initAction() + ->_addBreadcrumb($breadcrumb, $breadcrumb); + + $this->getLayout()->getBlock('adminhtml.permissions.block.edit') + ->setData('action', $this->getUrl('*/permissions_block/save')); + + $this->renderLayout(); + } + + /** + * Save action + * + * @return $this|void + */ + public function saveAction() + { + if ($data = $this->getRequest()->getPost()) { + $id = (int) $this->getRequest()->getParam('block_id'); + $model = Mage::getModel('admin/block')->load($id); + if (!$model->getId() && $id) { + Mage::getSingleton('adminhtml/session')->addError($this->__('This block no longer exists.')); + $this->_redirect('*/*/'); + return; + } + + $model->setData($data); + if ($id) { + $model->setId($id); + } + $result = $model->validate(); + + if (is_array($result)) { + Mage::getSingleton('adminhtml/session')->setUserData($data); + foreach ($result as $message) { + Mage::getSingleton('adminhtml/session')->addError($message); + } + $this->_redirect('*/*/edit', array('block_id' => $id)); + return $this; + } + try { + $model->save(); + Mage::getSingleton('adminhtml/session')->addSuccess($this->__('The block has been saved.')); + // clear previously saved data from session + Mage::getSingleton('adminhtml/session')->setFormData(false); + + $this->_redirect('*/*/'); + return; + + } catch (Exception $e) { + // display error message + Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); + // save data in session + Mage::getSingleton('adminhtml/session')->setFormData($data); + // redirect to edit form + $this->_redirect('*/*/edit', array('block_id' => $id)); + return; + } + } + $this->_redirect('*/*/'); + } + + /** + * Delete action + */ + public function deleteAction() + { + $id = (int) $this->getRequest()->getParam('block_id'); + if ($id) { + try { + $model = Mage::getModel('admin/block'); + $model->setId($id); + $model->delete(); + Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Block has been deleted.')); + $this->_redirect('*/*/'); + return; + } + catch (Exception $e) { + Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); + $this->_redirect('*/*/edit', array('block_id' => $id)); + return; + } + } + Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a block to delete.')); + $this->_redirect('*/*/'); + } + + /** + * Grid action + */ + public function blockGridAction() + { + $this->getResponse() + ->setBody($this->getLayout() + ->createBlock('adminhtml/permissions_block_grid') + ->toHtml() + ); + } + + /** + * Check permissions before allow edit list of blocks + * + * @return bool + */ + protected function _isAllowed() + { + return Mage::getSingleton('admin/session')->isAllowed('system/acl/blocks'); + } +} diff --git a/app/code/core/Mage/Adminhtml/controllers/Permissions/VariableController.php b/app/code/core/Mage/Adminhtml/controllers/Permissions/VariableController.php new file mode 100644 index 00000000000..399d8836dc0 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/controllers/Permissions/VariableController.php @@ -0,0 +1,215 @@ + + */ +class Mage_Adminhtml_Permissions_VariableController extends Mage_Adminhtml_Controller_Action +{ + /** + * @return $this + */ + protected function _initAction() + { + $this->loadLayout() + ->_setActiveMenu('system/acl') + ->_addBreadcrumb($this->__('System'), $this->__('System')) + ->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions')) + ->_addBreadcrumb($this->__('Variables'), $this->__('Variables')); + return $this; + } + + /** + * Index action + */ + public function indexAction() + { + $this->_title($this->__('System')) + ->_title($this->__('Permissions')) + ->_title($this->__('Variables')); + + /** @var Mage_Adminhtml_Block_Permissions_Variables $block */ + $block = $this->getLayout()->createBlock('adminhtml/permissions_variable'); + $this->_initAction() + ->_addContent($block) + ->renderLayout(); + } + + /** + * New action + */ + public function newAction() + { + $this->_forward('edit'); + } + + /** + * Edit action + */ + public function editAction() + { + $this->_title($this->__('System')) + ->_title($this->__('Permissions')) + ->_title($this->__('Variables')); + + $id = (int) $this->getRequest()->getParam('variable_id'); + $model = Mage::getModel('admin/variable'); + + if ($id) { + $model->load($id); + if (!$model->getId()) { + Mage::getSingleton('adminhtml/session')->addError($this->__('This variable no longer exists.')); + $this->_redirect('*/*/'); + return; + } + } + + $this->_title($model->getId() ? $model->getVariableName() : $this->__('New Variable')); + + // Restore previously entered form data from session + $data = Mage::getSingleton('adminhtml/session')->getUserData(true); + if (!empty($data)) { + $model->setData($data); + } + + Mage::register('permissions_variable', $model); + + if (isset($id)) { + $breadcrumb = $this->__('Edit Variable'); + } else { + $breadcrumb = $this->__('New Variable'); + } + $this->_initAction() + ->_addBreadcrumb($breadcrumb, $breadcrumb); + + $this->getLayout()->getBlock('adminhtml.permissions.variable.edit') + ->setData('action', $this->getUrl('*/permissions_variable/save')); + + $this->renderLayout(); + } + + /** + * Save action + * + * @return $this|void + */ + public function saveAction() + { + if ($data = $this->getRequest()->getPost()) { + $id = (int) $this->getRequest()->getParam('variable_id'); + $model = Mage::getModel('admin/variable')->load($id); + if (!$model->getId() && $id) { + Mage::getSingleton('adminhtml/session')->addError($this->__('This variable no longer exists.')); + $this->_redirect('*/*/'); + return; + } + + $model->setData($data); + if ($id) { + $model->setId($id); + } + $result = $model->validate(); + + if (is_array($result)) { + Mage::getSingleton('adminhtml/session')->setUserData($data); + foreach ($result as $message) { + Mage::getSingleton('adminhtml/session')->addError($message); + } + $this->_redirect('*/*/edit', array('variable_id' => $id)); + return $this; + } + try { + $model->save(); + Mage::getSingleton('adminhtml/session')->addSuccess($this->__('The variable has been saved.')); + // clear previously saved data from session + Mage::getSingleton('adminhtml/session')->setFormData(false); + + $this->_redirect('*/*/'); + return; + + } catch (Exception $e) { + // display error message + Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); + // save data in session + Mage::getSingleton('adminhtml/session')->setFormData($data); + // redirect to edit form + $this->_redirect('*/*/edit', array('variable_id' => $id)); + return; + } + } + $this->_redirect('*/*/'); + } + + /** + * Delete action + */ + public function deleteAction() + { + $id = (int) $this->getRequest()->getParam('variable_id'); + if ($id) { + try { + $model = Mage::getModel('admin/variable'); + $model->setId($id); + $model->delete(); + Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Variable has been deleted.')); + $this->_redirect('*/*/'); + return; + } catch (Exception $e) { + Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); + $this->_redirect('*/*/edit', array('variable_id' => $id)); + return; + } + } + Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a variable to delete.')); + $this->_redirect('*/*/'); + } + + /** + * Grid action + */ + public function variableGridAction() + { + $this->getResponse() + ->setBody($this->getLayout() + ->createBlock('adminhtml/permissions_variable_grid') + ->toHtml() + ); + } + + /** + * Check permissions before allow edit list of config variables + * + * @return bool + */ + protected function _isAllowed() + { + return Mage::getSingleton('admin/session')->isAllowed('system/acl/variables'); + } +} diff --git a/app/code/core/Mage/Adminhtml/etc/adminhtml.xml b/app/code/core/Mage/Adminhtml/etc/adminhtml.xml index 9c447314c57..82ddb0b99f0 100644 --- a/app/code/core/Mage/Adminhtml/etc/adminhtml.xml +++ b/app/code/core/Mage/Adminhtml/etc/adminhtml.xml @@ -94,6 +94,14 @@ Roles adminhtml/permissions_role + + Variables + adminhtml/permissions_variable + + + Blocks + adminhtml/permissions_block + @@ -142,6 +150,12 @@ Users 20 + + Variables + + + Blocks + diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php b/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php index 65c4ec9e730..db7fb2ba3a7 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php @@ -126,17 +126,9 @@ public function validateUserValue($values) * Check whether we receive uploaded file or restore file by: reorder/edit configuration or * previous configuration with no newly uploaded file */ - $fileInfo = null; - if (isset($values[$option->getId()]) && is_array($values[$option->getId()])) { - // Legacy style, file info comes in array with option id index - $fileInfo = $values[$option->getId()]; - } else { - /* - * New recommended style - file info comes in request processing parameters and we - * sure that this file info originates from Magento, not from manually formed POST request - */ - $fileInfo = $this->_getCurrentConfigFileInfo(); - } + + $fileInfo = $this->_getCurrentConfigFileInfo(); + if ($fileInfo !== null) { if (is_array($fileInfo) && $this->_validateFile($fileInfo)) { $value = $fileInfo; @@ -448,6 +440,11 @@ public function prepareForCart() // Save option in request, because we have no $_FILES['options'] $requestOptions[$this->getOption()->getId()] = $value; $result = serialize($value); + try { + Mage::helper('core/unserializeArray')->unserialize($result); + } catch (Exception $e) { + Mage::throwException(Mage::helper('catalog')->__("File options format is not valid.")); + } } else { /* * Clear option info from request, so it won't be stored in our db upon @@ -478,7 +475,7 @@ public function getFormattedOptionValue($optionValue) { if ($this->_formattedOptionValue === null) { try { - $value = unserialize($optionValue); + $value = Mage::helper('core/unserializeArray')->unserialize($optionValue); $customOptionUrlParams = $this->getCustomOptionUrlParams() ? $this->getCustomOptionUrlParams() @@ -542,7 +539,7 @@ protected function _unserializeValue($value) if (is_array($value)) { return $value; } elseif (is_string($value) && !empty($value)) { - return unserialize($value); + return Mage::helper('core/unserializeArray')->unserialize($value); } else { return array(); } @@ -568,7 +565,7 @@ public function getPrintableOptionValue($optionValue) public function getEditableOptionValue($optionValue) { try { - $value = unserialize($optionValue); + $value = Mage::helper('core/unserializeArray')->unserialize($optionValue); return sprintf('%s [%d]', Mage::helper('core')->escapeHtml($value['title']), $this->getConfigurationItemOption()->getId() @@ -593,7 +590,6 @@ public function parseOptionValue($optionValue, $productOptionValues) $confItemOptionId = $matches[1]; $option = Mage::getModel('sales/quote_item_option')->load($confItemOptionId); try { - unserialize($option->getValue()); return $option->getValue(); } catch (Exception $e) { return null; @@ -612,7 +608,7 @@ public function parseOptionValue($optionValue, $productOptionValues) public function prepareOptionValueForRequest($optionValue) { try { - $result = unserialize($optionValue); + $result = Mage::helper('core/unserializeArray')->unserialize($optionValue); return $result; } catch (Exception $e) { return null; @@ -628,7 +624,7 @@ public function copyQuoteToOrder() { $quoteOption = $this->getQuoteItemOption(); try { - $value = unserialize($quoteOption->getValue()); + $value = Mage::helper('core/unserializeArray')->unserialize($quoteOption->getValue()); if (!isset($value['quote_path'])) { throw new Exception(); } diff --git a/app/code/core/Mage/Connect/Helper/Data.php b/app/code/core/Mage/Connect/Helper/Data.php index 04b1ea707c9..4e72af551bd 100644 --- a/app/code/core/Mage/Connect/Helper/Data.php +++ b/app/code/core/Mage/Connect/Helper/Data.php @@ -33,6 +33,18 @@ */ class Mage_Connect_Helper_Data extends Mage_Core_Helper_Data { + /** + * Path to directory that contains XML packages definition + * + * @var string + */ + protected $_localPackagesPath; + + public function __construct() + { + $this->_localPackagesPath = Mage::getBaseDir('var') . DS . 'connect' . DS; + } + /** * Retrieve file system path for local extension packages * Return path with last directory separator @@ -41,7 +53,17 @@ class Mage_Connect_Helper_Data extends Mage_Core_Helper_Data */ public function getLocalPackagesPath() { - return Mage::getBaseDir('var') . DS . 'connect' . DS; + return $this->_localPackagesPath; + } + + /** + * Set file system path for local extension packages + * + */ + public function setLocalPackagesPath($path) + { + $this->_localPackagesPath = $path; + return $this; } /** diff --git a/app/code/core/Mage/Core/Controller/Front/Action.php b/app/code/core/Mage/Core/Controller/Front/Action.php index 6dab88b6e6e..f310cc17897 100755 --- a/app/code/core/Mage/Core/Controller/Front/Action.php +++ b/app/code/core/Mage/Core/Controller/Front/Action.php @@ -173,9 +173,19 @@ protected function _prepareDownloadResponse($fileName, $content, $contentType = protected function _validateFormKey() { $validated = true; - if (Mage::getStoreConfigFlag(self::XML_CSRF_USE_FLAG_CONFIG_PATH)) { + if ($this->_isFormKeyEnabled()) { $validated = parent::_validateFormKey(); } return $validated; } + + /** + * Check if form key validation is enabled. + * + * @return bool + */ + protected function _isFormKeyEnabled() + { + return Mage::getStoreConfigFlag(self::XML_CSRF_USE_FLAG_CONFIG_PATH); + } } diff --git a/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php b/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php index 0dd89ffad90..b19aaa14395 100644 --- a/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php +++ b/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php @@ -130,6 +130,29 @@ public function collectRoutes($configArea, $useRouterName) parent::collectRoutes($configArea, $useRouterName); } + /** + * Add module definition to routes. + * + * @param string $frontName + * @param mixed $moduleName + * @param string $routeName + * @return $this + */ + public function addModule($frontName, $moduleName, $routeName) + { + $isExtensionsCompatibilityMode = (bool)(string)Mage::getConfig()->getNode( + 'default/admin/security/extensions_compatibility_mode' + ); + $configRouterFrontName = (string)Mage::getConfig()->getNode( + Mage_Adminhtml_Helper_Data::XML_PATH_ADMINHTML_ROUTER_FRONTNAME + ); + if ($isExtensionsCompatibilityMode || ($frontName == $configRouterFrontName)) { + return parent::addModule($frontName, $moduleName, $routeName); + } else { + return $this; + } + } + /** * Check if current controller instance is allowed in current router. * diff --git a/app/code/core/Mage/Core/Helper/UnserializeArray.php b/app/code/core/Mage/Core/Helper/UnserializeArray.php new file mode 100644 index 00000000000..9f6b9762b9c --- /dev/null +++ b/app/code/core/Mage/Core/Helper/UnserializeArray.php @@ -0,0 +1,46 @@ + + */ +class Mage_Core_Helper_UnserializeArray +{ + /** + * @param string $str + * @return array + * @throws Exception + */ + public function unserialize($str) + { + $parser = new Unserialize_Parser(); + return $parser->unserialize($str); + } +} diff --git a/app/code/core/Mage/Core/Model/Email/Queue.php b/app/code/core/Mage/Core/Model/Email/Queue.php index 69f325123d6..8ad1970faaa 100644 --- a/app/code/core/Mage/Core/Model/Email/Queue.php +++ b/app/code/core/Mage/Core/Model/Email/Queue.php @@ -41,6 +41,11 @@ * @method Mage_Core_Model_Email_Queue setMessageParameters(array $value) * @method Mage_Core_Model_Email_Queue setProcessedAt(string $value) * @method array getMessageParameters() + * + * @category Mage + * @package Mage_Core + * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @license http://www.magentocommerce.com/license/enterprise-edition */ class Mage_Core_Model_Email_Queue extends Mage_Core_Model_Abstract { diff --git a/app/code/core/Mage/Core/Model/Email/Template/Filter.php b/app/code/core/Mage/Core/Model/Email/Template/Filter.php index 8b42400de48..12afbc41b84 100644 --- a/app/code/core/Mage/Core/Model/Email/Template/Filter.php +++ b/app/code/core/Mage/Core/Model/Email/Template/Filter.php @@ -70,6 +70,12 @@ class Mage_Core_Model_Email_Template_Filter extends Varien_Filter_Template */ protected $_inlineCssFile = false; + /** @var Mage_Admin_Model_Variable */ + protected $_permissionVariable; + + /** @var Mage_Admin_Model_Block */ + protected $_permissionBlock; + /** * Setup callbacks for filters * @@ -77,6 +83,8 @@ class Mage_Core_Model_Email_Template_Filter extends Varien_Filter_Template public function __construct() { $this->_modifiers['escape'] = array($this, 'modifierEscape'); + $this->_permissionVariable = Mage::getModel('admin/variable'); + $this->_permissionBlock = Mage::getModel('admin/block'); } /** @@ -165,8 +173,10 @@ public function blockDirective($construction) $layout = Mage::app()->getLayout(); if (isset($blockParameters['type'])) { - $type = $blockParameters['type']; - $block = $layout->createBlock($type, null, $blockParameters); + if ($this->_permissionBlock->isTypeAllowed($blockParameters['type'])) { + $type = $blockParameters['type']; + $block = $layout->createBlock($type, null, $blockParameters); + } } elseif (isset($blockParameters['id'])) { $block = $layout->createBlock('cms/block'); if ($block) { @@ -466,7 +476,7 @@ public function configDirective($construction) $configValue = ''; $params = $this->_getIncludeParameters($construction[2]); $storeId = $this->getStoreId(); - if (isset($params['path'])) { + if (isset($params['path']) && $this->_permissionVariable->isPathAllowed($params['path'])) { $configValue = Mage::getStoreConfig($params['path'], $storeId); } return $configValue; diff --git a/app/code/core/Mage/Core/Model/Resource/Setup.php b/app/code/core/Mage/Core/Model/Resource/Setup.php index d67502976c7..a24d88893f6 100644 --- a/app/code/core/Mage/Core/Model/Resource/Setup.php +++ b/app/code/core/Mage/Core/Model/Resource/Setup.php @@ -641,7 +641,6 @@ protected function _modifyResourceDb($actionType, $fromVersion, $toVersion) $this->_setResourceVersion($actionType, $file['toVersion']); } } catch (Exception $e) { - printf('
%s
', print_r($e, true)); throw Mage::exception('Mage_Core', Mage::helper('core')->__('Error in file: "%s" - %s', $fileName, $e->getMessage())); } $version = $file['toVersion']; diff --git a/app/code/core/Mage/Core/etc/config.xml b/app/code/core/Mage/Core/etc/config.xml index 444f8301b1a..1c6a70ea042 100644 --- a/app/code/core/Mage/Core/etc/config.xml +++ b/app/code/core/Mage/Core/etc/config.xml @@ -415,6 +415,7 @@ 1 2 2 + 1 diff --git a/app/code/core/Mage/Core/etc/system.xml b/app/code/core/Mage/Core/etc/system.xml index c9715cd2846..1943649c492 100644 --- a/app/code/core/Mage/Core/etc/system.xml +++ b/app/code/core/Mage/Core/etc/system.xml @@ -1188,7 +1188,7 @@ 0 0 - + select Enabling ability to run Magento in a frame is not recommended for security reasons. @@ -1198,7 +1198,7 @@ 0 0 - + Enabling ability to run Magento in a frame is not recommended for security reasons. select @@ -1208,6 +1208,16 @@ 0 0 + + + Enabling this setting increases risk of automated attacks against admin functionality. + select + 6 + adminhtml/system_config_source_enabledisable + 1 + 0 + 0 + diff --git a/app/code/core/Mage/Customer/Block/Account/Changeforgotten.php b/app/code/core/Mage/Customer/Block/Account/Changeforgotten.php new file mode 100644 index 00000000000..e4e3963d14d --- /dev/null +++ b/app/code/core/Mage/Customer/Block/Account/Changeforgotten.php @@ -0,0 +1,37 @@ + + */ +class Mage_Customer_Block_Account_Changeforgotten extends Mage_Core_Block_Template +{ + +} diff --git a/app/code/core/Mage/Customer/Block/Account/Resetpassword.php b/app/code/core/Mage/Customer/Block/Account/Resetpassword.php index f4229ecc1db..2ad31b704f7 100644 --- a/app/code/core/Mage/Customer/Block/Account/Resetpassword.php +++ b/app/code/core/Mage/Customer/Block/Account/Resetpassword.php @@ -32,6 +32,9 @@ * @author Magento Core Team */ +/** + * @deprecated + */ class Mage_Customer_Block_Account_Resetpassword extends Mage_Core_Block_Template { diff --git a/app/code/core/Mage/Customer/controllers/AccountController.php b/app/code/core/Mage/Customer/controllers/AccountController.php index 27cdb95d8d5..19543f74cd8 100644 --- a/app/code/core/Mage/Customer/controllers/AccountController.php +++ b/app/code/core/Mage/Customer/controllers/AccountController.php @@ -33,6 +33,9 @@ */ class Mage_Customer_AccountController extends Mage_Core_Controller_Front_Action { + const CUSTOMER_ID_SESSION_NAME = "customerId"; + const TOKEN_SESSION_NAME = "token"; + /** * Action list where need check enabled cookie * @@ -72,6 +75,7 @@ public function preDispatch() 'logoutsuccess', 'forgotpassword', 'forgotpasswordpost', + 'changeforgotten', 'resetpassword', 'resetpasswordpost', 'confirm', @@ -268,15 +272,21 @@ public function createAction() */ public function createPostAction() { + $errUrl = $this->_getUrl('*/*/create', array('_secure' => true)); + + if (!$this->_validateFormKey()) { + $this->_redirectError($errUrl); + return; + } + /** @var $session Mage_Customer_Model_Session */ $session = $this->_getSession(); if ($session->isLoggedIn()) { $this->_redirect('*/*/'); return; } - $session->setEscapeMessages(true); // prevent XSS injection in user input + if (!$this->getRequest()->isPost()) { - $errUrl = $this->_getUrl('*/*/create', array('_secure' => true)); $this->_redirectError($errUrl); return; } @@ -300,16 +310,15 @@ public function createPostAction() if ($e->getCode() === Mage_Customer_Model_Customer::EXCEPTION_EMAIL_EXISTS) { $url = $this->_getUrl('customer/account/forgotpassword'); $message = $this->__('There is already an account with this email address. If you are sure that it is your email address, click here to get your password and access your account.', $url); - $session->setEscapeMessages(false); } else { - $message = $e->getMessage(); + $message = $this->_escapeHtml($e->getMessage()); } $session->addError($message); } catch (Exception $e) { - $session->setCustomerFormData($this->getRequest()->getPost()) - ->addException($e, $this->__('Cannot save the customer.')); + $session->setCustomerFormData($this->getRequest()->getPost()); + $session->addException($e, $this->__('Cannot save the customer.')); } - $errUrl = $this->_getUrl('*/*/create', array('_secure' => true)); + $this->_redirectError($errUrl); } @@ -377,13 +386,24 @@ protected function _addSessionError($errors) $session->setCustomerFormData($this->getRequest()->getPost()); if (is_array($errors)) { foreach ($errors as $errorMessage) { - $session->addError($errorMessage); + $session->addError($this->_escapeHtml($errorMessage)); } } else { $session->addError($this->__('Invalid customer data')); } } + /** + * Escape message text HTML. + * + * @param string $text + * @return string + */ + protected function _escapeHtml($text) + { + return Mage::helper('core')->escapeHtml($text); + } + /** * Validate customer data and return errors if they are * @@ -741,23 +761,39 @@ public function forgotPasswordPostAction() /** * Display reset forgotten password form * - * User is redirected on this action when he clicks on the corresponding link in password reset confirmation email - * */ - public function resetPasswordAction() + public function changeForgottenAction() { - $resetPasswordLinkToken = (string) $this->getRequest()->getQuery('token'); - $customerId = (int) $this->getRequest()->getQuery('id'); try { + list($customerId, $resetPasswordLinkToken) = $this->_getRestorePasswordParameters($this->_getSession()); $this->_validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken); $this->loadLayout(); - // Pass received parameters to the reset forgotten password form - $this->getLayout()->getBlock('resetPassword') - ->setCustomerId($customerId) - ->setResetPasswordLinkToken($resetPasswordLinkToken); $this->renderLayout(); + } catch (Exception $exception) { - $this->_getSession()->addError( $this->_getHelper('customer')->__('Your password reset link has expired.')); + $this->_getSession()->addError($this->_getHelper('customer')->__('Your password reset link has expired.')); + $this->_redirect('*/*/forgotpassword'); + } + } + + /** + * Checks reset forgotten password token + * + * User is redirected on this action when he clicks on the corresponding link in password reset confirmation email. + * + */ + public function resetPasswordAction() + { + try { + $customerId = (int)$this->getRequest()->getQuery("id"); + $resetPasswordLinkToken = (string)$this->getRequest()->getQuery('token'); + + $this->_validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken); + $this->_saveRestorePasswordParameters($customerId, $resetPasswordLinkToken) + ->_redirect('*/*/changeforgotten'); + + } catch (Exception $exception) { + $this->_getSession()->addError($this->_getHelper('customer')->__('Your password reset link has expired.')); $this->_redirect('*/*/forgotpassword'); } } @@ -768,15 +804,14 @@ public function resetPasswordAction() */ public function resetPasswordPostAction() { - $resetPasswordLinkToken = (string) $this->getRequest()->getQuery('token'); - $customerId = (int) $this->getRequest()->getQuery('id'); - $password = (string) $this->getRequest()->getPost('password'); - $passwordConfirmation = (string) $this->getRequest()->getPost('confirmation'); + list($customerId, $resetPasswordLinkToken) = $this->_getRestorePasswordParameters($this->_getSession()); + $password = (string)$this->getRequest()->getPost('password'); + $passwordConfirmation = (string)$this->getRequest()->getPost('confirmation'); try { $this->_validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken); } catch (Exception $exception) { - $this->_getSession()->addError( $this->_getHelper('customer')->__('Your password reset link has expired.')); + $this->_getSession()->addError($this->_getHelper('customer')->__('Your password reset link has expired.')); $this->_redirect('*/*/'); return; } @@ -800,10 +835,7 @@ public function resetPasswordPostAction() foreach ($errorMessages as $errorMessage) { $this->_getSession()->addError($errorMessage); } - $this->_redirect('*/*/resetpassword', array( - 'id' => $customerId, - 'token' => $resetPasswordLinkToken - )); + $this->_redirect('*/*/changeforgotten'); return; } @@ -813,14 +845,15 @@ public function resetPasswordPostAction() $customer->setRpTokenCreatedAt(null); $customer->cleanPasswordsValidationData(); $customer->save(); - $this->_getSession()->addSuccess( $this->_getHelper('customer')->__('Your password has been updated.')); + + $this->_getSession()->unsetData(self::TOKEN_SESSION_NAME); + $this->_getSession()->unsetData(self::CUSTOMER_ID_SESSION_NAME); + + $this->_getSession()->addSuccess($this->_getHelper('customer')->__('Your password has been updated.')); $this->_redirect('*/*/login'); } catch (Exception $exception) { $this->_getSession()->addException($exception, $this->__('Cannot save a new password.')); - $this->_redirect('*/*/resetpassword', array( - 'id' => $customerId, - 'token' => $resetPasswordLinkToken - )); + $this->_redirect('*/*/changeforgotten'); return; } } @@ -997,4 +1030,34 @@ protected function _isVatValidationEnabled($store = null) { return $this->_getHelper('customer/address')->isVatValidationEnabled($store); } + + /** + * Get restore password params. + * + * @param Mage_Customer_Model_Session $session + * @return array array ($customerId, $resetPasswordToken) + */ + protected function _getRestorePasswordParameters(Mage_Customer_Model_Session $session) + { + return array( + (int) $session->getData(self::CUSTOMER_ID_SESSION_NAME), + (string) $session->getData(self::TOKEN_SESSION_NAME) + ); + } + + /** + * Save restore password params to session. + * + * @param int $customerId + * @param string $resetPasswordLinkToken + * @return $this + */ + protected function _saveRestorePasswordParameters($customerId, $resetPasswordLinkToken) + { + $this->_getSession() + ->setData(self::CUSTOMER_ID_SESSION_NAME, $customerId) + ->setData(self::TOKEN_SESSION_NAME, $resetPasswordLinkToken); + + return $this; + } } diff --git a/app/code/core/Mage/Downloadable/Model/Product/Type.php b/app/code/core/Mage/Downloadable/Model/Product/Type.php index 77b7792fdb2..c0919707e19 100644 --- a/app/code/core/Mage/Downloadable/Model/Product/Type.php +++ b/app/code/core/Mage/Downloadable/Model/Product/Type.php @@ -178,6 +178,10 @@ public function save($product = null) unset($sampleItem['file']); } + if (isset($sampleItem['sample_url'])) { + $sampleItem['sample_url'] = Mage::helper('core')->escapeUrl($sampleItem['sample_url']); + } + $sampleModel->setData($sampleItem) ->setSampleType($sampleItem['type']) ->setProductId($product->getId()) @@ -220,6 +224,9 @@ public function save($product = null) $sample = $linkItem['sample']; unset($linkItem['sample']); } + if (isset($linkItem['link_url'])) { + $linkItem['link_url'] = Mage::helper('core')->escapeUrl($linkItem['link_url']); + } $linkModel = Mage::getModel('downloadable/link') ->setData($linkItem) ->setLinkType($linkItem['type']) @@ -236,7 +243,7 @@ public function save($product = null) $sampleFile = array(); if ($sample && isset($sample['type'])) { if ($sample['type'] == 'url' && $sample['url'] != '') { - $linkModel->setSampleUrl($sample['url']); + $linkModel->setSampleUrl(Mage::helper('core')->escapeUrl($sample['url'])); } $linkModel->setSampleType($sample['type']); $sampleFile = Mage::helper('core')->jsonDecode($sample['file']); diff --git a/app/code/core/Mage/Eav/Model/Resource/Attribute/Collection.php b/app/code/core/Mage/Eav/Model/Resource/Attribute/Collection.php index 42f9c8f4399..c4128341d3a 100755 --- a/app/code/core/Mage/Eav/Model/Resource/Attribute/Collection.php +++ b/app/code/core/Mage/Eav/Model/Resource/Attribute/Collection.php @@ -216,7 +216,9 @@ public function addVisibleFilter() public function addSystemHiddenFilter() { $field = '(CASE WHEN additional_table.is_system = 1 AND additional_table.is_visible = 0 THEN 1 ELSE 0 END)'; - return $this->addFieldToFilter($field, 0); + $resultCondition = $this->_getConditionSql($field, 0); + $this->_select->where($resultCondition); + return $this; } /** @@ -228,7 +230,8 @@ public function addSystemHiddenFilterWithPasswordHash() { $field = '(CASE WHEN additional_table.is_system = 1 AND additional_table.is_visible = 0 AND main_table.attribute_code != "' . self::EAV_CODE_PASSWORD_HASH . '" THEN 1 ELSE 0 END)'; - $this->addFieldToFilter($field, 0); + $resultCondition = $this->_getConditionSql($field, 0); + $this->_select->where($resultCondition); return $this; } diff --git a/app/code/core/Mage/Sales/Model/Resource/Order/Item/Collection.php b/app/code/core/Mage/Sales/Model/Resource/Order/Item/Collection.php index 89ab719c05c..0f8dfbafd23 100755 --- a/app/code/core/Mage/Sales/Model/Resource/Order/Item/Collection.php +++ b/app/code/core/Mage/Sales/Model/Resource/Order/Item/Collection.php @@ -139,4 +139,17 @@ public function filterByParent($parentId = null) } return $this; } + + /** + * Filter only available items. + * + * @return Mage_Sales_Model_Resource_Order_Item_Collection + */ + public function addAvailableFilter() + { + $fieldExpression = '(qty_shipped - qty_returned)'; + $resultCondition = $this->_getConditionSql($fieldExpression, array("gt" => 0)); + $this->getSelect()->where($resultCondition); + return $this; + } } diff --git a/app/code/core/Mage/Sales/controllers/DownloadController.php b/app/code/core/Mage/Sales/controllers/DownloadController.php index 6c500713a7a..c76ed631ccb 100644 --- a/app/code/core/Mage/Sales/controllers/DownloadController.php +++ b/app/code/core/Mage/Sales/controllers/DownloadController.php @@ -48,6 +48,8 @@ protected function _downloadFileAction($info) throw new Exception(); } + $this->_validateFilePath($info); + $filePath = Mage::getBaseDir() . $info['order_path']; if ((!is_file($filePath) || !is_readable($filePath)) && !$this->_processDatabaseFile($filePath)) { //try get file from quote @@ -65,6 +67,19 @@ protected function _downloadFileAction($info) } } + /** + * @param array $info + * @throws Exception + */ + protected function _validateFilePath($info) + { + $optionFile = Mage::getModel('catalog/product_option_type_file'); + $optionStoragePath = $optionFile->getOrderTargetDir(true); + if (strpos($info['order_path'], $optionStoragePath) !== 0) { + throw new Exception('Unexpected file path'); + } + } + /** * Check file in database storage if needed and place it on file system * @@ -176,7 +191,7 @@ public function downloadCustomOptionAction() } try { - $info = unserialize($option->getValue()); + $info = Mage::helper('core/unserializeArray')->unserialize($option->getValue()); $this->_downloadFileAction($info); } catch (Exception $e) { $this->_forward('noRoute'); diff --git a/app/code/core/Mage/SalesRule/Model/Resource/Coupon/Collection.php b/app/code/core/Mage/SalesRule/Model/Resource/Coupon/Collection.php index e392fbaaaa1..583c368a964 100755 --- a/app/code/core/Mage/SalesRule/Model/Resource/Coupon/Collection.php +++ b/app/code/core/Mage/SalesRule/Model/Resource/Coupon/Collection.php @@ -97,9 +97,9 @@ public function addGeneratedCouponsFilter() public function addIsUsedFilterCallback($collection, $column) { $filterValue = $column->getFilter()->getCondition(); - $collection->addFieldToFilter( - $this->getConnection()->getCheckSql('main_table.times_used > 0', 1, 0), - array('eq' => $filterValue) - ); + + $fieldExpression = $this->getConnection()->getCheckSql('main_table.times_used > 0', 1, 0); + $resultCondition = $this->_getConditionSql($fieldExpression, array('eq' => $filterValue)); + $collection->getSelect()->where($resultCondition); } } diff --git a/app/design/adminhtml/default/default/layout/admin.xml b/app/design/adminhtml/default/default/layout/admin.xml index 5813b7d6701..f3a195eab9b 100644 --- a/app/design/adminhtml/default/default/layout/admin.xml +++ b/app/design/adminhtml/default/default/layout/admin.xml @@ -39,7 +39,18 @@ - + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/customer.xml b/app/design/frontend/base/default/layout/customer.xml index 0b82186b949..8a8546946ba 100644 --- a/app/design/frontend/base/default/layout/customer.xml +++ b/app/design/frontend/base/default/layout/customer.xml @@ -153,7 +153,7 @@ New customer registration - + @@ -172,9 +172,9 @@ New customer registration - + - + diff --git a/app/design/frontend/base/default/template/customer/form/register.phtml b/app/design/frontend/base/default/template/customer/form/register.phtml index bd4e44a4099..ec2042945d7 100644 --- a/app/design/frontend/base/default/template/customer/form/register.phtml +++ b/app/design/frontend/base/default/template/customer/form/register.phtml @@ -43,6 +43,7 @@
+

__('Personal Information') ?>

  • diff --git a/app/design/frontend/base/default/template/customer/form/resetforgottenpassword.phtml b/app/design/frontend/base/default/template/customer/form/resetforgottenpassword.phtml index 36119577650..691a96d413e 100644 --- a/app/design/frontend/base/default/template/customer/form/resetforgottenpassword.phtml +++ b/app/design/frontend/base/default/template/customer/form/resetforgottenpassword.phtml @@ -28,7 +28,7 @@

    __('Reset a Password'); ?>

getMessagesBlock()->toHtml(); ?> -
+
  • diff --git a/app/design/frontend/base/default/template/persistent/customer/form/register.phtml b/app/design/frontend/base/default/template/persistent/customer/form/register.phtml index 275f4d258f9..ccd1ea13862 100644 --- a/app/design/frontend/base/default/template/persistent/customer/form/register.phtml +++ b/app/design/frontend/base/default/template/persistent/customer/form/register.phtml @@ -42,6 +42,7 @@
    +

    __('Personal Information') ?>

    • diff --git a/app/design/frontend/default/iphone/layout/customer.xml b/app/design/frontend/default/iphone/layout/customer.xml index dd384fcdc11..2da07a42be1 100644 --- a/app/design/frontend/default/iphone/layout/customer.xml +++ b/app/design/frontend/default/iphone/layout/customer.xml @@ -141,7 +141,7 @@ New customer registration - + @@ -160,9 +160,9 @@ New customer registration - + - + diff --git a/app/design/frontend/default/modern/layout/customer.xml b/app/design/frontend/default/modern/layout/customer.xml index fb94b099bf3..42a65744285 100644 --- a/app/design/frontend/default/modern/layout/customer.xml +++ b/app/design/frontend/default/modern/layout/customer.xml @@ -156,7 +156,7 @@ New customer registration - + @@ -175,9 +175,9 @@ New customer registration - + - + diff --git a/app/design/frontend/rwd/default/layout/customer.xml b/app/design/frontend/rwd/default/layout/customer.xml index 271fc88c5b6..60deace1e95 100644 --- a/app/design/frontend/rwd/default/layout/customer.xml +++ b/app/design/frontend/rwd/default/layout/customer.xml @@ -158,7 +158,7 @@ New customer registration - + @@ -177,9 +177,9 @@ New customer registration - + - + diff --git a/app/design/frontend/rwd/default/template/customer/form/resetforgottenpassword.phtml b/app/design/frontend/rwd/default/template/customer/form/resetforgottenpassword.phtml index e7c05d959e2..79c186eba3e 100644 --- a/app/design/frontend/rwd/default/template/customer/form/resetforgottenpassword.phtml +++ b/app/design/frontend/rwd/default/template/customer/form/resetforgottenpassword.phtml @@ -28,7 +28,7 @@

      __('Reset a Password'); ?>

    getMessagesBlock()->toHtml(); ?> - +

    __('* Required Fields'); ?>

      diff --git a/app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml b/app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml index 855705157a5..04df7558fdd 100644 --- a/app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml +++ b/app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml @@ -42,6 +42,7 @@
      +

      __('Please enter the following information to create your account.') ?>

      __('* Required Fields') ?>

        diff --git a/app/locale/en_US/Mage_Adminhtml.csv b/app/locale/en_US/Mage_Adminhtml.csv index 60b4bcf8cb9..e9c476e31e7 100644 --- a/app/locale/en_US/Mage_Adminhtml.csv +++ b/app/locale/en_US/Mage_Adminhtml.csv @@ -65,6 +65,7 @@ "Add Field Mapping","Add Field Mapping" "Add Field with URL:","Add Field with URL:" "Add New","Add New" +"Add New Block","Add New Block" "Add New Image","Add New Image" "Add New Profile","Add New Profile" "Add New Role","Add New Role" @@ -77,6 +78,7 @@ "Add URL Rewrite for a Category","Add URL Rewrite for a Category" "Add URL Rewrite for a Product","Add URL Rewrite for a Product" "Add after","Add after" +"Add new variable","Add new variable" "Add to category","Add to category" "Additional Cache Management","Additional Cache Management" "Address Type:","Address Type:" @@ -99,6 +101,7 @@ "All possible rates were fetched, please click on ""Save"" to apply","All possible rates were fetched, please click on ""Save"" to apply" "All rates were fetched, please click on ""Save"" to apply","All rates were fetched, please click on ""Save"" to apply" "All valid rates have been saved.","All valid rates have been saved." +"Allowed","Allowed" "Already in category","Already in category" "Always (during development)","Always (during development)" "Amounts","Amounts" @@ -172,7 +175,13 @@ "Billing Address: ","Billing Address: " "Billing Agreement","Billing Agreement" "Billing Agreements","Billing Agreements" +"Block Details","Block Details" "Block Information","Block Information" +"Block Name","Block Name" +"Block Name is incorrect.","Block Name is incorrect." +"Block Name is required field.","Block Name is required field." +"Block has been deleted.","Block has been deleted." +"Blocks","Blocks" "Both (without and with tax)","Both (without and with tax)" "Both IPN and PDT","Both IPN and PDT" "Browse Files...","Browse Files..." @@ -301,6 +310,7 @@ "Delete","Delete" "Delete %s","Delete %s" "Delete %s '%s'","Delete %s '%s'" +"Delete Block","Delete Block" "Delete File","Delete File" "Delete Image","Delete Image" "Delete Profile","Delete Profile" @@ -309,6 +319,7 @@ "Delete Store View","Delete Store View" "Delete Template","Delete Template" "Delete User","Delete User" +"Delete Variable","Delete Variable" "Delete Website","Delete Website" "Description","Description" "Design","Design" @@ -330,6 +341,8 @@ "Drag to move","Drag to move" "Drop-down","Drop-down" "Edit","Edit" +"Edit Block","Edit Block" +"Edit Block '%s'","Edit Block '%s'" "Edit Design Change","Edit Design Change" "Edit Email Template","Edit Email Template" "Edit Order","Edit Order" @@ -343,6 +356,8 @@ "Edit URL Rewrite","Edit URL Rewrite" "Edit User","Edit User" "Edit User '%s'","Edit User '%s'" +"Edit Variable","Edit Variable" +"Edit Variable '%s'","Edit Variable '%s'" "Edit Website","Edit Website" "Email","Email" "Email Address:","Email Address:" @@ -487,6 +502,8 @@ "Invoice capturing error.","Invoice capturing error." "Invoice voiding error.","Invoice voiding error." "Invoices","Invoices" +"Is Allowed","Is Allowed" +"Is Allowed is required field.","Is Allowed is required field." "Is Closed","Is Closed" "Is Default","Is Default" "Issue Number","Issue Number" @@ -618,6 +635,7 @@ "New Variable","New Variable" "New Website","New Website" "New attribute set mapping","New attribute set mapping" +"New block","New block" "New password field cannot be empty.","New password field cannot be empty." "Newsletter","Newsletter" "Newsletter Problems","Newsletter Problems" @@ -643,6 +661,7 @@ "No search modules were registered","No search modules were registered" "No wishlist item id defined.","No wishlist item id defined." "None","None" +"Not allowed","Not allowed" "Note:","Note:" "Notes","Notes" "Notifications","Notifications" @@ -879,6 +898,7 @@ "Save","Save" "Save & Generate","Save & Generate" "Save Account","Save Account" +"Save Block","Save Block" "Save Cache Settings","Save Cache Settings" "Save Config","Save Config" "Save Currency Rates","Save Currency Rates" @@ -886,6 +906,7 @@ "Save Role","Save Role" "Save Template","Save Template" "Save User","Save User" +"Save Variable","Save Variable" "Save and Continue Edit","Save and Continue Edit" "Search","Search" "Search Index","Search Index" @@ -1004,6 +1025,7 @@ "The backup's creation process will take time.","The backup's creation process will take time." "The billing agreement has been canceled.","The billing agreement has been canceled." "The billing agreement has been deleted.","The billing agreement has been deleted." +"The block has been saved.","The block has been saved." "The cache storage has been flushed.","The cache storage has been flushed." "The carrier needs to be specified.","The carrier needs to be specified." "The catalog index has been rebuilt.","The catalog index has been rebuilt." @@ -1058,6 +1080,7 @@ "The transaction details have been updated.","The transaction details have been updated." "The user has been deleted.","The user has been deleted." "The user has been saved.","The user has been saved." +"The variable has been saved.","The variable has been saved." "Themes JavaScript and CSS files combined to one file.","Themes JavaScript and CSS files combined to one file." "There is an error in one of the option rows.","There is an error in one of the option rows." "This Account is","This Account is" @@ -1069,6 +1092,7 @@ "This action cannot be undone.","This action cannot be undone." "This attribute set does not have attributes which we can use for configurable product","This attribute set does not have attributes which we can use for configurable product" "This attribute shares the same value in all the stores","This attribute shares the same value in all the stores" +"This block no longer exists.","This block no longer exists." "This category is set to only include products matched by rules","This category is set to only include products matched by rules" "This is a demo store. Any orders placed through this store will not be honored or fulfilled.","This is a demo store. Any orders placed through this store will not be honored or fulfilled." "This is a required field.","This is a required field." @@ -1076,6 +1100,7 @@ "This report depends on timezone configuration. Once timezone is changed, the lifetime statistics need to be refreshed.","This report depends on timezone configuration. Once timezone is changed, the lifetime statistics need to be refreshed." "This section is not allowed.","This section is not allowed." "This user no longer exists.","This user no longer exists." +"This variable no longer exists.","This variable no longer exists." "Time","Time" "Time selection:","Time selection:" "Time:","Time:" @@ -1115,9 +1140,11 @@ "URL Rewrite Management","URL Rewrite Management" "Unable to cancel the credit memo.","Unable to cancel the credit memo." "Unable to find a Email Template to delete.","Unable to find a Email Template to delete." +"Unable to find a block to delete.","Unable to find a block to delete." "Unable to find a poll to delete.","Unable to find a poll to delete." "Unable to find a tag to delete.","Unable to find a tag to delete." "Unable to find a user to delete.","Unable to find a user to delete." +"Unable to find a variable to delete.","Unable to find a variable to delete." "Unable to initialize import model","Unable to initialize import model" "Unable to refresh lifetime statistics.","Unable to refresh lifetime statistics." "Unable to refresh recent statistics.","Unable to refresh recent statistics." @@ -1170,10 +1197,15 @@ "Value Delimiter:","Value Delimiter:" "Variable","Variable" "Variable Code","Variable Code" +"Variable Details","Variable Details" "Variable HTML Value","Variable HTML Value" "Variable ID","Variable ID" "Variable Name","Variable Name" +"Variable Name is incorrect.","Variable Name is incorrect." +"Variable Name is required field.","Variable Name is required field." "Variable Plain Value","Variable Plain Value" +"Variable has been deleted.","Variable has been deleted." +"Variables","Variables" "Verifier code: %s","Verifier code: %s" "View Actions XML","View Actions XML" "View Full Size","View Full Size" diff --git a/app/locale/en_US/Mage_Core.csv b/app/locale/en_US/Mage_Core.csv index b1dfcd529c1..12a7dede8a8 100644 --- a/app/locale/en_US/Mage_Core.csv +++ b/app/locale/en_US/Mage_Core.csv @@ -12,6 +12,7 @@ "Admin","Admin" "Admin Base URL","Admin Base URL" "Admin User Emails","Admin User Emails" +"Admin routing compatibility mode for extensions","Admin routing compatibility mode for extensions" "Advanced","Advanced" "After selecting a new media storage location, press the Synchronize button to transfer all media to that location. Media will not be available in the new @@ -126,6 +127,8 @@ "Enabled","Enabled" "Enabled for Admin","Enabled for Admin" "Enabled for Frontend","Enabled for Frontend" +"Enabling ability to run Magento in a frame is not recommended for security reasons.","Enabling ability to run Magento in a frame is not recommended for security reasons." +"Enabling this setting increases risk of automated attacks against admin functionality.","Enabling this setting increases risk of automated attacks against admin functionality." "Environment Update Time","Environment Update Time" "Error in file: ""%s"" - %s","Error in file: ""%s"" - %s" "European Union Countries","European Union Countries" diff --git a/cron.php b/cron.php index e19169400e4..1e9ef3b7400 100644 --- a/cron.php +++ b/cron.php @@ -60,10 +60,11 @@ Mage::throwException('Unrecognized cron mode was defined'); } } else if (!$isShellDisabled) { - $fileName = basename(__FILE__); - $baseDir = dirname(__FILE__); - shell_exec("/bin/sh $baseDir/cron.sh $fileName -mdefault 1 > /dev/null 2>&1 &"); - shell_exec("/bin/sh $baseDir/cron.sh $fileName -malways 1 > /dev/null 2>&1 &"); + $fileName = escapeshellarg(basename(__FILE__)); + $cronPath = escapeshellarg(dirname(__FILE__) . '/cron.sh'); + + shell_exec(escapeshellcmd("/bin/sh $cronPath $fileName -mdefault 1 > /dev/null 2>&1 &")); + shell_exec(escapeshellcmd("/bin/sh $cronPath $fileName -malways 1 > /dev/null 2>&1 &")); exit; } } diff --git a/dev/tests/functional/.gitignore b/dev/tests/functional/.gitignore deleted file mode 100644 index 840a21be371..00000000000 --- a/dev/tests/functional/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/composer.lock -/vendor -/generated -/var -/config/* -!/config/*.dist -phpunit.xml -credentials.xml diff --git a/dev/tests/functional/.htaccess b/dev/tests/functional/.htaccess deleted file mode 100644 index 0a28bdaf030..00000000000 --- a/dev/tests/functional/.htaccess +++ /dev/null @@ -1,194 +0,0 @@ -############################################ -## uncomment these lines for CGI mode -## make sure to specify the correct cgi php binary file name -## it might be /cgi-bin/php-cgi - -# Action php5-cgi /cgi-bin/php5-cgi -# AddHandler php5-cgi .php - -############################################ -## GoDaddy specific options - -# Options -MultiViews - -## you might also need to add this line to php.ini -## cgi.fix_pathinfo = 1 -## if it still doesn't work, rename php.ini to php5.ini - -############################################ -## this line is specific for 1and1 hosting - - #AddType x-mapp-php5 .php - #AddHandler x-mapp-php5 .php - -############################################ -## default index file - - DirectoryIndex index.php - - - -############################################ -## adjust memory limit - -# php_value memory_limit 64M - php_value memory_limit 256M - php_value max_execution_time 18000 - -############################################ -## disable magic quotes for php request vars - - php_flag magic_quotes_gpc off - -############################################ -## disable automatic session start -## before autoload was initialized - - php_flag session.auto_start off - -############################################ -## enable resulting html compression - - #php_flag zlib.output_compression on - -########################################### -# disable user agent verification to not break multiple image upload - - php_flag suhosin.session.cryptua off - -########################################### -# turn off compatibility with PHP4 when dealing with objects - - php_flag zend.ze1_compatibility_mode Off - - - - -########################################### -# disable POST processing to not break multiple image upload - - SecFilterEngine Off - SecFilterScanPOST Off - - - - -############################################ -## enable apache served files compression -## http://developer.yahoo.com/performance/rules.html#gzip - - # Insert filter on all content - ###SetOutputFilter DEFLATE - # Insert filter on selected content types only - #AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript - - # Netscape 4.x has some problems... - #BrowserMatch ^Mozilla/4 gzip-only-text/html - - # Netscape 4.06-4.08 have some more problems - #BrowserMatch ^Mozilla/4\.0[678] no-gzip - - # MSIE masquerades as Netscape, but it is fine - #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html - - # Don't compress images - #SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary - - # Make sure proxies don't deliver the wrong content - #Header append Vary User-Agent env=!dont-vary - - - - - -############################################ -## make HTTPS env vars available for CGI mode - - SSLOptions StdEnvVars - - - - - -############################################ -## enable rewrites - - Options +FollowSymLinks - RewriteEngine on - -############################################ -## you can put here your magento root folder -## path relative to web root - - #RewriteBase /magento/ - -############################################ -## workaround for HTTP authorization -## in CGI environment - - RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] - -############################################ -## TRACE and TRACK HTTP methods disabled to prevent XSS attacks - - RewriteCond %{REQUEST_METHOD} ^TRAC[EK] - RewriteRule .* - [L,R=405] - -############################################ -## redirect for mobile user agents - - #RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$ - #RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC] - #RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302] - -############################################ -## never rewrite for existing files, directories and links - - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_FILENAME} !-l - -############################################ -## rewrite everything else to index.php - - RewriteRule .* index.php [L] - - - - -############################################ -## Prevent character encoding issues from server overrides -## If you still have problems, use the second line instead - - AddDefaultCharset Off - #AddDefaultCharset UTF-8 - - - -############################################ -## Add default Expires header -## http://developer.yahoo.com/performance/rules.html#expires - - ExpiresDefault "access plus 1 year" - - - -############################################ -## By default allow all access - - Order allow,deny - Allow from all - -########################################### -## Deny access to release notes to prevent disclosure of the installed Magento version - - - order allow,deny - deny from all - - -############################################ -## If running in cluster environment, uncomment this -## http://developer.yahoo.com/performance/rules.html#etags - - #FileETag none diff --git a/dev/tests/functional/composer.json b/dev/tests/functional/composer.json index 59753538447..421f5ce9356 100644 --- a/dev/tests/functional/composer.json +++ b/dev/tests/functional/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "magento/mtf": "1.0.0-rc25", + "magento/mtf": "1.0.0-rc26", "php": ">=5.4.0", "phpunit/phpunit": "4.1.0", "phpunit/phpunit-selenium": ">=1.2", @@ -20,7 +20,6 @@ "psr-4": { "Magento\\": ["lib/Magento/", "vendor/magento/mtf/Magento/", "testsuites/Magento/"], "Mage\\": ["generated/Mage/", "tests/app/Mage/"], - "Enterprise\\": ["generated/Enterprise/", "tests/app/Enterprise/"], "Test\\": "generated/Test/" } } diff --git a/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Page.php b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Page.php index 483aec01a67..231e34b4885 100644 --- a/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Page.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Page.php @@ -40,19 +40,6 @@ class Page extends AbstractGenerate */ protected $configData; - /** - * @constructor - * @param \Magento\Mtf\ObjectManagerInterface $objectManager - * @param \Magento\Mtf\Config\DataInterface $configData - */ - public function __construct( - \Magento\Mtf\ObjectManagerInterface $objectManager, - \Magento\Mtf\Config\DataInterface $configData - ) { - parent::__construct($objectManager); - $this->configData = $configData; - } - /** * Launch generation of all page classes. * diff --git a/dev/tests/functional/tests/app/Mage/Admin/Test/Fixture/Role/RolesResources.php b/dev/tests/functional/tests/app/Mage/Admin/Test/Fixture/Role/RolesResources.php index b0e6016ca7b..0fdc15139c0 100644 --- a/dev/tests/functional/tests/app/Mage/Admin/Test/Fixture/Role/RolesResources.php +++ b/dev/tests/functional/tests/app/Mage/Admin/Test/Fixture/Role/RolesResources.php @@ -134,9 +134,6 @@ protected function getPreset($name) 'sales/order/actions/create/reward_spend', 'sales/invoice', 'sales/shipment', - 'sales/enterprise_rma', - 'sales/enterprise_rma/rma_manage', - 'sales/enterprise_rma/rma_attribute', 'sales/creditmemo', 'sales/checkoutagreement', 'sales/transactions', @@ -147,10 +144,6 @@ protected function getPreset($name) 'sales/billing_agreement/actions/view', 'sales/billing_agreement/actions/manage', 'sales/billing_agreement/actions/use', - 'sales/enterprise_checkout', - 'sales/enterprise_checkout/view', - 'sales/enterprise_checkout/update', - 'sales/enterprise_giftwrapping', 'sales/tax', 'sales/tax/classes_customer', 'sales/tax/classes_product', diff --git a/dev/tests/functional/tests/app/Mage/Admin/Test/TestCase/UseAclRoleWithRestrictedGwsScopeTest.php b/dev/tests/functional/tests/app/Mage/Admin/Test/TestCase/UseAclRoleWithRestrictedGwsScopeTest.php index 197a649afd0..60450ca6454 100644 --- a/dev/tests/functional/tests/app/Mage/Admin/Test/TestCase/UseAclRoleWithRestrictedGwsScopeTest.php +++ b/dev/tests/functional/tests/app/Mage/Admin/Test/TestCase/UseAclRoleWithRestrictedGwsScopeTest.php @@ -65,13 +65,6 @@ class UseAclRoleWithRestrictedGwsScopeTest extends Injectable */ protected $userEditPage; - /** - * Store groups fixture. - * - * @var StoreGroup[] - */ - protected $storeGroups; - /** * Factory of fixtures. * @@ -79,16 +72,6 @@ class UseAclRoleWithRestrictedGwsScopeTest extends Injectable */ protected $fixtureFactory; - /** - * Skipping test according to bug. - * - * @return void - */ - public function setUp() - { - $this->markTestIncomplete("Bug: MPERF-7606: Store name can't be found in 'Purchased From (Store)' filter."); - } - /** * Preconditions for test. * @@ -103,7 +86,6 @@ public function __prepare(FixtureFactory $fixtureFactory) $user = $fixtureFactory->createByCode('user', ['dataSet' => 'admin_without_role']); $user->persist(); - $this->storeGroups = $role->getDataFieldConfig('gws_store_groups')['source']->getStoreGroups(); $this->fixtureFactory = $fixtureFactory; return ['user' => $user, 'role' => $role]; @@ -137,7 +119,6 @@ public function test(User $user, Role $role) $this->userEditPage->getUserForm()->fill($this->prepareUser($user, $role)); $this->userEditPage->getFormPageActions()->save(); - return ['storeGroups' => $this->storeGroups]; } /** @@ -157,15 +138,4 @@ protected function prepareUser(User $user, Role $role) return $this->fixtureFactory->createByCode('user', ['data' => $userData]); } - /** - * Delete all custom Store Groups after test. - * - * @return void - */ - public function tearDown() - { - $this->objectManager->create( - 'Mage\Adminhtml\Test\TestStep\DeleteStoreGroupsStep', - ['storeGroups' => $this->storeGroups])->run(); - } } diff --git a/dev/tests/functional/tests/app/Mage/Admin/Test/TestCase/UseAclRoleWithRestrictedGwsScopeTest.xml b/dev/tests/functional/tests/app/Mage/Admin/Test/TestCase/UseAclRoleWithRestrictedGwsScopeTest.xml index 5b951f5d5e6..a250e68ed83 100644 --- a/dev/tests/functional/tests/app/Mage/Admin/Test/TestCase/UseAclRoleWithRestrictedGwsScopeTest.xml +++ b/dev/tests/functional/tests/app/Mage/Admin/Test/TestCase/UseAclRoleWithRestrictedGwsScopeTest.xml @@ -30,7 +30,6 @@ - diff --git a/dev/tests/functional/tests/app/Mage/Adminhtml/Test/Page/Adminhtml/Dashboard.xml b/dev/tests/functional/tests/app/Mage/Adminhtml/Test/Page/Adminhtml/Dashboard.xml index 0601623ecdc..0792d427a84 100644 --- a/dev/tests/functional/tests/app/Mage/Adminhtml/Test/Page/Adminhtml/Dashboard.xml +++ b/dev/tests/functional/tests/app/Mage/Adminhtml/Test/Page/Adminhtml/Dashboard.xml @@ -28,6 +28,6 @@ - + diff --git a/dev/tests/functional/tests/app/Mage/Adminhtml/Test/Repository/ConfigData.xml b/dev/tests/functional/tests/app/Mage/Adminhtml/Test/Repository/ConfigData.xml index 08f83a93bb4..e028c3661ec 100644 --- a/dev/tests/functional/tests/app/Mage/Adminhtml/Test/Repository/ConfigData.xml +++ b/dev/tests/functional/tests/app/Mage/Adminhtml/Test/Repository/ConfigData.xml @@ -26,16 +26,16 @@ */ --> - - - - general/website/base/store - 1 - German (Germany) - de_DE - - - + + + + general/website/base/store + 1 + German (Germany) + de_DE + + + general/website/base/store 1 @@ -43,5 +43,13 @@ en_US - + + + general/website/base/store + 1 + English (United States) + en_US + + + diff --git a/dev/tests/functional/tests/app/Mage/Adminhtml/Test/TestCase/CreateStoreEntityTest.xml b/dev/tests/functional/tests/app/Mage/Adminhtml/Test/TestCase/CreateStoreEntityTest.xml index dc56ac1d7b9..5834d5b4b2f 100644 --- a/dev/tests/functional/tests/app/Mage/Adminhtml/Test/TestCase/CreateStoreEntityTest.xml +++ b/dev/tests/functional/tests/app/Mage/Adminhtml/Test/TestCase/CreateStoreEntityTest.xml @@ -31,15 +31,14 @@ default store_name_%isolation% storecode_%isolation% - Aktiviert - store_view_local_germany - Die Store-Ansicht wurde gespeichert + Enabled + store_view_local_us + The store view has been saved - default @@ -57,15 +56,14 @@ custom store_name_%isolation% storecode_%isolation% - Aktiviert - store_view_local_germany - Die Store-Ansicht wurde gespeichert + Enabled + store_view_local_us + The store view has been saved - diff --git a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/Repository/ConfigData.xml b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/Repository/ConfigData.xml index 9504fdd06fe..4e21a968e5e 100644 --- a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/Repository/ConfigData.xml +++ b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/Repository/ConfigData.xml @@ -26,314 +26,314 @@ */ --> - - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - payment - 1 - Authorize Only - authorize - - - payment - 1 - authorize - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - No - - - - payment - 1 - Yes - 1 - - - - - payment - 1 - No - - - - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - payment - 1 - Authorize and Capture - authorize_capture - - - payment - 1 - authorize - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - No - - - - payment - 1 - Yes - 1 - - - - - payment - 1 - No - - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Authorize Only - authorize - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - No - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - - - payment - 1 - No - - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Authorize and Capture - authorize_capture - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - No - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - - - payment - 1 - No - - - - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - payment - 1 - Authorize Only - authorize - - - payment - 1 - authorize - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - No - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - - - payment - 1 - No - - - - + + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + payment + 1 + Authorize Only + authorize + + + payment + 1 + authorize + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + No + + + + payment + 1 + Yes + 1 + + + + + payment + 1 + No + + + + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + payment + 1 + Authorize and Capture + authorize_capture + + + payment + 1 + authorize + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + No + + + + payment + 1 + Yes + 1 + + + + + payment + 1 + No + + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Authorize Only + authorize + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 0 + No + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + + + payment + 1 + No + + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Authorize and Capture + authorize_capture + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + No + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + + + payment + 1 + No + + + + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + payment + 1 + Authorize Only + authorize + + + payment + 1 + authorize + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + No + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + + + payment + 1 + No + + + + diff --git a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineInvoiceForAuthorizenetDirectpostMethodTest.xml b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineInvoiceForAuthorizenetDirectpostMethodTest.xml index fae00cc577b..af1e879a6ec 100644 --- a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineInvoiceForAuthorizenetDirectpostMethodTest.xml +++ b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineInvoiceForAuthorizenetDirectpostMethodTest.xml @@ -47,8 +47,8 @@ 100.00 300.00 300.00 - Complete - Unskip after done TOOL-4060 + Processing + payment_method:authorize_net_dp diff --git a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml index df6bc6c247f..a1023d15134 100644 --- a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml +++ b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml @@ -49,6 +49,7 @@ 300.00 300.00 Complete + payment_method:authorize_net diff --git a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineRefundForAuthorizenetDirectpostMethodTest.php b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineRefundForAuthorizenetDirectpostMethodTest.php index fef9147ce94..260ddae90bc 100644 --- a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineRefundForAuthorizenetDirectpostMethodTest.php +++ b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineRefundForAuthorizenetDirectpostMethodTest.php @@ -26,8 +26,9 @@ namespace Mage\Authorizenet\Test\TestCase; -use Mage\Customer\Test\Page\CustomerAccountLogout; use Magento\Mtf\TestCase\Scenario; +use Mage\Customer\Test\Page\CustomerAccountLogout; + /** * Preconditions: diff --git a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineRefundForAuthorizenetDirectpostMethodTest.xml b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineRefundForAuthorizenetDirectpostMethodTest.xml index 70980b63289..607657d90c0 100644 --- a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineRefundForAuthorizenetDirectpostMethodTest.xml +++ b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOfflineRefundForAuthorizenetDirectpostMethodTest.xml @@ -46,7 +46,7 @@ 300.00 300.00 Closed - Unskip after done TOOL-4060 + payment_method:authorize_net_dp @@ -68,7 +68,7 @@ authorizenet_directpost for_iframe yes - false + true 1 comments for credit memo 115.00 @@ -77,102 +77,8 @@ 100.00 100.00 100.00 - Complete - Unskip after done TOOL-4060 - - - - - - - - - Create full credit memo with partial invoice for Authorize.net direct post - catalogProductSimple::5_dollar_product_for_payments - authorizenet_directpost - default - login - yes - customer_US - Flat Rate - Fixed - authorizenet_directpost - for_iframe - yes - comments for credit memo - 2 - 25.00 - 25.00 - 2 - 5.00 - 10.00 - 10.00 - Processing - Unskip after done TOOL-4060 - - - - - - - - - - Create partial credit memo with partial invoice for Authorize.net direct post - catalogProductSimple::5_dollar_product_for_payments - authorizenet_directpost - default - login - yes - customer_US - Flat Rate - Fixed - authorizenet_directpost - for_iframe - yes - comments for credit memo - 2 - 1 - 20.00 - 20.00 - 1 - 5.00 - 5.00 - 5.00 Processing - Unskip after done TOOL-4060 - - - - - - - - - - Create partial credit memo for Authorize.net direct post - catalogProductSimple::5_dollar_product_for_payments - authorizenet_directpost - default - login - yes - customer_US - Flat Rate - Fixed - authorizenet_directpost - for_iframe - yes - comments for credit memo - false - 1 - 20.00 - 20.00 - 1 - 5.00 - 5.00 - 5.00 - Complete - Unskip after done TOOL-4060 + payment_method:authorize_net_dp diff --git a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOnlineInvoiceForAuthorizenetDirectpostMethodTest.xml b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOnlineInvoiceForAuthorizenetDirectpostMethodTest.xml index 35e5b7f94b6..bf78adbb918 100644 --- a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOnlineInvoiceForAuthorizenetDirectpostMethodTest.xml +++ b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOnlineInvoiceForAuthorizenetDirectpostMethodTest.xml @@ -47,7 +47,7 @@ 300.00 300.00 Processing - Unskip after done TOOL-4060 + payment_method:authorize_net_dp diff --git a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOnlineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOnlineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml index 3ec1fa93cef..f80ed32470e 100644 --- a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOnlineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml +++ b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOnlineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml @@ -48,6 +48,7 @@ 300.00 300.00 Complete + payment_method:authorize_net diff --git a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOrderWithAuthorizenetDirectpostMethodTest.xml b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOrderWithAuthorizenetDirectpostMethodTest.xml index 3a7a119fdda..6e8c7638172 100644 --- a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOrderWithAuthorizenetDirectpostMethodTest.xml +++ b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOrderWithAuthorizenetDirectpostMethodTest.xml @@ -26,68 +26,68 @@ */ --> - - - authorizenet_directpost - catalogProductSimple::order_default - default - guest - no - customer_US - Flat Rate - Fixed - authorizenet_directpost - for_iframe - yes - Authorization - Authorized - 105 - Unskip after done TOOL-4060 - - - - - - - authorizenet_directpost - catalogProductSimple::order_default - default - login - customer_US - Flat Rate - Fixed - authorizenet_directpost - for_iframe - yes - Authorization - Authorized - 105 - Unskip after done TOOL-4060 - - - - - - - authorizenet_directpost_capture - catalogProductSimple::order_default - default - register - no - customer_US - Flat Rate - Fixed - authorizenet_directpost - for_iframe - yes - Capture - Captured - 105 - Unskip after done TOOL-4060 - - - - - - + + + authorizenet_directpost + catalogProductSimple::order_default + default + guest + no + customer_US + Flat Rate + Fixed + authorizenet_directpost + for_iframe + yes + Authorization + Authorized + 105 + payment_method:authorize_net_dp + + + + + + + authorizenet_directpost + catalogProductSimple::order_default + default + login + customer_US + Flat Rate + Fixed + authorizenet_directpost + for_iframe + yes + Authorization + Authorized + 105 + payment_method:authorize_net_dp + + + + + + + authorizenet_directpost_capture + catalogProductSimple::order_default + default + register + no + customer_US + Flat Rate + Fixed + authorizenet_directpost + for_iframe + yes + Capture + Captured + 105 + payment_method:authorize_net_dp + + + + + + diff --git a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWith3DSecureTest.xml b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWith3DSecureTest.xml index cae2b865b84..a0a1e2bfaa8 100644 --- a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWith3DSecureTest.xml +++ b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWith3DSecureTest.xml @@ -39,6 +39,7 @@ visa_3d_secure_positive 105.00 true + payment_method:authorize_net @@ -55,6 +56,7 @@ visa_3d_secure_negative 105.00 false + payment_method:authorize_net diff --git a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWithoutIFrameTest.xml b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWithoutIFrameTest.xml index eabefd185a9..d71a9501a55 100644 --- a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWithoutIFrameTest.xml +++ b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWithoutIFrameTest.xml @@ -26,62 +26,65 @@ */ --> - - - authorizenet_without_3d_secure - catalogProductSimple::order_default - default - guest - no - customer_US - Flat Rate - Fixed - authorizenet - default - Authorization - Authorized - 105 - - - - - - - authorizenet_without_3d_secure - catalogProductSimple::order_default - default - login - customer_US - Flat Rate - Fixed - authorizenet - default - Authorization - Authorized - 105 - - - - - - - authorizenet_without_3d_secure_action_capture - catalogProductSimple::order_default - default - register - no - customer_UK - Flat Rate - Fixed - authorizenet - default - Capture - Captured - 105 - - - - - - + + + authorizenet_without_3d_secure + catalogProductSimple::order_default + default + guest + no + customer_US + Flat Rate + Fixed + authorizenet + default + Authorization + Authorized + 105 + payment_method:authorize_net + + + + + + + authorizenet_without_3d_secure + catalogProductSimple::order_default + default + login + customer_US + Flat Rate + Fixed + authorizenet + default + Authorization + Authorized + 105 + payment_method:authorize_net + + + + + + + authorizenet_without_3d_secure_action_capture + catalogProductSimple::order_default + default + register + no + customer_UK + Flat Rate + Fixed + authorizenet + default + Capture + Captured + 105 + payment_method:authorize_net + + + + + + diff --git a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateShipmentForAuthorizenetDirectpostMethodTest.xml b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateShipmentForAuthorizenetDirectpostMethodTest.xml index 5d830826db3..044ba983e32 100644 --- a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateShipmentForAuthorizenetDirectpostMethodTest.xml +++ b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/TestCase/CreateShipmentForAuthorizenetDirectpostMethodTest.xml @@ -32,7 +32,7 @@ catalogProductSimple::default authorizenet_directpost default - guest + register no customer_US Flat Rate @@ -44,7 +44,7 @@ 3 3 Processing - Unskip after done TOOL-4060 + payment_method:authorize_net_dp diff --git a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/etc/testcase.xml b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/etc/testcase.xml index 6a3746203fc..4730d40fb86 100644 --- a/dev/tests/functional/tests/app/Mage/Authorizenet/Test/etc/testcase.xml +++ b/dev/tests/functional/tests/app/Mage/Authorizenet/Test/etc/testcase.xml @@ -85,7 +85,7 @@ - + diff --git a/dev/tests/functional/tests/app/Mage/Bundle/Test/TestCase/CreateRmaEntityOnBackendTest.xml b/dev/tests/functional/tests/app/Mage/Bundle/Test/TestCase/CreateRmaEntityOnBackendTest.xml deleted file mode 100644 index 6e54748c3bc..00000000000 --- a/dev/tests/functional/tests/app/Mage/Bundle/Test/TestCase/CreateRmaEntityOnBackendTest.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - bundle_fixed - 1 - Out of Service - Unopened - Store Credit - test%isolation%@example.com - comments %isolation% - Yes - Pending - - - - - diff --git a/dev/tests/functional/tests/app/Mage/Catalog/Test/TestCase/Product/ClearAllCompareProductsTest.xml b/dev/tests/functional/tests/app/Mage/Catalog/Test/TestCase/Product/ClearAllCompareProductsTest.xml index ecc0f249186..164e0a04d3d 100644 --- a/dev/tests/functional/tests/app/Mage/Catalog/Test/TestCase/Product/ClearAllCompareProductsTest.xml +++ b/dev/tests/functional/tests/app/Mage/Catalog/Test/TestCase/Product/ClearAllCompareProductsTest.xml @@ -30,7 +30,7 @@ compare_products Bug: MPERF-6836: Abnormal wait during saving new attribute set (Environment issue) - catalogProductSimple::simple_for_composite_products,catalogProductVirtual::order_default,giftCardProduct::giftcard_product_with_price,downloadableProduct::default,groupedProduct::grouped_product_with_price,configurableProduct::default,bundleProduct::bundle_dynamic_product,bundleProduct::bundle_fixed_product + catalogProductSimple::simple_for_composite_products,catalogProductVirtual::order_default,downloadableProduct::default,groupedProduct::grouped_product_with_price,configurableProduct::default,bundleProduct::bundle_dynamic_product,bundleProduct::bundle_fixed_product diff --git a/dev/tests/functional/tests/app/Mage/Checkout/Test/Constraint/AssertAbstractOrderAddressSameAsPaypal.php b/dev/tests/functional/tests/app/Mage/Checkout/Test/Constraint/AssertAbstractOrderAddressSameAsPaypal.php index acf90d3c15b..d8a947b41d9 100644 --- a/dev/tests/functional/tests/app/Mage/Checkout/Test/Constraint/AssertAbstractOrderAddressSameAsPaypal.php +++ b/dev/tests/functional/tests/app/Mage/Checkout/Test/Constraint/AssertAbstractOrderAddressSameAsPaypal.php @@ -54,7 +54,8 @@ abstract class AssertAbstractOrderAddressSameAsPaypal extends AbstractConstraint ['suffix', 'firstname', 'middlename', 'lastname', 'prefix'], ['street'], 'implode_with_comma' => ['city', 'region', 'region_id', 'postcode'], - ['country_id'] + ['country_id'], + ['telephone'] ]; /** @@ -77,19 +78,20 @@ public function processAssert( $salesOrderIndex->open()->getSalesOrderGrid()->searchAndOpen(['id' => $orderId]); /** @var Info $informationTab */ $informationTab = $salesOrderView->getOrderForm()->getTabElement('information'); - $orderBillingAddress = $informationTab->$addressBlock()->getAddress(); - $payPalShippingAddress = $this->prepareCustomerAddress($paypalCustomer); + $orderAddress = $informationTab->$addressBlock()->getAddress(); + $payPalShippingAddress = $this->prepareCustomerAddress($paypalCustomer, $orderAddress); - \PHPUnit_Framework_Assert::assertEquals($payPalShippingAddress, $orderBillingAddress); + \PHPUnit_Framework_Assert::assertEquals($payPalShippingAddress, $orderAddress); } /** * Prepare customer address for assert. * * @param PaypalCustomer $customer + * @param $orderAddress * @return string */ - protected function prepareCustomerAddress(PaypalCustomer $customer) + protected function prepareCustomerAddress(PaypalCustomer $customer, $orderAddress) { /** @var PaypalAddress $customerAddress */ $customerAddress = $customer->getDataFieldConfig('address')['source']->getAddresses()[0]; @@ -106,8 +108,27 @@ protected function prepareCustomerAddress(PaypalCustomer $customer) : implode(' ', $availableFields[$key]); } + $availableFields = $this->prepareCustomerPhone($availableFields, $orderAddress); $availableFields = implode("\n", $availableFields); return $availableFields; } + + /** + * Remove customer telephone number, if telephone number isn't sent from PayPal side + * + * @param $availableFields + * @param $orderAddress + * @return mixed + * @internal param $customerPhone + * @internal param $orderBillingAddress + * @internal param $payPalShippingAddress + */ + protected function prepareCustomerPhone($availableFields, $orderAddress) + { + if (strpos($orderAddress, $availableFields[3]) == false) { + unset($availableFields[3]); + } + return $availableFields; + } } diff --git a/dev/tests/functional/tests/app/Mage/Checkout/Test/Fixture/Cart/Items.php b/dev/tests/functional/tests/app/Mage/Checkout/Test/Fixture/Cart/Items.php index 785c626b49a..094e896f8f1 100644 --- a/dev/tests/functional/tests/app/Mage/Checkout/Test/Fixture/Cart/Items.php +++ b/dev/tests/functional/tests/app/Mage/Checkout/Test/Fixture/Cart/Items.php @@ -46,7 +46,6 @@ class Items implements FixtureInterface 'simple' => 'Mage\Catalog\Test\Fixture\Cart\Item', 'configurable' => 'Mage\Catalog\Test\Fixture\ConfigurableProduct\Cart\Item', 'downloadable' => 'Mage\Downloadable\Test\Fixture\Cart\Item', - 'giftcard' => 'Enterprise\GiftCard\Test\Fixture\Cart\Item', 'virtual' => 'Mage\Catalog\Test\Fixture\Cart\Item', 'grouped' => 'Mage\Catalog\Test\Fixture\GroupedProduct\Cart\Item', 'bundle' => 'Mage\Bundle\Test\Fixture\Cart\Item' diff --git a/dev/tests/functional/tests/app/Mage/Checkout/Test/Page/CheckoutOnepageSuccess.xml b/dev/tests/functional/tests/app/Mage/Checkout/Test/Page/CheckoutOnepageSuccess.xml index da78edb5402..ef5f608de61 100644 --- a/dev/tests/functional/tests/app/Mage/Checkout/Test/Page/CheckoutOnepageSuccess.xml +++ b/dev/tests/functional/tests/app/Mage/Checkout/Test/Page/CheckoutOnepageSuccess.xml @@ -27,7 +27,7 @@ --> - - + + diff --git a/dev/tests/functional/tests/app/Mage/Checkout/Test/TestStep/AddProductsToTheCartStep.php b/dev/tests/functional/tests/app/Mage/Checkout/Test/TestStep/AddProductsToTheCartStep.php index 042fec3e447..bc7943aaa27 100644 --- a/dev/tests/functional/tests/app/Mage/Checkout/Test/TestStep/AddProductsToTheCartStep.php +++ b/dev/tests/functional/tests/app/Mage/Checkout/Test/TestStep/AddProductsToTheCartStep.php @@ -96,6 +96,7 @@ public function run() foreach ($this->products as $product) { $this->browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); $this->catalogProductView->getViewBlock()->addToCart($product); + $this->catalogProductView->getMessagesBlock()->waitSuccessMessage(); } } } diff --git a/dev/tests/functional/tests/app/Mage/Install/Test/Block/ContinueDownloadBlock.php b/dev/tests/functional/tests/app/Mage/Install/Test/Block/ContinueDownloadBlock.php new file mode 100644 index 00000000000..5f6011ad7c1 --- /dev/null +++ b/dev/tests/functional/tests/app/Mage/Install/Test/Block/ContinueDownloadBlock.php @@ -0,0 +1,104 @@ +_rootElement->find($this->continueDeploy)->click(); + } + + /** + * Continue installation. + * + * @return void + */ + public function continueValidation() + { + $this->_rootElement->find($this->continueValidation)->click(); + } + + /** + * Continue installation. + * + * @return void + */ + public function continueDownload() + { + $this->waitForElementVisible($this->continueDownload); + $this->_rootElement->find($this->continueDownload)->click(); + } + + /** + * Continue installation. + * + * @return void + */ + public function startDownload() + { + $this->_rootElement->find($this->startDownload)->click(); + } +} diff --git a/dev/tests/functional/tests/app/Mage/Install/Test/Block/License.php b/dev/tests/functional/tests/app/Mage/Install/Test/Block/License.php index 98bd71e06fb..413316792bd 100644 --- a/dev/tests/functional/tests/app/Mage/Install/Test/Block/License.php +++ b/dev/tests/functional/tests/app/Mage/Install/Test/Block/License.php @@ -39,7 +39,7 @@ class License extends Block * * @var string */ - protected $license = '.license-text'; + protected $license = 'h4'; /** * License agreements checkbox selector. diff --git a/dev/tests/functional/tests/app/Mage/Install/Test/Block/Main.php b/dev/tests/functional/tests/app/Mage/Install/Test/Block/Main.php index e768bffa39d..96ac7ba82c9 100644 --- a/dev/tests/functional/tests/app/Mage/Install/Test/Block/Main.php +++ b/dev/tests/functional/tests/app/Mage/Install/Test/Block/Main.php @@ -40,6 +40,13 @@ class Main extends Block */ protected $title = '.page-head'; + /** + * Title text. + * + * @var string + */ + protected $deployStatus = '#status'; + /** * Get license text. * @@ -49,4 +56,14 @@ public function getTitle() { return $this->_rootElement->find($this->title)->getText(); } + + /** + * Get license text. + * + * @return string + */ + public function getDeployStatus() + { + return $this->_rootElement->find($this->deployStatus)->getText(); + } } diff --git a/dev/tests/functional/tests/app/Mage/Install/Test/Block/Welcome.php b/dev/tests/functional/tests/app/Mage/Install/Test/Block/Welcome.php new file mode 100644 index 00000000000..437166a097e --- /dev/null +++ b/dev/tests/functional/tests/app/Mage/Install/Test/Block/Welcome.php @@ -0,0 +1,70 @@ +h3'; + +// /** +// * License agreements checkbox selector. +// * +// * @var string +// */ +// protected $agree = '#agree'; + + /** + * Get wizard text. + * + * @return string + */ + public function getWizardTitle() + { + return $this->_rootElement->find($this->wizardTitle)->getText(); + } + +// /** +// * Accept license agreements. +// * +// * @return void +// */ +// public function acceptLicenseAgreement() +// { +// $this->_rootElement->find($this->agree, Locator::SELECTOR_CSS, 'checkbox')->setValue('Yes'); +// } +} diff --git a/dev/tests/functional/tests/app/Mage/Install/Test/Constraint/AssertAgreementTextPresent.php b/dev/tests/functional/tests/app/Mage/Install/Test/Constraint/AssertAgreementTextPresent.php index 1ce7f5dc3ac..8383ccc7a04 100644 --- a/dev/tests/functional/tests/app/Mage/Install/Test/Constraint/AssertAgreementTextPresent.php +++ b/dev/tests/functional/tests/app/Mage/Install/Test/Constraint/AssertAgreementTextPresent.php @@ -37,7 +37,7 @@ class AssertAgreementTextPresent extends AbstractConstraint /** * Part of license agreement text. */ - const LICENSE_AGREEMENT_TEXT = 'EDITION AGREEMENT'; + const LICENSE_AGREEMENT_TEXT = 'Open Software License'; /** * Assert that part of license agreement text is present on Terms & Agreement page. diff --git a/dev/tests/functional/tests/app/Mage/Install/Test/Constraint/AssertDownloadCompleted.php b/dev/tests/functional/tests/app/Mage/Install/Test/Constraint/AssertDownloadCompleted.php new file mode 100644 index 00000000000..8683ad2a11f --- /dev/null +++ b/dev/tests/functional/tests/app/Mage/Install/Test/Constraint/AssertDownloadCompleted.php @@ -0,0 +1,67 @@ +getMessagesBlock()->getSuccessMessages()); + } + + /** + * Returns a string representation of successful assertion. + * + * @return string + */ + public function toString() + { + return "Downloading"; + } +} diff --git a/dev/tests/functional/tests/app/Mage/Install/Test/Constraint/AssertSuccessDeploy.php b/dev/tests/functional/tests/app/Mage/Install/Test/Constraint/AssertSuccessDeploy.php new file mode 100644 index 00000000000..ab1169ea3e5 --- /dev/null +++ b/dev/tests/functional/tests/app/Mage/Install/Test/Constraint/AssertSuccessDeploy.php @@ -0,0 +1,67 @@ +getMainBlock()->getDeployStatus()); + } + + /** + * Returns a string representation of successful assertion. + * + * @return string + */ + public function toString() + { + return "Downloading"; + } +} diff --git a/dev/tests/functional/tests/app/Mage/Install/Test/Constraint/AssertWelcomeWizardTextPresent.php b/dev/tests/functional/tests/app/Mage/Install/Test/Constraint/AssertWelcomeWizardTextPresent.php new file mode 100644 index 00000000000..7f03131b96a --- /dev/null +++ b/dev/tests/functional/tests/app/Mage/Install/Test/Constraint/AssertWelcomeWizardTextPresent.php @@ -0,0 +1,66 @@ +getWelcomeBlock()->getWizardTitle(), + 'This wrong page' + ); + } + + /** + * Returns a string representation of successful assertion. + * + * @return string + */ + public function toString() + { + return "License agreement text is present on Terms & Agreement page."; + } +} diff --git a/dev/tests/functional/tests/app/Mage/Downloadable/Test/TestCase/AddProductsToMultipleWishListTest.xml b/dev/tests/functional/tests/app/Mage/Install/Test/Page/Downloader.xml similarity index 54% rename from dev/tests/functional/tests/app/Mage/Downloadable/Test/TestCase/AddProductsToMultipleWishListTest.xml rename to dev/tests/functional/tests/app/Mage/Install/Test/Page/Downloader.xml index 4b71236631f..25e9368d044 100644 --- a/dev/tests/functional/tests/app/Mage/Downloadable/Test/TestCase/AddProductsToMultipleWishListTest.xml +++ b/dev/tests/functional/tests/app/Mage/Install/Test/Page/Downloader.xml @@ -1,4 +1,4 @@ - + - - - - wishlist_public - downloadableProduct::with_two_separately_links - false - 1 - - - - - +--> + + + + + diff --git a/dev/tests/functional/tests/app/Mage/Install/Test/Page/DownloaderDeploy.xml b/dev/tests/functional/tests/app/Mage/Install/Test/Page/DownloaderDeploy.xml new file mode 100644 index 00000000000..ba70f856b3b --- /dev/null +++ b/dev/tests/functional/tests/app/Mage/Install/Test/Page/DownloaderDeploy.xml @@ -0,0 +1,32 @@ + + + + + + + diff --git a/dev/tests/functional/tests/app/Mage/Install/Test/Page/DownloaderDeployEnd.xml b/dev/tests/functional/tests/app/Mage/Install/Test/Page/DownloaderDeployEnd.xml new file mode 100644 index 00000000000..cb68f789130 --- /dev/null +++ b/dev/tests/functional/tests/app/Mage/Install/Test/Page/DownloaderDeployEnd.xml @@ -0,0 +1,33 @@ + + + + + + + + diff --git a/dev/tests/functional/tests/app/Mage/Install/Test/Page/DownloaderValidation.xml b/dev/tests/functional/tests/app/Mage/Install/Test/Page/DownloaderValidation.xml new file mode 100644 index 00000000000..eb34b99dc4a --- /dev/null +++ b/dev/tests/functional/tests/app/Mage/Install/Test/Page/DownloaderValidation.xml @@ -0,0 +1,32 @@ + + + + + + + diff --git a/dev/tests/functional/tests/app/Mage/Install/Test/Page/DownloaderWelcome.xml b/dev/tests/functional/tests/app/Mage/Install/Test/Page/DownloaderWelcome.xml new file mode 100644 index 00000000000..e00010b5a1b --- /dev/null +++ b/dev/tests/functional/tests/app/Mage/Install/Test/Page/DownloaderWelcome.xml @@ -0,0 +1,33 @@ + + + + + + + + diff --git a/dev/tests/functional/tests/app/Mage/Install/Test/TestCase/DownloaderTest.php b/dev/tests/functional/tests/app/Mage/Install/Test/TestCase/DownloaderTest.php new file mode 100644 index 00000000000..8aaeeb6f876 --- /dev/null +++ b/dev/tests/functional/tests/app/Mage/Install/Test/TestCase/DownloaderTest.php @@ -0,0 +1,193 @@ +downloaderWelcome = $downloaderWelcome; + $this->downloaderValidation = $downloaderValidation; + $this->downloaderDeploy = $downloaderDeploy; + $this->downloaderDownloader = $downloaderDownloader; + $this->assertLicense = $assertLicense; + $this->assertSuccessDeploy = $assertSuccessDeploy; + $this->downloaderDeployEnd = $downloaderDeployEnd; + } + + /** + * Install Magento via web interface. + * + * @param AssertWelcomeWizardTextPresent $assertWelcomeWizardTextPresent + * @param array $configData + * @return array + */ + public function test(AssertWelcomeWizardTextPresent $assertWelcomeWizardTextPresent, $configData) + { + // Steps: + $this->downloaderWelcome->open(); + // Verify license agreement. + $assertWelcomeWizardTextPresent->processAssert($this->downloaderWelcome); + $this->downloaderWelcome->getContinueDownloadBlock()->continueValidation(); + $this->downloaderValidation->getContinueDownloadBlock()->continueDeploy(); + $this->downloaderDeploy->getContinueDownloadBlock()->continueDeploy(); + $this->assertSuccessDeploy->processAssert($this->downloaderDeployEnd); + $this->downloaderDeploy->getContinueDownloadBlock()->continueDownload(); + $this->downloaderDownloader->getContinueDownloadBlock()->startDownload(); + $this->downloaderDownloader->getMessagesBlock()->getSuccessMessages(); + parent::test($this->assertLicense, $configData); + } + + /** + * Prepare install fixture for test. + * + * @param array $configData + * @param array $install + * @return Install + */ + protected function prepareInstallFixture(array $configData, array $install) + { + $dataConfig = array_merge($install, $configData); + $dataConfig['unsecure_base_url'] = str_replace('index.php/', '', $dataConfig['unsecure_base_url']); + $dataConfig['unsecure_base_url'] = isset($dataConfig['use_secure']) + ? str_replace('http', 'https', $dataConfig['unsecure_base_url']) + : $dataConfig['unsecure_base_url']; + + return $this->fixtureFactory->createByCode('install', ['data' => $dataConfig]); + } +} diff --git a/dev/tests/functional/tests/app/Mage/Bundle/Test/TestCase/AddProductsToMultipleWishListTest.xml b/dev/tests/functional/tests/app/Mage/Install/Test/TestCase/DownloaderTest.xml similarity index 58% rename from dev/tests/functional/tests/app/Mage/Bundle/Test/TestCase/AddProductsToMultipleWishListTest.xml rename to dev/tests/functional/tests/app/Mage/Install/Test/TestCase/DownloaderTest.xml index ec571b0594f..c6b1b5285d5 100644 --- a/dev/tests/functional/tests/app/Mage/Bundle/Test/TestCase/AddProductsToMultipleWishListTest.xml +++ b/dev/tests/functional/tests/app/Mage/Install/Test/TestCase/DownloaderTest.xml @@ -1,4 +1,4 @@ - + - - - wishlist_public - bundleProduct::bundle_dynamic_product - false - 1 - - - + + + Install with default values + Welcome to Magento Downloader! + test_type:install + + diff --git a/dev/tests/functional/tests/app/Mage/Install/Test/TestCase/InstallTest.php b/dev/tests/functional/tests/app/Mage/Install/Test/TestCase/InstallTest.php index c9d30bd5aac..6fa657a2eb2 100644 --- a/dev/tests/functional/tests/app/Mage/Install/Test/TestCase/InstallTest.php +++ b/dev/tests/functional/tests/app/Mage/Install/Test/TestCase/InstallTest.php @@ -106,11 +106,11 @@ public function __prepare(FixtureFactory $fixtureFactory) $this->fixtureFactory = $fixtureFactory; $config = ObjectManagerFactory::getObjectManager()->get('Magento\Mtf\Config\DataInterface'); // Prepare config data - $configData['db_host'] = $config->get('install/0/host/value'); - $configData['db_user'] = $config->get('install/0/install/user/value'); - $configData['db_pass'] = $config->get('install/0/install/password/value'); - $configData['db_name'] = $config->get('install/0/install/dbName/value'); - $configData['unsecure_base_url'] = $config->get('install/0/install/baseUrl/value'); + $configData['db_host'] = $config->get('install/0/host/0/value'); + $configData['db_user'] = $config->get('install/0/user/0/value'); + $configData['db_pass'] = $config->get('install/0/password/0/value'); + $configData['db_name'] = $config->get('install/0/dbName/0/value'); + $configData['unsecure_base_url'] = $config->get('install/0/baseUrl/0/value'); return ['configData' => $configData]; } @@ -147,8 +147,6 @@ public function __inject( public function test(AssertAgreementTextPresent $assertLicense, array $configData, array $install = []) { // Preconditions: - $this->uninstall($configData); - $installConfig = $this->prepareInstallFixture($configData, $install); $user = $this->fixtureFactory->createByCode('user', ['dataSet' => 'default']); @@ -185,37 +183,4 @@ protected function prepareInstallFixture(array $configData, array $install) return $this->fixtureFactory->createByCode('install', ['data' => $dataConfig]); } - - /** - * Uninstall magento. - * - * @param array $config - * @return void - */ - protected function uninstall(array $config) - { - $magentoBaseDir = dirname(dirname(dirname(MTF_BP))); - $this->delete("$magentoBaseDir/var"); - $this->delete("$magentoBaseDir/app/etc/local.xml"); - $connection = new \PDO("mysql:host={$config['db_host']};dbname={$config['db_name']};", $config['db_user'], - $config['db_pass']); - $connection->exec("SET FOREIGN_KEY_CHECKS = 0;"); - $tables = $connection->query("show tables"); - while ($row = $tables->fetch(\PDO::FETCH_NUM)) { - $connection->exec("DROP TABLE {$row[0]};"); - } - $connection->exec("SET FOREIGN_KEY_CHECKS = 1;"); - $connection = null; - } - - /** - * Recursively delete files by path. - * - * @param $path - * @return bool - */ - protected function delete($path) - { - return is_file($path) ? unlink($path) : array_map([$this, __FUNCTION__], glob($path . '/*')) == rmdir($path); - } } diff --git a/dev/tests/functional/tests/app/Mage/Install/Test/TestCase/InstallTest.xml b/dev/tests/functional/tests/app/Mage/Install/Test/TestCase/InstallTest.xml index bedf6641799..0bb799bae0e 100644 --- a/dev/tests/functional/tests/app/Mage/Install/Test/TestCase/InstallTest.xml +++ b/dev/tests/functional/tests/app/Mage/Install/Test/TestCase/InstallTest.xml @@ -39,6 +39,7 @@ custom You're All Set! test_type:install + Skipped by infrastructure issue @@ -50,6 +51,7 @@ Sie sind bereit! test_type:install + Skipped by infrastructure issue @@ -61,6 +63,7 @@ prefix1_ Sie sind bereit! test_type:install + Skipped by infrastructure issue @@ -69,6 +72,7 @@ Yes You're All Set! test_type:install + Skipped by infrastructure issue @@ -79,6 +83,7 @@ Yes You're All Set! test_type:install + Skipped by infrastructure issue diff --git a/dev/tests/functional/tests/app/Mage/Payment/Test/Repository/Cc.xml b/dev/tests/functional/tests/app/Mage/Payment/Test/Repository/Cc.xml index 69f186c5c1c..f0e96d423be 100644 --- a/dev/tests/functional/tests/app/Mage/Payment/Test/Repository/Cc.xml +++ b/dev/tests/functional/tests/app/Mage/Payment/Test/Repository/Cc.xml @@ -74,7 +74,7 @@ 123 - Visa/Delta/Electron + Visa %CC_VISA_2% 01 16 diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/Block/Login.php b/dev/tests/functional/tests/app/Mage/Paypal/Test/Block/Login.php index 52ede48232a..5f55820ec0c 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/Block/Login.php +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/Block/Login.php @@ -29,6 +29,7 @@ use Magento\Mtf\Block\Form; use Magento\Mtf\Client\Element\SimpleElement as Element; use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Client\Locator; /** * Login to Pay Pal account. @@ -40,7 +41,7 @@ class Login extends Form * * @var string */ - protected $submitButton = '.loginBtn'; + protected $submitButton = '#btnLogin'; /** * Loader selector. @@ -49,6 +50,20 @@ class Login extends Form */ protected $loader = '#spinner'; + /** + * I-frame selector. + * + * @var string + */ + protected $iFrame = 'iframe'; + + /** + * I-frame selector. + * + * @var string + */ + protected $frameBody = 'body'; + /** * Click 'Log in to Pay Pal' button. * @@ -56,7 +71,44 @@ class Login extends Form */ public function submit() { - $this->_rootElement->find($this->submitButton)->click(); + $rootElement = $this->findRootElement(); + $rootElement->find($this->submitButton)->click(); + } + + /** + * Find root element for "Log In" button. + * + * @return \Magento\Mtf\Client\ElementInterface + */ + public function findRootElement() + { + return $rootElement = ($this->browser->find($this->frameBody)->isVisible()) + ? $this->browser->find($this->frameBody) + : $this->_rootElement; + } + + /** + * Select window of PayPal Express checkout iFrame, if need. + * + * @param null $element + * @return \Magento\Mtf\Client\ElementInterface|null + */ + public function switchOnPayPalFrame($element = null) + { + if ($this->browser->find($this->iFrame)->isVisible()) { + $this->browser->switchToFrame(new Locator($this->iFrame)); + $element = $this->browser->find($this->frameBody); + } + + return $element; + } + + /** + * Select window of PayPal Express checkout, if iFrame had been selected + */ + public function switchOffPayPalFrame() + { + $this->browser->switchToFrame(); } /** @@ -68,6 +120,7 @@ public function submit() */ public function fill(FixtureInterface $customer, Element $element = null) { + $element = $this->switchOnPayPalFrame($element); $this->waitForElementNotVisible($this->loader); return parent::fill($customer, $element); } diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/Block/Login.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/Block/Login.xml index 3485f8a7fd0..d461a29fb93 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/Block/Login.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/Block/Login.xml @@ -28,8 +28,10 @@ - [name='username'] + [type="email"] - + + [type="password"] + diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/Block/OldReview.php b/dev/tests/functional/tests/app/Mage/Paypal/Test/Block/OldReview.php index 714d73422f0..c19c2df9e2f 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/Block/OldReview.php +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/Block/OldReview.php @@ -50,7 +50,7 @@ class OldReview extends AbstractReview * * @var string */ - protected $addresses = '#chooseAddressForm'; + protected $addresses = '#innerSlider'; /** * Get old addresses block. diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/Page/Paypal.php b/dev/tests/functional/tests/app/Mage/Paypal/Test/Page/Paypal.php index 35ed102652d..15c2e2a04dc 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/Page/Paypal.php +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/Page/Paypal.php @@ -51,7 +51,7 @@ class Paypal extends Page protected $blocks = [ 'loginBlock' => [ 'class' => 'Mage\Paypal\Test\Block\Login', - 'locator' => 'xo-login-page', + 'locator' => '#contents', 'strategy' => 'css selector', ], 'oldLoginBlock' => [ diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/Page/PaypalExpressReview.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/Page/PaypalExpressReview.xml index 2113cab967d..b7414f4ee25 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/Page/PaypalExpressReview.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/Page/PaypalExpressReview.xml @@ -27,6 +27,6 @@ --> - + diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/Repository/ConfigData.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/Repository/ConfigData.xml index bcc8bf60acc..170683769c9 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/Repository/ConfigData.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/Repository/ConfigData.xml @@ -26,197 +26,203 @@ */ --> - - - - payment - 1 - - PayPal - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - - - payment - 1 - No - - - - payment - 1 - No - - - - payment - 1 - No - - - - - - payment - 1 - - PayPal - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Specific Countries - 1 - - - payment - 1 - - + + + + payment + 1 + + PayPal + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + No + 0 + + + payment + 1 + No + + + + + + payment + 1 + No + + + + payment + 1 + No + + + + payment + 1 + No + + + + + + payment + 1 + + PayPal + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Specific Countries + 1 + + + payment + 1 + + US @@ -529,1307 +535,1319 @@ US - - - payment - 1 - Yes - 1 - - - payment - 1 - No - Mark - - - payment - 1 - No - - - - - - payment - 1 - Yes - 1 - - - payment - 1 - All Allowed Countries - - - - payment - 1 - No - - - - payment - 1 - No - Mark - - - - - payment - 1 - - - - - payment - 1 - API Signature - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - - - payment - 1 - No - - - - payment - 1 - No - - - - payment - 1 - No - - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - payment - 1 - Yes - 1 - - - - - payment - 1 - No - - - - payment - 1 - Yes - - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Authorization - Authorization - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - - - payment - 1 - No - - - - payment - 1 - No - - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Sale - Sale - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - - - payment - 1 - No - - - - payment - 1 - No - - - - - - payment - 1 - - - - - payment - 1 - - PayPal - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Authorization - Authorization - - - payment - 1 - All Allowed Countries - - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - - - payment - 1 - No - - - - payment - 1 - No - - - - - - payment - 1 - - - - - payment - 1 - - PayPal - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Sale - Sale - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - - - payment - 1 - No - - - - payment - 1 - No - - - - - - payment - 1 - - PayPal - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Authorization - Authorization - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - - - payment - 1 - No - - - - - - payment - 1 - - PayPal - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Sale - Sale - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - - - payment - 1 - No - - - - - - payment - 1 - - PayPal - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - - Credit Card (PayPal Advanced) - - - payment - 1 - Authorization - Authorization - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - payment - 1 - Authorization - Authorization - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - - - payment - 1 - No - - - - payment - 1 - No - - - - - - payment - 1 - - PayPal - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - - Credit Card (PayPal Advanced) - - - payment - 1 - Sale - Sale - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - payment - 1 - Authorization - Authorization - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - - - payment - 1 - No - - - - payment - 1 - No - - - - - - payment - 1 - United Kingdom - GB - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Authorization - Authorization - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - - - payment - 1 - United States - US - - - payment - 1 - No - - - - - - payment - 1 - United Kingdom - GB - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Sale - Sale - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - - - payment - 1 - United States - US - - - payment - 1 - No - - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Authorization - Authorization - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - payment - 1 - No - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - - - payment - 1 - No - - - - payment - 1 - No - - - - payment - 1 - No - - - - payment - 1 - No - - - - payment - 1 - Yes - 1 - - - - - payment - 1 - - - - - payment - 1 - - PayPal - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - - - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - payment - 1 - Authorization - Authorization - - - payment - 1 - All Allowed Countries - - - - payment - 1 - Yes - 1 - - - payment - 1 - No - - - - payment - 1 - Yes - 1 - - - payment - 1 - Yes - 1 - - - - - payment - 1 - No - - - - payment - 1 - No - - - - payment - 1 - No - - - - + + + payment + 1 + Yes + 1 + + + payment + 1 + No + Mark + + + payment + 1 + No + + + + + + payment + 1 + Yes + 1 + + + payment + 1 + All Allowed Countries + + + + payment + 1 + No + + + + payment + 1 + No + Mark + + + + + payment + 1 + + + + + payment + 1 + API Signature + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + payment + 1 + Authorization + Authorization + + + payment + 1 + No + 0 + + + + + payment + 1 + No + + + + payment + 1 + No + + + + payment + 1 + No + + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + payment + 1 + Yes + 1 + + + + + payment + 1 + No + + + + payment + 1 + Yes + + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Authorization + Authorization + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + + + payment + 1 + No + + + + payment + 1 + No + + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Sale + Sale + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + + + payment + 1 + No + + + + payment + 1 + No + + + + + + payment + 1 + + + + + payment + 1 + + PayPal + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Authorization + Authorization + + + payment + 1 + All Allowed Countries + + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + + + payment + 1 + No + + + + payment + 1 + No + + + + + + payment + 1 + + + + + payment + 1 + + PayPal + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Sale + Sale + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + + + payment + 1 + No + + + + payment + 1 + No + + + + + + payment + 1 + + PayPal + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Authorization + Authorization + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + + + payment + 1 + No + + + + + + payment + 1 + + PayPal + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Sale + Sale + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + + + payment + 1 + No + + + + + + payment + 1 + + PayPal + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + + Credit Card (PayPal Advanced) + + + payment + 1 + Authorization + Authorization + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + payment + 1 + Authorization + Authorization + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + + + payment + 1 + No + + + + payment + 1 + No + + + + + + payment + 1 + + PayPal + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + + Credit Card (PayPal Advanced) + + + payment + 1 + Sale + Sale + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + payment + 1 + Authorization + Authorization + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + + + payment + 1 + No + + + + payment + 1 + No + + + + + + payment + 1 + United Kingdom + GB + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Authorization + Authorization + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + + + payment + 1 + United States + US + + + payment + 1 + No + + + + + + payment + 1 + United Kingdom + GB + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Sale + Sale + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + + + payment + 1 + United States + US + + + payment + 1 + No + + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Authorization + Authorization + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + payment + 1 + No + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + + + payment + 1 + No + + + + payment + 1 + No + + + + payment + 1 + No + + + + payment + 1 + No + + + + payment + 1 + Yes + 1 + + + + + payment + 1 + + + + + payment + 1 + + PayPal + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + + + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + payment + 1 + Authorization + Authorization + + + payment + 1 + All Allowed Countries + + + + payment + 1 + Yes + 1 + + + payment + 1 + No + + + + payment + 1 + Yes + 1 + + + payment + 1 + Yes + 1 + + + + + payment + 1 + No + + + + payment + 1 + No + + + + payment + 1 + No + + + + diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/Repository/PaypalAddress.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/Repository/PaypalAddress.xml index cd3555c0f37..6c7ee36b8a1 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/Repository/PaypalAddress.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/Repository/PaypalAddress.xml @@ -36,6 +36,7 @@ California 90230 United States + T: 408-618-6006 diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateInvoiceForPaypalExpressCheckoutTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateInvoiceForPaypalExpressCheckoutTest.xml index d0e519d57de..735e143102f 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateInvoiceForPaypalExpressCheckoutTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateInvoiceForPaypalExpressCheckoutTest.xml @@ -41,6 +41,7 @@ 300.00 300.00 Complete + payment_method:paypal @@ -63,6 +64,7 @@ 100.00 100.00 Processing + payment_method:paypal @@ -82,6 +84,7 @@ 300.00 300.00 Processing + payment_method:paypal @@ -102,6 +105,7 @@ 300.00 300.00 Processing + payment_method:paypal @@ -122,6 +126,7 @@ 300.00 300.00 Processing + payment_method:paypal @@ -142,6 +147,7 @@ 300.00 300.00 Processing + payment_method:paypal @@ -168,6 +174,7 @@ 24.75 324.75 Processing + payment_method:paypal @@ -188,6 +195,7 @@ 320.00 320.00 Processing + payment_method:paypal @@ -211,6 +219,7 @@ 300.00 300.00 Complete + payment_method:paypal @@ -234,6 +243,7 @@ 100.00 100.00 Processing + payment_method:paypal @@ -254,6 +264,7 @@ 300.00 300.00 Processing + payment_method:paypal @@ -275,6 +286,7 @@ 300.00 300.00 Processing + payment_method:paypal @@ -296,6 +308,7 @@ 300.00 300.00 Processing + payment_method:paypal @@ -317,6 +330,7 @@ 300.00 300.00 Processing + payment_method:paypal diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOfflineInvoiceForOnlinePaymentsMethodsWithIFrameTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOfflineInvoiceForOnlinePaymentsMethodsWithIFrameTest.xml index 7616a2545db..5dbc22c9b52 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOfflineInvoiceForOnlinePaymentsMethodsWithIFrameTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOfflineInvoiceForOnlinePaymentsMethodsWithIFrameTest.xml @@ -40,8 +40,8 @@ payflow_link for_iframe yes - comments for invoice Yes + comments for invoice Capture Offline 315.00 315.00 @@ -50,7 +50,8 @@ 300.00 300.00 Complete - Unskip after done TOOL-4060 + payment_method:paypal + paypal:payflow_link @@ -82,11 +83,11 @@ 100.00 100.00 Processing - Unskip after done TOOL-4060 + payment_method:paypal + paypal:advanced - @@ -104,6 +105,7 @@ payflow_advanced for_iframe yes + false comments for invoice Capture Offline 315.00 @@ -111,9 +113,9 @@ 100.00 300.00 300.00 - Complete - Unskip after done TOOL-4060 - + Processing + payment_method:paypal + paypal:advanced @@ -135,15 +137,18 @@ hosted_pro yes comments for invoice + Yes Capture Offline 315.00 315.00 + Shipped 100.00 300.00 300.00 Complete - Unskip after done TOOL-4060 - + payment_method:paypal + paypal:hosted_solution + @@ -164,6 +169,7 @@ hosted_pro hosted_pro yes + false comments for invoice Capture Offline 315.00 @@ -171,9 +177,9 @@ 100.00 300.00 300.00 - Complete - Unskip after done TOOL-4060 - + Processing + payment_method:paypal + paypal:hosted_solution diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOfflineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOfflineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml index c2f5ebf624e..7af75ce4bde 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOfflineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOfflineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml @@ -49,6 +49,8 @@ 300.00 300.00 Complete + payment_method:paypal + paypal:payments_pro @@ -79,6 +81,8 @@ 15.00 15.00 Complete + payment_method:paypal + paypal:payflow_pro diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineInvoiceForOnlinePaymentsMethodsWithIFrameTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineInvoiceForOnlinePaymentsMethodsWithIFrameTest.xml index 5089d4e4c9e..2f7ddb91213 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineInvoiceForOnlinePaymentsMethodsWithIFrameTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineInvoiceForOnlinePaymentsMethodsWithIFrameTest.xml @@ -49,7 +49,8 @@ 300.00 300.00 Complete - Unskip after done TOOL-4060 + payment_method:paypal_direct + paypal:payflow_link @@ -79,7 +80,8 @@ 100.00 100.00 Processing - Unskip after done TOOL-4060 + payment_method:paypal_direct + paypal:advanced @@ -107,7 +109,8 @@ 300.00 300.00 Processing - Unskip after done TOOL-4060 + payment_method:paypal_direct + paypal:hosted_solution diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml index c5d90adf634..b492d559a7c 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineInvoiceForOnlinePaymentsMethodsWithoutIFrameTest.xml @@ -48,6 +48,8 @@ 300.00 300.00 Complete + payment_method:paypal + paypal:payments_pro @@ -77,6 +79,8 @@ 15.00 15.00 Complete + payment_method:paypal + paypal:payflow_pro diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineRefundForOnlinePaymentsMethodsWithIFrameTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineRefundForOnlinePaymentsMethodsWithIFrameTest.xml index c0b263ae501..02c84877b64 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineRefundForOnlinePaymentsMethodsWithIFrameTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineRefundForOnlinePaymentsMethodsWithIFrameTest.xml @@ -40,9 +40,9 @@ payflow_advanced for_iframe yes - comments for refund - 615.00 - 615.00 + comments for credit memo + 630.00 + 630.00 100.00 300.00 300.00 @@ -50,7 +50,8 @@ 300.00 300.00 Closed - Unskip after done TOOL-4060 + payment_method:paypal_direct + paypal:advanced @@ -72,16 +73,18 @@ payflow_advanced for_iframe yes - comments for refund + comments for credit memo 2 1 - 115.00 - 115.00 + 1 + 115.00 + 115.00 100.00 100.00 100.00 - Closed - Unskip after done TOOL-4060 + Processing + payment_method:paypal_direct + paypal:advanced @@ -103,15 +106,18 @@ payflow_link for_iframe yes - comments for refund + comments for credit memo 2 - 215.00 - 215.00 + 2 + 2 + 215.00 + 215.00 100.00 200.00 200.00 - Closed - Unskip after done TOOL-4060 + Processing + payment_method:paypal_direct + paypal:payflow_link @@ -134,16 +140,17 @@ payflow_link for_iframe yes - comments for refund + comments for credit memo false - 324.75 - 324.75 + 339.75 + 339.75 100.00 300.00 24.75 324.75 Closed - Unskip after done TOOL-4060 + payment_method:paypal_direct + paypal:payflow_link @@ -174,7 +181,8 @@ 320.00 320.00 Closed - Bug: Unskip after done TOOL-4060 + payment_method:paypal_direct + paypal:advanced diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineRefundForOnlinePaymentsMethodsWithoutIFrameTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineRefundForOnlinePaymentsMethodsWithoutIFrameTest.xml index 3628e6334d6..6095d0520b2 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineRefundForOnlinePaymentsMethodsWithoutIFrameTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineRefundForOnlinePaymentsMethodsWithoutIFrameTest.xml @@ -45,6 +45,8 @@ 300.00 300.00 Closed + payment_method:paypal + paypal:payments_pro @@ -75,6 +77,8 @@ 100.00 100.00 Complete + payment_method:paypal + paypal:payments_pro @@ -103,6 +107,8 @@ 10.00 10.00 Processing + payment_method:paypal + paypal:payflow_pro @@ -133,6 +139,8 @@ 5.00 5.00 Processing + payment_method:paypal + paypal:payflow_pro @@ -163,6 +171,8 @@ 5.00 5.00 Complete + payment_method:paypal + paypal:payflow_pro diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineRefundForPaypalExpressCheckoutTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineRefundForPaypalExpressCheckoutTest.xml index 9a433027c5f..70df9a914ce 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineRefundForPaypalExpressCheckoutTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOnlineRefundForPaypalExpressCheckoutTest.xml @@ -39,6 +39,7 @@ 300.00 300.00 Closed + payment_method:paypal @@ -61,6 +62,7 @@ 100.00 100.00 Complete + payment_method:paypal @@ -82,6 +84,7 @@ 200.00 200.00 Processing + payment_method:paypal @@ -105,6 +108,7 @@ 100.00 100.00 Processing + payment_method:paypal @@ -127,6 +131,7 @@ 300.00 300.00 Closed + payment_method:paypal @@ -149,6 +154,7 @@ 300.00 300.00 Closed + payment_method:paypal @@ -171,6 +177,7 @@ 300.00 300.00 Closed + payment_method:paypal @@ -198,6 +205,7 @@ 24.75 324.75 Closed + payment_method:paypal @@ -219,6 +227,7 @@ 320.00 320.00 Closed + payment_method:paypal diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWith3DSecureTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWith3DSecureTest.xml index c06a3185e50..0b6f362ead3 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWith3DSecureTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWith3DSecureTest.xml @@ -39,6 +39,8 @@ visa_3d_secure_positive 105.00 true + payment_method:paypal + paypal:payflow_pro @@ -55,6 +57,8 @@ visa_3d_secure_negative 105.00 false + payment_method:paypal + paypal:payflow_pro @@ -69,6 +73,8 @@ visa_3d_secure 105.00 true + payment_method:paypal + paypal:payments_pro @@ -85,6 +91,8 @@ visa_3d_secure_negative 105.00 false + payment_method:paypal + paypal:payments_pro diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWithIFrameTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWithIFrameTest.xml index bce10a6c7bc..b14c4da9d0a 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWithIFrameTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWithIFrameTest.xml @@ -26,130 +26,136 @@ */ --> - - - paypal_payflow_link - catalogProductSimple::order_default - default - register - no - customer_US - Flat Rate - Fixed - payflow_link - for_iframe - yes - Authorization - Authorized - 105 - Unskip after done TOOL-4060 - - - - - - - paypal_payflow_link_action_sale - catalogProductSimple::order_default - default - login - customer_US - Flat Rate - Fixed - payflow_link - for_iframe - yes - Capture - captured - 105 - Unskip after done TOOL-4060 - - - - - - - paypal_advanced - catalogProductSimple::order_default - default - guest - no - customer_US - Flat Rate - Fixed - payflow_advanced - for_iframe - yes - Authorization - Authorized - 105 - Unskip after done TOOL-4060 - - - - - - - paypal_advanced_action_sale - catalogProductSimple::order_default - default - register - no - customer_US - Flat Rate - Fixed - payflow_advanced - for_iframe - yes - Capture - captured - 105 - Unskip after done TOOL-4060 - - - - - - - paypal_hosted_solution - catalogProductSimple::order_default - default - login - customer_UK - Flat Rate - Fixed - hosted_pro - hosted_pro - yes - Authorization - Authorized - 105 - Unskip after done TOOL-4060 - - - - - - - paypal_hosted_solution_action_sale - catalogProductSimple::order_default - default - guest - no - customer_US - Flat Rate - Fixed - hosted_pro - hosted_pro_action_sale - yes - Capture - Capturing - 105 - Unskip after done TOOL-4060 - - - - - - + + + paypal_payflow_link + catalogProductSimple::order_default + default + register + no + customer_US + Flat Rate + Fixed + payflow_link + for_iframe + yes + Authorization + Authorized + 105 + payment_method:paypal_direct + paypal:payflow_link + + + + + + + paypal_payflow_link_action_sale + catalogProductSimple::order_default + default + login + customer_US + Flat Rate + Fixed + payflow_link + for_iframe + yes + Capture + captured + 105 + payment_method:paypal_direct + paypal:payflow_link + + + + + + + paypal_advanced + catalogProductSimple::order_default + default + guest + no + customer_US + Flat Rate + Fixed + payflow_advanced + for_iframe + yes + Authorization + Authorized + 105 + payment_method:paypal_direct + paypal:advanced + + + + + + + paypal_advanced_action_sale + catalogProductSimple::order_default + default + register + no + customer_US + Flat Rate + Fixed + payflow_advanced + for_iframe + yes + Capture + captured + 105 + payment_method:paypal_direct + paypal:advanced + + + + + + + paypal_hosted_solution + catalogProductSimple::order_default + default + login + customer_UK + Flat Rate + Fixed + hosted_pro + hosted_pro + yes + Authorization + Authorized + 105 + payment_method:paypal_direct + paypal:hosted_solution + + + + + + + paypal_hosted_solution_action_sale + catalogProductSimple::order_default + default + guest + no + customer_US + Flat Rate + Fixed + hosted_pro + hosted_pro_action_sale + yes + Capture + captured + 105 + payment_method:paypal_direct + paypal:hosted_solution + + + + + + diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWithoutIFrameTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWithoutIFrameTest.xml index 75f27571114..483f4bab511 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWithoutIFrameTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithOnlinePaymentsMethodsWithoutIFrameTest.xml @@ -26,118 +26,130 @@ */ --> - - - paypal_payments_pro - catalogProductSimple::order_default - default - guest - no - customer_US - Flat Rate - Fixed - paypal_direct - payments_pro - Authorization - Authorized - 105 - - - - - - - paypal_payments_pro - catalogProductSimple::order_default - default - login - customer_US - Flat Rate - Fixed - paypal_direct - payments_pro - Authorization - Authorized - 105 - - - - - - - paypal_payments_pro_action_sale - catalogProductSimple::order_default - default - register - no - customer_US - Flat Rate - Fixed - paypal_direct - payments_pro - Capture - Captured - 105 - - - - - - - paypal_payflow_pro - catalogProductSimple::order_default - default - guest - no - customer_US - Flat Rate - Fixed - verisign - default - Authorization - Authoriz - 105 - - - - - - - paypal_payflow_pro - catalogProductSimple::order_default - default - login - customer_US - Flat Rate - Fixed - verisign - default - Authorization - Authoriz - 105 - - - - - - - paypal_payflow_pro_action_sale - catalogProductSimple::order_default - default - register - no - customer_US - Flat Rate - Fixed - verisign - default - Capture - Captur - 105 - - - - - + + + paypal_payments_pro + catalogProductSimple::order_default + default + guest + no + customer_US + Flat Rate + Fixed + paypal_direct + payments_pro + Authorization + Authorized + 105 + payment_method:paypal + paypal:payments_pro + + + + + + + paypal_payments_pro + catalogProductSimple::order_default + default + login + customer_US + Flat Rate + Fixed + paypal_direct + payments_pro + Authorization + Authorized + 105 + payment_method:paypal + paypal:payments_pro + + + + + + + paypal_payments_pro_action_sale + catalogProductSimple::order_default + default + register + no + customer_US + Flat Rate + Fixed + paypal_direct + payments_pro + Capture + Captured + 105 + payment_method:paypal + paypal:payments_pro + + + + + + + paypal_payflow_pro + catalogProductSimple::order_default + default + guest + no + customer_US + Flat Rate + Fixed + verisign + default + Authorization + Authoriz + 105 + payment_method:paypal + paypal:payflow_pro + + + + + + + paypal_payflow_pro + catalogProductSimple::order_default + default + login + customer_US + Flat Rate + Fixed + verisign + default + Authorization + Authoriz + 105 + payment_method:paypal + paypal:payflow_pro + + + + + + + paypal_payflow_pro_action_sale + catalogProductSimple::order_default + default + register + no + customer_US + Flat Rate + Fixed + verisign + default + Capture + Captur + 105 + payment_method:paypal + paypal:payflow_pro + + + + + diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithPayPalStandardTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithPayPalStandardTest.xml index f24f256d2e1..d54c84a1d08 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithPayPalStandardTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateOrderWithPayPalStandardTest.xml @@ -26,48 +26,54 @@ */ --> - - - Simple product one page checkout within Pay Pal standard payment method - catalogProductSimple::order_default - paypal_standard - guest - customer_US - default - Flat Rate - Fixed - paypal_express - 113.25 - - - - - Bundle product one page checkout within Pay Pal standard payment method - bundleProduct::bundle_fixed_product - paypal_standard - guest - customer_US - default - Flat Rate - Fixed - paypal_express - 836.36 - - - - - Grouped product one page checkout within Pay Pal standard payment method - groupedProduct::three_simple_products_without_category - paypal_standard - guest - customer_US - default - Flat Rate - Fixed - paypal_express - 663.00 - - - + + + Simple product one page checkout within Pay Pal standard payment method + catalogProductSimple::order_default + paypal_standard + guest + customer_US + default + Flat Rate + Fixed + paypal_express + 113.25 + payment_method:paypal + paypal:standard + + + + + Bundle product one page checkout within Pay Pal standard payment method + bundleProduct::bundle_fixed_product + paypal_standard + guest + customer_US + default + Flat Rate + Fixed + paypal_express + 836.36 + payment_method:paypal + paypal:standard + + + + + Grouped product one page checkout within Pay Pal standard payment method + groupedProduct::three_simple_products_without_category + paypal_standard + guest + customer_US + default + Flat Rate + Fixed + paypal_express + 663.00 + payment_method:paypal + paypal:standard + + + diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateShipmentForOnlinePaymentMethodsWithIFrameTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateShipmentForOnlinePaymentMethodsWithIFrameTest.xml index 28371dad850..71e7252c80e 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateShipmentForOnlinePaymentMethodsWithIFrameTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateShipmentForOnlinePaymentMethodsWithIFrameTest.xml @@ -44,7 +44,8 @@ 3 3 Processing - Unskip after done TOOL-4060 + payment_method:paypal_direct + paypal:payflow_link @@ -69,8 +70,9 @@ comments for shipment 3 3 - Complete - Unskip after done TOOL-4060 + Processing + payment_method:paypal_direct + paypal:advanced diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateShipmentForOnlinePaymentMethodsWithoutIFrameTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateShipmentForOnlinePaymentMethodsWithoutIFrameTest.xml index e2be22d4f69..74c254f2ca5 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateShipmentForOnlinePaymentMethodsWithoutIFrameTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateShipmentForOnlinePaymentMethodsWithoutIFrameTest.xml @@ -43,6 +43,8 @@ 3 3 Processing + payment_method:paypal + paypal:payments_pro @@ -67,6 +69,8 @@ 3 3 Complete + payment_method:paypal + paypal:payments_pro @@ -91,6 +95,8 @@ 3 3 Processing + payment_method:paypal + paypal:payflow_pro @@ -115,6 +121,8 @@ 3 3 Complete + payment_method:paypal + paypal:payflow_pro diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateShipmentForPaypalExpressCheckoutTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateShipmentForPaypalExpressCheckoutTest.xml index 2057882c625..4370e05795f 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateShipmentForPaypalExpressCheckoutTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/CreateShipmentForPaypalExpressCheckoutTest.xml @@ -39,6 +39,7 @@ 3 3 Processing + payment_method:paypal @@ -58,6 +59,7 @@ 1 1 Processing + payment_method:paypal @@ -74,6 +76,7 @@ 3 3 Processing + payment_method:paypal @@ -91,6 +94,7 @@ 3 3 Complete + payment_method:paypal @@ -108,6 +112,7 @@ 3 3 Processing + payment_method:paypal @@ -125,6 +130,7 @@ 3 3 Processing + payment_method:paypal @@ -142,6 +148,7 @@ 3 3 Processing + payment_method:paypal @@ -160,6 +167,7 @@ 6 6 Processing + payment_method:paypal @@ -177,6 +185,7 @@ 2 2 Processing + payment_method:paypal diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/TestCreationForExpressCheckoutWithinPayPalButtonFromProductPageTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/TestCreationForExpressCheckoutWithinPayPalButtonFromProductPageTest.xml index e7c63900805..1956b09fbd3 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/TestCreationForExpressCheckoutWithinPayPalButtonFromProductPageTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/TestCreationForExpressCheckoutWithinPayPalButtonFromProductPageTest.xml @@ -26,139 +26,146 @@ */ --> - - - Paypal express order line items mark require billing address - catalogProductSimple::default - active_sales_rule_for_all_groups - paypal_express_order_line_items_mark_require_billing_address - Flat Rate/Fixed - 315 - Processing - Authorization - - - Back, Edit, Cancel, Send Email, Void, Hold, Invoice, Ship - Authorized - - - - - - - - - Payflow express authorization line items - catalogProductVirtual::order_default - active_sales_rule_for_all_groups - payflow_express_authorization_line_items - - - 100 - Processing - Authorization - - - Back, Edit, Cancel, Send Email, Void, Hold, Invoice - Authorized - - - - - - - - Payflow express authorization specificcountry us - catalogProductVirtual::order_default_expensive - active_sales_rule_for_all_groups - payflow_express_authorization_specificcountry_us - - - 1000 - Processing - Authorization - - - Back, Edit, Cancel, Send Email, Void, Hold, Invoice - Authorized - - - - - - - - Payflow express sale - catalogProductSimple::order_default - - - payflow_express_sale - Flat Rate/Fixed - 105 - Processing - Capture - Completed - Back, Edit, Send Email, Hold, Ship - Captured - 105 - 105 - - - - - - - - - - Payflow express sale specificcountry gb line items - catalogProductSimple::order_default - - - payflow_express_sale_specificcountry_gb_line_items - Flat Rate/Fixed - 105 - Processing - Authorization - Completed - Back, Edit, Cancel, Send Email, Void, Hold, Invoice, Ship - Authorized - - - - - - - - - Paypal express sale specificcountry us shipping options mark for simple product and without sales rule - catalogProductSimple::default - - - paypal_express_sale_specificcountry_us_shipping_options_mark - Flat Rate/Fixed - 315 - Processing - Authorization - Completed - Back, Edit, Cancel, Send Email, Void, Hold, Invoice, Ship - Authorized - - - - - - - - - Paypal express sale specificcountry us shipping options mark for virtual product and with sales rule - catalogProductVirtual::order_default_expensive - active_sales_rule_for_all_groups - paypal_express_sale_specificcountry_us_shipping_options_mark - - - 1000 - Processing - Authorization - Completed - Back, Edit, Cancel, Send Email, Void, Hold, Invoice - Authorized - - - - - - - + + + Paypal express order line items mark require billing address + catalogProductSimple::default + active_sales_rule_for_all_groups + paypal_express_order_line_items_mark_require_billing_address + Flat Rate/Fixed + 315 + Processing + Authorization + - + Back, Edit, Cancel, Send Email, Void, Hold, Invoice, Ship + Authorized + payment_method:paypal + + + + + + + + + Payflow express authorization line items + catalogProductVirtual::order_default + active_sales_rule_for_all_groups + payflow_express_authorization_line_items + - + 100 + Processing + Authorization + - + Back, Edit, Cancel, Send Email, Void, Hold, Invoice + Authorized + payment_method:paypal + + + + + + + + Payflow express authorization specificcountry us + catalogProductVirtual::order_default_expensive + active_sales_rule_for_all_groups + payflow_express_authorization_specificcountry_us + - + 1000 + Processing + Authorization + - + Back, Edit, Cancel, Send Email, Void, Hold, Invoice + Authorized + payment_method:paypal + + + + + + + + Payflow express sale + catalogProductSimple::order_default + - + payflow_express_sale + Flat Rate/Fixed + 105 + Processing + Capture + Completed + Back, Edit, Send Email, Hold, Ship + Captured + 105 + 105 + payment_method:paypal + + + + + + + + + + Payflow express sale specificcountry gb line items + catalogProductSimple::order_default + - + payflow_express_sale_specificcountry_gb_line_items + Flat Rate/Fixed + 105 + Processing + Authorization + Completed + Back, Edit, Cancel, Send Email, Void, Hold, Invoice, Ship + Authorized + payment_method:paypal + + + + + + + + + Paypal express sale specificcountry us shipping options mark for simple product and without sales rule + catalogProductSimple::default + - + paypal_express_sale_specificcountry_us_shipping_options_mark + Flat Rate/Fixed + 315 + Processing + Authorization + Completed + Back, Edit, Cancel, Send Email, Void, Hold, Invoice, Ship + Authorized + payment_method:paypal + + + + + + + + + Paypal express sale specificcountry us shipping options mark for virtual product and with sales rule + catalogProductVirtual::order_default_expensive + active_sales_rule_for_all_groups + paypal_express_sale_specificcountry_us_shipping_options_mark + - + 1000 + Processing + Authorization + Completed + Back, Edit, Cancel, Send Email, Void, Hold, Invoice + Authorized + payment_method:paypal + + + + + + + diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/TestCreationForExpressCheckoutWithinPayPalButtonTest.xml b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/TestCreationForExpressCheckoutWithinPayPalButtonTest.xml index c1bc8600de9..d29d3e92adf 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/TestCreationForExpressCheckoutWithinPayPalButtonTest.xml +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestCase/TestCreationForExpressCheckoutWithinPayPalButtonTest.xml @@ -38,6 +38,7 @@ - Back, Edit, Cancel, Send Email, Void, Hold, Invoice, Ship Authorized + payment_method:paypal @@ -56,6 +57,7 @@ - Back, Edit, Cancel, Send Email, Void, Hold, Invoice, Ship Authorized + payment_method:paypal @@ -74,6 +76,7 @@ - Back, Edit, Cancel, Send Email, Void, Hold, Invoice Authorized + payment_method:paypal @@ -93,6 +96,7 @@ Captured 105 105 + payment_method:paypal @@ -112,6 +116,7 @@ Completed Back, Edit, Cancel, Send Email, Void, Hold, Invoice, Ship Authorized + payment_method:paypal @@ -130,6 +135,7 @@ Completed Back, Edit, Cancel, Send Email, Void, Hold, Invoice, Ship Authorized + payment_method:paypal @@ -148,6 +154,7 @@ Completed Back, Edit, Cancel, Send Email, Void, Hold, Invoice Authorized + payment_method:paypal @@ -166,6 +173,7 @@ Completed Back, Edit, Cancel, Send Email, Void, Hold, Invoice, Ship Authorized + payment_method:paypal diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/FillCreditCardInIFrameStep.php b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/FillCreditCardInIFrameStep.php index ce47b8e7c08..84fcc729754 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/FillCreditCardInIFrameStep.php +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/FillCreditCardInIFrameStep.php @@ -112,6 +112,7 @@ public function run() $element = $this->browser->find('body'); $form->fill($this->payment['cc'], $element); $form->clickPayNow($element); + $this->browser->switchToFrame(); return ['orderId' => $this->checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId()]; } diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/LoginToPayPalStep.php b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/LoginToPayPalStep.php index 13681091c77..dffbf3453ca 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/LoginToPayPalStep.php +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/LoginToPayPalStep.php @@ -103,6 +103,7 @@ function () use ($browser, $selector) { : $this->paypalPage->getOldLoginBlock(); $payPalLoginBlock->fill($this->customer); $payPalLoginBlock->submit(); + $payPalLoginBlock->switchOffPayPalFrame(); $reviewBlock->waitLoader(); } } diff --git a/dev/tests/functional/tests/app/Mage/SalesRule/Test/Handler/SalesRule/Curl.php b/dev/tests/functional/tests/app/Mage/SalesRule/Test/Handler/SalesRule/Curl.php index ca341fd0566..7c3be8629f0 100644 --- a/dev/tests/functional/tests/app/Mage/SalesRule/Test/Handler/SalesRule/Curl.php +++ b/dev/tests/functional/tests/app/Mage/SalesRule/Test/Handler/SalesRule/Curl.php @@ -93,9 +93,6 @@ class Curl extends Conditions implements SalesRuleInterface 'aggregator' => 'all', 'value' => '1', ], - 'Customer Segment' => [ - 'type' => 'enterprise_customersegment/segment_condition_segment', - ], 'Category' => [ 'type' => 'salesrule/rule_condition_product', 'attribute' => 'category_ids', diff --git a/dev/tests/functional/tests/app/Mage/Widget/Test/Fixture/Widget.xml b/dev/tests/functional/tests/app/Mage/Widget/Test/Fixture/Widget.xml index 5b9b9396d19..d55d5551500 100644 --- a/dev/tests/functional/tests/app/Mage/Widget/Test/Fixture/Widget.xml +++ b/dev/tests/functional/tests/app/Mage/Widget/Test/Fixture/Widget.xml @@ -27,27 +27,6 @@ --> - - Banner Rotator - rwd / enterprise - Test Frontend App - - - all_pages - - default - all - content - widget/block.phtml - - - - - - bannerRotator - - - diff --git a/dev/tests/functional/tests/app/Mage/Widget/Test/Page/Adminhtml/WidgetInstanceEdit.xml b/dev/tests/functional/tests/app/Mage/Widget/Test/Page/Adminhtml/WidgetInstanceEdit.xml index 53b9cfec88a..c4cbd7ff6d4 100644 --- a/dev/tests/functional/tests/app/Mage/Widget/Test/Page/Adminhtml/WidgetInstanceEdit.xml +++ b/dev/tests/functional/tests/app/Mage/Widget/Test/Page/Adminhtml/WidgetInstanceEdit.xml @@ -28,7 +28,6 @@ - diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/authorizenet.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/authorizenet.xml new file mode 100644 index 00000000000..6a2411545dd --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/authorizenet.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/authorizenetdp.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/authorizenetdp.xml new file mode 100644 index 00000000000..b0ccb6e1803 --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/authorizenetdp.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/installation.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/installationce.xml similarity index 94% rename from dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/installation.xml rename to dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/installationce.xml index 01d09e7487b..b54ff1a4b3f 100644 --- a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/installation.xml +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/installationce.xml @@ -28,7 +28,7 @@ - + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypal.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypal.xml new file mode 100644 index 00000000000..f020bd9d160 --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypal.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypal1.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypal1.xml new file mode 100644 index 00000000000..6bc05c37d6b --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypal1.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypaladvanced.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypaladvanced.xml new file mode 100644 index 00000000000..5c2ea44c2d7 --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypaladvanced.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypaldirect.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypaldirect.xml new file mode 100644 index 00000000000..5a8770d32e4 --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypaldirect.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalecbutton.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalecbutton.xml new file mode 100644 index 00000000000..332f95515fc --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalecbutton.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalecbuttonproduct.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalecbuttonproduct.xml new file mode 100644 index 00000000000..6556c7a4393 --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalecbuttonproduct.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalecinvoice.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalecinvoice.xml new file mode 100644 index 00000000000..6bc05c37d6b --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalecinvoice.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalecrefund.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalecrefund.xml new file mode 100644 index 00000000000..5f53e0884cd --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalecrefund.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalecshipment.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalecshipment.xml new file mode 100644 index 00000000000..61d9311eae3 --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalecshipment.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalhostedsolution.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalhostedsolution.xml new file mode 100644 index 00000000000..49d8e3daa1f --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalhostedsolution.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalpayflowlink.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalpayflowlink.xml new file mode 100644 index 00000000000..0c60ed6ce83 --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalpayflowlink.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalpayflowpro.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalpayflowpro.xml new file mode 100644 index 00000000000..5f2670ae256 --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalpayflowpro.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalpaymentspro.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalpaymentspro.xml new file mode 100644 index 00000000000..a595700496b --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalpaymentspro.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalstandard.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalstandard.xml new file mode 100644 index 00000000000..8dcbd880090 --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/paypalstandard.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/suite1.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/suite1.xml new file mode 100644 index 00000000000..06d17d9e856 --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/suite1.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/suite2.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/suite2.xml new file mode 100644 index 00000000000..598c1812082 --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/suite2.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/suite3.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/suite3.xml new file mode 100644 index 00000000000..082dc0f5e47 --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/suite3.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/downloader/Maged/Controller.php b/downloader/Maged/Controller.php index ab216ab7a60..19fbc10c055 100755 --- a/downloader/Maged/Controller.php +++ b/downloader/Maged/Controller.php @@ -1034,7 +1034,7 @@ public static function getVersionInfo() 'major' => '1', 'minor' => '9', 'revision' => '2', - 'patch' => '1', + 'patch' => '2', 'stability' => '', 'number' => '', ); diff --git a/downloader/lib/Mage/Archive/Helper/File/Gz.php b/downloader/lib/Mage/Archive/Helper/File/Gz.php index f4d16f66378..7cf670f795a 100755 --- a/downloader/lib/Mage/Archive/Helper/File/Gz.php +++ b/downloader/lib/Mage/Archive/Helper/File/Gz.php @@ -33,6 +33,21 @@ */ class Mage_Archive_Helper_File_Gz extends Mage_Archive_Helper_File { + + /** + * Overwritten Mage_Archive_Helper_File constructor with zlib extension check + * @param string $filePath + * @throws Mage_Exception + */ + public function __construct($filePath) + { + if (!function_exists('gzopen')) { + throw new Mage_Exception('PHP Extensions "zlib" must be loaded.'); + } + + parent::__construct($filePath); + } + /** * @see Mage_Archive_Helper_File::_open() */ diff --git a/errors/design.xml b/errors/design.xml index 43f76776437..5c0189f8fa3 100644 --- a/errors/design.xml +++ b/errors/design.xml @@ -1,10 +1,28 @@ diff --git a/errors/processor.php b/errors/processor.php index 5ae49e2358d..450bc682432 100644 --- a/errors/processor.php +++ b/errors/processor.php @@ -463,6 +463,7 @@ public function saveReport($reportData) @mkdir($this->_reportDir, 0750, true); } + $reportData = array_map('strip_tags', $reportData); @file_put_contents($this->_reportFile, serialize($reportData)); @chmod($this->_reportFile, 0640); diff --git a/lib/Mage/Archive/Helper/File/Gz.php b/lib/Mage/Archive/Helper/File/Gz.php index f4d16f66378..7cf670f795a 100644 --- a/lib/Mage/Archive/Helper/File/Gz.php +++ b/lib/Mage/Archive/Helper/File/Gz.php @@ -33,6 +33,21 @@ */ class Mage_Archive_Helper_File_Gz extends Mage_Archive_Helper_File { + + /** + * Overwritten Mage_Archive_Helper_File constructor with zlib extension check + * @param string $filePath + * @throws Mage_Exception + */ + public function __construct($filePath) + { + if (!function_exists('gzopen')) { + throw new Mage_Exception('PHP Extensions "zlib" must be loaded.'); + } + + parent::__construct($filePath); + } + /** * @see Mage_Archive_Helper_File::_open() */ diff --git a/lib/Unserialize/Parser.php b/lib/Unserialize/Parser.php new file mode 100644 index 00000000000..d35005c8803 --- /dev/null +++ b/lib/Unserialize/Parser.php @@ -0,0 +1,61 @@ +read($char, $prevChar); + if (!is_null($arr)) { + return $arr; + } + $prevChar = $char; + } + throw new Exception('Error during unserialization'); + } +} diff --git a/lib/Unserialize/Reader/Arr.php b/lib/Unserialize/Reader/Arr.php new file mode 100644 index 00000000000..151163ffc6a --- /dev/null +++ b/lib/Unserialize/Reader/Arr.php @@ -0,0 +1,122 @@ +_result = !is_null($this->_result) ? $this->_result : array(); + + if (is_null($this->_status) && $prevChar == Unserialize_Parser::SYMBOL_COLON) { + $this->_length .= $char; + $this->_status = self::READING_LENGTH; + return null; + } + + if ($this->_status == self::READING_LENGTH) { + if ($char == Unserialize_Parser::SYMBOL_COLON) { + $this->_length = (int)$this->_length; + if ($this->_length == 0) { + $this->_status = self::FINISHED_ARR; + return null; + } + $this->_status = self::FINISHED_LENGTH; + } else { + $this->_length .= $char; + } + } + + if ($this->_status == self::FINISHED_LENGTH && $prevChar == '{') { + $this->_reader = new Unserialize_Reader_ArrKey(); + $this->_status = self::READING_KEY; + } + + if ($this->_status == self::READING_KEY) { + $key = $this->_reader->read($char, $prevChar); + if (!is_null($key)) { + $this->_status = self::READING_VALUE; + $this->_reader = new Unserialize_Reader_ArrValue($key); + return null; + } + } + + if ($this->_status == self::READING_VALUE) { + $value = $this->_reader->read($char, $prevChar); + if (!is_null($value)) { + $this->_result[$this->_reader->key] = $value; + if (count($this->_result) < $this->_length) { + $this->_reader = new Unserialize_Reader_ArrKey(); + $this->_status = self::READING_KEY; + return null; + } else { + $this->_status = self::FINISHED_ARR; + return null; + } + } + } + + if ($this->_status == self::FINISHED_ARR) { + if ($char == '}') { + return $this->_result; + } + } + } +} diff --git a/lib/Unserialize/Reader/ArrKey.php b/lib/Unserialize/Reader/ArrKey.php new file mode 100644 index 00000000000..44df96f313f --- /dev/null +++ b/lib/Unserialize/Reader/ArrKey.php @@ -0,0 +1,84 @@ +_status = self::NOT_STARTED; + } + + /** + * @param string $char + * @param string $prevChar + * @return mixed|null + * @throws Exception + */ + public function read($char, $prevChar) + { + if ($this->_status == self::NOT_STARTED) { + switch ($char) { + case Unserialize_Parser::TYPE_STRING: + $this->_reader = new Unserialize_Reader_Str(); + $this->_status = self::READING_KEY; + break; + case Unserialize_Parser::TYPE_INT: + $this->_reader = new Unserialize_Reader_Int(); + $this->_status = self::READING_KEY; + break; + default: + throw new Exception('Unsupported data type ' . $char); + } + } + + if ($this->_status == self::READING_KEY) { + $key = $this->_reader->read($char, $prevChar); + if (!is_null($key)) { + return $key; + } + } + return null; + } +} diff --git a/lib/Unserialize/Reader/ArrValue.php b/lib/Unserialize/Reader/ArrValue.php new file mode 100644 index 00000000000..1c18a865820 --- /dev/null +++ b/lib/Unserialize/Reader/ArrValue.php @@ -0,0 +1,100 @@ +_status = self::NOT_STARTED; + $this->key = $key; + } + + /** + * @param string $char + * @param string $prevChar + * @return mixed|null + * @throws Exception + */ + public function read($char, $prevChar) + { + if ($this->_status == self::NOT_STARTED) { + switch ($char) { + case Unserialize_Parser::TYPE_STRING: + $this->_reader = new Unserialize_Reader_Str(); + $this->_status = self::READING_VALUE; + break; + case Unserialize_Parser::TYPE_ARRAY: + $this->_reader = new Unserialize_Reader_Arr(); + $this->_status = self::READING_VALUE; + break; + case Unserialize_Parser::TYPE_INT: + $this->_reader = new Unserialize_Reader_Int(); + $this->_status = self::READING_VALUE; + break; + case Unserialize_Parser::TYPE_BOOL: + $this->_reader = new Unserialize_Reader_Bool(); + $this->_status = self::READING_VALUE; + break; + case Unserialize_Parser::TYPE_DOUBLE: + $this->_reader = new Unserialize_Reader_Dbl(); + $this->_status = self::READING_VALUE; + break; + default: + throw new Exception('Unsupported data type ' . $char); + } + } + + if ($this->_status == self::READING_VALUE) { + $value = $this->_reader->read($char, $prevChar); + if (!is_null($value)) { + return $value; + } + } + return null; + } +} diff --git a/lib/Unserialize/Reader/Bool.php b/lib/Unserialize/Reader/Bool.php new file mode 100644 index 00000000000..81766a3fea8 --- /dev/null +++ b/lib/Unserialize/Reader/Bool.php @@ -0,0 +1,66 @@ +_value .= $char; + $this->_status = self::READING_VALUE; + return null; + } + + if ($this->_status == self::READING_VALUE) { + if ($char !== Unserialize_Parser::SYMBOL_SEMICOLON) { + $this->_value .= $char; + } else { + return (bool)$this->_value; + } + } + return null; + } +} diff --git a/lib/Unserialize/Reader/Dbl.php b/lib/Unserialize/Reader/Dbl.php new file mode 100644 index 00000000000..b46196c4a74 --- /dev/null +++ b/lib/Unserialize/Reader/Dbl.php @@ -0,0 +1,66 @@ +_value .= $char; + $this->_status = self::READING_VALUE; + return null; + } + + if ($this->_status == self::READING_VALUE) { + if ($char !== Unserialize_Parser::SYMBOL_SEMICOLON) { + $this->_value .= $char; + } else { + return (float)$this->_value; + } + } + return null; + } +} diff --git a/lib/Unserialize/Reader/Int.php b/lib/Unserialize/Reader/Int.php new file mode 100644 index 00000000000..4652cab725e --- /dev/null +++ b/lib/Unserialize/Reader/Int.php @@ -0,0 +1,66 @@ +_value .= $char; + $this->_status = self::READING_VALUE; + return null; + } + + if ($this->_status == self::READING_VALUE) { + if ($char !== Unserialize_Parser::SYMBOL_SEMICOLON) { + $this->_value .= $char; + } else { + return (int)$this->_value; + } + } + return null; + } +} diff --git a/lib/Unserialize/Reader/Str.php b/lib/Unserialize/Reader/Str.php new file mode 100644 index 00000000000..0fa081ccd6c --- /dev/null +++ b/lib/Unserialize/Reader/Str.php @@ -0,0 +1,93 @@ +_status) && $prevChar == Unserialize_Parser::SYMBOL_COLON) { + $this->_status = self::READING_LENGTH; + } + + if ($this->_status == self::READING_LENGTH) { + if ($char != Unserialize_Parser::SYMBOL_COLON) { + $this->_length .= $char; + } else { + $this->_length = (int)$this->_length; + $this->_status = self::FINISHED_LENGTH; + } + } + + if ($this->_status == self::FINISHED_LENGTH) { + if ($char == Unserialize_Parser::SYMBOL_QUOTE) { + $this->_status = self::READING_VALUE; + return null; + } + } + + if ($this->_status == self::READING_VALUE) { + if (strlen($this->_value) < $this->_length) { + $this->_value .= $char; + return null; + } + + if (strlen($this->_value) == $this->_length) { + if ($char == Unserialize_Parser::SYMBOL_SEMICOLON && $prevChar == Unserialize_Parser::SYMBOL_QUOTE) { + return (string)$this->_value; + } + } + } + return null; + } +} diff --git a/lib/Varien/Cache/Backend/Database.php b/lib/Varien/Cache/Backend/Database.php index 76b2f6cbdf4..6b2133a7a81 100644 --- a/lib/Varien/Cache/Backend/Database.php +++ b/lib/Varien/Cache/Backend/Database.php @@ -478,7 +478,7 @@ public function touch($id, $extraLifetime) return $this->_getAdapter()->update( $this->_getDataTable(), array('expire_time'=>new Zend_Db_Expr('expire_time+'.$extraLifetime)), - array('id=?'=>$id, 'expire_time = 0 OR expire_time>'=>time()) + array('id=?' => $id, 'expire_time = 0 OR expire_time>?' => time()) ); } else { return true; diff --git a/lib/Varien/Data/Collection/Db.php b/lib/Varien/Data/Collection/Db.php index fcd4d8dcf13..6bb52e76dff 100644 --- a/lib/Varien/Data/Collection/Db.php +++ b/lib/Varien/Data/Collection/Db.php @@ -410,8 +410,14 @@ public function addFieldToFilter($field, $condition = null) */ protected function _translateCondition($field, $condition) { - $field = $this->_getMappedField($field); - return $this->_getConditionSql($field, $condition); + $mappedField = $this->_getMappedField($field); + + $quotedField = $mappedField; + if ($mappedField === $field) { + $quotedField = $this->getConnection()->quoteIdentifier($field); + } + + return $this->_getConditionSql($quotedField, $condition); } /** @@ -474,7 +480,7 @@ protected function _getMapper() * If non matched - sequential array is expected and OR conditions * will be built using above mentioned structure * - * @param string $fieldName + * @param string $fieldName Field name must be already escaped with Varien_Db_Adapter_Interface::quoteIdentifier() * @param integer|string|array $condition * @return string */ diff --git a/lib/Zend/Amf/Server.php b/lib/Zend/Amf/Server.php index c1daae39dbb..a0c86d68ac2 100644 --- a/lib/Zend/Amf/Server.php +++ b/lib/Zend/Amf/Server.php @@ -767,9 +767,9 @@ public function setClass($class, $namespace = '', $argv = null) throw new Zend_Amf_Server_Exception('Invalid method or class; must be a classname or object'); } - $argv = null; + $args = null; if (2 < func_num_args()) { - $argv = array_slice(func_get_args(), 2); + $args = array_slice(func_get_args(), 2); } // Use the class name as the name space by default. @@ -780,7 +780,7 @@ public function setClass($class, $namespace = '', $argv = null) $this->_classAllowed[is_object($class) ? get_class($class) : $class] = true; - $this->_methods[] = Zend_Server_Reflection::reflectClass($class, $argv, $namespace); + $this->_methods[] = Zend_Server_Reflection::reflectClass($class, $args, $namespace); $this->_buildDispatchTable(); return $this; diff --git a/lib/Zend/Application.php b/lib/Zend/Application.php index 69079abc974..51043107531 100644 --- a/lib/Zend/Application.php +++ b/lib/Zend/Application.php @@ -70,15 +70,17 @@ class Zend_Application * * @param string $environment * @param string|array|Zend_Config $options String path to configuration file, or array/Zend_Config of configuration options + * @param bool $suppressNotFoundWarnings Should warnings be suppressed when a file is not found during autoloading? * @throws Zend_Application_Exception When invalid options are provided * @return void */ - public function __construct($environment, $options = null) + public function __construct($environment, $options = null, $suppressNotFoundWarnings = null) { $this->_environment = (string) $environment; - require_once 'Zend/Loader/Autoloader.php'; + #require_once 'Zend/Loader/Autoloader.php'; $this->_autoloader = Zend_Loader_Autoloader::getInstance(); + $this->_autoloader->suppressNotFoundWarnings($suppressNotFoundWarnings); if (null !== $options) { if (is_string($options)) { diff --git a/lib/Zend/Cloud/StorageService/Adapter/FileSystem.php b/lib/Zend/Cloud/StorageService/Adapter/FileSystem.php index f0d8d6e8369..b577a7e84d9 100644 --- a/lib/Zend/Cloud/StorageService/Adapter/FileSystem.php +++ b/lib/Zend/Cloud/StorageService/Adapter/FileSystem.php @@ -104,7 +104,7 @@ public function storeItem($destinationPath, $data, $options = array()) { $path = $this->_getFullPath($destinationPath); file_put_contents($path, $data); - chmod($path, 0777); + chmod($path, 0775); } /** diff --git a/lib/Zend/Console/Getopt.php b/lib/Zend/Console/Getopt.php index 82e4138bc17..332b986bd40 100644 --- a/lib/Zend/Console/Getopt.php +++ b/lib/Zend/Console/Getopt.php @@ -173,14 +173,14 @@ class Zend_Console_Getopt ); /** - * Stores the command-line arguments for the calling applicaion. + * Stores the command-line arguments for the calling application. * * @var array */ protected $_argv = array(); /** - * Stores the name of the calling applicaion. + * Stores the name of the calling application. * * @var string */ @@ -550,7 +550,7 @@ public function getOptions() * current application invocation. * * This function returns true, or the parameter value to the option, if any. - * If the option was not given, this function returns false. + * If the option was not given, this function returns null. * * @param string $flag * @return mixed diff --git a/lib/Zend/Controller/Action/Helper/Redirector.php b/lib/Zend/Controller/Action/Helper/Redirector.php index 7009ad9b5dc..ec4a2ea180b 100644 --- a/lib/Zend/Controller/Action/Helper/Redirector.php +++ b/lib/Zend/Controller/Action/Helper/Redirector.php @@ -406,7 +406,7 @@ public function gotoSimpleAndExit($action, $controller = null, $module = null, a /** * Redirect to a route-based URL * - * Uses route's assemble method tobuild the URL; route is specified by $name; + * Uses route's assemble method to build the URL; route is specified by $name; * default route is used if none provided. * * @param array $urlOptions Array of key/value pairs used to assemble URL @@ -427,7 +427,7 @@ public function gotoRoute(array $urlOptions = array(), $name = null, $reset = fa /** * Redirect to a route-based URL, and immediately exit * - * Uses route's assemble method tobuild the URL; route is specified by $name; + * Uses route's assemble method to build the URL; route is specified by $name; * default route is used if none provided. * * @param array $urlOptions Array of key/value pairs used to assemble URL diff --git a/lib/Zend/Controller/Action/Helper/ViewRenderer.php b/lib/Zend/Controller/Action/Helper/ViewRenderer.php index 0dbd7391afb..e598011924d 100644 --- a/lib/Zend/Controller/Action/Helper/ViewRenderer.php +++ b/lib/Zend/Controller/Action/Helper/ViewRenderer.php @@ -841,13 +841,21 @@ protected function _translateSpec(array $vars = array()) $inflector = $this->getInflector(); $request = $this->getRequest(); $dispatcher = $this->getFrontController()->getDispatcher(); - $module = $dispatcher->formatModuleName($request->getModuleName()); - $controller = substr( - $dispatcher->formatControllerName($request->getControllerName()), - 0, - -10 - ); - $action = $dispatcher->formatActionName($request->getActionName()); + + // Format module name + $module = $dispatcher->formatModuleName($request->getModuleName()); + + // Format controller name + #require_once 'Zend/Filter/Word/CamelCaseToDash.php'; + $filter = new Zend_Filter_Word_CamelCaseToDash(); + $controller = $filter->filter($request->getControllerName()); + $controller = $dispatcher->formatControllerName($controller); + if ('Controller' == substr($controller, -10)) { + $controller = substr($controller, 0, -10); + } + + // Format action name + $action = $dispatcher->formatActionName($request->getActionName()); $params = compact('module', 'controller', 'action'); foreach ($vars as $key => $value) { diff --git a/lib/Zend/Controller/Request/Http.php b/lib/Zend/Controller/Request/Http.php index 882244219a8..721d35865a6 100644 --- a/lib/Zend/Controller/Request/Http.php +++ b/lib/Zend/Controller/Request/Http.php @@ -917,6 +917,20 @@ public function isOptions() return false; } + /** + * Was the request made by PATCH? + * + * @return boolean + */ + public function isPatch() + { + if ('PATCH' == $this->getMethod()) { + return true; + } + + return false; + } + /** * Is the request a Javascript XMLHttpRequest? * diff --git a/lib/Zend/Controller/Request/HttpTestCase.php b/lib/Zend/Controller/Request/HttpTestCase.php index 06b426868a7..33824d0e494 100644 --- a/lib/Zend/Controller/Request/HttpTestCase.php +++ b/lib/Zend/Controller/Request/HttpTestCase.php @@ -62,6 +62,7 @@ class Zend_Controller_Request_HttpTestCase extends Zend_Controller_Request_Http 'GET', 'HEAD', 'OPTIONS', + 'PATCH', 'POST', 'PUT', ); diff --git a/lib/Zend/Controller/Router/Route/Chain.php b/lib/Zend/Controller/Router/Route/Chain.php index e023d95dcd8..19bf9f6065f 100644 --- a/lib/Zend/Controller/Router/Route/Chain.php +++ b/lib/Zend/Controller/Router/Route/Chain.php @@ -86,10 +86,10 @@ public function chain(Zend_Controller_Router_Route_Abstract $route, $separator = */ public function match($request, $partial = null) { + $rawPath = $request->getPathInfo(); $path = trim($request->getPathInfo(), self::URI_DELIMITER); $subPath = $path; $values = array(); - $numRoutes = count($this->_routes); $matchedPath = null; foreach ($this->_routes as $key => $route) { @@ -101,12 +101,12 @@ public function match($request, $partial = null) $separator = substr($subPath, 0, strlen($this->_separators[$key])); if ($separator !== $this->_separators[$key]) { + $request->setPathInfo($rawPath); return false; } $subPath = substr($subPath, strlen($separator)); } - // TODO: Should be an interface method. Hack for 1.0 BC if (!method_exists($route, 'getVersion') || $route->getVersion() == 1) { $match = $subPath; @@ -115,8 +115,10 @@ public function match($request, $partial = null) $match = $request; } - $res = $route->match($match, true, ($key == $numRoutes - 1)); + $res = $route->match($match, true); + if ($res === false) { + $request->setPathInfo($rawPath); return false; } @@ -124,7 +126,6 @@ public function match($request, $partial = null) if ($matchedPath !== null) { $subPath = substr($subPath, strlen($matchedPath)); - $separator = substr($subPath, 0, strlen($this->_separators[$key])); } $values = $res + $values; diff --git a/lib/Zend/Date/DateObject.php b/lib/Zend/Date/DateObject.php index 358b2b5e391..99ce6f61c2d 100644 --- a/lib/Zend/Date/DateObject.php +++ b/lib/Zend/Date/DateObject.php @@ -318,7 +318,7 @@ protected function date($format, $timestamp = null, $gmt = false) // standard). However, this is not desired, so replacing // all occurrences of "o" not preceded by a backslash // with "Y" - $format = preg_replace('/(?_connect(); return $this->_connection->quote($value); } @@ -398,4 +400,3 @@ public function getServerVersion() } } } - diff --git a/lib/Zend/Db/Adapter/Pdo/Mssql.php b/lib/Zend/Db/Adapter/Pdo/Mssql.php index c009f861674..df8ba69a29a 100644 --- a/lib/Zend/Db/Adapter/Pdo/Mssql.php +++ b/lib/Zend/Db/Adapter/Pdo/Mssql.php @@ -410,7 +410,7 @@ public function lastInsertId($tableName = null, $primaryKey = null) public function getServerVersion() { try { - $stmt = $this->query("SELECT SERVERPROPERTY('productversion')"); + $stmt = $this->query("SELECT CAST(SERVERPROPERTY('productversion') AS VARCHAR)"); $result = $stmt->fetchAll(Zend_Db::FETCH_NUM); if (count($result)) { return $result[0][0]; diff --git a/lib/Zend/Db/Select.php b/lib/Zend/Db/Select.php index 7c6e6492051..9db7665c8a6 100644 --- a/lib/Zend/Db/Select.php +++ b/lib/Zend/Db/Select.php @@ -81,6 +81,8 @@ class Zend_Db_Select const SQL_ASC = 'ASC'; const SQL_DESC = 'DESC'; + const REGEX_COLUMN_EXPR = '/^([\w]*\(([^\(\)]|(?1))*\))$/'; + /** * Bind variables for query * @@ -509,7 +511,7 @@ public function group($spec) } foreach ($spec as $val) { - if (preg_match('/^([\w]*\(([^\)]|(?1))*\))$/', (string) $val)) { + if (preg_match(self::REGEX_COLUMN_EXPR, (string) $val)) { $val = new Zend_Db_Expr($val); } $this->_parts[self::GROUP][] = $val; @@ -601,7 +603,7 @@ public function order($spec) $val = trim($matches[1]); $direction = $matches[2]; } - if (preg_match('/^([\w]*\(([^\)]|(?1))*\))$/', (string) $val)) { + if (preg_match(self::REGEX_COLUMN_EXPR, (string) $val)) { $val = new Zend_Db_Expr($val); } $this->_parts[self::ORDER][] = array($val, $direction); @@ -943,7 +945,7 @@ protected function _tableCols($correlationName, $cols, $afterCorrelationName = n $alias = $m[2]; } // Check for columns that look like functions and convert to Zend_Db_Expr - if (preg_match('/^([\w]*\(([^\)]|(?1))*\))$/', (string) $col)) { + if (preg_match(self::REGEX_COLUMN_EXPR, (string) $col)) { $col = new Zend_Db_Expr($col); } elseif (preg_match('/(.+)\.(.+)/', $col, $m)) { $currentCorrelationName = $m[1]; diff --git a/lib/Zend/Dom/Query.php b/lib/Zend/Dom/Query.php index 297e64d85cc..75601783a13 100644 --- a/lib/Zend/Dom/Query.php +++ b/lib/Zend/Dom/Query.php @@ -48,13 +48,14 @@ class Zend_Dom_Query /**#@+ * Document types */ + const DOC_DOM = 'docDom'; const DOC_XML = 'docXml'; const DOC_HTML = 'docHtml'; const DOC_XHTML = 'docXhtml'; /**#@-*/ /** - * @var string + * @var string|DOMDocument */ protected $_document; @@ -85,7 +86,7 @@ class Zend_Dom_Query /** * Constructor * - * @param null|string $document + * @param null|string|DOMDocument $document * @param null|string $encoding */ public function __construct($document = null, $encoding = null) @@ -119,12 +120,15 @@ public function getEncoding() /** * Set document to query * - * @param string $document + * @param string|DOMDocument $document * @param null|string $encoding Document encoding * @return Zend_Dom_Query */ public function setDocument($document, $encoding = null) { + if ($document instanceof DOMDocument) { + return $this->setDocumentDom($document); + } if (0 === strlen($document)) { return $this; } @@ -142,6 +146,22 @@ public function setDocument($document, $encoding = null) return $this->setDocumentHtml($document, $encoding); } + /** + * Set DOMDocument to query + * + * @param DOMDocument $document + * @return Zend_Dom_Query + */ + public function setDocumentDom(DOMDocument $document) + { + $this->_document = $document; + $this->_docType = self::DOC_DOM; + if (null !== $document->encoding) { + $this->setEncoding($document->encoding); + } + return $this; + } + /** * Register HTML document * @@ -196,7 +216,7 @@ public function setDocumentXml($document, $encoding = null) /** * Retrieve current document * - * @return string + * @return string|DOMDocument */ public function getDocument() { @@ -259,6 +279,10 @@ public function queryXpath($xpathQuery, $query = null) } $type = $this->getDocumentType(); switch ($type) { + case self::DOC_DOM: + $domDoc = $this->_document; + $success = true; + break; case self::DOC_XML: try { $domDoc = Zend_Xml_Security::scan($document, $domDoc); @@ -295,8 +319,7 @@ public function queryXpath($xpathQuery, $query = null) /** * Register XPath namespaces * - * @param array $xpathNamespaces - * @return void + * @param array $xpathNamespaces */ public function registerXpathNamespaces($xpathNamespaces) { diff --git a/lib/Zend/Form.php b/lib/Zend/Form.php index 7023a2e3910..47d4464d334 100644 --- a/lib/Zend/Form.php +++ b/lib/Zend/Form.php @@ -1295,7 +1295,7 @@ public function setDefaults(array $defaults) if (($belongsTo = $element->getBelongsTo()) !== $eBelongTo) { $check = $this->_dissolveArrayValue($defaults, $belongsTo); } - if (array_key_exists($name, $check)) { + if (array_key_exists($name, (array)$check)) { $this->setDefault($name, $check[$name]); $defaults = $this->_dissolveArrayUnsetKey($defaults, $belongsTo, $name); } diff --git a/lib/Zend/Http/Client.php b/lib/Zend/Http/Client.php index fe1977e4b61..fd30f26cfd8 100644 --- a/lib/Zend/Http/Client.php +++ b/lib/Zend/Http/Client.php @@ -39,6 +39,12 @@ #require_once 'Zend/Http/Client/Adapter/Interface.php'; +/** + * @see Zend_Http_Header_HeaderValue + */ +#require_once 'Zend/Http/Header/HeaderValue.php'; + + /** * @see Zend_Http_Response */ @@ -431,38 +437,40 @@ public function setHeaders($name, $value = null) foreach ($name as $k => $v) { if (is_string($k)) { $this->setHeaders($k, $v); - } else { - $this->setHeaders($v, null); + continue; } + $this->setHeaders($v, null); } - } else { - // Check if $name needs to be split - if ($value === null && (strpos($name, ':') > 0)) { - list($name, $value) = explode(':', $name, 2); - } + return $this; + } - // Make sure the name is valid if we are in strict mode - if ($this->config['strict'] && (! preg_match('/^[a-zA-Z0-9-]+$/', $name))) { - /** @see Zend_Http_Client_Exception */ - #require_once 'Zend/Http/Client/Exception.php'; - throw new Zend_Http_Client_Exception("{$name} is not a valid HTTP header name"); - } + // Check if $name needs to be split + if ($value === null && (strpos($name, ':') > 0)) { + list($name, $value) = explode(':', $name, 2); + } - $normalized_name = strtolower($name); + // Make sure the name is valid if we are in strict mode + if ($this->config['strict'] && (! preg_match('/^[a-zA-Z0-9-]+$/', $name))) { + #require_once 'Zend/Http/Client/Exception.php'; + throw new Zend_Http_Client_Exception("{$name} is not a valid HTTP header name"); + } - // If $value is null or false, unset the header - if ($value === null || $value === false) { - unset($this->headers[$normalized_name]); + $normalized_name = strtolower($name); - // Else, set the header - } else { - // Header names are stored lowercase internally. - if (is_string($value)) { - $value = trim($value); - } - $this->headers[$normalized_name] = array($name, $value); - } + // If $value is null or false, unset the header + if ($value === null || $value === false) { + unset($this->headers[$normalized_name]); + return $this; + } + + // Validate value + $this->_validateHeaderValue($value); + + // Header names are stored lowercase internally. + if (is_string($value)) { + $value = trim($value); } + $this->headers[$normalized_name] = array($name, $value); return $this; } @@ -1568,4 +1576,32 @@ protected static function _flattenParametersArray($parray, $prefix = null) return $parameters; } + /** + * Ensure a header value is valid per RFC 7230. + * + * @see http://tools.ietf.org/html/rfc7230#section-3.2 + * @param string|object|array $value + * @param bool $recurse + */ + protected function _validateHeaderValue($value, $recurse = true) + { + if (is_array($value) && $recurse) { + foreach ($value as $v) { + $this->_validateHeaderValue($v, false); + } + return; + } + + // Cast integers and floats to strings for purposes of header representation. + if (is_int($value) || is_float($value)) { + $value = (string) $value; + } + + if (! is_string($value) && (! is_object($value) || ! method_exists($value, '__toString'))) { + #require_once 'Zend/Http/Exception.php'; + throw new Zend_Http_Exception('Invalid header value detected'); + } + + Zend_Http_Header_HeaderValue::assertValid($value); + } } diff --git a/lib/Zend/Http/Client/Adapter/Curl.php b/lib/Zend/Http/Client/Adapter/Curl.php index 6d5672ad39a..40b7824b1bc 100644 --- a/lib/Zend/Http/Client/Adapter/Curl.php +++ b/lib/Zend/Http/Client/Adapter/Curl.php @@ -221,17 +221,24 @@ public function connect($host, $port = 80, $secure = false) curl_setopt($this->_curl, CURLOPT_PORT, intval($port)); } - // Set timeout + // Set connection timeout + $connectTimeout = $this->_config['timeout']; + $constant = CURLOPT_CONNECTTIMEOUT; if (defined('CURLOPT_CONNECTTIMEOUT_MS')) { - curl_setopt($this->_curl, CURLOPT_CONNECTTIMEOUT_MS, $this->_config['timeout'] * 1000); - } else { - curl_setopt($this->_curl, CURLOPT_CONNECTTIMEOUT, $this->_config['timeout']); + $connectTimeout *= 1000; + $constant = constant('CURLOPT_CONNECTTIMEOUT_MS'); } - - if (defined('CURLOPT_TIMEOUT_MS')) { - curl_setopt($this->_curl, CURLOPT_TIMEOUT_MS, $this->_config['timeout'] * 1000); - } else { - curl_setopt($this->_curl, CURLOPT_TIMEOUT, $this->_config['timeout']); + curl_setopt($this->_curl, $constant, $connectTimeout); + + // Set request timeout (once connection is established) + if (array_key_exists('request_timeout', $this->_config)) { + $requestTimeout = $this->_config['request_timeout']; + $constant = CURLOPT_TIMEOUT; + if (defined('CURLOPT_TIMEOUT_MS')) { + $requestTimeout *= 1000; + $constant = constant('CURLOPT_TIMEOUT_MS'); + } + curl_setopt($this->_curl, $constant, $requestTimeout); } // Set Max redirects diff --git a/lib/Zend/Http/Client/Adapter/Proxy.php b/lib/Zend/Http/Client/Adapter/Proxy.php index 96017a2dc53..658fa60bac6 100644 --- a/lib/Zend/Http/Client/Adapter/Proxy.php +++ b/lib/Zend/Http/Client/Adapter/Proxy.php @@ -244,7 +244,7 @@ protected function connectHandshake( ) { $request = "CONNECT $host:$port HTTP/$http_ver\r\n" . - "Host: " . $this->config['proxy_host'] . "\r\n"; + "Host: " . $host . "\r\n"; // Process provided headers, including important ones to CONNECT request foreach ($headers as $k => $v) { diff --git a/lib/Zend/Http/Header/HeaderValue.php b/lib/Zend/Http/Header/HeaderValue.php new file mode 100644 index 00000000000..2b57e3bf7ee --- /dev/null +++ b/lib/Zend/Http/Header/HeaderValue.php @@ -0,0 +1,127 @@ + 254 + ) { + continue; + } + + $string .= $value[$i]; + } + + return $string; + } + + /** + * Validate a header value. + * + * Per RFC 7230, only VISIBLE ASCII characters, spaces, and horizontal + * tabs are allowed in values; only one whitespace character is allowed + * between visible characters. + * + * @see http://en.wikipedia.org/wiki/HTTP_response_splitting + * @param string $value + * @return bool + */ + public static function isValid($value) + { + $value = (string) $value; + $length = strlen($value); + for ($i = 0; $i < $length; $i += 1) { + $ascii = ord($value[$i]); + + // Non-visible, non-whitespace characters + // 9 === horizontal tab + // 32-126, 128-254 === visible + // 127 === DEL + // 255 === null byte + if (($ascii < 32 && $ascii !== 9) + || $ascii === 127 + || $ascii > 254 + ) { + return false; + } + } + + return true; + } + + /** + * Assert a header value is valid. + * + * @param string $value + * @throws Exception\RuntimeException for invalid values + * @return void + */ + public static function assertValid($value) + { + if (! self::isValid($value)) { + #require_once 'Zend/Http/Header/Exception/InvalidArgumentException.php'; + throw new Zend_Http_Header_Exception_InvalidArgumentException('Invalid header value'); + } + } +} diff --git a/lib/Zend/Http/Header/SetCookie.php b/lib/Zend/Http/Header/SetCookie.php index 81870f0c52c..158c59e5382 100644 --- a/lib/Zend/Http/Header/SetCookie.php +++ b/lib/Zend/Http/Header/SetCookie.php @@ -31,6 +31,11 @@ */ #require_once "Zend/Http/Header/Exception/RuntimeException.php"; +/** + * @see Zend_Http_Header_HeaderValue + */ +#require_once "Zend/Http/Header/HeaderValue.php"; + /** * Zend_Http_Client is an implementation of an HTTP client in PHP. The client * supports basic features like sending different HTTP requests and handling @@ -311,6 +316,7 @@ public function getName() */ public function setValue($value) { + Zend_Http_Header_HeaderValue::assertValid($value); $this->value = $value; return $this; } @@ -405,6 +411,7 @@ public function getExpires($inSeconds = false) */ public function setDomain($domain) { + Zend_Http_Header_HeaderValue::assertValid($domain); $this->domain = $domain; return $this; } @@ -422,6 +429,7 @@ public function getDomain() */ public function setPath($path) { + Zend_Http_Header_HeaderValue::assertValid($path); $this->path = $path; return $this; } diff --git a/lib/Zend/Http/Response.php b/lib/Zend/Http/Response.php index 5bac32d480e..af0fa836fa9 100644 --- a/lib/Zend/Http/Response.php +++ b/lib/Zend/Http/Response.php @@ -21,6 +21,11 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ +/** + * @see Zend_Http_Header_HeaderValue + */ +#require_once 'Zend/Http/Header/HeaderValue.php'; + /** * Zend_Http_Response represents an HTTP 1.0 / 1.1 response message. It * includes easy access to all the response's different elemts, as well as some @@ -394,7 +399,7 @@ public function getHeadersAsString($status_line = true, $br = "\n") * @param string $br Line breaks (eg. "\n", "\r\n", "
        ") * @return string */ - public function asString($br = "\n") + public function asString($br = "\r\n") { return $this->getHeadersAsString(true, $br) . $br . $this->getRawBody(); } @@ -496,44 +501,75 @@ public static function extractHeaders($response_str) { $headers = array(); - // First, split body and headers - $parts = preg_split('|(?:\r?\n){2}|m', $response_str, 2); - if (! $parts[0]) return $headers; + // First, split body and headers. Headers are separated from the + // message at exactly the sequence "\r\n\r\n" + $parts = preg_split('|(?:\r\n){2}|m', $response_str, 2); + if (! $parts[0]) { + return $headers; + } - // Split headers part to lines - $lines = explode("\n", $parts[0]); + // Split headers part to lines; "\r\n" is the only valid line separator. + $lines = explode("\r\n", $parts[0]); unset($parts); $last_header = null; - foreach($lines as $line) { - $line = trim($line, "\r\n"); - if ($line == "") break; + foreach($lines as $index => $line) { + if ($index === 0 && preg_match('#^HTTP/\d+(?:\.\d+) [1-5]\d+#', $line)) { + // Status line; ignore + continue; + } + + if ($line == "") { + // Done processing headers + break; + } // Locate headers like 'Location: ...' and 'Location:...' (note the missing space) - if (preg_match("|^([\w-]+):\s*(.+)|", $line, $m)) { + if (preg_match("|^([a-zA-Z0-9\'`#$%&*+.^_\|\~!-]+):\s*(.*)|s", $line, $m)) { unset($last_header); - $h_name = strtolower($m[1]); + $h_name = strtolower($m[1]); $h_value = $m[2]; + Zend_Http_Header_HeaderValue::assertValid($h_value); if (isset($headers[$h_name])) { if (! is_array($headers[$h_name])) { $headers[$h_name] = array($headers[$h_name]); } - $headers[$h_name][] = $h_value; - } else { - $headers[$h_name] = $h_value; + $headers[$h_name][] = ltrim($h_value); + $last_header = $h_name; + continue; } + + $headers[$h_name] = ltrim($h_value); $last_header = $h_name; - } elseif (preg_match("|^\s+(.+)$|", $line, $m) && $last_header !== null) { + continue; + } + + // Identify header continuations + if (preg_match("|^[ \t](.+)$|s", $line, $m) && $last_header !== null) { + $h_value = trim($m[1]); if (is_array($headers[$last_header])) { end($headers[$last_header]); $last_header_key = key($headers[$last_header]); - $headers[$last_header][$last_header_key] .= $m[1]; - } else { - $headers[$last_header] .= $m[1]; + + $h_value = $headers[$last_header][$last_header_key] . $h_value; + Zend_Http_Header_HeaderValue::assertValid($h_value); + + $headers[$last_header][$last_header_key] = $h_value; + continue; } + + $h_value = $headers[$last_header] . $h_value; + Zend_Http_Header_HeaderValue::assertValid($h_value); + + $headers[$last_header] = $h_value; + continue; } + + // Anything else is an error condition + #require_once 'Zend/Http/Exception.php'; + throw new Zend_Http_Exception('Invalid header line detected'); } return $headers; @@ -547,7 +583,7 @@ public static function extractHeaders($response_str) */ public static function extractBody($response_str) { - $parts = preg_split('|(?:\r?\n){2}|m', $response_str, 2); + $parts = preg_split('|(?:\r\n){2}|m', $response_str, 2); if (isset($parts[1])) { return $parts[1]; } diff --git a/lib/Zend/Http/UserAgent/AbstractDevice.php b/lib/Zend/Http/UserAgent/AbstractDevice.php index 8b916d2893d..9cdfc6c2172 100644 --- a/lib/Zend/Http/UserAgent/AbstractDevice.php +++ b/lib/Zend/Http/UserAgent/AbstractDevice.php @@ -509,7 +509,9 @@ public static function extractFromUserAgent($userAgent) } $result['browser_version'] = '??'; } - } elseif ($product == 'mozilla' && $result['browser_version'] < 5.0) { + } elseif ($product == 'mozilla' && isset($result['browser_version']) + && $result['browser_version'] < 5.0 + ) { // handles the real Mozilla (or old Netscape if version < 5.0) $result['browser_name'] = 'Netscape'; } diff --git a/lib/Zend/Loader/Autoloader.php b/lib/Zend/Loader/Autoloader.php index 06e70232fd5..db879485052 100644 --- a/lib/Zend/Loader/Autoloader.php +++ b/lib/Zend/Loader/Autoloader.php @@ -21,7 +21,7 @@ */ /** Zend_Loader */ -require_once 'Zend/Loader.php'; +#require_once 'Zend/Loader.php'; /** * Autoloader stack and namespace autoloader diff --git a/lib/Zend/Locale/Data.php b/lib/Zend/Locale/Data.php index f1dd398f6b9..c4331abd731 100644 --- a/lib/Zend/Locale/Data.php +++ b/lib/Zend/Locale/Data.php @@ -241,6 +241,14 @@ private static function _getFile($locale, $path, $attribute = false, $value = fa // 3. -> zh // 4. -> root if (($locale != 'root') && ($result)) { + // Search for parent locale + if (false !== strpos($locale, '_')) { + $parentLocale = self::getContent($locale, 'parentlocale'); + if ($parentLocale) { + $temp = self::_getFile($parentLocale, $path, $attribute, $value, $temp); + } + } + $locale = substr($locale, 0, -strlen(strrchr($locale, '_'))); if (!empty($locale)) { $temp = self::_getFile($locale, $path, $attribute, $value, $temp); @@ -1474,6 +1482,13 @@ public static function getContent($locale, $path, $value = false) $temp = self::_getFile($locale, '/ldml/units/unitLength/unit[@type=\'' . $value[0] . '\']/unitPattern[@count=\'' . $value[1] . '\']', ''); break; + case 'parentlocale': + if (false === $value) { + $value = $locale; + } + $temp = self::_getFile('supplementalData', "/supplementalData/parentLocales/parentLocale[contains(@locales, '" . $value . "')]", 'parent', 'parent'); + break; + default : #require_once 'Zend/Locale/Exception.php'; throw new Zend_Locale_Exception("Unknown detail ($path) for parsing locale data."); diff --git a/lib/Zend/Locale/Math.php b/lib/Zend/Locale/Math.php index 988ee573801..91e1905d8a6 100644 --- a/lib/Zend/Locale/Math.php +++ b/lib/Zend/Locale/Math.php @@ -350,6 +350,6 @@ public static function Comp($op1, $op2, $scale = null) if (!extension_loaded('bcmath') || (defined('TESTS_ZEND_LOCALE_BCMATH_ENABLED') && !TESTS_ZEND_LOCALE_BCMATH_ENABLED) ) { - #require_once 'Zend/Locale/Math/PhpMath.php'; + require_once 'Zend/Locale/Math/PhpMath.php'; Zend_Locale_Math_PhpMath::disable(); } diff --git a/lib/Zend/Log.php b/lib/Zend/Log.php index 2b7ce81aac4..facd73e829f 100644 --- a/lib/Zend/Log.php +++ b/lib/Zend/Log.php @@ -25,6 +25,17 @@ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ + * + * Convenience methods for log [@see Zend_Log::__call()]: + * + * @method emerg(string $message, $extras = null) + * @method alert(string $message, $extras = null) + * @method crit(string $message, $extras = null) + * @method err(string $message, $extras = null) + * @method warn(string $message, $extras = null) + * @method notice(string $message, $extras = null) + * @method info(string $message, $extras = null) + * @method debug(string $message, $extras = null) */ class Zend_Log { @@ -104,7 +115,6 @@ class Zend_Log * Class constructor. Create a new logger * * @param Zend_Log_Writer_Abstract|null $writer default writer - * @return void */ public function __construct(Zend_Log_Writer_Abstract $writer = null) { @@ -173,7 +183,7 @@ static public function factory($config = array()) /** * Construct a writer object based on a configuration array * - * @param array $spec config array with writer spec + * @param array $config config array with writer spec * @return Zend_Log_Writer_Abstract * @throws Zend_Log_Exception */ @@ -351,6 +361,7 @@ protected function _packEvent($message, $priority) */ public function __destruct() { + /** @var Zend_Log_Writer_Abstract $writer */ foreach($this->_writers as $writer) { $writer->shutdown(); } @@ -440,6 +451,7 @@ public function log($message, $priority, $extras = null) } // abort if rejected by the global filters + /** @var Zend_Log_Filter_Interface $filter */ foreach ($this->_filters as $filter) { if (! $filter->accept($event)) { return; @@ -447,6 +459,7 @@ public function log($message, $priority, $extras = null) } // send to each writer + /** @var Zend_Log_Writer_Abstract $writer */ foreach ($this->_writers as $writer) { $writer->write($event); } @@ -455,8 +468,9 @@ public function log($message, $priority, $extras = null) /** * Add a custom priority * - * @param string $name Name of priority - * @param integer $priority Numeric priority + * @param string $name Name of priority + * @param integer $priority Numeric priority + * @return $this * @throws Zend_Log_Exception */ public function addPriority($name, $priority) @@ -481,7 +495,7 @@ public function addPriority($name, $priority) * must be accepted by all filters added with this method. * * @param int|Zend_Config|array|Zend_Log_Filter_Interface $filter - * @return Zend_Log + * @return $this * @throws Zend_Log_Exception */ public function addFilter($filter) @@ -510,6 +524,7 @@ public function addFilter($filter) * * @param mixed $writer Zend_Log_Writer_Abstract or Config array * @return Zend_Log + * @throws Zend_Log_Exception */ public function addWriter($writer) { diff --git a/lib/Zend/Mail/Header/HeaderName.php b/lib/Zend/Mail/Header/HeaderName.php new file mode 100644 index 00000000000..2e19402e1fa --- /dev/null +++ b/lib/Zend/Mail/Header/HeaderName.php @@ -0,0 +1,92 @@ + 32 && $ord < 127 && $ord !== 58) { + $result .= $name[$i]; + } + } + return $result; + } + + /** + * Determine if the header name contains any invalid characters. + * + * @param string $name + * @return bool + */ + public static function isValid($name) + { + $tot = strlen($name); + for ($i = 0; $i < $tot; $i += 1) { + $ord = ord($name[$i]); + if ($ord < 33 || $ord > 126 || $ord === 58) { + return false; + } + } + return true; + } + + /** + * Assert that the header name is valid. + * + * Raises an exception if invalid. + * + * @param string $name + * @throws Exception\RuntimeException + * @return void + */ + public static function assertValid($name) + { + if (! self::isValid($name)) { + #require_once 'Zend/Mail/Exception.php'; + throw new Zend_Mail_Exception('Invalid header name detected'); + } + } +} diff --git a/lib/Zend/Mail/Header/HeaderValue.php b/lib/Zend/Mail/Header/HeaderValue.php new file mode 100644 index 00000000000..c6a00cc4489 --- /dev/null +++ b/lib/Zend/Mail/Header/HeaderValue.php @@ -0,0 +1,136 @@ + 126) + && $ord !== 13 + ) { + continue; + } + + if ($ord === 13) { + if ($i + 2 >= $tot) { + continue; + } + + $lf = ord($value[$i + 1]); + $sp = ord($value[$i + 2]); + + if ($lf !== 10 || $sp !== 32) { + continue; + } + + $result .= "\r\n "; + $i += 2; + continue; + } + + $result .= $value[$i]; + } + + return $result; + } + + /** + * Determine if the header value contains any invalid characters. + * + * @see http://www.rfc-base.org/txt/rfc-2822.txt (section 2.2) + * @param string $value + * @return bool + */ + public static function isValid($value) + { + $tot = strlen($value); + for ($i = 0; $i < $tot; $i += 1) { + $ord = ord($value[$i]); + if (($ord < 32 || $ord > 126) + && $ord !== 13 + ) { + return false; + } + + if ($ord === 13) { + if ($i + 2 >= $tot) { + return false; + } + + $lf = ord($value[$i + 1]); + $sp = ord($value[$i + 2]); + + if ($lf !== 10 || $sp !== 32) { + return false; + } + + $i += 2; + } + } + + return true; + } + + /** + * Assert that the header value is valid. + * + * Raises an exception if invalid. + * + * @param string $value + * @throws Exception\RuntimeException + * @return void + */ + public static function assertValid($value) + { + if (! self::isValid($value)) { + #require_once 'Zend/Mail/Exception.php'; + throw new Zend_Mail_Exception('Invalid header value detected'); + } + } +} diff --git a/lib/Zend/Mail/Message.php b/lib/Zend/Mail/Message.php index a9ced154fc6..b1753439979 100644 --- a/lib/Zend/Mail/Message.php +++ b/lib/Zend/Mail/Message.php @@ -69,6 +69,7 @@ public function __construct(array $params) } else { $params['raw'] = stream_get_contents($params['file']); } + $params['raw'] = preg_replace("/(?_headers, $this->_content); + Zend_Mime_Decode::splitMessage($params['raw'], $this->_headers, $this->_content, "\r\n"); } else if (isset($params['headers'])) { if (is_array($params['headers'])) { $this->_headers = $params['headers']; + $this->_validateHeaders($this->_headers); } else { if (!empty($params['noToplines'])) { - Zend_Mime_Decode::splitMessage($params['headers'], $this->_headers, $null); + Zend_Mime_Decode::splitMessage($params['headers'], $this->_headers, $null, "\r\n"); } else { - Zend_Mime_Decode::splitMessage($params['headers'], $this->_headers, $this->_topLines); + Zend_Mime_Decode::splitMessage($params['headers'], $this->_headers, $this->_topLines, "\r\n"); } } + if (isset($params['content'])) { $this->_content = $params['content']; } @@ -566,4 +578,26 @@ public function rewind() $this->countParts(); $this->_iterationPos = 1; } + + /** + * Ensure headers do not contain invalid characters + * + * @param array $headers + * @param bool $assertNames + */ + protected function _validateHeaders(array $headers, $assertNames = true) + { + foreach ($headers as $name => $value) { + if ($assertNames) { + Zend_Mail_Header_HeaderName::assertValid($name); + } + + if (is_array($value)) { + $this->_validateHeaders($value, false); + continue; + } + + Zend_Mail_Header_HeaderValue::assertValid($value); + } + } } diff --git a/lib/Zend/Mail/Storage.php b/lib/Zend/Mail/Storage.php index b5cf6326b4d..b0eed1213bc 100644 --- a/lib/Zend/Mail/Storage.php +++ b/lib/Zend/Mail/Storage.php @@ -31,6 +31,7 @@ class Zend_Mail_Storage // system flags and other flags const FLAG_PASSED = 'Passed'; const FLAG_SEEN = '\Seen'; + const FLAG_UNSEEN = '\Unseen'; const FLAG_ANSWERED = '\Answered'; const FLAG_FLAGGED = '\Flagged'; const FLAG_DELETED = '\Deleted'; diff --git a/lib/Zend/Mail/Storage/Imap.php b/lib/Zend/Mail/Storage/Imap.php index 871eb22b768..f73cd0321cd 100644 --- a/lib/Zend/Mail/Storage/Imap.php +++ b/lib/Zend/Mail/Storage/Imap.php @@ -88,6 +88,7 @@ class Zend_Mail_Storage_Imap extends Zend_Mail_Storage_Abstract protected static $_knownFlags = array('\Passed' => Zend_Mail_Storage::FLAG_PASSED, '\Answered' => Zend_Mail_Storage::FLAG_ANSWERED, '\Seen' => Zend_Mail_Storage::FLAG_SEEN, + '\Unseen' => Zend_Mail_Storage::FLAG_UNSEEN, '\Deleted' => Zend_Mail_Storage::FLAG_DELETED, '\Draft' => Zend_Mail_Storage::FLAG_DRAFT, '\Flagged' => Zend_Mail_Storage::FLAG_FLAGGED); @@ -99,6 +100,7 @@ class Zend_Mail_Storage_Imap extends Zend_Mail_Storage_Abstract protected static $_searchFlags = array('\Recent' => 'RECENT', '\Answered' => 'ANSWERED', '\Seen' => 'SEEN', + '\Unseen' => 'UNSEEN', '\Deleted' => 'DELETED', '\Draft' => 'DRAFT', '\Flagged' => 'FLAGGED'); diff --git a/lib/Zend/Measure/Number.php b/lib/Zend/Measure/Number.php index a22dd3ad133..a8a446e7bbf 100644 --- a/lib/Zend/Measure/Number.php +++ b/lib/Zend/Measure/Number.php @@ -415,6 +415,12 @@ public function setType($type) public function convertTo($type, $round = 0, $locale = null) { $this->setType($type); + + // Roman numerals do not need a formatting + if ($this->getType() === self::ROMAN) { + return $this->_value; + } + return $this->toString($round, $locale); } } diff --git a/lib/Zend/Registry.php b/lib/Zend/Registry.php index 61d75401e56..8ba6b76c7a3 100644 --- a/lib/Zend/Registry.php +++ b/lib/Zend/Registry.php @@ -136,7 +136,7 @@ public static function _unsetInstance() * * @param string $index - get the value associated with $index * @return mixed - * @throws Zend_Exception if no entry is registerd for $index. + * @throws Zend_Exception if no entry is registered for $index. */ public static function get($index) { diff --git a/lib/Zend/Search/Lucene/Storage/Directory/Filesystem.php b/lib/Zend/Search/Lucene/Storage/Directory/Filesystem.php index 725ce6d6c98..32eedd90bff 100644 --- a/lib/Zend/Search/Lucene/Storage/Directory/Filesystem.php +++ b/lib/Zend/Search/Lucene/Storage/Directory/Filesystem.php @@ -90,8 +90,10 @@ public static function setDefaultFilePermissions($mode) * @return boolean */ - public static function mkdirs($dir, $mode = 0777, $recursive = true) + public static function mkdirs($dir, $mode = 0775, $recursive = true) { + $mode = $mode & ~0002; + if (($dir === null) || $dir === '') { return false; } @@ -360,4 +362,3 @@ public function getFileObject($filename, $shareHandler = true) return $this->_fileHandlers[$filename]; } } - diff --git a/lib/Zend/Serializer/Adapter/PythonPickle.php b/lib/Zend/Serializer/Adapter/PythonPickle.php index 05f773f6516..4aa39908673 100644 --- a/lib/Zend/Serializer/Adapter/PythonPickle.php +++ b/lib/Zend/Serializer/Adapter/PythonPickle.php @@ -99,11 +99,6 @@ class Zend_Serializer_Adapter_PythonPickle extends Zend_Serializer_Adapter_Adapt const OP_BINBYTES = 'B'; // push bytes; counted binary string argument const OP_SHORT_BINBYTES = 'C'; // " " ; " " " " < 256 bytes - /** - * @var bool Whether or not this is a PHP 6 binary - */ - protected static $_isPhp6 = null; - /** * @var bool Whether or not the system is little-endian */ @@ -155,9 +150,6 @@ public function __construct($opts=array()) if (self::$_isLittleEndian === null) { self::$_isLittleEndian = (pack('l', 1) === "\x01\x00\x00\x00"); } - if (self::$_isPhp6 === null) { - self::$_isPhp6 = !version_compare(PHP_VERSION, '6.0.0', '<'); - } $this->_marker = new stdClass(); } @@ -1103,10 +1095,6 @@ protected function _loadUnicode() $pattern = '/\\\\u([a-fA-F0-9]{4})/u'; // \uXXXX $data = preg_replace_callback($pattern, array($this, '_convertMatchingUnicodeSequence2Utf8'), $data); - if (self::$_isPhp6) { - $data = unicode_decode($data, 'UTF-8'); - } - $this->_stack[] = $data; } @@ -1172,10 +1160,6 @@ protected function _loadBinUnicode() list(, $n) = unpack('l', $n); $data = $this->_read($n); - if (self::$_isPhp6) { - $data = unicode_decode($data, 'UTF-8'); - } - $this->_stack[] = $data; } diff --git a/lib/Zend/Service/DeveloperGarden/BaseUserService.php b/lib/Zend/Service/DeveloperGarden/BaseUserService.php deleted file mode 100644 index 501c50fd727..00000000000 --- a/lib/Zend/Service/DeveloperGarden/BaseUserService.php +++ /dev/null @@ -1,399 +0,0 @@ - - 'Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse', - 'changeQuotaPoolResponse' => - 'Zend_Service_DeveloperGarden_Response_BaseUserService_ChangeQuotaPoolResponse', - 'getAccountBalanceResponse' => - 'Zend_Service_DeveloperGarden_Response_BaseUserService_GetAccountBalanceResponse', - 'AccountBalance' => - 'Zend_Service_DeveloperGarden_BaseUserService_AccountBalance', - ); - - /** - * array with all QuotaModuleIds - * - * @var array - */ - protected $_moduleIds = array( - 'SmsProduction' => 'SmsProduction', - 'SmsSandbox' => 'SmsSandbox', - 'VoiceCallProduction' => 'VoiceButlerProduction', - 'VoiceCallSandbox' => 'VoiceButlerSandbox', - 'ConferenceCallProduction' => 'CCSProduction', - 'ConferenceCallSandbox' => 'CCSSandbox', - 'LocalSearchProduction' => 'localsearchProduction', - 'LocalSearchSandbox' => 'localsearchSandbox', - 'IPLocationProduction' => 'IPLocationProduction', - 'IPLocationSandbox' => 'IPLocationSandbox' - ); - - /** - * returns an array with all possible ModuleIDs - * - * @return array - */ - public function getModuleIds() - { - return $this->_moduleIds; - } - - /** - * checks the moduleId and throws exception if not valid - * - * @param string $moduleId - * @throws Zend_Service_DeveloperGarden_Client_Exception - * @return void - */ - protected function _checkModuleId($moduleId) - { - if (!in_array($moduleId, $this->_moduleIds)) { - #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php'; - throw new Zend_Service_DeveloperGarden_Client_Exception('moduleId not valid'); - } - } - - /** - * returns the correct module string - * - * @param string $module - * @param integer $environment - * @return string - */ - protected function _buildModuleString($module, $environment) - { - $moduleString = $module; - switch($environment) { - case self::ENV_PRODUCTION : - $moduleString .= 'Production'; - break; - case self::ENV_SANDBOX : - $moduleString .= 'Sandbox'; - break; - default: - #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php'; - throw new Zend_Service_DeveloperGarden_Client_Exception( - 'Not a valid environment supplied.' - ); - } - - if (!in_array($moduleString, $this->_moduleIds)) { - #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php'; - throw new Zend_Service_DeveloperGarden_Client_Exception( - 'Not a valid module name supplied.' - ); - } - - return $moduleString; - } - - /** - * returns the request object with the specific moduleId - * - * @param string $moduleId - * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse - */ - protected function _getRequestModule($moduleId) - { - return new Zend_Service_DeveloperGarden_Request_BaseUserService_GetQuotaInformation( - $moduleId - ); - } - - /** - * returns the request object with the specific moduleId and new quotaMax value - * - * @param string $moduleId - * @param integer $quotaMax - * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse - */ - protected function _getChangeRequestModule($moduleId, $quotaMax) - { - return new Zend_Service_DeveloperGarden_Request_BaseUserService_ChangeQuotaPool( - $moduleId, - $quotaMax - ); - } - - /** - * returns the Quota Information for SMS Service - * - * @param int $environment - * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse - */ - public function getSmsQuotaInformation($environment = self::ENV_PRODUCTION) - { - self::checkEnvironment($environment); - $moduleId = $this->_buildModuleString('Sms', $environment); - $request = $this->_getRequestModule($moduleId); - return $this->getQuotaInformation($request); - } - - /** - * returns the Quota Information for VoiceCall Service - * - * @param int $environment - * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse - */ - public function getVoiceCallQuotaInformation($environment = self::ENV_PRODUCTION) - { - self::checkEnvironment($environment); - $moduleId = $this->_buildModuleString('VoiceButler', $environment); - $request = $this->_getRequestModule($moduleId); - return $this->getQuotaInformation($request); - } - - /** - * returns the Quota Information for SMS ConferenceCall - * - * @param int $environment - * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse - */ - public function getConfernceCallQuotaInformation($environment = self::ENV_PRODUCTION) - { - self::checkEnvironment($environment); - $moduleId = $this->_buildModuleString('CCS', $environment); - $request = $this->_getRequestModule($moduleId); - return $this->getQuotaInformation($request); - } - - /** - * returns the Quota Information for LocaleSearch Service - * - * @param int $environment - * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse - */ - public function getLocalSearchQuotaInformation($environment = self::ENV_PRODUCTION) - { - self::checkEnvironment($environment); - $moduleId = $this->_buildModuleString('localsearch', $environment); - $request = $this->_getRequestModule($moduleId); - return $this->getQuotaInformation($request); - } - - /** - * returns the Quota Information for IPLocation Service - * - * @param int $environment - * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse - */ - public function getIPLocationQuotaInformation($environment = self::ENV_PRODUCTION) - { - self::checkEnvironment($environment); - $moduleId = $this->_buildModuleString('IPLocation', $environment); - $request = $this->_getRequestModule($moduleId); - return $this->getQuotaInformation($request); - } - - /** - * returns the quota information - * - * @param Zend_Service_DeveloperGarden_Request_BaseUserService $request - * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse - */ - public function getQuotaInformation( - Zend_Service_DeveloperGarden_Request_BaseUserService_GetQuotaInformation $request - ) { - $this->_checkModuleId($request->getModuleId()); - return $this->getSoapClient() - ->getQuotaInformation($request) - ->parse(); - } - - /** - * sets new user quota for the sms service - * - * @param integer $quotaMax - * @param integer $environment - * @return Zend_Service_DeveloperGarden_Response_BaseUserService_ChangeQuotaPoolResponse - */ - public function changeSmsQuotaPool($quotaMax = 0, $environment = self::ENV_PRODUCTION) - { - self::checkEnvironment($environment); - $moduleId = $this->_buildModuleString('Sms', $environment); - $request = $this->_getChangeRequestModule($moduleId, $quotaMax); - return $this->changeQuotaPool($request); - } - - /** - * sets new user quota for the voice call service - * - * @param integer $quotaMax - * @param integer $environment - * @return Zend_Service_DeveloperGarden_Response_BaseUserService_ChangeQuotaPoolResponse - */ - public function changeVoiceCallQuotaPool($quotaMax = 0, $environment = self::ENV_PRODUCTION) - { - self::checkEnvironment($environment); - $moduleId = $this->_buildModuleString('VoiceButler', $environment); - $request = $this->_getChangeRequestModule($moduleId, $quotaMax); - return $this->changeQuotaPool($request); - } - - /** - * sets new user quota for the IPLocation service - * - * @param integer $quotaMax - * @param integer $environment - * @return Zend_Service_DeveloperGarden_Response_BaseUserService_ChangeQuotaPoolResponse - */ - public function changeIPLocationQuotaPool($quotaMax = 0, $environment = self::ENV_PRODUCTION) - { - self::checkEnvironment($environment); - $moduleId = $this->_buildModuleString('IPLocation', $environment); - $request = $this->_getChangeRequestModule($moduleId, $quotaMax); - return $this->changeQuotaPool($request); - } - - /** - * sets new user quota for the Conference Call service - * - * @param integer $quotaMax - * @param integer $environment - * @return Zend_Service_DeveloperGarden_Response_BaseUserService_ChangeQuotaPoolResponse - */ - public function changeConferenceCallQuotaPool($quotaMax = 0, $environment = self::ENV_PRODUCTION) - { - self::checkEnvironment($environment); - $moduleId = $this->_buildModuleString('CCS', $environment); - $request = $this->_getChangeRequestModule($moduleId, $quotaMax); - return $this->changeQuotaPool($request); - } - - /** - * sets new user quota for the Local Search service - * - * @param integer $quotaMax - * @param integer $environment - * @return Zend_Service_DeveloperGarden_Response_BaseUserService_ChangeQuotaPoolResponse - */ - public function changeLocalSearchQuotaPool($quotaMax = 0, $environment = self::ENV_PRODUCTION) - { - self::checkEnvironment($environment); - $moduleId = $this->_buildModuleString('localsearch', $environment); - $request = $this->_getChangeRequestModule($moduleId, $quotaMax); - return $this->changeQuotaPool($request); - } - - /** - * set new quota values for the defined module - * - * @param Zend_Service_DeveloperGarden_Request_BaseUserService_ChangeQuotaPool $request - * @return Zend_Service_DeveloperGarden_Response_BaseUserService_ChangeQuotaPoolResponse - */ - public function changeQuotaPool( - Zend_Service_DeveloperGarden_Request_BaseUserService_ChangeQuotaPool $request - ) { - $this->_checkModuleId($request->getModuleId()); - return $this->getSoapClient() - ->changeQuotaPool($request) - ->parse(); - } - - /** - * get the result for a list of accounts - * - * @param array $accounts - * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetAccountBalanceResponse - */ - public function getAccountBalance(array $accounts = array()) - { - $request = new Zend_Service_DeveloperGarden_Request_BaseUserService_GetAccountBalance( - $accounts - ); - return $this->getSoapClient() - ->getAccountBalance($request) - ->parse(); - } -} diff --git a/lib/Zend/Service/DeveloperGarden/BaseUserService/AccountBalance.php b/lib/Zend/Service/DeveloperGarden/BaseUserService/AccountBalance.php deleted file mode 100644 index 29a2c579b3c..00000000000 --- a/lib/Zend/Service/DeveloperGarden/BaseUserService/AccountBalance.php +++ /dev/null @@ -1,62 +0,0 @@ -Account; - } - - /** - * returns the credits - * - * @return integer - */ - public function getCredits() - { - return $this->Credits; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Client/ClientAbstract.php b/lib/Zend/Service/DeveloperGarden/Client/ClientAbstract.php deleted file mode 100644 index ea688d60812..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Client/ClientAbstract.php +++ /dev/null @@ -1,430 +0,0 @@ -_credential = new Zend_Service_DeveloperGarden_Credential(); - - while (list($name, $value) = each($options)) { - switch (ucfirst($name)) { - case 'Username' : - $this->_credential->setUsername($value); - break; - case 'Password' : - $this->_credential->setPassword($value); - break; - case 'Realm' : - $this->_credential->setRealm($value); - break; - case 'Environment' : - $this->setEnvironment($value); - } - } - - if (empty($this->_wsdlFile)) { - #require_once 'Zend/Service/DeveloperGarden/Exception.php'; - throw new Zend_Service_DeveloperGarden_Exception('_wsdlFile not set for this service.'); - } - - if (!empty($this->_wsdlFileLocal)) { - $this->_wsdlFileLocal = realpath(dirname(__FILE__) . '/../' . $this->_wsdlFileLocal); - } - - if (empty($this->_wsdlFileLocal) || $this->_wsdlFileLocal === false) { - #require_once 'Zend/Service/DeveloperGarden/Exception.php'; - throw new Zend_Service_DeveloperGarden_Exception('_wsdlFileLocal not set for this service.'); - } - } - - /** - * Set an option - * - * @param string $name - * @param mixed $value - * @throws Zend_Service_DeveloperGarden_Client_Exception - * @return Zend_Service_DeveloperGarden_Client_ClientAbstract - */ - public function setOption($name, $value) - { - if (!is_string($name)) { - #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php'; - throw new Zend_Service_DeveloperGarden_Client_Exception('Incorrect option name: ' . $name); - } - $name = strtolower($name); - if (array_key_exists($name, $this->_options)) { - $this->_options[$name] = $value; - } - - return $this; - } - - /** - * get an option value from the internal options object - * - * @param string $name - * @return mixed - */ - public function getOption($name) - { - $name = strtolower($name); - if (array_key_exists($name, $this->_options)) { - return $this->_options[$name]; - } - - return null; - } - - /** - * returns the internal soap client - * if not allready exists we create an instance of - * Zend_Soap_Client - * - * @final - * @return Zend_Service_DeveloperGarden_Client_Soap - */ - final public function getSoapClient() - { - if ($this->_soapClient === null) { - /** - * init the soapClient - */ - $this->_soapClient = new Zend_Service_DeveloperGarden_Client_Soap( - $this->getWsdl(), - $this->getClientOptions() - ); - $this->_soapClient->setCredential($this->_credential); - $tokenService = new Zend_Service_DeveloperGarden_SecurityTokenServer( - array( - 'username' => $this->_credential->getUsername(), - 'password' => $this->_credential->getPassword(), - 'environment' => $this->getEnvironment(), - 'realm' => $this->_credential->getRealm(), - ) - ); - $this->_soapClient->setTokenService($tokenService); - } - - return $this->_soapClient; - } - - /** - * sets new environment - * - * @param int $environment - * @return Zend_Service_DeveloperGarden_Client_ClientAbstract - */ - public function setEnvironment($environment) - { - self::checkEnvironment($environment); - $this->_serviceEnvironment = $environment; - return $this; - } - - /** - * returns the current configured environemnt - * - * @return int - */ - public function getEnvironment() - { - return $this->_serviceEnvironment; - } - - /** - * returns the wsdl file path, a uri or the local path - * - * @return string - */ - public function getWsdl() - { - if ($this->_useLocalWsdl) { - $retVal = $this->_wsdlFileLocal; - } else { - $retVal = $this->_wsdlFile; - } - - return $retVal; - } - - /** - * switch to the local wsdl file usage - * - * @param boolen $use - * @return Zend_Service_DeveloperGarden_Client_ClientAbstract - */ - public function setUseLocalWsdl($use = true) - { - $this->_useLocalWsdl = (boolean) $use; - return $this; - } - - /** - * sets a new wsdl file - * - * @param string $wsdlFile - * @return Zend_Service_DeveloperGarden_Client_ClientAbstract - */ - public function setWsdl($wsdlFile = null) - { - if (empty($wsdlFile)) { - #require_once 'Zend/Service/DeveloperGarden/Exception.php'; - throw new Zend_Service_DeveloperGarden_Exception('_wsdlFile not set for this service.'); - } - $this->_wsdlFile = $wsdlFile; - return $this; - } - - /** - * sets a new local wsdl file - * - * @param string $wsdlFile - * @return Zend_Service_DeveloperGarden_Client_ClientAbstract - */ - public function setLocalWsdl($wsdlFile = null) - { - if (empty($wsdlFile)) { - #require_once 'Zend/Service/DeveloperGarden/Exception.php'; - throw new Zend_Service_DeveloperGarden_Exception('_wsdlFileLocal not set for this service.'); - } - $this->_wsdlFileLocal = $wsdlFile; - return $this; - } - - /** - * returns an array with configured options for this client - * - * @return array - */ - public function getClientOptions() - { - $options = array( - 'soap_version' => SOAP_1_1, - ); - if (!empty($this->_classMap)) { - $options['classmap'] = $this->_classMap; - } - $wsdlCache = Zend_Service_DeveloperGarden_SecurityTokenServer_Cache::getWsdlCache(); - if ($wsdlCache !== null) { - $options['cache_wsdl'] = $wsdlCache; - } - return $options; - } - - /** - * returns the internal credential object - * - * @return Zend_Service_DeveloperGarden_Credential - */ - public function getCredential() - { - return $this->_credential; - } - - /** - * helper method to create const arrays - * @return null - */ - static protected function _buildConstArray() - { - $r = new ReflectionClass(__CLASS__); - foreach ($r->getConstants() as $k => $v) { - $s = explode('_', $k, 2); - if (!isset(self::$_consts[$s[0]])) { - self::$_consts[$s[0]] = array(); - } - self::$_consts[$s[0]][$v] = $k; - } - } - - /** - * returns an array of all available environments - * - * @return array - */ - static public function getParticipantActions() - { - if (empty(self::$_consts)) { - self::_buildConstArray(); - } - return self::$_consts['PARTICIPANT']; - } - - /** - * checks if the given action is valid - * otherwise it @throws Zend_Service_DeveloperGarden_Exception - * - * @param int $action - * @throws Zend_Service_DeveloperGarden_Client_Exception - * @return void - */ - static public function checkParticipantAction($action) - { - if (!array_key_exists($action, self::getParticipantActions())) { - #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php'; - throw new Zend_Service_DeveloperGarden_Client_Exception( - 'Wrong Participant Action ' . $action . ' supplied.' - ); - } - } - - /** - * returns an array of all available environments - * - * @return array - */ - static public function getEnvironments() - { - if (empty(self::$_consts)) { - self::_buildConstArray(); - } - return self::$_consts['ENV']; - } - - /** - * checks if the given environemnt is valid - * otherwise it @throws Zend_Service_DeveloperGarden_Client_Exception - * - * @param int $environment - * @throws Zend_Service_DeveloperGarden_Client_Exception - * @return void - */ - static public function checkEnvironment($environment) - { - if (!array_key_exists($environment, self::getEnvironments())) { - #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php'; - throw new Zend_Service_DeveloperGarden_Client_Exception( - 'Wrong environment ' . $environment . ' supplied.' - ); - } - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Client/Exception.php b/lib/Zend/Service/DeveloperGarden/Client/Exception.php deleted file mode 100644 index f9da1bd5f69..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Client/Exception.php +++ /dev/null @@ -1,38 +0,0 @@ -_tokenService !== null) { - // if login method we addWsseLoginHeader - if (in_array('login', $arguments)) { - $this->addWsseLoginHeader(); - } elseif ($name == 'getTokens') { - $this->addWsseTokenHeader($this->_tokenService->getLoginToken()); - } else { - $this->addWsseSecurityTokenHeader($this->_tokenService->getTokens()); - } - } - return parent::__call($name, $arguments); - } - - /** - * sets the internal handling for handle token service - * - * @param Zend_Service_DeveloperGarden_SecurityTokenServer $isTokenService - * @return Zend_Service_DeveloperGarden_Client_Soap - */ - public function setTokenService(Zend_Service_DeveloperGarden_SecurityTokenServer $tokenService) - { - $this->_tokenService = $tokenService; - return $this; - } - - /** - * returns the currently configured tokenService object - * - * @return Zend_Service_DeveloperGarden_SecurityTokenServer - */ - public function getTokenService() - { - return $this->_tokenService; - } - - /** - * Sets new credential callback object - * - * @param Zend_Service_DeveloperGarden_Credential $credential - * @return Zend_Service_DeveloperGarden_Client_Soap - */ - public function setCredential(Zend_Service_DeveloperGarden_Credential $credential) - { - $this->_credential = $credential; - return $this; - } - - /** - * returns the internal credential callback object - * - * @return Zend_Service_DeveloperGarden_Credential - */ - public function getCredential() - { - return $this->_credential; - } - - /** - * creates the login header and add - * - * @return SoapHeader - */ - public function getWsseLoginHeader() - { - $dom = new DOMDocument(); - - /** - * Security Element - */ - $securityElement = $dom->createElementNS( - self::WSSE_NAMESPACE_SECEXT, - 'wsse:' . self::WSSE_SECURITY_ELEMENT - ); - $securityElement->setAttribute('mustUnderstand', true); - - /** - * Username Token Element - */ - $usernameTokenElement = $dom->createElementNS( - self::WSSE_NAMESPACE_SECEXT, - self::WSSE_ELEMENT_USERNAMETOKEN - ); - - /** - * Username Element - */ - $usernameElement = $dom->createElementNS( - self::WSSE_NAMESPACE_SECEXT, - self::WSSE_ELEMENT_USERNAME, - $this->_credential->getUsername(true) - ); - - /** - * Password Element - */ - $passwordElement = $dom->createElementNS( - self::WSSE_NAMESPACE_SECEXT, - self::WSSE_ELEMENT_PASSWORD, - $this->_credential->getPassword() - ); - $passwordElement->setAttribute('Type', self::WSSE_ELEMENT_PASSWORD_TYPE); - - $usernameTokenElement->appendChild($usernameElement); - $usernameTokenElement->appendChild($passwordElement); - - $securityElement->appendChild($usernameTokenElement); - $dom->appendChild($securityElement); - - $authSoapVar = new SoapVar( - $dom->saveXML($securityElement), - XSD_ANYXML, - self::WSSE_NAMESPACE_SECEXT, - self::WSSE_SECURITY_ELEMENT - ); - - $authSoapHeader = new SoapHeader( - self::WSSE_NAMESPACE_SECEXT, - self::WSSE_SECURITY_ELEMENT, - $authSoapVar, - true - ); - - return $authSoapHeader; - } - - /** - * creates the token auth header for direct calls - * - * @param Zend_Service_DeveloperGarden_Response_SecurityTokenServer_SecurityTokenResponse $token - * @return SoapHeader - */ - public function getWsseTokenHeader( - Zend_Service_DeveloperGarden_Response_SecurityTokenServer_SecurityTokenResponse $token - ) { - $format = '%s'; - $securityHeader = sprintf( - $format, - self::WSSE_SECURITY_ELEMENT, - self::WSSE_NAMESPACE_SECEXT, - $token->getTokenData(), - self::WSSE_SECURITY_ELEMENT - ); - - $authSoapVar = new SoapVar( - $securityHeader, - XSD_ANYXML, - self::WSSE_NAMESPACE_SECEXT, - self::WSSE_SECURITY_ELEMENT - ); - - $authSoapHeader = new SoapHeader( - self::WSSE_NAMESPACE_SECEXT, - self::WSSE_SECURITY_ELEMENT, - $authSoapVar, - true - ); - - return $authSoapHeader; - } - - /** - * creates the security token auth header for direct calls - * - * @param Zend_Service_DeveloperGarden_Response_SecurityTokenServer_SecurityTokenResponse $token - * @return SoapHeader - */ - public function getWsseSecurityTokenHeader( - Zend_Service_DeveloperGarden_Response_SecurityTokenServer_GetTokensResponse $token - ) { - $format = '%s'; - $securityHeader = sprintf( - $format, - self::WSSE_SECURITY_ELEMENT, - self::WSSE_NAMESPACE_SECEXT, - $token->getTokenData(), - self::WSSE_SECURITY_ELEMENT - ); - - $authSoapVar = new SoapVar( - $securityHeader, - XSD_ANYXML, - self::WSSE_NAMESPACE_SECEXT, - self::WSSE_SECURITY_ELEMENT - ); - - $authSoapHeader = new SoapHeader( - self::WSSE_NAMESPACE_SECEXT, - self::WSSE_SECURITY_ELEMENT, - $authSoapVar, - true - ); - - return $authSoapHeader; - } - - /** - * adds the login specific header to the client - * - * @return Zend_Service_DeveloperGarden_Client_Soap - */ - public function addWsseLoginHeader() - { - return $this->addSoapInputHeader($this->getWsseLoginHeader()); - } - - /** - * adds the earlier fetched token to the header - * - * @param Zend_Service_DeveloperGarden_Response_SecurityTokenServer_SecurityTokenResponse $token - * @return Zend_Service_DeveloperGarden_Client_Soap - */ - public function addWsseTokenHeader( - Zend_Service_DeveloperGarden_Response_SecurityTokenServer_SecurityTokenResponse $token - ) { - return $this->addSoapInputHeader($this->getWsseTokenHeader($token)); - } - - /** - * adds the earlier fetched token to the header - * - * @param Zend_Service_DeveloperGarden_Response_SecurityTokenServer_SecurityTokenResponse $token - * @return Zend_Service_DeveloperGarden_Client_Soap - */ - public function addWsseSecurityTokenHeader( - Zend_Service_DeveloperGarden_Response_SecurityTokenServer_GetTokensResponse $token - ) { - return $this->addSoapInputHeader($this->getWsseSecurityTokenHeader($token)); - } -} diff --git a/lib/Zend/Service/DeveloperGarden/ConferenceCall.php b/lib/Zend/Service/DeveloperGarden/ConferenceCall.php deleted file mode 100644 index a224bd0435c..00000000000 --- a/lib/Zend/Service/DeveloperGarden/ConferenceCall.php +++ /dev/null @@ -1,872 +0,0 @@ - 'Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail', - 'ConferenceAccStruct' => 'Zend_Service_DeveloperGarden_ConferenceCall_ConferenceAccount', - 'ScheduleStruct' => 'Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule', - 'ParticipantStruct' => 'Zend_Service_DeveloperGarden_ConferenceCall_Participant', - 'ParticipantDetailStruct' => 'Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail', - 'ParticipantStatusStruct' => 'Zend_Service_DeveloperGarden_ConferenceCall_ParticipantStatus', - - //Responses - 'CCSResponseType' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_CCSResponseType', - - //Conference - 'createConferenceResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_CreateConferenceResponse', - 'createConferenceResponseType' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_CreateConferenceResponseType', - 'removeConferenceResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_RemoveConferenceResponse', - 'commitConferenceResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_CommitConferenceResponse', - 'updateConferenceResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_UpdateConferenceResponse', - 'getConferenceStatusResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_GetConferenceStatusResponse', - 'getConferenceStatusResponseType' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_GetConferenceStatusResponseType', - 'getRunningConferenceResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_GetRunningConferenceResponse', - 'getRunningConferenceResponseType' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_GetRunningConferenceResponseType', - 'getConferenceListResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_GetConferenceListResponse', - 'getConferenceListResponseType' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_GetConferenceListResponseType', - - //Participant - 'newParticipantResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_NewParticipantResponse', - 'newParticipantResponseType' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_NewParticipantResponseType', - 'removeParticipantResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_RemoveParticipantResponse', - 'updateParticipantResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_UpdateParticipantResponse', - 'getParticipantStatusResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_GetParticipantStatusResponse', - 'getParticipantStatusResponseType' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_GetParticipantStatusResponseType', - - //Templates - 'createConferenceTemplateResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_CreateConferenceTemplateResponse', - 'createConferenceTemplateResponseType' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_CreateConferenceTemplateResponseType', - 'getConferenceTemplateResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_GetConferenceTemplateResponse', - 'getConferenceTemplateResponseType' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_GetConferenceTemplateResponseType', - 'updateConferenceTemplateResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_UpdateConferenceTemplateResponse', - 'removeConferenceTemplateResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_RemoveConferenceTemplateResponse', - 'getConferenceTemplateListResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_GetConferenceTemplateListResponse', - 'getConferenceTemplateListResponseType' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_GetConferenceTemplateListResponseType', - 'addConferenceTemplateParticipantResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_AddConferenceTemplateParticipantResponse', - 'addConferenceTemplateParticipantResponseType' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_AddConferenceTemplateParticipantResponseType', - 'getConferenceTemplateParticipantResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_GetConferenceTemplateParticipantResponse', - 'getConferenceTemplateParticipantResponseType' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_GetConferenceTemplateParticipantResponseType', - 'updateConferenceTemplateParticipantResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_UpdateConferenceTemplateParticipantResponse', - 'removeConferenceTemplateParticipantResponse' => 'Zend_Service_DeveloperGarden_Response_ConferenceCall_RemoveConferenceTemplateParticipantResponse', - ); - - /** - * creates a new conference, ownerId should be between 3 and 39 - * chars - * - * @param string $ownerId - * @param Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $conferenceDetails - * @param Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule $conferenceSchedule - * @param integer $account - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_CreateConferenceResponseType - */ - public function createConference($ownerId, - Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $conferenceDetails, - Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule $conferenceSchedule = null, - $account = null - ) { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_CreateConferenceRequest( - $this->getEnvironment(), - $ownerId, - $conferenceDetails, - $conferenceSchedule, - $account - ); - - $result = $this->getSoapClient()->createConference(array( - 'createConferenceRequest' => $request - )); - - return $result->parse(); - } - - /** - * commits the given conference - * - * @param string $conferenceId - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_CommitConferenceResponse - */ - public function commitConference($conferenceId) - { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_CommitConferenceRequest( - $this->getEnvironment(), - $conferenceId - ); - - $result = $this->getSoapClient()->commitConference(array( - 'commitConferenceRequest' => $request - )); - - return $result->parse(); - } - - /** - * updates a conference with the given parameter - * - * @param string $conferenceId - * @param string $ownerId - * @param Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $conferenceDetails - * @param Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule $conferenceSchedule - * @param string $account - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_CCSResponseType - */ - public function updateConference( - $conferenceId, - $ownerId = null, - Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $conferenceDetails = null, - Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule $conferenceSchedule = null, - $account = null - ) { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_UpdateConferenceRequest( - $this->getEnvironment(), - $conferenceId, - $ownerId, - $conferenceDetails, - $conferenceSchedule, - $account - ); - - $result = $this->getSoapClient()->updateConference(array( - 'updateConferenceRequest' => $request - )); - - return $result->parse(); - } - - /** - * get conference status details - * - * @param string $conferenceId - * @param integer $what - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_GetConferenceStatusResponseType - */ - public function getConferenceStatus($conferenceId, $what = 0) - { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceStatusRequest( - $this->getEnvironment(), - $conferenceId, - $what - ); - - $result = $this->getSoapClient()->getConferenceStatus(array( - 'getConferenceStatusRequest' => $request - )); - - return $result->parse(); - } - - /** - * returns the conferenceId of the running conference instance for a planned - * recurring conference or the current conferenceId - * - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_GetRunningConferenceResponseType - */ - public function getRunningConference($conferenceId) - { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_GetRunningConferenceRequest( - $this->getEnvironment(), - $conferenceId - ); - - $result = $this->getSoapClient()->getRunningConference(array( - 'getRunningConferenceRequest' => $request - )); - - return $result->parse(); - } - - /** - * remove a conference - * - * @param string $conferenceId - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_CCSResponseType - */ - public function removeConference($conferenceId) - { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_RemoveConferenceRequest( - $this->getEnvironment(), - $conferenceId - ); - - $result = $this->getSoapClient()->removeConference(array( - 'removeConferenceRequest' => $request - )); - - return $result->parse(); - } - - /** - * returns a list of conferences - * - * @param integer $what - * @param string $ownerId - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_GetConferenceListResponseType - */ - public function getConferenceList($what = 0, $ownerId = null) - { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceListRequest( - $this->getEnvironment(), - $what, - $ownerId - ); - - $result = $this->getSoapClient()->getConferenceList(array( - 'getConferenceListRequest' => $request - )); - - return $result->parse(); - } - - /** - * adds a new participant to the given conference - * - * @param string $conferenceId - * @param Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_NewParticipantResponseType - */ - public function newParticipant( - $conferenceId, - Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant - ) { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_NewParticipantRequest( - $this->getEnvironment(), - $conferenceId, - $participant - ); - - $result = $this->getSoapClient()->newParticipant(array( - 'newParticipantRequest' => $request - )); - - return $result->parse(); - } - - /** - * fetches the participant details for the given conferenceId - * - * @param string $conferenceId - * @param string $participantId - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_GetParticipantStatusResponseType - */ - public function getParticipantStatus($conferenceId, $participantId) - { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_GetParticipantStatusRequest( - $this->getEnvironment(), - $conferenceId, - $participantId - ); - - $result = $this->getSoapClient()->getParticipantStatus(array( - 'getParticipantStatusRequest' => $request - )); - - return $result->parse(); - } - - /** - * removes the given participant from the conference - * - * @param string $conferenceId - * @param string $participantId - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_CCSResponseType - */ - public function removeParticipant($conferenceId, $participantId) - { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_RemoveParticipantRequest( - $this->getEnvironment(), - $conferenceId, - $participantId - ); - - $result = $this->getSoapClient()->removeParticipant(array( - 'removeParticipantRequest' => $request - )); - - return $result->parse(); - } - - /** - * updates the participant in the given conference - * - * @param string $conferenceId - * @param string $participantId - * @param integer $action - * @param Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_CCSResponseType - */ - public function updateParticipant( - $conferenceId, - $participantId, - $action = null, - Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant = null - ) { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_UpdateParticipantRequest( - $this->getEnvironment(), - $conferenceId, - $participantId, - $action, - $participant - ); - - $result = $this->getSoapClient()->updateParticipant(array( - 'updateParticipantRequest' => $request - )); - - return $result->parse(); - } - - /** - * creates a new conference template - * - * @param string $ownerId - * @param Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $conferenceDetails - * @param array $participants - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_CreateConferenceTemplateResponseType - */ - public function createConferenceTemplate( - $ownerId, - Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $conferenceDetails, - array $participants = null - ) { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_CreateConferenceTemplateRequest( - $this->getEnvironment(), - $ownerId, - $conferenceDetails, - $participants - ); - - $result = $this->getSoapClient()->createConferenceTemplate(array( - 'createConferenceTemplateRequest' => $request - )); - - return $result->parse(); - } - - /** - * get a specific template - * - * @param string $templateId - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_GetConferenceTemplateResponseType - */ - public function getConferenceTemplate($templateId) - { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceTemplateRequest( - $this->getEnvironment(), - $templateId - ); - - $result = $this->getSoapClient()->getConferenceTemplate(array( - 'getConferenceTemplateRequest' => $request - )); - - return $result->parse(); - } - - /** - * updates a conference template - * - * @param string $templateId - * @param string $initiatorId - * @param Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $conferenceDetails - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_CCSResponseType - */ - public function updateConferenceTemplate( - $templateId, - $initiatorId = null, - Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $conferenceDetails = null - ) { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_UpdateConferenceTemplateRequest( - $this->getEnvironment(), - $templateId, - $initiatorId, - $conferenceDetails - ); - - $result = $this->getSoapClient()->updateConferenceTemplate(array( - 'updateConferenceTemplateRequest' => $request - )); - - return $result->parse(); - } - - /** - * remove a conference template - * - * @param string $templateId - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_CCSResponseType - */ - public function removeConferenceTemplate($templateId) - { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_RemoveConferenceTemplateRequest( - $this->getEnvironment(), - $templateId - ); - - $result = $this->getSoapClient()->removeConferenceTemplate(array( - 'removeConferenceTemplateRequest' => $request - )); - - return $result->parse(); - } - - /** - * lists all available conference templates for the given owner - * - * @param string $ownerId - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_GetConferenceTemplateListResponseType - */ - public function getConferenceTemplateList($ownerId) - { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceTemplateListRequest( - $this->getEnvironment(), - $ownerId - ); - - $result = $this->getSoapClient()->getConferenceTemplateList(array( - 'getConferenceTemplateListRequest' => $request - )); - - return $result->parse(); - } - - /** - * adds a new participants to the template - * - * @param string $templateId - * @param Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_AddConferenceTemplateParticipantResponseType - */ - public function addConferenceTemplateParticipant( - $templateId, - Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant - ) { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_AddConferenceTemplateParticipantRequest( - $this->getEnvironment(), - $templateId, - $participant - ); - - $result = $this->getSoapClient()->addConferenceTemplateParticipant(array( - 'addConferenceTemplateParticipantRequest' => $request - )); - - return $result->parse(); - } - - /** - * returns a praticipant for the given templateId - * - * @param string $templateId - * @param string $participantId - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_GetConferenceTemplateParticipantResponseType - */ - public function getConferenceTemplateParticipant($templateId, $participantId) - { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceTemplateParticipantRequest( - $this->getEnvironment(), - $templateId, - $participantId - ); - - $result = $this->getSoapClient()->getConferenceTemplateParticipant(array( - 'getConferenceTemplateParticipantRequest' => $request - )); - - return $result->parse(); - } - - /** - * updates the participants details - * - * @param string $templateId - * @param string $participantId - * @param Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_CCSResponseType - */ - public function updateConferenceTemplateParticipant( - $templateId, - $participantId, - Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant - ) { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_UpdateConferenceTemplateParticipantRequest( - $this->getEnvironment(), - $templateId, - $participantId, - $participant - ); - - $result = $this->getSoapClient()->updateConferenceTemplateParticipant(array( - 'updateConferenceTemplateParticipantRequest' => $request - )); - - return $result->parse(); - } - - /** - * removes a praticipant from the given templateId - * - * @param string $templateId - * @param string $participantId - * @return Zend_Service_DeveloperGarden_Response_ConferenceCall_CCSResponseType - */ - public function removeConferenceTemplateParticipant($templateId, $participantId) - { - $request = new Zend_Service_DeveloperGarden_Request_ConferenceCall_RemoveConferenceTemplateParticipantRequest( - $this->getEnvironment(), - $templateId, - $participantId - ); - - $result = $this->getSoapClient()->removeConferenceTemplateParticipant(array( - 'removeConferenceTemplateParticipantRequest' => $request - )); - - return $result->parse(); - } -} diff --git a/lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceAccount.php b/lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceAccount.php deleted file mode 100644 index 052c1c28a40..00000000000 --- a/lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceAccount.php +++ /dev/null @@ -1,62 +0,0 @@ -account; - } - - /** - * @return string - */ - public function getBillingType() - { - return $this->billingtype; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceDetail.php b/lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceDetail.php deleted file mode 100644 index 314cce5246a..00000000000 --- a/lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceDetail.php +++ /dev/null @@ -1,129 +0,0 @@ -setName($name); - $this->setDescription($description); - $this->setDuration($duration); - } - - /** - * sets new duration for this conference in seconds - * - * @param integer $duration - * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail - */ - public function setDuration($duration) - { - $this->duration = $duration; - return $this; - } - - /** - * @return string - */ - public function getDuration() - { - return $this->duration; - } - - /** - * set the description of this conference - * - * @param string $description the $description to set - * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } - - /** - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * sets the name of this conference - * - * @param string $name - * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail - */ - public function setName($name) - { - $this->name = $name; - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceSchedule.php b/lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceSchedule.php deleted file mode 100644 index fec7531cf9d..00000000000 --- a/lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceSchedule.php +++ /dev/null @@ -1,262 +0,0 @@ - 'no recurring', - 1 => 'hourly', - 2 => 'daily', - 3 => 'weekly', - 4 => 'monthly', - ); - - /** - * constructor for schedule object, all times are in UTC - * - * @param integer $minute - * @param integer $hour - * @param integer $dayOfMonth - * @param integer $month - * @param integer $year - * @param integer $recurring - * @param integer $notify - */ - public function __construct($minute, $hour, $dayOfMonth, $month, $year, $recurring = 0, $notify = 0) - { - $this->setMinute($minute) - ->setHour($hour) - ->setDayOfMonth($dayOfMonth) - ->setMonth($month) - ->setYear($year) - ->setRecurring($recurring) - ->setNotify($notify); - } - - /** - * returns the value of $minute - * - * @return integer - */ - public function getMinute() - { - return $this->minute; - } - - /** - * sets $minute - * - * @param integer $minute - * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule - */ - public function setMinute($minute) - { - $this->minute = $minute; - return $this; - } - - /** - * returns the value of $hour - * - * @return integer - */ - public function getHour() - { - return $this->hour; - } - - /** - * sets $hour - * - * @param integer $hour - * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule - */ - public function setHour($hour) - { - $this->hour = $hour; - return $this; - } - - /** - * returns the value of $dayOfMonth - * - * @return integer - */ - public function getDayOfMonth() - { - return $this->dayOfMonth; - } - - /** - * sets $dayOfMonth - * - * @param integer $dayOfMonth - * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule - */ - public function setDayOfMonth($dayOfMonth) - { - $this->dayOfMonth = $dayOfMonth; - return $this; - } - - /** - * returns the value of $month - * - * @return integer - */ - public function getMonth() - { - return $this->month; - } - - /** - * sets $month - * - * @param integer $month - * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule - */ - public function setMonth($month) - { - $this->month = $month; - return $this; - } - - /** - * returns the value of $year - * - * @return integer - */ - public function getYear() - { - return $this->year; - } - - /** - * sets $year - * - * @param integer $year - * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule - */ - public function setYear($year) - { - $this->year = $year; - return $this; - } - - /** - * returns the value of $recurring - * - * @return integer - */ - public function getRecurring() - { - return $this->recurring; - } - - /** - * sets $recurring - * - * @param integer $recurring - * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule - */ - public function setRecurring($recurring) - { - if (!array_key_exists($recurring, $this->_recurringValues)) { - #require_once 'Zend/Service/DeveloperGarden/ConferenceCall/Exception.php'; - throw new Zend_Service_DeveloperGarden_ConferenceCall_Exception( - 'Unknown ConferenceCall recurring mode.' - ); - } - $this->recurring = $recurring; - return $this; - } - - /** - * returns the value of $notify - * - * @return integer - */ - public function getNotify() - { - return $this->notify; - } - - /** - * sets $notify - * - * @param integer $notify - * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule - */ - public function setNotify($notify) - { - $this->notify = $notify; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/ConferenceCall/Exception.php b/lib/Zend/Service/DeveloperGarden/ConferenceCall/Exception.php deleted file mode 100644 index f84e3184dd5..00000000000 --- a/lib/Zend/Service/DeveloperGarden/ConferenceCall/Exception.php +++ /dev/null @@ -1,38 +0,0 @@ -detail; - } - - /** - * participant id - * - * @return string - */ - public function getParticipantId() - { - return $this->participantId; - } - - /** - * get the status - * returns an - * array of Zend_Service_DeveloperGarden_ConferenceCall_ParticipantStatus - * - * @return array - */ - public function getStatus() - { - return $this->status; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantDetail.php b/lib/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantDetail.php deleted file mode 100644 index 52e0d043c8c..00000000000 --- a/lib/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantDetail.php +++ /dev/null @@ -1,195 +0,0 @@ -setFirstName($firstName) - ->setLastName($lastName) - ->setNumber($number) - ->setEmail($email) - ->setFlags((int) $isInitiator); - } - - /** - * returns the value of $firstName - * - * @return string - */ - public function getFirstName() - { - return $this->firstName; - } - - /** - * sets $firstName - * - * @param string $firstName - * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail - */ - public function setFirstName($firstName) - { - $this->firstName = $firstName; - return $this; - } - - /** - * returns the value of $lastName - * - * @return string - */ - public function getLastName() - { - return $this->lastName; - } - - /** - * sets $lastName - * - * @param string $lastName - * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail - */ - public function setLastName($lastName) - { - $this->lastName = $lastName; - return $this; - } - - /** - * returns the value of $number - * - * @return string - */ - public function getNumber() - { - return $this->number; - } - - /** - * sets $number - * - * @param string $number - * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } - - /** - * returns the value of $email - * - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * sets $email - * - * @param string email - * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail - */ - public function setEmail($email) - { - $validator = new Zend_Validate_EmailAddress(); - - if (!$validator->isValid($email)) { - #require_once 'Zend/Service/DeveloperGarden/Exception.php'; - throw new Zend_Service_DeveloperGarden_Exception('Not a valid e-mail address.'); - } - $this->email = $email; - return $this; - } - - /** - * returns the value of $flags - * - * @return integer - */ - public function getFlags() - { - return $this->flags; - } - - /** - * sets $flags (ie, initiator flag) - * - * @param integer $flags - * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail - */ - public function setFlags($flags) - { - $this->flags = $flags; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantStatus.php b/lib/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantStatus.php deleted file mode 100644 index 5d55113d010..00000000000 --- a/lib/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantStatus.php +++ /dev/null @@ -1,103 +0,0 @@ -setName($name) - ->setValue($value); - } - - /** - * returns the value of $name - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * sets $name - * - * @param string $name - * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantStatus - */ - public function setName($name) - { - $this->name = $name; - return $this; - } - - /** - * returns the value of $value - * - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * sets $value - * - * @param string $value - * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantStatus - */ - public function setValue($value = null) - { - $this->value = $value; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Credential.php b/lib/Zend/Service/DeveloperGarden/Credential.php deleted file mode 100644 index f42d099e01a..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Credential.php +++ /dev/null @@ -1,186 +0,0 @@ -setUsername($username); - } - if (!empty($password)) { - $this->setPassword($password); - } - if (!empty($realm)) { - $this->setRealm($realm); - } - } - - /** - * split the password into an array - * - * @param string $password - * @throws Zend_Service_DeveloperGarden_Client_Exception - * @return Zend_Service_DeveloperGarden_Client_ClientAbstract - */ - public function setPassword($password = null) - { - if (empty($password)) { - #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php'; - throw new Zend_Service_DeveloperGarden_Client_Exception('Empty password not permitted.'); - } - - if (!is_string($password)) { - #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php'; - throw new Zend_Service_DeveloperGarden_Client_Exception('Password must be a string.'); - } - - $this->_password = $password; - return $this; - } - - /** - * returns the current configured password - * - * @return string - */ - public function getPassword() - { - return $this->_password; - } - - /** - * set the new login - * - * @param string $username - * @throws Zend_Service_DeveloperGarden_Client_Exception - * @return Zend_Service_DeveloperGarden_Client_ClientAbstract - */ - public function setUsername($username = null) - { - if (empty($username)) { - #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php'; - throw new Zend_Service_DeveloperGarden_Client_Exception('Empty username not permitted.'); - } - - if (!is_string($username)) { - #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php'; - throw new Zend_Service_DeveloperGarden_Client_Exception('Username must be a string.'); - } - - $this->_username = $username; - return $this; - } - - /** - * returns the username - * - * if $withRealm == true we combine username and realm like - * username@realm - * - * @param bool $withRealm - * @return string|null - */ - public function getUsername($withRealm = false) - { - $retValue = $this->_username; - if ($withRealm) { - $retValue = sprintf( - '%s@%s', - $this->_username, - $this->_realm - ); - } - return $retValue; - } - - /** - * set the new realm - * - * @param string $realm - * @throws Zend_Service_DeveloperGarden_Client_Exception - * @return Zend_Service_DeveloperGarden_Client_ClientAbstract - */ - public function setRealm($realm = null) - { - if (empty($realm)) { - #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php'; - throw new Zend_Service_DeveloperGarden_Client_Exception('Empty realm not permitted.'); - } - - if (!is_string($realm)) { - #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php'; - throw new Zend_Service_DeveloperGarden_Client_Exception('Realm must be a string.'); - } - - $this->_realm = $realm; - return $this; - } - - /** - * returns the realm - * - * @return string|null - */ - public function getRealm() - { - return $this->_realm; - } -} - diff --git a/lib/Zend/Service/DeveloperGarden/Exception.php b/lib/Zend/Service/DeveloperGarden/Exception.php deleted file mode 100644 index a8b4f226e56..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Exception.php +++ /dev/null @@ -1,38 +0,0 @@ - 'Zend_Service_DeveloperGarden_Response_IpLocation_LocateIPResponseType', - 'IPAddressLocationType' => 'Zend_Service_DeveloperGarden_Response_IpLocation_IPAddressLocationType', - 'RegionType' => 'Zend_Service_DeveloperGarden_Response_IpLocation_RegionType', - 'GeoCoordinatesType' => 'Zend_Service_DeveloperGarden_Response_IpLocation_GeoCoordinatesType', - 'CityType' => 'Zend_Service_DeveloperGarden_Response_IpLocation_CityType', - ); - - /** - * locate the given Ip address or array of addresses - * - * @param Zend_Service_DeveloperGarden_IpLocation_IpAddress|string $ip - * @return Zend_Service_DeveloperGarden_Response_IpLocation_LocateIPResponse - */ - public function locateIP($ip) - { - $request = new Zend_Service_DeveloperGarden_Request_IpLocation_LocateIPRequest( - $this->getEnvironment(), - $ip - ); - - $result = $this->getSoapClient()->locateIP($request); - - $response = new Zend_Service_DeveloperGarden_Response_IpLocation_LocateIPResponse($result); - return $response->parse(); - } -} diff --git a/lib/Zend/Service/DeveloperGarden/IpLocation/IpAddress.php b/lib/Zend/Service/DeveloperGarden/IpLocation/IpAddress.php deleted file mode 100644 index 61b49115e69..00000000000 --- a/lib/Zend/Service/DeveloperGarden/IpLocation/IpAddress.php +++ /dev/null @@ -1,130 +0,0 @@ -setIp($ip) - ->setVersion($version); - } - - /** - * sets new ip address - * - * @param string $ip - * @throws Zend_Service_DeveloperGarden_Exception - * @return Zend_Service_DeveloperGarden_IpLocation_IpAddress - */ - public function setIp($ip) - { - $validator = new Zend_Validate_Ip(); - - if (!$validator->isValid($ip)) { - $message = $validator->getMessages(); - #require_once 'Zend/Service/DeveloperGarden/Exception.php'; - throw new Zend_Service_DeveloperGarden_Exception($message['notIpAddress']); - } - $this->_address = $ip; - return $this; - } - - /** - * returns the current address - * - * @return string - */ - public function getIp() - { - return $this->_address; - } - - /** - * sets new ip version - * - * @param integer $version - * @throws Zend_Service_DeveloperGarden_Exception - * @return Zend_Service_DeveloperGarden_IpLocation_IpAddress - */ - public function setVersion($version) - { - if (!in_array($version, $this->_versionSupported)) { - #require_once 'Zend/Service/DeveloperGarden/Exception.php'; - throw new Zend_Service_DeveloperGarden_Exception('Ip Version ' . (int)$version . ' is not supported.'); - } - - $this->_version = $version; - return $this; - } - - /** - * returns the ip version - * - * @return integer - */ - public function getVersion() - { - return $this->_version; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/LocalSearch.php b/lib/Zend/Service/DeveloperGarden/LocalSearch.php deleted file mode 100644 index 3000f626519..00000000000 --- a/lib/Zend/Service/DeveloperGarden/LocalSearch.php +++ /dev/null @@ -1,105 +0,0 @@ - 'Zend_Service_DeveloperGarden_Response_LocalSearch_LocalSearchResponseType' - ); - - /** - * localSearch with the given parameters - * - * @param Zend_Service_DeveloperGarden_LocalSearch_SearchParameters $searchParameters - * @param integer $account - * @return Zend_Service_DeveloperGarden_Response_LocalSearch_LocalSearchResponseType - */ - public function localSearch( - Zend_Service_DeveloperGarden_LocalSearch_SearchParameters $searchParameters, - $account = null - ) { - $request = new Zend_Service_DeveloperGarden_Request_LocalSearch_LocalSearchRequest( - $this->getEnvironment(), - $searchParameters, - $account - ); - - $result = $this->getSoapClient()->localSearch($request); - - $response = new Zend_Service_DeveloperGarden_Response_LocalSearch_LocalSearchResponse($result); - return $response->parse(); - } -} diff --git a/lib/Zend/Service/DeveloperGarden/LocalSearch/Exception.php b/lib/Zend/Service/DeveloperGarden/LocalSearch/Exception.php deleted file mode 100644 index 2a5296b426e..00000000000 --- a/lib/Zend/Service/DeveloperGarden/LocalSearch/Exception.php +++ /dev/null @@ -1,38 +0,0 @@ - null, - 'dymwhat' => null, - 'dymrelated' => null, - 'hits' => null, - 'collapse' => null, - 'where' => null, - 'dywhere' => null, - 'radius' => null, - 'lx' => null, - 'ly' => null, - 'rx' => null, - 'ry' => null, - 'transformgeocode' => null, - 'sort' => null, - 'spatial' => null, - 'sepcomm' => null, - 'filter' => null, // can be ONLINER or OFFLINER - 'openingtime' => null, // can be now or HH::MM - 'kategorie' => null, // @see http://www.suchen.de/kategorie-katalog - 'site' => null, - 'typ' => null, - 'name' => null, - 'page' => null, - 'city' => null, - 'plz' => null, - 'strasse' => null, - 'bundesland' => null, - ); - - /** - * possible collapse values - * - * @var array - */ - private $_possibleCollapseValues = array( - true, - false, - 'ADDRESS_COMPANY', - 'DOMAIN' - ); - - /** - * sets a new search word - * alias for setWhat - * - * @param string $searchValue - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setSearchValue($searchValue) - { - return $this->setWhat($searchValue); - } - - /** - * sets a new search word - * - * @param string $searchValue - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setWhat($searchValue) - { - $this->_parameters['what'] = $searchValue; - return $this; - } - - /** - * enable the did you mean what feature - * - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function enableDidYouMeanWhat() - { - $this->_parameters['dymwhat'] = 'true'; - return $this; - } - - /** - * disable the did you mean what feature - * - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function disableDidYouMeanWhat() - { - $this->_parameters['dymwhat'] = 'false'; - return $this; - } - - /** - * enable the did you mean where feature - * - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function enableDidYouMeanWhere() - { - $this->_parameters['dymwhere'] = 'true'; - return $this; - } - - /** - * disable the did you mean where feature - * - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function disableDidYouMeanWhere() - { - $this->_parameters['dymwhere'] = 'false'; - return $this; - } - - /** - * enable did you mean related, if true Kihno will be corrected to Kino - * - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function enableDidYouMeanRelated() - { - $this->_parameters['dymrelated'] = 'true'; - return $this; - } - - /** - * diable did you mean related, if false Kihno will not be corrected to Kino - * - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function disableDidYouMeanRelated() - { - $this->_parameters['dymrelated'] = 'true'; - return $this; - } - - /** - * set the max result hits for this search - * - * @param integer $hits - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setHits($hits = 10) - { - #require_once 'Zend/Validate/Between.php'; - $validator = new Zend_Validate_Between(0, 1000); - if (!$validator->isValid($hits)) { - $message = $validator->getMessages(); - #require_once 'Zend/Service/DeveloperGarden/LocalSearch/Exception.php'; - throw new Zend_Service_DeveloperGarden_LocalSearch_Exception(current($message)); - } - $this->_parameters['hits'] = $hits; - return $this; - } - - /** - * If true, addresses will be collapsed for a single domain, common values - * are: - * ADDRESS_COMPANY – to collapse by address - * DOMAIN – to collapse by domain (same like collapse=true) - * false - * - * @param mixed $value - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setCollapse($value) - { - if (!in_array($value, $this->_possibleCollapseValues, true)) { - #require_once 'Zend/Service/DeveloperGarden/LocalSearch/Exception.php'; - throw new Zend_Service_DeveloperGarden_LocalSearch_Exception('Not a valid value provided.'); - } - $this->_parameters['collapse'] = $value; - return $this; - } - - /** - * set a specific search location - * examples: - * +47°54’53.10”, 11° 10’ 56.76” - * 47°54’53.10;11°10’56.76” - * 47.914750,11.182533 - * +47.914750 ; +11.1824 - * Darmstadt - * Berlin - * - * @param string $where - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setWhere($where) - { - #require_once 'Zend/Validate/NotEmpty.php'; - - $validator = new Zend_Validate_NotEmpty(); - if (!$validator->isValid($where)) { - $message = $validator->getMessages(); - #require_once 'Zend/Service/DeveloperGarden/LocalSearch/Exception.php'; - throw new Zend_Service_DeveloperGarden_LocalSearch_Exception(current($message)); - } - $this->_parameters['where'] = $where; - return $this; - } - - /** - * returns the defined search location (ie city, country) - * - * @return string - */ - public function getWhere() - { - return $this->_parameters['where']; - } - - /** - * enable the spatial search feature - * - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function enableSpatial() - { - $this->_parameters['spatial'] = 'true'; - return $this; - } - - /** - * disable the spatial search feature - * - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function disableSpatial() - { - $this->_parameters['spatial'] = 'false'; - return $this; - } - - /** - * sets spatial and the given radius for a circle search - * - * @param integer $radius - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setRadius($radius) - { - #require_once 'Zend/Validate/Int.php'; - - $validator = new Zend_Validate_Int(); - if (!$validator->isValid($radius)) { - $message = $validator->getMessages(); - #require_once 'Zend/Service/DeveloperGarden/LocalSearch/Exception.php'; - throw new Zend_Service_DeveloperGarden_LocalSearch_Exception(current($message)); - } - $this->_parameters['radius'] = $radius; - $this->_parameters['transformgeocode'] = 'false'; - - return $this; - } - - /** - * sets the values for a rectangle search - * lx = longitude left top - * ly = latitude left top - * rx = longitude right bottom - * ry = latitude right bottom - * - * @param float $lx - * @param float $ly - * @param float $rx - * @param float $ry - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setRectangle($lx, $ly, $rx, $ry) - { - $this->_parameters['lx'] = $lx; - $this->_parameters['ly'] = $ly; - $this->_parameters['rx'] = $rx; - $this->_parameters['ry'] = $ry; - - return $this; - } - - /** - * if set, the service returns the zipcode for the result - * - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setTransformGeoCode() - { - $this->_parameters['transformgeocode'] = 'true'; - $this->_parameters['radius'] = null; - - return $this; - } - - /** - * sets the sort value - * possible values are: 'relevance' and 'distance' (only with spatial enabled) - * - * @param string $sort - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setSort($sort) - { - if (!in_array($sort, array('relevance', 'distance'))) { - #require_once 'Zend/Service/DeveloperGarden/LocalSearch/Exception.php'; - throw new Zend_Service_DeveloperGarden_LocalSearch_Exception('Not a valid sort value provided.'); - } - - $this->_parameters['sort'] = $sort; - return $this; - } - - /** - * enable the separation of phone numbers - * - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function enablePhoneSeparation() - { - $this->_parameters['sepcomm'] = 'true'; - return $this; - } - - /** - * disable the separation of phone numbers - * - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function disablePhoneSeparation() - { - $this->_parameters['sepcomm'] = 'true'; - return $this; - } - - /** - * if this filter is set, only results with a website are returned - * - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setFilterOnliner() - { - $this->_parameters['filter'] = 'ONLINER'; - return $this; - } - - /** - * if this filter is set, only results without a website are returned - * - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setFilterOffliner() - { - $this->_parameters['filter'] = 'OFFLINER'; - return $this; - } - - - /** - * removes the filter value - * - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function disableFilter() - { - $this->_parameters['filter'] = null; - return $this; - } - - /** - * set a filter to get just results who are open at the given time - * possible values: - * now = open right now - * HH:MM = at the given time (ie 20:00) - * - * @param string $time - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setOpeningTime($time = null) - { - $this->_parameters['openingtime'] = $time; - return $this; - } - - /** - * sets a category filter - * - * @see http://www.suchen.de/kategorie-katalog - * @param string $category - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setCategory($category = null) - { - $this->_parameters['kategorie'] = $category; - return $this; - } - - /** - * sets the site filter - * ie: www.developergarden.com - * - * @param string $site - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setSite($site) - { - $this->_parameters['site'] = $site; - return $this; - } - - /** - * sets a filter to the given document type - * ie: pdf, html - * - * @param string $type - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setDocumentType($type) - { - $this->_parameters['typ'] = $type; - return $this; - } - - /** - * sets a filter for the company name - * ie: Deutsche Telekom - * - * @param string $name - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setName($name) - { - $this->_parameters['name'] = $name; - return $this; - } - - /** - * sets a filter for the zip code - * - * @param string $zip - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setZipCode($zip) - { - $this->_parameters['plz'] = $zip; - return $this; - } - - /** - * sets a filter for the street - * - * @param string $street - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setStreet($street) - { - $this->_parameters['strasse'] = $street; - return $this; - } - - /** - * sets a filter for the county - * - * @param string $county - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function setCounty($county) - { - $this->_parameters['bundesland'] = $county; - return $this; - } - - /** - * sets a raw parameter with the value - * - * @param string $key - * @param mixed $value - * @return unknown_type - */ - public function setRawParameter($key, $value) - { - $this->_parameters[$key] = $value; - return $this; - } - - /** - * returns the parameters as an array - * - * @return array - */ - public function getSearchParameters() - { - $retVal = array(); - foreach ($this->_parameters as $key => $value) { - if ($value === null) { - continue; - } - $param = array( - 'parameter' => $key, - 'value' => $value - ); - $retVal[] = $param; - } - return $retVal; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/BaseUserService/ChangeQuotaPool.php b/lib/Zend/Service/DeveloperGarden/Request/BaseUserService/ChangeQuotaPool.php deleted file mode 100644 index c44dffcd5bc..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/BaseUserService/ChangeQuotaPool.php +++ /dev/null @@ -1,103 +0,0 @@ -= 0 to set new user quota - * - * @var integer - */ - public $quotaMax = 0; - - /** - * constructor give them the module id - * - * @param string $moduleId - * @param integer $quotaMax - * @return Zend_Service_Developergarde_Request_ChangeQuotaPool - */ - public function __construct($moduleId = null, $quotaMax = 0) - { - $this->setModuleId($moduleId) - ->setQuotaMax($quotaMax); - } - - /** - * sets a new moduleId - * - * @param integer $moduleId - * @return Zend_Service_Developergarde_Request_ChangeQuotaPool - */ - public function setModuleId($moduleId = null) - { - $this->moduleId = $moduleId; - return $this; - } - - /** - * returns the moduleId - * - * @return string - */ - public function getModuleId() - { - return $this->moduleId; - } - - /** - * sets new QuotaMax value - * - * @param integer $quotaMax - * @return Zend_Service_Developergarde_Request_ChangeQuotaPool - */ - public function setQuotaMax($quotaMax = 0) - { - $this->quotaMax = $quotaMax; - return $this; - } - - /** - * returns the quotaMax value - * - * @return integer - */ - public function getQuotaMax() - { - return $this->quotaMax; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/BaseUserService/GetAccountBalance.php b/lib/Zend/Service/DeveloperGarden/Request/BaseUserService/GetAccountBalance.php deleted file mode 100644 index 3c545c028cb..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/BaseUserService/GetAccountBalance.php +++ /dev/null @@ -1,72 +0,0 @@ -setAccount($Account); - } - - /** - * sets a new Account array - * - * @param array $Account - * @return Zend_Service_DeveloperGarden_Request_BaseUserService - */ - public function setAccount(array $Account = array()) - { - $this->Account = $Account; - return $this; - } - - /** - * returns the moduleId - * - * @return string - */ - public function getAccount() - { - return $this->Account; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/BaseUserService/GetQuotaInformation.php b/lib/Zend/Service/DeveloperGarden/Request/BaseUserService/GetQuotaInformation.php deleted file mode 100644 index 5e2e8acbe75..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/BaseUserService/GetQuotaInformation.php +++ /dev/null @@ -1,72 +0,0 @@ -setModuleId($moduleId); - } - - /** - * sets a new moduleId - * - * @param integer $moduleId - * @return Zend_Service_DeveloperGarden_Request_BaseUserService - */ - public function setModuleId($moduleId = null) - { - $this->moduleId = $moduleId; - return $this; - } - - /** - * returns the moduleId - * - * @return string - */ - public function getModuleId() - { - return $this->moduleId; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/AddConferenceTemplateParticipantRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/AddConferenceTemplateParticipantRequest.php deleted file mode 100644 index 01e5482da08..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/AddConferenceTemplateParticipantRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -setTemplateId($templateId) - ->setParticipant($participant); - } - - /** - * set the template id - * - * @param string $templateId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_AddConferenceTemplateParticipantRequest - */ - public function setTemplateId($templateId) - { - $this->templateId = $templateId; - return $this; - } - - /** - * sets new participant - * - * @param Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_AddConferenceTemplateParticipantRequest - */ - public function setParticipant(Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant) - { - $this->participant = $participant; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CommitConferenceRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CommitConferenceRequest.php deleted file mode 100644 index 8c3efae1f2f..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CommitConferenceRequest.php +++ /dev/null @@ -1,69 +0,0 @@ -setConferenceId($conferenceId); - } - - /** - * set the conference id - * - * @param string $conferenceId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_CommitConferenceRequest - */ - public function setConferenceId($conferenceId) - { - $this->conferenceId = $conferenceId; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceRequest.php deleted file mode 100644 index fee9ce9a094..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -setOwnerId($ownerId) - ->setDetail($conferenceDetails) - ->setSchedule($conferenceSchedule) - ->setAccount($account); - } - - /** - * sets $schedule - * - * @param Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule $schedule - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_CreateConferenceRequest - */ - public function setSchedule( - Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule $schedule = null - ) { - $this->schedule = $schedule; - return $this; - } - - /** - * sets $detail - * - * @param Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $detail - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_CreateConferenceRequest - */ - public function setDetail(Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $detail) - { - $this->detail = $detail; - return $this; - } - - /** - * sets $ownerId - * - * @param string $ownerId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_CreateConferenceRequest - */ - public function setOwnerId($ownerId) - { - $this->ownerId = $ownerId; - return $this; - } - - /** - * sets $account - * - * @param int $account - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_CreateConferenceRequest - */ - public function setAccount($account = null) - { - $this->account = $account; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceTemplateRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceTemplateRequest.php deleted file mode 100644 index 4ad6f37a1d5..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceTemplateRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -setOwnerId($ownerId) - ->setDetail($conferenceDetails) - ->setParticipants($conferenceParticipants); - } - - /** - * sets $participants - * - * @param array $participants - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_CreateConferenceTemplateRequest - */ - public function setParticipants(array $participants = null) - { - $this->participants = $participants; - return $this; - } - - /** - * sets $detail - * - * @param Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $detail - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_CreateConferenceTemplateRequest - */ - public function setDetail(Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $detail) - { - $this->detail = $detail; - return $this; - } - - /** - * sets $ownerId - * - * @param string $ownerId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_CreateConferenceTemplateRequest - */ - public function setOwnerId($ownerId) - { - $this->ownerId = $ownerId; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceListRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceListRequest.php deleted file mode 100644 index 89a7ee9145e..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceListRequest.php +++ /dev/null @@ -1,104 +0,0 @@ - 'all conferences', - 1 => 'just ad-hoc conferences', - 2 => 'just planned conferences', - 3 => 'just failed conferences', - ); - - /** - * unique owner id - * - * @var string - */ - public $ownerId = null; - - /** - * constructor - * - * @param integer $environment - * @param integer $what - * @param string $ownerId - */ - public function __construct($environment, $what = 0, $ownerId = null) - { - parent::__construct($environment); - $this->setWhat($what) - ->setOwnerId($ownerId); - } - - /** - * sets $what - * - * @param integer $what - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceListRequest - */ - public function setWhat($what) - { - if (!array_key_exists($what, $this->_whatValues)) { - #require_once 'Zend/Service/DeveloperGarden/Request/Exception.php'; - throw new Zend_Service_DeveloperGarden_Request_Exception('What value not allowed.'); - } - $this->what = $what; - return $this; - } - - /** - * sets $ownerId - * - * @param int $ownerId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceListRequest - */ - public function setOwnerId($ownerId) - { - $this->ownerId = $ownerId; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceStatusRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceStatusRequest.php deleted file mode 100644 index 06f18beb50d..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceStatusRequest.php +++ /dev/null @@ -1,106 +0,0 @@ - 'all conferences', - 1 => 'just detail, acc and startTime', - 2 => 'just participants', - 3 => 'just schedule', - ); - - /** - * constructor - * - * @param integer $environment - * @param string $conferenceId - * @param integer $what - */ - public function __construct($environment, $conferenceId, $what) - { - parent::__construct($environment); - $this->setConferenceId($conferenceId) - ->setWhat($what); - } - - /** - * set the conference id - * - * @param string $conferenceId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceStatusRequest - */ - public function setConferenceId($conferenceId) - { - $this->conferenceId = $conferenceId; - return $this; - } - - /** - * sets $what - * - * @param integer $what - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceStatusRequest - */ - public function setWhat($what) - { - if (!array_key_exists($what, $this->_whatValues)) { - #require_once 'Zend/Service/DeveloperGarden/Request/Exception.php'; - throw new Zend_Service_DeveloperGarden_Request_Exception('What value not allowed.'); - } - $this->what = $what; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateListRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateListRequest.php deleted file mode 100644 index 3fafa315ba3..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateListRequest.php +++ /dev/null @@ -1,69 +0,0 @@ -setOwnerId($ownerId); - } - - /** - * sets $ownerId - * - * @param int $ownerId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceTemplateListRequest - */ - public function setOwnerId($ownerId) - { - $this->ownerId = $ownerId; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateParticipantRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateParticipantRequest.php deleted file mode 100644 index 5a3f4f35d1a..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateParticipantRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -setTemplateId($templateId) - ->setParticipantId($participantId); - } - - /** - * set the template id - * - * @param string $templateId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceTemplateParticipantRequest - */ - public function setTemplateId($templateId) - { - $this->templateId = $templateId; - return $this; - } - - /** - * set the participant id - * - * @param string $participantId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceTemplateParticipantRequest - */ - public function setParticipantId($participantId) - { - $this->participantId = $participantId; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateRequest.php deleted file mode 100644 index a17486c868b..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateRequest.php +++ /dev/null @@ -1,69 +0,0 @@ -setTemplateId($templateId); - } - - /** - * set the template id - * - * @param string $templateId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceTemplateRequest - */ - public function setTemplateId($templateId) - { - $this->templateId = $templateId; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetParticipantStatusRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetParticipantStatusRequest.php deleted file mode 100644 index c2240486038..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetParticipantStatusRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -setConferenceId($conferenceId) - ->setParticipantId($participantId); - } - - /** - * set the conference id - * - * @param string $conferenceId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_GetParticipantStatusRequest - */ - public function setConferenceId($conferenceId) - { - $this->conferenceId = $conferenceId; - return $this; - } - - /** - * set the participant id - * - * @param string $participantId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_GetParticipantStatusRequest - */ - public function setParticipantId($participantId) - { - $this->participantId = $participantId; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetRunningConferenceRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetRunningConferenceRequest.php deleted file mode 100644 index ef68c46f42d..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetRunningConferenceRequest.php +++ /dev/null @@ -1,69 +0,0 @@ -setConferenceId($conferenceId); - } - - /** - * set the conference id - * - * @param string $conferenceId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_GetRunningConferenceRequest - */ - public function setConferenceId($conferenceId) - { - $this->conferenceId = $conferenceId; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/NewParticipantRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/NewParticipantRequest.php deleted file mode 100644 index 1ae6c13fe3c..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/NewParticipantRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -setConferenceId($conferenceId) - ->setParticipant($participant); - } - - /** - * set the conference id - * - * @param string $conferenceId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_NewParticipantRequest - */ - public function setConferenceId($conferenceId) - { - $this->conferenceId = $conferenceId; - return $this; - } - - /** - * sets new participant - * - * @param Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_NewParticipantRequest - */ - public function setParticipant(Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant) - { - $this->participant = $participant; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceRequest.php deleted file mode 100644 index 257d145c178..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceRequest.php +++ /dev/null @@ -1,69 +0,0 @@ -setConferenceId($conferenceId); - } - - /** - * set the conference id - * - * @param string $conferenceId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_RemoveConferenceRequest - */ - public function setConferenceId($conferenceId) - { - $this->conferenceId = $conferenceId; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateParticipantRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateParticipantRequest.php deleted file mode 100644 index 2dd82acfb90..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateParticipantRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -setTemplateId($templateId) - ->setParticipantId($participantId); - } - - /** - * set the template id - * - * @param string $templateId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_RemoveConferenceTemplateParticipantRequest - */ - public function setTemplateId($templateId) - { - $this->templateId = $templateId; - return $this; - } - - /** - * set the participant id - * - * @param string $participantId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_RemoveConferenceTemplateParticipantRequest - */ - public function setParticipantId($participantId) - { - $this->participantId = $participantId; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateRequest.php deleted file mode 100644 index 086ae498de4..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateRequest.php +++ /dev/null @@ -1,69 +0,0 @@ -setTemplateId($templateId); - } - - /** - * set the template id - * - * @param string $templateId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_RemoveConferenceTemplateRequest - */ - public function setTemplateId($templateId) - { - $this->templateId = $templateId; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveParticipantRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveParticipantRequest.php deleted file mode 100644 index 248880d6519..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveParticipantRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -setConferenceId($conferenceId) - ->setParticipantId($participantId); - } - - /** - * set the conference id - * - * @param string $conferenceId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_RemoveParticipantRequest - */ - public function setConferenceId($conferenceId) - { - $this->conferenceId = $conferenceId; - return $this; - } - - /** - * set the participant id - * - * @param string $participantId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_RemoveParticipantRequest - */ - public function setParticipantId($participantId) - { - $this->participantId = $participantId; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceRequest.php deleted file mode 100644 index c31167a2dc8..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -setConferenceId($conferenceId) - ->setOwnerId($ownerId) - ->setDetail($conferenceDetails) - ->setSchedule($conferenceSchedule) - ->setAccount($account); - } - - /** - * sets $conferenceId - * - * @param string $conferenceId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_UpdateConferenceRequest - */ - public function setConferenceId($conferenceId) - { - $this->conferenceId= $conferenceId; - return $this; - } - - /** - * sets $schedule - * - * @param Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule $schedule - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_CreateConferenceRequest - */ - public function setSchedule( - Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule $schedule = null - ) { - $this->schedule = $schedule; - return $this; - } - - /** - * sets $detail - * - * @param Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $detail - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_CreateConferenceRequest - */ - public function setDetail( - Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $detail = null - ) { - $this->detail = $detail; - return $this; - } - - /** - * sets $ownerId - * - * @param string $ownerId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_CreateConferenceRequest - */ - public function setOwnerId($ownerId = null) - { - $this->ownerId = $ownerId; - return $this; - } - - /** - * sets $account - * - * @param int $account - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_CreateConferenceRequest - */ - public function setAccount($account = null) - { - $this->account = $account; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateParticipantRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateParticipantRequest.php deleted file mode 100644 index 311a1fbd28d..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateParticipantRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -setTemplateId($templateId) - ->setParticipantId($participantId) - ->setParticipant($participant); - } - - /** - * set the template id - * - * @param string $templateId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_UpdateConferenceTemplateParticipantRequest - */ - public function setTemplateId($templateId) - { - $this->templateId = $templateId; - return $this; - } - - /** - * set the participant id - * - * @param string $participantId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_UpdateConferenceTemplateParticipantRequest - */ - public function setParticipantId($participantId) - { - $this->participantId = $participantId; - return $this; - } - - /** - * sets new participant - * - * @param Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_UpdateConferenceTemplateParticipantRequest - */ - public function setParticipant( - Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant - ) { - $this->participant = $participant; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateRequest.php deleted file mode 100644 index eb5ef168b1e..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -setTemplateId($templateId) - ->setInitiatorId($initiatorId) - ->setDetail($conferenceDetails); - } - - /** - * set the template id - * - * @param string $templateId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_UpdateConferenceTemplateRequest - */ - public function setTemplateId($templateId) - { - $this->templateId = $templateId; - return $this; - } - - /** - * set the initiator id - * - * @param string $initiatorId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_UpdateConferenceTemplateRequest - */ - public function setInitiatorId($initiatorId) - { - $this->initiatorId = $initiatorId; - return $this; - } - - /** - * sets $detail - * - * @param Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $detail - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_UpdateConferenceTemplateRequest - */ - public function setDetail( - Zend_Service_DeveloperGarden_ConferenceCall_ConferenceDetail $detail = null - ) { - $this->detail = $detail; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateParticipantRequest.php b/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateParticipantRequest.php deleted file mode 100644 index 52e62d4fed7..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateParticipantRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -setConferenceId($conferenceId) - ->setParticipantId($participantId) - ->setAction($action) - ->setParticipant($participant); - } - - /** - * set the conference id - * - * @param string $conferenceId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_UpdateParticipantRequest - */ - public function setConferenceId($conferenceId) - { - $this->conferenceId = $conferenceId; - return $this; - } - - /** - * set the participant id - * - * @param string $participantId - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_UpdateParticipantRequest - */ - public function setParticipantId($participantId) - { - $this->participantId = $participantId; - return $this; - } - - /** - * sets new action - * - * @param integer $action - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_UpdateParticipantRequest - */ - public function setAction($action = null) - { - if ($action !== null) { - Zend_Service_DeveloperGarden_ConferenceCall::checkParticipantAction($action); - } - $this->action = $action; - return $this; - } - - /** - * sets new participant - * - * @param Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant - * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_UpdateParticipantRequest - */ - public function setParticipant( - Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail $participant = null - ) { - $this->participant = $participant; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/Exception.php b/lib/Zend/Service/DeveloperGarden/Request/Exception.php deleted file mode 100644 index c68d7af170f..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/Exception.php +++ /dev/null @@ -1,39 +0,0 @@ -setIp($ip); - } - } - - /** - * sets new ip or array of ips - * - * @param Zend_Service_DeveloperGarden_IpLocation_IpAddress|array $ip - * - * @return Zend_Service_DeveloperGarden_Request_IpLocation_LocateIPRequest - */ - public function setIp($ip) - { - if ($ip instanceof Zend_Service_DeveloperGarden_IpLocation_IpAddress) { - $this->address[] = array( - 'ipType' => $ip->getVersion(), - 'ipAddress' => $ip->getIp(), - ); - return $this; - } - - if (is_array($ip)) { - foreach ($ip as $ipObject) { - if (!$ipObject instanceof Zend_Service_DeveloperGarden_IpLocation_IpAddress - && !is_string($ipObject) - ) { - #require_once 'Zend/Service/DeveloperGarden/Request/Exception.php'; - throw new Zend_Service_DeveloperGarden_Request_Exception( - 'Not a valid Ip Address object found.' - ); - } - $this->setIp($ipObject); - } - return $this; - } - - if (!is_string($ip)) { - #require_once 'Zend/Service/DeveloperGarden/Request/Exception.php'; - throw new Zend_Service_DeveloperGarden_Request_Exception('Not a valid Ip Address object found.'); - } - - return $this->setIp(new Zend_Service_DeveloperGarden_IpLocation_IpAddress($ip)); - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/LocalSearch/LocalSearchRequest.php b/lib/Zend/Service/DeveloperGarden/Request/LocalSearch/LocalSearchRequest.php deleted file mode 100644 index 43a49d89a88..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/LocalSearch/LocalSearchRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -setSearchParameters($searchParameters) - ->setAccount($account); - } - - /** - * @param integer $account - */ - public function setAccount($account = null) - { - $this->account = $account; - return $this; - } - - /** - * @return integer - */ - public function getAccount() - { - return $this->account; - } - - /** - * @param Zend_Service_DeveloperGarden_LocalSearch_SearchParameters $searchParameters - */ - public function setSearchParameters( - Zend_Service_DeveloperGarden_LocalSearch_SearchParameters $searchParameters - ) { - $this->searchParameters = $searchParameters->getSearchParameters(); - $this->_searchParameters = $searchParameters; - return $this; - } - - /** - * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters - */ - public function getSearchParameters() - { - return $this->_searchParameters; - } - -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/RequestAbstract.php b/lib/Zend/Service/DeveloperGarden/Request/RequestAbstract.php deleted file mode 100644 index 10e122e1929..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/RequestAbstract.php +++ /dev/null @@ -1,72 +0,0 @@ -setEnvironment($environment); - } - - /** - * sets a new moduleId - * - * @param integer $environment - * @return Zend_Service_DeveloperGarden_Request_RequestAbstract - */ - public function setEnvironment($environment) - { - $this->environment = $environment; - return $this; - } - - /** - * the current configured environment value - * - * @return integer - */ - public function getEnvironment() - { - return $this->environment; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/SendSms/SendFlashSMS.php b/lib/Zend/Service/DeveloperGarden/Request/SendSms/SendFlashSMS.php deleted file mode 100644 index 98f88a76d81..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/SendSms/SendFlashSMS.php +++ /dev/null @@ -1,46 +0,0 @@ -number; - } - - /** - * set a new number(s) - * - * @param string $number - * @throws Zend_Service_DeveloperGarden_Request_Exception - * - * @return Zend_Service_DeveloperGarden_Request_SendSms_SendSmsAbstract - */ - public function setNumber($number) - { - $this->number = $number; - if ($this->getNumberCount() > $this->_maxNumbers) { - #require_once 'Zend/Service/DeveloperGarden/Request/Exception.php'; - throw new Zend_Service_DeveloperGarden_Request_Exception('The message is too long.'); - } - return $this; - } - - /** - * returns the current message - * - * @return string $message - */ - public function getMessage() - { - return $this->message; - } - - /** - * sets a new message - * - * @param string $message - * @throws Zend_Service_DeveloperGarden_Request_Exception - * - * @return Zend_Service_DeveloperGarden_Request_SendSms_SendSmsAbstract - */ - public function setMessage($message) - { - $this->message = $message; - if ($this->getMessageLength() > $this->_maxLength) { - #require_once 'Zend/Service/DeveloperGarden/Request/Exception.php'; - throw new Zend_Service_DeveloperGarden_Request_Exception('The message is too long.'); - } - return $this; - } - - /** - * returns the originator - * - * @return the $originator - */ - public function getOriginator() - { - return $this->originator; - } - - /** - * the originator name - * - * @param string $originator - * @return Zend_Service_DeveloperGarden_Request_SendSms_SendSmsAbstract - */ - public function setOriginator($originator) - { - $this->originator = $originator; - return $this; - } - - /** - * the account - * @return integer $account - */ - public function getAccount() - { - return $this->account; - } - - /** - * sets a new accounts - * - * @param int $account the $account to set - * @return Zend_Service_DeveloperGarden_Request_SendSms_SendSmsAbstract - */ - public function setAccount($account) - { - $this->account = $account; - return $this; - } - - /** - * returns the calculated message length - * - * @return integer - */ - public function getMessageLength() - { - $message = $this->getMessage(); - $length = strlen($message); - - foreach ($this->_specialChars as $char) { - $c = (substr_count($message, $char) * 2) - 1; - if ($c > 0) { - $length += $c; - } - } - - return $length; - } - - /** - * returns the count of sms messages that would be send - * - * @return integer - */ - public function getMessageCount() - { - $smsLength = $this->getMessageLength(); - $retValue = 1; - if ($smsLength > 160) { - $retValue = ceil($smsLength / $this->_smsLength); - } - return $retValue; - } - - /** - * returns the count of numbers in this sms - * - * @return integer - */ - public function getNumberCount() - { - $number = $this->getNumber(); - $retValue = 0; - if (!empty($number)) { - $retValue = count(explode(',', $number)); - } - return $retValue; - } - - /** - * returns the sms type - * currently we have - * 1 = Sms - * 2 = FlashSms - * - * @return integer - */ - public function getSmsType() - { - return $this->_smsType; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/SmsValidation/GetValidatedNumbers.php b/lib/Zend/Service/DeveloperGarden/Request/SmsValidation/GetValidatedNumbers.php deleted file mode 100644 index 7289d24dd15..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/SmsValidation/GetValidatedNumbers.php +++ /dev/null @@ -1,39 +0,0 @@ -setNumber($number); - } - - /** - * returns the number - * - * @return string $number - */ - public function getNumber() - { - return $this->number; - } - - /** - * set a new number - * - * @param string $number - * @return Zend_Service_DeveloperGarden_Request_SmsValidation_Validate - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/SmsValidation/SendValidationKeyword.php b/lib/Zend/Service/DeveloperGarden/Request/SmsValidation/SendValidationKeyword.php deleted file mode 100644 index 9cc4dcffc51..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/SmsValidation/SendValidationKeyword.php +++ /dev/null @@ -1,39 +0,0 @@ -keyword; - } - - /** - * create the class for validation a sms keyword - * - * @param integer $environment - * @param string $keyword - * @param string $number - */ - public function __construct($environment, $keyword = null, $number = null) - { - parent::__construct($environment); - $this->setKeyword($keyword) - ->setNumber($number); - } - - /** - * set a new keyword - * - * @param string $keyword - * @return Zend_Service_DeveloperGarden_Request_SmsValidation_Validate - */ - public function setKeyword($keyword) - { - $this->keyword = $keyword; - return $this; - } - - /** - * returns the number - * - * @return string $number - */ - public function getNumber() - { - return $this->number; - } - - /** - * set a new number - * - * @param string $number - * @return Zend_Service_DeveloperGarden_Request_SmsValidation_Validate - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/CallStatus.php b/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/CallStatus.php deleted file mode 100644 index 7ef5b7b9b86..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/CallStatus.php +++ /dev/null @@ -1,100 +0,0 @@ -setSessionId($sessionId) - ->setKeepAlive($keepAlive); - } - - /** - * @return string - */ - public function getSessionId() - { - return $this->sessionId; - } - - /** - * sets new sessionId - * - * @param string $sessionId - * @return Zend_Service_DeveloperGarden_Request_VoiceButler_CallStatus - */ - public function setSessionId($sessionId) - { - $this->sessionId = $sessionId; - return $this; - } - - /** - * @return integer - */ - public function getKeepAlive() - { - return $this->keepAlive; - } - - /** - * sets new keepAlive flag - * - * @param integer $keepAlive - * @return Zend_Service_DeveloperGarden_Request_VoiceButler_CallStatus - */ - public function setKeepAlive($keepAlive) - { - $this->keepAlive = $keepAlive; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCall.php b/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCall.php deleted file mode 100644 index be12ba676d2..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCall.php +++ /dev/null @@ -1,238 +0,0 @@ -aNumber; - } - - /** - * @param string $aNumber - * @return Zend_Service_DeveloperGarden_Request_VoiceButler_NewCall - */ - public function setANumber($aNumber) - { - $this->aNumber = $aNumber; - return $this; - } - - /** - * @return string - */ - public function getBNumber() - { - return $this->bNumber; - } - - /** - * @param string $bNumber - * @return Zend_Service_DeveloperGarden_Request_VoiceButler_NewCall - */ - public function setBNumber($bNumber) - { - $this->bNumber = $bNumber; - return $this; - } - - /** - * @return boolean - */ - public function getPrivacyA() - { - return $this->privacyA; - } - - /** - * @param boolean $privacyA - * @return Zend_Service_DeveloperGarden_Request_VoiceButler_NewCall - */ - public function setPrivacyA($privacyA) - { - $this->privacyA = $privacyA; - return $this; - } - - /** - * @return boolean - */ - public function getPrivacyB() - { - return $this->privacyB; - } - - /** - * @param boolean $privacyB - * @return Zend_Service_DeveloperGarden_Request_VoiceButler_NewCall - */ - public function setPrivacyB($privacyB) - { - $this->privacyB = $privacyB; - return $this; - } - - /** - * @return integer - */ - public function getExpiration() - { - return $this->expiration; - } - - /** - * @param integer $expiration - * @return Zend_Service_DeveloperGarden_Request_VoiceButler_NewCall - */ - public function setExpiration($expiration) - { - $this->expiration = $expiration; - return $this; - } - - /** - * @return integer - */ - public function getMaxDuration() - { - return $this->maxDuration; - } - - /** - * @param integer $maxDuration - * @return Zend_Service_DeveloperGarden_Request_VoiceButler_NewCall - */ - public function setMaxDuration($maxDuration) - { - $this->maxDuration = $maxDuration; - return $this; - } - - /** - * @return string - */ - public function getGreeter() - { - return $this->greeter; - } - - /** - * @param string $greeter - * @return Zend_Service_DeveloperGarden_Request_VoiceButler_NewCall - */ - public function setGreeter($greeter) - { - $this->greeter = $greeter; - return $this; - } - - /** - * @return string - */ - public function getAccount() - { - return $this->account; - } - - /** - * @param integer $account - * @return Zend_Service_DeveloperGarden_Request_VoiceButler_NewCall - */ - public function setAccount($account) - { - $this->account = $account; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCallSequenced.php b/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCallSequenced.php deleted file mode 100644 index 2b1e56f930d..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCallSequenced.php +++ /dev/null @@ -1,92 +0,0 @@ -bNumber; - } - - /** - * @param array $bNumber - * @return Zend_Service_DeveloperGarden_Request_VoiceButler_NewCall - */ - /*public function setBNumber(array $bNumber) - { - $this->bNumber = $bNumber; - return $this; - }*/ - - /** - * returns the max wait value - * - * @return integer - */ - public function getMaxWait() - { - return $this->maxWait; - } - - /** - * sets new max wait value for next number call - * - * @param integer $maxWait - * @return Zend_Service_DeveloperGarden_Request_VoiceButler_NewCallSequenced - */ - public function setMaxWait($maxWait) - { - $this->maxWait = $maxWait; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/TearDownCall.php b/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/TearDownCall.php deleted file mode 100644 index 8a612014c99..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/TearDownCall.php +++ /dev/null @@ -1,78 +0,0 @@ -setSessionId($sessionId); - } - - /** - * @return string - */ - public function getSessionId() - { - return $this->sessionId; - } - - /** - * sets new sessionId - * - * @param string $sessionId - * @return Zend_Service_DeveloperGarden_Request_VoiceButler_TearDownCall - */ - public function setSessionId($sessionId) - { - $this->sessionId = $sessionId; - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/VoiceButlerAbstract.php b/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/VoiceButlerAbstract.php deleted file mode 100644 index e638f766e81..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/VoiceButlerAbstract.php +++ /dev/null @@ -1,39 +0,0 @@ -hasError()) { - throw new Zend_Service_DeveloperGarden_Response_Exception( - $this->getStatusMessage(), - $this->getStatusCode() - ); - } - - return $this; - } - - /** - * returns the error code - * - * @return string|null - */ - public function getStatusCode() - { - return $this->statusCode; - } - - /** - * returns the error message - * - * @return string - */ - public function getStatusMessage() - { - return $this->statusMessage; - } - - /** - * returns true if the errorCode is not null and not 0000 - * - * @return boolean - */ - public function isValid() - { - return ($this->statusCode === null - || $this->statusCode == '0000'); - } - - /** - * returns true if we have a error situation - * - * @return boolean - */ - public function hasError() - { - return ($this->statusCode !== null - && $this->statusCode != '0000'); - } - - /** - * returns the error code (statusCode) - * - * @return string|null - */ - public function getErrorCode() - { - if (empty($this->errorCode)) { - return $this->statusCode; - } else { - return $this->errorCode; - } - } - - /** - * returns the error message - * - * @return string - */ - public function getErrorMessage() - { - if (empty($this->errorMessage)) { - return $this->statusMessage; - } else { - return $this->errorMessage; - } - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/BaseUserService/ChangeQuotaPoolResponse.php b/lib/Zend/Service/DeveloperGarden/Response/BaseUserService/ChangeQuotaPoolResponse.php deleted file mode 100644 index 0bedc77cfef..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/BaseUserService/ChangeQuotaPoolResponse.php +++ /dev/null @@ -1,39 +0,0 @@ -quotaLevel; - } - - /** - * returns the maxUserQuota - * - * @return integer - */ - public function getMaxUserQuota() - { - return $this->maxUserQuota; - } - - /** - * return the maxQuota - * - * @return integer - */ - public function getMaxQuota() - { - return $this->maxQuota; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/AddConferenceTemplateParticipantResponse.php b/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/AddConferenceTemplateParticipantResponse.php deleted file mode 100644 index 142916e09aa..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/AddConferenceTemplateParticipantResponse.php +++ /dev/null @@ -1,45 +0,0 @@ -participantId; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CCSResponseType.php b/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CCSResponseType.php deleted file mode 100644 index 4021494c08e..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CCSResponseType.php +++ /dev/null @@ -1,39 +0,0 @@ -getProperties() as $p) { - $name = $p->getName(); - if (strpos($name, 'Response') !== false) { - return $p->getValue($this); - } - } - return null; - } - - /** - * parse the response data and throws exceptions - * - * @throws Zend_Service_DeveloperGarden_Response_Exception - * @return mixed - */ - public function parse() - { - $retVal = $this->getResponse(); - if ($retVal === null) { - $this->statusCode = 9999; - $this->statusMessage = 'Internal response property not found.'; - } else { - $this->statusCode = $retVal->getStatusCode(); - $this->statusMessage = $retVal->getStatusMessage(); - } - parent::parse(); - return $retVal; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceResponse.php b/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceResponse.php deleted file mode 100644 index 4051c17a5d8..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceResponse.php +++ /dev/null @@ -1,45 +0,0 @@ -conferenceId; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceTemplateResponse.php b/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceTemplateResponse.php deleted file mode 100644 index d3fb6080af9..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceTemplateResponse.php +++ /dev/null @@ -1,45 +0,0 @@ -templateId; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceListResponse.php b/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceListResponse.php deleted file mode 100644 index 5861170ae08..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceListResponse.php +++ /dev/null @@ -1,45 +0,0 @@ -conferenceIds; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceStatusResponse.php b/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceStatusResponse.php deleted file mode 100644 index 43391124516..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceStatusResponse.php +++ /dev/null @@ -1,45 +0,0 @@ -detail; - } - - /** - * returns the starttime - * - * @return integer - */ - public function getStartTime() - { - return $this->startTime; - } - - /** - * returns the schedule object - * - * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule - */ - public function getSchedule() - { - return $this->schedule; - } - - /** - * returns array with all participants - * Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail - * - * @return array of Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail - */ - public function getParticipants() - { - if ($this->participants instanceof Zend_Service_DeveloperGarden_ConferenceCall_Participant) { - $this->participants = array( - $this->participants - ); - } - return $this->participants; - } - - /** - * returns the participant object if found in the response - * - * @param string $participantId - * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail - */ - public function getParticipantById($participantId) - { - $participants = $this->getParticipants(); - if ($participants !== null) { - foreach ($participants as $participant) { - if (strcmp($participant->getParticipantId(), $participantId) == 0) { - return $participant; - } - } - } - return null; - } - - /** - * returns the conference account details - * - * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceAccount - */ - public function getAccount() - { - return $this->acc; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateListResponse.php b/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateListResponse.php deleted file mode 100644 index 50a0af2bf81..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateListResponse.php +++ /dev/null @@ -1,45 +0,0 @@ -templateIds; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateParticipantResponse.php b/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateParticipantResponse.php deleted file mode 100644 index e17058b04b1..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateParticipantResponse.php +++ /dev/null @@ -1,45 +0,0 @@ -participant; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateResponse.php b/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateResponse.php deleted file mode 100644 index 5d64031372e..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateResponse.php +++ /dev/null @@ -1,45 +0,0 @@ -detail; - } - - /** - * returns array with all participants - * Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail - * - * @return array of Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail - */ - public function getParticipants() - { - if ($this->participants instanceof Zend_Service_DeveloperGarden_ConferenceCall_Participant) { - $this->participants = array( - $this->participants - ); - } - return $this->participants; - } - - /** - * returns the participant object if found in the response - * - * @param string $participantId - * @return Zend_Service_DeveloperGarden_ConferenceCall_Participant - */ - public function getParticipantById($participantId) - { - $participants = $this->getParticipants(); - if ($participants !== null) { - foreach ($participants as $participant) { - if (strcmp($participant->getParticipantId(), $participantId) == 0) { - return $participant; - } - } - } - return null; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetParticipantStatusResponse.php b/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetParticipantStatusResponse.php deleted file mode 100644 index cf9ccb9768a..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetParticipantStatusResponse.php +++ /dev/null @@ -1,45 +0,0 @@ -status; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetRunningConferenceResponse.php b/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetRunningConferenceResponse.php deleted file mode 100644 index b451db86377..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetRunningConferenceResponse.php +++ /dev/null @@ -1,45 +0,0 @@ -conferenceId; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/NewParticipantResponse.php b/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/NewParticipantResponse.php deleted file mode 100644 index c2d195c1523..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/NewParticipantResponse.php +++ /dev/null @@ -1,45 +0,0 @@ -participantId; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceResponse.php b/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceResponse.php deleted file mode 100644 index e946ea012fe..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceResponse.php +++ /dev/null @@ -1,46 +0,0 @@ -countryCode; - } - - /** - * @return string - */ - public function getCityCode() - { - return $this->cityCode; - } - - /** - * @return string - */ - public function getCityName() - { - return $this->cityName; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/IpLocation/GeoCoordinatesType.php b/lib/Zend/Service/DeveloperGarden/Response/IpLocation/GeoCoordinatesType.php deleted file mode 100644 index d8c902f5a16..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/IpLocation/GeoCoordinatesType.php +++ /dev/null @@ -1,66 +0,0 @@ -geoLatitude; - } - - /** - * @return float - */ - public function getLongitude() - { - return $this->geoLongitude; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/IpLocation/IPAddressLocationType.php b/lib/Zend/Service/DeveloperGarden/Response/IpLocation/IPAddressLocationType.php deleted file mode 100644 index c2e62767089..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/IpLocation/IPAddressLocationType.php +++ /dev/null @@ -1,141 +0,0 @@ -isInRegion; - } - - /** - * @return Zend_Service_DeveloperGarden_Response_IpLocation_GeoCoordinatesType - */ - public function getGeoCoordinates() - { - return $this->isInGeo; - } - - /** - * @return Zend_Service_DeveloperGarden_Response_IpLocation_CityType - */ - public function getCity() - { - return $this->isInCity; - } - - /** - * @return integer - */ - public function getIpType() - { - return $this->ipType; - } - - /** - * @return string - */ - public function getIpAddress() - { - return $this->ipAddress; - } - - /** - * @return integer - */ - public function getRadius() - { - return $this->radius; - } - - /** - * implement parsing - * - */ - public function parse() - { - parent::parse(); - if ($this->isInCity === null) { - #require_once 'Zend/Service/DeveloperGarden/Response/IpLocation/CityType.php'; - $this->isInCity = new Zend_Service_DeveloperGarden_Response_IpLocation_CityType(); - } - - if ($this->isInRegion === null) { - #require_once 'Zend/Service/DeveloperGarden/Response/IpLocation/RegionType.php'; - $this->isInRegion = new Zend_Service_DeveloperGarden_Response_IpLocation_RegionType(); - } - - if ($this->isInGeo === null) { - #require_once 'Zend/Service/DeveloperGarden/Response/IpLocation/GeoCoordinatesType.php'; - $this->isInGeo = new Zend_Service_DeveloperGarden_Response_IpLocation_GeoCoordinatesType(); - } - - return $this; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponse.php b/lib/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponse.php deleted file mode 100644 index 29581cdf74a..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponse.php +++ /dev/null @@ -1,98 +0,0 @@ -ipAddressLocation instanceof Zend_Service_DeveloperGarden_Response_IpLocation_IPAddressLocationType) { - if (is_array($response->ipAddressLocation)) { - foreach ($response->ipAddressLocation as $location) { - $this->ipAddressLocation[] = $location; - } - - } else { - $this->ipAddressLocation[] = $response->ipAddressLocation; - } - } elseif (is_array($response->ipAddressLocation)) { - $this->ipAddressLocation = $response->ipAddressLocation; - } - - $this->errorCode = $response->getErrorCode(); - $this->errorMessage = $response->getErrorMessage(); - $this->statusCode = $response->getStatusCode(); - $this->statusMessage = $response->getStatusMessage(); - } - - /** - * implement own parsing mechanism to fix broken wsdl implementation - */ - public function parse() - { - parent::parse(); - if (is_array($this->ipAddressLocation)) { - foreach ($this->ipAddressLocation as $address) { - $address->parse(); - } - } elseif ($this->ipAddressLocation instanceof Zend_Service_DeveloperGarden_Response_IpLocation_IPAddressLocationType) { - $this->ipAddressLocation->parse(); - } - - return $this; - } - - /** - * @return array - */ - public function getIpAddressLocation() - { - return $this->ipAddressLocation; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponseType.php b/lib/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponseType.php deleted file mode 100644 index fce63db34dd..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponseType.php +++ /dev/null @@ -1,46 +0,0 @@ -countryCode; - } - - /** - * @return string - */ - public function getRegionCode() - { - return $this->regionCode; - } - - /** - * @return string - */ - public function getRegionName() - { - return $this->regionName; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponse.php b/lib/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponse.php deleted file mode 100644 index 876b0c81b8d..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponse.php +++ /dev/null @@ -1,89 +0,0 @@ -errorCode = $response->getErrorCode(); - $this->errorMessage = $response->getErrorMessage(); - $this->statusCode = $response->getStatusCode(); - $this->statusMessage = $response->getStatusMessage(); - $this->searchResult = $response; - } - - /** - * returns the raw search result - * - * @return Zend_Service_DeveloperGarden_Response_LocalSearch_LocalSearchResponseType - */ - public function getSearchResult() - { - return $this->searchResult; - } - - /** - * overwrite hasError to not handle 0103 error (empty result) - * - * @return boolean - */ - public function hasError() - { - $result = parent::hasError(); - if (!$result && $this->statusCode == '0103') { - $result = false; - } - return $result; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponseType.php b/lib/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponseType.php deleted file mode 100644 index b870d1fb916..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponseType.php +++ /dev/null @@ -1,44 +0,0 @@ -hasError()) { - throw new Zend_Service_DeveloperGarden_Response_Exception( - $this->getErrorMessage(), - $this->getErrorCode() - ); - } - - return $this; - } - - /** - * returns the error code - * - * @return string|null - */ - public function getErrorCode() - { - return $this->errorCode; - } - - /** - * returns the error message - * - * @return string - */ - public function getErrorMessage() - { - return $this->errorMessage; - } - - /** - * returns true if the errorCode is not null and not 0000 - * - * @return boolean - */ - public function isValid() - { - return ($this->errorCode === null - || $this->errorCode == '0000'); - } - - /** - * returns true if we have a error situation - * - * @return boolean - */ - public function hasError() - { - return ($this->errorCode !== null - && $this->errorCode != '0000'); - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Exception.php b/lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Exception.php deleted file mode 100644 index c543292230c..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Exception.php +++ /dev/null @@ -1,39 +0,0 @@ -getSecurityToken(); - } - - /** - * returns the security token - * - * @return string - */ - public function getSecurityToken() - { - if (!$this->securityToken instanceof Zend_Service_DeveloperGarden_Response_SecurityTokenServer_SecurityTokenResponse) { - #require_once 'Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Exception.php'; - throw new Zend_Service_DeveloperGarden_Response_SecurityTokenServer_Exception( - 'No valid securityToken found.' - ); - } - return $this->securityToken->getTokenData(); - } - - /** - * returns true if the stored token data is valid - * - * @return boolean - */ - public function isValid() - { - /** - * @todo implement the true token validation check - */ - if (isset($this->securityToken) - && !empty($this->securityToken->tokenData) - ) { - return true; - } - return false; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Interface.php b/lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Interface.php deleted file mode 100644 index d124bda61db..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Interface.php +++ /dev/null @@ -1,40 +0,0 @@ -tokenData)) { - #require_once 'Zend/Service/DeveloperGarden/Response/Exception.php'; - throw new Zend_Service_DeveloperGarden_Response_Exception('No valid tokenData found.'); - } - - return $this->tokenData; - } - - /** - * returns the token format value - * - * @return string - */ - public function getTokenFormat() - { - return $this->tokenFormat; - } - - /** - * returns the token encoding - * - * @return string - */ - public function getTokenEncoding() - { - return $this->tokenEncoding; - } - - /** - * returns true if the stored token data is valid - * - * @return boolean - */ - public function isValid() - { - /** - * @todo implement the true token validation check - */ - if (!empty($this->securityTokenData)) { - return true; - } - return false; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/SendSms/SendFlashSMSResponse.php b/lib/Zend/Service/DeveloperGarden/Response/SendSms/SendFlashSMSResponse.php deleted file mode 100644 index aa0e725fd18..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/SendSms/SendFlashSMSResponse.php +++ /dev/null @@ -1,39 +0,0 @@ -hasError()) { - #require_once 'Zend/Service/DeveloperGarden/Response/Exception.php'; - throw new Zend_Service_DeveloperGarden_Response_Exception( - $this->getErrorMessage(), - $this->getErrorCode() - ); - } - - return $this; - } - - /** - * returns the error code - * - * @return string|null - */ - public function getErrorCode() - { - $retValue = null; - if ($this->return instanceof stdClass) { - $retValue = $this->return->status; - } - return $retValue; - } - - /** - * returns the error message - * - * @return string - */ - public function getErrorMessage() - { - $retValue = null; - if ($this->return instanceof stdClass) { - $retValue = $this->return->description; - } - return $retValue; - } - - /** - * returns true if the errorCode is not null and not 0000 - * - * @return boolean - */ - public function isValid() - { - return ($this->return === null - || $this->return->status == '0000'); - } - - /** - * returns true if we have a error situation - * - * @return boolean - */ - public function hasError() - { - $retValue = false; - if ($this->return instanceof stdClass - && $this->return->status != '0000' - ) { - $retValue = true; - } - return $retValue; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/SmsValidation/GetValidatedNumbersResponse.php b/lib/Zend/Service/DeveloperGarden/Response/SmsValidation/GetValidatedNumbersResponse.php deleted file mode 100644 index b2b674374f6..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/SmsValidation/GetValidatedNumbersResponse.php +++ /dev/null @@ -1,55 +0,0 @@ -validatedNumbers; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/SmsValidation/InvalidateResponse.php b/lib/Zend/Service/DeveloperGarden/Response/SmsValidation/InvalidateResponse.php deleted file mode 100644 index 9b396cf3996..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/SmsValidation/InvalidateResponse.php +++ /dev/null @@ -1,39 +0,0 @@ -number; - } - - /** - * returns the valid until date - * - * @return string - */ - public function getValidUntil() - { - return $this->validUntil; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatus2Response.php b/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatus2Response.php deleted file mode 100644 index 8898ed828da..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatus2Response.php +++ /dev/null @@ -1,88 +0,0 @@ -getBNumber(); - } - - /** - * returns the phone number of the second participant, who was called. - * - * @return string - */ - public function getBNumber() - { - if (isset($this->return->be164)) { - return $this->return->be164; - } - return null; - } - - /** - * Index of the phone number of the second participant (B), who was called. The value 0 means - * the first B party phone number which was called, 1 means the second B party phone number - * which was called etc. - * - * @return integer - */ - public function getBNumberIndex() - { - return $this->getBIndex(); - } - - /** - * Index of the phone number of the second participant (B), who was called. The value 0 means - * the first B party phone number which was called, 1 means the second B party phone number - * which was called etc. - * - * @return integer - */ - public function getBIndex() - { - if (isset($this->return->bindex)) { - return $this->return->bindex; - } - return null; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatusResponse.php b/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatusResponse.php deleted file mode 100644 index 0214da02d99..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatusResponse.php +++ /dev/null @@ -1,154 +0,0 @@ -return->sessionId)) { - return $this->return->sessionId; - } - return null; - } - - /** - * returns the connection time for participant a - * - * @return integer - */ - public function getConnectionTimeA() - { - if (isset($this->return->connectiontimea)) { - return $this->return->connectiontimea; - } - return null; - } - - /** - * returns the connection time for participant b - * - * @return integer - */ - public function getConnectionTimeB() - { - if (isset($this->return->connectiontimeb)) { - return $this->return->connectiontimeb; - } - return null; - } - - /** - * returns the description time for participant a - * - * @return string - */ - public function getDescriptionA() - { - if (isset($this->return->descriptiona)) { - return $this->return->descriptiona; - } - return null; - } - - /** - * returns the description time for participant b - * - * @return string - */ - public function getDescriptionB() - { - if (isset($this->return->descriptionb)) { - return $this->return->descriptionb; - } - return null; - } - - /** - * returns the reason time for participant a - * - * @return integer - */ - public function getReasonA() - { - if (isset($this->return->reasona)) { - return $this->return->reasona; - } - return null; - } - - /** - * returns the reason time for participant b - * - * @return integer - */ - public function getReasonB() - { - if (isset($this->return->reasonb)) { - return $this->return->reasonb; - } - return null; - } - - /** - * returns the state time for participant a - * - * @return string - */ - public function getStateA() - { - if (isset($this->return->statea)) { - return $this->return->statea; - } - return null; - } - - /** - * returns the state time for participant b - * - * @return string - */ - public function getStateB() - { - if (isset($this->return->stateb)) { - return $this->return->stateb; - } - return null; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallResponse.php b/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallResponse.php deleted file mode 100644 index 47a6bba2dc5..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallResponse.php +++ /dev/null @@ -1,60 +0,0 @@ -return->sessionId)) { - return $this->return->sessionId; - } - return null; - } - - /** - * prints the session on casting to string - * - * @return string - */ - public function __toString() - { - return $this->getSessionId(); - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallSequencedResponse.php b/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallSequencedResponse.php deleted file mode 100644 index 48c1bcc5f60..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallSequencedResponse.php +++ /dev/null @@ -1,39 +0,0 @@ -return->sessionId)) { - return $this->return->sessionId; - } - return null; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/VoiceButlerAbstract.php b/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/VoiceButlerAbstract.php deleted file mode 100644 index a3545f93dd2..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/VoiceButlerAbstract.php +++ /dev/null @@ -1,128 +0,0 @@ -return; - } - - /** - * parse the response data and throws exceptions - * - * @throws Zend_Service_DeveloperGarden_Response_Exception - * @return Zend_Service_DeveloperGarden_Response_ResponseAbstract - */ - public function parse() - { - if ($this->hasError()) { - throw new Zend_Service_DeveloperGarden_Response_Exception( - $this->getErrorMessage(), - $this->getErrorCode() - ); - } - - return $this; - } - - /** - * returns the error code - * - * @return string|null - */ - public function getErrorCode() - { - $retValue = null; - if ($this->return instanceof stdClass) { - $retValue = $this->return->status; - } - return $retValue; - } - - /** - * returns the error message - * - * @return string - */ - public function getErrorMessage() - { - $retValue = null; - if ($this->return instanceof stdClass) { - $retValue = $this->return->err_msg; - } - return $retValue; - } - - /** - * returns true if the errorCode is not null and not 0000 - * - * @return boolean - */ - public function isValid() - { - return ($this->return === null - || $this->return->status == '0000'); - } - - /** - * returns true if we have a error situation - * - * @return boolean - */ - public function hasError() - { - $retValue = false; - if ($this->return instanceof stdClass - && $this->return->status != '0000' - ) { - $retValue = true; - } - return $retValue; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/SecurityTokenServer.php b/lib/Zend/Service/DeveloperGarden/SecurityTokenServer.php deleted file mode 100644 index 491590165cd..00000000000 --- a/lib/Zend/Service/DeveloperGarden/SecurityTokenServer.php +++ /dev/null @@ -1,127 +0,0 @@ - 'Zend_Service_DeveloperGarden_Response_SecurityTokenServer_SecurityTokenResponse', - 'getTokensResponse' => 'Zend_Service_DeveloperGarden_Response_SecurityTokenServer_GetTokensResponse' - ); - - /** - * does the login and return the specific response - * - * @return Zend_Service_DeveloperGarden_Response_SecurityTokenServer_SecurityTokenResponse - */ - public function getLoginToken() - { - $token = Zend_Service_DeveloperGarden_SecurityTokenServer_Cache::getTokenFromCache( - 'securityToken' - ); - - if ($token === null - || !$token->isValid() - ) { - $token = $this->getSoapClient()->login('login'); - Zend_Service_DeveloperGarden_SecurityTokenServer_Cache::setTokenToCache( - 'securityToken', - $token - ); - } - - return $token; - } - - /** - * returns the fetched token from token server - * - * @return Zend_Service_DeveloperGarden_Response_SecurityTokenServer_GetTokensResponse - */ - public function getTokens() - { - $token = Zend_Service_DeveloperGarden_SecurityTokenServer_Cache::getTokenFromCache( - 'getTokens' - ); - - if ($token === null - || !$token->isValid() - ) { - $token = $this->getSoapClient()->getTokens(array( - 'serviceId' => $this->_serviceAuthId - )); - Zend_Service_DeveloperGarden_SecurityTokenServer_Cache::setTokenToCache( - 'getTokens', - $token - ); - } - return $token; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/SecurityTokenServer/Cache.php b/lib/Zend/Service/DeveloperGarden/SecurityTokenServer/Cache.php deleted file mode 100644 index 185cf208438..00000000000 --- a/lib/Zend/Service/DeveloperGarden/SecurityTokenServer/Cache.php +++ /dev/null @@ -1,207 +0,0 @@ - null, - 'getTokens' => null - ); - - /** - * Internal cache for token values - * - * @var Zend_Cache_Core - * @access private - */ - private static $_cache = null; - - /** - * PHP SOAP wsdl cache constant - * - * @var integer - */ - private static $_wsdlCache = null; - -// @codeCoverageIgnoreStart - /** - * Constructor overriding - make sure that a developer cannot instantiate - */ - protected function __construct() - { - } -// @codeCoverageIgnoreEnd - - /** - * returns stored token from cache or null - * - * @param string $tokenId - * @throws Zend_Service_DeveloperGarden_Exception - * @return Zend_Service_DeveloperGarden_Response_SecurityTokenServer_Interface|null - */ - public static function getTokenFromCache($tokenId) - { - if (!array_key_exists($tokenId, self::$_storedToken)) { - #require_once 'Zend/Service/DeveloperGarden/Exception.php'; - throw new Zend_Service_DeveloperGarden_Exception( - 'tokenID ' . $tokenId . ' unknown.' - ); - } - - if (self::hasCache() && self::$_storedToken[$tokenId] === null) { - $cache = self::getCache(); - $token = $cache->load(md5($tokenId)); - if ($token !== false) { - self::$_storedToken[$tokenId] = $token; - } - } - - return self::$_storedToken[$tokenId]; - } - - /** - * set new value for the given tokenId - * - * @param string $tokenId - * @throws Zend_Service_DeveloperGarden_Exception - * @param Zend_Service_DeveloperGarden_Response_SecurityTokenServer_Interface $tokenValue - * @return void - */ - public static function setTokenToCache($tokenId, - Zend_Service_DeveloperGarden_Response_SecurityTokenServer_Interface $tokenValue - ) { - if (!array_key_exists($tokenId, self::$_storedToken)) { - #require_once 'Zend/Service/DeveloperGarden/Exception.php'; - throw new Zend_Service_DeveloperGarden_Exception( - 'tokenID ' . $tokenId . ' unknown.' - ); - } - - if (self::hasCache()) { - $cache = self::getCache(); - $cache->save($tokenValue, md5($tokenId)); - } - - self::$_storedToken[$tokenId] = $tokenValue; - } - - /** - * reset the internal cache structure - * - * @return void - */ - public static function resetTokenCache() - { - foreach (self::$_storedToken as $key => $value) { - $value = null; - self::$_storedToken[$key] = $value; - } - } - - /** - * Returns the cache - * - * @return Zend_Cache_Core - */ - public static function getCache() - { - return self::$_cache; - } - - /** - * Set a cache for token - * - * @param Zend_Cache_Core $cache A cache frontend - */ - public static function setCache(Zend_Cache_Core $cache) - { - self::$_cache = $cache; - } - - /** - * Returns true when a cache is set - * - * @return boolean - */ - public static function hasCache() - { - return (self::$_cache !== null); - } - - /** - * Removes any cache - * - * @return void - */ - public static function removeCache() - { - self::$_cache = null; - } - - /** - * Clears all cache data - * - * @return void - */ - public static function clearCache() - { - $cache = self::getCache(); - if (method_exists($cache, 'clean')) { - $cache->clean(); - } - self::$_wsdlCache = null; - } - - /** - * Returns the wsdl cache - * - * @return integer - */ - public static function getWsdlCache() - { - return self::$_wsdlCache; - } - - /** - * Set a cache for wsdl file - * - * @param integer $cache - * @return void - */ - public static function setWsdlCache($cache = null) - { - self::$_wsdlCache = $cache; - } -} diff --git a/lib/Zend/Service/DeveloperGarden/SendSms.php b/lib/Zend/Service/DeveloperGarden/SendSms.php deleted file mode 100644 index 7cd3cf0570d..00000000000 --- a/lib/Zend/Service/DeveloperGarden/SendSms.php +++ /dev/null @@ -1,156 +0,0 @@ - 'Zend_Service_DeveloperGarden_Response_SendSms_SendSMSResponse', - 'sendFlashSMSResponse' => 'Zend_Service_DeveloperGarden_Response_SendSms_SendFlashSMSResponse' - ); - - /** - * this function creates the raw sms object that can be used to send an sms - * or as flash sms - * - * @param string $number - * @param string $message - * @param string $originator - * @param integer $account - * - * @return Zend_Service_DeveloperGarden_Request_SendSms_SendSMS - */ - public function createSms($number = null, $message = null, $originator = null, $account = null) - { - $request = new Zend_Service_DeveloperGarden_Request_SendSms_SendSMS($this->getEnvironment()); - $request->setNumber($number) - ->setMessage($message) - ->setOriginator($originator) - ->setAccount($account); - return $request; - } - - /** - * this function creates the raw sms object that can be used to send an sms - * or as flash sms - * - * @param string $number - * @param string $message - * @param string $originator - * @param integer $account - * - * @return Zend_Service_DeveloperGarden_Request_SendSms_SendFlashSMS - */ - public function createFlashSms($number = null, $message = null, $originator = null, $account = null) - { - $request = new Zend_Service_DeveloperGarden_Request_SendSms_SendFlashSMS($this->getEnvironment()); - $request->setNumber($number) - ->setMessage($message) - ->setOriginator($originator) - ->setAccount($account); - return $request; - } - - /** - * sends an sms with the given parameters - * - * @param Zend_Service_DeveloperGarden_Request_SendSms_SendSmsAbstract $sms - * - * @return Zend_Service_DeveloperGarden_Response_SendSms_SendSmsAbstract - */ - public function send(Zend_Service_DeveloperGarden_Request_SendSms_SendSmsAbstract $sms) - { - $client = $this->getSoapClient(); - $request = array( - 'request' => $sms - ); - switch ($sms->getSmsType()) { - // Sms - case 1 : - $response = $client->sendSms($request); - break; - // flashSms - case 2 : - $response = $client->sendFlashSms($request); - break; - default : { - #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php'; - throw new Zend_Service_DeveloperGarden_Client_Exception('Unknown SMS Type'); - } - } - - return $response->parse(); - } -} diff --git a/lib/Zend/Service/DeveloperGarden/SmsValidation.php b/lib/Zend/Service/DeveloperGarden/SmsValidation.php deleted file mode 100644 index 4034b57c3fe..00000000000 --- a/lib/Zend/Service/DeveloperGarden/SmsValidation.php +++ /dev/null @@ -1,193 +0,0 @@ - 'Zend_Service_DeveloperGarden_Response_SmsValidation_GetValidatedNumbersResponse', - 'ValidatedNumber' => 'Zend_Service_DeveloperGarden_Response_SmsValidation_ValidatedNumber', - 'sendValidationKeywordResponse' => 'Zend_Service_DeveloperGarden_Response_SmsValidation_SendValidationKeywordResponse', - 'validateResponse' => 'Zend_Service_DeveloperGarden_Response_SmsValidation_ValidateResponse', - 'invalidateResponse' => 'Zend_Service_DeveloperGarden_Response_SmsValidation_InvalidateResponse', - ); - - /** - * validate the given number with the keyword - * - * @param string $keyword - * @param string $number - * @return Zend_Service_DeveloperGarden_Response_SmsValidation_ValidateResponse - */ - public function validate($keyword = null, $number = null) - { - $request = new Zend_Service_DeveloperGarden_Request_SmsValidation_Validate( - $this->getEnvironment(), - $keyword, - $number - ); - - return $this->getSoapClient() - ->validate($request) - ->parse(); - } - - /** - * invalidate the given number - * - * @param string $number - * @return Zend_Service_DeveloperGarden_Response_SmsValidation_InvalidateResponse - */ - public function inValidate($number = null) - { - $request = new Zend_Service_DeveloperGarden_Request_SmsValidation_Invalidate( - $this->getEnvironment(), - $number - ); - - return $this->getSoapClient() - ->invalidate($request) - ->parse(); - } - - /** - * this function sends the validation sms to the given number, - * if message is provided it should have to placeholder: - * #key# = the validation key - * #validUntil# = the valid until date - * - * @param string $number - * @param string $message - * @param string $originator - * @param integer $account - * - * @return Zend_Service_DeveloperGarden_Request_SmsValidation_SendValidationKeywordResponse - */ - public function sendValidationKeyword($number = null, $message = null, $originator = null, $account = null) - { - $request = new Zend_Service_DeveloperGarden_Request_SmsValidation_SendValidationKeyword( - $this->getEnvironment() - ); - $request->setNumber($number) - ->setMessage($message) - ->setOriginator($originator) - ->setAccount($account); - - return $this->getSoapClient() - ->sendValidationKeyword($request) - ->parse(); - } - - /** - * returns a list of validated numbers - * - * @return Zend_Service_DeveloperGarden_Response_SmsValidation_GetValidatedNumbersResponse - */ - public function getValidatedNumbers() - { - $request = new Zend_Service_DeveloperGarden_Request_SmsValidation_GetValidatedNumbers( - $this->getEnvironment() - ); - return $this->getSoapClient() - ->getValidatedNumbers($request) - ->parse(); - } -// @codeCoverageIgnoreEnd -} diff --git a/lib/Zend/Service/DeveloperGarden/VoiceCall.php b/lib/Zend/Service/DeveloperGarden/VoiceCall.php deleted file mode 100644 index 27d2ac7b09d..00000000000 --- a/lib/Zend/Service/DeveloperGarden/VoiceCall.php +++ /dev/null @@ -1,226 +0,0 @@ - 'Zend_Service_DeveloperGarden_Response_VoiceButler_NewCallResponse', - 'newCallSequencedResponse' => 'Zend_Service_DeveloperGarden_Response_VoiceButler_NewCallSequencedResponse', - 'tearDownCallResponse' => 'Zend_Service_DeveloperGarden_Response_VoiceButler_TearDownCallResponse', - 'callStatusResponse' => 'Zend_Service_DeveloperGarden_Response_VoiceButler_CallStatusResponse', - 'callStatus2Response' => 'Zend_Service_DeveloperGarden_Response_VoiceButler_CallStatus2Response' - ); - - /** - * init a new call with the given params - * - * @param string $aNumber - * @param string $bNumber - * @param integer $expiration - * @param integer $maxDuration - * @param integer $account - * @param boolean $privacyA - * @param boolean $privacyB - * @param string $greeter - * @return Zend_Service_DeveloperGarden_Response_VoiceButler_NewCallResponse - */ - public function newCall($aNumber, $bNumber, $expiration, $maxDuration, - $account = null, $privacyA = null, $privacyB = null, $greeter = null - ) { - $request = new Zend_Service_DeveloperGarden_Request_VoiceButler_NewCall( - $this->getEnvironment() - ); - $request->setANumber($aNumber) - ->setBNumber($bNumber) - ->setPrivacyA($privacyA) - ->setPrivacyB($privacyB) - ->setExpiration($expiration) - ->setMaxDuration($maxDuration) - ->setGreeter($greeter) - ->setAccount($account); - $result = $this->getSoapClient()->newCall(array( - 'request' => $request - )); - - return $result->parse(); - } - - - /** - * init a new call with the given params but specially here, - * you can define a set of numbers to be called if the first number - * isnt reachable (ie: bNumber = +4930-111111,+4930-222222,+4930-333333) - * - * @throws Zend_Service_DeveloperGarden_Client_Exception - * @param string $aNumber - * @param array $bNumber - * @param integer $expiration - * @param integer $maxDuration - * @param integer $maxWait - * @param integer $account - * @param boolean $privacyA - * @param boolean $privacyB - * @param string $greeter - * @return Zend_Service_DeveloperGarden_Response_VoiceButler_NewCallSequencedResponse - */ - public function newCallSequenced($aNumber, $bNumber, $expiration, $maxDuration, - $maxWait, $account = null, $privacyA = null, $privacyB = null, $greeter = null - ) { - $request = new Zend_Service_DeveloperGarden_Request_VoiceButler_NewCallSequenced( - $this->getEnvironment() - ); - $request->setANumber($aNumber) - ->setBNumber($bNumber) - ->setPrivacyA($privacyA) - ->setPrivacyB($privacyB) - ->setExpiration($expiration) - ->setMaxDuration($maxDuration) - ->setMaxWait($maxWait) - ->setGreeter($greeter) - ->setAccount($account); - $result = $this->getSoapClient()->newCallSequenced(array( - 'request' => $request - )); - - return $result->parse(); - } - - /** - * This tear down the call with the given sessionId - * - * @param string $sessionId - * @return Zend_Service_DeveloperGarden_Response_VoiceButler_TearDownCallResponse - */ - public function tearDownCall($sessionId) - { - $request = new Zend_Service_DeveloperGarden_Request_VoiceButler_TearDownCall( - $this->getEnvironment(), - $sessionId - ); - $result = $this->getSoapClient()->tearDownCall(array( - 'request' => $request - )); - - return $result->parse(); - } - - /** - * checks the callStatus and updates the keepAlive if provided - * - * @param string $sessionId - * @param integer $keepAlive - * @return Zend_Service_DeveloperGarden_Response_VoiceButler_CallStatusResponse - */ - public function callStatus($sessionId, $keepAlive = null) - { - $request = new Zend_Service_DeveloperGarden_Request_VoiceButler_CallStatus( - $this->getEnvironment(), - $sessionId, - $keepAlive - ); - - $result = $this->getSoapClient()->callStatus2(array( - 'request' => $request - )); - - return $result->parse(); - } -} diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/IPLocation.wsdl b/lib/Zend/Service/DeveloperGarden/Wsdl/IPLocation.wsdl deleted file mode 100644 index 00ae436d318..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Wsdl/IPLocation.wsdl +++ /dev/null @@ -1,84 +0,0 @@ - - - -IP Location - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/IPLocation.xsd b/lib/Zend/Service/DeveloperGarden/Wsdl/IPLocation.xsd deleted file mode 100644 index 26284b3e8f6..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Wsdl/IPLocation.xsd +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.wsdl b/lib/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.wsdl deleted file mode 100644 index e630ea3d32d..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.wsdl +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.xsd b/lib/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.xsd deleted file mode 100644 index e263b21992b..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.xsd +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/SmsService.wsdl b/lib/Zend/Service/DeveloperGarden/Wsdl/SmsService.wsdl deleted file mode 100644 index f6d57290b46..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Wsdl/SmsService.wsdl +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/SmsValidationUserService.wsdl b/lib/Zend/Service/DeveloperGarden/Wsdl/SmsValidationUserService.wsdl deleted file mode 100644 index 18c2c7cda7d..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Wsdl/SmsValidationUserService.wsdl +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/TokenService.wsdl b/lib/Zend/Service/DeveloperGarden/Wsdl/TokenService.wsdl deleted file mode 100644 index 04d03ee45e8..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Wsdl/TokenService.wsdl +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - - - - - - - - - - - Telekom specific format id, e.g. there will be multiple - different token formats derived from SAML 2.0 Assertions - - - - - - - - - - - Telekom specific encoding id - there can be different - encoding formats for the same token format, e.g. SAML - Assertions can be encoded as plain XML or in - base64-encoding - - - - - - - - - - - - - - format of the token carried by the response, - determines syntax and processing rules for token - - - - - - - - encoding of the token carried by the response, - determines syntax and processing rules for token - - - - - - - - contains the string representation of the - security token - no further token format identifier - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - valid SAM Session Id - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.wsdl b/lib/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.wsdl deleted file mode 100644 index aad614e317e..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.wsdl +++ /dev/null @@ -1,164 +0,0 @@ - - VoiceButlerService - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.xsd b/lib/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.xsd deleted file mode 100644 index e14ba5a48a5..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.xsd +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/ccsPort.wsdl b/lib/Zend/Service/DeveloperGarden/Wsdl/ccsPort.wsdl deleted file mode 100644 index 07d9ed9424a..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Wsdl/ccsPort.wsdl +++ /dev/null @@ -1,463 +0,0 @@ - - - -CCS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/ccsPort.xsd b/lib/Zend/Service/DeveloperGarden/Wsdl/ccsPort.xsd deleted file mode 100644 index 149ba691041..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Wsdl/ccsPort.xsd +++ /dev/null @@ -1,736 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/localsearch.wsdl b/lib/Zend/Service/DeveloperGarden/Wsdl/localsearch.wsdl deleted file mode 100644 index 5258bfc7b5a..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Wsdl/localsearch.wsdl +++ /dev/null @@ -1,83 +0,0 @@ - - - -Local Search - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/localsearch.xsd b/lib/Zend/Service/DeveloperGarden/Wsdl/localsearch.xsd deleted file mode 100644 index 51684be499c..00000000000 --- a/lib/Zend/Service/DeveloperGarden/Wsdl/localsearch.xsd +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/Zend/Service/Technorati.php b/lib/Zend/Service/Technorati.php deleted file mode 100644 index b7a5c1be91d..00000000000 --- a/lib/Zend/Service/Technorati.php +++ /dev/null @@ -1,1035 +0,0 @@ -_apiKey = $apiKey; - } - - - /** - * Cosmos query lets you see what blogs are linking to a given URL. - * - * On the Technorati site, you can enter a URL in the searchbox and - * it will return a list of blogs linking to it. - * The API version allows more features and gives you a way - * to use the cosmos on your own site. - * - * Query options include: - * - * 'type' => (link|weblog) - * optional - A value of link returns the freshest links referencing your target URL. - * A value of weblog returns the last set of unique weblogs referencing your target URL. - * 'limit' => (int) - * optional - adjust the size of your result from the default value of 20 - * to between 1 and 100 results. - * 'start' => (int) - * optional - adjust the range of your result set. - * Set this number to larger than zero and you will receive - * the portion of Technorati's total result set ranging from start to start+limit. - * The default start value is 1. - * 'current' => (true|false) - * optional - the default setting of true - * Technorati returns links that are currently on a weblog's homepage. - * Set this parameter to false if you would like to receive all links - * to the given URL regardless of their current placement on the source blog. - * Internally the value is converted in (yes|no). - * 'claim' => (true|false) - * optional - the default setting of FALSE returns no user information - * about each weblog included in the result set when available. - * Set this parameter to FALSE to include Technorati member data - * in the result set when a weblog in your result set - * has been successfully claimed by a member of Technorati. - * Internally the value is converted in (int). - * 'highlight' => (true|false) - * optional - the default setting of TRUE - * highlights the citation of the given URL within the weblog excerpt. - * Set this parameter to FALSE to apply no special markup to the blog excerpt. - * Internally the value is converted in (int). - * - * @param string $url the URL you are searching for. Prefixes http:// and www. are optional. - * @param array $options additional parameters to refine your query - * @return Zend_Service_Technorati_CosmosResultSet - * @throws Zend_Service_Technorati_Exception - * @link http://technorati.com/developers/api/cosmos.html Technorati API: Cosmos Query reference - */ - public function cosmos($url, $options = null) - { - static $defaultOptions = array( 'type' => 'link', - 'start' => 1, - 'limit' => 20, - 'current' => 'yes', - 'format' => 'xml', - 'claim' => 0, - 'highlight' => 1, - ); - - $options['url'] = $url; - - $options = $this->_prepareOptions($options, $defaultOptions); - $this->_validateCosmos($options); - $response = $this->_makeRequest(self::API_PATH_COSMOS, $options); - $dom = $this->_convertResponseAndCheckContent($response); - - /** - * @see Zend_Service_Technorati_CosmosResultSet - */ - #require_once 'Zend/Service/Technorati/CosmosResultSet.php'; - return new Zend_Service_Technorati_CosmosResultSet($dom, $options); - } - - /** - * Search lets you see what blogs contain a given search string. - * - * Query options include: - * - * 'language' => (string) - * optional - a ISO 639-1 two character language code - * to retrieve results specific to that language. - * This feature is currently beta and may not work for all languages. - * 'authority' => (n|a1|a4|a7) - * optional - filter results to those from blogs with at least - * the Technorati Authority specified. - * Technorati calculates a blog's authority by how many people link to it. - * Filtering by authority is a good way to refine your search results. - * There are four settings: - * - n => Any authority: All results. - * - a1 => A little authority: Results from blogs with at least one link. - * - a4 => Some authority: Results from blogs with a handful of links. - * - a7 => A lot of authority: Results from blogs with hundreds of links. - * 'limit' => (int) - * optional - adjust the size of your result from the default value of 20 - * to between 1 and 100 results. - * 'start' => (int) - * optional - adjust the range of your result set. - * Set this number to larger than zero and you will receive - * the portion of Technorati's total result set ranging from start to start+limit. - * The default start value is 1. - * 'claim' => (true|false) - * optional - the default setting of FALSE returns no user information - * about each weblog included in the result set when available. - * Set this parameter to FALSE to include Technorati member data - * in the result set when a weblog in your result set - * has been successfully claimed by a member of Technorati. - * Internally the value is converted in (int). - * - * @param string $query the words you are searching for. - * @param array $options additional parameters to refine your query - * @return Zend_Service_Technorati_SearchResultSet - * @throws Zend_Service_Technorati_Exception - * @link http://technorati.com/developers/api/search.html Technorati API: Search Query reference - */ - public function search($query, $options = null) - { - static $defaultOptions = array( 'start' => 1, - 'limit' => 20, - 'format' => 'xml', - 'claim' => 0); - - $options['query'] = $query; - - $options = $this->_prepareOptions($options, $defaultOptions); - $this->_validateSearch($options); - $response = $this->_makeRequest(self::API_PATH_SEARCH, $options); - $dom = $this->_convertResponseAndCheckContent($response); - - /** - * @see Zend_Service_Technorati_SearchResultSet - */ - #require_once 'Zend/Service/Technorati/SearchResultSet.php'; - return new Zend_Service_Technorati_SearchResultSet($dom, $options); - } - - /** - * Tag lets you see what posts are associated with a given tag. - * - * Query options include: - * - * 'limit' => (int) - * optional - adjust the size of your result from the default value of 20 - * to between 1 and 100 results. - * 'start' => (int) - * optional - adjust the range of your result set. - * Set this number to larger than zero and you will receive - * the portion of Technorati's total result set ranging from start to start+limit. - * The default start value is 1. - * 'excerptsize' => (int) - * optional - number of word characters to include in the post excerpts. - * By default 100 word characters are returned. - * 'topexcerptsize' => (int) - * optional - number of word characters to include in the first post excerpt. - * By default 150 word characters are returned. - * - * @param string $tag the tag term you are searching posts for. - * @param array $options additional parameters to refine your query - * @return Zend_Service_Technorati_TagResultSet - * @throws Zend_Service_Technorati_Exception - * @link http://technorati.com/developers/api/tag.html Technorati API: Tag Query reference - */ - public function tag($tag, $options = null) - { - static $defaultOptions = array( 'start' => 1, - 'limit' => 20, - 'format' => 'xml', - 'excerptsize' => 100, - 'topexcerptsize' => 150); - - $options['tag'] = $tag; - - $options = $this->_prepareOptions($options, $defaultOptions); - $this->_validateTag($options); - $response = $this->_makeRequest(self::API_PATH_TAG, $options); - $dom = $this->_convertResponseAndCheckContent($response); - - /** - * @see Zend_Service_Technorati_TagResultSet - */ - #require_once 'Zend/Service/Technorati/TagResultSet.php'; - return new Zend_Service_Technorati_TagResultSet($dom, $options); - } - - /** - * TopTags provides daily counts of posts containing the queried keyword. - * - * Query options include: - * - * 'days' => (int) - * optional - Used to specify the number of days in the past - * to request daily count data for. - * Can be any integer between 1 and 180, default is 180 - * - * @param string $q the keyword query - * @param array $options additional parameters to refine your query - * @return Zend_Service_Technorati_DailyCountsResultSet - * @throws Zend_Service_Technorati_Exception - * @link http://technorati.com/developers/api/dailycounts.html Technorati API: DailyCounts Query reference - */ - public function dailyCounts($query, $options = null) - { - static $defaultOptions = array( 'days' => 180, - 'format' => 'xml' - ); - - $options['q'] = $query; - - $options = $this->_prepareOptions($options, $defaultOptions); - $this->_validateDailyCounts($options); - $response = $this->_makeRequest(self::API_PATH_DAILYCOUNTS, $options); - $dom = $this->_convertResponseAndCheckContent($response); - - /** - * @see Zend_Service_Technorati_DailyCountsResultSet - */ - #require_once 'Zend/Service/Technorati/DailyCountsResultSet.php'; - return new Zend_Service_Technorati_DailyCountsResultSet($dom); - } - - /** - * TopTags provides information on top tags indexed by Technorati. - * - * Query options include: - * - * 'limit' => (int) - * optional - adjust the size of your result from the default value of 20 - * to between 1 and 100 results. - * 'start' => (int) - * optional - adjust the range of your result set. - * Set this number to larger than zero and you will receive - * the portion of Technorati's total result set ranging from start to start+limit. - * The default start value is 1. - * - * @param array $options additional parameters to refine your query - * @return Zend_Service_Technorati_TagsResultSet - * @throws Zend_Service_Technorati_Exception - * @link http://technorati.com/developers/api/toptags.html Technorati API: TopTags Query reference - */ - public function topTags($options = null) - { - static $defaultOptions = array( 'start' => 1, - 'limit' => 20, - 'format' => 'xml' - ); - - $options = $this->_prepareOptions($options, $defaultOptions); - $this->_validateTopTags($options); - $response = $this->_makeRequest(self::API_PATH_TOPTAGS, $options); - $dom = $this->_convertResponseAndCheckContent($response); - - /** - * @see Zend_Service_Technorati_TagsResultSet - */ - #require_once 'Zend/Service/Technorati/TagsResultSet.php'; - return new Zend_Service_Technorati_TagsResultSet($dom); - } - - /** - * BlogInfo provides information on what blog, if any, is associated with a given URL. - * - * @param string $url the URL you are searching for. Prefixes http:// and www. are optional. - * The URL must be recognized by Technorati as a blog. - * @param array $options additional parameters to refine your query - * @return Zend_Service_Technorati_BlogInfoResult - * @throws Zend_Service_Technorati_Exception - * @link http://technorati.com/developers/api/bloginfo.html Technorati API: BlogInfo Query reference - */ - public function blogInfo($url, $options = null) - { - static $defaultOptions = array( 'format' => 'xml' - ); - - $options['url'] = $url; - - $options = $this->_prepareOptions($options, $defaultOptions); - $this->_validateBlogInfo($options); - $response = $this->_makeRequest(self::API_PATH_BLOGINFO, $options); - $dom = $this->_convertResponseAndCheckContent($response); - - /** - * @see Zend_Service_Technorati_BlogInfoResult - */ - #require_once 'Zend/Service/Technorati/BlogInfoResult.php'; - return new Zend_Service_Technorati_BlogInfoResult($dom); - } - - /** - * BlogPostTags provides information on the top tags used by a specific blog. - * - * Query options include: - * - * 'limit' => (int) - * optional - adjust the size of your result from the default value of 20 - * to between 1 and 100 results. - * 'start' => (int) - * optional - adjust the range of your result set. - * Set this number to larger than zero and you will receive - * the portion of Technorati's total result set ranging from start to start+limit. - * The default start value is 1. - * Note. This property is not documented. - * - * @param string $url the URL you are searching for. Prefixes http:// and www. are optional. - * The URL must be recognized by Technorati as a blog. - * @param array $options additional parameters to refine your query - * @return Zend_Service_Technorati_TagsResultSet - * @throws Zend_Service_Technorati_Exception - * @link http://technorati.com/developers/api/blogposttags.html Technorati API: BlogPostTags Query reference - */ - public function blogPostTags($url, $options = null) - { - static $defaultOptions = array( 'start' => 1, - 'limit' => 20, - 'format' => 'xml' - ); - - $options['url'] = $url; - - $options = $this->_prepareOptions($options, $defaultOptions); - $this->_validateBlogPostTags($options); - $response = $this->_makeRequest(self::API_PATH_BLOGPOSTTAGS, $options); - $dom = $this->_convertResponseAndCheckContent($response); - - /** - * @see Zend_Service_Technorati_TagsResultSet - */ - #require_once 'Zend/Service/Technorati/TagsResultSet.php'; - return new Zend_Service_Technorati_TagsResultSet($dom); - } - - /** - * GetInfo query tells you things that Technorati knows about a member. - * - * The returned info is broken up into two sections: - * The first part describes some information that the user wants - * to allow people to know about him- or herself. - * The second part of the document is a listing of the weblogs - * that the user has successfully claimed and the information - * that Technorati knows about these weblogs. - * - * @param string $username the Technorati user name you are searching for - * @param array $options additional parameters to refine your query - * @return Zend_Service_Technorati_GetInfoResult - * @throws Zend_Service_Technorati_Exception - * @link http://technorati.com/developers/api/getinfo.html Technorati API: GetInfo reference - */ - public function getInfo($username, $options = null) - { - static $defaultOptions = array('format' => 'xml'); - - $options['username'] = $username; - - $options = $this->_prepareOptions($options, $defaultOptions); - $this->_validateGetInfo($options); - $response = $this->_makeRequest(self::API_PATH_GETINFO, $options); - $dom = $this->_convertResponseAndCheckContent($response); - - /** - * @see Zend_Service_Technorati_GetInfoResult - */ - #require_once 'Zend/Service/Technorati/GetInfoResult.php'; - return new Zend_Service_Technorati_GetInfoResult($dom); - } - - /** - * KeyInfo query provides information on daily usage of an API key. - * Key Info Queries do not count against a key's daily query limit. - * - * A day is defined as 00:00-23:59 Pacific time. - * - * @return Zend_Service_Technorati_KeyInfoResult - * @throws Zend_Service_Technorati_Exception - * @link http://developers.technorati.com/wiki/KeyInfo Technorati API: Key Info reference - */ - public function keyInfo() - { - static $defaultOptions = array(); - - $options = $this->_prepareOptions(array(), $defaultOptions); - // you don't need to validate this request - // because key is the only mandatory element - // and it's already set in #_prepareOptions - $response = $this->_makeRequest(self::API_PATH_KEYINFO, $options); - $dom = $this->_convertResponseAndCheckContent($response); - - /** - * @see Zend_Service_Technorati_KeyInfoResult - */ - #require_once 'Zend/Service/Technorati/KeyInfoResult.php'; - return new Zend_Service_Technorati_KeyInfoResult($dom, $this->_apiKey); - } - - - /** - * Returns Technorati API key. - * - * @return string Technorati API key - */ - public function getApiKey() - { - return $this->_apiKey; - } - - /** - * Returns a reference to the REST client object in use. - * - * If the reference hasn't being inizialized yet, - * then a new Zend_Rest_Client instance is created. - * - * @return Zend_Rest_Client - */ - public function getRestClient() - { - if ($this->_restClient === null) { - /** - * @see Zend_Rest_Client - */ - #require_once 'Zend/Rest/Client.php'; - $this->_restClient = new Zend_Rest_Client(self::API_URI_BASE); - } - - return $this->_restClient; - } - - /** - * Sets Technorati API key. - * - * Be aware that this function doesn't validate the key. - * The key is validated as soon as the first API request is sent. - * If the key is invalid, the API request method will throw - * a Zend_Service_Technorati_Exception exception with Invalid Key message. - * - * @param string $key Technorati API Key - * @return void - * @link http://technorati.com/developers/apikey.html How to get your Technorati API Key - */ - public function setApiKey($key) - { - $this->_apiKey = $key; - return $this; - } - - - /** - * Validates Cosmos query options. - * - * @param array $options - * @return void - * @throws Zend_Service_Technorati_Exception - * @access protected - */ - protected function _validateCosmos(array $options) - { - static $validOptions = array('key', 'url', - 'type', 'limit', 'start', 'current', 'claim', 'highlight', 'format'); - - // Validate keys in the $options array - $this->_compareOptions($options, $validOptions); - // Validate url (required) - $this->_validateOptionUrl($options); - // Validate limit (optional) - $this->_validateOptionLimit($options); - // Validate start (optional) - $this->_validateOptionStart($options); - // Validate format (optional) - $this->_validateOptionFormat($options); - // Validate type (optional) - $this->_validateInArrayOption('type', $options, array('link', 'weblog')); - // Validate claim (optional) - $this->_validateOptionClaim($options); - // Validate highlight (optional) - $this->_validateIntegerOption('highlight', $options); - // Validate current (optional) - if (isset($options['current'])) { - $tmp = (int) $options['current']; - $options['current'] = $tmp ? 'yes' : 'no'; - } - - } - - /** - * Validates Search query options. - * - * @param array $options - * @return void - * @throws Zend_Service_Technorati_Exception - * @access protected - */ - protected function _validateSearch(array $options) - { - static $validOptions = array('key', 'query', - 'language', 'authority', 'limit', 'start', 'claim', 'format'); - - // Validate keys in the $options array - $this->_compareOptions($options, $validOptions); - // Validate query (required) - $this->_validateMandatoryOption('query', $options); - // Validate authority (optional) - $this->_validateInArrayOption('authority', $options, array('n', 'a1', 'a4', 'a7')); - // Validate limit (optional) - $this->_validateOptionLimit($options); - // Validate start (optional) - $this->_validateOptionStart($options); - // Validate claim (optional) - $this->_validateOptionClaim($options); - // Validate format (optional) - $this->_validateOptionFormat($options); - } - - /** - * Validates Tag query options. - * - * @param array $options - * @return void - * @throws Zend_Service_Technorati_Exception - * @access protected - */ - protected function _validateTag(array $options) - { - static $validOptions = array('key', 'tag', - 'limit', 'start', 'excerptsize', 'topexcerptsize', 'format'); - - // Validate keys in the $options array - $this->_compareOptions($options, $validOptions); - // Validate query (required) - $this->_validateMandatoryOption('tag', $options); - // Validate limit (optional) - $this->_validateOptionLimit($options); - // Validate start (optional) - $this->_validateOptionStart($options); - // Validate excerptsize (optional) - $this->_validateIntegerOption('excerptsize', $options); - // Validate excerptsize (optional) - $this->_validateIntegerOption('topexcerptsize', $options); - // Validate format (optional) - $this->_validateOptionFormat($options); - } - - - /** - * Validates DailyCounts query options. - * - * @param array $options - * @return void - * @throws Zend_Service_Technorati_Exception - * @access protected - */ - protected function _validateDailyCounts(array $options) - { - static $validOptions = array('key', 'q', - 'days', 'format'); - - // Validate keys in the $options array - $this->_compareOptions($options, $validOptions); - // Validate q (required) - $this->_validateMandatoryOption('q', $options); - // Validate format (optional) - $this->_validateOptionFormat($options); - // Validate days (optional) - if (isset($options['days'])) { - $options['days'] = (int) $options['days']; - if ($options['days'] < self::PARAM_DAYS_MIN_VALUE || - $options['days'] > self::PARAM_DAYS_MAX_VALUE) { - /** - * @see Zend_Service_Technorati_Exception - */ - #require_once 'Zend/Service/Technorati/Exception.php'; - throw new Zend_Service_Technorati_Exception( - "Invalid value '" . $options['days'] . "' for 'days' option"); - } - } - } - - /** - * Validates GetInfo query options. - * - * @param array $options - * @return void - * @throws Zend_Service_Technorati_Exception - * @access protected - */ - protected function _validateGetInfo(array $options) - { - static $validOptions = array('key', 'username', - 'format'); - - // Validate keys in the $options array - $this->_compareOptions($options, $validOptions); - // Validate username (required) - $this->_validateMandatoryOption('username', $options); - // Validate format (optional) - $this->_validateOptionFormat($options); - } - - /** - * Validates TopTags query options. - * - * @param array $options - * @return void - * @throws Zend_Service_Technorati_Exception - * @access protected - */ - protected function _validateTopTags(array $options) - { - static $validOptions = array('key', - 'limit', 'start', 'format'); - - // Validate keys in the $options array - $this->_compareOptions($options, $validOptions); - // Validate limit (optional) - $this->_validateOptionLimit($options); - // Validate start (optional) - $this->_validateOptionStart($options); - // Validate format (optional) - $this->_validateOptionFormat($options); - } - - /** - * Validates BlogInfo query options. - * - * @param array $options - * @return void - * @throws Zend_Service_Technorati_Exception - * @access protected - */ - protected function _validateBlogInfo(array $options) - { - static $validOptions = array('key', 'url', - 'format'); - - // Validate keys in the $options array - $this->_compareOptions($options, $validOptions); - // Validate url (required) - $this->_validateOptionUrl($options); - // Validate format (optional) - $this->_validateOptionFormat($options); - } - - /** - * Validates TopTags query options. - * - * @param array $options - * @return void - * @throws Zend_Service_Technorati_Exception - * @access protected - */ - protected function _validateBlogPostTags(array $options) - { - static $validOptions = array('key', 'url', - 'limit', 'start', 'format'); - - // Validate keys in the $options array - $this->_compareOptions($options, $validOptions); - // Validate url (required) - $this->_validateOptionUrl($options); - // Validate limit (optional) - $this->_validateOptionLimit($options); - // Validate start (optional) - $this->_validateOptionStart($options); - // Validate format (optional) - $this->_validateOptionFormat($options); - } - - /** - * Checks whether an option is in a given array. - * - * @param string $name option name - * @param array $options - * @param array $array array of valid options - * @return void - * @throws Zend_Service_Technorati_Exception - * @access protected - */ - protected function _validateInArrayOption($name, $options, array $array) - { - if (isset($options[$name]) && !in_array($options[$name], $array)) { - /** - * @see Zend_Service_Technorati_Exception - */ - #require_once 'Zend/Service/Technorati/Exception.php'; - throw new Zend_Service_Technorati_Exception( - "Invalid value '{$options[$name]}' for '$name' option"); - } - } - - /** - * Checks whether mandatory $name option exists and it's valid. - * - * @param array $options - * @return void - * @throws Zend_Service_Technorati_Exception - * @access protected - */ - protected function _validateMandatoryOption($name, $options) - { - if (!isset($options[$name]) || !trim($options[$name])) { - /** - * @see Zend_Service_Technorati_Exception - */ - #require_once 'Zend/Service/Technorati/Exception.php'; - throw new Zend_Service_Technorati_Exception( - "Empty value for '$name' option"); - } - } - - /** - * Checks whether $name option is a valid integer and casts it. - * - * @param array $options - * @return void - * @access protected - */ - protected function _validateIntegerOption($name, $options) - { - if (isset($options[$name])) { - $options[$name] = (int) $options[$name]; - } - } - - /** - * Makes and HTTP GET request to given $path with $options. - * HTTP Response is first validated, then returned. - * - * @param string $path - * @param array $options - * @return Zend_Http_Response - * @throws Zend_Service_Technorati_Exception on failure - * @access protected - */ - protected function _makeRequest($path, $options = array()) - { - $restClient = $this->getRestClient(); - $restClient->getHttpClient()->resetParameters(); - $response = $restClient->restGet($path, $options); - self::_checkResponse($response); - return $response; - } - - /** - * Checks whether 'claim' option value is valid. - * - * @param array $options - * @return void - * @access protected - */ - protected function _validateOptionClaim(array $options) - { - $this->_validateIntegerOption('claim', $options); - } - - /** - * Checks whether 'format' option value is valid. - * Be aware that Zend_Service_Technorati supports only XML as format value. - * - * @param array $options - * @return void - * @throws Zend_Service_Technorati_Exception if 'format' value != XML - * @access protected - */ - protected function _validateOptionFormat(array $options) - { - if (isset($options['format']) && $options['format'] != 'xml') { - /** - * @see Zend_Service_Technorati_Exception - */ - #require_once 'Zend/Service/Technorati/Exception.php'; - throw new Zend_Service_Technorati_Exception( - "Invalid value '" . $options['format'] . "' for 'format' option. " . - "Zend_Service_Technorati supports only 'xml'"); - } - } - - /** - * Checks whether 'limit' option value is valid. - * Value must be an integer greater than PARAM_LIMIT_MIN_VALUE - * and lower than PARAM_LIMIT_MAX_VALUE. - * - * @param array $options - * @return void - * @throws Zend_Service_Technorati_Exception if 'limit' value is invalid - * @access protected - */ - protected function _validateOptionLimit(array $options) - { - if (!isset($options['limit'])) return; - - $options['limit'] = (int) $options['limit']; - if ($options['limit'] < self::PARAM_LIMIT_MIN_VALUE || - $options['limit'] > self::PARAM_LIMIT_MAX_VALUE) { - /** - * @see Zend_Service_Technorati_Exception - */ - #require_once 'Zend/Service/Technorati/Exception.php'; - throw new Zend_Service_Technorati_Exception( - "Invalid value '" . $options['limit'] . "' for 'limit' option"); - } - } - - /** - * Checks whether 'start' option value is valid. - * Value must be an integer greater than 0. - * - * @param array $options - * @return void - * @throws Zend_Service_Technorati_Exception if 'start' value is invalid - * @access protected - */ - protected function _validateOptionStart(array $options) - { - if (!isset($options['start'])) return; - - $options['start'] = (int) $options['start']; - if ($options['start'] < self::PARAM_START_MIN_VALUE) { - /** - * @see Zend_Service_Technorati_Exception - */ - #require_once 'Zend/Service/Technorati/Exception.php'; - throw new Zend_Service_Technorati_Exception( - "Invalid value '" . $options['start'] . "' for 'start' option"); - } - } - - /** - * Checks whether 'url' option value exists and is valid. - * 'url' must be a valid HTTP(s) URL. - * - * @param array $options - * @return void - * @throws Zend_Service_Technorati_Exception if 'url' value is invalid - * @access protected - * @todo support for Zend_Uri_Http - */ - protected function _validateOptionUrl(array $options) - { - $this->_validateMandatoryOption('url', $options); - } - - /** - * Checks XML response content for errors. - * - * @param DomDocument $dom the XML response as a DOM document - * @return void - * @throws Zend_Service_Technorati_Exception - * @link http://technorati.com/developers/api/error.html Technorati API: Error response - * @access protected - */ - protected static function _checkErrors(DomDocument $dom) - { - $xpath = new DOMXPath($dom); - - $result = $xpath->query("/tapi/document/result/error"); - if ($result->length >= 1) { - $error = $result->item(0)->nodeValue; - /** - * @see Zend_Service_Technorati_Exception - */ - #require_once 'Zend/Service/Technorati/Exception.php'; - throw new Zend_Service_Technorati_Exception($error); - } - } - - /** - * Converts $response body to a DOM object and checks it. - * - * @param Zend_Http_Response $response - * @return DOMDocument - * @throws Zend_Service_Technorati_Exception if response content contains an error message - * @access protected - */ - protected function _convertResponseAndCheckContent(Zend_Http_Response $response) - { - $dom = new DOMDocument(); - $dom = Zend_Xml_Security::scan($response->getBody(), $dom); - self::_checkErrors($dom); - return $dom; - } - - /** - * Checks ReST response for errors. - * - * @param Zend_Http_Response $response the ReST response - * @return void - * @throws Zend_Service_Technorati_Exception - * @access protected - */ - protected static function _checkResponse(Zend_Http_Response $response) - { - if ($response->isError()) { - /** - * @see Zend_Service_Technorati_Exception - */ - #require_once 'Zend/Service/Technorati/Exception.php'; - throw new Zend_Service_Technorati_Exception(sprintf( - 'Invalid response status code (HTTP/%s %s %s)', - $response->getVersion(), $response->getStatus(), $response->getMessage())); - } - } - - /** - * Checks whether user given options are valid. - * - * @param array $options user options - * @param array $validOptions valid options - * @return void - * @throws Zend_Service_Technorati_Exception - * @access protected - */ - protected function _compareOptions(array $options, array $validOptions) - { - $difference = array_diff(array_keys($options), $validOptions); - if ($difference) { - /** - * @see Zend_Service_Technorati_Exception - */ - #require_once 'Zend/Service/Technorati/Exception.php'; - throw new Zend_Service_Technorati_Exception( - "The following parameters are invalid: '" . - implode("', '", $difference) . "'"); - } - } - - /** - * Prepares options for the request - * - * @param array $options user options - * @param array $defaultOptions default options - * @return array Merged array of user and default/required options. - * @access protected - */ - protected function _prepareOptions($options, array $defaultOptions) - { - $options = (array) $options; // force cast to convert null to array() - $options['key'] = $this->_apiKey; - $options = array_merge($defaultOptions, $options); - return $options; - } -} diff --git a/lib/Zend/Service/Technorati/Author.php b/lib/Zend/Service/Technorati/Author.php deleted file mode 100644 index 5119f7e7923..00000000000 --- a/lib/Zend/Service/Technorati/Author.php +++ /dev/null @@ -1,242 +0,0 @@ -ownerDocument); - - $result = $xpath->query('./firstname/text()', $dom); - if ($result->length == 1) $this->setFirstName($result->item(0)->data); - - $result = $xpath->query('./lastname/text()', $dom); - if ($result->length == 1) $this->setLastName($result->item(0)->data); - - $result = $xpath->query('./username/text()', $dom); - if ($result->length == 1) $this->setUsername($result->item(0)->data); - - $result = $xpath->query('./description/text()', $dom); - if ($result->length == 1) $this->setDescription($result->item(0)->data); - - $result = $xpath->query('./bio/text()', $dom); - if ($result->length == 1) $this->setBio($result->item(0)->data); - - $result = $xpath->query('./thumbnailpicture/text()', $dom); - if ($result->length == 1) $this->setThumbnailPicture($result->item(0)->data); - } - - - /** - * Returns Author first name. - * - * @return string Author first name - */ - public function getFirstName() { - return $this->_firstName; - } - - /** - * Returns Author last name. - * - * @return string Author last name - */ - public function getLastName() { - return $this->_lastName; - } - - /** - * Returns Technorati account username. - * - * @return string Technorati account username - */ - public function getUsername() { - return $this->_username; - } - - /** - * Returns Technorati account description. - * - * @return string Technorati account description - */ - public function getDescription() { - return $this->_description; - } - - /** - * Returns Technorati account biography. - * - * @return string Technorati account biography - */ - public function getBio() { - return $this->_bio; - } - - /** - * Returns Technorati account thumbnail picture. - * - * @return null|Zend_Uri_Http Technorati account thumbnail picture - */ - public function getThumbnailPicture() { - return $this->_thumbnailPicture; - } - - - /** - * Sets author first name. - * - * @param string $input first Name input value - * @return Zend_Service_Technorati_Author $this instance - */ - public function setFirstName($input) { - $this->_firstName = (string) $input; - return $this; - } - - /** - * Sets author last name. - * - * @param string $input last Name input value - * @return Zend_Service_Technorati_Author $this instance - */ - public function setLastName($input) { - $this->_lastName = (string) $input; - return $this; - } - - /** - * Sets Technorati account username. - * - * @param string $input username input value - * @return Zend_Service_Technorati_Author $this instance - */ - public function setUsername($input) { - $this->_username = (string) $input; - return $this; - } - - /** - * Sets Technorati account biography. - * - * @param string $input biography input value - * @return Zend_Service_Technorati_Author $this instance - */ - public function setBio($input) { - $this->_bio = (string) $input; - return $this; - } - - /** - * Sets Technorati account description. - * - * @param string $input description input value - * @return Zend_Service_Technorati_Author $this instance - */ - public function setDescription($input) { - $this->_description = (string) $input; - return $this; - } - - /** - * Sets Technorati account thumbnail picture. - * - * @param string|Zend_Uri_Http $input thumbnail picture URI - * @return Zend_Service_Technorati_Author $this instance - * @throws Zend_Service_Technorati_Exception if $input is an invalid URI - * (via Zend_Service_Technorati_Utils::normalizeUriHttp) - */ - public function setThumbnailPicture($input) { - $this->_thumbnailPicture = Zend_Service_Technorati_Utils::normalizeUriHttp($input); - return $this; - } - -} diff --git a/lib/Zend/Service/Technorati/BlogInfoResult.php b/lib/Zend/Service/Technorati/BlogInfoResult.php deleted file mode 100644 index be1c780955f..00000000000 --- a/lib/Zend/Service/Technorati/BlogInfoResult.php +++ /dev/null @@ -1,161 +0,0 @@ -query('//result/weblog'); - if ($result->length == 1) { - $this->_weblog = new Zend_Service_Technorati_Weblog($result->item(0)); - } else { - // follow the same behavior of blogPostTags - // and raise an Exception if the URL is not a valid weblog - /** - * @see Zend_Service_Technorati_Exception - */ - #require_once 'Zend/Service/Technorati/Exception.php'; - throw new Zend_Service_Technorati_Exception( - "Your URL is not a recognized Technorati weblog"); - } - - $result = $xpath->query('//result/url/text()'); - if ($result->length == 1) { - try { - // fetched URL often doens't include schema - // and this issue causes the following line to fail - $this->_url = Zend_Service_Technorati_Utils::normalizeUriHttp($result->item(0)->data); - } catch(Zend_Service_Technorati_Exception $e) { - if ($this->getWeblog() instanceof Zend_Service_Technorati_Weblog) { - $this->_url = $this->getWeblog()->getUrl(); - } - } - } - - $result = $xpath->query('//result/inboundblogs/text()'); - if ($result->length == 1) $this->_inboundBlogs = (int) $result->item(0)->data; - - $result = $xpath->query('//result/inboundlinks/text()'); - if ($result->length == 1) $this->_inboundLinks = (int) $result->item(0)->data; - - } - - - /** - * Returns the weblog URL. - * - * @return Zend_Uri_Http - */ - public function getUrl() { - return $this->_url; - } - - /** - * Returns the weblog. - * - * @return Zend_Service_Technorati_Weblog - */ - public function getWeblog() { - return $this->_weblog; - } - - /** - * Returns number of unique blogs linking this blog. - * - * @return integer the number of inbound blogs - */ - public function getInboundBlogs() - { - return (int) $this->_inboundBlogs; - } - - /** - * Returns number of incoming links to this blog. - * - * @return integer the number of inbound links - */ - public function getInboundLinks() - { - return (int) $this->_inboundLinks; - } - -} diff --git a/lib/Zend/Service/Technorati/CosmosResult.php b/lib/Zend/Service/Technorati/CosmosResult.php deleted file mode 100644 index 49a2dce4aea..00000000000 --- a/lib/Zend/Service/Technorati/CosmosResult.php +++ /dev/null @@ -1,152 +0,0 @@ -_fields = array( '_nearestPermalink' => 'nearestpermalink', - '_excerpt' => 'excerpt', - '_linkCreated' => 'linkcreated', - '_linkUrl' => 'linkurl'); - parent::__construct($dom); - - // weblog object field - $this->_parseWeblog(); - - // filter fields - $this->_nearestPermalink = Zend_Service_Technorati_Utils::normalizeUriHttp($this->_nearestPermalink); - $this->_linkUrl = Zend_Service_Technorati_Utils::normalizeUriHttp($this->_linkUrl); - $this->_linkCreated = Zend_Service_Technorati_Utils::normalizeDate($this->_linkCreated); - } - - /** - * Returns the weblog object that links queried URL. - * - * @return Zend_Service_Technorati_Weblog - */ - public function getWeblog() { - return $this->_weblog; - } - - /** - * Returns the nearest permalink tracked for queried URL. - * - * @return Zend_Uri_Http - */ - public function getNearestPermalink() { - return $this->_nearestPermalink; - } - - /** - * Returns the excerpt of the blog/page linking queried URL. - * - * @return string - */ - public function getExcerpt() { - return $this->_excerpt; - } - - /** - * Returns the datetime the link was created. - * - * @return Zend_Date - */ - public function getLinkCreated() { - return $this->_linkCreated; - } - - /** - * If queried URL is a valid blog, - * returns the URL of the specific link target page. - * - * @return Zend_Uri_Http - */ - public function getLinkUrl() { - return $this->_linkUrl; - } - -} diff --git a/lib/Zend/Service/Technorati/CosmosResultSet.php b/lib/Zend/Service/Technorati/CosmosResultSet.php deleted file mode 100644 index ae69de4ba0b..00000000000 --- a/lib/Zend/Service/Technorati/CosmosResultSet.php +++ /dev/null @@ -1,176 +0,0 @@ -_xpath->query('/tapi/document/result/inboundlinks/text()'); - if ($result->length == 1) $this->_inboundLinks = (int) $result->item(0)->data; - - $result = $this->_xpath->query('/tapi/document/result/inboundblogs/text()'); - if ($result->length == 1) $this->_inboundBlogs = (int) $result->item(0)->data; - - $result = $this->_xpath->query('/tapi/document/result/weblog'); - if ($result->length == 1) { - /** - * @see Zend_Service_Technorati_Weblog - */ - #require_once 'Zend/Service/Technorati/Weblog.php'; - $this->_weblog = new Zend_Service_Technorati_Weblog($result->item(0)); - } - - $result = $this->_xpath->query('/tapi/document/result/url/text()'); - if ($result->length == 1) { - try { - // fetched URL often doens't include schema - // and this issue causes the following line to fail - $this->_url = Zend_Service_Technorati_Utils::normalizeUriHttp($result->item(0)->data); - } catch(Zend_Service_Technorati_Exception $e) { - if ($this->getWeblog() instanceof Zend_Service_Technorati_Weblog) { - $this->_url = $this->getWeblog()->getUrl(); - } - } - } - - $this->_totalResultsReturned = (int) $this->_xpath->evaluate("count(/tapi/document/item)"); - - // total number of results depends on query type - // for now check only getInboundLinks() and getInboundBlogs() value - if ((int) $this->getInboundLinks() > 0) { - $this->_totalResultsAvailable = $this->getInboundLinks(); - } elseif ((int) $this->getInboundBlogs() > 0) { - $this->_totalResultsAvailable = $this->getInboundBlogs(); - } else { - $this->_totalResultsAvailable = 0; - } - } - - - /** - * Returns the weblog URL. - * - * @return Zend_Uri_Http - */ - public function getUrl() { - return $this->_url; - } - - /** - * Returns the weblog. - * - * @return Zend_Service_Technorati_Weblog - */ - public function getWeblog() { - return $this->_weblog; - } - - /** - * Returns number of unique blogs linking this blog. - * - * @return integer the number of inbound blogs - */ - public function getInboundBlogs() - { - return $this->_inboundBlogs; - } - - /** - * Returns number of incoming links to this blog. - * - * @return integer the number of inbound links - */ - public function getInboundLinks() - { - return $this->_inboundLinks; - } - - /** - * Implements Zend_Service_Technorati_ResultSet::current(). - * - * @return Zend_Service_Technorati_CosmosResult current result - */ - public function current() - { - /** - * @see Zend_Service_Technorati_CosmosResult - */ - #require_once 'Zend/Service/Technorati/CosmosResult.php'; - return new Zend_Service_Technorati_CosmosResult($this->_results->item($this->_currentIndex)); - } -} diff --git a/lib/Zend/Service/Technorati/DailyCountsResult.php b/lib/Zend/Service/Technorati/DailyCountsResult.php deleted file mode 100644 index 63e8787ab2b..00000000000 --- a/lib/Zend/Service/Technorati/DailyCountsResult.php +++ /dev/null @@ -1,93 +0,0 @@ -_fields = array( '_date' => 'date', - '_count' => 'count'); - parent::__construct($dom); - - // filter fields - $this->_date = new Zend_Date(strtotime($this->_date)); - $this->_count = (int) $this->_count; - } - - /** - * Returns the date of count. - * - * @return Zend_Date - */ - public function getDate() { - return $this->_date; - } - - /** - * Returns the number of posts containing query on given date. - * - * @return int - */ - public function getCount() { - return $this->_count; - } -} diff --git a/lib/Zend/Service/Technorati/DailyCountsResultSet.php b/lib/Zend/Service/Technorati/DailyCountsResultSet.php deleted file mode 100644 index a03fbaae07c..00000000000 --- a/lib/Zend/Service/Technorati/DailyCountsResultSet.php +++ /dev/null @@ -1,125 +0,0 @@ -_xpath->query('/tapi/document/result/days/text()'); - if ($result->length == 1) $this->_days = (int) $result->item(0)->data; - - $result = $this->_xpath->query('/tapi/document/result/searchurl/text()'); - if ($result->length == 1) { - $this->_searchUrl = Zend_Service_Technorati_Utils::normalizeUriHttp($result->item(0)->data); - } - - $this->_totalResultsReturned = (int) $this->_xpath->evaluate("count(/tapi/document/items/item)"); - $this->_totalResultsAvailable = (int) $this->getDays(); - } - - - /** - * Returns the search URL for given query. - * - * @return Zend_Uri_Http - */ - public function getSearchUrl() { - return $this->_searchUrl; - } - - /** - * Returns the number of days for which counts provided. - * - * @return int - */ - public function getDays() { - return $this->_days; - } - - /** - * Implements Zend_Service_Technorati_ResultSet::current(). - * - * @return Zend_Service_Technorati_DailyCountsResult current result - */ - public function current() - { - /** - * @see Zend_Service_Technorati_DailyCountsResult - */ - #require_once 'Zend/Service/Technorati/DailyCountsResult.php'; - return new Zend_Service_Technorati_DailyCountsResult($this->_results->item($this->_currentIndex)); - } -} diff --git a/lib/Zend/Service/Technorati/GetInfoResult.php b/lib/Zend/Service/Technorati/GetInfoResult.php deleted file mode 100644 index 5025bbc203d..00000000000 --- a/lib/Zend/Service/Technorati/GetInfoResult.php +++ /dev/null @@ -1,103 +0,0 @@ -query('//result'); - if ($result->length == 1) { - $this->_author = new Zend_Service_Technorati_Author($result->item(0)); - } - - /** - * @see Zend_Service_Technorati_Weblog - */ - #require_once 'Zend/Service/Technorati/Weblog.php'; - - $result = $xpath->query('//item/weblog'); - if ($result->length >= 1) { - foreach ($result as $weblog) { - $this->_weblogs[] = new Zend_Service_Technorati_Weblog($weblog); - } - } - } - - - /** - * Returns the author associated with queried username. - * - * @return Zend_Service_Technorati_Author - */ - public function getAuthor() { - return $this->_author; - } - - /** - * Returns the collection of weblogs authored by queried username. - * - * @return array of Zend_Service_Technorati_Weblog - */ - public function getWeblogs() { - return $this->_weblogs; - } - -} diff --git a/lib/Zend/Service/Technorati/KeyInfoResult.php b/lib/Zend/Service/Technorati/KeyInfoResult.php deleted file mode 100644 index 6f4d09d2d10..00000000000 --- a/lib/Zend/Service/Technorati/KeyInfoResult.php +++ /dev/null @@ -1,118 +0,0 @@ -_dom = $dom; - // $this->_xpath = new DOMXPath($dom); - $xpath = new DOMXPath($dom); - - $this->_apiQueries = (int) $xpath->query('/tapi/document/result/apiqueries/text()')->item(0)->data; - $this->_maxQueries = (int) $xpath->query('/tapi/document/result/maxqueries/text()')->item(0)->data; - $this->setApiKey($apiKey); - } - - - /** - * Returns API Key string. - * - * @return string API Key string - */ - public function getApiKey() { - return $this->_apiKey; - } - - /** - * Returns the number of queries sent today. - * - * @return int number of queries sent today - */ - public function getApiQueries() { - return $this->_apiQueries; - } - - /** - * Returns Key's daily query limit. - * - * @return int maximum number of available queries per day - */ - public function getMaxQueries() { - return $this->_maxQueries; - } - - - /** - * Sets API Key string. - * - * @param string $apiKey the API Key - * @return Zend_Service_Technorati_KeyInfoResult $this instance - */ - public function setApiKey($apiKey) { - $this->_apiKey = $apiKey; - return $this; - } -} diff --git a/lib/Zend/Service/Technorati/Result.php b/lib/Zend/Service/Technorati/Result.php deleted file mode 100644 index d63fc971e4b..00000000000 --- a/lib/Zend/Service/Technorati/Result.php +++ /dev/null @@ -1,121 +0,0 @@ - 'xmlfieldtag' - * - * @var array - * @access protected - */ - protected $_fields; - - /** - * The ReST fragment for this result object - * - * @var DomElement - * @access protected - */ - protected $_dom; - - /** - * Object for $this->_dom - * - * @var DOMXpath - * @access protected - */ - protected $_xpath; - - - /** - * Constructs a new object from DOM Element. - * Properties are automatically fetched from XML - * according to array of $_fields to be read. - * - * @param DomElement $result the ReST fragment for this object - */ - public function __construct(DomElement $dom) - { - $this->_xpath = new DOMXPath($dom->ownerDocument); - $this->_dom = $dom; - - // default fields for all search results - $fields = array(); - - // merge with child's object fields - $this->_fields = array_merge($this->_fields, $fields); - - // add results to appropriate fields - foreach($this->_fields as $phpName => $xmlName) { - $query = "./$xmlName/text()"; - $node = $this->_xpath->query($query, $this->_dom); - if ($node->length == 1) { - $this->{$phpName} = (string) $node->item(0)->data; - } - } - } - - /** - * Parses weblog node and sets weblog object. - * - * @return void - */ - protected function _parseWeblog() - { - // weblog object field - $result = $this->_xpath->query('./weblog', $this->_dom); - if ($result->length == 1) { - /** - * @see Zend_Service_Technorati_Weblog - */ - #require_once 'Zend/Service/Technorati/Weblog.php'; - $this->_weblog = new Zend_Service_Technorati_Weblog($result->item(0)); - } else { - $this->_weblog = null; - } - } - - /** - * Returns the document fragment for this object as XML string. - * - * @return string the document fragment for this object - * converted into XML format - */ - public function getXml() - { - return $this->_dom->ownerDocument->saveXML($this->_dom); - } -} diff --git a/lib/Zend/Service/Technorati/ResultSet.php b/lib/Zend/Service/Technorati/ResultSet.php deleted file mode 100644 index bb6bf4b6a9f..00000000000 --- a/lib/Zend/Service/Technorati/ResultSet.php +++ /dev/null @@ -1,289 +0,0 @@ -_dom - * - * @var DOMXpath - * @access protected - */ - protected $_xpath; - - /** - * XML string representation for $this->_dom - * - * @var string - * @access protected - */ - protected $_xml; - - /** - * Current Item - * - * @var int - * @access protected - */ - protected $_currentIndex = 0; - - - /** - * Parses the search response and retrieves the results for iteration. - * - * @param DomDocument $dom the ReST fragment for this object - * @param array $options query options as associative array - */ - public function __construct(DomDocument $dom, $options = array()) - { - $this->_init($dom, $options); - - // Technorati loves to make developer's life really hard - // I must read query options in order to normalize a single way - // to display start and limit. - // The value is printed out in XML using many different tag names, - // too hard to get it from XML - - // Additionally, the following tags should be always available - // according to API documentation but... this is not the truth! - // - querytime - // - limit - // - start (sometimes rankingstart) - - // query tag is only available for some requests, the same for url. - // For now ignore them. - - //$start = isset($options['start']) ? $options['start'] : 1; - //$limit = isset($options['limit']) ? $options['limit'] : 20; - //$this->_firstResultPosition = $start; - } - - /** - * Initializes this object from a DomDocument response. - * - * Because __construct and __wakeup shares some common executions, - * it's useful to group them in a single initialization method. - * This method is called once each time a new instance is created - * or a serialized object is unserialized. - * - * @param DomDocument $dom the ReST fragment for this object - * @param array $options query options as associative array - * * @return void - */ - protected function _init(DomDocument $dom, $options = array()) - { - $this->_dom = $dom; - $this->_xpath = new DOMXPath($dom); - - $this->_results = $this->_xpath->query("//item"); - } - - /** - * Number of results returned. - * - * @return int total number of results returned - */ - public function totalResults() - { - return (int) $this->_totalResultsReturned; - } - - - /** - * Number of available results. - * - * @return int total number of available results - */ - public function totalResultsAvailable() - { - return (int) $this->_totalResultsAvailable; - } - - /** - * Implements SeekableIterator::current(). - * - * @return void - * @throws Zend_Service_Exception - * @abstract - */ - // abstract public function current(); - - /** - * Implements SeekableIterator::key(). - * - * @return int - */ - public function key() - { - return $this->_currentIndex; - } - - /** - * Implements SeekableIterator::next(). - * - * @return void - */ - public function next() - { - $this->_currentIndex += 1; - } - - /** - * Implements SeekableIterator::rewind(). - * - * @return bool - */ - public function rewind() - { - $this->_currentIndex = 0; - return true; - } - - /** - * Implement SeekableIterator::seek(). - * - * @param int $index - * @return void - * @throws OutOfBoundsException - */ - public function seek($index) - { - $indexInt = (int) $index; - if ($indexInt >= 0 && $indexInt < $this->_results->length) { - $this->_currentIndex = $indexInt; - } else { - throw new OutOfBoundsException("Illegal index '$index'"); - } - } - - /** - * Implement SeekableIterator::valid(). - * - * @return boolean - */ - public function valid() - { - return null !== $this->_results && $this->_currentIndex < $this->_results->length; - } - - /** - * Returns the response document as XML string. - * - * @return string the response document converted into XML format - */ - public function getXml() - { - return $this->_dom->saveXML(); - } - - /** - * Overwrites standard __sleep method to make this object serializable. - * - * DomDocument and DOMXpath objects cannot be serialized. - * This method converts them back to an XML string. - * - * @return void - */ - public function __sleep() { - $this->_xml = $this->getXml(); - $vars = array_keys(get_object_vars($this)); - return array_diff($vars, array('_dom', '_xpath')); - } - - /** - * Overwrites standard __wakeup method to make this object unserializable. - * - * Restores object status before serialization. - * Converts XML string into a DomDocument object and creates a valid - * DOMXpath instance for given DocDocument. - * - * @return void - */ - public function __wakeup() { - $dom = new DOMDocument(); - $dom->loadXml($this->_xml); - $this->_init($dom); - $this->_xml = null; // reset XML content - } -} diff --git a/lib/Zend/Service/Technorati/SearchResult.php b/lib/Zend/Service/Technorati/SearchResult.php deleted file mode 100644 index 5cbc752a370..00000000000 --- a/lib/Zend/Service/Technorati/SearchResult.php +++ /dev/null @@ -1,150 +0,0 @@ -_fields = array( '_permalink' => 'permalink', - '_excerpt' => 'excerpt', - '_created' => 'created', - '_title' => 'title'); - parent::__construct($dom); - - // weblog object field - $this->_parseWeblog(); - - // filter fields - $this->_permalink = Zend_Service_Technorati_Utils::normalizeUriHttp($this->_permalink); - $this->_created = Zend_Service_Technorati_Utils::normalizeDate($this->_created); - } - - /** - * Returns the weblog object that links queried URL. - * - * @return Zend_Service_Technorati_Weblog - */ - public function getWeblog() { - return $this->_weblog; - } - - /** - * Returns the title of the entry. - * - * @return string - */ - public function getTitle() { - return $this->_title; - } - - /** - * Returns the blurb from entry with search term highlighted. - * - * @return string - */ - public function getExcerpt() { - return $this->_excerpt; - } - - /** - * Returns the datetime the entry was created. - * - * @return Zend_Date - */ - public function getCreated() { - return $this->_created; - } - - /** - * Returns the permalink of the blog entry. - * - * @return Zend_Uri_Http - */ - public function getPermalink() { - return $this->_permalink; - } - -} diff --git a/lib/Zend/Service/Technorati/SearchResultSet.php b/lib/Zend/Service/Technorati/SearchResultSet.php deleted file mode 100644 index 96719a5734e..00000000000 --- a/lib/Zend/Service/Technorati/SearchResultSet.php +++ /dev/null @@ -1,79 +0,0 @@ -_xpath->query('/tapi/document/result/querycount/text()'); - if ($result->length == 1) $this->_queryCount = (int) $result->item(0)->data; - - $this->_totalResultsReturned = (int) $this->_xpath->evaluate("count(/tapi/document/item)"); - $this->_totalResultsAvailable = (int) $this->_queryCount; - } - - /** - * Implements Zend_Service_Technorati_ResultSet::current(). - * - * @return Zend_Service_Technorati_SearchResult current result - */ - public function current() - { - /** - * @see Zend_Service_Technorati_SearchResult - */ - #require_once 'Zend/Service/Technorati/SearchResult.php'; - return new Zend_Service_Technorati_SearchResult($this->_results->item($this->_currentIndex)); - } -} diff --git a/lib/Zend/Service/Technorati/TagResult.php b/lib/Zend/Service/Technorati/TagResult.php deleted file mode 100644 index 1f2f18b29db..00000000000 --- a/lib/Zend/Service/Technorati/TagResult.php +++ /dev/null @@ -1,171 +0,0 @@ -_fields = array( '_permalink' => 'permalink', - '_excerpt' => 'excerpt', - '_created' => 'created', - '_updated' => 'postupdate', - '_title' => 'title'); - parent::__construct($dom); - - // weblog object field - $this->_parseWeblog(); - - // filter fields - $this->_permalink = Zend_Service_Technorati_Utils::normalizeUriHttp($this->_permalink); - $this->_created = Zend_Service_Technorati_Utils::normalizeDate($this->_created); - $this->_updated = Zend_Service_Technorati_Utils::normalizeDate($this->_updated); - } - - /** - * Returns the weblog object that links queried URL. - * - * @return Zend_Service_Technorati_Weblog - */ - public function getWeblog() { - return $this->_weblog; - } - - /** - * Returns the title of the entry. - * - * @return string - */ - public function getTitle() { - return $this->_title; - } - - /** - * Returns the blurb from entry with search term highlighted. - * - * @return string - */ - public function getExcerpt() { - return $this->_excerpt; - } - - /** - * Returns the datetime the entry was created. - * - * @return Zend_Date - */ - public function getCreated() { - return $this->_created; - } - - /** - * Returns the datetime the entry was updated. - * - * @return Zend_Date - */ - public function getUpdated() { - return $this->_updated; - } - - /** - * Returns the permalink of the blog entry. - * - * @return Zend_Uri_Http - */ - public function getPermalink() { - return $this->_permalink; - } - -} diff --git a/lib/Zend/Service/Technorati/TagResultSet.php b/lib/Zend/Service/Technorati/TagResultSet.php deleted file mode 100644 index 55394dbb65e..00000000000 --- a/lib/Zend/Service/Technorati/TagResultSet.php +++ /dev/null @@ -1,110 +0,0 @@ -_xpath->query('/tapi/document/result/postsmatched/text()'); - if ($result->length == 1) $this->_postsMatched = (int) $result->item(0)->data; - - $result = $this->_xpath->query('/tapi/document/result/blogsmatched/text()'); - if ($result->length == 1) $this->_blogsMatched = (int) $result->item(0)->data; - - $this->_totalResultsReturned = (int) $this->_xpath->evaluate("count(/tapi/document/item)"); - /** @todo Validate the following assertion */ - $this->_totalResultsAvailable = (int) $this->getPostsMatched(); - } - - - /** - * Returns the number of posts that match the tag. - * - * @return int - */ - public function getPostsMatched() { - return $this->_postsMatched; - } - - /** - * Returns the number of blogs that match the tag. - * - * @return int - */ - public function getBlogsMatched() { - return $this->_blogsMatched; - } - - /** - * Implements Zend_Service_Technorati_ResultSet::current(). - * - * @return Zend_Service_Technorati_TagResult current result - */ - public function current() - { - /** - * @see Zend_Service_Technorati_TagResult - */ - #require_once 'Zend/Service/Technorati/TagResult.php'; - return new Zend_Service_Technorati_TagResult($this->_results->item($this->_currentIndex)); - } -} diff --git a/lib/Zend/Service/Technorati/TagsResult.php b/lib/Zend/Service/Technorati/TagsResult.php deleted file mode 100644 index 4f4a1a9c581..00000000000 --- a/lib/Zend/Service/Technorati/TagsResult.php +++ /dev/null @@ -1,93 +0,0 @@ -_fields = array( '_tag' => 'tag', - '_posts' => 'posts'); - parent::__construct($dom); - - // filter fields - $this->_tag = (string) $this->_tag; - $this->_posts = (int) $this->_posts; - } - - /** - * Returns the tag name. - * - * @return string - */ - public function getTag() { - return $this->_tag; - } - - /** - * Returns the number of posts. - * - * @return int - */ - public function getPosts() { - return $this->_posts; - } -} diff --git a/lib/Zend/Service/Technorati/TagsResultSet.php b/lib/Zend/Service/Technorati/TagsResultSet.php deleted file mode 100644 index cc510b203b1..00000000000 --- a/lib/Zend/Service/Technorati/TagsResultSet.php +++ /dev/null @@ -1,67 +0,0 @@ -_totalResultsReturned = (int) $this->_xpath->evaluate("count(/tapi/document/item)"); - $this->_totalResultsAvailable = (int) $this->_totalResultsReturned; - } - - /** - * Implements Zend_Service_Technorati_ResultSet::current(). - * - * @return Zend_Service_Technorati_TagsResult current result - */ - public function current() - { - /** - * @see Zend_Service_Technorati_TagsResult - */ - #require_once 'Zend/Service/Technorati/TagsResult.php'; - return new Zend_Service_Technorati_TagsResult($this->_results->item($this->_currentIndex)); - } -} diff --git a/lib/Zend/Service/Technorati/Utils.php b/lib/Zend/Service/Technorati/Utils.php deleted file mode 100644 index bc50989e08e..00000000000 --- a/lib/Zend/Service/Technorati/Utils.php +++ /dev/null @@ -1,136 +0,0 @@ -getMessage(), 0, $e); - } - } - - // allow inly Zend_Uri_Http objects or child classes - if (!($uri instanceof Zend_Uri_Http)) { - /** - * @see Zend_Service_Technorati_Exception - */ - #require_once 'Zend/Service/Technorati/Exception.php'; - throw new Zend_Service_Technorati_Exception( - "Invalid URL $uri, only HTTP(S) protocols can be used"); - } - - return $uri; - } - /** - * Parses, validates and returns a valid Zend_Date object - * from given $input. - * - * $input can be either a string, an integer or a Zend_Date object. - * If $input is string or int, it will be provided to Zend_Date as it is. - * If $input is a Zend_Date object, the object instance will be returned. - * - * @param mixed|Zend_Date $input - * @return null|Zend_Date - * @throws Zend_Service_Technorati_Exception - * @static - */ - public static function normalizeDate($input) - { - /** - * @see Zend_Date - */ - #require_once 'Zend/Date.php'; - /** - * @see Zend_Locale - */ - #require_once 'Zend/Locale.php'; - - // allow null as value and return valid Zend_Date objects - if (($input === null) || ($input instanceof Zend_Date)) { - return $input; - } - - // due to a BC break as of ZF 1.5 it's not safe to use Zend_Date::isDate() here - // see ZF-2524, ZF-2334 - if (@strtotime($input) !== FALSE) { - return new Zend_Date($input); - } else { - /** - * @see Zend_Service_Technorati_Exception - */ - #require_once 'Zend/Service/Technorati/Exception.php'; - throw new Zend_Service_Technorati_Exception("'$input' is not a valid Date/Time"); - } - } - - /** - * @todo public static function xpathQueryAndSet() {} - */ - - /** - * @todo public static function xpathQueryAndSetIf() {} - */ - - /** - * @todo public static function xpathQueryAndSetUnless() {} - */ -} diff --git a/lib/Zend/Service/Technorati/Weblog.php b/lib/Zend/Service/Technorati/Weblog.php deleted file mode 100644 index f0969561f59..00000000000 --- a/lib/Zend/Service/Technorati/Weblog.php +++ /dev/null @@ -1,486 +0,0 @@ -ownerDocument); - - $result = $xpath->query('./name/text()', $dom); - if ($result->length == 1) $this->setName($result->item(0)->data); - - $result = $xpath->query('./url/text()', $dom); - if ($result->length == 1) $this->setUrl($result->item(0)->data); - - $result = $xpath->query('./inboundblogs/text()', $dom); - if ($result->length == 1) $this->setInboundBlogs($result->item(0)->data); - - $result = $xpath->query('./inboundlinks/text()', $dom); - if ($result->length == 1) $this->setInboundLinks($result->item(0)->data); - - $result = $xpath->query('./lastupdate/text()', $dom); - if ($result->length == 1) $this->setLastUpdate($result->item(0)->data); - - /* The following elements need more attention */ - - $result = $xpath->query('./rssurl/text()', $dom); - if ($result->length == 1) $this->setRssUrl($result->item(0)->data); - - $result = $xpath->query('./atomurl/text()', $dom); - if ($result->length == 1) $this->setAtomUrl($result->item(0)->data); - - $result = $xpath->query('./author', $dom); - if ($result->length >= 1) { - foreach ($result as $author) { - $this->_authors[] = new Zend_Service_Technorati_Author($author); - } - } - - /** - * The following are optional elements - * - * I can't find any official documentation about the following properties - * however they are included in response DTD and/or test responses. - */ - - $result = $xpath->query('./rank/text()', $dom); - if ($result->length == 1) $this->setRank($result->item(0)->data); - - $result = $xpath->query('./lat/text()', $dom); - if ($result->length == 1) $this->setLat($result->item(0)->data); - - $result = $xpath->query('./lon/text()', $dom); - if ($result->length == 1) $this->setLon($result->item(0)->data); - - $result = $xpath->query('./hasphoto/text()', $dom); - if ($result->length == 1) $this->setHasPhoto($result->item(0)->data); - } - - - /** - * Returns weblog name. - * - * @return string Weblog name - */ - public function getName() - { - return $this->_name; - } - - /** - * Returns weblog URL. - * - * @return null|Zend_Uri_Http object representing weblog base URL - */ - public function getUrl() - { - return $this->_url; - } - - /** - * Returns number of unique blogs linking this blog. - * - * @return integer the number of inbound blogs - */ - public function getInboundBlogs() - { - return $this->_inboundBlogs; - } - - /** - * Returns number of incoming links to this blog. - * - * @return integer the number of inbound links - */ - public function getInboundLinks() - { - return $this->_inboundLinks; - } - - /** - * Returns weblog Rss URL. - * - * @return null|Zend_Uri_Http object representing the URL - * of the RSS feed for given blog - */ - public function getRssUrl() - { - return $this->_rssUrl; - } - - /** - * Returns weblog Atom URL. - * - * @return null|Zend_Uri_Http object representing the URL - * of the Atom feed for given blog - */ - public function getAtomUrl() - { - return $this->_atomUrl; - } - - /** - * Returns UNIX timestamp of the last weblog update. - * - * @return integer UNIX timestamp of the last weblog update - */ - public function getLastUpdate() - { - return $this->_lastUpdate; - } - - /** - * Returns weblog rank value. - * - * Note. This property is not documented. - * - * @return integer weblog rank value - */ - public function getRank() - { - return $this->_rank; - } - - /** - * Returns weblog latitude coordinate. - * - * Note. This property is not documented. - * - * @return float weblog latitude coordinate - */ - public function getLat() { - return $this->_lat; - } - - /** - * Returns weblog longitude coordinate. - * - * Note. This property is not documented. - * - * @return float weblog longitude coordinate - */ - public function getLon() - { - return $this->_lon; - } - - /** - * Returns whether the author who claimed this weblog has a photo. - * - * Note. This property is not documented. - * - * @return bool TRUE if the author who claimed this weblog has a photo, - * FALSE otherwise. - */ - public function hasPhoto() - { - return (bool) $this->_hasPhoto; - } - - /** - * Returns the array of weblog authors. - * - * @return array of Zend_Service_Technorati_Author authors - */ - public function getAuthors() - { - return (array) $this->_authors; - } - - - /** - * Sets weblog name. - * - * @param string $name - * @return Zend_Service_Technorati_Weblog $this instance - */ - public function setName($name) - { - $this->_name = (string) $name; - return $this; - } - - /** - * Sets weblog URL. - * - * @param string|Zend_Uri_Http $url - * @return void - * @throws Zend_Service_Technorati_Exception if $input is an invalid URI - * (via Zend_Service_Technorati_Utils::normalizeUriHttp) - */ - public function setUrl($url) - { - $this->_url = Zend_Service_Technorati_Utils::normalizeUriHttp($url); - return $this; - } - - /** - * Sets number of inbound blogs. - * - * @param integer $number - * @return Zend_Service_Technorati_Weblog $this instance - */ - public function setInboundBlogs($number) - { - $this->_inboundBlogs = (int) $number; - return $this; - } - - /** - * Sets number of Iinbound links. - * - * @param integer $number - * @return Zend_Service_Technorati_Weblog $this instance - */ - public function setInboundLinks($number) - { - $this->_inboundLinks = (int) $number; - return $this; - } - - /** - * Sets weblog Rss URL. - * - * @param string|Zend_Uri_Http $url - * @return Zend_Service_Technorati_Weblog $this instance - * @throws Zend_Service_Technorati_Exception if $input is an invalid URI - * (via Zend_Service_Technorati_Utils::normalizeUriHttp) - */ - public function setRssUrl($url) - { - $this->_rssUrl = Zend_Service_Technorati_Utils::normalizeUriHttp($url); - return $this; - } - - /** - * Sets weblog Atom URL. - * - * @param string|Zend_Uri_Http $url - * @return Zend_Service_Technorati_Weblog $this instance - * @throws Zend_Service_Technorati_Exception if $input is an invalid URI - * (via Zend_Service_Technorati_Utils::normalizeUriHttp) - */ - public function setAtomUrl($url) - { - $this->_atomUrl = Zend_Service_Technorati_Utils::normalizeUriHttp($url); - return $this; - } - - /** - * Sets weblog Last Update timestamp. - * - * $datetime can be any value supported by - * Zend_Service_Technorati_Utils::normalizeDate(). - * - * @param mixed $datetime A string representing the last update date time - * in a valid date time format - * @return Zend_Service_Technorati_Weblog $this instance - * @throws Zend_Service_Technorati_Exception - */ - public function setLastUpdate($datetime) - { - $this->_lastUpdate = Zend_Service_Technorati_Utils::normalizeDate($datetime); - return $this; - } - - /** - * Sets weblog Rank. - * - * @param integer $rank - * @return Zend_Service_Technorati_Weblog $this instance - */ - public function setRank($rank) - { - $this->_rank = (int) $rank; - return $this; - } - - /** - * Sets weblog latitude coordinate. - * - * @param float $coordinate - * @return Zend_Service_Technorati_Weblog $this instance - */ - public function setLat($coordinate) - { - $this->_lat = (float) $coordinate; - return $this; - } - - /** - * Sets weblog longitude coordinate. - * - * @param float $coordinate - * @return Zend_Service_Technorati_Weblog $this instance - */ - public function setLon($coordinate) - { - $this->_lon = (float) $coordinate; - return $this; - } - - /** - * Sets hasPhoto property. - * - * @param bool $hasPhoto - * @return Zend_Service_Technorati_Weblog $this instance - */ - public function setHasPhoto($hasPhoto) - { - $this->_hasPhoto = (bool) $hasPhoto; - return $this; - } - -} diff --git a/lib/Zend/Service/WindowsAzure/CommandLine/PackageScaffolder/PackageScaffolderAbstract.php b/lib/Zend/Service/WindowsAzure/CommandLine/PackageScaffolder/PackageScaffolderAbstract.php index e2c251206c7..113e7beb329 100644 --- a/lib/Zend/Service/WindowsAzure/CommandLine/PackageScaffolder/PackageScaffolderAbstract.php +++ b/lib/Zend/Service/WindowsAzure/CommandLine/PackageScaffolder/PackageScaffolderAbstract.php @@ -119,13 +119,13 @@ protected function createDirectory($path, $abortIfExists = true, $recursive = tr } if (is_dir($path) ) { - @chmod($path, '0777'); + @chmod($path, '0775'); if (!self::deleteDirectory($path) ) { throw new RuntimeException("Failed to delete \"{$path}\"."); } } - if (!mkdir($path, '0777', $recursive) || !is_dir($path)) { + if (!mkdir($path, '0775', $recursive) || !is_dir($path)) { throw new RuntimeException( "Failed to create directory \"{$path}\"." ); } @@ -142,7 +142,9 @@ protected function createDirectory($path, $abortIfExists = true, $recursive = tr * * @return boolean */ - protected function copyDirectory($sourcePath, $destinationPath, $abortIfExists = true, $mode = '0777') { + protected function copyDirectory($sourcePath, $destinationPath, $abortIfExists = true, $mode = '0775') { + $mode = $mode & ~0002; + if (is_null($sourcePath) || !is_string($sourcePath) || empty($sourcePath)) { throw new InvalidArgumentException("Undefined \"sourcePath\""); } @@ -217,7 +219,7 @@ protected function deleteDirectory($path) if (!$handleDir) { return false; } - @chmod($path, 0777); + @chmod($path, 0775); while ($file = readdir($handleDir)) { if ($file == '.' || $file == '..') { continue; @@ -240,7 +242,7 @@ protected function deleteDirectory($path) ); } - @chmod($path, 0777); + @chmod($path, 0775); closedir($handleDir); @rmdir($path); diff --git a/lib/Zend/Session.php b/lib/Zend/Session.php index 1524c6c892f..b02e37a306c 100644 --- a/lib/Zend/Session.php +++ b/lib/Zend/Session.php @@ -811,9 +811,9 @@ private static function _processValidators() } $validator = new $validator_name; if ($validator->validate() === false) { - /** @see Zend_Session_Exception */ - #require_once 'Zend/Session/Exception.php'; - throw new Zend_Session_Exception("This session is not valid according to {$validator_name}."); + /** @see Zend_Session_Validator_Exception */ + #require_once 'Zend/Session/Validator/Exception.php'; + throw new Zend_Session_Validator_Exception("This session is not valid according to {$validator_name}."); } } } diff --git a/lib/Zend/Service/Technorati/Exception.php b/lib/Zend/Session/Validator/Exception.php similarity index 74% rename from lib/Zend/Service/Technorati/Exception.php rename to lib/Zend/Session/Validator/Exception.php index 4c0396b98d8..49c8e3dd25c 100644 --- a/lib/Zend/Service/Technorati/Exception.php +++ b/lib/Zend/Session/Validator/Exception.php @@ -13,27 +13,31 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_Service - * @subpackage Technorati + * @package Zend_Session * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ + * @since Preview Release 0.2 */ /** - * @see Zend_Service_Exception + * @see Zend_Session_Exception */ -#require_once 'Zend/Service/Exception.php'; +#require_once 'Zend/Session/Exception.php'; /** + * Zend_Session_Validator_Exception + * * @category Zend - * @package Zend_Service - * @subpackage Technorati + * @package Zend_Session + * @subpackage Validator * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Service_Technorati_Exception extends Zend_Service_Exception +class Zend_Session_Validator_Exception extends Zend_Session_Exception { + } + diff --git a/lib/Zend/Translate.php b/lib/Zend/Translate.php index 7d8f3f27484..baf99d0f8e5 100644 --- a/lib/Zend/Translate.php +++ b/lib/Zend/Translate.php @@ -63,7 +63,9 @@ class Zend_Translate { /** * Generates the standard translation object * - * @param array|Zend_Config $options Options to use + * @param array|Zend_Config|Zend_Translate_Adapter $options Options to use + * @param string|array [$content] Path to content, or content itself + * @param string|Zend_Locale [$locale] * @throws Zend_Translate_Exception */ public function __construct($options = array()) @@ -96,7 +98,9 @@ public function __construct($options = array()) /** * Sets a new adapter * - * @param array|Zend_Config $options Options to use + * @param array|Zend_Config|Zend_Translate_Adapter $options Options to use + * @param string|array [$content] Path to content, or content itself + * @param string|Zend_Locale [$locale] * @throws Zend_Translate_Exception */ public function setAdapter($options = array()) diff --git a/lib/Zend/Translate/Adapter.php b/lib/Zend/Translate/Adapter.php index 10545622d41..c0553fcd095 100644 --- a/lib/Zend/Translate/Adapter.php +++ b/lib/Zend/Translate/Adapter.php @@ -119,7 +119,9 @@ abstract class Zend_Translate_Adapter { /** * Generates the adapter * - * @param array|Zend_Config $options Translation options for this adapter + * @param string|array|Zend_Config $options Translation options for this adapter + * @param string|array [$content] + * @param string|Zend_Locale [$locale] * @throws Zend_Translate_Exception * @return void */ diff --git a/lib/Zend/Translate/Plural.php b/lib/Zend/Translate/Plural.php index c9536f271ed..03ce10a7bc9 100644 --- a/lib/Zend/Translate/Plural.php +++ b/lib/Zend/Translate/Plural.php @@ -65,6 +65,7 @@ public static function getPlural($number, $locale) } switch($locale) { + case 'az': case 'bo': case 'dz': case 'id': @@ -83,7 +84,6 @@ public static function getPlural($number, $locale) break; case 'af': - case 'az': case 'bn': case 'bg': case 'ca': diff --git a/lib/Zend/Validate/EmailAddress.php b/lib/Zend/Validate/EmailAddress.php index 7b6365d935d..dd2523d32ab 100644 --- a/lib/Zend/Validate/EmailAddress.php +++ b/lib/Zend/Validate/EmailAddress.php @@ -63,7 +63,7 @@ class Zend_Validate_EmailAddress extends Zend_Validate_Abstract ); /** - * As of RFC5753 (JAN 2010), the following blocks are no logner reserved: + * As of RFC5753 (JAN 2010), the following blocks are no longer reserved: * - 128.0.0.0/16 * - 191.255.0.0/16 * - 223.255.255.0/24 diff --git a/lib/Zend/Validate/Hostname.php b/lib/Zend/Validate/Hostname.php index e839db4eddd..500a256bcc2 100644 --- a/lib/Zend/Validate/Hostname.php +++ b/lib/Zend/Validate/Hostname.php @@ -1043,7 +1043,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'CL' => array(1 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu'), 'CN' => 'Zend/Validate/Hostname/Cn.php', 'COM' => 'Zend/Validate/Hostname/Com.php', - 'DE' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿăąāćĉčċďđĕěėęēğĝġģĥħĭĩįīıĵķĺľļłńňņŋŏőōœĸŕřŗśŝšşťţŧŭůűũųūŵŷźžż]{1,63}$/iu'), + 'DE' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿăąāćĉčċďđĕěėęēğĝġģĥħĭĩįīıĵķĺľļłńňņŋŏőōœĸŕřŗśŝšşťßţŧŭůűũųūŵŷźžż]{1,63}$/iu'), 'DK' => array(1 => '/^[\x{002d}0-9a-zäéöüæøå]{1,63}$/iu'), 'ES' => array(1 => '/^[\x{002d}0-9a-zàáçèéíïñòóúü·]{1,63}$/iu'), 'EU' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿ]{1,63}$/iu', @@ -1459,7 +1459,7 @@ public function isValid($value) $check = 0; foreach ($domainParts as $domainPart) { // If some domain part is empty (i.e. zend..com), it's invalid - if (empty($domainPart)) { + if (empty($domainPart) && $domainPart !== '0') { $this->_error(self::INVALID_HOSTNAME); return false; } diff --git a/lib/Zend/Version.php b/lib/Zend/Version.php index 7fd8956822a..a5f244f711e 100644 --- a/lib/Zend/Version.php +++ b/lib/Zend/Version.php @@ -32,7 +32,7 @@ final class Zend_Version /** * Zend Framework version identification - see compareVersion() */ - const VERSION = '1.12.10'; + const VERSION = '1.12.16'; /** * The latest stable version Zend Framework available diff --git a/lib/Zend/View.php b/lib/Zend/View.php index 184b55614bb..25b4ba912ff 100644 --- a/lib/Zend/View.php +++ b/lib/Zend/View.php @@ -29,10 +29,59 @@ /** * Concrete class for handling view scripts. * - * @category Zend - * @package Zend_View - * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License + * @category Zend + * @package Zend_View + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * + * Convenience methods for build in helpers (@see __call): + * + * @method string baseUrl($file = null) + * @method string currency($value = null, $currency = null) + * @method Zend_View_Helper_Cycle cycle(array $data = array(), $name = Zend_View_Helper_Cycle::DEFAULT_NAME) + * @method Zend_View_Helper_Doctype doctype($doctype = null) + * @method string fieldset($name, $content, $attribs = null) + * @method string form($name, $attribs = null, $content = false) + * @method string formButton($name, $value = null, $attribs = null) + * @method string formCheckbox($name, $value = null, $attribs = null, array $checkedOptions = null) + * @method string formErrors($errors, array $options = null) + * @method string formFile($name, $attribs = null) + * @method string formHidden($name, $value = null, array $attribs = null) + * @method string formImage($name, $value = null, $attribs = null) + * @method string formLabel($name, $value = null, array $attribs = null) + * @method string formMultiCheckbox($name, $value = null, $attribs = null, $options = null, $listsep = "
        \n") + * @method string formNote($name, $value = null) + * @method string formPassword($name, $value = null, $attribs = null) + * @method string formRadio($name, $value = null, $attribs = null, $options = null, $listsep = "
        \n") + * @method string formReset($name = '', $value = 'Reset', $attribs = null) + * @method string formSelect($name, $value = null, $attribs = null, $options = null, $listsep = "
        \n") + * @method string formSubmit($name, $value = null, $attribs = null) + * @method string formText($name, $value = null, $attribs = null) + * @method string formTextarea($name, $value = null, $attribs = null) + * @method Zend_View_Helper_Gravatar gravatar($email = "", $options = array(), $attribs = array()) + * @method Zend_View_Helper_HeadLink headLink(array $attributes = null, $placement = Zend_View_Helper_Placeholder_Container_Abstract::APPEND) + * @method Zend_View_Helper_HeadMeta headMeta($content = null, $keyValue = null, $keyType = 'name', $modifiers = array(), $placement = Zend_View_Helper_Placeholder_Container_Abstract::APPEND) + * @method Zend_View_Helper_HeadScript headScript($mode = Zend_View_Helper_HeadScript::FILE, $spec = null, $placement = 'APPEND', array $attrs = array(), $type = 'text/javascript') + * @method Zend_View_Helper_HeadStyle headStyle($content = null, $placement = 'APPEND', $attributes = array()) + * @method Zend_View_Helper_HeadTitle headTitle($title = null, $setType = null) + * @method string htmlFlash($data, array $attribs = array(), array $params = array(), $content = null) + * @method string htmlList(array $items, $ordered = false, $attribs = false, $escape = true) + * @method string htmlObject($data, $type, array $attribs = array(), array $params = array(), $content = null) + * @method string htmlPage($data, array $attribs = array(), array $params = array(), $content = null) + * @method string htmlQuicktime($data, array $attribs = array(), array $params = array(), $content = null) + * @method Zend_View_Helper_InlineScript inlineScript($mode = Zend_View_Helper_HeadScript::FILE, $spec = null, $placement = 'APPEND', array $attrs = array(), $type = 'text/javascript') + * @method string|void json($data, $keepLayouts = false, $encodeData = true) + * @method Zend_View_Helper_Layout layout() + * @method Zend_View_Helper_Navigation navigation(Zend_Navigation_Container $container = null) + * @method string paginationControl(Zend_Paginator $paginator = null, $scrollingStyle = null, $partial = null, $params = null) + * @method string partial($name = null, $module = null, $model = null) + * @method string partialLoop($name = null, $module = null, $model = null) + * @method Zend_View_Helper_Placeholder_Container_Abstract placeholder($name) + * @method void renderToPlaceholder($script, $placeholder) + * @method string serverUrl($requestUri = null) + * @method string translate($messageid = null) + * @method string url(array $urlOptions = array(), $name = null, $reset = false, $encode = true) + * @method Zend_Http_UserAgent userAgent(Zend_Http_UserAgent $userAgent = null) */ class Zend_View extends Zend_View_Abstract { diff --git a/lib/Zend/View/Helper/HeadLink.php b/lib/Zend/View/Helper/HeadLink.php index 2794b7df43e..fd6e180111b 100644 --- a/lib/Zend/View/Helper/HeadLink.php +++ b/lib/Zend/View/Helper/HeadLink.php @@ -32,6 +32,14 @@ * @subpackage Helper * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @method $this appendAlternate($href, $type, $title, $extras) + * @method $this appendStylesheet($href, $media = 'screen', $conditionalStylesheet = false, array $extras = array()) + * @method $this offsetSetAlternate($index, $href, $type, $title, $extras) + * @method $this offsetSetStylesheet($index, $href, $media = 'screen', $conditionalStylesheet = false, array $extras = array()) + * @method $this prependAlternate($href, $type, $title, $extras) + * @method $this prependStylesheet($href, $media = 'screen', $conditionalStylesheet = false, array $extras = array()) + * @method $this setAlternate($href, $type, $title, $extras) + * @method $this setStylesheet($href, $media = 'screen', $conditionalStylesheet = false, array $extras = array()) */ class Zend_View_Helper_HeadLink extends Zend_View_Helper_Placeholder_Container_Standalone { @@ -311,7 +319,10 @@ public function itemToString(stdClass $item) && !empty($attributes['conditionalStylesheet']) && is_string($attributes['conditionalStylesheet'])) { - $link = ''; + if (str_replace(' ', '', $attributes['conditionalStylesheet']) === '!IE') { + $link = '' . $link . ''; } return $link; diff --git a/lib/Zend/View/Helper/HeadMeta.php b/lib/Zend/View/Helper/HeadMeta.php index de02c3f543a..ca1c78999dd 100644 --- a/lib/Zend/View/Helper/HeadMeta.php +++ b/lib/Zend/View/Helper/HeadMeta.php @@ -32,6 +32,19 @@ * @subpackage Helper * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @method $this appendHttpEquiv($keyValue, $content, $conditionalHttpEquiv) + * @method $this appendName($keyValue, $content, $conditionalName) + * @method $this appendProperty($property, $content, $modifiers) + * @method $this offsetSetHttpEquiv($index, $keyValue, $content, $conditionalHttpEquiv) + * @method $this offsetSetName($index, $keyValue, $content, $conditionalName) + * @method $this offsetSetProperty($index, $property, $content, $modifiers) + * @method $this prependHttpEquiv($keyValue, $content, $conditionalHttpEquiv) + * @method $this prependName($keyValue, $content, $conditionalName) + * @method $this prependProperty($property, $content, $modifiers) + * @method $this setCharset($charset) + * @method $this setHttpEquiv($keyValue, $content, $modifiers) + * @method $this setName($keyValue, $content, $modifiers) + * @method $this setProperty($property, $content, $modifiers) */ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_Standalone { @@ -381,6 +394,9 @@ public function itemToString(stdClass $item) && !empty($item->modifiers['conditional']) && is_string($item->modifiers['conditional'])) { + if (str_replace(' ', '', $item->modifiers['conditional']) === '!IE') { + $meta = '' . $meta . ''; } diff --git a/lib/Zend/View/Helper/HeadScript.php b/lib/Zend/View/Helper/HeadScript.php index c7eed0073fd..83235a7f188 100644 --- a/lib/Zend/View/Helper/HeadScript.php +++ b/lib/Zend/View/Helper/HeadScript.php @@ -31,6 +31,14 @@ * @subpackage Helper * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @method $this appendFile($src, $type = 'text/javascript', array $attrs = array()) + * @method $this appendScript($script, $type = 'text/javascript', array $attrs = array()) + * @method $this offsetSetFile($index, $src, $type = 'text/javascript', array $attrs = array()) + * @method $this offsetSetScript($index, $script, $type = 'text/javascript', array $attrs = array()) + * @method $this prependFile($src, $type = 'text/javascript', array $attrs = array()) + * @method $this prependScript($script, $type = 'text/javascript', array $attrs = array()) + * @method $this setFile($src, $type = 'text/javascript', array $attrs = array()) + * @method $this setScript($script, $type = 'text/javascript', array $attrs = array()) */ class Zend_View_Helper_HeadScript extends Zend_View_Helper_Placeholder_Container_Standalone { @@ -447,7 +455,11 @@ public function itemToString($item, $indent, $escapeStart, $escapeEnd) && !empty($item->attributes['conditional']) && is_string($item->attributes['conditional'])) { - $html = $indent . ''; + // inner wrap with comment end and start if !IE + if (str_replace(' ', '', $item->attributes['conditional']) === '!IE') { + $html = '' . $html . ''; } else { $html = $indent . $html; } diff --git a/lib/Zend/View/Helper/HeadStyle.php b/lib/Zend/View/Helper/HeadStyle.php index a769271c9a3..de54cf97631 100644 --- a/lib/Zend/View/Helper/HeadStyle.php +++ b/lib/Zend/View/Helper/HeadStyle.php @@ -31,6 +31,10 @@ * @subpackage Helper * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @method $this appendStyle($content, array $attributes = array()) + * @method $this offsetSetStyle($index, $content, array $attributes = array()) + * @method $this prependStyle($content, array $attributes = array()) + * @method $this setStyle($content, array $attributes = array()) */ class Zend_View_Helper_HeadStyle extends Zend_View_Helper_Placeholder_Container_Standalone { @@ -370,7 +374,10 @@ public function itemToString(stdClass $item, $indent) . ''; if (null == $escapeStart && null == $escapeEnd) { - $html = ''; + if (str_replace(' ', '', $item->attributes['conditional']) === '!IE') { + $html = '' . $html . ''; } return $html; diff --git a/lib/Zend/View/Helper/Navigation.php b/lib/Zend/View/Helper/Navigation.php index 6f67b7f3c06..7d141649fff 100644 --- a/lib/Zend/View/Helper/Navigation.php +++ b/lib/Zend/View/Helper/Navigation.php @@ -33,6 +33,10 @@ * @subpackage Helper * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @method Zend_View_Helper_Navigation_Breadcrumbs breadcrumbs + * @method Zend_View_Helper_Navigation_Links links + * @method Zend_View_Helper_Navigation_Menu menu + * @method Zend_View_Helper_Navigation_Sitemap sitemap */ class Zend_View_Helper_Navigation extends Zend_View_Helper_Navigation_HelperAbstract diff --git a/lib/Zend/View/Helper/Navigation/HelperAbstract.php b/lib/Zend/View/Helper/Navigation/HelperAbstract.php index 24c14c2e031..31ff56615cd 100644 --- a/lib/Zend/View/Helper/Navigation/HelperAbstract.php +++ b/lib/Zend/View/Helper/Navigation/HelperAbstract.php @@ -952,7 +952,7 @@ public static function setDefaultAcl(Zend_Acl $acl = null) * Sets default ACL role(s) to use when iterating pages if not explicitly * set later with {@link setRole()} * - * @param midex $role [optional] role to set. Expects null, + * @param mixed $role [optional] role to set. Expects null, * string, or an instance of * {@link Zend_Acl_Role_Interface}. * Default is null, which sets no default diff --git a/lib/Zend/Xml/Security.php b/lib/Zend/Xml/Security.php index 29e55cadaad..dbcf1ec3fcd 100644 --- a/lib/Zend/Xml/Security.php +++ b/lib/Zend/Xml/Security.php @@ -34,13 +34,14 @@ class Zend_Xml_Security * Heuristic scan to detect entity in XML * * @param string $xml - * @throws Zend_Xml_Exception + * @throws Zend_Xml_Exception If entity expansion or external entity declaration was discovered. */ protected static function heuristicScan($xml) { - if (strpos($xml, 'loadXml($xml, LIBXML_NONET); restore_error_handler(); - // Entity load to previous setting - if (!self::isPhpFpm()) { - libxml_disable_entity_loader($loadEntities); - libxml_use_internal_errors($useInternalXmlErrors); - } - if (!$result) { + // Entity load to previous setting + if (!self::isPhpFpm()) { + libxml_disable_entity_loader($loadEntities); + libxml_use_internal_errors($useInternalXmlErrors); + } return false; } @@ -115,6 +115,12 @@ public static function scan($xml, DOMDocument $dom = null) } } + // Entity load to previous setting + if (!self::isPhpFpm()) { + libxml_disable_entity_loader($loadEntities); + libxml_use_internal_errors($useInternalXmlErrors); + } + if (isset($simpleXml)) { $result = simplexml_import_dom($dom); if (!$result instanceof SimpleXMLElement) { @@ -147,13 +153,336 @@ public static function scanFile($file, DOMDocument $dom = null) /** * Return true if PHP is running with PHP-FPM * + * This method is mainly used to determine whether or not heuristic checks + * (vs libxml checks) should be made, due to threading issues in libxml; + * under php-fpm, threading becomes a concern. + * + * However, PHP versions 5.5.22+ and 5.6.6+ contain a patch to the + * libxml support in PHP that makes the libxml checks viable; in such + * versions, this method will return false to enforce those checks, which + * are more strict and accurate than the heuristic checks. + * * @return boolean */ public static function isPhpFpm() { - if (substr(php_sapi_name(), 0, 3) === 'fpm') { + $isVulnerableVersion = ( + version_compare(PHP_VERSION, '5.5.22', 'lt') + || ( + version_compare(PHP_VERSION, '5.6', 'gte') + && version_compare(PHP_VERSION, '5.6.6', 'lt') + ) + ); + + if (substr(php_sapi_name(), 0, 3) === 'fpm' && $isVulnerableVersion) { return true; } return false; } + + /** + * Determine and return the string(s) to use for the $generator) { + $prefix = call_user_func($generator, '<' . '?xml'); + if (0 === strncmp($xml, $prefix, strlen($prefix))) { + return $encoding; + } + } + + // Fallback + return 'UTF-8'; + } + + /** + * Attempt to detect the specified XML encoding. + * + * Using the file's encoding, determines if an "encoding" attribute is + * present and well-formed in the XML declaration; if so, it returns a + * list with both the ASCII representation of that declaration and the + * original file encoding. + * + * If not, a list containing only the provided file encoding is returned. + * + * @param string $xml + * @param string $fileEncoding + * @return string[] Potential XML encodings + */ + protected static function detectXmlEncoding($xml, $fileEncoding) + { + $encodingMap = self::getAsciiEncodingMap(); + $generator = $encodingMap[$fileEncoding]; + $encAttr = call_user_func($generator, 'encoding="'); + $quote = call_user_func($generator, '"'); + $close = call_user_func($generator, '>'); + + $closePos = strpos($xml, $close); + if (false === $closePos) { + return array($fileEncoding); + } + + $encPos = strpos($xml, $encAttr); + if (false === $encPos + || $encPos > $closePos + ) { + return array($fileEncoding); + } + + $encPos += strlen($encAttr); + $quotePos = strpos($xml, $quote, $encPos); + if (false === $quotePos) { + return array($fileEncoding); + } + + $encoding = self::substr($xml, $encPos, $quotePos); + return array( + // Following line works because we're only supporting 8-bit safe encodings at this time. + str_replace('\0', '', $encoding), // detected encoding + $fileEncoding, // file encoding + ); + } + + /** + * Return a list of BOM maps. + * + * Returns a list of common encoding -> BOM maps, along with the character + * length to compare against. + * + * @link https://en.wikipedia.org/wiki/Byte_order_mark + * @return array + */ + protected static function getBomMap() + { + return array( + array( + 'encoding' => 'UTF-32BE', + 'bom' => pack('CCCC', 0x00, 0x00, 0xfe, 0xff), + 'length' => 4, + ), + array( + 'encoding' => 'UTF-32LE', + 'bom' => pack('CCCC', 0xff, 0xfe, 0x00, 0x00), + 'length' => 4, + ), + array( + 'encoding' => 'GB-18030', + 'bom' => pack('CCCC', 0x84, 0x31, 0x95, 0x33), + 'length' => 4, + ), + array( + 'encoding' => 'UTF-16BE', + 'bom' => pack('CC', 0xfe, 0xff), + 'length' => 2, + ), + array( + 'encoding' => 'UTF-16LE', + 'bom' => pack('CC', 0xff, 0xfe), + 'length' => 2, + ), + array( + 'encoding' => 'UTF-8', + 'bom' => pack('CCC', 0xef, 0xbb, 0xbf), + 'length' => 3, + ), + ); + } + + /** + * Return a map of encoding => generator pairs. + * + * Returns a map of encoding => generator pairs, where the generator is a + * callable that accepts a string and returns the appropriate byte order + * sequence of that string for the encoding. + * + * @return array + */ + protected static function getAsciiEncodingMap() + { + return array( + 'UTF-32BE' => array(__CLASS__, 'encodeToUTF32BE'), + 'UTF-32LE' => array(__CLASS__, 'encodeToUTF32LE'), + 'UTF-32odd1' => array(__CLASS__, 'encodeToUTF32odd1'), + 'UTF-32odd2' => array(__CLASS__, 'encodeToUTF32odd2'), + 'UTF-16BE' => array(__CLASS__, 'encodeToUTF16BE'), + 'UTF-16LE' => array(__CLASS__, 'encodeToUTF16LE'), + 'UTF-8' => array(__CLASS__, 'encodeToUTF8'), + 'GB-18030' => array(__CLASS__, 'encodeToUTF8'), + ); + } + + /** + * Binary-safe substr. + * + * substr() is not binary-safe; this method loops by character to ensure + * multi-byte characters are aggregated correctly. + * + * @param string $string + * @param int $start + * @param int $end + * @return string + */ + protected static function substr($string, $start, $end) + { + $substr = ''; + for ($i = $start; $i < $end; $i += 1) { + $substr .= $string[$i]; + } + return $substr; + } + + /** + * Generate an entity comparison based on the given encoding. + * + * This patch is internal only, and public only so it can be used as a + * callable to pass to array_map. + * + * @internal + * @param string $encoding + * @return string + */ + public static function generateEntityComparison($encoding) + { + $encodingMap = self::getAsciiEncodingMap(); + $generator = isset($encodingMap[$encoding]) ? $encodingMap[$encoding] : $encodingMap['UTF-8']; + return call_user_func($generator, 'getMethods() as $reflection) { $this->_buildSignature($reflection, $class); } diff --git a/var/package/Cm_RedisSession-1.9.2.1.xml b/var/package/Cm_RedisSession-1.9.2.2.xml similarity index 85% rename from var/package/Cm_RedisSession-1.9.2.1.xml rename to var/package/Cm_RedisSession-1.9.2.2.xml index 8f57c52bef6..3b697734356 100644 --- a/var/package/Cm_RedisSession-1.9.2.1.xml +++ b/var/package/Cm_RedisSession-1.9.2.2.xml @@ -1,18 +1,18 @@ Cm_RedisSession - 1.9.2.1 + 1.9.2.2 stable New BSD community Redis session Redis seesion - 1.9.2.1 + 1.9.2.2 Colin Mollenhourcorecolin@mollenhour.com - 2015-07-29 - + 2015-10-27 + - 5.2.06.0.0Lib_Crediscommunity1.9.2.11.9.2.1 + 5.2.06.0.0Lib_Crediscommunity1.9.2.21.9.2.2 diff --git a/var/package/Interface_Adminhtml_Default-1.9.2.1.xml b/var/package/Interface_Adminhtml_Default-1.9.2.2.xml similarity index 99% rename from var/package/Interface_Adminhtml_Default-1.9.2.1.xml rename to var/package/Interface_Adminhtml_Default-1.9.2.2.xml index 3ef3b0f5a79..cbd81bf9ad1 100644 --- a/var/package/Interface_Adminhtml_Default-1.9.2.1.xml +++ b/var/package/Interface_Adminhtml_Default-1.9.2.2.xml @@ -1,18 +1,18 @@ Interface_Adminhtml_Default - 1.9.2.1 + 1.9.2.2 stable AFL v3.0 community Default interface for Adminhtml Default interface for Adminhtml - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - - + 2015-10-27 + + - 5.2.06.0.0Mage_Core_Adminhtmlcommunity1.9.2.11.9.2.1Lib_Js_Extcommunity1.9.2.11.9.2.1 + 5.2.06.0.0Mage_Core_Adminhtmlcommunity1.9.2.21.9.2.2Lib_Js_Extcommunity1.9.2.21.9.2.2 diff --git a/var/package/Interface_Frontend_Base_Default-1.9.2.1.xml b/var/package/Interface_Frontend_Base_Default-1.9.2.2.xml similarity index 98% rename from var/package/Interface_Frontend_Base_Default-1.9.2.1.xml rename to var/package/Interface_Frontend_Base_Default-1.9.2.2.xml index fc5f7dd02e3..760f7f04098 100644 --- a/var/package/Interface_Frontend_Base_Default-1.9.2.1.xml +++ b/var/package/Interface_Frontend_Base_Default-1.9.2.2.xml @@ -1,18 +1,18 @@ Interface_Frontend_Base_Default - 1.9.2.1 + 1.9.2.2 stable AFL v3.0 community This is a Magento themes base This is a Magento themes base - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - - + 2015-10-27 + + - 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.11.9.2.1 + 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.21.9.2.2 diff --git a/var/package/Interface_Frontend_Default-1.9.2.1.xml b/var/package/Interface_Frontend_Default-1.9.2.2.xml similarity index 98% rename from var/package/Interface_Frontend_Default-1.9.2.1.xml rename to var/package/Interface_Frontend_Default-1.9.2.2.xml index 04ba0789099..e82e2528962 100644 --- a/var/package/Interface_Frontend_Default-1.9.2.1.xml +++ b/var/package/Interface_Frontend_Default-1.9.2.2.xml @@ -1,18 +1,18 @@ Interface_Frontend_Default - 1.9.2.1 + 1.9.2.2 stable AFL v3.0 community Default interface for Frontend Default interface for Frontend - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + - 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.11.9.2.1 + 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.21.9.2.2 diff --git a/var/package/Interface_Frontend_Rwd_Default-1.9.2.1.xml b/var/package/Interface_Frontend_Rwd_Default-1.9.2.2.xml similarity index 98% rename from var/package/Interface_Frontend_Rwd_Default-1.9.2.1.xml rename to var/package/Interface_Frontend_Rwd_Default-1.9.2.2.xml index 953aa2b6ddf..fe92262693b 100644 --- a/var/package/Interface_Frontend_Rwd_Default-1.9.2.1.xml +++ b/var/package/Interface_Frontend_Rwd_Default-1.9.2.2.xml @@ -1,18 +1,18 @@ Interface_Frontend_Rwd_Default - 1.9.2.1 + 1.9.2.2 stable AFL v3.0 community This is a RWD themes base This is a RWD themes base - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - - + 2015-10-27 + + - 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.11.9.2.1 + 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.21.9.2.2 diff --git a/var/package/Interface_Install_Default-1.9.2.1.xml b/var/package/Interface_Install_Default-1.9.2.2.xml similarity index 95% rename from var/package/Interface_Install_Default-1.9.2.1.xml rename to var/package/Interface_Install_Default-1.9.2.2.xml index fa255e9a48c..7e2a3d837cc 100644 --- a/var/package/Interface_Install_Default-1.9.2.1.xml +++ b/var/package/Interface_Install_Default-1.9.2.2.xml @@ -1,18 +1,18 @@ Interface_Install_Default - 1.9.2.1 + 1.9.2.2 stable AFL v3.0 community Default interface for Install Default interface for Install - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + - 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.11.9.2.1 + 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.21.9.2.2 diff --git a/var/package/Lib_Cm-1.9.2.1.xml b/var/package/Lib_Cm-1.9.2.2.xml similarity index 82% rename from var/package/Lib_Cm-1.9.2.1.xml rename to var/package/Lib_Cm-1.9.2.2.xml index 4d573cc13fb..92a5649f452 100644 --- a/var/package/Lib_Cm-1.9.2.1.xml +++ b/var/package/Lib_Cm-1.9.2.2.xml @@ -1,18 +1,18 @@ Lib_Cm - 1.9.2.1 + 1.9.2.2 stable New BSD community Redis adapter for Zend_Cache Redis adapter for Zend_Cache - 1.9.2.1 + 1.9.2.2 Colin Mollenhourcorecolin@mollenhour.com - 2015-07-29 - + 2015-10-27 + - 5.2.06.0.0Lib_Crediscommunity1.9.2.11.9.2.1 + 5.2.06.0.0Lib_Crediscommunity1.9.2.21.9.2.2 diff --git a/var/package/Lib_Credis-1.9.2.1.xml b/var/package/Lib_Credis-1.9.2.2.xml similarity index 86% rename from var/package/Lib_Credis-1.9.2.1.xml rename to var/package/Lib_Credis-1.9.2.2.xml index 088d6b425c4..bea1dce6749 100644 --- a/var/package/Lib_Credis-1.9.2.1.xml +++ b/var/package/Lib_Credis-1.9.2.2.xml @@ -1,17 +1,17 @@ Lib_Credis - 1.9.2.1 + 1.9.2.2 stable OSL v3.0 community Credis Library Credis Library - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + 5.2.06.0.0 diff --git a/var/package/Lib_Google_Checkout-1.9.2.1.xml b/var/package/Lib_Google_Checkout-1.9.2.2.xml similarity index 83% rename from var/package/Lib_Google_Checkout-1.9.2.1.xml rename to var/package/Lib_Google_Checkout-1.9.2.2.xml index ee5c30ebbd6..a150d185c46 100644 --- a/var/package/Lib_Google_Checkout-1.9.2.1.xml +++ b/var/package/Lib_Google_Checkout-1.9.2.2.xml @@ -1,17 +1,17 @@ Lib_Google_Checkout - 1.9.2.1 + 1.9.2.2 stable Apache License community Google Checkout Library Google Checkout Library - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + 5.2.06.0.0 diff --git a/var/package/Lib_IDNA2-1.9.2.1.xml b/var/package/Lib_IDNA2-1.9.2.2.xml similarity index 89% rename from var/package/Lib_IDNA2-1.9.2.1.xml rename to var/package/Lib_IDNA2-1.9.2.2.xml index d872a05f5bb..2b541ca4c2f 100644 --- a/var/package/Lib_IDNA2-1.9.2.1.xml +++ b/var/package/Lib_IDNA2-1.9.2.2.xml @@ -1,17 +1,17 @@ Lib_IDNA2 - 1.9.2.1 + 1.9.2.2 stable GNU Lesser General Public License community Magento Library Magento Library - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + 5.2.06.0.0 diff --git a/var/package/Lib_Js_Calendar-1.51.1.2.xml b/var/package/Lib_Js_Calendar-1.51.1.3.xml similarity index 95% rename from var/package/Lib_Js_Calendar-1.51.1.2.xml rename to var/package/Lib_Js_Calendar-1.51.1.3.xml index 277ed19fbef..8226b39fbbb 100644 --- a/var/package/Lib_Js_Calendar-1.51.1.2.xml +++ b/var/package/Lib_Js_Calendar-1.51.1.3.xml @@ -1,17 +1,17 @@ Lib_Js_Calendar - 1.51.1.2 + 1.51.1.3 stable Mixed community Javascript Calendar for Magento Javascript Calendar for Magento - 1.51.1.2 + 1.51.1.3 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + 5.2.06.0.0 diff --git a/var/package/Lib_Js_Ext-1.9.2.1.xml b/var/package/Lib_Js_Ext-1.9.2.2.xml similarity index 99% rename from var/package/Lib_Js_Ext-1.9.2.1.xml rename to var/package/Lib_Js_Ext-1.9.2.2.xml index 50a2f0c3846..25c403f9637 100644 --- a/var/package/Lib_Js_Ext-1.9.2.1.xml +++ b/var/package/Lib_Js_Ext-1.9.2.2.xml @@ -1,17 +1,17 @@ Lib_Js_Ext - 1.9.2.1 + 1.9.2.2 stable Mixed community Extjs Javascript Libraries for Magento Extjs Javascript Libraries for Magento - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + 5.2.06.0.0 diff --git a/var/package/Lib_Js_Mage-1.9.2.1.xml b/var/package/Lib_Js_Mage-1.9.2.2.xml similarity index 96% rename from var/package/Lib_Js_Mage-1.9.2.1.xml rename to var/package/Lib_Js_Mage-1.9.2.2.xml index cf6806af956..db96d1afbf9 100644 --- a/var/package/Lib_Js_Mage-1.9.2.1.xml +++ b/var/package/Lib_Js_Mage-1.9.2.2.xml @@ -1,18 +1,18 @@ Lib_Js_Mage - 1.9.2.1 + 1.9.2.2 stable Mixed community Javascript Libraries for Magento Javascript Libraries for Magento - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + - 5.2.06.0.0Lib_Js_Prototypecommunity1.9.2.11.9.2.1 + 5.2.06.0.0Lib_Js_Prototypecommunity1.9.2.21.9.2.2 diff --git a/var/package/Lib_Js_Prototype-1.9.2.1.xml b/var/package/Lib_Js_Prototype-1.9.2.2.xml similarity index 99% rename from var/package/Lib_Js_Prototype-1.9.2.1.xml rename to var/package/Lib_Js_Prototype-1.9.2.2.xml index acc16d9294f..df326a3eb8b 100644 --- a/var/package/Lib_Js_Prototype-1.9.2.1.xml +++ b/var/package/Lib_Js_Prototype-1.9.2.2.xml @@ -1,17 +1,17 @@ Lib_Js_Prototype - 1.9.2.1 + 1.9.2.2 stable Mixed community Prototype and Scriptaculous Javascript Libraries for Magento Prototype and Scriptaculous Javascript Libraries for Magento - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + 5.2.06.0.0 diff --git a/var/package/Lib_Js_TinyMCE-3.5.11.1.xml b/var/package/Lib_Js_TinyMCE-3.5.11.2.xml similarity index 99% rename from var/package/Lib_Js_TinyMCE-3.5.11.1.xml rename to var/package/Lib_Js_TinyMCE-3.5.11.2.xml index 2561d495a7e..9e7612bdef0 100644 --- a/var/package/Lib_Js_TinyMCE-3.5.11.1.xml +++ b/var/package/Lib_Js_TinyMCE-3.5.11.2.xml @@ -1,17 +1,17 @@ Lib_Js_TinyMCE - 3.5.11.1 + 3.5.11.2 stable Mixed community TinyMCE Javascript Libraries for Magento TinyMCE Javascript Libraries for Magento - 3.5.11.1 + 3.5.11.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + 5.2.06.0.0 diff --git a/var/package/Lib_LinLibertineFont-2.8.14.2.xml b/var/package/Lib_LinLibertineFont-2.8.14.3.xml similarity index 92% rename from var/package/Lib_LinLibertineFont-2.8.14.2.xml rename to var/package/Lib_LinLibertineFont-2.8.14.3.xml index 729f8d718f1..75ac2a92cdc 100644 --- a/var/package/Lib_LinLibertineFont-2.8.14.2.xml +++ b/var/package/Lib_LinLibertineFont-2.8.14.3.xml @@ -1,17 +1,17 @@ Lib_LinLibertineFont - 2.8.14.2 + 2.8.14.3 stable GPL community Libertine Open Fonts Project fonts for PDF print-outs Libertine Open Fonts Project fonts for PDF print-outs - 2.8.14.2 + 2.8.14.3 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + 5.2.06.0.0 diff --git a/var/package/Lib_Mage-1.9.2.1.xml b/var/package/Lib_Mage-1.9.2.2.xml similarity index 97% rename from var/package/Lib_Mage-1.9.2.1.xml rename to var/package/Lib_Mage-1.9.2.2.xml index 021ea3641d1..c1595bbca55 100644 --- a/var/package/Lib_Mage-1.9.2.1.xml +++ b/var/package/Lib_Mage-1.9.2.2.xml @@ -1,18 +1,18 @@ Lib_Mage - 1.9.2.1 + 1.9.2.2 stable OSL v3.0 community Mage Library Mage Library - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - - + 2015-10-27 + + 5.2.06.0.0 diff --git a/var/package/Lib_Magento-1.9.2.1.xml b/var/package/Lib_Magento-1.9.2.2.xml similarity index 94% rename from var/package/Lib_Magento-1.9.2.1.xml rename to var/package/Lib_Magento-1.9.2.2.xml index 15b5b436497..756963f9ace 100644 --- a/var/package/Lib_Magento-1.9.2.1.xml +++ b/var/package/Lib_Magento-1.9.2.2.xml @@ -1,17 +1,17 @@ Lib_Magento - 1.9.2.1 + 1.9.2.2 stable OSL v3.0 community Magento Library Magento Library - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + 5.2.06.0.0 diff --git a/var/package/Lib_Pelago-1.9.2.1.xml b/var/package/Lib_Pelago-1.9.2.2.xml similarity index 86% rename from var/package/Lib_Pelago-1.9.2.1.xml rename to var/package/Lib_Pelago-1.9.2.2.xml index 63ba21b7ff2..094c66b7177 100644 --- a/var/package/Lib_Pelago-1.9.2.1.xml +++ b/var/package/Lib_Pelago-1.9.2.2.xml @@ -1,17 +1,17 @@ Lib_Pelago - 1.9.2.1 + 1.9.2.2 stable OSL v3.0 community Pelago Library Pelago Library - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + 5.2.06.0.0 diff --git a/var/package/Lib_Phpseclib-1.9.2.1.xml b/var/package/Lib_Phpseclib-1.9.2.2.xml similarity index 94% rename from var/package/Lib_Phpseclib-1.9.2.1.xml rename to var/package/Lib_Phpseclib-1.9.2.2.xml index 7dcdaa9e162..4aa8e2bebce 100644 --- a/var/package/Lib_Phpseclib-1.9.2.1.xml +++ b/var/package/Lib_Phpseclib-1.9.2.2.xml @@ -1,17 +1,17 @@ Lib_Phpseclib - 1.9.2.1 + 1.9.2.2 stable LGPL v.3 community Phpseclib Library Phpseclib Library - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + 5.2.06.0.0 diff --git a/var/package/Lib_Unserialize-1.9.2.2.xml b/var/package/Lib_Unserialize-1.9.2.2.xml new file mode 100644 index 00000000000..3a04b37d779 --- /dev/null +++ b/var/package/Lib_Unserialize-1.9.2.2.xml @@ -0,0 +1,18 @@ + + + Lib_Unserialize + 1.9.2.2 + stable + Magento Core Edition + community + + Magento Library + Magento Library + 1.9.2.2 + Magento Core Teamcorecore@magentocommerce.com + 2015-10-27 + + + + 5.2.06.0.0 + diff --git a/var/package/Lib_Varien-1.9.2.1.xml b/var/package/Lib_Varien-1.9.2.2.xml similarity index 91% rename from var/package/Lib_Varien-1.9.2.1.xml rename to var/package/Lib_Varien-1.9.2.2.xml index 0201d21c98f..a3612b94083 100644 --- a/var/package/Lib_Varien-1.9.2.1.xml +++ b/var/package/Lib_Varien-1.9.2.2.xml @@ -1,18 +1,18 @@ Lib_Varien - 1.9.2.1 + 1.9.2.2 stable OSL v3.0 community Varien Library Varien Library - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - - + 2015-10-27 + + - 5.2.06.0.0Lib_ZFcommunity1.12.10.11.12.10.1PDOSPLcurlSimpleXMLdomgdiconvpdo_mysqlmcryptpcreReflectionsession + 5.2.06.0.0Lib_ZFcommunity1.12.10.21.12.10.2PDOSPLcurlSimpleXMLdomgdiconvpdo_mysqlmcryptpcreReflectionsession diff --git a/var/package/Lib_ZF-1.12.10.1.xml b/var/package/Lib_ZF-1.12.10.1.xml deleted file mode 100644 index f705edb09bb..00000000000 --- a/var/package/Lib_ZF-1.12.10.1.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - Lib_ZF - 1.12.10.1 - stable - New BSD - community - - Zend Framework - Zend Framework - 1.12.10.1 - Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - - - - 5.2.06.0.0Lib_ZF_Localecommunity1.12.10.11.12.10.1 - diff --git a/var/package/Lib_ZF-1.12.10.2.xml b/var/package/Lib_ZF-1.12.10.2.xml new file mode 100644 index 00000000000..3c69ead11d1 --- /dev/null +++ b/var/package/Lib_ZF-1.12.10.2.xml @@ -0,0 +1,18 @@ + + + Lib_ZF + 1.12.10.2 + stable + New BSD + community + + Zend Framework + Zend Framework + 1.12.10.2 + Magento Core Teamcorecore@magentocommerce.com + 2015-10-27 + + + + 5.2.06.0.0Lib_ZF_Localecommunity1.12.10.21.12.10.2 + diff --git a/var/package/Lib_ZF_Locale-1.12.10.1.xml b/var/package/Lib_ZF_Locale-1.12.10.2.xml similarity index 99% rename from var/package/Lib_ZF_Locale-1.12.10.1.xml rename to var/package/Lib_ZF_Locale-1.12.10.2.xml index dcf014b1cd5..a47a4d3c900 100644 --- a/var/package/Lib_ZF_Locale-1.12.10.1.xml +++ b/var/package/Lib_ZF_Locale-1.12.10.2.xml @@ -1,7 +1,7 @@ Lib_ZF_Locale - 1.12.10.1 + 1.12.10.2 stable New BSD community @@ -9,11 +9,11 @@ Zend Framework Locale Zend Framework Locale splitted from ZF to avoid memory overruns during installation and upgrades - 1.12.10.1 + 1.12.10.2 Magento Enterprise Teamcorecore@magentocommerce.com - 2015-07-29 - - + 2015-10-27 + + 5.2.06.0.0 diff --git a/var/package/Mage_All_Latest-1.9.2.1.xml b/var/package/Mage_All_Latest-1.9.2.1.xml deleted file mode 100644 index cf713f7c53b..00000000000 --- a/var/package/Mage_All_Latest-1.9.2.1.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - Mage_All_Latest - 1.9.2.1 - stable - OSL v3.0 - community - - Metapackage for latest Magento 1.9.0.0 release - Metapackage for latest Magento 1.9.0.0 release - 1.9.2.1 - Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - - - - 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.11.9.2.1Mage_Core_Adminhtmlcommunity1.9.2.11.9.2.1Interface_Adminhtml_Defaultcommunity1.9.2.11.9.2.1Interface_Frontend_Defaultcommunity1.9.2.11.9.2.1Interface_Install_Defaultcommunity1.9.2.11.9.2.1Mage_Downloadercommunity1.9.2.11.9.2.1Mage_Centinelcommunity1.9.2.11.9.2.1Interface_Frontend_Base_Defaultcommunity1.9.2.11.9.2.1Phoenix_Moneybookerscommunity1.9.2.11.9.2.1Mage_Compilercommunity1.9.2.11.9.2.1Magento_Mobilecommunity1.9.2.11.9.2.1Lib_Cmcommunity1.9.2.11.9.2.1Cm_RedisSessioncommunity1.9.2.11.9.2.1Interface_Frontend_Rwd_Defaultcommunity1.9.2.11.9.2.1 - diff --git a/var/package/Mage_All_Latest-1.9.2.2.xml b/var/package/Mage_All_Latest-1.9.2.2.xml new file mode 100644 index 00000000000..8686be3bfd1 --- /dev/null +++ b/var/package/Mage_All_Latest-1.9.2.2.xml @@ -0,0 +1,18 @@ + + + Mage_All_Latest + 1.9.2.2 + stable + OSL v3.0 + community + + Metapackage for latest Magento 1.9.0.0 release + Metapackage for latest Magento 1.9.0.0 release + 1.9.2.2 + Magento Core Teamcorecore@magentocommerce.com + 2015-10-27 + + + + 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.21.9.2.2Mage_Core_Adminhtmlcommunity1.9.2.21.9.2.2Interface_Adminhtml_Defaultcommunity1.9.2.21.9.2.2Interface_Frontend_Defaultcommunity1.9.2.21.9.2.2Interface_Install_Defaultcommunity1.9.2.21.9.2.2Mage_Downloadercommunity1.9.2.21.9.2.2Mage_Centinelcommunity1.9.2.21.9.2.2Interface_Frontend_Base_Defaultcommunity1.9.2.21.9.2.2Phoenix_Moneybookerscommunity1.9.2.21.9.2.2Mage_Compilercommunity1.9.2.21.9.2.2Magento_Mobilecommunity1.9.2.21.9.2.2Lib_Cmcommunity1.9.2.21.9.2.2Cm_RedisSessioncommunity1.9.2.21.9.2.2Interface_Frontend_Rwd_Defaultcommunity1.9.2.21.9.2.2 + diff --git a/var/package/Mage_Centinel-1.9.2.1.xml b/var/package/Mage_Centinel-1.9.2.2.xml similarity index 96% rename from var/package/Mage_Centinel-1.9.2.1.xml rename to var/package/Mage_Centinel-1.9.2.2.xml index a737855da7f..20132dba011 100644 --- a/var/package/Mage_Centinel-1.9.2.1.xml +++ b/var/package/Mage_Centinel-1.9.2.2.xml @@ -1,18 +1,18 @@ Mage_Centinel - 1.9.2.1 + 1.9.2.2 stable mixed community 3D Secure Card Validation An integration with Cardinalcommerce Centinel service. Provides option to validate Visa and Mastercard cards for eliminating possible fraudlent order placement attempts. Adds information about Electronic Commerce Identifier, that designates liability for chargeback. - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + - 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.11.9.2.1 + 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.21.9.2.2 diff --git a/var/package/Mage_Compiler-1.9.2.1.xml b/var/package/Mage_Compiler-1.9.2.2.xml similarity index 91% rename from var/package/Mage_Compiler-1.9.2.1.xml rename to var/package/Mage_Compiler-1.9.2.2.xml index 2d8c122ebe4..1134c3dc6c9 100644 --- a/var/package/Mage_Compiler-1.9.2.1.xml +++ b/var/package/Mage_Compiler-1.9.2.2.xml @@ -1,18 +1,18 @@ Mage_Compiler - 1.9.2.1 + 1.9.2.2 stable OSL v3.0 community This module compiles all files of a Magento installation and creates a single include path to increase performance This module compiles all files of a Magento installation and creates a single include path to increase performance - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + - 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.11.9.2.1Mage_Core_Adminhtmlcommunity1.9.2.11.9.2.1 + 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.21.9.2.2Mage_Core_Adminhtmlcommunity1.9.2.21.9.2.2 diff --git a/var/package/Mage_Core_Adminhtml-1.9.2.1.xml b/var/package/Mage_Core_Adminhtml-1.9.2.1.xml deleted file mode 100644 index 1dff21370dd..00000000000 --- a/var/package/Mage_Core_Adminhtml-1.9.2.1.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - Mage_Core_Adminhtml - 1.9.2.1 - stable - OSL v3.0 - community - - Magento Administration Panel - Magento Administration Panel - 1.9.2.1 - Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - - - - 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.11.9.2.1Lib_Js_Calendarcommunity1.51.1.21.51.1.2Lib_Js_Extcommunity1.9.2.11.9.2.1Lib_LinLibertineFontcommunity2.8.14.22.8.14.2Lib_Js_TinyMCEcommunity3.5.11.13.5.11.1 - diff --git a/var/package/Mage_Core_Adminhtml-1.9.2.2.xml b/var/package/Mage_Core_Adminhtml-1.9.2.2.xml new file mode 100644 index 00000000000..b7869e7774a --- /dev/null +++ b/var/package/Mage_Core_Adminhtml-1.9.2.2.xml @@ -0,0 +1,18 @@ + + + Mage_Core_Adminhtml + 1.9.2.2 + stable + OSL v3.0 + community + + Magento Administration Panel + Magento Administration Panel + 1.9.2.2 + Magento Core Teamcorecore@magentocommerce.com + 2015-10-27 + + + + 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.21.9.2.2Lib_Js_Calendarcommunity1.51.1.31.51.1.3Lib_Js_Extcommunity1.9.2.21.9.2.2Lib_LinLibertineFontcommunity2.8.14.32.8.14.3Lib_Js_TinyMCEcommunity3.5.11.23.5.11.2 + diff --git a/var/package/Mage_Core_Modules-1.9.2.1.xml b/var/package/Mage_Core_Modules-1.9.2.1.xml deleted file mode 100644 index 4bef04851b4..00000000000 --- a/var/package/Mage_Core_Modules-1.9.2.1.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - Mage_Core_Modules - 1.9.2.1 - stable - OSL v3.0 - community - - Collection of Magento Core Modules - Collection of Magento Core Modules - 1.9.2.1 - Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - - - - 5.2.06.0.0Lib_Variencommunity1.9.2.11.9.2.1Lib_Google_Checkoutcommunity1.9.2.11.9.2.1Lib_Js_Calendarcommunity1.51.1.21.51.1.2Lib_Js_Magecommunity1.9.2.11.9.2.1Lib_Js_Prototypecommunity1.9.2.11.9.2.1Lib_Phpseclibcommunity1.9.2.11.9.2.1Mage_Locale_en_UScommunity1.9.2.11.9.2.1Lib_Magecommunity1.9.2.11.9.2.1Lib_Magentocommunity1.9.2.11.9.2.1Lib_Crediscommunity1.9.2.11.9.2.1Lib_Pelagocommunity1.9.2.11.9.2.1Lib_IDNA2community1.9.2.11.9.2.1 - diff --git a/var/package/Mage_Core_Modules-1.9.2.2.xml b/var/package/Mage_Core_Modules-1.9.2.2.xml new file mode 100644 index 00000000000..a9ae564ae1c --- /dev/null +++ b/var/package/Mage_Core_Modules-1.9.2.2.xml @@ -0,0 +1,18 @@ + + + Mage_Core_Modules + 1.9.2.2 + stable + OSL v3.0 + community + + Collection of Magento Core Modules + Collection of Magento Core Modules + 1.9.2.2 + Magento Core Teamcorecore@magentocommerce.com + 2015-10-27 + + + + 5.2.06.0.0Lib_Variencommunity1.9.2.21.9.2.2Lib_Google_Checkoutcommunity1.9.2.21.9.2.2Lib_Js_Calendarcommunity1.51.1.31.51.1.3Lib_Js_Magecommunity1.9.2.21.9.2.2Lib_Js_Prototypecommunity1.9.2.21.9.2.2Lib_Phpseclibcommunity1.9.2.21.9.2.2Mage_Locale_en_UScommunity1.9.2.21.9.2.2Lib_Magecommunity1.9.2.21.9.2.2Lib_Magentocommunity1.9.2.21.9.2.2Lib_Crediscommunity1.9.2.21.9.2.2Lib_Pelagocommunity1.9.2.21.9.2.2Lib_Unserializecommunity1.9.2.21.9.2.2Lib_IDNA2community1.9.2.21.9.2.2 + diff --git a/var/package/Mage_Downloader-1.9.2.1.xml b/var/package/Mage_Downloader-1.9.2.2.xml similarity index 96% rename from var/package/Mage_Downloader-1.9.2.1.xml rename to var/package/Mage_Downloader-1.9.2.2.xml index 7c985b35965..ece8c871cd6 100644 --- a/var/package/Mage_Downloader-1.9.2.1.xml +++ b/var/package/Mage_Downloader-1.9.2.2.xml @@ -1,18 +1,18 @@ Mage_Downloader - 1.9.2.1 + 1.9.2.2 stable OSL v3.0 community Magento Downloader Magento Downloader - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - - + 2015-10-27 + + 5.2.06.0.0 diff --git a/var/package/Mage_Locale_en_US-1.9.2.1.xml b/var/package/Mage_Locale_en_US-1.9.2.2.xml similarity index 97% rename from var/package/Mage_Locale_en_US-1.9.2.1.xml rename to var/package/Mage_Locale_en_US-1.9.2.2.xml index a2613ca389c..4fddfe2c85a 100644 --- a/var/package/Mage_Locale_en_US-1.9.2.1.xml +++ b/var/package/Mage_Locale_en_US-1.9.2.2.xml @@ -1,18 +1,18 @@ Mage_Locale_en_US - 1.9.2.1 + 1.9.2.2 stable AFL v3.0 community en_US locale en_US locale - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - - + 2015-10-27 + + 5.2.06.0.0 diff --git a/var/package/Magento_Mobile-1.9.2.1.xml b/var/package/Magento_Mobile-1.9.2.2.xml similarity index 99% rename from var/package/Magento_Mobile-1.9.2.1.xml rename to var/package/Magento_Mobile-1.9.2.2.xml index cb6c7b4fc53..1454d58b278 100644 --- a/var/package/Magento_Mobile-1.9.2.1.xml +++ b/var/package/Magento_Mobile-1.9.2.2.xml @@ -1,18 +1,18 @@ Magento_Mobile - 1.9.2.1 + 1.9.2.2 stable mixed community Magento Mobile Xml Interface An integration Magento with mobile applications (e.g. iPhone, Android, iPad) - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + - 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.11.9.2.1 + 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.21.9.2.2 diff --git a/var/package/Phoenix_Moneybookers-1.9.2.1.xml b/var/package/Phoenix_Moneybookers-1.9.2.2.xml similarity index 97% rename from var/package/Phoenix_Moneybookers-1.9.2.1.xml rename to var/package/Phoenix_Moneybookers-1.9.2.2.xml index fb818d48835..219d959402e 100644 --- a/var/package/Phoenix_Moneybookers-1.9.2.1.xml +++ b/var/package/Phoenix_Moneybookers-1.9.2.2.xml @@ -1,7 +1,7 @@ Phoenix_Moneybookers - 1.9.2.1 + 1.9.2.2 stable mixed community @@ -25,11 +25,11 @@ Przelewy24 - Poland Sofortüberweisung - Germany Nordea Solo - Finland Moneybookers eWallet - 1.9.2.1 + 1.9.2.2 Magento Core Teamcorecore@magentocommerce.com - 2015-07-29 - + 2015-10-27 + - 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.11.9.2.1 + 5.2.06.0.0Mage_Core_Modulescommunity1.9.2.21.9.2.2