diff options
author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-08-06 21:36:32 +0000 |
---|---|---|
committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-08-06 21:36:32 +0000 |
commit | 691ce806dc9aefac596a692ff2ba927a81a65440 (patch) | |
tree | 410f64288ef1d8bbc8455509af74d0e7582dc48e /system | |
parent | c83650d83ad8b1f4bda30cac2ae8efa6e1c97287 (diff) | |
parent | 8559cdb5b6bfa87864941f726521660023779fa7 (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'system')
-rw-r--r-- | system/helpers/text.php | 4 | ||||
-rw-r--r-- | system/libraries/Database_Builder.php | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/system/helpers/text.php b/system/helpers/text.php index bf82f12a..f7f040cd 100644 --- a/system/helpers/text.php +++ b/system/helpers/text.php @@ -20,7 +20,7 @@ class text_Core { public static function limit_words($str, $limit = 100, $end_char = NULL) { $limit = (int) $limit; - $end_char = ($end_char === NULL) ? '…' : $end_char; + $end_char = ($end_char === NULL) ? '…' : $end_char; if (trim($str) === '') return $str; @@ -46,7 +46,7 @@ class text_Core { */ public static function limit_chars($str, $limit = 100, $end_char = NULL, $preserve_words = FALSE) { - $end_char = ($end_char === NULL) ? '…' : $end_char; + $end_char = ($end_char === NULL) ? '…' : $end_char; $limit = (int) $limit; diff --git a/system/libraries/Database_Builder.php b/system/libraries/Database_Builder.php index 62b2a163..e86ce379 100644 --- a/system/libraries/Database_Builder.php +++ b/system/libraries/Database_Builder.php @@ -1021,14 +1021,14 @@ class Database_Builder_Core { $sql .= "\n".'WHERE '.$this->compile_conditions($this->where); } - if ( ! empty($this->having)) + if ( ! empty($this->group_by)) { - $sql .= "\n".'HAVING '.$this->compile_conditions($this->having); + $sql .= "\n".'GROUP BY '.$this->compile_group_by(); } - if ( ! empty($this->group_by)) + if ( ! empty($this->having)) { - $sql .= "\n".'GROUP BY '.$this->compile_group_by(); + $sql .= "\n".'HAVING '.$this->compile_conditions($this->having); } if ( ! empty($this->order_by)) |