Permalink
Browse files

Code style fix

  • Loading branch information...
1 parent 86859ca commit 42a19b8c3b32aa97c8793653306acf9a69cb7912 @creocoder creocoder committed Oct 4, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 framework/db/schema/mssql/CMssqlCommandBuilder.php
@@ -178,8 +178,8 @@ public function createUpdateCounterCommand($table,$counters,$criteria)
*/
public function applyLimit($sql, $limit, $offset)
{
- $limit = $limit!==null ? intval($limit) : -1;
- $offset = $offset!==null ? intval($offset) : -1;
+ $limit = $limit!==null ? (int)$limit : -1;
+ $offset = $offset!==null ? (int)$offset : -1;
if ($limit > 0 && $offset <= 0) //just limit
$sql = preg_replace('/^([\s(])*SELECT( DISTINCT)?(?!\s*TOP\s*\()/i',"\\1SELECT\\2 TOP $limit", $sql);
elseif($limit > 0 && $offset > 0)

0 comments on commit 42a19b8

Please sign in to comment.