[Fusionforge-commits] FusionForge branch master updated. aedf8b8e839a23e91453efdacad80d25c83bf677

Thorsten Glaser mirabilos at fusionforge.org
Wed Dec 19 10:10:02 CET 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  aedf8b8e839a23e91453efdacad80d25c83bf677 (commit)
      from  64e7a234a955d4f29d7e6a91063edea685896f8d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit aedf8b8e839a23e91453efdacad80d25c83bf677
Author: Thorsten Glaser <tg at mirbsd.org>
Date:   Wed Dec 19 10:09:43 2012 +0100

    use a getMessages() implementation that supports *both* APIs

diff --git a/src/common/tracker/Artifact.class.php b/src/common/tracker/Artifact.class.php
index dab1f94..d399ad6 100644
--- a/src/common/tracker/Artifact.class.php
+++ b/src/common/tracker/Artifact.class.php
@@ -677,11 +677,22 @@ class Artifact extends Error {
 	 * @param string $order
 	 * @return resource result set.
 	 */
-	function getMessages($order='up') {
-		if ($order == 'up') {
+	function getMessages($ascending='up') {
+		/*
+		 * This is necessary because someone committed a change
+		 * to this method in FusionForge trunk that accepts 'up'
+		 * as default (luckily, it’s the same!) and 'down' as
+		 * alternative probability, whereas FusionForge 5.2 has
+		 * false as default and true for ascending order, so we
+		 * need to check this out and use === to be sure ☹
+		 */
+		if ($ascending === 'up') {
 			$order = 'DESC';
-		}
-		else {
+		} elseif ($ascending === true) {
+			$order = 'ASC';
+		} elseif ($ascending === false) {
+			$order = 'DESC';
+		} else {
 			$order = 'ASC';
 		}
 		return db_query_params('SELECT * FROM artifact_message_user_vw WHERE artifact_id=$1 ORDER BY adddate ' . $order . ', id ASC',

-----------------------------------------------------------------------

Summary of changes:
 src/common/tracker/Artifact.class.php |   19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list