Skip to content

Commit

Permalink
Merge pull request #232 from magento-goinc/MAGETWO-44074
Browse files Browse the repository at this point in the history
[GITHUB] Bugs fixing
  • Loading branch information
He, Joan(johe) committed Dec 9, 2015
2 parents 2f74e09 + 8235d5b commit c334bf2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ class Suffix extends \Magento\Framework\App\Config\Value
/** @var \Magento\Framework\DB\Adapter\AdapterInterface */
protected $connection;

/**
* @var \Magento\Framework\App\ResourceConnection
*/
protected $resource;

/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
Expand Down Expand Up @@ -67,6 +72,7 @@ public function __construct(
$this->connection = $appResource->getConnection();
$this->urlFinder = $urlFinder;
$this->storeManager = $storeManager;
$this->resource = $appResource;
}

/**
Expand Down Expand Up @@ -118,7 +124,7 @@ protected function updateSuffixForUrlRewrites()
? [UrlRewrite::REQUEST_PATH => preg_replace($oldSuffixPattern, $suffix, $urlRewrite->getRequestPath())]
: [UrlRewrite::TARGET_PATH => preg_replace($oldSuffixPattern, $suffix, $urlRewrite->getTargetPath())];
$this->connection->update(
DbStorage::TABLE_NAME,
$this->resource->getTableName(DbStorage::TABLE_NAME),
$bind,
$this->connection->quoteIdentifier(UrlRewrite::URL_REWRITE_ID) . ' = ' . $urlRewrite->getUrlRewriteId()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected function doGetMaxRegularAmount()
public function getMinRegularAmount()
{
if (null === $this->minRegularAmount) {
$this->minRegularAmount = $this->doGetMinRegularAmount() ?: false;
$this->minRegularAmount = $this->doGetMinRegularAmount() ?: parent::getAmount();
}
return $this->minRegularAmount;
}
Expand Down

0 comments on commit c334bf2

Please sign in to comment.