Skip to content

Commit

Permalink
Import Magento Release 1.4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeSaferite committed Jun 10, 2010
1 parent 52438d7 commit 960045c
Show file tree
Hide file tree
Showing 5,412 changed files with 124,892 additions and 37,428 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
642 changes: 642 additions & 0 deletions RELEASE_NOTES.txt

Large diffs are not rendered by default.

19 changes: 13 additions & 6 deletions app/Mage.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ final class Mage
public static function getVersion()
{
$i = self::getVersionInfo();
return trim("{$i['major']}.{$i['minor']}.{$i['revision']}.{$i['patch']}-{$i['stability']}{$i['number']}", '.-');
return trim("{$i['major']}.{$i['minor']}.{$i['revision']}" . ($i['patch'] != '' ? ".{$i['patch']}" : "") . "-{$i['stability']}{$i['number']}", '.-');
}

/**
Expand All @@ -152,8 +152,8 @@ public static function getVersionInfo()
return array(
'major' => '1',
'minor' => '4',
'revision' => '0',
'patch' => '1',
'revision' => '1',
'patch' => '0',
'stability' => '',
'number' => '',
);
Expand Down Expand Up @@ -658,8 +658,9 @@ public static function isInstalled($options = array())
* @param string $message
* @param integer $level
* @param string $file
* @param bool $forceLog
*/
public static function log($message, $level = null, $file = '')
public static function log($message, $level = null, $file = '', $forceLog = false)
{
if (!self::getConfig()) {
return;
Expand All @@ -675,7 +676,7 @@ public static function log($message, $level = null, $file = '')
$logActive = true;
}

if (!self::$_isDeveloperMode && !$logActive) {
if (!self::$_isDeveloperMode && !$logActive && !$forceLog) {
return;
}

Expand All @@ -699,7 +700,13 @@ public static function log($message, $level = null, $file = '')

$format = '%timestamp% %priorityName% (%priority%): %message%' . PHP_EOL;
$formatter = new Zend_Log_Formatter_Simple($format);
$writer = new Zend_Log_Writer_Stream($logFile);
$writerModel = (string)self::getConfig()->getNode('global/log/core/writer_model');
if (!self::$_app || !$writerModel) {
$writer = new Zend_Log_Writer_Stream($logFile);
}
else {
$writer = new $writerModel($logFile);
}
$writer->setFormatter($formatter);
$loggers[$file] = new Zend_Log($writer);
}
Expand Down
20 changes: 13 additions & 7 deletions app/code/community/Phoenix/Moneybookers/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,28 @@ class Phoenix_Moneybookers_Helper_Data extends Mage_Payment_Helper_Data
public function activateEmail()
{
$storeId = Mage::app()->getStore()->getId();
$mailTemplate = Mage::getModel('core/email_template');

$mailTemplate->setDesignConfig(array('area' => 'frontend', 'store' => $storeId))
$translate = Mage::getSingleton('core/translate');
/* @var $translate Mage_Core_Model_Translate */
$translate->setTranslateInline(false);

Mage::getModel('core/email_template')
->setDesignConfig(array('area' => 'frontend', 'store' => $storeId))
->sendTransactional(
'moneybookers_activateemail',
Mage::getStoreConfig(Mage_Sales_Model_Order::XML_PATH_EMAIL_IDENTITY, $storeId),
$this->_activationEmailTo,
$this->_activationEmailTo,
null,
array(
'subject' => $this->_activationEmailSubject,
'email_addr' => Mage::getStoreConfig(self::XML_PATH_EMAIL),
'url' => Mage::getBaseUrl(),
'subject' => $this->_activationEmailSubject,
'email_addr' => Mage::getStoreConfig(self::XML_PATH_EMAIL),
'url' => Mage::getBaseUrl(),
'customer_id' => Mage::getStoreConfig(self::XML_PATH_CUSTOMER_ID),
'language' => Mage::getModel('core/locale')->getDefaultLocale()
'language' => Mage::getModel('core/locale')->getDefaultLocale()
)
);

$translate->setTranslateInline(true);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Phoenix/Moneybookers/Model/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ abstract class Phoenix_Moneybookers_Model_Abstract extends Mage_Payment_Model_Me

protected $_paymentMethod = 'abstract';
protected $_defaultLocale = 'en';
protected $_supportedLocales = array('cn', 'cz', 'en', 'es', 'de', 'fr', 'gr', 'it', 'nl', 'ro', 'ru', 'pl', 'tr');
protected $_supportedLocales = array('cn', 'cz', 'da', 'en', 'es', 'fi', 'de', 'fr', 'gr', 'it', 'nl', 'ro', 'ru', 'pl', 'sv', 'tr');
protected $_hidelogin = '1';

protected $_order;
Expand Down
14 changes: 7 additions & 7 deletions app/code/community/Phoenix/Moneybookers/Model/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ public function processStatusEvent()
$msg = '';
switch($params['status']) {
case self::MONEYBOOKERS_STATUS_FAIL: //fail
$msg = Mage::helper('moneybookers')->__('Payment failed');
$msg = Mage::helper('moneybookers')->__('Payment failed.');
$this->_processCancel($msg);
break;
case self::MONEYBOOKERS_STATUS_CANCEL: //cancel
$msg = Mage::helper('moneybookers')->__('Payment was canceled');
$msg = Mage::helper('moneybookers')->__('Payment was canceled.');
$this->_processCancel($msg);
break;
case self::MONEYBOOKERS_STATUS_PENDING: //pending
Expand All @@ -116,7 +116,7 @@ public function processStatusEvent()
public function cancelEvent() {
try {
$this->_validateEventData(false);
$this->_processCancel('Payment was canceled');
$this->_processCancel('Payment was canceled.');
return Mage::helper('moneybookers')->__('The order has been canceled.');
} catch (Mage_Core_Exception $e) {
return $e->getMessage();
Expand Down Expand Up @@ -199,7 +199,7 @@ protected function _validateEventData($fullCheck = true)
// get request variables
$params = $this->_eventData;
if (empty($params)) {
Mage::throwException('Request doesn\'t contain any elements.');
Mage::throwException('Request does not contain any elements.');
}

// check order ID
Expand All @@ -217,12 +217,12 @@ protected function _validateEventData($fullCheck = true)
if ($fullCheck) {
// check payment status
if (empty($params['status'])) {
Mage::throwException('Unknown payment status');
Mage::throwException('Unknown payment status.');
}

// check transaction signature
if (empty($params['md5sig'])) {
Mage::throwException('Invalid transaction signature');
Mage::throwException('Invalid transaction signature.');
}

$checkParams = array('merchant_id', 'transaction_id', 'secret', 'mb_amount', 'mb_currency', 'status');
Expand All @@ -245,7 +245,7 @@ protected function _validateEventData($fullCheck = true)
// check transaction amount if currency matches
if ($this->_order->getOrderCurrencyCode() == $params['mb_currency']) {
if (round($this->_order->getGrandTotal(), 2) != $params['mb_amount']) {
Mage::throwException('Transaction amount doesn\'t match.');
Mage::throwException('Transaction amount does not match.');
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function paymentAction()
Mage::throwException('No order for processing found');
}
$order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage_Sales_Model_Order::STATE_PENDING_PAYMENT,
Mage::helper('moneybookers')->__('Customer was redirected to Moneybookers.')
Mage::helper('moneybookers')->__('The customer was redirected to Moneybookers.')
);
$order->save();

Expand Down
56 changes: 39 additions & 17 deletions app/code/community/Phoenix/Moneybookers/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
</moneybookers_activateemail>
</email>
</template>
<payment>
<groups>
<mbookers>Moneybookers</mbookers>
</groups>
</payment>
</global>
<frontend>
<secure_url>
Expand Down Expand Up @@ -143,172 +148,189 @@
<payment>
<moneybookers_acc>
<model>moneybookers/acc</model>
<group>mbookers</group>
</moneybookers_acc>
<moneybookers_csi>
<model>moneybookers/csi</model>
<group>mbookers</group>
</moneybookers_csi>
<moneybookers_did>
<model>moneybookers/did</model>
<group>mbookers</group>
</moneybookers_did>
<moneybookers_dnk>
<model>moneybookers/dnk</model>
<group>mbookers</group>
</moneybookers_dnk>
<moneybookers_ebt>
<model>moneybookers/ebt</model>
<group>mbookers</group>
</moneybookers_ebt>
<moneybookers_ent>
<model>moneybookers/ent</model>
<group>mbookers</group>
</moneybookers_ent>
<moneybookers_gcb>
<model>moneybookers/gcb</model>
<group>mbookers</group>
</moneybookers_gcb>
<moneybookers_gir>
<model>moneybookers/gir</model>
<group>mbookers</group>
</moneybookers_gir>
<moneybookers_idl>
<model>moneybookers/idl</model>
<group>mbookers</group>
</moneybookers_idl>
<moneybookers_lsr>
<model>moneybookers/lsr</model>
<group>mbookers</group>
</moneybookers_lsr>
<moneybookers_npy>
<model>moneybookers/npy</model>
<group>mbookers</group>
</moneybookers_npy>
<moneybookers_pli>
<model>moneybookers/pli</model>
<group>mbookers</group>
</moneybookers_pli>
<moneybookers_psp>
<model>moneybookers/psp</model>
<group>mbookers</group>
</moneybookers_psp>
<moneybookers_pwy>
<model>moneybookers/pwy</model>
<group>mbookers</group>
</moneybookers_pwy>
<moneybookers_sft>
<model>moneybookers/sft</model>
<group>mbookers</group>
</moneybookers_sft>
<moneybookers_so2>
<model>moneybookers/so2</model>
<group>mbookers</group>
</moneybookers_so2>
<moneybookers_wlt>
<model>moneybookers/wlt</model>
<group>mbookers</group>
</moneybookers_wlt>
</payment>
<moneybookers>
<settings>
<activationstatus>0</activationstatus>
</settings>
<moneybookers_acc translate="title" module="moneybookers">
<moneybookers_acc>
<active>0</active>
<model>moneybookers/acc</model>
<title>Credit Card / Visa, Mastercard, AMEX, JCB, Diners</title>
<allowspecific>0</allowspecific>
</moneybookers_acc>
<moneybookers_csi translate="title" module="moneybookers">
<moneybookers_csi>
<active>0</active>
<model>moneybookers/csi</model>
<title>CartaSi</title>
<allowspecific>1</allowspecific>
<specificcountry>IT</specificcountry>
</moneybookers_csi>
<moneybookers_did translate="title" module="moneybookers">
<moneybookers_did>
<active>0</active>
<model>moneybookers/did</model>
<title>Lastschrift (ELV)</title>
<allowspecific>1</allowspecific>
<specificcountry>DE</specificcountry>
</moneybookers_did>
<moneybookers_dnk translate="title" module="moneybookers">
<moneybookers_dnk>
<active>0</active>
<model>moneybookers/dnk</model>
<title>Dankort</title>
<allowspecific>1</allowspecific>
<specificcountry>DK</specificcountry>
</moneybookers_dnk>
<moneybookers_ebt translate="title" module="moneybookers">
<moneybookers_ebt>
<active>0</active>
<model>moneybookers/ebt</model>
<title>Nordea Solo</title>
<allowspecific>1</allowspecific>
<specificcountry>SE</specificcountry>
</moneybookers_ebt>
<moneybookers_ent translate="title" module="moneybookers">
<moneybookers_ent>
<active>0</active>
<model>moneybookers/ent</model>
<title>eNETS</title>
<allowspecific>1</allowspecific>
<specificcountry>SG</specificcountry>
</moneybookers_ent>
<moneybookers_gcb translate="title" module="moneybookers">
<moneybookers_gcb>
<active>0</active>
<model>moneybookers/gcb</model>
<title>Carte Bleue</title>
<allowspecific>1</allowspecific>
<specificcountry>FR</specificcountry>
</moneybookers_gcb>
<moneybookers_gir translate="title" module="moneybookers">
<moneybookers_gir>
<active>0</active>
<model>moneybookers/gir</model>
<title>Giropay</title>
<allowspecific>1</allowspecific>
<specificcountry>DE</specificcountry>
</moneybookers_gir>
<moneybookers_idl translate="title" module="moneybookers">
<moneybookers_idl>
<active>0</active>
<model>moneybookers/idl</model>
<title>iDeal</title>
<allowspecific>1</allowspecific>
<specificcountry>NL</specificcountry>
</moneybookers_idl>
<moneybookers_lsr translate="title" module="moneybookers">
<moneybookers_lsr>
<active>0</active>
<model>moneybookers/lsr</model>
<title>Laser</title>
<allowspecific>1</allowspecific>
<specificcountry>IE</specificcountry>
</moneybookers_lsr>
<moneybookers_npy translate="title" module="moneybookers">
<moneybookers_npy>
<active>0</active>
<model>moneybookers/npy</model>
<title>EPS Online-Überweisung</title>
<allowspecific>1</allowspecific>
<specificcountry>AT</specificcountry>
</moneybookers_npy>
<moneybookers_pli translate="title" module="moneybookers">
<moneybookers_pli>
<active>0</active>
<model>moneybookers/pli</model>
<title>POLi</title>
<allowspecific>1</allowspecific>
<specificcountry>AU</specificcountry>
</moneybookers_pli>
<moneybookers_psp translate="title" module="moneybookers">
<moneybookers_psp>
<active>0</active>
<model>moneybookers/psp</model>
<title>Postepay</title>
<allowspecific>1</allowspecific>
<specificcountry>IT</specificcountry>
</moneybookers_psp>
<moneybookers_pwy translate="title" module="moneybookers">
<moneybookers_pwy>
<active>0</active>
<model>moneybookers/pwy</model>
<title>All Polish Banks</title>
<allowspecific>1</allowspecific>
<specificcountry>PL</specificcountry>
</moneybookers_pwy>
<moneybookers_sft translate="title" module="moneybookers">
<moneybookers_sft>
<active>0</active>
<model>moneybookers/sft</model>
<title>Sofortüberweisung</title>
<allowspecific>1</allowspecific>
<specificcountry>DE</specificcountry>
</moneybookers_sft>
<moneybookers_so2 translate="title" module="moneybookers">
<moneybookers_so2>
<active>0</active>
<model>moneybookers/so2</model>
<title>Nordea Solo</title>
<allowspecific>1</allowspecific>
<specificcountry>FI</specificcountry>
</moneybookers_so2>
<moneybookers_wlt translate="title" module="moneybookers">
<moneybookers_wlt>
<active>0</active>
<model>moneybookers/wlt</model>
<title>Moneybookers eWallet</title>
Expand Down
Loading

0 comments on commit 960045c

Please sign in to comment.