summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Regad <dregad@mantisbt.org>2016-01-08 15:58:49 +0000
committerDamien Regad <dregad@mantisbt.org>2016-01-08 15:58:49 +0000
commit15c164663c45772f9a565667c58ef0b1bd927ded (patch)
treeb7c0850fafd688f56a61d53ea106b041c4831f4c
parentc8524bb3fcd291fe6233643fb43e9ceeb8aef925 (diff)
downloadadodb-15c164663c45772f9a565667c58ef0b1bd927ded.tar.gz
adodb-15c164663c45772f9a565667c58ef0b1bd927ded.tar.bz2
adodb-15c164663c45772f9a565667c58ef0b1bd927ded.zip
Whitespace
-rw-r--r--adodb.inc.php49
1 files changed, 32 insertions, 17 deletions
diff --git a/adodb.inc.php b/adodb.inc.php
index efd39b32..c6f421eb 100644
--- a/adodb.inc.php
+++ b/adodb.inc.php
@@ -1500,32 +1500,47 @@ if (!defined('_ADODB_LAYER')) {
}
if ($offset <= 0) {
- // access includes ties in result
- if ($isaccess) {
- $sql = preg_replace(
- '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop.' '.$nrows.' ',$sql);
+ // access includes ties in result
+ if ($isaccess) {
+ $sql = preg_replace(
+ '/(^\s*select\s+(distinctrow|distinct)?)/i',
+ '\\1 '.$this->hasTop.' '.$nrows.' ',
+ $sql
+ );
- if ($secs2cache != 0) {
- $ret = $this->CacheExecute($secs2cache, $sql,$inputarr);
- } else {
- $ret = $this->Execute($sql,$inputarr);
- }
- return $ret; // PHP5 fix
- } else if ($ismssql){
- $sql = preg_replace(
- '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop.' '.$nrows.' ',$sql);
+ if ($secs2cache != 0) {
+ $ret = $this->CacheExecute($secs2cache, $sql,$inputarr);
} else {
- $sql = preg_replace(
- '/(^\s*select\s)/i','\\1 '.$this->hasTop.' '.$nrows.' ',$sql);
+ $ret = $this->Execute($sql,$inputarr);
}
+ return $ret; // PHP5 fix
+ } else if ($ismssql){
+ $sql = preg_replace(
+ '/(^\s*select\s+(distinctrow|distinct)?)/i',
+ '\\1 '.$this->hasTop.' '.$nrows.' ',
+ $sql
+ );
+ } else {
+ $sql = preg_replace(
+ '/(^\s*select\s)/i',
+ '\\1 '.$this->hasTop.' '.$nrows.' ',
+ $sql
+ );
+ }
} else {
$nn = $nrows + $offset;
if ($isaccess || $ismssql) {
$sql = preg_replace(
- '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop.' '.$nn.' ',$sql);
+ '/(^\s*select\s+(distinctrow|distinct)?)/i',
+ '\\1 '.$this->hasTop.' '.$nn.' ',
+ $sql
+ );
} else {
$sql = preg_replace(
- '/(^\s*select\s)/i','\\1 '.$this->hasTop.' '.$nn.' ',$sql);
+ '/(^\s*select\s)/i',
+ '\\1 '.$this->hasTop.' '.$nn.' ',
+ $sql
+ );
}
}
}