Code Monkey home page Code Monkey logo

Comments (1)

dlangille avatar dlangille commented on June 22, 2024

Here's the diff to get http://dev.freshports.org/backend working on HEAD only

[dan@webserver:/usr/local/www/freshports.org/classes] $ git diff newsfeed.php
diff --git a/classes/newsfeed.php b/classes/newsfeed.php
index ef03555b..10bfeed6 100644
--- a/classes/newsfeed.php
+++ b/classes/newsfeed.php
@@ -32,7 +32,7 @@
        require_once($_SERVER['DOCUMENT_ROOT'] . '/../feedcreator/lib/Creator/RSSCreator20.php'); 
        require_once($_SERVER['DOCUMENT_ROOT'] . '/../feedcreator/lib/UniversalFeedCreator.php'); 
        
-function newsfeed($db, $Format, $WatchListID = 0) {
+function newsfeed($db, $Format, $WatchListID = 0, $Branch = BRANCH_HEAD) {
 
        $WatchListID = pg_escape_string($WatchListID);
        $Format      = pg_escape_string($Format);
@@ -160,9 +160,10 @@ FROM (
            to_char(commit_log.commit_date - SystemTimeAdjust(), 'HH24:MI') AS commit_time,
            encoding_losses
      FROM commit_log JOIN
-               (SELECT latest_commits_ports.commit_log_id
-                   FROM latest_commits_ports
-               ORDER BY latest_commits_ports.commit_date DESC
+               (SELECT LCP.commit_log_id
+                  FROM latest_commits_ports LCP JOIN commit_log_branches CLB ON LCP.commit_log_id = CLB.commit_log_id
+                                     JOIN system_branch SB ON SB.branch_name = '$Branch' AND SB.id = CLB.branch_id
+              ORDER BY LCP.commit_date DESC
                  LIMIT $MaxNumberOfPorts) AS LCP
            ON commit_log.id = LCP.commit_log_id) AS LCPCL JOIN commit_log_ports
                          ON commit_log_ports.commit_log_id = LCPCL.commit_log_id
[dan@webserver:/usr/local/www/freshports.org/classes] $ 

from freshports.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.