From d44b5d0514037f300215ee90f413b9a15c2a00b8 Mon Sep 17 00:00:00 2001 From: "Igor V. Gulyaev" Date: Sun, 20 Nov 2011 12:55:55 +0400 Subject: [PATCH 1/2] * add GroupByDialectCriteriaTest --- .../main/GroupByDialectCriteriaTest.class.php | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 test/main/GroupByDialectCriteriaTest.class.php diff --git a/test/main/GroupByDialectCriteriaTest.class.php b/test/main/GroupByDialectCriteriaTest.class.php new file mode 100644 index 0000000000..4e06befb36 --- /dev/null +++ b/test/main/GroupByDialectCriteriaTest.class.php @@ -0,0 +1,44 @@ + + addProjection( + Projection::property( + SQLFunction::create( + 'date', 'strangeTime' + ), + + 'st' + ) + )-> + addProjection( + Projection::group('st') + ); + + $this->assertEquals( + $criteria->toDialectString(MyDialect::me()), + 'SELECT date(`test_user`.`strange_time`) AS `st` FROM `test_user` GROUP BY `st`' + ); + + $criteria = + Criteria::create(TestUser::dao())-> + addProjection( + Projection::property('strangeTime', 'st') + )-> + addProjection( + Projection::group('st') + ); + + $this->assertEquals( + $criteria->toDialectString(MyDialect::me()), + 'SELECT `strange_time` AS `st` FROM `test_user` GROUP BY `st`' + ); + + } + } +?> From 6cda990233ef601c0d5beed87302859726671e29 Mon Sep 17 00:00:00 2001 From: "Igor V. Gulyaev" Date: Fri, 15 Feb 2013 11:31:21 +0400 Subject: [PATCH 2/2] * bit cosmetic --- main/Net/Http/HeaderUtils.class.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/main/Net/Http/HeaderUtils.class.php b/main/Net/Http/HeaderUtils.class.php index b6042a9ff7..8688374015 100644 --- a/main/Net/Http/HeaderUtils.class.php +++ b/main/Net/Http/HeaderUtils.class.php @@ -36,8 +36,9 @@ public static function redirectBack() self::$headerSent = true; self::$redirectSent = true; return $_SERVER['HTTP_REFERER']; - } else - return false; + } + + return false; } public static function getRequestHeaderList() @@ -123,9 +124,7 @@ public static function sendContentLength($length) { Assert::isInteger($length); - header( - "Content-Length: {$length}" - ); + header("Content-Length: {$length}"); self::$headerSent = true; }