diff --git a/.github/phpstan-baseline.neon b/.github/phpstan-baseline.neon index 7c65d44ed5c..0d28d4672d9 100644 --- a/.github/phpstan-baseline.neon +++ b/.github/phpstan-baseline.neon @@ -1495,11 +1495,6 @@ parameters: count: 1 path: ../app/code/core/Mage/Adminhtml/Helper/Dashboard/Abstract.php - - - message: "#^Method Mage_Adminhtml_Helper_Data\\:\\:prepareFilterString\\(\\) has invalid return type data\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Helper/Data.php - - message: "#^Method Mage_Adminhtml_Model_Config\\:\\:getSection\\(\\) should return Varien_Simplexml_Element but return statement is missing\\.$#" count: 1 diff --git a/app/code/core/Mage/Admin/Model/Resource/Acl.php b/app/code/core/Mage/Admin/Model/Resource/Acl.php index 14f8290d5c4..71175b717e7 100644 --- a/app/code/core/Mage/Admin/Model/Resource/Acl.php +++ b/app/code/core/Mage/Admin/Model/Resource/Acl.php @@ -145,26 +145,8 @@ public function loadRules(Mage_Admin_Model_Acl $acl, array $rulesArr) $acl->deny($role, $resource, $privileges, $assert); } } catch (Exception $e) { - //$m = $e->getMessage(); - //if ( eregi("^Resource '(.*)' not found", $m) ) { - // Deleting non existent resource rule from rules table - //$cond = $this->_write->quoteInto('resource_id = ?', $resource); - //$this->_write->delete(Mage::getSingleton('core/resource')->getTableName('admin/rule'), $cond); - //} else { - //TODO: We need to log such exceptions to somewhere like a system/errors.log - //} + Mage::logException($e); } - /* - switch ($rule['permission']) { - case Mage_Admin_Model_Acl::RULE_PERM_ALLOW: - $acl->allow($role, $resource, $privileges, $assert); - break; - - case Mage_Admin_Model_Acl::RULE_PERM_DENY: - $acl->deny($role, $resource, $privileges, $assert); - break; - } - */ } return $this; } diff --git a/app/code/core/Mage/AdminNotification/Model/Feed.php b/app/code/core/Mage/AdminNotification/Model/Feed.php index 7f861fd1b19..5b82673dceb 100644 --- a/app/code/core/Mage/AdminNotification/Model/Feed.php +++ b/app/code/core/Mage/AdminNotification/Model/Feed.php @@ -131,7 +131,6 @@ public function getFrequency() public function getLastUpdate() { return Mage::app()->loadCache('admin_notifications_lastcheck'); -// return Mage::getStoreConfig(self::XML_LAST_UPDATE_PATH); } /** @@ -142,9 +141,6 @@ public function getLastUpdate() public function setLastUpdate() { Mage::app()->saveCache(time(), 'admin_notifications_lastcheck'); -// $config = Mage::getModel('core/config'); -// /* @var $config Mage_Core_Model_Config */ -// $config->saveConfig(self::XML_LAST_UPDATE_PATH, time()); return $this; } diff --git a/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php b/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php index 0bd86a24b4f..a4d1cfc475f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php @@ -101,24 +101,6 @@ protected function _prepareColumns() 'frame_callback' => array($this, 'decorateStatus') )); -// $this->addColumn('action', -// array( -// 'header' => $this->__('Action'), -// 'width' => '100', -// 'type' => 'action', -// 'getter' => 'getId', -// 'actions' => array( -// array( -// 'caption' => $this->__('Refresh'), -// 'url' => array('base'=> '*/*/refresh'), -// 'field' => 'type' -// ), -// ), -// 'filter' => false, -// 'sortable' => false, -// 'is_system' => true, -// )); - return parent::_prepareColumns(); } @@ -145,12 +127,11 @@ public function decorateStatus($value, $row, $column, $isExport) /** * Get row edit url * - * @return string + * @return false */ public function getRowUrl($row) { return false; - //return $this->getUrl('*/*/edit', array('type'=>$row->getId())); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php index 19670fc77c2..5d2c9a45497 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php @@ -98,7 +98,7 @@ public function getStoreConfigurationUrl() { $storeId = (int) $this->getRequest()->getParam('store'); $params = array(); -// $params = array('section'=>'catalog'); + if ($storeId) { $store = Mage::app()->getStore($storeId); $params['website'] = $store->getWebsite()->getCode(); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php index 5fa6d8d2c82..c2fca275d66 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php @@ -60,16 +60,6 @@ public function _prepareLayout() $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('catalog')->__('General Information'))); if (!$this->getCategory()->getId()) { -// $fieldset->addField('path', 'select', array( -// 'name' => 'path', -// 'label' => Mage::helper('catalog')->__('Parent Category'), -// 'value' => base64_decode($this->getRequest()->getParam('parent')), -// 'values'=> $this->_getParentCategoryOptions(), -// //'required' => true, -// //'class' => 'required-entry' -// ), -// 'name' -// ); $parentId = $this->getRequest()->getParam('parent'); if (!$parentId) { $parentId = Mage_Catalog_Model_Category::TREE_ROOT_ID; diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php index 3ac6975a6c9..33e6c3c1ed4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php @@ -87,14 +87,12 @@ protected function _prepareForm() ), )); -// if ($model->getIsUserDefined() || !$model->getId()) { - $fieldset->addField('is_visible_on_front', 'select', array( - 'name' => 'is_visible_on_front', - 'label' => Mage::helper('catalog')->__('Visible on Catalog Pages on Front-end'), - 'title' => Mage::helper('catalog')->__('Visible on Catalog Pages on Front-end'), - 'values' => $yesno, - )); -// } + $fieldset->addField('is_visible_on_front', 'select', array( + 'name' => 'is_visible_on_front', + 'label' => Mage::helper('catalog')->__('Visible on Catalog Pages on Front-end'), + 'title' => Mage::helper('catalog')->__('Visible on Catalog Pages on Front-end'), + 'values' => $yesno, + )); $form->setValues($model->getData()); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php index 1cc766bbd27..5975b5b4022 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php @@ -216,7 +216,6 @@ public function getTemplatesHtml() public function getOptionValues() { $optionsArr = array_reverse($this->getProduct()->getOptions(), true); -// $optionsArr = $this->getProduct()->getOptions(); if (!$this->_values) { $showPrice = $this->getCanReadPrice(); @@ -245,9 +244,6 @@ public function getOptionValues() } if ($option->getGroupByType() == Mage_Catalog_Model_Product_Option::OPTION_GROUP_SELECT) { - -// $valuesArr = array_reverse($option->getValues(), true); - $i = 0; $itemCount = 0; foreach ($option->getValues() as $_value) { diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php index e9a8e585ee2..6350182a790 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php @@ -35,26 +35,12 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs_Configurable extends Mage_A { protected function _prepareLayout() { -// $product = $this->getProduct(); + $this->addTab('super_settings', array( + 'label' => Mage::helper('catalog')->__('Configurable Product Settings'), + 'content' => $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_super_settings')->toHtml(), + 'active' => true + )); -// if (!($superAttributes = $product->getTypeInstance()->getUsedProductAttributeIds())) { - $this->addTab('super_settings', array( - 'label' => Mage::helper('catalog')->__('Configurable Product Settings'), - 'content' => $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_super_settings')->toHtml(), - 'active' => true - )); - -// } else { -// parent::_prepareLayout(); -// -// $this->addTab('configurable', array( -// 'label' => Mage::helper('catalog')->__('Associated Products'), -// 'content' => $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_super_config', 'admin.super.config.product') -// ->setProductId($this->getRequest()->getParam('id')) -// ->toHtml(), -// )); -// $this->bindShadowTabs('configurable', 'customer_options'); -// } return $this; } } diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php index 40e26e89a9b..70c484f0de3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php @@ -116,14 +116,6 @@ function(v, elem){ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element'); $form->getElement('website_id')->setRenderer($renderer); -// if (Mage::app()->isSingleStoreMode()) { -// $fieldset->removeField('website_id'); -// $fieldset->addField('website_id', 'hidden', array( -// 'name' => 'website_id' -// )); -// $customer->setWebsiteId(Mage::app()->getStore(true)->getWebsiteId()); -// } - $customerStoreId = null; if ($customer->getId()) { $customerStoreId = Mage::app()->getWebsite($customer->getWebsiteId())->getDefaultStore()->getId(); diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php index 0878dba5f1b..09519dcb3d8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php @@ -141,7 +141,6 @@ protected function _prepareColumns() 'header' => Mage::helper('customer')->__('Type'), 'type' => 'options', 'options' => $typeOptions, -// 'renderer' => 'adminhtml/customer_online_grid_renderer_type', 'index' => 'visitor_type' )); diff --git a/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php b/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php index 7e2a4cf962d..639c2136d96 100644 --- a/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php @@ -109,8 +109,6 @@ protected function _prepareMassaction() 'confirm' => Mage::helper('adminnotification')->__('Are you sure?') )); -// $this->getColumn('massaction')->setWidth('30px'); - return $this; } diff --git a/app/code/core/Mage/Adminhtml/Block/Page/Menu.php b/app/code/core/Mage/Adminhtml/Block/Page/Menu.php index 057004a45b9..2f505529a78 100644 --- a/app/code/core/Mage/Adminhtml/Block/Page/Menu.php +++ b/app/code/core/Mage/Adminhtml/Block/Page/Menu.php @@ -114,9 +114,6 @@ protected function _getHelperValue(Varien_Simplexml_Element $child) if (isset($childAttributes['module'])) { $helperName = (string)$childAttributes['module']; } -// if (isset($childAttributes['translate'])) { -// $titleNodeName = (string)$childAttributes['translate']; -// } return Mage::helper($helperName)->__((string)$child->$titleNodeName); } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Form.php index 27ca31c16be..d1cb1599fa3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Form.php @@ -66,10 +66,6 @@ public function getShipment() protected function _prepareLayout() { -// $infoBlock = $this->getLayout()->createBlock('adminhtml/sales_order_view_info') -// ->setOrder($this->getShipment()->getOrder()); -// $this->setChild('order_info', $infoBlock); - $this->setChild( 'items', $this->getLayout()->createBlock('adminhtml/sales_order_shipment_create_items') @@ -78,11 +74,7 @@ protected function _prepareLayout() 'tracking', $this->getLayout()->createBlock('adminhtml/sales_order_shipment_create_tracking') ); -// $paymentInfoBlock = $this->getLayout()->createBlock('adminhtml/sales_order_payment') -// ->setPayment($this->getShipment()->getOrder()->getPayment()); -// $this->setChild('payment_info', $paymentInfoBlock); -// return parent::_prepareLayout(); return $this; } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php index 8afdbaef14b..26765117c2c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php @@ -325,29 +325,4 @@ public function getHeaderHtml() { return '

