⌈⌋ branch:  freshcode


Check-in [de80c25858]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
SHA1 Hash:de80c25858cc138319686eed50d2e3d9eec437de
Date: 2017-06-12 23:11:09
User: mario
Comment:Check for UTF-8 encoding mismatches before piping row to feed. Also: add `summary` field.
Tags And Properties
  • branch=trunk inherited from [82405bb421]
  • sym-trunk inherited from [82405bb421]
Context
2017-06-12
23:11
[de80c25858] Leaf: Check for UTF-8 encoding mismatches before piping row to feed. Also: add `summary` field. (user: mario, tags: trunk)
2017-01-31
18:43
[f21257ed67] Additional howto/comments on login page regarding `lock` field requiring proper password hash or OpenID handle. (user: mario, tags: trunk)
Changes

Changes to page_feed.php.

42
43
44
45
46
47
48

49
50
51
52
53
54
55
...
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118

119

120


121
122
123
124
125
126
127
 */

#-- general project description
function feed_project($row) {
    return array(
        "name" => $row["name"],
        "title" => $row["title"],

        "description" => $row["description"],
        "homepage" => $row["homepage"],
        "license" => $row["license"],
        "tags" => $row["tags"],
        "image" => $row["image"],
        "submitter" => $row["submitter"],
        "urls" => p_key_value($row["urls"], CASE_LOWER),
................................................................................
                FROM release
               WHERE NOT deleted
                 AND NOT hidden
            GROUP BY name, t_published
            ORDER BY t_published DESC, t_changed DESC
               LIMIT ?
              OFFSET ?",
            $_GET->int->default…100->range…5…15000["num"],
            $_GET->int->default…0["offset"]
        );
#        $i = 0;
#        error_reporting(E_ALL);
#        set_error_handler("var_dump");
        foreach ($r as $row) {
#        print " " . ($i++);

            $feed["releases"][] = feed_project($row) + feed_release($row) + feed_xfer($row);

        }


    }

    
    #-- per project
    else {
        $r = db("SELECT * FROM release_versions WHERE name=? LIMIT 10", $name);
        while ( $row = $r->fetch() ) {







>







 







|


|



|
>
|
>

>
>







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
...
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
 */

#-- general project description
function feed_project($row) {
    return array(
        "name" => $row["name"],
        "title" => $row["title"],
        "summary" => $row["summary"],
        "description" => $row["description"],
        "homepage" => $row["homepage"],
        "license" => $row["license"],
        "tags" => $row["tags"],
        "image" => $row["image"],
        "submitter" => $row["submitter"],
        "urls" => p_key_value($row["urls"], CASE_LOWER),
................................................................................
                FROM release
               WHERE NOT deleted
                 AND NOT hidden
            GROUP BY name, t_published
            ORDER BY t_published DESC, t_changed DESC
               LIMIT ?
              OFFSET ?",
            $_GET->int->default…100->range…1…15000["num"],
            $_GET->int->default…0["offset"]
        );
        $i = $f = 0;
#        error_reporting(E_ALL);
#        set_error_handler("var_dump");
        foreach ($r as $row) {
            $i++;
            if (json_encode($row)) {
                 $feed["releases"][] = feed_project($row) + feed_release($row) + feed_xfer($row);
            } else { $f++; }
        }
        header("X-Count: $i");
        header("X-Invalid-Encoding: $f");
    }

    
    #-- per project
    else {
        $r = db("SELECT * FROM release_versions WHERE name=? LIMIT 10", $name);
        while ( $row = $r->fetch() ) {