Skip to content
This repository has been archived by the owner on Feb 9, 2019. It is now read-only.

Commit

Permalink
BUGFIX: duplicate index inclusion, new api library block missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosky17 committed Nov 3, 2015
1 parent d94a4af commit da49ddf
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
36 changes: 36 additions & 0 deletions app/code/local/Ebizmarts/SagePaySuite/Block/ApiLibrary.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

/**
* SagePaySuite PI integration library inclusion
*
* @category Ebizmarts
* @package Ebizmarts_SagePaySuite
* @author Ebizmarts <[email protected]>
*/
class Ebizmarts_SagePaySuite_Block_ApiLibrary extends Mage_Core_Block_Template
{

/**
* Return URL for API Library
*
* @return string
*/
public function getAPIUrl()
{
$piModel = Mage::getModel('sagepaysuite/sagePayNit');
return $piModel->getUrl("api");
}

/**
* Disable url inclusion if not enabled
*
* @return string
*/
protected function _toHtml()
{
if(false === Mage::getStoreConfigFlag('payment/sagepaynit/active')){
return '';
}
return parent::_toHtml();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

$installer->startSetup();

$installer->run("
ALTER TABLE `{$this->getTable('sagepaysuite_transaction')}` ADD INDEX `IDX_SAGEPAYSUITE_TRANSACTION_CREATED_AT` (`created_at`);
");

$installer->run("
ALTER TABLE `{$this->getTable('sagepaysuite_transaction')}` CHANGE `integration` `integration` ENUM('direct','server','form','nit') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
");
Expand Down

0 comments on commit da49ddf

Please sign in to comment.