' . $this->escapeHtml($this->getHeaderText()) . '

'; } -// -// /** -// * Return URL for accept payment action -// * -// * @return string -// */ -// public function getAcceptPaymentUrl() -// { -// return $this->getUrl('*/*/reviewPayment', array('action' => 'accept')); -// } -// -// /** -// * Return URL for deny payment action -// * -// * @return string -// */ -// public function getDenyPaymentUrl() -// { -// return $this->getUrl('*/*/reviewPayment', array('action' => 'deny')); -// } -// -// public function getPaymentReviewUpdateUrl() -// { -// return $this->getUrl('*/*/reviewPaymentUpdate'); -// } } diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/All.php b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/All.php index 5e84a48d8d8..95aa2330645 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/All.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/All.php @@ -42,10 +42,7 @@ public function __construct() protected function _prepareCollection() { - $collection = Mage::getResourceModel('tag/tag_collection') -// ->addStoreFilter(Mage::app()->getStore()->getId()) - ->addStoresVisibility() - ; + $collection = Mage::getResourceModel('tag/tag_collection')->addStoresVisibility(); $this->setCollection($collection); return parent::_prepareCollection(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Customers.php b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Customers.php index 801b4910682..a30e58d5828 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Customers.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Customers.php @@ -39,16 +39,7 @@ protected function _prepareCollection() $collection = Mage::getResourceModel('tag_customer/collection') ->addAttributeToSelect('firstname') ->addAttributeToSelect('middlename') - ->addAttributeToSelect('lastname') -// ->addAttributeToSelect('email') -// ->addAttributeToSelect('created_at') -// ->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing') -// ->joinAttribute('billing_city', 'customer_address/city', 'default_billing') -// ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing') -// ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing') -// ->joinField('billing_country_name', 'directory/country_name', 'name', -// 'country_id=billing_country_id', array('language_code'=>'en')) - ; + ->addAttributeToSelect('lastname'); if ($productId = $this->getRequest()->getParam('product_id')) { $collection->addProductFilter($productId); @@ -83,32 +74,6 @@ protected function _prepareColumns() 'header' => Mage::helper('tag')->__('Last Name'), 'index' => 'lastname', )); -// $this->addColumn('email', array( -// 'header' =>Mage::helper('tag')->__('Email'), -// 'align' =>'center', -// 'index' =>'email' -// )); -// $this->addColumn('Telephone', array( -// 'header' =>Mage::helper('tag')->__('Telephone'), -// 'align' =>'center', -// 'index' =>'billing_telephone' -// )); -// $this->addColumn('billing_postcode', array( -// 'header' =>Mage::helper('tag')->__('ZIP/Post Code'), -// 'index' =>'billing_postcode', -// )); -// $this->addColumn('billing_country_name', array( -// 'header' =>Mage::helper('tag')->__('Country'), -// #'filter' => 'adminhtml/customer_grid_filter_country', -// 'index' =>'billing_country_name', -// )); -// $this->addColumn('customer_since', array( -// 'header' =>Mage::helper('tag')->__('Customer Since'), -// 'type' => 'date', -// 'align' => 'center', -// #'format' => 'Y.m.d', -// 'index' =>'created_at', -// )); $this->addColumn('tags', array( 'header' => Mage::helper('tag')->__('Tags'), 'index' => 'tags', @@ -132,8 +97,6 @@ protected function _prepareColumns() ->setColumnFilter('middlename') ->setColumnFilter('lastname'); -// $this->addExportType('*/*/exportCsv', Mage::helper('tag')->__('CSV')); -// $this->addExportType('*/*/exportXml', Mage::helper('tag')->__('XML')); return parent::_prepareColumns(); } diff --git a/app/code/core/Mage/Adminhtml/Helper/Data.php b/app/code/core/Mage/Adminhtml/Helper/Data.php index f6c3620ce1f..b69777bc7e3 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Data.php +++ b/app/code/core/Mage/Adminhtml/Helper/Data.php @@ -113,10 +113,6 @@ public static function getUrl($route='', $params=array()) return Mage::getModel('adminhtml/url')->getUrl($route, $params); } -// public function getCurrentUserId() -// { -// return Mage::getSingleton('admin/session')->getUser()->getId(); -// } public function getCurrentUserId() { if (Mage::getSingleton('admin/session')->getUser()) { @@ -129,7 +125,7 @@ public function getCurrentUserId() * Decode filter string * * @param string $filterString - * @return data + * @return array */ public function prepareFilterString($filterString) { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php index 71bbf0b6bdd..39b55b08b8f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php @@ -34,12 +34,6 @@ class Mage_Adminhtml_Model_System_Config_Backend_Seo_Product extends Mage_Core_M */ protected function _afterSave() { - /** - * Index model responsible for rewrites index - */ -// if ($this->isValueChanged()) { -// Mage::getSingleton('catalog/url')->refreshRewrites(); -// } return $this; } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status.php index 1b49e7259d1..1e7b153657f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status.php @@ -32,7 +32,6 @@ class Mage_Adminhtml_Model_System_Config_Source_Order_Status // set null to enable all possible protected $_stateStatuses = array( Mage_Sales_Model_Order::STATE_NEW, -// Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Sales_Model_Order::STATE_COMPLETE, Mage_Sales_Model_Order::STATE_CLOSED, diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allowedmethods.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allowedmethods.php index d7320d0dcfa..16289696f5e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allowedmethods.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allowedmethods.php @@ -31,19 +31,4 @@ protected function _getPaymentMethods() { return Mage::getSingleton('payment/config')->getActiveMethods(); } - -// public function toOptionArray() -// { -// $methods = array(array('value'=>'', 'label'=>'')); -// $payments = Mage::getSingleton('payment/config')->getActiveMethods(); -// foreach ($payments as $paymentCode=>$paymentModel) { -// $paymentTitle = Mage::getStoreConfig('payment/'.$paymentCode.'/title'); -// $methods[$paymentCode] = array( -// 'label' => $paymentTitle, -// 'value' => $paymentCode, -// ); -// } -// -// return $methods; -// } } diff --git a/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php b/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php index 150d865fba8..a6c14f412e6 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php @@ -154,8 +154,6 @@ public function saveAction() try { $model->save(); if ( $uRoles = $this->getRequest()->getParam('roles', false) ) { - /*parse_str($uRoles, $uRoles); - $uRoles = array_keys($uRoles);*/ if (count($uRoles) === 1) { $model->setRoleIds($uRoles) ->setRoleUserId($model->getUserId()) diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php index 34dee0d26ef..28e21ba0bd9 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php @@ -176,7 +176,6 @@ public function editAction() ->setLastViewedStore($this->getRequest()->getParam('store')); Mage::getSingleton('admin/session') ->setLastEditedCategory($category->getId()); -// $this->_initLayoutMessages('adminhtml/session'); $this->loadLayout(); $eventResponse = new Varien_Object(array( diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php index 71b2a5e1acd..c95bd7cec43 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php @@ -533,19 +533,6 @@ public function validateAction() ->setMaxValue($product->getCustomDesignTo()); $product->validate(); - /** - * @todo implement full validation process with errors returning which are ignoring now - */ -// if (is_array($errors = $product->validate())) { -// foreach ($errors as $code => $error) { -// if ($error === true) { -// Mage::throwException(Mage::helper('catalog')->__('Attribute "%s" is invalid.', $product->getResource()->getAttribute($code)->getFrontend()->getLabel())); -// } -// else { -// Mage::throwException($error); -// } -// } -// } } catch (Mage_Eav_Model_Entity_Attribute_Exception $e) { $response->setError(true); @@ -1092,18 +1079,6 @@ public function quickCreateAction() } try { - /** - * @todo implement full validation process with errors returning which are ignoring now - */ -// if (is_array($errors = $product->validate())) { -// $strErrors = array(); -// foreach($errors as $code=>$error) { -// $codeLabel = $product->getResource()->getAttribute($code)->getFrontend()->getLabel(); -// $strErrors[] = ($error === true)? Mage::helper('catalog')->__('Value for "%s" is invalid.', $codeLabel) : Mage::helper('catalog')->__('Value for "%s" is invalid: %s', $codeLabel, $error); -// } -// Mage::throwException('data_invalid', implode("\n", $strErrors)); -// } - $product->validate(); $product->save(); $result['product_id'] = $product->getId(); diff --git a/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php b/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php index dc8b4d1787c..a60740138a2 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php @@ -156,8 +156,6 @@ public function saveAction() Mage::getModel('admin/user')->sendAdminNotification($model); } if ( $uRoles = $this->getRequest()->getParam('roles', false) ) { - /*parse_str($uRoles, $uRoles); - $uRoles = array_keys($uRoles);*/ if (count($uRoles) === 1) { $model->setRoleIds($uRoles) ->setRoleUserId($model->getUserId()) diff --git a/app/code/core/Mage/Adminhtml/controllers/System/Convert/GuiController.php b/app/code/core/Mage/Adminhtml/controllers/System/Convert/GuiController.php index 0acc6c7ea66..302a0e32ad7 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/Convert/GuiController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/Convert/GuiController.php @@ -134,21 +134,6 @@ public function downloadAction() protected function _isAllowed() { -// switch ($this->getRequest()->getActionName()) { -// case 'index': -// $aclResource = 'admin/system/convert/gui'; -// break; -// case 'grid': -// $aclResource = 'admin/system/convert/gui'; -// break; -// case 'run': -// $aclResource = 'admin/system/convert/gui/run'; -// break; -// default: -// $aclResource = 'admin/system/convert/gui/edit'; -// break; -// } - return Mage::getSingleton('admin/session')->isAllowed('admin/system/convert/gui'); } } diff --git a/app/code/core/Mage/Api/Model/Resource/Acl.php b/app/code/core/Mage/Api/Model/Resource/Acl.php index 13fe43a074f..09c4bab8d11 100644 --- a/app/code/core/Mage/Api/Model/Resource/Acl.php +++ b/app/code/core/Mage/Api/Model/Resource/Acl.php @@ -132,26 +132,8 @@ public function loadRules(Mage_Api_Model_Acl $acl, array $rulesArr) $acl->deny($role, $resource, $privileges, $assert); } } catch (Exception $e) { - //$m = $e->getMessage(); - //if ( eregi("^Resource '(.*)' not found", $m) ) { - // Deleting non existent resource rule from rules table - //$cond = $this->_write->quoteInto('resource_id = ?', $resource); - //$this->_write->delete(Mage::getSingleton('core/resource')->getTableName('admin/rule'), $cond); - //} else { - //TODO: We need to log such exceptions to somewhere like a system/errors.log - //} + Mage::logException($e); } - /* - switch ($rule['api_permission']) { - case Mage_Api_Model_Acl::RULE_PERM_ALLOW: - $acl->allow($role, $resource, $privileges, $assert); - break; - - case Mage_Api_Model_Acl::RULE_PERM_DENY: - $acl->deny($role, $resource, $privileges, $assert); - break; - } - */ } return $this; } diff --git a/app/code/core/Mage/Api/Model/Session.php b/app/code/core/Mage/Api/Model/Session.php index da626458091..0ec929ee1e9 100644 --- a/app/code/core/Mage/Api/Model/Session.php +++ b/app/code/core/Mage/Api/Model/Session.php @@ -47,7 +47,6 @@ class Mage_Api_Model_Session extends Mage_Core_Model_Session_Abstract */ public function start($sessionName = null) { -// parent::start($sessionName=null); $this->_currentSessId = md5(time() . uniqid('', true) . $sessionName); $this->sessionIds[] = $this->getSessionId(); return $this; @@ -178,6 +177,7 @@ public function isAllowed($resource, $privilege = null) return true; } } catch (Exception $e) { + Mage::logException($e); } try { diff --git a/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php b/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php index b6ceb4e50d3..e97eb722279 100644 --- a/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php +++ b/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php @@ -85,7 +85,6 @@ public function extendChild($source, $overwrite = false, $elmNamespace = '') return $this; } if ($overwrite) { -// unset($this->$sourceName); unset($elm); } else { return $this; @@ -241,16 +240,6 @@ public function getElementByName($source, $elmNamespace = '') if ($child->getName() == $sourceName) { $elm = true; foreach ($extendElmAttributes as $namespace => $attributes) { - /** - * if count of attributes of extend element is 0 in $namespace, - * and current element has attributes in $namespace - different elements - */ -// if (!count($attributes) && count($this->getAttributes($child, $namespace))) { -// foreach ($this->getAttributes($child, $namespace) as $attribute) { -// $elm = false; -// break; -// } -// } foreach ($attributes as $key => $value) { if (is_null($child->getAttribute($key, $namespace)) || $child->getAttribute($key, $namespace) != $value) { $elm = false; diff --git a/app/code/core/Mage/Authorizenet/Model/Directpost.php b/app/code/core/Mage/Authorizenet/Model/Directpost.php index 349a3e72a96..9f89d9cfd0e 100644 --- a/app/code/core/Mage/Authorizenet/Model/Directpost.php +++ b/app/code/core/Mage/Authorizenet/Model/Directpost.php @@ -581,7 +581,9 @@ protected function _authOrder(Mage_Sales_Model_Order $order) ->load($order->getQuoteId()) ->setIsActive(false) ->save(); - } catch (Exception $e) {} // do not cancel order if we couldn't send email + } catch (Exception $e) { + Mage::logException($e); // do not cancel order if we couldn't send email + } } /** diff --git a/app/code/core/Mage/Catalog/Block/Product/List/Crosssell.php b/app/code/core/Mage/Catalog/Block/Product/List/Crosssell.php index 2aef554f3e2..aa840b41cea 100644 --- a/app/code/core/Mage/Catalog/Block/Product/List/Crosssell.php +++ b/app/code/core/Mage/Catalog/Block/Product/List/Crosssell.php @@ -64,7 +64,6 @@ protected function _prepareData() ->setPositionOrder() ->addStoreFilter(); -// Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_itemCollection); Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($this->_itemCollection); $this->_itemCollection->load(); diff --git a/app/code/core/Mage/Catalog/Block/Product/List/Related.php b/app/code/core/Mage/Catalog/Block/Product/List/Related.php index 0753618d01f..23d83d4d0f2 100644 --- a/app/code/core/Mage/Catalog/Block/Product/List/Related.php +++ b/app/code/core/Mage/Catalog/Block/Product/List/Related.php @@ -64,7 +64,6 @@ protected function _prepareData() ); $this->_addProductAttributesAndPrices($this->_itemCollection); } -// Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_itemCollection); Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($this->_itemCollection); $this->_itemCollection->load(); diff --git a/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php b/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php index e88b910333f..caf6a6cd431 100644 --- a/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php +++ b/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php @@ -68,7 +68,6 @@ protected function _prepareData() $this->_addProductAttributesAndPrices($this->_itemCollection); } -// Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_itemCollection); Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($this->_itemCollection); if ($this->getItemLimit('upsell') > 0) { diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Attributes.php b/app/code/core/Mage/Catalog/Block/Product/View/Attributes.php index ba0941f459b..ddc208b678e 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Attributes.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Attributes.php @@ -60,7 +60,6 @@ public function getAdditionalData(array $excludeAttr = array()) $product = $this->getProduct(); $attributes = $product->getAttributes(); foreach ($attributes as $attribute) { -// if ($attribute->getIsVisibleOnFront() && $attribute->getIsUserDefined() && !in_array($attribute->getAttributeCode(), $excludeAttr)) { if ($attribute->getIsVisibleOnFront() && !in_array($attribute->getAttributeCode(), $excludeAttr)) { $value = $attribute->getFrontend()->getValue($product); diff --git a/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php b/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php index 50de595c1e9..58dab99bdaa 100644 --- a/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php +++ b/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php @@ -63,11 +63,6 @@ public function getCurrentPage($displacement = 0) public function getLimit() { $limits = $this->getAvailableLimit(); -// if ($limit = $this->getRequest()->getParam($this->getLimitVarName())) { -// if (isset($limits[$limit])) { -// return $limit; -// } -// } $limits = array_keys($limits); return $limits[0]; } @@ -79,12 +74,6 @@ public function getLimit() public function setCollection($collection) { $this->_collection = $collection; -// ->setCurPage($this->getCurrentPage()); - // If not int - then not limit -// if ((int) $this->getLimit()) { -// $this->_collection->setPageSize($this->getLimit()); -// } - return $this; } diff --git a/app/code/core/Mage/Catalog/Model/Category.php b/app/code/core/Mage/Catalog/Model/Category.php index 3fdf7a1f987..c3cc5a1bbcd 100644 --- a/app/code/core/Mage/Catalog/Model/Category.php +++ b/app/code/core/Mage/Catalog/Model/Category.php @@ -669,23 +669,6 @@ public function getAllChildren($asArray = false) } else { return implode(',', $children); } - -// $this->getTreeModelInstance()->load(); -// $children = $this->getTreeModelInstance()->getChildren($this->getId()); -// -// $myId = array($this->getId()); -// if (is_array($children)) { -// $children = array_merge($myId, $children); -// } -// else { -// $children = $myId; -// } -// if ($asArray) { -// return $children; -// } -// else { -// return implode(',', $children); -// } } /** diff --git a/app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php b/app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php index d0f371ba488..6c8a710214a 100644 --- a/app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php +++ b/app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php @@ -349,10 +349,6 @@ public function parse() $inventoryFields[$row['sku']][$field] = $value; } continue; -// $this->addException( -// Mage::helper('catalog')->__('Unknown attribute: %s.', $field), -// Mage_Dataflow_Model_Convert_Exception::ERROR -// ); } if ($attribute->usesSource()) { $source = $attribute->getSource(); diff --git a/app/code/core/Mage/Catalog/Model/Layer.php b/app/code/core/Mage/Catalog/Model/Layer.php index 87e94029b02..182a0b8b738 100644 --- a/app/code/core/Mage/Catalog/Model/Layer.php +++ b/app/code/core/Mage/Catalog/Model/Layer.php @@ -214,9 +214,6 @@ public function getCurrentStore() */ public function getFilterableAttributes() { -// $entity = Mage::getSingleton('eav/config') -// ->getEntityType('catalog_product'); - $setIds = $this->_getSetIds(); if (!$setIds) { return array(); diff --git a/app/code/core/Mage/Catalog/Model/Product.php b/app/code/core/Mage/Catalog/Model/Product.php index 12dca553d72..a5772d811a6 100644 --- a/app/code/core/Mage/Catalog/Model/Product.php +++ b/app/code/core/Mage/Catalog/Model/Product.php @@ -415,11 +415,6 @@ public function getUrlModel() */ public function validate() { -// $this->getAttributes(); -// Mage::dispatchEvent($this->_eventPrefix.'_validate_before', array($this->_eventObject=>$this)); -// $result = $this->_getResource()->validate($this); -// Mage::dispatchEvent($this->_eventPrefix.'_validate_after', array($this->_eventObject=>$this)); -// return $result; Mage::dispatchEvent($this->_eventPrefix.'_validate_before', array($this->_eventObject=>$this)); $this->_getResource()->validate($this); Mage::dispatchEvent($this->_eventPrefix.'_validate_after', array($this->_eventObject=>$this)); diff --git a/app/code/core/Mage/Catalog/Model/Product/Image.php b/app/code/core/Mage/Catalog/Model/Product/Image.php index d45721747b3..969fca0cd5c 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Image.php +++ b/app/code/core/Mage/Catalog/Model/Product/Image.php @@ -243,10 +243,6 @@ public function setSize($size) */ protected function _checkMemory($file = null) { -// print '$this->_getMemoryLimit() = '.$this->_getMemoryLimit(); -// print '$this->_getMemoryUsage() = '.$this->_getMemoryUsage(); -// print '$this->_getNeedMemoryForBaseFile() = '.$this->_getNeedMemoryForBaseFile(); - return $this->_getMemoryLimit() > ($this->_getMemoryUsage() + $this->_getNeedMemoryForFile($file)) || $this->_getMemoryLimit() == -1; } @@ -459,10 +455,6 @@ public function setImageProcessor($processor) public function getImageProcessor() { if (!$this->_processor) { -// var_dump($this->_checkMemory()); -// if (!$this->_checkMemory()) { -// $this->_baseFile = null; -// } $this->_processor = new Varien_Image($this->getBaseFile()); } $this->_processor->keepAspectRatio($this->_keepAspectRatio); diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php index 80c74e00a22..48cb59c7c0b 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php @@ -1144,7 +1144,6 @@ public function moveold($categoryId, $prevParentId, $parentId) $prevParent = null; $parent = null; $_tmpCategory = null; -// $this->_move($categoryId, $prevParentPath, $parentPath); return $this; } diff --git a/app/code/core/Mage/Catalog/data/catalog_setup/data-install-1.6.0.0.php b/app/code/core/Mage/Catalog/data/catalog_setup/data-install-1.6.0.0.php index b5e9ffc88eb..e9d5d7a9eba 100644 --- a/app/code/core/Mage/Catalog/data/catalog_setup/data-install-1.6.0.0.php +++ b/app/code/core/Mage/Catalog/data/catalog_setup/data-install-1.6.0.0.php @@ -88,10 +88,6 @@ 'group' => 'design', 'sort' => 10 ), -// 'custom_design_apply' => array( -// 'group' => 'design', -// 'sort' => 20 -// ), 'custom_design_from' => array( 'group' => 'design', 'sort' => 30 diff --git a/app/code/core/Mage/CatalogIndex/Model/Indexer.php b/app/code/core/Mage/CatalogIndex/Model/Indexer.php index d7d1ab75312..a1f12fd69b7 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Indexer.php +++ b/app/code/core/Mage/CatalogIndex/Model/Indexer.php @@ -220,12 +220,6 @@ public function plainReindex($products = null, $attributes = null, $stores = nul */ $websites = array(); $attributeCodes = $priceAttributeCodes = array(); -// $status = Mage_Catalog_Model_Product_Status::STATUS_ENABLED; -// $visibility = array( -// Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH, -// Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, -// Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_SEARCH, -// ); /** * Prepare stores and websites information diff --git a/app/code/core/Mage/CatalogIndex/Model/Resource/Attribute.php b/app/code/core/Mage/CatalogIndex/Model/Resource/Attribute.php index cc1ae1a2c93..98f1dc4bb1f 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Resource/Attribute.php +++ b/app/code/core/Mage/CatalogIndex/Model/Resource/Attribute.php @@ -90,7 +90,6 @@ public function getCount($attribute, $entitySelect) ->group('index.value'); $select = $select->__toString(); -// $alias = $this->_getReadAdapter()->quoteTableAs($this->getMainTable(), 'index'); $result = $this->_getReadAdapter()->fetchAll($select); $counts = array(); @@ -113,11 +112,6 @@ public function applyFilterToCollection($collection, $attribute, $value) /** * Will be used after SQL review */ -// if ($collection->isEnabledFlat()) { -// $collection->getSelect()->where("e.{$attribute->getAttributeCode()}=?", $value); -// return $this; -// } - $alias = 'attr_index_'.$attribute->getId(); $collection->getSelect()->join( array($alias => $this->getMainTable()), diff --git a/app/code/core/Mage/CatalogSearch/Block/Result.php b/app/code/core/Mage/CatalogSearch/Block/Result.php index 4a6017dca6f..20c08d94af8 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Result.php +++ b/app/code/core/Mage/CatalogSearch/Block/Result.php @@ -146,8 +146,6 @@ public function setListModes() */ public function setListCollection() { -// $this->getListBlock() -// ->setCollection($this->_getProductCollection()); return $this; } diff --git a/app/code/core/Mage/CatalogSearch/Model/Advanced.php b/app/code/core/Mage/CatalogSearch/Model/Advanced.php index c89dc09eea0..73e59b2ae72 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Advanced.php +++ b/app/code/core/Mage/CatalogSearch/Model/Advanced.php @@ -251,7 +251,6 @@ protected function _addSearchCriteria($attribute, $value) } if (strlen($value['from']) > 0 && strlen($value['to']) > 0) { - // - $value = sprintf( '%s - %s', ($currencyModel ? $from : $value['from']), diff --git a/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Grouped.php b/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Grouped.php index 0b08021b7b5..974e3c2224c 100644 --- a/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Grouped.php +++ b/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Grouped.php @@ -80,10 +80,8 @@ protected function _toHtml() /** @var Mage_Checkout_Block_Cart_Item_Renderer $renderer */ $renderer = $this->getRenderedBlock()->getItemRenderer($this->getItem()->getRealProductType()); $renderer->setItem($this->getItem()); -// $renderer->overrideProductUrl($this->getProductUrl()); $renderer->overrideProductThumbnail($this->getProductThumbnail()); $rendererHtml = $renderer->toHtml(); -// $renderer->overrideProductUrl(null); $renderer->overrideProductThumbnail(null); return $rendererHtml; } diff --git a/app/code/core/Mage/Checkout/Model/Cart/Customer/Api.php b/app/code/core/Mage/Checkout/Model/Cart/Customer/Api.php index a1bd870d0bb..e0257105923 100644 --- a/app/code/core/Mage/Checkout/Model/Cart/Customer/Api.php +++ b/app/code/core/Mage/Checkout/Model/Cart/Customer/Api.php @@ -114,16 +114,8 @@ public function setAddresses($quoteId, $customerAddressData, $store = null) } foreach ($customerAddressData as $addressItem) { -// switch($addressItem['mode']) { -// case self::ADDRESS_BILLING: - /** @var Mage_Sales_Model_Quote_Address $address */ - $address = Mage::getModel("sales/quote_address"); -// break; -// case self::ADDRESS_SHIPPING: -// /** @var $address Mage_Sales_Model_Quote_Address */ -// $address = Mage::getModel("sales/quote_address"); -// break; -// } + /** @var Mage_Sales_Model_Quote_Address $address */ + $address = Mage::getModel("sales/quote_address"); $addressMode = $addressItem['mode']; unset($addressItem['mode']); diff --git a/app/code/core/Mage/Core/Helper/Url.php b/app/code/core/Mage/Core/Helper/Url.php index e74e9c2cc1d..25cd1d70d6f 100644 --- a/app/code/core/Mage/Core/Helper/Url.php +++ b/app/code/core/Mage/Core/Helper/Url.php @@ -52,7 +52,6 @@ public function getCurrentUrl() } $url = $request->getScheme() . '://' . $request->getHttpHost() . $port . $request->getServer('REQUEST_URI'); return $this->escapeUrl($url); -// return $this->_getUrl('*/*/*', array('_current' => true, '_use_rewrite' => true)); } /** @@ -122,7 +121,6 @@ public function addRequestParam($url, $param) } if (is_array($value)) { - // $key[]=$value1&$key[]=$value2 ... $arrQueryParams[] = $key . '[]=' . implode('&' . $key . '[]=', $value); } elseif (is_null($value)) { $arrQueryParams[] = $key; diff --git a/app/code/core/Mage/Core/Model/Config.php b/app/code/core/Mage/Core/Model/Config.php index 914396f1120..d1b81e2bc90 100644 --- a/app/code/core/Mage/Core/Model/Config.php +++ b/app/code/core/Mage/Core/Model/Config.php @@ -404,7 +404,6 @@ protected function _canUseLocalModules() if (true === $disableLocalModules) { set_include_path( - // excluded '/app/code/local' BP . DS . 'app' . DS . 'code' . DS . 'community' . PS . BP . DS . 'app' . DS . 'code' . DS . 'core' . PS . BP . DS . 'lib' . PS . diff --git a/app/code/core/Mage/Core/Model/Design/Package.php b/app/code/core/Mage/Core/Model/Design/Package.php index 8bc0e2a56e0..20dd83fe24a 100644 --- a/app/code/core/Mage/Core/Model/Design/Package.php +++ b/app/code/core/Mage/Core/Model/Design/Package.php @@ -280,8 +280,6 @@ public function getTheme($type) if (empty($this->_theme[$type])) { $this->_theme[$type] = self::DEFAULT_THEME; } - - // "locale", "layout", "template" } } diff --git a/app/code/core/Mage/Core/Model/File/Validator/AvailablePath.php b/app/code/core/Mage/Core/Model/File/Validator/AvailablePath.php index 01e50c128c9..5bf4cf08a61 100644 --- a/app/code/core/Mage/Core/Model/File/Validator/AvailablePath.php +++ b/app/code/core/Mage/Core/Model/File/Validator/AvailablePath.php @@ -305,7 +305,6 @@ protected function _isValidByPaths($valuePathInfo, $paths, $protected) $reg = str_replace('.', '\.', $reg); $reg = str_replace('*\\', '||', $reg); $reg = str_replace('*/', '||', $reg); - //$reg = str_replace('*', '||', $reg); $reg = str_replace(DS, '[\\' . DS . ']', $reg); $reg = str_replace('?', '([^\\' . DS . ']+)', $reg); $reg = str_replace('||', '(.*[\\' . DS . '])?', $reg); diff --git a/app/code/core/Mage/Core/Model/Layout/Update.php b/app/code/core/Mage/Core/Model/Layout/Update.php index 78b596456c7..f2b8f92ea48 100644 --- a/app/code/core/Mage/Core/Model/Layout/Update.php +++ b/app/code/core/Mage/Core/Model/Layout/Update.php @@ -308,10 +308,6 @@ public function merge($handle) if (Mage::app()->isInstalled()) { $this->fetchDbLayoutUpdates($handle); } -// if (!$this->fetchPackageLayoutUpdates($handle) -// && !$this->fetchDbLayoutUpdates($handle)) { -// #$this->removeHandle($handle); -// } return $this; } @@ -343,64 +339,6 @@ public function fetchFileLayoutUpdates() } } - - -// $elementClass = $this->getElementClass(); -// -// $design = Mage::getSingleton('core/design_package'); -// $area = $design->getArea(); -// $storeId = Mage::app()->getStore()->getId(); -// $cacheKey = 'LAYOUT_'.$area.'_STORE'.$storeId.'_'.$design->getPackageName().'_'.$design->getTheme('layout'); -//#echo "TEST:".$cacheKey; -// $cacheTags = array('layout'); -// -// if (Mage::app()->useCache('layout') && ($layoutStr = Mage::app()->loadCache($cacheKey))) { -// $this->_packageLayout = simplexml_load_string($layoutStr, $elementClass); -// } -// -// if (empty($layoutStr)) { -// $updatesRoot = Mage::app()->getConfig()->getNode($area.'/layout/updates'); -// Mage::dispatchEvent('core_layout_update_updates_get_after', array('updates' => $updatesRoot)); -// $updateFiles = array(); -// foreach ($updatesRoot->children() as $updateNode) { -// if ($updateNode->file) { -// $module = $updateNode->getAttribute('module'); -// if ($module && Mage::getStoreConfigFlag('advanced/modules_disable_output/' . $module)) { -// continue; -// } -// $updateFiles[] = (string)$updateNode->file; -// } -// } -// -// // custom local layout updates file - load always last -// $updateFiles[] = 'local.xml'; -// -// $layoutStr = ''; -// #$layoutXml = new $elementClass(''); -// foreach ($updateFiles as $file) { -// $filename = $design->getLayoutFilename($file); -// if (!is_readable($filename)) { -// continue; -// } -// $fileStr = file_get_contents($filename); -// $fileStr = str_replace($this->_subst['from'], $this->_subst['to'], $fileStr); -// $fileXml = simplexml_load_string($fileStr, $elementClass); -// if (!$fileXml instanceof SimpleXMLElement) { -// continue; -// } -// $layoutStr .= $fileXml->innerXml(); -// -// #$layoutXml->appendChild($fileXml); -// } -// $layoutXml = simplexml_load_string(''.$layoutStr.'', $elementClass); -// -// $this->_packageLayout = $layoutXml; -// -// if (Mage::app()->useCache('layout')) { -// Mage::app()->saveCache($this->_packageLayout->asXml(), $cacheKey, $cacheTags, null); -// } -// } - return $this; } @@ -418,7 +356,6 @@ public function fetchPackageLayoutUpdates($handle) } /** @var Varien_Simplexml_Element $updateXml */ foreach ($this->_packageLayout->$handle as $updateXml) { -#echo ''; $this->fetchRecursiveUpdates($updateXml); $this->addUpdate($updateXml->innerXml()); } diff --git a/app/code/core/Mage/Core/Model/Resource/Helper/Mysql4.php b/app/code/core/Mage/Core/Model/Resource/Helper/Mysql4.php index 92d25929432..87d526e2ff4 100644 --- a/app/code/core/Mage/Core/Model/Resource/Helper/Mysql4.php +++ b/app/code/core/Mage/Core/Model/Resource/Helper/Mysql4.php @@ -234,15 +234,8 @@ protected function _prepareHaving(Varien_Db_Select $select, $autoReset = false) protected function _assembleLimit($query, $limitCount, $limitOffset, $columnList = array()) { if ($limitCount !== null) { - $limitCount = intval($limitCount); - if ($limitCount <= 0) { -// throw new Exception("LIMIT argument count={$limitCount} is not valid"); - } - + $limitCount = intval($limitCount); $limitOffset = intval($limitOffset); - if ($limitOffset < 0) { -// throw new Exception("LIMIT argument offset={$limitOffset} is not valid"); - } if ($limitOffset + $limitCount != $limitOffset + 1) { $columns = array(); @@ -302,9 +295,6 @@ public function prepareColumnsList(Varien_Db_Select $select, $groupByCondition = } } -// $select->reset(Zend_Db_Select::COLUMNS); -// $select->setPart(Zend_Db_Select::COLUMNS, array_values($preparedColumns)); - return $preparedColumns; } diff --git a/app/code/core/Mage/Customer/Block/Widget/Dob.php b/app/code/core/Mage/Customer/Block/Widget/Dob.php index 5a20bdc3a34..b394125fd9d 100644 --- a/app/code/core/Mage/Customer/Block/Widget/Dob.php +++ b/app/code/core/Mage/Customer/Block/Widget/Dob.php @@ -72,6 +72,7 @@ public function setDate($date) $dateTime = new DateTime($date); $this->setTime($dateTime); } catch (Exception $e) { + Mage::logException($e); } } diff --git a/app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php b/app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php index 5037ac02c59..ff30c0a64aa 100644 --- a/app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php +++ b/app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php @@ -408,13 +408,8 @@ public function save() if (!$model->getId()) { $new = true; $model->save(); - #Mage::getResourceSingleton('catalog_entity/convert')->addProductToStore($model->getId(), 0); } if (!$new || 0!==$storeId) { -// if (0!==$storeId) { -// Mage::getResourceSingleton('catalog_entity/convert')->addProductToStore($model->getId(), $storeId); -// } - $model->save(); } $i++; diff --git a/app/code/core/Mage/Customer/Model/Convert/Parser/Customer.php b/app/code/core/Mage/Customer/Model/Convert/Parser/Customer.php index 8ec5d7df160..9f19140c965 100644 --- a/app/code/core/Mage/Customer/Model/Convert/Parser/Customer.php +++ b/app/code/core/Mage/Customer/Model/Convert/Parser/Customer.php @@ -474,13 +474,6 @@ public function parse() } $this->setPosition('Line: '.($i+1).', email: '.$row['email']); - // try to get entity_id by sku if not set - /* - if (empty($row['entity_id'])) { - $row['entity_id'] = $this->getResource()->getProductIdBySku($row['email']); - } - */ - // if attribute_set not set use default if (empty($row['attribute_set'])) { $row['attribute_set'] = 'Default'; @@ -501,22 +494,11 @@ public function parse() $this->addException(Mage::helper('customer')->__('Missing firstname, skipping the record.'), Varien_Convert_Exception::ERROR); continue; } - //$this->setPosition('Line: '.($i+1).', Firstname: '.$row['firstname']); if (empty($row['lastname'])) { $this->addException(Mage::helper('customer')->__('Missing lastname, skipping the record.'), Varien_Convert_Exception::ERROR); continue; } - //$this->setPosition('Line: '.($i+1).', Lastname: '.$row['lastname']); - - /* - // get product type_id, if not throw error - $row['type_id'] = $this->getProductTypeId($row['type']); - if (!$row['type_id']) { - $this->addException(Mage::helper('catalog')->__("Invalid product type specified, skipping the record."), Varien_Convert_Exception::ERROR); - continue; - } - */ // get store ids $storeIds = $this->getStoreIds(isset($row['store']) ? $row['store'] : $this->getVar('store')); diff --git a/app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php b/app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php index 13c77d22e99..7a76c0612e4 100644 --- a/app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php +++ b/app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php @@ -129,37 +129,6 @@ public function parse() //$adapter->$adapterMethod(); return $this; - -// // fix for field mapping -// if ($mapfields = $this->getProfile()->getDataflowProfile()) { -// $this->_mapfields = array_values($mapfields['gui_data']['map'][$mapfields['entity_type']]['db']); -// } // end -// -// if (!$this->getVar('fieldnames') && !$this->_mapfields) { -// $this->addException('Please define field mapping', Mage_Dataflow_Model_Convert_Exception::FATAL); -// return; -// } -// -// if ($this->getVar('adapter') && $this->getVar('method')) { -// $adapter = Mage::getModel($this->getVar('adapter')); -// } -// -// $i = 0; -// while (($line = fgetcsv($fh, null, $fDel, $fEnc)) !== FALSE) { -// $row = $this->parseRow($i, $line); -// -// if (!$this->getVar('fieldnames') && $i == 0 && $row) { -// $i = 1; -// } -// -// if ($row) { -// $loadMethod = $this->getVar('method'); -// $adapter->$loadMethod(compact('i', 'row')); -// } -// $i++; -// } -// -// return $this; } public function parseRow($i, $line) diff --git a/app/code/core/Mage/Dataflow/Model/Convert/Parser/Xml/Excel.php b/app/code/core/Mage/Dataflow/Model/Convert/Parser/Xml/Excel.php index 1dc657bf408..2552e88cb22 100644 --- a/app/code/core/Mage/Dataflow/Model/Convert/Parser/Xml/Excel.php +++ b/app/code/core/Mage/Dataflow/Model/Convert/Parser/Xml/Excel.php @@ -163,12 +163,9 @@ public function parse() ->setAdapter($adapterName) ->save(); -// $adapter->$adapterMethod(); - return $this; $dom = new DOMDocument(); -// $dom->loadXML($this->getData()); if (Mage::app()->getRequest()->getParam('files')) { $path = Mage::app()->getConfig()->getTempVarDir().'/import/'; $file = $path.urldecode(Mage::app()->getRequest()->getParam('files')); @@ -396,64 +393,6 @@ public function unparse() $io->close(); return $this; - -// if ($wsName = $this->getVar('single_sheet')) { -// $data = array($wsName => $this->getData()); -// } else { -// $data = $this->getData(); -// } -// -// $this->validateDataGrid(); -// -// $xml = '<'.'?xml version="1.0"?'.'><'.'?mso-application progid="Excel.Sheet"?'.'>' -// .'' -// .'' -// .'' -// .''; -// -// if (is_array($data)) { -// foreach ($data as $wsName=>$wsData) { -// if (!is_array($wsData)) { -// continue; -// } -// $fields = $this->getGridFields($wsData); -// -// $xml .= ''; -// if ($this->getVar('fieldnames')) { -// $xml .= ''; -// foreach ($fields as $fieldName) { -// $xml .= ''.$fieldName.''; -// } -// $xml .= ''; -// } -// foreach ($wsData as $i=>$row) { -// if (!is_array($row)) { -// continue; -// } -// $xml .= ''; -// foreach ($fields as $fieldName) { -// $data = isset($row[$fieldName]) ? $row[$fieldName] : ''; -// $xml .= ''.$data.''; -// } -// $xml .= ''; -// } -// $xml .= '
'; -// } -// } -// -// $xml .= ''; -// -// $this->setData($xml); -// -// return $this; } /** diff --git a/app/code/core/Mage/Dataflow/Model/Convert/Profile/Abstract.php b/app/code/core/Mage/Dataflow/Model/Convert/Profile/Abstract.php index adc32991c22..21bff22ff7e 100644 --- a/app/code/core/Mage/Dataflow/Model/Convert/Profile/Abstract.php +++ b/app/code/core/Mage/Dataflow/Model/Convert/Profile/Abstract.php @@ -122,10 +122,6 @@ public function importXml(Varien_Simplexml_Element $profileNode) public function run() { -// print '
';
-//        print_r($this->_dataflow_profile);
-//        print '
'; - if (!$this->_actions) { $e = new Mage_Dataflow_Model_Convert_Exception("Could not find any actions for this profile"); $e->setLevel(Mage_Dataflow_Model_Convert_Exception::FATAL); diff --git a/app/code/core/Mage/Dataflow/Model/Profile.php b/app/code/core/Mage/Dataflow/Model/Profile.php index 5976c8400e1..4b95895f0de 100644 --- a/app/code/core/Mage/Dataflow/Model/Profile.php +++ b/app/code/core/Mage/Dataflow/Model/Profile.php @@ -295,10 +295,6 @@ public function run() echo $e; } -// if ($batch) { -// $batch->delete(); -// } - $this->setExceptions($profile->getExceptions()); return $this; } @@ -310,13 +306,8 @@ public function _parseGuiData() $p = $this->getGuiData(); if ($this->getDataTransfer()==='interactive') { -// $p['file']['type'] = 'file'; -// $p['file']['filename'] = $p['interactive']['filename']; -// $p['file']['path'] = 'var/export'; - $interactiveXml = '' . $nl; - #$interactiveXml .= ' '.$nl; $interactiveXml .= ''; $fileXml = ''; @@ -419,16 +410,7 @@ public function _parseGuiData() ); if ($import) { -// if ($this->getDataTransfer()==='interactive') { - $parseFileXmlInter .= ' getStoreId() . ']]>' . $nl; -// } else { -// $parseDataXml = '' . $nl; -// $parseDataXml = ' getStoreId() . ']]>' . $nl; -// $parseDataXml .= ''.$nl.$nl; -// } -// $parseDataXml = ''.$nl; -// $parseDataXml .= ' getStoreId().']]>'.$nl; -// $parseDataXml .= ''.$nl.$nl; + $parseFileXmlInter .= ' getStoreId() . ']]>' . $nl; } else { $parseDataXml = '' . $nl; $parseDataXml .= ' getStoreId() . ']]>' . $nl; diff --git a/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php b/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php index 898a53a8679..03822d5510d 100644 --- a/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php +++ b/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php @@ -50,30 +50,9 @@ class Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable ex public function __construct() { parent::__construct(); -// $this->setSkipGenerateContent(true); $this->setTemplate('downloadable/product/edit/downloadable.phtml'); } - /** - * Get tab URL - * - * @return string - */ -// public function getTabUrl() -// { -// return $this->getUrl('downloadable/product_edit/form', array('_current' => true)); -// } - - /** - * Get tab class - * - * @return string - */ -// public function getTabClass() -// { -// return 'ajax'; -// } - /** * Check is readonly block * diff --git a/app/code/core/Mage/Eav/Model/Convert/Adapter/Entity.php b/app/code/core/Mage/Eav/Model/Convert/Adapter/Entity.php index ccf8090c3c5..167e83e89b4 100644 --- a/app/code/core/Mage/Eav/Model/Convert/Adapter/Entity.php +++ b/app/code/core/Mage/Eav/Model/Convert/Adapter/Entity.php @@ -277,7 +277,6 @@ public function load() if (isset($this->_joinAttr) && is_array($this->_joinAttr)) { foreach ($this->_joinAttr as $val) { -// print_r($val); $collection->joinAttribute( $val['alias'], $val['attribute'], @@ -299,7 +298,6 @@ public function load() $joinFields = $this->_joinField; if (isset($joinFields) && is_array($joinFields)) { foreach ($joinFields as $field) { -// print_r($field); $collection->joinField( $field['alias'], $field['attribute'], diff --git a/app/code/core/Mage/Eav/Model/Entity/Abstract.php b/app/code/core/Mage/Eav/Model/Entity/Abstract.php index ef13577c988..2453f3d6b40 100644 --- a/app/code/core/Mage/Eav/Model/Entity/Abstract.php +++ b/app/code/core/Mage/Eav/Model/Entity/Abstract.php @@ -769,10 +769,6 @@ public function getValueTablePrefix() $prefix = (string)$this->getEntityType()->getValueTablePrefix(); if (!empty($prefix)) { $this->_valueTablePrefix = $prefix; - /** - * entity type prefix include DB table name prefix - */ - //Mage::getSingleton('core/resource')->getTableName($prefix); } else { $this->_valueTablePrefix = $this->getEntityTable(); } diff --git a/app/code/core/Mage/Payment/Model/Method/Cc.php b/app/code/core/Mage/Payment/Model/Method/Cc.php index f02c7a4769e..2228b50282b 100644 --- a/app/code/core/Mage/Payment/Model/Method/Cc.php +++ b/app/code/core/Mage/Payment/Model/Method/Cc.php @@ -111,12 +111,6 @@ public function validate() . '|8[2-8]\d{12})|6(4[4-9]\d{13}|5\d{14}))$/'; $ccTypeRegExpList = array( //Solo, Switch or Maestro. International safe - /* - // Maestro / Solo - 'SS' => '/^((6759[0-9]{12})|(6334|6767[0-9]{12})|(6334|6767[0-9]{14,15})' - . '|(5018|5020|5038|6304|6759|6761|6763[0-9]{12,19})|(49[013][1356][0-9]{12})' - . '|(633[34][0-9]{12})|(633110[0-9]{10})|(564182[0-9]{10}))([0-9]{2,3})?$/', - */ // Solo only 'SO' => '/(^(6334)[5-9](\d{11}$|\d{13,14}$))|(^(6767)(\d{12}$|\d{14,15}$))/', // Visa diff --git a/app/code/core/Mage/Paypal/Model/Api/Nvp.php b/app/code/core/Mage/Paypal/Model/Api/Nvp.php index 0a3a6e56aed..b08abcb4aca 100644 --- a/app/code/core/Mage/Paypal/Model/Api/Nvp.php +++ b/app/code/core/Mage/Paypal/Model/Api/Nvp.php @@ -200,7 +200,6 @@ class Mage_Paypal_Model_Api_Nvp extends Mage_Paypal_Model_Api_Abstract 'TAXAMT' => '_filterAmount', 'INITAMT' => '_filterAmount', 'CREDITCARDTYPE' => '_filterCcType', -// 'PROFILESTARTDATE' => '_filterToPaypalDate', 'AUTOBILLAMT' => '_filterBillFailedLater', 'BILLINGPERIOD' => '_filterPeriodUnit', 'TRIALBILLINGPERIOD' => '_filterPeriodUnit', diff --git a/app/code/core/Mage/Paypal/Model/Api/Standard.php b/app/code/core/Mage/Paypal/Model/Api/Standard.php index c93ed67912d..1f2049453b1 100644 --- a/app/code/core/Mage/Paypal/Model/Api/Standard.php +++ b/app/code/core/Mage/Paypal/Model/Api/Standard.php @@ -56,7 +56,6 @@ class Mage_Paypal_Model_Api_Standard extends Mage_Paypal_Model_Api_Abstract 'cpp_headerback_color' => 'hdrbackcolor', 'cpp_headerborder_color' => 'hdrbordercolor', 'cpp_payflow_color' => 'payflowcolor', -// 'cs' => '', // TODO 'lc' => 'locale', ); protected $_exportToRequestFilters = array( diff --git a/app/code/core/Mage/Paypal/Model/Config.php b/app/code/core/Mage/Paypal/Model/Config.php index 77fd60432d8..72221b212f7 100644 --- a/app/code/core/Mage/Paypal/Model/Config.php +++ b/app/code/core/Mage/Paypal/Model/Config.php @@ -1413,10 +1413,7 @@ public function isWppApiAvailabe() public function getWpsPaymentDeliveryMethods() { return array( - self::WPS_TRANSPORT_IPN => Mage::helper('adminhtml')->__('IPN (Instant Payment Notification) Only'), - // not supported yet: -// self::WPS_TRANSPORT_PDT => Mage::helper('adminhtml')->__('PDT (Payment Data Transfer) Only'), -// self::WPS_TRANSPORT_IPN_PDT => Mage::helper('adminhtml')->__('Both IPN and PDT'), + self::WPS_TRANSPORT_IPN => Mage::helper('adminhtml')->__('IPN (Instant Payment Notification) Only'), ); } diff --git a/app/code/core/Mage/Paypal/Model/Ipn.php b/app/code/core/Mage/Paypal/Model/Ipn.php index 0d322a1a34d..430146e84e3 100644 --- a/app/code/core/Mage/Paypal/Model/Ipn.php +++ b/app/code/core/Mage/Paypal/Model/Ipn.php @@ -417,9 +417,6 @@ protected function _processRecurringProfile() throw new Exception("Cannot handle payment status '{$paymentStatus}'."); } } catch (Mage_Core_Exception $e) { -// TODO: add to payment profile comments -// $comment = $this->_createIpnComment(Mage::helper('paypal')->__('Note: %s', $e->getMessage()), true); -// $comment->save(); throw $e; } } diff --git a/app/code/core/Mage/Rating/Model/Rating/Option.php b/app/code/core/Mage/Rating/Model/Rating/Option.php index d0e7c52fc8f..2cdd95aa1fb 100644 --- a/app/code/core/Mage/Rating/Model/Rating/Option.php +++ b/app/code/core/Mage/Rating/Model/Rating/Option.php @@ -78,9 +78,4 @@ public function setId($id) $this->setOptionId($id); return $this; } - -// public function getId() -// { -// return $this->getOptionId(); -// } } diff --git a/app/code/core/Mage/Rating/Model/Resource/Rating/Collection.php b/app/code/core/Mage/Rating/Model/Resource/Rating/Collection.php index f00f73d091a..272936e6a26 100644 --- a/app/code/core/Mage/Rating/Model/Resource/Rating/Collection.php +++ b/app/code/core/Mage/Rating/Model/Resource/Rating/Collection.php @@ -116,9 +116,7 @@ public function setStoreFilter($storeId) array('store'=>$this->getTable('rating_store')), 'main_table.rating_id = store.rating_id', array() - ) - // ->group('main_table.rating_id') - ; + ); $this->_isStoreJoined = true; } $inCond = $adapter->prepareSqlCondition('store.store_id', array( diff --git a/app/code/core/Mage/Rating/Model/Resource/Rating/Option/Vote/Collection.php b/app/code/core/Mage/Rating/Model/Resource/Rating/Option/Vote/Collection.php index 63d4bead2aa..6a0dd0539a2 100644 --- a/app/code/core/Mage/Rating/Model/Resource/Rating/Option/Vote/Collection.php +++ b/app/code/core/Mage/Rating/Model/Resource/Rating/Option/Vote/Collection.php @@ -131,9 +131,7 @@ public function addRatingInfo($storeId = null) ->join( array('store' => $this->getTable('rating_store')), 'main_table.rating_id = store.rating_id AND ' . $condition - ) -// ->group('main_table.vote_id') - ; + ); return $this; } diff --git a/app/code/core/Mage/Rule/Model/Condition/Abstract.php b/app/code/core/Mage/Rule/Model/Condition/Abstract.php index a92cec454b1..5ced0e5daa3 100644 --- a/app/code/core/Mage/Rule/Model/Condition/Abstract.php +++ b/app/code/core/Mage/Rule/Model/Condition/Abstract.php @@ -214,9 +214,6 @@ public function loadArray($arr) $this->setValue(isset($arr['value']) ? $arr['value'] : false); $this->setIsValueParsed(isset($arr['is_value_parsed']) ? $arr['is_value_parsed'] : false); -// $this->loadAttributeOptions(); -// $this->loadOperatorOptions(); -// $this->loadValueOptions(); return $this; } @@ -324,10 +321,6 @@ public function getOperatorName() */ public function loadValueOptions() { -// $this->setValueOption(array( -// true => Mage::helper('rule')->__('TRUE'), -// false => Mage::helper('rule')->__('FALSE'), -// )); $this->setValueOption(array()); return $this; } diff --git a/app/code/core/Mage/Sales/Block/Recurring/Profile/View.php b/app/code/core/Mage/Sales/Block/Recurring/Profile/View.php index 2cc08c78695..98765dc3671 100644 --- a/app/code/core/Mage/Sales/Block/Recurring/Profile/View.php +++ b/app/code/core/Mage/Sales/Block/Recurring/Profile/View.php @@ -98,13 +98,6 @@ public function prepareReferenceInfo() 'value' => $this->_profile->renderData($key), )); } -// $shippingDesctiption = $this->_profile->getInfoValue('order_info', 'shipping_description'); -// if ($shippingDesctiption) { -// $this->_addInfo(array( -// 'label' => $this->__('Shipping Method'), -// 'value' => $shippingDesctiption, -// )); -// } } /** diff --git a/app/code/core/Mage/Sales/Model/Order/Creditmemo.php b/app/code/core/Mage/Sales/Model/Order/Creditmemo.php index f6743a80d14..dc957cd94dc 100644 --- a/app/code/core/Mage/Sales/Model/Order/Creditmemo.php +++ b/app/code/core/Mage/Sales/Model/Order/Creditmemo.php @@ -670,18 +670,10 @@ public function getStateName($stateId = null) */ public function setShippingAmount($amount) { - // base shipping amount calculated in total model -// $amount = $this->getStore()->roundPrice($amount); -// $this->setData('base_shipping_amount', $amount); -// -// $amount = $this->getStore()->roundPrice( -// $amount*$this->getOrder()->getStoreToOrderRate() -// ); $this->setData('shipping_amount', $amount); return $this; } - /** * @param float $amount * @return $this diff --git a/app/code/core/Mage/Sales/Model/Order/Item.php b/app/code/core/Mage/Sales/Model/Order/Item.php index 94f58b74a43..35caa82a1c2 100644 --- a/app/code/core/Mage/Sales/Model/Order/Item.php +++ b/app/code/core/Mage/Sales/Model/Order/Item.php @@ -581,7 +581,6 @@ public static function getStatuses() { if (is_null(self::$_statuses)) { self::$_statuses = array( - //self::STATUS_PENDING => Mage::helper('sales')->__('Pending'), self::STATUS_PENDING => Mage::helper('sales')->__('Ordered'), self::STATUS_SHIPPED => Mage::helper('sales')->__('Shipped'), self::STATUS_INVOICED => Mage::helper('sales')->__('Invoiced'), diff --git a/app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php b/app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php index e0e509be772..3fb01241559 100644 --- a/app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php +++ b/app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php @@ -462,11 +462,9 @@ protected function insertOrder(&$page, $obj, $putOrderId = true) $page->setLineWidth(0.5); $page->drawRectangle(285, $yShipments, 510, $yShipments - 10); $page->drawLine(400, $yShipments, 400, $yShipments - 10); - //$page->drawLine(510, $yShipments, 510, $yShipments - 10); $this->_setFontRegular($page, 9); $page->setFillColor(new Zend_Pdf_Color_GrayScale(0)); - //$page->drawText(Mage::helper('sales')->__('Carrier'), 290, $yShipments - 7 , 'UTF-8'); $page->drawText(Mage::helper('sales')->__('Title'), 290, $yShipments - 7, 'UTF-8'); $page->drawText(Mage::helper('sales')->__('Number'), 410, $yShipments - 7, 'UTF-8'); diff --git a/app/code/core/Mage/Sales/Model/Quote/Item.php b/app/code/core/Mage/Sales/Model/Quote/Item.php index 0dd0c6a7759..e6ae5e7bae6 100644 --- a/app/code/core/Mage/Sales/Model/Quote/Item.php +++ b/app/code/core/Mage/Sales/Model/Quote/Item.php @@ -437,12 +437,6 @@ public function setProduct($product) 'quote_item' => $this )); - -// if ($options = $product->getCustomOptions()) { -// foreach ($options as $option) { -// $this->addOption($option); -// } -// } return $this; } @@ -642,8 +636,9 @@ public function getOptionsByCode() /** * Add option to item * - * @param Mage_Sales_Model_Quote_Item_Option|Varien_Object $option - * @return $this + * @param Mage_Sales_Model_Quote_Item_Option|Varien_Object|array $option + * @return $this + * @throws Mage_Core_Exception */ public function addOption($option) { diff --git a/app/code/core/Mage/Sales/controllers/Recurring/ProfileController.php b/app/code/core/Mage/Sales/controllers/Recurring/ProfileController.php index c224021d49a..218e629e143 100644 --- a/app/code/core/Mage/Sales/controllers/Recurring/ProfileController.php +++ b/app/code/core/Mage/Sales/controllers/Recurring/ProfileController.php @@ -70,15 +70,6 @@ public function viewAction() $this->_viewAction(); } - /** - * Profile history view - */ -// TODO: implement -// public function historyAction() -// { -// $this->_viewAction(); -// } - /** * Profile related orders view */ @@ -87,15 +78,6 @@ public function ordersAction() $this->_viewAction(); } - /** - * Profile payment gateway info view - */ -// TODO: implement -// public function vendorAction() -// { -// $this->_viewAction(); -// } - /** * Attempt to set profile state */ diff --git a/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php b/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php index 54e6349e3d8..840bbb0f934 100644 --- a/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php +++ b/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php @@ -136,10 +136,6 @@ public function validate(Varien_Object $object) return false; } -// $value = $this->getValue(); -// $aggregatorArr = explode('/', $this->getAggregator()); -// $this->setValue((int)$aggregatorArr[0])->setAggregator($aggregatorArr[1]); - $attr = $this->getAttribute(); $total = 0; foreach ($object->getQuote()->getAllVisibleItems() as $item) { @@ -147,7 +143,6 @@ public function validate(Varien_Object $object) $total += $item->getData($attr); } } -// $this->setAggregator(join('/', $aggregatorArr))->setValue($value); return $this->validateAttribute($total); } diff --git a/app/code/core/Mage/Tag/Model/Entity/Customer/Collection.php b/app/code/core/Mage/Tag/Model/Entity/Customer/Collection.php index b28cf7a16c4..95e5d97ee3a 100644 --- a/app/code/core/Mage/Tag/Model/Entity/Customer/Collection.php +++ b/app/code/core/Mage/Tag/Model/Entity/Customer/Collection.php @@ -42,15 +42,6 @@ public function __construct() parent::__construct(); $this->_tagTable = $resource->getTableName('tag/tag'); $this->_tagRelTable = $resource->getTableName('tag/tag_relation'); - -// $this->joinField('tag_total_used', $this->_tagRelTable, 'count(_table_tag_total_used.tag_relations_id)', 'entity_val_id=entity_id', array('entity_id' => '2')); -// $this->getSelect()->group('tag_tag_id'); -// echo $this->getSelect(); -// $this->_productTable = $resource->getTableName('catalog/product'); -// $this->_select->from(array('p' => $this->_productTable)) -// ->join(array('tr' => $this->_tagRelTable), 'tr.entity_val_id=p.product_id and tr.entity_id=1', array('total_used' => 'count(tr.tag_relations_id)')) -// ->group('p.product_id', 'tr.tag_id') -// ; } /** diff --git a/app/code/core/Mage/Tax/Block/Sales/Order/Tax.php b/app/code/core/Mage/Tax/Block/Sales/Order/Tax.php index 7ab8bfd4ad0..ef0b13a2161 100644 --- a/app/code/core/Mage/Tax/Block/Sales/Order/Tax.php +++ b/app/code/core/Mage/Tax/Block/Sales/Order/Tax.php @@ -261,13 +261,6 @@ protected function _initShipping() protected function _initDiscount() { -// $store = $this->getStore(); -// $parent = $this->getParentBlock(); -// if ($this->_config->displaySales) { -// -// } elseif ($this->_config->displaySales) { -// -// } } /** diff --git a/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Discount.php b/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Discount.php index b4d19ae321b..04485788dd8 100644 --- a/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Discount.php +++ b/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Discount.php @@ -37,6 +37,5 @@ class Mage_Tax_Model_Sales_Total_Quote_Discount extends Mage_Sales_Model_Quote_A */ public function collect(Mage_Sales_Model_Quote_Address $address) { -// echo 'discount'; } } diff --git a/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Subtotal.php b/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Subtotal.php index ce871377b60..d3694bbd08e 100644 --- a/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Subtotal.php +++ b/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Subtotal.php @@ -801,7 +801,6 @@ protected function _getAddressTaxRequest($address) * * @param Mage_Sales_Model_Quote_Address $address * @param Mage_Sales_Model_Quote_Item_Abstract $item - * * @return Mage_Tax_Model_Sales_Total_Quote_Subtotal */ protected function _addSubtotalAmount(Mage_Sales_Model_Quote_Address $address, $item) @@ -833,15 +832,10 @@ protected function _addSubtotalAmount(Mage_Sales_Model_Quote_Address $address, $ * @deprecated after 1.4.1 * * @param Mage_Sales_Model_Quote_Item_Abstract $item - * * @return Mage_Tax_Model_Sales_Total_Quote_Subtotal */ protected function _resetItemPriceInclTax(Mage_Sales_Model_Quote_Item_Abstract $item) { -// $item->setPriceInclTax(null); -// $item->setBasePriceInclTax(null); -// $item->setRowTotalInclTax(null); -// $item->setBaseRowTotalInclTax(null); return $this; } @@ -850,7 +844,6 @@ protected function _resetItemPriceInclTax(Mage_Sales_Model_Quote_Item_Abstract $ * @deprecated after 1.4.0.1 * * @param Mage_Sales_Model_Quote_Address $address - * * @return Mage_Tax_Model_Sales_Total_Quote_Subtotal */ protected function _processShippingAmount($address) diff --git a/app/code/core/Mage/Weee/Model/Total/Quote/Weee.php b/app/code/core/Mage/Weee/Model/Total/Quote/Weee.php index 00df4358bf8..a1c3fdde5cb 100644 --- a/app/code/core/Mage/Weee/Model/Total/Quote/Weee.php +++ b/app/code/core/Mage/Weee/Model/Total/Quote/Weee.php @@ -494,10 +494,6 @@ protected function _processItem(Mage_Sales_Model_Quote_Address $address, $item, $item->setBaseWeeeTaxDisposition($item->getBaseWeeeTaxDisposition() + $baseOneDisposition); $item->setWeeeTaxRowDisposition($item->getWeeeTaxRowDisposition() + $disposition); $item->setBaseWeeeTaxRowDisposition($item->getBaseWeeeTaxRowDisposition() + $baseDisposition); - -// $item->setTaxBeforeDiscount($item->getTaxBeforeDiscount() + $disposition); -// $item->setBaseTaxBeforeDiscount($item->getBaseTaxBeforeDiscount() + $baseDisposition); - $address->setTaxAmount($address->getTaxAmount() + $disposition); $address->setBaseTaxAmount($address->getBaseTaxAmount() + $baseDisposition); @@ -527,15 +523,11 @@ protected function _processItem(Mage_Sales_Model_Quote_Address $address, $item, if ($this->_helper->includeInSubtotal($store)) { $address->setSubtotal($address->getSubtotal() + $rowValue); $address->setBaseSubtotal($address->getBaseSubtotal() + $baseRowValue); - -// $address->setSubtotalWithDiscount($address->getSubtotalWithDiscount() + $rowValue); -// $address->setBaseSubtotalWithDiscount($address->getBaseSubtotalWithDiscount() + $baseRowValue); } else { $address->setTaxAmount($address->getTaxAmount() + $rowValue); $address->setBaseTaxAmount($address->getBaseTaxAmount() + $baseRowValue); } - $productTaxes[] = array( 'title' => $title, 'base_amount' => $baseValue,