Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mage_Contacts - DOC block update #699

Merged
merged 2 commits into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions app/code/core/Mage/Contacts/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,19 @@
*/
class Mage_Contacts_Helper_Data extends Mage_Core_Helper_Abstract
{

const XML_PATH_ENABLED = 'contacts/contacts/enabled';

/**
* @return bool
*/
public function isEnabled()
{
return Mage::getStoreConfig( self::XML_PATH_ENABLED );
return Mage::getStoreConfigFlag(self::XML_PATH_ENABLED);
}

/**
* @return string
*/
public function getUserName()
{
if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
Expand All @@ -50,6 +55,9 @@ public function getUserName()
return trim($customer->getName());
}

/**
* @return string
*/
public function getUserEmail()
{
if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
Expand Down
8 changes: 5 additions & 3 deletions app/code/core/Mage/Contacts/controllers/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@
*/
class Mage_Contacts_IndexController extends Mage_Core_Controller_Front_Action
{

const XML_PATH_EMAIL_RECIPIENT = 'contacts/email/recipient_email';
const XML_PATH_EMAIL_SENDER = 'contacts/email/sender_email_identity';
const XML_PATH_EMAIL_TEMPLATE = 'contacts/email/email_template';
const XML_PATH_ENABLED = 'contacts/contacts/enabled';

/**
* @return Mage_Core_Controller_Front_Action|void
*/
public function preDispatch()
{
parent::preDispatch();
Expand All @@ -64,7 +66,7 @@ public function postAction()
$post = $this->getRequest()->getPost();
if ( $post ) {
$translate = Mage::getSingleton('core/translate');
/* @var $translate Mage_Core_Model_Translate */
/* @var Mage_Core_Model_Translate $translate */
$translate->setTranslateInline(false);
try {
$postObject = new Varien_Object();
Expand Down Expand Up @@ -92,7 +94,7 @@ public function postAction()
throw new Exception();
}
$mailTemplate = Mage::getModel('core/email_template');
/* @var $mailTemplate Mage_Core_Model_Email_Template */
/* @var Mage_Core_Model_Email_Template $mailTemplate */
$mailTemplate->setDesignConfig(array('area' => 'frontend'))
->setReplyTo($post['email'])
->sendTransactional(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/


/* @var $installer Mage_Core_Model_Resource_Setup */
/* @var Mage_Core_Model_Resource_Setup $installer */

$installer = $this;

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

$installer = $this;
/* @var $installer Mage_Core_Model_Resource_Setup */
/* @var Mage_Core_Model_Resource_Setup $installer */

$installer->startSetup();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
*/

$installer = $this;
/* @var $installer Mage_Core_Model_Resource_Setup */
/* @var Mage_Core_Model_Resource_Setup $installer */
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

$installer = $this;
/* @var $installer Mage_Core_Model_Resource_Setup */
/* @var Mage_Core_Model_Resource_Setup $installer */

$installer->startSetup();

Expand Down