Skip to content

Commit d52f8e9

Browse files
committed
Reverted code format changes
1 parent c41e13f commit d52f8e9

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,12 @@ public function getCustomerLog()
7979
*/
8080
public function getCreateDate()
8181
{
82-
return ($date = $this->getCustomer()->getCreatedAt())
83-
? $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true, false)
84-
: null;
82+
$date = $this->getCustomer()->getCreatedAt();
83+
if (!$date) {
84+
return null;
85+
}
86+
# toto with usetimezon
87+
return $this->formatDate($date,Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true,false);
8588
}
8689

8790
/**
@@ -248,10 +251,10 @@ public function isHidden()
248251
}
249252

250253
/**
251-
* @deprecated
252254
* Return instance of core helper
253255
*
254256
* @return Mage_Core_Helper_Data
257+
* @deprecated
255258
*/
256259
protected function _getCoreHelper()
257260
{

app/code/core/Mage/Core/Block/Abstract.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,9 @@ public function helper($name)
11281128
*/
11291129
public function formatDate($date = null, $format = Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, $showTime = false, $useTimezone = true)
11301130
{
1131-
return $this->helper('core')->formatDate($date, $format, $showTime, $useTimezone);
1131+
/** @var Mage_Core_Helper_Data $helper */
1132+
$helper = $this->helper('core');
1133+
return $helper->formatDate($date, $format, $showTime, $useTimezone);
11321134
}
11331135

11341136
/**

app/code/core/Mage/Core/Helper/Data.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,11 @@ public function formatDate($date = null, $format = Mage_Core_Model_Locale::FORMA
176176
}
177177
}
178178

179-
$format = $showTime
180-
? Mage::app()->getLocale()->getDateTimeFormat($format)
181-
: Mage::app()->getLocale()->getDateFormat($format);
179+
if ($showTime) {
180+
$format = Mage::app()->getLocale()->getDateTimeFormat($format);
181+
} else {
182+
$format = Mage::app()->getLocale()->getDateFormat($format);
183+
}
182184

183185
return $date->toString($format);
184186
}

0 commit comments

Comments
 (0)