Skip to content

Commit

Permalink
Merge pull request #179 from magento-south/BUGS
Browse files Browse the repository at this point in the history
[South] Bug fixes
  • Loading branch information
slavvka committed Mar 20, 2015
2 parents 3e3c76e + 3c23add commit c0eef7c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function persist(FixtureInterface $fixture = null)
}

$url = 'admin/user_role/roleGrid/sort/role_id/dir/desc/';
$regExpPattern = '/col\-role_id\W*(\d+)<.td><[^<>]*?>' . $data['rolename'] . '/siu';
$regExpPattern = '/col\-role_id[\s\W]*(\d+)\s*<.td>\s*<[^<>]*?>' . $data['rolename'] . '/siu';

$extractor = new Extractor($url, $regExpPattern);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function persist(FixtureInterface $fixture = null)
}

$url = 'admin/user/roleGrid/sort/user_id/dir/desc';
$regExpPattern = '/col-user_id\W*(\d+)<.td><[^<>]*?>' . $data['username'] . '/siu';
$regExpPattern = '/col-user_id[\s\W]*(\d+)\s*<.td>\s*<[^<>]*?>' . $data['username'] . '/siu';
$extractor = new Extractor($url, $regExpPattern);

return ['user_id' => $extractor->getData()[1]];
Expand Down
6 changes: 5 additions & 1 deletion lib/internal/Magento/Framework/Stdlib/DateTime/Timezone.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ public function formatDate($date = null, $format = \IntlDateFormatter::SHORT, $s
public function scopeTimeStamp($scope = null)
{
$timezone = $this->_scopeConfig->getValue($this->getDefaultTimezonePath(), $this->_scopeType, $scope);
return (new \DateTime('now', new \DateTimeZone($timezone ?: 'UTC')))->getTimestamp();
$currentTimezone = @date_default_timezone_get();
@date_default_timezone_set($timezone);
$date = date('Y-m-d H:i:s');
@date_default_timezone_set($currentTimezone);
return strtotime($date);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function minify($file)
'#(?<!]]>)\s+</#',
'</',
preg_replace(
'#((?:<\?php\s+(?!echo|print)[^\?]*)\?>)\s+#',
'#((?:<\?php\s+(?!echo|print|if|elseif|else)[^\?]*)\?>)\s+#',
'$1',
preg_replace(
'#(?<!' . implode('|', $this->inlineHtmlTags) . ')\> \<#',
Expand Down

0 comments on commit c0eef7c

Please sign in to comment.